PageSourceSearch

https://comparemyfunding-pq3ql.ondigitalocean.app/assets/DiscoveryForm-DJDTnW9K.js

js comparemyfunding-pq3ql.ondigitalocean.app collected 2026-10-03 14:53:54 UTC 486,537 bytes, 79 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.es-BFHpOZYc.js","assets/index-CoYLrH1N.js","assets/index-nRtmxXbl.css","assets/SelectField-CCUM7sR6.js","assets/funnelTracking-BRlMdja5.js","assets/SelectField-CNMKqrv4.css","assets/EmbedLayout-GKLXjwfA.js","assets/EmbedLayout-i3vBy7QZ.css"])))=>i.map(i=>d[i]);
2import{w as Bi,c as yn,r as bt,U as su,N as bn,H as Fn,J as Pn,K as In,a7 as pi,a8 as Ba,a9 as uh,L as Qo,V as pl,_ as Cs,e as Re,q as Te,j as he,l as ht,h as Vn,A as nt,O as mo,P as go,s as vo,k as Dt,t as At,W as xd,v as Tt,y as de,a0 as Ld,o as ch,B as dh,C as fh,aa as es,G as hh,f as Ju,a as ph,u as mh,I as gh,Q as vh,T as Pi,x as yh,X as bh,p as ts,g as vn,M as ml,n as Xu}from"./index-CoYLrH1N.js";import{B as Gl,D as wh,p as Zu,i as _h,e as Ah,E as Nh,F as Ma,G as Sh,H as xh,I as Lh,T as Hn,J as gs,K as Yl,j as kd,u as kh,a as Fh,b as Ph,k as Qi,L as Ih,M as gl,N as Ch,f as Eh,O as Qu,C as Oh,h as co,S as ui,Q as Bh,d as vl,P as ec,g as yl,R as Rh,A as Mh}from"./SelectField-CCUM7sR6.js";import{E as Dh}from"./EmbedLayout-GKLXjwfA.js";import{a as Ii,F as rs,t as tc,b as rc,c as Th}from"./funnelTracking-BRlMdja5.js";const qh=Ah("Email"),bl=_h(),Ss=(r,e="+44")=>wh(r,e),jh=36;function Uh(r,e){const t=Number(r),n=Number(e);if(!t||!n)return null;const o=new Date,i=new Date(n,t-1,1);return i>o?0:(o.getFullYear()-i.getFullYear())*12+(o.getMonth()-i.getMonth())}function xs(r,e){const t=Uh(r,e);return t!==null&&t<jh}const nc=(r,e)=>{const t=String(e??"").trim();if(!t)return"";if(t.startsWith("+")){const i=Ss(t,r||"+44");return i.nationalNumber?`${i.countryCode}${i.nationalNumber}`:""}const n=Ss(t,r||"+44"),o=n.countryCode||r||"+44";return n.nationalNumber?`${o}${n.nationalNumber}`:""};function zh(r={}){const e=r.skipStep1DirectorContact,t=r.hasPendingUpload??(()=>!1),n=bt(1),o=4,i=bt({companyName:"",companyNumber:"",companyFoundedDate:null,companyRegisteredAddress:"",website:"",fundingRequired:null,cardRevenue:null,requireCardRevenue:!1,processingCompany:"",useMultipleCurrencies:"",isDirector:!0,contactFullName:"",contactRole:"",contactEmail:"",contactPhoneNumber:"",contactPhoneCountryCode:"+44",fundsUsage:"",sicCode:"",companyType:"",companyStatus:"",yearsOfTrading:null,companiesHouseUrl:"",netAssets:null,profitability:null,turnover:null,directors:[{selectedDirectorId:null,fullName:"",restrictedDOB:null,dayOfBirth:null,monthOfBirth:null,yearOfBirth:null,monthOfBirthFromApi:!1,yearOfBirthFromApi:!1,mobileNumber:"",mobileCountryCode:"+44",emailAddress:"",personalAddress:"",dateMovedIn:null,monthMovedIn:null,yearMovedIn:null,previousAddress:"",propertyOwnership:null,equityInProperty:0,isPrimary:!0}],uploadedLatestFullFiledAccounts:[],uploadedBusinessBankStatements:[],uploadedAgedDebtorsReport:[],uploadedManagementAccounts:[],uploadedAdditionalDocuments:[],declarationAccepted:!1,digitalSignature:""}),d=bt({}),l=yn(()=>F()),c=()=>{const v={};i.value.companyName||(v.companyName="Company Name Is Required"),i.value.companyNumber||(v.companyNumber="Company Number Is Required"),i.value.companyRegisteredAddress||(v.companyRegisteredAddress="Registered Address Is Required");const I=bl(i.value.fundingRequired);if((!i.value.fundingRequired||!I.valid)&&(v.fundingRequired="Funding Required Must Be Greater Than 0"),i.value.requireCardRevenue){const U=bl(i.value.cardRevenue);(!i.value.cardRevenue||!U.valid)&&(v.cardRevenue="Card Revenue Must Be Greater Than 0"),String(i.value.processingCompany??"").trim()||(v.processingCompany="Payment Processor Is Required")}if(!e?.value&&(i.value.isDirector===null&&(v.isDirector="Please Select if You Are a Director"),i.value.isDirector===!1)){if(i.value.contactFullName||(v.contactFullName="Contact Full Name Is Required"),i.value.contactRole||(v.contactRole="Contact Role Is Required"),!i.value.contactEmail)v.contactEmail="Contact Email Is Required";else{const U=qh(i.value.contactEmail);U.valid||(v.contactEmail=U.message)}if(!i.value.contactPhoneNumber)v.contactPhoneNumber="Contact Phone Number Is Required";else{const U=Zu("Phone number",{countryCode:i.value.contactPhoneCountryCode})(i.value.contactPhoneNumber);U.valid||(v.contactPhoneNumber=U.message)}}return v},f=()=>{const v={};return!i.value.directors||i.value.directors.length===0?(v.directors="At Least One Director Is Required",v):(i.value.directors.forEac
2h((I,U)=>{if(I.fullName||(v[`directors.${U}.fullName`]="Director Full Name Is Required"),(!I.dayOfBirth||!I.monthOfBirth||!I.yearOfBirth)&&(v[`directors.${U}.restrictedDOB`]="Date of Birth Is Required"),!I.mobileNumber)v[`directors.${U}.mobileNumber`]="Mobile Number Is Required";else{const T=Zu("Phone number",{countryCode:I.mobileCountryCode||"+44"})(I.mobileNumber);T.valid||(v[`directors.${U}.mobileNumber`]=T.message)}if(I.emailAddress?/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(I.emailAddress)||(v[`directors.${U}.emailAddress`]="Invalid Email Format"):v[`directors.${U}.emailAddress`]="Email Address Is Required",I.personalAddress||(v[`directors.${U}.personalAddress`]="Residential Address Is Required"),(!I.monthMovedIn||!I.yearMovedIn)&&(v[`directors.${U}.dateMovedIn`]="Date Moved In Is Required (Month and Year)"),xs(I.monthMovedIn,I.yearMovedIn)&&(String(I.previousAddress||"").trim()||(v[`directors.${U}.previousAddress`]="Previous Address Is Required")),(I.propertyOwnership===null||I.propertyOwnership===void 0)&&(v[`directors.${U}.propertyOwnership`]="Please Confirm Whether This Director Owns Property in the UK"),I.propertyOwnership===!0){const T=bl(I.equityInProperty);(!I.equityInProperty||!T.valid)&&(v[`directors.${U}.equityInProperty`]="Please Enter How Much Equity This Director Has in Property in the UK")}}),v)},m=()=>{const v={};return i.value.uploadedLatestFullFiledAccounts&&i.value.uploadedLatestFullFiledAccounts.length>0||t("uploadedLatestFullFiledAccounts")||(v.uploadedLatestFullFiledAccounts="Latest Full Filed Accounts Are Required"),i.value.uploadedBusinessBankStatements&&i.value.uploadedBusinessBankStatements.length>0||t("uploadedBusinessBankStatements")||(v.uploadedBusinessBankStatements="Business Bank Statements Are Required"),v},_=()=>{const v={};return i.value.declarationAccepted||(v.declarationAccepted="You Must Accept the Declaration"),(!i.value.digitalSignature||!i.value.digitalSignature.trim())&&(v.digitalSignature="Digital Signature Is Required"),v},F=()=>{let v={};switch(n.value){case 1:v=c();break;case 2:v=f();break;case 3:v=m();break;case 4:v=_();break}return d.value=v,Object.keys(v).length===0},p=()=>{if(Object.keys(d.value).length===0)return;let v={};switch(n.value){case 1:v=c();break;case 2:v=f();break;case 3:v=m();break;case 4:v=_();break;default:return}d.value=v};Bi(i,()=>{p()},{deep:!0});const E=()=>F()&&n.value<o?(n.value++,!0):!1,k=()=>{n.value<o&&n.value++},L=()=>{n.value>1&&n.value--},S=v=>{v>=1&&v<=o&&(n.value=v)},y=v=>{!v.length||v.filter(U=>U.isPrimary).length===1||v.forEach((U,T)=>{U.isPrimary=T===0})},V=v=>{i.value.directors.forEach((I,U)=>{I.isPrimary=U===v})},W=()=>{i.value.directors.push({selectedDirectorId:null,fullName:"",restrictedDOB:null,dayOfBirth:null,monthOfBirth:null,yearOfBirth:null,monthOfBirthFromApi:!1,yearOfBirthFromApi:!1,mobileNumber:"",mobileCountryCode:"+44",emailAddress:"",personalAddress:"",dateMovedIn:null,monthMovedIn:null,yearMovedIn:null,previousAddress:"",propertyOwnership:null,equityInProperty:0,isPrimary:!1})},fe=v=>{const I=i.value.directors[v]?.isPrimary;i.value.directors.splice(v,1),i.value.directors.length&&(I||!i.value.directors.some(U=>U.isPrimary)?i.value.directors.forEach((U,T)=>{U.isPrimary=T===0}):y(i.value.directors))},Ae=()=>{const v=i.value.directors.map(T=>{const ie=T.dayOfBirth&&T.monthOfBirth&&T.yearOfBirth?`${T.yearOfBirth}-${String(T.monthOfBirth).padStart(2,"0")}-${String(T.dayOfBirth).padStart(2,"0")}`:null,oe=T.monthMovedIn&&T.yearMovedIn?`${T.yearMovedIn}-${String(T.monthMovedIn).padStart(2,"0")}-01`:null,Z=xs(T.monthMovedIn,T.yearMovedIn),le=nc(T.mobileCountryCode,T.mobileNumber);return{...T,restrictedDOB:ie,dateMovedIn:oe,mobileNumber:le,previousAddress:Z&&T.previousAddress||""}});y(v);const I=[...v].sort((T,Y)=>T.isPrimary&&!Y.isPrimary?-1:!T.isPrimary&&Y.isPrimary?1:0),U=nc(i.value.contactPhoneCountryCode,i.value.contactPhoneNumber);return{company_name:i.value.companyName,company_number:i.value.companyNumber,company_founded_date:i.value.companyFoundedDate,company_registered_address:i.value.companyRegisteredAddress,website:i.value.website,funding_required:i.value.fundingRequired,card_revenue:i.value.requireCardRevenue&&i.value.cardRevenue!=null?i.value.cardRevenue:null,payment_company:i.value.requireCardRevenue&&String(i.value.processingCompany??"").trim()?String(i.value.processingCompany).trim():null,use_multiple_currencies:i.value.useMultipleCurrencies===""?null:i.value.useMultipleCurrencies,is_director:i.value.isDirector,contact_full_name:i.value.contactFullName,contact_role:i.value.contactRole,contact_email:i.value.contactEmail,contact_phone_number:U,funds_usage:i.value.fundsUsage,sic_code:i.value.sicCode??"",company_type:i.value.companyType??"",company_
2status:i.value.companyStatus??"",years_of_trading:i.value.yearsOfTrading??null,companies_house_url:i.value.companiesHouseUrl??"",net_assets:i.value.netAssets??null,profitability:i.value.profitability??null,turnover:i.value.turnover??null,directors:I,uploaded_latest_full_filed_accounts:i.value.uploadedLatestFullFiledAccounts,uploaded_bank_statements:i.value.uploadedBusinessBankStatements,uploaded_aged_debtors_report:i.value.uploadedAgedDebtorsReport,uploaded_management_accounts:i.value.uploadedManagementAccounts,uploaded_additional_documents:i.value.uploadedAdditionalDocuments,declaration_accepted:i.value.declarationAccepted,digital_signature:i.value.digitalSignature}},me=()=>Object.keys(d.value).length,Q=()=>{const v=Object.keys(d.value).find(I=>d.value[I]);return v?d.value[v]:""},q=v=>{if(!v)return;i.value.companyName=v.company_name||"",i.value.companyNumber=v.company_number||"",i.value.companyFoundedDate=v.company_founded_date||null,i.value.companyRegisteredAddress=v.company_registered_address||"",i.value.website=v.website||"",i.value.fundingRequired=v.funding_required??null,i.value.cardRevenue=v.card_revenue??null;{const T=v.card_revenue!=null&&Number(v.card_revenue)>0||String(v.payment_company||v.processing_company||"").trim();i.value.requireCardRevenue=v.requires_card_revenue===!0||!!T}i.value.processingCompany=v.payment_company||v.processing_company||"",i.value.useMultipleCurrencies=v.use_multiple_currencies??"",i.value.isDirector=v.is_director??!0,i.value.contactFullName=v.contact_full_name||"",i.value.contactRole=v.contact_role||"",i.value.contactEmail=v.contact_email||"";const I=v.contact_phone_number||"",U=Ss(I,"+44");i.value.contactPhoneCountryCode=U.countryCode||"+44",i.value.contactPhoneNumber=U.nationalNumber,i.value.fundsUsage=Gl(v.funds_usage)||v.funds_usage||"",i.value.sicCode=v.sic_code||"",i.value.companyType=v.company_type||"",i.value.companyStatus=v.company_status||"",i.value.yearsOfTrading=v.years_of_trading??null,i.value.companiesHouseUrl=v.companies_house_url||"",i.value.netAssets=v.net_assets??null,i.value.profitability=v.profitability??null,i.value.turnover=v.turnover??null,v.directors&&Array.isArray(v.directors)&&v.directors.length>0&&(i.value.directors=v.directors.map(T=>{let Y=null,ie=null,oe=null,Z=T.restrictedDOB||null;if(Z){const H=T.restrictedDOB.split("-");H.length===3&&(oe=parseInt(H[0],10)||null,ie=parseInt(H[1],10)||null,Y=parseInt(H[2],10)||null)}let le=null,ne=null;if(T.dateMovedIn){const H=T.dateMovedIn.split("-");H.length>=2&&(ne=parseInt(H[0],10)||null,le=parseInt(H[1],10)||null)}Y||(Z=null);const _e=Ss(T.mobileNumber||"","+44"),N=_e.nationalNumber,z=_e.countryCode||"+44";return{selectedDirectorId:T.selectedDirectorId||null,fullName:T.fullName||"",restrictedDOB:Z||null,dayOfBirth:Y,monthOfBirth:ie,yearOfBirth:oe,monthOfBirthFromApi:T.monthOfBirthFromApi||!1,yearOfBirthFromApi:T.yearOfBirthFromApi||!1,mobileNumber:N,mobileCountryCode:z,emailAddress:T.emailAddress||"",personalAddress:T.personalAddress||"",dateMovedIn:T.dateMovedIn||null,monthMovedIn:le,yearMovedIn:ne,previousAddress:T.previousAddress||"",propertyOwnership:T.propertyOwnership??null,equityInProperty:T.equityInProperty??0,isPrimary:T.isPrimary===!0}}),y(i.value.directors)),i.value.uploadedLatestFullFiledAccounts=v.uploaded_latest_full_filed_accounts||[],i.value.uploadedBusinessBankStatements=v.uploaded_bank_statements||[],i.value.uploadedAgedDebtorsReport=v.uploaded_aged_debtors_report||[],i.value.uploadedManagementAccounts=v.uploaded_management_accounts||[],i.value.uploadedAdditionalDocuments=v.uploaded_additional_documents||[],i.value.declarationAccepted=v.declaration_accepted||!1,i.value.digitalSignature=v.digital_signature||""},G=yn(()=>i.value.declarationAccepted&&i.value.digitalSignature.trim()!=="");return{currentStep:n,totalSteps:o,formData:i,errors:d,canProceedToNextStep:l,validateCurrentStep:F,nextStep:E,advanceToNextStep:k,previousStep:L,goToStep:S,addDirector:W,removeDirector:fe,setPrimaryDirector:V,transformForSubmission:Ae,restoreFromSubmission:q,isFormSubmitted:G,getErrorCount:me,getFirstErrorMessage:Q}}function Vh(){const r=bt(null),e=bt(null),t=bt(!1),n=bt(null);let o=null;su(()=>{o?.abort()});const i=()=>(o?.abort(),o=new AbortController,o.signal);return{user:r,session:e,loading:t,error:n,getSession:async()=>{try{t.value=!0;const{data:E,error:k}=await bn.auth.getSession();if(k)throw k;return e.value=E.session,r.value=E.session?.user??null,E.session}catch(E){throw n.value=Fn(E),E}finally{t.value=!1}}
2,signIn:async(E,k)=>{try{t.value=!0;const{data:L,error:S}=await bn.auth.signInWithPassword({email:E,password:k});if(S)throw S;return e.value=L.session,r.value=L.user,{user:L.user,session:L.session}}catch(L){throw n.value=Fn(L),L}finally{t.value=!1}},signOut:async()=>{try{t.value=!0;const{error:E}=await bn.auth.signOut();if(E)throw E;e.value=null,r.value=null}catch(E){throw n.value=Fn(E),E}finally{t.value=!1}},uploadFile:async(E,k,L,S={})=>{const y=S.signal??i();try{t.value=!0;const{data:V,error:W}=await bn.storage.from(E).upload(k,L,{cacheControl:"3600",upsert:S.upsert||!1,...S,signal:y});if(W)throw W;return V}catch(V){throw n.value=Fn(V),V}finally{t.value=!1}},getSignedUrl:async(E,k,L=3600)=>{try{const{data:S,error:y}=await bn.storage.from(E).createSignedUrl(k,L);if(y)throw y;return S.signedUrl}catch(S){throw n.value=Fn(S),S}},getPublicUrl:(E,k,L=void 0)=>{const{data:S}=bn.storage.from(E).getPublicUrl(k,L);return S.publicUrl},downloadFile:async(E,k,L=void 0)=>{const S=L?.signal??i();try{t.value=!0;const{data:y,error:V}=await bn.storage.from(E).download(k,{...L,signal:S});if(V)throw V;return y}catch(y){throw n.value=y.message,y}finally{t.value=!1}},deleteFile:async(E,k)=>{try{t.value=!0;const{error:L}=await bn.storage.from(E).remove([k]);if(L)throw L}catch(L){throw n.value=L.message,L}finally{t.value=!1}}}}const ic={presignUpload:async(...r)=>{const{options:e,args:[t]}=Pn(r),{applicationUuid:n,filename:o,contentType:i,bucket:d,companyName:l,fieldFolder:c}=t;return In(async()=>(await Ma.post(`${pi.VITE_SUPABASE_URL}/functions/v1/s3-presign-upload`,{applicationUuid:n,filename:o,contentType:i,bucket:d,companyName:l,fieldFolder:c},{signal:e.signal})).data,e)},uploadWithPresignedUrl:async(...r)=>{const{options:e,args:[t]}=Pn(r),{signedUrl:n,method:o="PUT",headers:i={},file:d}=t;return In(async()=>(await Nh(n,{method:o,headers:i,body:d,expectJson:!1,signal:e.signal}),!0),e)}},ac={prepareFolders:async(...r)=>{const{options:e,args:[t]}=Pn(r),{applicationUuid:n,companyName:o,fieldFolders:i}=t;return In(async()=>(await Ma.post(`${pi.VITE_SUPABASE_URL}/functions/v1/gdrive-prepare-folders`,{applicationUuid:n,companyName:o,fieldFolders:i},{signal:e.signal})).data,e)},uploadDirect:async(...r)=>{const{options:e,args:[t]}=Pn(r),{applicationUuid:n,file:o,companyName:i,fieldFolder:d,bucket:l,gdriveFolderId:c,gdriveFieldFolderIds:f,onProgress:m}=t;return In(()=>new Promise((_,F)=>{const p=new XMLHttpRequest;p.open("POST",`${pi.VITE_SUPABASE_URL}/functions/v1/gdrive-upload-direct`,!0);const E=pi.VITE_SUPABASE_ANON_KEY;p.setRequestHeader("Authorization",`Bearer ${E}`),p.setRequestHeader("apikey",E),e.signal&&e.signal.addEventListener("abort",()=>{p.abort(),F(Ba(new DOMException("The operation was aborted.","AbortError")))},{once:!0});const k=new FormData;k.append("file",o),k.append("applicationUuid",n),k.append("filename",o.name),k.append("contentType",o.type||"application/octet-stream"),i&&k.append("companyName",i),d&&k.append("fieldFolder",d),l&&k.append("bucket",l),c&&k.append("gdriveFolderId",c),f&&Object.keys(f).length>0&&k.append("gdriveFieldFolderIds",JSON.stringify(f)),p.upload.onprogress=L=>{L.lengthComputable&&m&&m(L.loaded/L.total*100)},p.onload=()=>{if(p.status>=200&&p.status<300)try{_(JSON.parse(p.responseText))}catch{_({success:!0})}else{let L=`Upload failed (${p.status})`;try{L=JSON.parse(p.responseText).error||L}catch{}F(Ba(new Error(L)))}},p.onerror=()=>F(Ba(new Error("Network error during upload"))),p.ontimeout=()=>F(Ba(new Error("Upload timed out"))),p.send(k)}),e)}};function Fd(){const{uploadFile:r,getSignedUrl:e,deleteFile:t}=Vh(),n=bt(!1),o=bt(0),i=bt(null);let d=null;su(()=>{d?.abort()});const l=()=>(d?.abort(),d=new AbortController,d.signal);return{uploading:n,uploadProgress:o,error:i,upload:async(p,E,k,L={})=>{try{n.value=!0,o.value=0,i.value=null;const S=setInterval(()=>{o.value<90&&(o.value+=10)},100),y=await r(p,E,k,L);return clearInterval(S),o.value=100,y}catch(S){throw i.value=Fn(S),S}finally{n.value=!1,setTimeout(()=>{o.value=0},500)}},uploadS3Presigned:async(p,E,k,L={})=>{const S=L.signal??l();try{n.value=!0,o.value=0,i.value=null;const y=setInterval(()=>{o.value<90&&(o.value+=10)},100),V=await ic.presignUpload({bucket:p,applicationUuid:E,filename:k.name,contentType:k.type||"application/octet-stream",companyName:L.companyName,fieldFolder:L.fieldFolder},{signal:S});return await ic.uploadWithPresignedUrl({signedUrl:V.signedUrl,method:V.method,headers:V.headers,file:k},{signal:S}),clearInterval(y),o.value=100,{path:V.path,bucket:V.bucket}}catch(y){throw i.value=Fn(y),y}finally{n.value=!1,setTimeout(()=>{o.value=0},500)}},prepareGDriveFolders:async({applicationUuid:p,companyName:E,fieldFolders:k})=>{try{return i.value=null,await ac.prepareFolders({applicationUuid:p,companyName:E,fieldFolders:k})}catch(L){throw i.value=Fn(L),L}},uploadGoogleDrive:async(p,E,k={})=>{const L=k.signal??l();try{n.value=!0,o.value=0,i.value=null;
2const S=await ac.uploadDirect({applicationUuid:p,file:E,companyName:k.companyName,fieldFolder:k.fieldFolder,bucket:k.bucket,gdriveFolderId:k.gdriveFolderId,gdriveFieldFolderIds:k.gdriveFieldFolderIds,onProgress:y=>{o.value=y}},{signal:L});return o.value=100,{path:S.path,folderId:S.folderId,fileId:S.fileId,destination:"gdrive"}}catch(S){throw i.value=Fn(S),S}finally{n.value=!1,setTimeout(()=>{o.value=0},500)}},getSignedUrl:e,deleteFile:t,validateFile:(p,E={})=>{const{maxSize:k=50*1024*1024,allowedTypes:L=[]}=E;if(k&&p.size>k)throw new Error(`File size exceeds ${k/1024/1024}MB limit`);if(L.length>0&&!L.includes(p.type))throw new Error(`File type ${p.type} is not allowed`);return!0}}}const za=new Set([null,void 0,"","null","undefined","NaN"]),hi="Discovery Form",Ls=(r,e=0)=>{if(za.has(r))return e;if(typeof r=="string"){const n=r.trim().replace(/,/g,"");if(!n||za.has(n))return e;const o=Number(n);return Number.isFinite(o)?o:e}const t=Number(r);return Number.isFinite(t)?t:e},ra=(r,e=!1)=>r===!0||r==="true"||r===1||r==="1"?!0:r===!1||r==="false"||r===0||r==="0"?!1:(r==null||r==="",e),Hh=(r={})=>{const e=ra(r.propertyOwnership,!1),t=e?Ls(r.equityInProperty,0):0;return{...r,propertyOwnership:e,equityInProperty:t,property_ownership:e,equity_in_property:t}},wl=r=>{if(za.has(r))return;const e=Ls(r,NaN);return Number.isFinite(e)?e:void 0},Ar=r=>r==null?"—":String(r).trim()||"—",po=(r,e="-")=>{const t=(c,f,m)=>`${c}${e}${f}${e}${m}`;if(r==null||r==="")return"—";if(r instanceof Date&&!Number.isNaN(r.getTime())){const c=String(r.getDate()).padStart(2,"0"),f=String(r.getMonth()+1).padStart(2,"0");return t(c,f,r.getFullYear())}const n=String(r).trim(),o=n.match(/^(\d{2})-(\d{2})-(\d{4})$/);if(o)return t(o[1],o[2],o[3]);const i=n.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);if(i)return t(i[1],i[2],i[3]);const d=n.match(/^(\d{4})-(\d{2})-(\d{2})/);if(d)return t(d[3],d[2],d[1]);const l=new Date(n);if(!Number.isNaN(l.getTime())){const c=String(l.getDate()).padStart(2,"0"),f=String(l.getMonth()+1).padStart(2,"0");return t(c,f,l.getFullYear())}return n||"—"},Pd=r=>po(r,"/"),_l=r=>{if(za.has(r))return"—";const e=Number(String(r).replace(/,/g,""));return Number.isFinite(e)?`£${e.toLocaleString("en-GB",{maximumFractionDigits:0})}`:Ar(r)},Al=r=>r===!0||r==="true"||r==="Yes"||r==="yes"?"Yes":r===!1||r==="false"||r==="No"||r==="no"?"No":r==null||r===""?"—":String(r),Wh=r=>{const e=Ar(r);return e==="—"?e:e.replace(/^https?:\/\//i,"")},ns=r=>Array.isArray(r)?r.length>0?"Uploaded":"Not uploaded":r==null||r===""?"Not uploaded":"Uploaded",$h=(r=new Date)=>{const e=r instanceof Date?r:new Date(r),t=Number.isNaN(e.getTime())?new Date:e,n=String(t.getDate()).padStart(2,"0"),o=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear(),d=String(t.getHours()).padStart(2,"0"),l=String(t.getMinutes()).padStart(2,"0"),c=String(t.getSeconds()).padStart(2,"0");return`${n}/${o}/${i} ${d}:${l}:${c}`},Id=(r={},e={})=>{const t=Array.isArray(r.directors)?r.directors:[],n=t[0]||{},o=ra(r.is_director,!0),i=Ar(o?n.fullName||r.director_name:r.contact_full_name||n.fullName),d=o?"Director":Ar(r.contact_role),l=Ar(r.contact_email||r.director_email||n.emailAddress),c=Ar(r.contact_phone_number||r.director_phone||n.mobileNumber),f=r.card_revenue!=null&&r.card_revenue!==""&&!za.has(r.card_revenue)&&Number(r.card_revenue)>0,m=Ar(r.payment_company||r.processing_company||r.payment_processor),_=e.submittedAt||r.submitted_at||r.submitted_on||r.created_at||new Date,F=e.gdriveFolderId||r.gdrive_folder_id||null,p=e.gdriveDiscoveryFormFolderId||r.gdrive_discovery_form_folder_id||null,E=String(r.company_name||"").trim().replace(/[\\/:*?"<>|]/g," ").replace(/\s+/g," ").slice(0,60),k=E?`Discovery Form - ${E}.pdf`:"Discovery Form.pdf";return{title:"Discovery Form",company_name:Ar(r.company_name),submitted_on:po(_),suggested_filename:k,gdrive:{folder_name:hi,application_folder_id:F,application_folder_link:F?`https://drive.google.com/drive/folders/${F}`:null,discovery_form_folder_id:p,discovery_form_folder_link:p?`https://drive.google.com/drive/folders/${p}`:null,upload_function:"gdrive-upload-discovery-pdf"},company:{company_name:Ar(r.company_name),company_number:Ar(r.company_number||r.company_registration_number),founded_date:po(r.company_founded_date||r.date_of_creation),website:Wh(r.website),registered_address:Ar(r.company_registered_address),funding_required:_l(r.funding_required),multiple_currencies:Al(r.use_multiple_currencies),funds_usage:Ar(r.funds_usage),card_revenue:f?_l(r.card_revenue):null,payment_processor:m==="—"?null:m},contact:{name:i,role:d,email:l,phone:c},directors:t.map((L,S)=>{const y=ra(L.propertyOwnership??L.property_ownership,!1),V=y?_l(L.equityInProperty??L.equity_in_property):null;let W="—";return L.dateMovedIn?W=po(L.dateMovedIn):L.monthMovedIn&&L.yearMovedIn&&(W=`${String(L.monthMovedIn).padStart(2,"0")}-${L.yearMovedIn}`),{index:S+1,is_primary:!!L.isPrimary,full_name:Ar(L.fullName),date_of_birth:Pd(L.restrictedDOB),email:Ar(L.emailAddress),mobile:Ar(L.mobileNumber),residential_address:Ar(L.personalAddress),moved_in:W,previous_address:Ar(L.previousAddress),owns_uk_property:Al(y),equity_in_property:V}}),documents:{latest_full_filed_accounts:ns(r.uploaded_latest_full_filed_accounts),bank_statements:ns(r.uploaded_bank_statements),aged_debtors_report:ns(r.uploaded_aged_debtors_report),management_accounts:ns(r.uploaded_management_accounts)},declaration:{text:"By signing and submitting this form I hereby certify that the above information given is true and correct as to the best of my knowledge. I hereby authorise Compare My Funding (a trading name of BAMOPS Limited) to share this information with their partner, Funding Bay Limited. I also authorise the financial institution introduced by Funding Bay Limited to conduct credit checks on my profile in order to conduct a complete financial analysis of my affairs, for the purposes of providing a line of credit. By signing this form, you also acknowledge that there may be a fee levied by Funding Bay in the event of a successful funding line being delivered.",accepted:Al(ra(r.declaration_accepted,!1)),digital_signature:Ar(r.digital_signature),signed_date:po(_)},generated_on:$h(_)}},ci=r=>r==null?"":String(r).trim()||"",Cd=(r,e={})=>{const t=Array.isArray(r.directors)?r.directors.map(Hh):[],n=t[0]||{},o=n.propertyOwnership===!0,i=o?n.equityInProperty:0,d=Ls(r.funding_required,0),c=r.card_revenue!=null&&r.card_revenue!==""&&!za.has(r.card_revenue)?Ls(r.card_revenue,0):0,f=r.company_founded_date;let m="";f&&(m=f instanceof Date?f.toISOString():String(f));const _=ra(e.isStandalone??r.is_standalone,!1),F=!0,p=ci(n.fullName||n.full_name),E=ci(n.emailAddress||n.email_address),k=ci(r.contact_full_name),L=ci(r.contact_email),S=k||p||ci(r.user_name),y=L||E||ci(r.user_email),V=Sh(e.routeQuery),W=Id({...r,directors:t},e),fe={...r,directors:t,action:"discovery-form-submitted",submission_type:"discovery-form",submission_complete:!0,generate_pdf:!1,pdf:W,gdrive_folder_id:W.gdrive.application_folder_id,gdrive_discovery_form_folder_id:W.gdrive.discovery_form_folder_id,gdrive_discovery_form_folder_name:hi,gdrive_discovery_form_folder_link:W.gdrive.discovery_form_folder_link,discovery_pdf_filename:W.suggested_filename,application_uuid:e.applicationUuid??r.uuid??"",google_drive_link:e.googleDriveLink??W.gdrive.application_folder_link??null,disco_url:e.discoUrl??r.disco_url??null,isDirector:ra(r.is_director,!0),is_director:ra(r.is_director,!0),director_name:p||S,director_phone:ci(n.mobileNumber||n.mobile_number),director_address:ci(n.personalAddress||n.personal_address),director_email:E||y,director_dob:ci(n.restrictedDOB),user_name:S,user_email:y,date_of_creation:m||null,company_registration_number:r.company_number||"",funding_required:d,card_revenue:c,payment_company:r.payment_company||null,processing_company:r.payment_company||null,payment_processor:r.payment_company||null,company_processing_company:r.payment_company||null,property_ownership:o,propertyOwnership:o,equity_in_property:i,equityInProperty:i,resubmitted:!!e.resubmitted,is_standalone:_,email_opt_in:F,...V},Ae=wl(r.years_of_trading);Ae!==void 0&&(fe.years_of_trading=Ae);const me=wl(r.net_assets);me!==void 0&&(fe.net_assets=me);const Q=wl(r.turnover);Q!==void 0&&(fe.turnover=Q);const q=e.leadId??e.lead_id??r.lead_id??r.leadId;return q!=null&&String(q).trim()&&(fe.lead_id=String(q).trim()),fe},is=r=>{const e=new Error(Fn(r));throw e.originalError=r,e},Ci={create:async(...r)=>{const{options:e,args:[t]}=Pn(r);return In(async()=>{const{data:n,error:o}=await Qo(bn.from("discovery_forms").insert(t).select().single(),{signal:e.signal});return o&&is(o),n},e)}
2,getByUuid:async(...r)=>{const{options:e,args:[t]}=Pn(r);return In(async()=>{const{data:n,error:o}=await Qo(bn.from("discovery_forms").select("*").eq("uuid",t).maybeSingle(),{signal:e.signal});return o&&is(o),n},e)},getByApplicationId:async(...r)=>{const{options:e,args:[t]}=Pn(r);return In(async()=>{const{data:n,error:o}=await Qo(bn.from("discovery_forms").select("*").eq("application_id",t).single(),{signal:e.signal});return o&&is(o),n},e)},update:async(...r)=>{const{options:e,args:[t,n]}=Pn(r);return In(async()=>{const{data:o,error:i}=await Qo(bn.from("discovery_forms").upsert({...n,uuid:t},{onConflict:"uuid"}).select().single(),{signal:e.signal});return i&&is(i),o},e)},submit:async(...r)=>{const{options:e,args:[t]}=Pn(r),n=pi.VITE_N8N_Discovery_Form_Webhook;if(!n)throw new Error("VITE_N8N_Discovery_Form_Webhook not configured");const o=Cd(t,{applicationUuid:t.application_uuid??t.uuid,googleDriveLink:t.google_drive_link??null,discoUrl:t.disco_url??null,resubmitted:t.resubmitted,isStandalone:t.is_standalone,leadId:t.lead_id??t.leadId,submittedAt:t.submitted_at||t.pdf?.submitted_on||new Date,gdriveFolderId:t.gdrive_folder_id||t.pdf?.gdrive?.application_folder_id||null,gdriveDiscoveryFormFolderId:t.gdrive_discovery_form_folder_id||t.pdf?.gdrive?.discovery_form_folder_id||null}),i=async()=>{try{return await xh(n,o,{signal:e.signal})}catch(d){throw Ba(d).isCorsError?new Error("CORS_ERROR"):d}};return e.returnShape?uh(i,e):In(i,e)}},Nl=()=>`${pi.VITE_SUPABASE_URL}/functions/v1/uploads-commit`,Gh={commit:async(...r)=>{const{options:e,args:[t]}=Pn(r),n=await In(async()=>(await Ma.post(Nl(),{applicationUuid:t},{signal:e.signal})).data,e);return Ma.post(Nl(),{applicationUuid:t,syncOnly:!0},{dedupe:!1,timeout:5e3}).catch(()=>{}),n},sync:async(...r)=>{const{options:e,args:[t]}=Pn(r);return In(async()=>(await Ma.post(Nl(),{applicationUuid:t,syncOnly:!0},{signal:e.signal})).data,e)}},oc=["January","February","March","April","May","June","July","August","September","October","November","December"];function sc(r,e="DD-MM-YYYY"){if(!r)return"";const t=new Date(r);if(isNaN(t.getTime()))return"";const n=String(t.getDate()).padStart(2,"0"),o=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear(),d=String(t.getHours()).padStart(2,"0"),l=String(t.getMinutes()).padStart(2,"0"),c=String(t.getSeconds()).padStart(2,"0"),f=`${d}:${l}:${c}`;return e==="DD-MM-YYYY"?`${n}-${o}-${i}`:e==="Day Month Year"?`${n} ${oc[t.getMonth()]} ${i}`:e==="Day Month Year Time"?`${n} ${oc[t.getMonth()]} ${i} ${f}`:r}function qt(r){"@babel/helpers - typeof";return qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qt(r)}var Cn=Uint8Array,cn=Uint16Array,lu=Int32Array,uu=new Cn([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),cu=new Cn([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),lc=new Cn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ed=function(r,e){for(var t=new cn(31),n=0;n<31;++n)t[n]=e+=1<<r[n-1];for(var o=new lu(t[30]),n=1;n<30;++n)for(var i=t[n];i<t[n+1];++i)o[i]=i-t[n]<<5|n;return{b:t,r:o}},Od=Ed(uu,2),Yh=Od.b,Kl=Od.r;Yh[28]=258,Kl[258]=28;var Kh=Ed(cu,0),uc=Kh.r,Jl=new cn(32768);for(var Qt=0;Qt<32768;++Qt){var Ei=(Qt&43690)>>1|(Qt&21845)<<1;Ei=(Ei&52428)>>2|(Ei&13107)<<2,Ei=(Ei&61680)>>4|(Ei&3855)<<4,Jl[Qt]=((Ei&65280)>>8|(Ei&255)<<8)>>1}var yo=(function(r,e,t){for(var n=r.length,o=0,i=new cn(e);o<n;++o)r[o]&&++i[r[o]-1];var d=new cn(e);for(o=1;o<e;++o)d[o]=d[o-1]+i[o-1]<<1;var l;if(t){l=new cn(1<<e);var c=15-e;for(o=0;o<n;++o)if(r[o])for(var f=o<<4|r[o],m=e-r[o],_=d[r[o]-1]++<<m,F=_|(1<<m)-1;_<=F;++_)l[Jl[_]>>c]=f}else for(l=new cn(n),o=0;o<n;++o)r[o]&&(l[o]=Jl[d[r[o]-1]++]>>15-r[o]);return l}),ia=new Cn(288);for(var Qt=0;Qt<144;++Qt)ia[Qt]=8;for(var Qt=144;Qt<256;++Qt)ia[Qt]=9;for(var Qt=256;Qt<280;++Qt)ia[Qt]=7;for(var Qt=280;Qt<288;++Qt)ia[Qt]=8;var ks=new Cn(32);for(var Qt=0;Qt<32;++Qt)ks[Qt]=5;var Jh=yo(ia,9,0),Xh=yo(ks,5,0),Bd=function(r){return(r+7)/8|0},Zh=function(r,e,t){return(t==null||t>r.length)&&(t=r.length),new Cn(r.subarray(e,t))},di=function(r,e,t){t<<=e&7;var n=e/8|0;r[n]|=t,r[n+1]|=t>>8},fo=function(r,e,t){t<<=e&7;var n=e/8|0;r[n]|=t,r[n+1]|=t>>8,r[n+2]|=t>>16},Sl=function(r,e){for(var t=[],n=0;n<r.length;++n)r[n]&&t.push({s:n,f:r[n]});var o=t.length,i=t.slice();if(!o)return{t:Md,l:0};if(o==1){var d=new Cn(t[0].s+1);return d[t[0].s]=1,{t:d,l:1}}t.sort(function(fe,Ae){return fe.f-Ae.f}),t.push({s:-1,f:25001});var l=t[0],c=t[1],f=0,m=1,_=2;for(t[0]={s:-1,f:l.f+c.f,l,r:c};m!=o-1;)l=t[t[f].f<t[_].f?f++:_++],c=t[f!=m&&t[f].f<t[_].f?f++:_++],t[m++]={s:-1,f:l.f+c.f,l,r:c};for(var F=i[0].s,n=1;n<o;++n)i[n].s>F&&(F=i[n].s);var p=new cn(F+1),E=Xl(t[m-1],p,0);if(E>e){var n=0,k=0,L=E-e,S=1<<L;for(i.sort(function(Ae,me){return p[me.s]-p[Ae.s]||Ae.f-me.f});n<o;++n){var y=i[n].s;if(p[y]>e)k+=S-(1<<E-p[y]),p[y]=e;else break}for(k>>=L;k>0;){var V=i[n].s;p[V]<e?k-=1<<e-p[V]++-1:++n}for(;n>=0&&k;--n){var W=i[n].s;p[W]==e&&(--p[W],++k)}E=e}return{t:new Cn(p),l:E}},Xl=function(r,e,t){return r.s==-1?Math.max(Xl(r.l,e,t+1),Xl(r.r,e,t+1)):e[r.s]=t},cc=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new cn(++e),n=0,o=r[0],i=1,d=function(c){t[n++]=c},l=1;l<=e;++l)if(r[l]==o&&l!=e)++i;else{if(!o&&i>2){for(;i>138;i-=138)d(32754);i>2&&(d(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(d(o),--i;i>6;i-=6)d(8304);i>2&&(d(i-3<<5|8208),i=0)}for(;i--;)d(o);i=1,o=r[l]}return{c:t.subarray(0,n),n:e}},ho=function(r,e){for(var t=0,n=0;n<e.length;++n)t+=r[n]*e[n];return t},Rd=function(r,e,t){var n=t.length,o=Bd(e+2);r[o]=n&255,r[o+1]=n>>8,r[o+2]=r[o]^255,r[o+3]=r[o+1]^255;for(var i=0;i<n;++i)r[o+i+4]=t[i];return(o+4+n)*8},dc=function(r,e,t,n,o,i,d,l,c,f,m){di(e,m++,t),++o[256];for(var _=Sl(o,15),F=_.t,p=_.l,E=Sl(i,15),k=E.t,L=E.l,S=cc(F),y=S.c,V=S.n,W=cc(k),fe=W.c,Ae=W.n,me=new cn(19),Q=0;Q<y.length;++Q)++me[y[Q]&31];for(var Q=0;Q<fe.length;++Q)++me[fe[Q]&31];for(var q=Sl(me,7),G=q.t,v=q.l,I=19;I>4&&!G[lc[I-1]];--I);var U=f+5<<3,T=ho(o,ia)+ho(i,ks)+d,Y=ho(o,F)+ho(i,k)+d+14+3*I+ho(me,G)+2*me[16]+3*me[17]+7*me[18];if(c>=0&&U<=T&&U<=Y)return Rd(e,m,r.subarray(c,c+f));var ie,oe,Z,le;if(di(e,m,1+(Y<T)),m+=2,Y<T){ie=yo(F,p,0),oe=F,Z=yo(k,L,0),le=k;var ne=yo(G,v,0);di(e,m,V-257),di(e,m+5,Ae-1),di(e,m+10,I-4),m+=14;for(var Q=0;Q<I;++Q)di(e,m+3*Q,G[lc[Q]]);m+=3*I;for(var _e=[y,fe],N=0;N<2;++N)for(var z=_e[N],Q=0;Q<z.length;++Q){var H=z[Q]&31;di(e,m,ne[H]),m+=G[H],H>15&&(di(e,m,z[Q]>>5&127),m+=z[Q]>>12)}}else ie=Jh,oe=ia,Z=Xh,le=ks;for(var Q=0;Q<l;++Q){var J=n[Q];if(J>255){var H=J>>18&31;fo(e,m,ie[H+257]),m+=oe[H+257],H>7&&(di(e,m,J>>23&31),m+=uu[H]);var te=J&31;fo(e,m,Z[te]),m+=le[te],te>3&&(fo(e,m,J>>5&8191),m+=cu[te])}else fo(e,m,ie[J]),m+=oe[J]}return fo(e,m,ie[256]),m+oe[256]},Qh=new lu([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Md=new Cn(0),e1=function(r,e,t,n,o,i){var d=i.z||r.length,l=new Cn(n+d+5*(1+Math.ceil(d/7e3))+o),c=l.subarray(n,l.length-o),f=i.l,m=(i.r||0)&7;if(e){m&&(c[0]=i.r>>3);for(var _=Qh[e-1],F=_>>13,p=_&8191,E=(1<<t)-1,k=i.p||new cn(32768),L=i.h||new cn(E+1),S=Math.ceil(t/3),y=2*S,V=function(Ve){return(r[Ve]^r[Ve+1]<<S^r[Ve+2]<<y)&E},W=new lu(25e3),fe=new cn(288),Ae=new cn(32),me=0,Q=0,q=i.i||0,G=0,v=i.w||0,I=0;q+2<d;++q){var U=V(q),T=q&32767,Y=L[U];if(k[T]=Y,L[U]=T,v<=q){var ie=d-q;if((me>7e3||G>24576)&&(ie>423||!f)){m=dc(r,c,0,W,fe,Ae,Q,G,I,q-I,m),G=me=Q=0,I=q;for(var oe=0;oe<286;++oe)fe[oe]=0;for(var oe=0;oe<30;++oe)Ae[oe]=0}var Z=2,le=0,ne=p,_e=T-Y&32767;if(ie>2&&U==V(q-_e))for(var N=Math.min(F,ie)-1,z=Math.min(32767,q),H=Math.min(258,ie);_e<=z&&--ne&&T!=Y;){if(r[q+Z]==r[q+Z-_e]){for(var J=0;J<H&&r[q+J]==r[q+J-_e];++J);if(J>Z){if(Z=J,le=_e,J>N)break;for(var te=Math.min(_e,J-2),se=0,oe=0;oe<te;++oe){var pe=q-_e+oe&32767,ge=k[pe],xe=pe-ge&32767;xe>se&&(se=xe,Y=pe)}}}T=Y,Y=k[T],_e+=T-Y&32767}if(le){W[G++]=268435456|Kl[Z]<<18|uc[le];var Ie=Kl[Z]&31,Oe=uc[le]&31;Q+=uu[Ie]+cu[Oe],++fe[257+Ie],++Ae[Oe],v=q+Z,++me}else W[G++]=r[q],++fe[r[q]]}}for(q=Math.max(q,v);q<d;++q)W[G++]=r[q],++fe[r[q]];m=dc(r,c,f,W,fe,Ae,Q,G,I,q-I,m),f||(i.r=m&7|c[m/8|0]<<3,m-=7,i.h=L,i.p=k,i.i=q,i.w=v)}else{for(var q=i.w||0;q<d+f;q+=65535){var Me=q+65535;Me>=d&&(c[m/8|0]=f,Me=d),m=Rd(c,m+1,r.subarray(q,Me))}i.i=d}return Zh(l,0,n+Bd(m)+o)},Dd=function(){var r=1,e=0;return{p:function(t){for(var n=r,o=e,i=t.length|0,d=0;d!=i;){for(var l=Math.min(d+2655,i);d<l;++d)o+=n+=t[d];n=(n&65535)+15*(n>>16),o=(o&65535)+15*(o>>16)}r=n,e=o},d:function(){return r%=65521,e%=65521,(r&255)<<24|(r&65280)<<8|(e&255)<<8|e>>8}}},t1=function(r,e,t,n,o){if(!o&&(o={l:1},e.dictionary)){var i=e.dictionary.subarray(-32768),d=new Cn(i.length+r.length);d.set(i),d.set(r,i.length),r=d,o.w=i.length}return e1(r,e.level==null?6:e.level,e.mem==null?o.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,t,n,o)},Td=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},r1=function(r,e){var t=e.level,n=t==0?0:t<6?1:t==9?3:2;if(r[0]=120,r[1]=n<<6|(e.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,e.dictionary){var o=Dd();o.p(e.dictionary),Td(r,2,o.d())}};function Zl(r,e){e||(e={});var t=Dd();t.p(r);var n=t1(r,e,e.dictionary?6:2,4);return r1(n,e),Td(n,n.length-4,t.d()),n}var n1=typeof TextDecoder<"u"&&new TextDecoder,i1=0;try{n1.decode(Md,{stream:!0}),i1=1}catch{}function a1(r){if(Array.isArray(r))return r}function o1(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,o,i,d,l=[],c=!0,f=!1;try{if(i=(t=t.call(r)).next,e!==0)for(;!(c=(n=i.call(t)).done)&&(l.push(n.value),l.length!==e);c=!0);}catch(m){f=!0,o=m}
vendor: 7,037 bytes, lines 2-3
2finally{try{if(!c&&t.return!=null&&(d=t.return(),Object(d)!==d))return}finally{if(f)throw o}}return l}}function fc(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function s1(r,e){if(r){if(typeof r=="string")return fc(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?fc(r,e):void 0}}function l1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hc(r,e){return a1(r)||o1(r,e)||s1(r,e)||l1()}function pc(r,e="utf8"){return new TextDecoder(e).decode(r)}const u1=new TextEncoder;function c1(r){return u1.encode(r)}const d1=1024*8,f1=(()=>{const r=new Uint8Array(4),e=new Uint32Array(r.buffer);return!((e[0]=1)&r[0])})(),xl={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class du{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(e=d1,t={}){let n=!1;typeof e=="number"?e=new ArrayBuffer(e):(n=!0,this.lastWrittenByte=e.byteLength);const o=t.offset?t.offset>>>0:0,i=e.byteLength-o;let d=o;(ArrayBuffer.isView(e)||e instanceof du)&&(e.byteLength!==e.buffer.byteLength&&(d=e.byteOffset+o),e=e.buffer),n?this.lastWrittenByte=i:this.lastWrittenByte=0,this.buffer=e,this.length=i,this.byteLength=i,this.byteOffset=d,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,d,i),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const n=(this.offset+e)*2,o=new Uint8Array(n);o.set(new Uint8Array(this.buffer)),this.buffer=o.buffer,this.length=n,this.byteLength=n,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,t){const n=xl[t].BYTES_PER_ELEMENT*e,o=this.byteOffset+this.offset,i=this.buffer.slice(o,o+n);if(this.littleEndian===f1&&t!=="uint8"&&t!=="int8"){const l=new Uint8Array(this.buffer.slice(o,o+n));l.reverse();const c=new xl[t](l.buffer);return this.offset+=n,c.reverse(),c}const d=new xl[t](i);return this.offset+=n,d}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t="";for(let n=0;n<e;n++)t+=this.readChar();return t}readUtf8(e=1){return pc(this.readBytes(e))}decodeText(e=1,t="utf8"){return pc(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(c1(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function Va(r){let e=r.length;for(;--e>=0;)r[e]=0}const h1=3,p1=258,qd=29,m1=256,g1=m1+1+qd,jd=30,v1=512,y1=new Array((g1+2)*2);Va(y1);const b1=new Array(jd*2);Va(b1);const w1=new Array(v1);Va(w1);const _1=new Array(p1-h1+1);Va(_1);const A1=new Array(qd);Va(A1);const N1=new Array(jd);Va(N1);const S1=(r,e,t,n)=>{let o=r&65535|0,i=r>>>16&65535|0,d=0;for(;t!==0;){d=t>2e3?2e3:t,t-=d;do o=o+e[n++]|0,i=i+o|0;while(--d);o%=65521,i%=65521}return o|i<<16|0};var Ql=S1;const x1=()=>{let r,e=[];for(var t=0;t<256;t++){r=t;for(var n=0;n<8;n++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r}return e},L1=new Uint32Array(x1()),k1=(r,e,t,n)=>{const o=L1,i=n+t;r^=-1;for(let d=n;d<i;d++)r=r>>
vendor: 14,907 bytes, line 3
3>8^o[(r^e[d])&255];return r^-1};var zn=k1,eu={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Ud={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const F1=(r,e)=>Object.prototype.hasOwnProperty.call(r,e);var P1=function(r){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const n in t)F1(t,n)&&(r[n]=t[n])}}return r},I1=r=>{let e=0;for(let n=0,o=r.length;n<o;n++)e+=r[n].length;const t=new Uint8Array(e);for(let n=0,o=0,i=r.length;n<i;n++){let d=r[n];t.set(d,o),o+=d.length}return t},zd={assign:P1,flattenChunks:I1};let Vd=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Vd=!1}const wo=new Uint8Array(256);for(let r=0;r<256;r++)wo[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;wo[254]=wo[255]=1;var C1=r=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(r);let e,t,n,o,i,d=r.length,l=0;for(o=0;o<d;o++)t=r.charCodeAt(o),(t&64512)===55296&&o+1<d&&(n=r.charCodeAt(o+1),(n&64512)===56320&&(t=65536+(t-55296<<10)+(n-56320),o++)),l+=t<128?1:t<2048?2:t<65536?3:4;for(e=new Uint8Array(l),i=0,o=0;i<l;o++)t=r.charCodeAt(o),(t&64512)===55296&&o+1<d&&(n=r.charCodeAt(o+1),(n&64512)===56320&&(t=65536+(t-55296<<10)+(n-56320),o++)),t<128?e[i++]=t:t<2048?(e[i++]=192|t>>>6,e[i++]=128|t&63):t<65536?(e[i++]=224|t>>>12,e[i++]=128|t>>>6&63,e[i++]=128|t&63):(e[i++]=240|t>>>18,e[i++]=128|t>>>12&63,e[i++]=128|t>>>6&63,e[i++]=128|t&63);return e};const E1=(r,e)=>{if(e<65534&&r.subarray&&Vd)return String.fromCharCode.apply(null,r.length===e?r:r.subarray(0,e));let t="";for(let n=0;n<e;n++)t+=String.fromCharCode(r[n]);return t};var O1=(r,e)=>{const t=e||r.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(r.subarray(0,e));let n,o;const i=new Array(t*2);for(o=0,n=0;n<t;){let d=r[n++];if(d<128){i[o++]=d;continue}let l=wo[d];if(l>4){i[o++]=65533,n+=l-1;continue}for(d&=l===2?31:l===3?15:7;l>1&&n<t;)d=d<<6|r[n++]&63,l--;if(l>1){i[o++]=65533;continue}d<65536?i[o++]=d:(d-=65536,i[o++]=55296|d>>10&1023,i[o++]=56320|d&1023)}return E1(i,o)},B1=(r,e)=>{e=e||r.length,e>r.length&&(e=r.length);let t=e-1;for(;t>=0&&(r[t]&192)===128;)t--;return t<0||t===0?e:t+wo[r[t]]>e?t:e},tu={string2buf:C1,buf2string:O1,utf8border:B1};function R1(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var M1=R1;const as=16209,D1=16191;var T1=function(e,t){let n,o,i,d,l,c,f,m,_,F,p,E,k,L,S,y,V,W,fe,Ae,me,Q,q,G;const v=e.state;n=e.next_in,q=e.input,o=n+(e.avail_in-5),i=e.next_out,G=e.output,d=i-(t-e.avail_out),l=i+(e.avail_out-257),c=v.dmax,f=v.wsize,m=v.whave,_=v.wnext,F=v.window,p=v.hold,E=v.bits,k=v.lencode,L=v.distcode,S=(1<<v.lenbits)-1,y=(1<<v.distbits)-1;e:do{E<15&&(p+=q[n++]<<E,E+=8,p+=q[n++]<<E,E+=8),V=k[p&S];t:for(;;){if(W=V>>>24,p>>>=W,E-=W,W=V>>>16&255,W===0)G[i++]=V&65535;else if(W&16){fe=V&65535,W&=15,W&&(E<W&&(p+=q[n++]<<E,E+=8),fe+=p&(1<<W)-1,p>>>=W,E-=W),E<15&&(p+=q[n++]<<E,E+=8,p+=q[n++]<<E,E+=8),V=L[p&y];r:for(;;){if(W=V>>>24,p>>>=W,E-=W,W=V>>>16&255,W&16){if(Ae=V&65535,W&=15,E<W&&(p+=q[n++]<<E,E+=8,E<W&&(p+=q[n++]<<E,E+=8)),Ae+=p&(1<<W)-1,Ae>c){e.msg="invalid distance too far back",v.mode=as;break e}if(p>>>=W,E-=W,W=i-d,Ae>W){if(W=Ae-W,W>m&&v.sane){e.msg="invalid distance too far back",v.mode=as;break e}if(me=0,Q=F,_===0){if(me+=f-W,W<fe){fe-=W;do G[i++]=F[me++];while(--W);me=i-Ae,Q=G}}else if(_<W){if(me+=f+_-W,W-=_,W<fe){fe-=W;do G[i++]=F[me++];while(--W);if(me=0,_<fe){W=_,fe-=W;do G[i++]=F[me++];while(--W);me=i-Ae,Q=G}}}else if(me+=_-W,W<fe){fe-=W;do G[i++]=F[me++];while(--W);me=i-Ae,Q=G}for(;fe>2;)G[i++]=Q[me++],G[i++]=Q[me++],G[i++]=Q[me++],fe-=3;fe&&(G[i++]=Q[me++],fe>1&&(G[i++]=Q[me++]))}else{me=i-Ae;do G[i++]=G[me++],G[i++]=G[me++],G[i++]=G[me++],fe-=3;while(fe>2);fe&&(G[i++]=G[me++],fe>1&&(G[i++]=G[me++]))}}else if((W&64)===0){V=L[(V&65535)+(p&(1<<W)-1)];continue r}else{e.msg="invalid distance code",v.mode=as;break e}break}}else if((W&64)===0){V=k[(V&65535)+(p&(1<<W)-1)];continue t}else if(W&32){v.mode=D1;break e}else{e.msg="invalid literal/length code",v.mode=as;break e}break}}while(n<o&&i<l);fe=E>>3,n-=fe,E-=fe<<3,p&=(1<<E)-1,e.next_in=n,e.next_out=i,e.avail_in=n<o?5+(o-n):5-(n-o),e.avail_out=i<l?257+(l-i):257-(i-l),v.hold=p,v.bits=E};const Pa=15,mc=852,gc=592,vc=0,Ll=1,yc=2,q1=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),j1=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),U1=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),z1=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),V1=(r,e,t,n,o,i,d,l)=>{const c=l.bits;let f=0,m=0,_=0,F=0,p=0,E=0,k=0,L=0,S=0,y=0,V,W,fe,Ae,me,Q=null,q;const G=new Uint16Array(Pa+1),v=new Uint16Array(Pa+1);let I=null,U,T,Y;for(f=0;f<=Pa;f++)G[f]=0;for(m=0;m<n;m++)G[e[t+m]]++;for(p=c,F=Pa;F>=1&&G[F]===0;F--);if(p>F&&(p=F),F===0)return o[i++]=1<<24|64<<16|0,o[i++]=1<<24|64<<16|0,l.bits=1,0;for(_=1;_<F&&G[_]===0;_++);for(p<_&&(p=_),L=1,f=1;f<=Pa;f++)if(L<<=1,L-=G[f],L<0)return-1;if(L>0&&(r===vc||F!==1))return-1;for(v[1]=0,f=1;f<Pa;f++)v[f+1]=v[f]+G[f];for(m=0;m<n;m++)e[t+m]!==0&&(d[v[e[t+m]]++]=m);if(r===vc?(Q=I=d,q=20):r===Ll?(Q=q1,I=j1,q=257):(Q=U1,I=z1,q=0),y=0,m=0,f=_,me=i,E=p,k=0,fe=-1,S=1<<p,Ae=S-1,r===Ll&&S>mc||r===yc&&S>gc)return 1;for(;;){U=f-k,d[m]+1<q?(T=0,Y=d[m]):d[m]>=q?(T=I[d[m]-q],Y=Q[d[m]-q]):(T=96,Y=0),V=1<<f-k,W=1<<E,_=W;do W-=V,o[me+(y>>k)+W]=U<<24|T<<16|Y|0;while(W!==0);for(V=1<<f-1;y&V;)V>>=1;if(V!==0?(y&=V-1,y+=V):y=0,m++,--G[f]===0){if(f===F)break;f=e[t+d[m]]}if(f>p&&(y&Ae)!==fe){for(k===0&&(k=p),me+=_,E=f-k,L=1<<E;E+k<F&&(L-=G[E+k],!(L<=0));)E++,L<<=1;if(S+=1<<E,r===Ll&&S>mc||r===yc&&S>gc)return 1;fe=y&Ae,o[fe]=p<<24|E<<16|me-i|0}}return y!==0&&(o[me+y]=f-k<<24|64<<16|0),l.bits=p,0};var bo=V1;const H1=0,Hd=1,Wd=2,{Z_FINISH:bc,Z_BLOCK:W1,Z_TREES:os,Z_OK:aa,Z_STREAM_END:$1,Z_NEED_DICT:G1,Z_STREAM_ERROR:wn,Z_DATA_ERROR:$d,Z_MEM_ERROR:Gd,Z_BUF_ERROR:Y1,Z_DEFLATED:wc}=Ud,Es=16180,_c=16181,Ac=16182,Nc=16183,Sc=16184,xc=16185,Lc=16186,kc=16187,Fc=16188,Pc=16189,Fs=16190,fi=16191,kl=16192,Ic=16193,Fl=16194,Cc=16195,Ec=16196,Oc=16197,Bc=16198,ss=16199,ls=16200,Rc=16201,Mc=16202,Dc=16203,Tc=16204,qc=16205,Pl=16206,jc=16207,Uc=16208,tr=16209,Yd=16210,Kd=16211,K1=852,J1=592,X1=15,Z1=X1,zc=r=>(r>>>24&255)+(r>>>8&65280)+((r&65280)<<8)+((r&255)<<24);function Q1(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const sa=r=>{if(!r)return 1;const e=r.state;return!e||e.strm!==r||e.mode<Es||e.mode>Kd?1:0},Jd=r=>{if(sa(r))return wn;const e=r.state;return r.total_in=r.total_out=e.total=0,r.msg="",e.wrap&&(r.adler=e.wrap&1),e.mode=Es,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(K1),e.distcode=e.distdyn=new Int32Array(J1),e.sane=1,e.back=-1,aa},Xd=r=>{if(sa(r))return wn;const e=r.state;return e.wsize=0,e.whave=0,e.wnext=0,Jd(r)},Zd=(r,e)=>{let t;if(sa(r))return wn;const n=r.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?wn:(n.window!==null&&n.wbits!==e&&(n.window=null),n.wrap=t,n.wbits=e,Xd(r))},Qd=(r,e)=>{if(!r)return wn;const t=new Q1;r.state=t,t.strm=r,t.window=null,t.mode=Es;const n=Zd(r,e);return n!==aa&&(r.state=null),n},ep=r=>Qd(r,Z1);let Vc=!0,Il,Cl;const tp=r=>{if(Vc){Il=new Int32Array(512),Cl=new Int32Array(32);let e=0;for(;e<144;)r.lens[e++]=8;for(;e<256;)r.lens[e++]=9;for(;e<280;)r.lens[e++]=7;for(;e<288;)r.lens[e++]=8;for(bo(Hd,r.lens,0,288,Il,0,r.work,{bits:9}),e=0;e<32;)r.lens[e++]=5;bo(Wd,r.lens,0,32,Cl,0,r.work,{bits:5}),Vc=!1}r.lencode=Il,r.lenbits=9,r.distcode=Cl,r.distbits=5},ef=(r,e,t,n)=>{let o;const i=r.state;return i.window===null&&(i.window=new Uint8Array(1<<i.wbits)),i.wsize===0&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0),n>=i.wsize?(i.window.set(e.subarray(t-i.wsize,t),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>n&&(o=n),i.window.set(e.subarray(t-n,t-n+o),i.wnext),n-=o,n?(i.window.set(e.subarray(t-n,t),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=o))),0},rp=(r,e)=>{let t,n,o,i,d,l,c,f,m,_,F,p,E,k,L=0,S,y,V,W,fe,Ae,me,Q;const q=new Uint8Array(4);let G,v;const I=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(sa(r)||!r.output||!r.input&&r.avail_in!==0)return wn;t=r.state,t.mode===fi&&(t.mode=kl),d=r.next_out,o=r.output,c=r.avail_out,i=r.next_in,n=r.input,l=r.avail_in,f=t.hold,m=t.bits,_=l,F=c,Q=aa;e:for(;;)switch(t.mode){case Es:if(t.wrap===0){t.mode=kl;break}for(;m<16;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}if(t.wrap&2&&f===35615){t.wbits===0&&(t.wbits=15),t.check=0,q[0]=f&255,q[1]=f>>>8&255,t.check=zn(t.check,q,2,0),f=0,m=0,t.mode=_c;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((f&255)<<8)+(f>>8))%31){r.msg="incorrect header check",t.mode=tr;break}if((f&15)!==wc){r.msg="unknown compression method",t.mode=tr;break}if(f>>>=4,m-=4,me=(f&15)+8,t.wbits===0&&(t.wbits=me),me>15||me>t.wbits){r.msg="invalid window size",t.mode=tr;break}t.dmax=1<<t.wbits,t.flags=0,r.adler=t.check=1,t.mode=f&512?Pc:fi,f=0,m=0;break;case _c:for(;m<16;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}if(t.flags=f,(t.flags&255)!==wc){r.msg="unknown compression method",t.mode=tr;break}if(t.flags&57344){r.msg="unknown header flags set",t.mode=tr;break}t.head&&(t.head.text=f>>8&1),t.flags&512&&t.wrap&4&&(q[0]=f&255,q[1]=f>>>8&255,t.check=zn(t.check,q,2,0)),f=0,m=0,t.mode=Ac;case Ac:for(;m<32;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}t.head&&(t.head.time=f),t.flags&512&&t.wrap&4&&(q[0]=f&255,q[1]=f>>>8&255,q[2]=f>>>16&255,q[3]=f>>>24&255,t.check=zn(t.check,q,4,0)),f=0,m=0,t.mode=Nc;case Nc:for(;m<16;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}t.head&&(t.head.xflags=f&255,t.head.os=f>>8),t.flags&512&&t.wrap&4&&(q[0]=f&255,q[1]=f>>>8&255,t.check=zn(t.check,q,2,0)),f=0,m=0,t.mode=Sc;case Sc:if(t.flags&1024){for(;m<16;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}t.length=f,t.head&&(t.head.extra_len=f),t.flags&512&&t.wrap&4&&(q[0]=f&255,q[1]=f>>>8&255,t.check=zn(t.check,q,2,0)),f=0,m=0}else t.head&&(t.head.extra=null);t.mode=xc;case xc:if(t.flags&1024&&(p=t.length,p>l&&(p=l),p&&(t.head&&(me=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(n.subarray(i,i+p),me)),t.flags&512&&t.wrap&4&&(t.check=zn(t.check,n,p,i)),l-=p,i+=p,t.length-=p),t.length))break e;t.length=0,t.mode=Lc;case Lc:if(t.flags&2048){if(l===0)break e;p=0;do me=n[i+p++],t.head&&me&&t.length<65536&&(t.head.name+=String.fromCharCode(me));while(me&&p<l);if(t.flags&512&&t.wrap&4&&(t.check=zn(t.check,n,p,i)),l-=p,i+=p,me)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=kc;case kc:if(t.flags&4096){if(l===0)break e;p=0;do me=n[i+p++],t.head&&me&&t.length<65536&&(t.head.comment+=String.fromCharCode(me));while(me&&p<l);if(t.flags&512&&t.wrap&4&&(t.check=zn(t.check,n,p,i)),l-=p,i+=p,me)break e}else t.head&&(t.head.comment=null);t.mode=Fc;case Fc:if(t.flags&512){for(;m<16;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}if(t.wrap&4&&f!==(t.check&65535)){r.msg="header crc mismatch",t.mode=tr;break}f=0,m=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),r.adler=t.check=0,t.mode=fi;break;case Pc:for(;m<32;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}r.adler=t.check=zc(f),f=0,m=0,t.mode=Fs;case Fs:if(t.havedict===0)return r.next_out=d,r.avail_out=c,r.next_in=i,r.avail_in=l,t.hold=f,t.bits=m,G1;r.adler=t.check=1,t.mode=fi;case fi:if(e===W1||e===os)break e;case kl:if(t.last){f>>>=m&7,m-=m&7,t.mode=Pl;break}for(;m<3;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}switch(t.last=f&1,f>>>=1,m-=1,f&3){case 0:t.mode=Ic;break;case 1:if(tp(t),t.mode=ss,e===os){f>>>=2,m-=2;break e}break;case 2:t.mode=Ec;break;case 3:r.msg="invalid block type",t.mode=tr}f>>>=2,m-=2;break;case Ic:for(f>>>=m&7,m-=m&7;m<32;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}if((f&65535)!==(f>>>16^65535)){r.msg="invalid stored block lengths",t.mode=tr;break}if(t.length=f&65535,f=0,m=0,t.mode=Fl,e===os)break e;case Fl:t.mode=Cc;case Cc:if(p=t.length,p){if(p>l&&(p=l),p>c&&(p=c),p===0)break e;o.set(n.subarray(i,i+p),d),l-=p,i+=p,c-=p,d+=p,t.length-=p;break}t.mode=fi;break;case Ec:for(;m<14;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}if(t.nlen=(f&31)+257,f>>>=5,m-=5,t.ndist=(f&31)+1,f>>>=5,m-=5,t.ncode=(f&15)+4,f>>>=4,m-=4,t.nlen>286||t.ndist>30){r.msg="too many length or distance symbols",t.mode=tr;break}t.have=0,t.mode=Oc;case Oc:for(;t.have<t.ncode;){for(;m<3;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}t.lens[I[t.have++]]=f&7,f>>>=3,m-=3}for(;t.have<19;)t.lens[I[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,G={bits:t.lenbits},Q=bo(H1,t.lens,0,19,t.lencode,0,t.work,G),t.lenbits=G.bits,Q){r.msg="invalid code lengths set",t.mode=tr;break}t.have=0,t.mode=Bc;case Bc:for(;t.have<t.nlen+t.ndist;){for(;L=t.lencode[f&(1<<t.lenbits)-1],S=L>>>24,y=L>>>16&255,V=L&65535,!(S<=m);){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}if(V<16)f>>>=S,m-=S,t.lens[t.have++]=V;else{if(V===16){for(v=S+2;m<v;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}if(f>>>=S,m-=S,t.have===0){r.msg="invalid bit length repeat",t.mode=tr;break}me=t.lens[t.have-1],p=3+(f&3),f>>>=2,m-=2}else if(V===17){for(v=S+3;m<v;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}f>>>=S,m-=S,me=0,p=3+(f&7),f>>>=3,m-=3}else{for(v=S+7;m<v;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}f>>>=S,m-=S,me=0,p=11+(f&127),f>>>=7,m-=7}if(t.have+p>t.nlen+t.ndist){r.msg="invalid bit length repeat",t.mode=tr;break}for(;p--;)t.lens[t.have++]=me}}if(t.mode===tr)break;if(t.lens[256]===0){r.msg="invalid code -- missing end-of-block",t.mode=tr;break}if(t.lenbits=9,G={bits:t.lenbits},Q=bo(Hd,t.lens,0,t.nlen,t.lencode,0,t.work,G),t.lenbits=G.bits,Q){r.msg="invalid literal/lengths set",t.mode=tr;break}if(t.distbits=6,t.distcode=t.distdyn,G={bits:t.distbits},Q=bo(Wd,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,G),t.distbits=G.bits,Q){r.msg="invalid distances set",t.mode=tr;break}if(t.mode=ss,e===os)break e;case ss:t.mode=ls;case ls:if(l>
vendor: 5,003 bytes, line 3
3=6&&c>=258){r.next_out=d,r.avail_out=c,r.next_in=i,r.avail_in=l,t.hold=f,t.bits=m,T1(r,F),d=r.next_out,o=r.output,c=r.avail_out,i=r.next_in,n=r.input,l=r.avail_in,f=t.hold,m=t.bits,t.mode===fi&&(t.back=-1);break}for(t.back=0;L=t.lencode[f&(1<<t.lenbits)-1],S=L>>>24,y=L>>>16&255,V=L&65535,!(S<=m);){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}if(y&&(y&240)===0){for(W=S,fe=y,Ae=V;L=t.lencode[Ae+((f&(1<<W+fe)-1)>>W)],S=L>>>24,y=L>>>16&255,V=L&65535,!(W+S<=m);){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}f>>>=W,m-=W,t.back+=W}if(f>>>=S,m-=S,t.back+=S,t.length=V,y===0){t.mode=qc;break}if(y&32){t.back=-1,t.mode=fi;break}if(y&64){r.msg="invalid literal/length code",t.mode=tr;break}t.extra=y&15,t.mode=Rc;case Rc:if(t.extra){for(v=t.extra;m<v;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}t.length+=f&(1<<t.extra)-1,f>>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=Mc;case Mc:for(;L=t.distcode[f&(1<<t.distbits)-1],S=L>>>24,y=L>>>16&255,V=L&65535,!(S<=m);){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}if((y&240)===0){for(W=S,fe=y,Ae=V;L=t.distcode[Ae+((f&(1<<W+fe)-1)>>W)],S=L>>>24,y=L>>>16&255,V=L&65535,!(W+S<=m);){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}f>>>=W,m-=W,t.back+=W}if(f>>>=S,m-=S,t.back+=S,y&64){r.msg="invalid distance code",t.mode=tr;break}t.offset=V,t.extra=y&15,t.mode=Dc;case Dc:if(t.extra){for(v=t.extra;m<v;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}t.offset+=f&(1<<t.extra)-1,f>>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){r.msg="invalid distance too far back",t.mode=tr;break}t.mode=Tc;case Tc:if(c===0)break e;if(p=F-c,t.offset>p){if(p=t.offset-p,p>t.whave&&t.sane){r.msg="invalid distance too far back",t.mode=tr;break}p>t.wnext?(p-=t.wnext,E=t.wsize-p):E=t.wnext-p,p>t.length&&(p=t.length),k=t.window}else k=o,E=d-t.offset,p=t.length;p>c&&(p=c),c-=p,t.length-=p;do o[d++]=k[E++];while(--p);t.length===0&&(t.mode=ls);break;case qc:if(c===0)break e;o[d++]=t.length,c--,t.mode=ls;break;case Pl:if(t.wrap){for(;m<32;){if(l===0)break e;l--,f|=n[i++]<<m,m+=8}if(F-=c,r.total_out+=F,t.total+=F,t.wrap&4&&F&&(r.adler=t.check=t.flags?zn(t.check,o,F,d-F):Ql(t.check,o,F,d-F)),F=c,t.wrap&4&&(t.flags?f:zc(f))!==t.check){r.msg="incorrect data check",t.mode=tr;break}f=0,m=0}t.mode=jc;case jc:if(t.wrap&&t.flags){for(;m<32;){if(l===0)break e;l--,f+=n[i++]<<m,m+=8}if(t.wrap&4&&f!==(t.total&4294967295)){r.msg="incorrect length check",t.mode=tr;break}f=0,m=0}t.mode=Uc;case Uc:Q=$1;break e;case tr:Q=$d;break e;case Yd:return Gd;case Kd:default:return wn}return r.next_out=d,r.avail_out=c,r.next_in=i,r.avail_in=l,t.hold=f,t.bits=m,(t.wsize||F!==r.avail_out&&t.mode<tr&&(t.mode<Pl||e!==bc))&&ef(r,r.output,r.next_out,F-r.avail_out),_-=r.avail_in,F-=r.avail_out,r.total_in+=_,r.total_out+=F,t.total+=F,t.wrap&4&&F&&(r.adler=t.check=t.flags?zn(t.check,o,F,r.next_out-F):Ql(t.check,o,F,r.next_out-F)),r.data_type=t.bits+(t.last?64:0)+(t.mode===fi?128:0)+(t.mode===ss||t.mode===Fl?256:0),(_===0&&F===0||e===bc)&&Q===aa&&(Q=Y1),Q},np=r=>{if(sa(r))return wn;let e=r.state;return e.window&&(e.window=null),r.state=null,aa},ip=(r,e)=>{if(sa(r))return wn;const t=r.state;return(t.wrap&2)===0?wn:(t.head=e,e.done=!1,aa)},ap=(r,e)=>{const t=e.length;let n,o,i;return sa(r)||(n=r.state,n.wrap!==0&&n.mode!==Fs)?wn:n.mode===Fs&&(o=1,o=Ql(o,e,t,0),o!==n.check)?$d:(i=ef(r,e,t,t),i?(n.mode=Yd,Gd):(n.havedict=1,aa))};var op=Xd,sp=Zd,lp=Jd,up=ep,cp=Qd,dp=rp,fp=np,hp=ip,pp=ap,mp="pako inflate (from Nodeca project)",$n={inflateReset:op,inflateReset2:sp,inflateResetKeep:lp,inflateInit:up,inflateInit2:cp,inflate:dp,inflateEnd:fp,inflateGetHeader:hp,inflateSetDictionary:pp,inflateInfo:mp};function gp(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var vp=gp;const tf=Object.prototype.toString,{Z_NO_FLUSH:yp,Z_FINISH:Hc,Z_OK:Da,Z_STREAM_END:El,Z_NEED_DICT:Ol,Z_STREAM_ERROR:bp,Z_DATA_ERROR:Wc,Z_MEM_ERROR:wp,Z_BUF_ERROR:$c}=Ud,_p={chunkSize:1024*64,windowBits:15,to:""};function _o(r){this.options=zd.assign({},_p,r||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(r&&r.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15)===0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new M1,this.strm.avail_out=0;let t=$n.inflateInit2(this.strm,e.windowBits);if(t!==Da)throw new Error(eu[t]);if(this.header=new vp,$n.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=tu.string2buf(e.dictionary):tf.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=$n.inflateSetDictionary(this.strm,e.dictionary),t!==Da)))throw new Error(eu[t])}_o.prototype.push=function(r,e){const t=this.strm,n=this.options.chunkSize,o=this.options.dictionary;let i,d,l;if(this.ended)return!1;for(e===~~e?d=e:d=e===!0?Hc:yp,tf.call(r)==="[object ArrayBuffer]"?t.input=new 
3Uint8Array(r):t.input=r,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(n),t.next_out=0,t.avail_out=n),i=$n.inflate(t,d),i===Ol&&o&&(i=$n.inflateSetDictionary(t,o),i===Da?i=$n.inflate(t,d):i===Wc&&(i=Ol));t.avail_in>0&&i===El&&t.state.wrap&2&&t.state.flags!==0&&t.input[t.next_in]!==0;)$n.inflateReset(t),i=$n.inflate(t,d);switch(i){case bp:case Wc:case Ol:case wp:return this.onEnd(i),this.ended=!0,!1}if(l=t.avail_out,t.next_out&&(t.avail_out===0||i===El||d>0))if(this.options.to==="string"){let c=tu.utf8border(t.output,t.next_out),f=t.next_out-c,m=tu.buf2string(t.output,c);t.next_out=f,t.avail_out=n-f,f&&t.output.set(t.output.subarray(c,c+f),0),this.onData(m)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out)),t.avail_out=0,t.next_out=0;if(!((i===Da||i===$c)&&l===0)){if(i===El)return i=$n.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(t.avail_in===0){if(d===Hc)return i=$n.inflateEnd(this.strm),this.onEnd(i===Da?$c:i),this.ended=!0,!1;break}}}return!0};_o.prototype.onData=function(r){this.chunks.push(r)};_o.prototype.onEnd=function(r){r===Da&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=zd.flattenChunks(this.chunks)),this.chunks=[],this.err=r,this.msg=this.strm.msg};function Ap(r,e){const t=new _o(e);if(t.push(r,!0),t.err)throw t.msg||eu[t.err];return t.result}var Np=_o,Sp=Ap,xp={Inflate:Np,inflate:Sp};const{Inflate:Lp,inflate:kp}=xp;var Gc=Lp,Fp=kp;const rf=[];for(let r=0;r<256;r++){let e=r;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;rf[r]=e}const Yc=4294967295;function Pp(r,e,t){let n=r;for(let o=0;o<t;o++)n=rf[(n^e[o])&255]^n>>>8;return n}function Ip(r,e){return(Pp(Yc,r,e)^Yc)>>>0}function Kc(r,e,t){const n=r.readUint32(),o=Ip(new Uint8Array(r.buffer,r.byteOffset+r.offset-e-4,e),e);if(o!==n)throw new Error(`CRC mismatch for chunk ${t}. Expected ${n}, found ${o}`)}function nf(r,e,t){for(let n=0;n<t;n++)e[n]=r[n]}function af(r,e,t,n){let o=0;for(;o<n;o++)e[o]=r[o];for(;o<t;o++)e[o]=r[o]+e[o-n]&255}function of(r,e,t,n){let o=0;if(t.length===0)for(;o<n;o++)e[o]=r[o];else for(;o<n;o++)e[o]=r[o]+t[o]&255}function sf(r,e,t,n,o){let i=0;if(t.length===0){for(;i<o;i++)e[i]=r[i];for(;i<n;i++)e[i]=r[i]+(e[i-o]>>1)&255}else{for(;i<o;i++)e[i]=r[i]+(t[i]>>1)&255;for(;i<n;i++)e[i]=r[i]+(e[i-o]+t[i]>>1)&255}}function lf(r,e,t,n,o){let i=0;if(t.length===0){for(;i<o;i++)e[i]=r[i];for(;i<n;i++)e[i]=r[i]+e[i-o]&255}else{for(;i<o;i++)e[i]=r[i]+t[i]&255;for(;i<n;i++)e[i]=r[i]+Cp(e[i-o],t[i],t[i-o])&255}}function Cp(r,e,t){const n=r+e-t,o=Math.abs(n-r),i=Math.abs(n-e),d=Math.abs(n-t);return o<=i&&o<=d?r:i<=d?e:t}function Ep(r,e,t,n,o,i){switch(r){case 0:nf(e,t,o);break;case 1:af(e,t,o,i);break;case 2:of(e,t,n,o);break;case 3:sf(e,t,n,o,i);break;case 4:lf(e,t,n,o,i);break;default:throw new Error(`Unsupported filter: ${r}`)}}const Op=new Uint16Array([255]),Bp=new Uint8Array(Op.buffer),Rp=Bp[0]===255;function Mp(r){const{data:e,width:t,height:n,channels:o,depth:i}=r,d=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],l=Math.ceil(i/8)*o,c=new Uint8Array(n*t*l);let f=0;for(let m=0;m<7;m++){const _=d[m],F=Math.ceil((t-_.x)/_.xStep),p=Math.ceil((n-_.y)/_.yStep);if(F<=0||p<=0)continue;const E=F*l,k=new Uint8Array(E);for(let L=0;L<p;L++){const S=e[f++],y=e.subarray(f,f+E);f+=E;const V=new Uint8Array(E);Ep(S,y,V,k,E,l),k.set(V);for(let W=0;W<F;W++){const fe=_.x+W*_.xStep,Ae=_.y+L*_.yStep;if(!(fe>=t||Ae>=n))for(let me=0;me<l;me++)c[(Ae*t+fe)*l+me]=V[W*l+me]}}}if(i===16){const m=new Uint16Array(c.buffer);if(Rp)for(let _=0;_<m.length;_++)m[_]=Dp(m[_]);return m}else return c}function Dp(r){return(r&255)<<8|r>>8&255}const Tp=new Uint16Array([255]),qp=new Uint8Array(Tp.buffer),jp=qp[0]===255,Up=new Uint8Array(0);function Jc(r){const{data:e,width:t,height:n,channels:o,depth:i}=r,d=Math.ceil(i/8)*o,l=Math.ceil(i/8*o*t),c=new Uint8Array(n*l);let f=Up,m=0,_,F;for(let p=0;p<n;p++){switch(_=e.subarray(m+1,m+1+l),F=c.subarray(p*l,(p+1)*l),e[m]){case 0:nf(_,F,l);break;case 1:af(_,F,l,d);break;case 2:of(_,F,f,l);break;case 3:sf(_,F,f,l,d);break;case 4:lf(_,F,f,l,d);break;default:throw new Error(`Unsupported filter: ${e[m]}`)}f=F,m+=l+1}if(i===16){const p=new Uint16Array(c.buffer);if(jp)for(let E=0;E<p.length;E++)p[E]=zp(p[E]);return p}else return c}function zp(r){return(r&255)<<8|r>>8&255}const vs=Uint8Array.of(137,80,78,71,13,10,26,10);function Xc(r){if(!Vp(r.readBytes(vs.length)))throw new Error("wrong PNG signature")}function Vp(r){if(r.length<vs.length)return!1;for(let e=0;e<vs.length;
vendor: 4,931 bytes, line 3
3e++)if(r[e]!==vs[e])return!1;return!0}const Hp="tEXt",Wp=0,uf=new TextDecoder("latin1");function $p(r){if(Yp(r),r.length===0||r.length>79)throw new Error("keyword length must be between 1 and 79")}const Gp=/^[\u0000-\u00FF]*$/;function Yp(r){if(!Gp.test(r))throw new Error("invalid latin1 text")}function Kp(r,e,t){const n=cf(e);r[n]=Jp(e,t-n.length-1)}function cf(r){for(r.mark();r.readByte()!==Wp;);const e=r.offset;r.reset();const t=uf.decode(r.readBytes(e-r.offset-1));return r.skip(1),$p(t),t}function Jp(r,e){return uf.decode(r.readBytes(e))}const un={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},Bl={UNKNOWN:-1,DEFLATE:0},Zc={UNKNOWN:-1,ADAPTIVE:0},Rl={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},us={NONE:0,BACKGROUND:1,PREVIOUS:2},Ml={SOURCE:0,OVER:1};class Xp extends du{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(e,t={}){super(e);const{checkCrc:n=!1}=t;this._checkCrc=n,this._inflator=new Gc,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=Bl.UNKNOWN,this._filterMethod=Zc.UNKNOWN,this._interlaceMethod=Rl.UNKNOWN,this._colorType=un.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Xc(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeChunk(e,t)}return this.decodeImage(),this._png}decodeApng(){for(Xc(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeApngChunk(e,t)}return this.decodeApngImage(),this._apng}decodeChunk(e,t){const n=this.offset;switch(t){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case Hp:Kp(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e);break}if(this.offset-n!==e)throw new Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?Kc(this,e+4,t):this.skip(4)}decodeApngChunk(e,t){const n=this.offset;switch(t!=="fdAT"&&t!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),t){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(e);break;default:this.decodeChunk(e,t),this.offset=n+e;break}if(this.offset-n!==e)throw new Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?Kc(this,e+4,t):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=Zp(this.readUint8());const t=this.readUint8();this._colorType=t;let n;switch(t){case un.GREYSCALE:n=1;break;case un.TRUECOLOUR:n=3;break;case un.INDEXED_COLOUR:n=1;break;case un.GREYSCALE_ALPHA:n=2;break;case un.TRUECOLOUR_ALPHA:n=4;break;case un.UNKNOWN:default:throw new Error(`Unknown color type: ${t}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==Bl.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(e)}decodePLTE(e){if(e%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);const t=e/3;this._hasPalette=!0;const n=[];this._palette=n;for(let o=0;o<t;o++)n.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const t=e,n=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,n,t)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let t=e,n=this.offset+this.byteOffset;if(n+=4,t-=4,this._inflator.push(new Uint8Array(this.buffer,n,t)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case un.GREYSCALE:case un.TRUECOLOUR:{if(e%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alph
vendor: 5,393 bytes, line 3
3a values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let t=0;t<e/2;t++)this._transparency[t]=this.readUint16();break}case un.INDEXED_COLOUR:{if(e>this._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let t=0;for(;t<e;t++){const n=this.readByte();this._palette[t].push(n)}for(;t<this._palette.length;t++)this._palette[t].push(255);break}case un.UNKNOWN:case un.GREYSCALE_ALPHA:case un.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){const t=cf(this),n=this.readUint8();if(n!==Bl.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${n}`);const o=this.readBytes(e-t.length-2);this._png.iccEmbeddedProfile={name:t,profile:Fp(o)}}decodepHYs(){const e=this.readUint32(),t=this.readUint32(),n=this.readByte();this._png.resolution={x:e,y:t,unit:n}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){const t={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},n=this._frames.at(e);if(n){if(n.data=Jc({data:n.data,width:n.width,height:n.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||n.xOffset===0&&n.yOffset===0&&n.width===this._png.width&&n.height===this._png.height)t.data=n.data;else{const o=this._apng.frames.at(e-1);this.disposeFrame(n,o,t),this.addFrameDataToCanvas(t,n)}this._apng.frames.push(t)}}return this._apng}disposeFrame(e,t,n){switch(e.disposeOp){case us.NONE:break;case us.BACKGROUND:for(let o=0;o<this._png.height;o++)for(let i=0;i<this._png.width;i++){const d=(o*e.width+i)*this._png.channels;for(let l=0;l<this._png.channels;l++)n.data[d+l]=0}break;case us.PREVIOUS:n.data.set(t.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,t){const n=1<<this._png.depth,o=(i,d)=>{const l=((i+t.yOffset)*this._png.width+t.xOffset+d)*this._png.channels,c=(i*t.width+d)*this._png.channels;return{index:l,frameIndex:c}};switch(t.blendOp){case Ml.SOURCE:for(let i=0;i<t.height;i++)for(let d=0;d<t.width;d++){const{index:l,frameIndex:c}=o(i,d);for(let f=0;f<this._png.channels;f++)e.data[l+f]=t.data[c+f]}break;case Ml.OVER:for(let i=0;i<t.height;i++)for(let d=0;d<t.width;d++){const{index:l,frameIndex:c}=o(i,d);for(let f=0;f<this._png.channels;f++){const m=t.data[c+this._png.channels-1]/n,_=f%(this._png.channels-1)===0?1:t.data[c+f],F=Math.floor(m*_+(1-m)*e.data[l+f]);e.data[l+f]+=F}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const e=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==Zc.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===Rl.NO_INTERLACE)this._png.data=Jc({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===Rl.ADAM7)this._png.data=Mp({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const e=this._inflator.result,t=this._frames.at(-1);t?t.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:us.NONE,blendOp:Ml.SOURCE,data:e}),this._inflator=new Gc,this._writingDataChunks=!1}}function Zp(r){if(r!==1&&r!==2&&r!==4&&r!==8&&r!==16)throw new Error(`invalid bit depth: ${r}`);return r}var Qc;(function(r){r[r.UNKNOWN=0]="UNKNOWN",r[r.METRE=1]="METRE"})(Qc||(Qc={}));function Qp(r,e){return new Xp(r,e).decode()}var ut=(function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this})();function Dl(){ut.console&&typeof ut.console.log=="function"&&ut.console.log.apply(ut.console,arguments)}var Ht={log:Dl,warn:function(r){ut.console&&(typeof ut.console.warn=="function"?ut.console.warn.apply(ut.console,arguments):Dl.call(null,arguments))},error:function(r){ut.console&&(typeof ut.console.error=="function"?ut.console.error.apply(ut.console,arguments):Dl(r))}};function Tl(r,e,t){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){ea(n.response,e,t)},n.onerror=function(){Ht.error("could not download file")},n.send()}function ed(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}
vendor: 3,331 bytes, line 3
3function cs(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(e)}}var ea=ut.saveAs||((typeof window>"u"?"undefined":qt(window))!=="object"||window!==ut?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var n=ut.URL||ut.webkitURL,o=document.createElement("a");e=e||r.name||"download",o.download=e,o.rel="noopener",typeof r=="string"?(o.href=r,o.origin!==location.origin?ed(o.href)?Tl(r,e,t):cs(o,o.target="_blank"):cs(o)):(o.href=n.createObjectURL(r),setTimeout(function(){n.revokeObjectURL(o.href)},4e4),setTimeout(function(){cs(o)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(ed(r))Tl(r,e,t);else{var n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){cs(n)})}else navigator.msSaveOrOpenBlob((function(o,i){return i===void 0?i={autoBom:!1}:qt(i)!=="object"&&(Ht.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o})(r,t),e)}:function(r,e,t,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return Tl(r,e,t);var o=r.type==="application/octet-stream",i=/constructor/i.test(ut.HTMLElement)||ut.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||o&&i)&&(typeof FileReader>"u"?"undefined":qt(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var m=l.result;m=d?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=m:location=m,n=null},l.readAsDataURL(r)}else{var c=ut.URL||ut.webkitURL,f=c.createObjectURL(r);n?n.location=f:location.href=f,n=null,setTimeout(function(){c.revokeObjectURL(f)},4e4)}});function df(r){var e;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee9
30",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(l){return[parseInt(l[1]),parseInt(l[2]),parseInt(l[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(l){return[parseInt(l[1],16),parseInt(l[2],16),parseInt(l[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(l){return[parseInt(l[1]+l[1],16),parseInt(l[2]+l[2],16),parseInt(l[3]+l[3],16)]}}],n=0;n<t.length;n++){var o=t[n].re,i=t[n].process,d=o.exec(r);d&&(e=i(d),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var l=this.r.toString(16),c=this.g.toString(16),f=this.b.toString(16);return l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),f.length==1&&(f="0"+f),"#"+l+c+f}}var ys=ut.atob.bind(ut),td=ut.btoa.bind(ut);function ql(r,e){var t=r[0],n=r[1],o=r[2],i=r[3];t=Br(t,n,o,i,e[0],7,-680876936),i=Br(i,t,n,o,e[1],12,-389564586),o=Br(o,i,t,n,e[2],17,606105819),n=Br(n,o,i,t,e[3],22,-1044525330),t=Br(t,n,o,i,e[4],7,-176418897),i=Br(i,t,n,o,e[5],12,1200080426),o=Br(o,i,t,n,e[6],17,-1473231341),n=Br(n,o,i,t,e[7],22,-45705983),t=Br(t,n,o,i,e[8],7,1770035416),i=Br(i,t,n,o,e[9],12,-1958414417),o=Br(o,i,t,n,e[10],17,-42063),n=Br(n,o,i,t,e[11],22,-1990404162),t=Br(t,n,o,i,e[12],7,1804603682),i=Br(i,t,n,o,e[13],12,-40341101),o=Br(o,i,t,n,e[14],17,-1502002290),t=Rr(t,n=Br(n,o,i,t,e[15],22,1236535329),o,i,e[1],5,-165796510),i=Rr(i,t,n,o,e[6],9,-1069501632),o=Rr(o,i,t,n,e[11],14,643717713),n=Rr(n,o,i,t,e[0],20,-373897302),t=Rr(t,n,o,i,e[5],5,-701558691),i=Rr(i,t,n,o,e[10],9,38016083),o=Rr(o,i,t,n,e[15],14,-660478335),n=Rr(n,o,i,t,e[4],20,-405537848),t=Rr(t,n,o,i,e[9],5,568446438),i=Rr(i,t,n,o,e[14],9,-1019803690),o=Rr(o,i,t,n,e[3],14,-187363961),n=Rr(n,o,i,t,e[8],20,1163531501),t=Rr(t,n,o,i,e[13],5,-1444681467),i=Rr(i,t,n,o,e[2],9,-51403784),o=Rr(o,i,t,n,e[7],14,1735328473),t=Mr(t,n=Rr(n,o,i,t,e[12],20,-1926607734),o,i,e[5],4,-378558),i=Mr(i,t,n,o,e[8],11,-2022574463),o=Mr(o,i,t,n,e[11],16,1839030562),n=Mr(n,o,i,t,e[14],23,-35309556),t=Mr(t,n,o,i,e[1],4,-1530992060),i=Mr(i,t,n,o,e[4],11,1272893353),o=Mr(o,i,t,n,e[7],16,-155497632),n=Mr(n,o,i,t,e[10],23,-1094730640),t=Mr(t,n,o,i,e[13],4,681279174),i=Mr(i,t,n,o,e[0],11,-358537222),o=Mr(o,i,t,n,e[3],16,-722521979),n=Mr(n,o,i,t,e[6],23,76029189),t=Mr(t,n,o,i,e[9],4,
vendor: 9,944 bytes, line 3
3-640364487),i=Mr(i,t,n,o,e[12],11,-421815835),o=Mr(o,i,t,n,e[15],16,530742520),t=Dr(t,n=Mr(n,o,i,t,e[2],23,-995338651),o,i,e[0],6,-198630844),i=Dr(i,t,n,o,e[7],10,1126891415),o=Dr(o,i,t,n,e[14],15,-1416354905),n=Dr(n,o,i,t,e[5],21,-57434055),t=Dr(t,n,o,i,e[12],6,1700485571),i=Dr(i,t,n,o,e[3],10,-1894986606),o=Dr(o,i,t,n,e[10],15,-1051523),n=Dr(n,o,i,t,e[1],21,-2054922799),t=Dr(t,n,o,i,e[8],6,1873313359),i=Dr(i,t,n,o,e[15],10,-30611744),o=Dr(o,i,t,n,e[6],15,-1560198380),n=Dr(n,o,i,t,e[13],21,1309151649),t=Dr(t,n,o,i,e[4],6,-145523070),i=Dr(i,t,n,o,e[11],10,-1120210379),o=Dr(o,i,t,n,e[2],15,718787259),n=Dr(n,o,i,t,e[9],21,-343485551),r[0]=Ri(t,r[0]),r[1]=Ri(n,r[1]),r[2]=Ri(o,r[2]),r[3]=Ri(i,r[3])}function Os(r,e,t,n,o,i){return e=Ri(Ri(e,r),Ri(n,i)),Ri(e<<o|e>>>32-o,t)}function Br(r,e,t,n,o,i,d){return Os(e&t|~e&n,r,e,o,i,d)}function Rr(r,e,t,n,o,i,d){return Os(e&n|t&~n,r,e,o,i,d)}function Mr(r,e,t,n,o,i,d){return Os(e^t^n,r,e,o,i,d)}function Dr(r,e,t,n,o,i,d){return Os(t^(e|~n),r,e,o,i,d)}function ff(r){var e,t=r.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)ql(n,e2(r.substring(e-64,e)));r=r.substring(e-64);var o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r.length;e++)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(ql(n,o),e=0;e<16;e++)o[e]=0;return o[14]=8*t,ql(n,o),n}function e2(r){var e,t=[];for(e=0;e<64;e+=4)t[e>>2]=r.charCodeAt(e)+(r.charCodeAt(e+1)<<8)+(r.charCodeAt(e+2)<<16)+(r.charCodeAt(e+3)<<24);return t}var rd="0123456789abcdef".split("");function t2(r){for(var e="",t=0;t<4;t++)e+=rd[r>>8*t+4&15]+rd[r>>8*t&15];return e}function r2(r){return String.fromCharCode(255&r,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function ru(r){return ff(r).map(r2).join("")}var n2=(function(r){for(var e=0;e<r.length;e++)r[e]=t2(r[e]);return r.join("")})(ff("hello"))!="5d41402abc4b2a76b9719d911017c592";function Ri(r,e){if(n2){var t=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(t>>16)<<16|65535&t}return r+e&4294967295}function nu(r,e){var t,n,o,i;if(r!==t){for(var d=(o=r,i=1+(256/r.length|0),new Array(i+1).join(o)),l=[],c=0;c<256;c++)l[c]=c;var f=0;for(c=0;c<256;c++){var m=l[c];f=(f+m+d.charCodeAt(c))%256,l[c]=l[f],l[f]=m}t=r,n=l}else l=n;var _=e.length,F=0,p=0,E="";for(c=0;c<_;c++)p=(p+(m=l[F=(F+1)%256]))%256,l[F]=l[p],l[p]=m,d=l[(l[F]+l[p])%256],E+=String.fromCharCode(e.charCodeAt(c)^d);return E}var nd={print:4,modify:8,copy:16,"annot-forms":32};function Ea(r,e,t,n){this.v=1,this.r=2;var o=192;r.forEach(function(l){if(nd.perm!==void 0)throw new Error("Invalid permission: "+l);o+=nd[l]}),this.padding="(¿N^NuŠAd\0NVÿú�\b..\0¶Ðh>€/\f©þdSiz";var i=(e+this.padding).substr(0,32),d=(t+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,d),this.P=-(1+(255^o)),this.encryptionKey=ru(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=nu(this.encryptionKey,this.padding)}function Oa(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var e="",t=r.length,n=0;n<t;n++){var o=r.charCodeAt(n);e+=o<33||o===35||o===37||o===40||o===41||o===47||o===60||o===62||o===91||o===93||o===123||o===125||o>126?"#"+("0"+o.toString(16)).slice(-2):r[n]}return e}function id(r){if(qt(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,n,o){if(o=o||!1,typeof t!="string"||typeof n!="function"||typeof o!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var i=Math.random().toString(35);return e[t][i]=[n,!!o],i},this.unsubscribe=function(t){for(var n in e)if(e[n][t])return delete e[n][t],Object.keys(e[n]).length===0&&delete e[n],!0;return!1},this.publish=function(t){if(e.hasOwnProperty(t)){var n=Array.prototype.slice.call(arguments,1),o=[];for(var i in e[t]){var d=e[t][i];try{d[0].apply(r,n)}catch(l){ut.console&&Ht.error("jsPDF PubSub Error",l.message,l)}d[1]&&o.push(i)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function Ps(r){if(!(this instanceof Ps))return new Ps(r);var e="opacity,stroke-opacity".split(",");for(var t in r)r.hasOwnProperty(t)&&e.indexOf(t)>=0&&(this[t]=r[t]);this.id="",this.objectNumber=-1}function hf(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function ta(r,e,t,n,o){if(!(this instanceof ta))return new ta(r,e,t,n,o);this.type=r==="axial"?2:3,this.coords=e,this.colors=t,hf.call(this,n,o)}function Ra(r,e,t,n,o){if(!(this instanceof Ra))return new Ra(r,e,t,n,o);this.boundingBox=r,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,hf.call(this,n,o)}function Ze(r){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],o=arguments[2],i=arguments[3],d=[],l=1,c=16,f="S",m=null;qt(r=r||{})==="object"&&(t=r.orientation,n=r.unit||n,o=r.format||o,i=r.compress||r.compressPdf||i,(m=r.encryption||null)!==null&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),l=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(e=r.precision),r.floatPrecision!==void 0&&(c=r.floatPrecision),f=r.defaultPathOperation||"S"),d=r.filters||(i===!0?["FlateEncode"]:d),n=n||"mm",t=(""+(t||"P")).toLowerCase();var _=r.putOnlyUsedFonts||!1,F={},p={internal:{},__private__:{}};p.__private__.PubSub=id;var E="1.3",k=p.__private__.getPdfVersion=function(){return E};p.__private__.setPdfVersion=function(u){E=u};var L={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return L};var S=p.__private__.getPageFormat=function(u){return L[u]};o=o||"a4";var y="compat",V="advanced",W=y;function fe(){this.saveGraphicsState(),B(new at(st,0,0,-st,0,ji()*st).toString()+" cm"),this.setFontSize(this.getFontSize()/st),f="n",W=V}function Ae(){this.restoreGraphicsState(),f="S",W=y}var me=p.__private__.combineFontStyleAndFontWeight=function(u,b){if(u=="bold"&&b=="normal"||u=="bold"&&b==400||u=="normal"&&b=="italic"||u=="bold"&&b=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return b&&(u=b==400||b==="normal"?u==="italic"?"italic":"normal":b!=700&&b!=="bold"||u!=="normal"?(b==700?"bold":b)+""+u:"bold"),u};p.advancedAPI=function(u){var b=W===y;return b&&fe.call(this),typeof u!="function"||(u(this),b&&Ae.call(this)),this},p.compatAPI=function(u){var b=W===V;return b&&Ae.call(this),typeof u!="function"||(u(this),b&&fe.call(this)),this},p.isAdvancedAPI=function(){return W===V};var Q,q=function(u){if(W!==V)throw new Error(u+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},G=p.roundToPrecision=p.__private__.roundToPrecision=function(u,b){var R=e||b;if(isNaN(u)||isNaN(R))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return u.toFixed(R).replace(/0+$/,"")};Q=p.hpf=p.__private__.hpf=typeof c=="number"?function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.hpf");return G(u,c)}:c==="smart"?function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.hpf");return G(u,u>-1&&u<1?16:5)}:function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.hpf");return G(u,16)};var v=p.f2=p.__private__.f2=function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.f2");return G(u,2)},I=p.__private__.f3=function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.f3");return G(u,3)},U=p.scale=p.__private__.scale=function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.scale");return W===y?u*st:W===V?u:void 0},T=function(u){return U((function(b){return W===y?ji()-b:W===V?b:void 0})(u))};p.__private__.setPrecision=p.setPrecision=function(u){typeof parseInt(u,10)=="number"&&(e=parseInt(u,10))};var Y,ie="00000000000000000000000000000000",oe=p.__private__.getFileId=function(){return ie},Z=p.__private__.setFileId=function(u){return ie=u!==void 0&&/^[a-fA-F0-9]{32}$/.test(u)?u.toUpperCase():ie.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),m!==null&&(Lr=new Ea(m.userPermissions,m.userPassword,m.ownerPassword,ie)),ie};p.setFileId=function(u){return Z(u),this},p.getFileId=function(){return oe()};var le=p.__private__.convertDateToPDFDate=function(u){var b=u.getTimezoneOffset(),R=b<0?"+":"-",$=Math.floor(Math.abs(b/60)),re=Math.abs(b%60),ve=[R,H($),"'",H(re),"'"].join("");return["D:",u.getFullYear(),H(u.getMonth()+1),H(u.getDate()),H(u.getHours()),H(u.getMinutes()),H(u.getSeconds()),ve].join("")},ne=p.__private__.convertPDFDateToDate=function(u){var b=parseInt(u.substr(2,4),10),R=parseInt(u.substr(6,2),10)-1,$=parseInt(u.substr(8,2),10),re=parseInt(u.substr(10,2),10),ve=parseInt(u.substr(12,2),10),Le=parseInt(u.substr(14,2),10);return new Date(b,R,$,re,ve,Le,0)},_e=p.__private__.setCreationDate=function(u){var b;if(u===void 0&&(u=new Date),u instanceof Date)b=le(u);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(u))throw new Error("Invalid argument passed to 
3jsPDF.setCreationDate");b=u}return Y=b},N=p.__private__.getCreationDate=function(u){var b=Y;return u==="jsDate"&&(b=ne(Y)),b};p.setCreationDate=function(u){return _e(u),this},p.getCreationDate=function(u){return N(u)};var z,H=p.__private__.padd2=function(u){return("0"+parseInt(u)).slice(-2)},J=p.__private__.padd2Hex=function(u){return("00"+(u=u.toString())).substr(u.length)},te=0,se=[],pe=[],ge=0,xe=[],Ie=[],Oe=!1,Me=pe;p.__private__.setCustomOutputDestination=function(u){Oe=!0,Me=u};var Ve=function(u){Oe||(Me=u)};p.__private__.resetCustomOutputDestination=function(){Oe=!1,Me=pe};var B=p.__private__.out=function(u){return u=u.toString(),ge+=u.length+1,Me.push(u),Me},we=p.__private__.write=function(u){return B(arguments.length===1?u.toString():Array.prototype.join.call(arguments," "))},ot=p.__private__.getArrayBuffer=function(u){for(var b=u.length,R=new ArrayBuffer(b),$=new Uint8Array(R);b--;)$[b]=u.charCodeAt(b);return R},Ge=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return Ge};var ke=r.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(u){return ke=W===V?u/st:u,this};var tt,De=p.__private__.getFontSize=p.getFontSize=function(){return W===y?ke:ke*st},qe=r.R2L||!1;p.__private__.setR2L=p.setR2L=function(u){return qe=u,this},p.__private__.getR2L=p.getR2L=function(){return qe};var Je,Ct=p.__private__.setZoomMode=function(u){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(u))tt=u;else if(isNaN(u)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(u)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+u+'" is not recognized.');tt=u}else tt=parseInt(u,10)};p.__private__.getZoomMode=function(){return tt};var xt,ct=p.__private__.setPageMode=function(u){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(u)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+u+'" is not recognized.');Je=u};p.__private__.getPageMode=function(){return Je};var Nt=p.__private__.setLayoutMode=function(u){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(u)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+u+'" is not recognized.');xt=u};p.__private__.getLayoutMode=function(){return xt},p.__private__.setDisplayMode=p.setDisplayMode=function(u,b,R){return Ct(u),Nt(b),ct(R),this};var Lt={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(u){if(Object.keys(Lt).indexOf(u)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Lt[u]},p.__private__.getDocumentProperties=function(){return Lt},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(u){for(var b in Lt)Lt.hasOwnProperty(b)&&u[b]&&(Lt[b]=u[b]);return this},p.__private__.setDocumentProperty=function(u,b){if(Object.keys(Lt).indexOf(u)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Lt[u]=b};var He,st,We,jt,kt,yt={},pt={},Wt=[],et={},Bt={},it={},dt={},$t=null,St=0,rt=[],Et=new id(p),dn=r.hotfixes||[],Nr={},Zr={},fn=[],at=function u(b,R,$,re,ve,Le){if(!(this instanceof u))return new u(b,R,$,re,ve,Le);isNaN(b)&&(b=1),isNaN(R)&&(R=0),isNaN($)&&($=0),isNaN(re)&&(re=1),isNaN(ve)&&(ve=0),isNaN(Le)&&(Le=0),this._matrix=[b,R,$,re,ve,Le]};Object.defineProperty(at.prototype,"sx",{get:function(){return this._matrix[0]},set:function(u){this._matrix[0]=u}}),Object.defineProperty(at.prototype,"shy",{get:function(){return this._matrix[
vendor: 13,475 bytes, lines 3-7
31]},set:function(u){this._matrix[1]=u}}),Object.defineProperty(at.prototype,"shx",{get:function(){return this._matrix[2]},set:function(u){this._matrix[2]=u}}),Object.defineProperty(at.prototype,"sy",{get:function(){return this._matrix[3]},set:function(u){this._matrix[3]=u}}),Object.defineProperty(at.prototype,"tx",{get:function(){return this._matrix[4]},set:function(u){this._matrix[4]=u}}),Object.defineProperty(at.prototype,"ty",{get:function(){return this._matrix[5]},set:function(u){this._matrix[5]=u}}),Object.defineProperty(at.prototype,"a",{get:function(){return this._matrix[0]},set:function(u){this._matrix[0]=u}}),Object.defineProperty(at.prototype,"b",{get:function(){return this._matrix[1]},set:function(u){this._matrix[1]=u}}),Object.defineProperty(at.prototype,"c",{get:function(){return this._matrix[2]},set:function(u){this._matrix[2]=u}}),Object.defineProperty(at.prototype,"d",{get:function(){return this._matrix[3]},set:function(u){this._matrix[3]=u}}),Object.defineProperty(at.prototype,"e",{get:function(){return this._matrix[4]},set:function(u){this._matrix[4]=u}}),Object.defineProperty(at.prototype,"f",{get:function(){return this._matrix[5]},set:function(u){this._matrix[5]=u}}),Object.defineProperty(at.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(at.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(at.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(at.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),at.prototype.join=function(u){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(Q).join(u)},at.prototype.multiply=function(u){var b=u.sx*this.sx+u.shy*this.shx,R=u.sx*this.shy+u.shy*this.sy,$=u.shx*this.sx+u.sy*this.shx,re=u.shx*this.shy+u.sy*this.sy,ve=u.tx*this.sx+u.ty*this.shx+this.tx,Le=u.tx*this.shy+u.ty*this.sy+this.ty;return new at(b,R,$,re,ve,Le)},at.prototype.decompose=function(){var u=this.sx,b=this.shy,R=this.shx,$=this.sy,re=this.tx,ve=this.ty,Le=Math.sqrt(u*u+b*b),$e=(u/=Le)*R+(b/=Le)*$;R-=u*$e,$-=b*$e;var ze=Math.sqrt(R*R+$*$);return $e/=ze,u*($/=ze)<b*(R/=ze)&&(u=-u,b=-b,$e=-$e,Le=-Le),{scale:new at(Le,0,0,ze,0,0),translate:new at(1,0,0,1,re,ve),rotate:new at(u,b,-b,u,0,0),skew:new at(1,0,$e,1,0,0)}},at.prototype.toString=function(u){return this.join(" ")},at.prototype.inversed=function(){var u=this.sx,b=this.shy,R=this.shx,$=this.sy,re=this.tx,ve=this.ty,Le=1/(u*$-b*R),$e=$*Le,ze=-b*Le,ft=-R*Le,gt=u*Le;return new at($e,ze,ft,gt,-$e*re-ft*ve,-ze*re-gt*ve)},at.prototype.applyToPoint=function(u){var b=u.x*this.sx+u.y*this.shx+this.tx,R=u.x*this.shy+u.y*this.sy+this.ty;return new qi(b,R)},at.prototype.applyToRectangle=function(u){var b=this.applyToPoint(u),R=this.applyToPoint(new qi(u.x+u.w,u.y+u.h));return new Ka(b.x,b.y,R.x-b.x,R.y-b.y)},at.prototype.clone=function(){var u=this.sx,b=this.shy,R=this.shx,$=this.sy,re=this.tx,ve=this.ty;return new at(u,b,R,$,re,ve)},p.Matrix=at;var _n=p.matrixMult=function(u,b){return b.multiply(u)},An=new at(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=An;var Wr=function(u,b){if(!Bt[u]){var R=(b instanceof ta?"Sh":"P")+(Object.keys(et).length+1).toString(10);b.id=R,Bt[u]=R,et[R]=b,Et.publish("addPattern",b)}};p.ShadingPattern=ta,p.TilingPattern=Ra,p.addShadingPattern=function(u,b){return q("addShadingPattern()"),Wr(u,b),this},p.beginTilingPattern=function(u){q("beginTilingPattern()"),Ja(u.boundingBox[0],u.boundingBox[1],u.boundingBox[2]-u.boundingBox[0],u.boundingBox[3]-u.boundingBox[1],u.matrix)},p.endTilingPattern=function(u,b){q("endTilingPattern()"),b.stream=Ie[z].join(`
4`),Wr(u,b),Et.publish("endTilingPattern",b),fn.pop().restore()};var Tr,er=p.__private__.newObject=function(){var u=sr();return vr(u,!0),u},sr=p.__private__.newObjectDeferred=function(){return te++,se[te]=function(){return ge},te},vr=function(u,b){return b=typeof b=="boolean"&&b,se[u]=ge,b&&B(u+" 0 obj"),u},Kn=p.__private__.newAdditionalObject=function(){var u={objId:sr(),content:""};return xe.push(u),u},Bn=sr(),Qr=sr(),hn=p.__private__.decodeColorString=function(u){var b=u.split(" ");if(b.length!==2||b[1]!=="g"&&b[1]!=="G")b.length!==5||b[4]!=="k"&&b[4]!=="K"||(b=[(1-b[0])*(1-b[3]),(1-b[1])*(1-b[3]),(1-b[2])*(1-b[3]),"r"]);else{var R=parseFloat(b[0]);b=[R,R,R,"r"]}for(var $="#",re=0;re<3;re++)$+=("0"+Math.floor(255*parseFloat(b[re])).toString(16)).slice(-2);return $},en=p.__private__.encodeColorString=function(u){var b;typeof u=="string"&&(u={ch1:u});var R=u.ch1,$=u.ch2,re=u.ch3,ve=u.ch4,Le=u.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof R=="string"&&R.charAt(0)!=="#"){var $e=new df(R);if($e.ok)R=$e.toHex();else if(!/^\d*\.?\d*$/.test(R))throw new Error('Invalid color "'+R+'" passed to jsPDF.encodeColorString.')}if(typeof R=="string"&&/^#[0-9A-Fa-f]{3}$/.test(R)&&(R="#"+R[1]+R[1]+R[2]+R[2]+R[3]+R[3]),typeof R=="string"&&/^#[0-9A-Fa-f]{6}$/.test(R)){var ze=parseInt(R.substr(1),16);R=ze>>16&255,$=ze>>8&255,re=255&ze}if($===void 0||ve===void 0&&R===$&&$===re)b=typeof R=="string"?R+" "+Le[0]:u.precision===2?v(R/255)+" "+Le[0]:I(R/255)+" "+Le[0];else if(ve===void 0||qt(ve)==="object"){if(ve&&!isNaN(ve.a)&&ve.a===0)return["1.","1.","1.",Le[1]].join(" ");b=typeof R=="string"?[R,$,re,Le[1]].join(" "):u.precision===2?[v(R/255),v($/255),v(re/255),Le[1]].join(" "):[I(R/255),I($/255),I(re/255),Le[1]].join(" ")}else b=typeof R=="string"?[R,$,re,ve,Le[2]].join(" "):u.precision===2?[v(R),v($),v(re),v(ve),Le[2]].join(" "):[I(R),I($),I(re),I(ve),Le[2]].join(" ");return b},$r=p.__private__.getFilters=function(){return d},Gr=p.__private__.putStream=function(u){var b=(u=u||{}).data||"",R=u.filters||$r(),$=u.alreadyAppliedFilters||[],re=u.addLength1||!1,ve=b.length,Le=u.objectId,$e=function(Xt){return Xt};if(m!==null&&Le===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");m!==null&&($e=Lr.encryptor(Le,0));var ze={};R===!0&&(R=["FlateEncode"]);var ft=u.additionalKeyValues||[],gt=(ze=Ze.API.processDataByFilters!==void 0?Ze.API.processDataByFilters(b,R):{data:b,reverseChain:[]}).reverseChain+(Array.isArray($)?$.join(" "):$.toString());if(ze.data.length!==0&&(ft.push({key:"Length",value:ze.data.length}),re===!0&&ft.push({key:"Length1",value:ve})),gt.length!=0)if(gt.split("/").length-1==1)ft.push({key:"Filter",value:gt});else{ft.push({key:"Filter",value:"["+gt+"]"});for(var Pt=0;Pt<ft.length;Pt+=1)if(ft[Pt].key==="DecodeParms"){for(var mr=[],zt=0;zt<ze.reverseChain.split("/").length-1;zt+=1)mr.push("null");mr.push(ft[Pt].value),ft[Pt].value="["+mr.join(" ")+"]"}}B("<<");for(var Ut=0;Ut<ft.length;Ut++)B("/"+ft[Ut].key+" "+ft[Ut].value);B(">>"),ze.data.length!==0&&(B("stream"),B($e(ze.data)),B("endstream"))},Jn=p.__private__.putPage=function(u){var b=u.number,R=u.data,$=u.objId,re=u.contentsObjId;vr($,!0),B("<</Type /Page"),B("/Parent "+u.rootDictionaryObjId+" 0 R"),B("/Resources "+u.resourceDictionaryObjId+" 0 R"),B("/MediaBox ["+parseFloat(Q(u.mediaBox.bottomLeftX))+" "+parseFloat(Q(u.mediaBox.bottomLeftY))+" "+Q(u.mediaBox.topRightX)+" "+Q(u.mediaBox.topRightY)+"]"),u.cropBox!==null&&B("/CropBox ["+Q(u.cropBox.bottomLeftX)+" "+Q(u.cropBox.bottomLeftY)+" "+Q(u.cropBox.topRightX)+" "+Q(u.cropBox.topRightY)+"]"),u.bleedBox!==null&&B("/BleedBox ["+Q(u.bleedBox.bottomLeftX)+" "+Q(u.bleedBox.bottomLeftY)+" "+Q(u.bleedBox.topRightX)+" "+Q(u.bleedBox.topRightY)+"]"),u.trimBox!==null&&B("/TrimBox ["+Q(u.trimBox.bottomLeftX)+" "+Q(u.trimBox.bottomLeftY)+" "+Q(u.trimBox.topRightX)+" "+Q(u.trimBox.topRightY)+"]"),u.artBox!==null&&B("/ArtBox ["+Q(u.artBox.bottomLeftX)+" "+Q(u.artBox.bottomLeftY)+" "+Q(u.artBox.topRightX)+" "+Q(u.artBox.topRightY)+"]"),typeof u.userUnit=="number"&&u.userUnit!==1&&B("/UserUnit "+u.userUnit),Et.publish("putPage",{objId:$,pageContext:rt[b],pageNumber:b,page:R}),B("/Contents "+re+" 0 R"),B(">>"),B("endobj");var ve=R.join(`
5`);return W===V&&(ve+=`
6Q`),vr(re,!0),Gr({data:ve,filters:$r(),objectId:re}),B("endobj"),$},j=p.__private__.putPages=function(){var u,b,R=[];for(u=1;u<=St;u++)rt[u].objId=sr(),rt[u].contentsObjId=sr();for(u=1;u<=St;u++)R.push(Jn({number:u,data:Ie[u],objId:rt[u].objId,contentsObjId:rt[u].contentsObjId,mediaBox:rt[u].mediaBox,cropBox:rt[u].cropBox,bleedBox:rt[u].bleedBox,trimBox:rt[u].trimBox,artBox:rt[u].artBox,userUnit:rt[u].userUnit,rootDictionaryObjId:Bn,resourceDictionaryObjId:Qr}));vr(Bn,!0),B("<</Type /Pages");var $="/Kids [";for(b=0;b<St;b++)$+=R[b]+" 0 R ";B($+"]"),B("/Count "+St),B(">>"),B("endobj"),Et.publish("postPutPages")},P=function(u){Et.publish("putFont",{font:u,out:B,newObject:er,putStream:Gr}),u.isAlreadyPutted!==!0&&(u.objectNumber=er(),B("<<"),B("/Type /Font"),B("/BaseFont /"+Oa(u.postScriptName)),B("/Subtype /Type1"),typeof u.encoding=="string"&&B("/Encoding /"+u.encoding),B("/FirstChar 32"),B("/LastChar 255"),B(">>"),B("endobj"))},Se=function(u){u.objectNumber=er();var b=[];b.push({key:"Type",value:"/XObject"}),b.push({key:"Subtype",value:"/Form"}),b.push({key:"BBox",value:"["+[Q(u.x),Q(u.y),Q(u.x+u.width),Q(u.y+u.height)].join(" ")+"]"}),b.push({key:"Matrix",value:"["+u.matrix.toString()+"]"});var R=u.pages[1].join(`
7`);Gr({data:R,additionalKeyValues:b,objectId:u.objectNumber}),B("endobj")},K=function(u,b){b||(b=21);var R=er(),$=(function(Le,$e){var ze,ft=[],gt=1/($e-1);for(ze=0;ze<1;ze+=gt)ft.push(ze);if(ft.push(1),Le[0].offset!=0){var Pt={offset:0,color:Le[0].color};Le.unshift(Pt)}if(Le[Le.length-1].offset!=1){var mr={offset:1,color:Le[Le.length-1].color};Le.push(mr)}for(var zt="",Ut=0,Xt=0;Xt<ft.length;Xt++){for(ze=ft[Xt];ze>Le[Ut+1].offset;)Ut++;var rr=Le[Ut].offset,nr=(ze-rr)/(Le[Ut+1].offset-rr),Ir=Le[Ut].color,ni=Le[Ut+1].color;zt+=J(Math.round((1-nr)*Ir[0]+nr*ni[0]).toString(16))+J(Math.round((1-nr)*Ir[1]+nr*ni[1]).toString(16))+J(Math.round((1-nr)*Ir[2]+nr*ni[2]).toString(16))}return zt.trim()})(u.colors,b),re=[];re.push({key:"FunctionType",value:"0"}),re.push({key:"Domain",value:"[0.0 1.0]"}),re.push({key:"Size",value:"["+b+"]"}),re.push({key:"BitsPerSample",value:"8"}),re.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),re.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Gr({data:$,additionalKeyValues:re,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:R}),B("endobj"),u.objectNumber=er(),B("<< /ShadingType "+u.type),B("/ColorSpace /DeviceRGB");var ve="/Coords ["+Q(parseFloat(u.coords[0]))+" "+Q(parseFloat(u.coords[1]))+" ";u.type===2?ve+=Q(parseFloat(u.coords[2]))+" "+Q(parseFloat(u.coords[3])):ve+=Q(parseFloat(u.coords[2]))+" "+Q(parseFloat(u.coords[3]))+" "+Q(parseFloat(u.coords[4]))+" "+Q(parseFloat(u.coords[5])),B(ve+="]"),u.matrix&&B("/Matrix ["+u.matrix.toString()+"]"),B("/Function "+R+" 0 R"),B("/Extend [true true]"),B(">>"),B("endobj")},Ce=function(u,b){var R=sr(),$=er();b.push({resourcesOid:R,objectOid:$}),u.objectNumber=$;var re=[];re.push({key:"Type",value:"/Pattern"}),re.push({key:"PatternType",value:"1"}),re.push({key:"PaintType",value:"1"}),re.push({key:"TilingType",value:"1"}),re.push({key:"BBox",value:"["+u.boundingBox.map(Q).join(" ")+"]"}),re.push({key:"XStep",value:Q(u.xStep)}),re.push({key:"YStep",value:Q(u.yStep)}),re.push({key:"Resources",value:R+" 0 R"}),u.matrix&&re.push({key:"Matrix",value:"["+u.matrix.toString()+"]"}),Gr({data:u.stream,additionalKeyValues:re,objectId:u.objectNumber}),B("endobj")},Ee=function(u){for(var b in u.objectNumber=er(),B("<<"),u)switch(b){case"opacity":B("/ca "+v(u[b]));break;case"stroke-opacity":B("/CA "+v(u[b]))}B(">>"),B("endobj")},Qe=function(u){vr(u.resourcesOid,!0),B("<<"),B("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),(function(){for(var b in B("/Font <<"),yt)yt.hasOwnProperty(b)&&(_===!1||_===!0&&F.hasOwnProperty(b))&&B("/"+b+" "+yt[b].objectNumber+" 0 R");B(">>")})(),(function(){if(Object.keys(et).length>0){for(var b in B("/Shading <<"),et)et.hasOwnProperty(b)&&et[b]instanceof ta&&et[b].objectNumber>=0&&B("/"+b+" "+et[b].objectNumber+" 0 R");Et.publish("putShadingPatternDict"),B(">>")}})(),(function(b){if(Object.keys(et).length>0){for(var R in B("/Pattern <<"),et)et.hasOwnProperty(R)&&et[R]instanceof p.TilingPattern&&et[R].objectNumber>=0&&et[R].objectNumber<b&&B("/"+R+" "+et[R].objectNumber+" 0 R");Et.publish("putTilingPatternDict"),B(">>")}})(u.objectOid),(function(){if(Object.keys(it).length>0){var b;for(b in B("/ExtGState <<"),it)it.hasOwnProperty(b)&&it[b].objectNumber>=0&&B("/"+b+" "+it[b].objectNumber+" 0 R");Et.publish("putGStateDict"),B(">>")}})(),(function(){for(var b in B("/XObject <<"),Nr)Nr.hasOwnProperty(b)&&Nr[b].objectNumber>=0&&B("/"+b+" "+Nr[b].objectNumber+" 0 R");Et.publish("putXobjectDict"),B(">>")})(),B(">>"),B("endobj")},Jt=function(u){pt[u.fontName]=pt[u.fontName]||{},pt[u.fontName][u.fontStyle]=u.id},Sr=function(u,b,R,$,re){var ve={id:"F"+(Object.keys(yt).length+1).toString(10),postScriptName:u,fontName:b,fontStyle:R,encoding:$,isStandardFont:re||!1,metadata:{}};return Et.publish("addFont",{font:ve,instance:this}),yt[ve.id]=ve,Jt(ve),ve.id},qr=p.__private__.pdfEscape=p.pdfEscape=function(u,b){return(function(R,$){var re,ve,Le,$e,ze,ft,gt,Pt,mr;if(Le=($=$||{}).sourceEncoding||"Unicode",ze=$.outputEncoding,($.autoencode||ze)&&yt[He].metadata&&yt[He].metadata[Le]&&yt[He].metadata[Le].encoding&&($e=yt[He].metadata[Le].encoding,!ze&&yt[He].encoding&&(ze=yt[He].encoding),!ze&&$e.codePages&&(ze=$e.codePages[0]),typeof ze=="string"&&(ze=$e[ze]),ze)){for(gt=!1,ft=[],re=0,ve=R.length;re<ve;
7re++)(Pt=ze[R.charCodeAt(re)])?ft.push(String.fromCharCode(Pt)):ft.push(R[re]),ft[re].charCodeAt(0)>>8&&(gt=!0);R=ft.join("")}for(re=R.length;gt===void 0&&re!==0;)R.charCodeAt(re-1)>>8&&(gt=!0),re--;if(!gt)return R;for(ft=$.noBOM?[]:[254,255],re=0,ve=R.length;re<ve;re++){if((mr=(Pt=R.charCodeAt(re))>>8)>>8)throw new Error("Character at position "+re+" of string '"+R+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");ft.push(mr),ft.push(Pt-(mr<<8))}return String.fromCharCode.apply(void 0,ft)})(u,b).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Xn=p.__private__.beginPage=function(u){Ie[++St]=[],rt[St]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(u[0]),topRightY:Number(u[1])}},Ao(St),Ve(Ie[z])},ua=function(u,b){var R,$,re;switch(t=b||t,typeof u=="string"&&(R=S(u.toLowerCase()),Array.isArray(R)&&($=R[0],re=R[1])),Array.isArray(u)&&($=u[0]*st,re=u[1]*st),isNaN($)&&($=o[0],re=o[1]),($>14400||re>14400)&&(Ht.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),$=Math.min(14400,$),re=Math.min(14400,re)),o=[$,re],t.substr(0,1)){case"l":re>$&&(o=[re,$]);break;case"p":$>re&&(o=[re,$])}Xn(o),Vs(lt),B(ma),Ga!==0&&B(Ga+" J"),vi!==0&&B(vi+" j"),Et.publish("addPage",{pageNumber:St})},Di=function(u){u>0&&u<=St&&(Ie.splice(u,1),rt.splice(u,1),St--,z>St&&(z=St),this.setPage(z))},Ao=function(u){u>0&&u<=St&&(z=u)},No=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return Ie.length-1},So=function(u,b,R){var $,re=void 0;return R=R||{},u=u!==void 0?u:yt[He].fontName,b=b!==void 0?b:yt[He].fontStyle,$=u.toLowerCase(),pt[$]!==void 0&&pt[$][b]!==void 0?re=pt[$][b]:pt[u]!==void 0&&pt[u][b]!==void 0?re=pt[u][b]:R.disableWarning===!1&&Ht.warn("Unable to look up font label for font '"+u+"', '"+b+"'. Refer to getFontList() for available fonts."),re||R.noFallback||(re=pt.times[b])==null&&(re=pt.times.normal),re},Rn=p.__private__.putInfo=function(){var u=er(),b=function($){return $};for(var R in m!==null&&(b=Lr.encryptor(u,0)),B("<<"),B("/Producer ("+qr(b("jsPDF "+Ze.version))+")"),Lt)Lt.hasOwnProperty(R)&&Lt[R]&&B("/"+R.substr(0,1).toUpperCase()+R.substr(1)+" ("+qr(b(Lt[R]))+")");B("/CreationDate ("+qr(b(Y))+")"),B(">>"),B("endobj")},ca=p.__private__.putCatalog=function(u){var b=(u=u||{}).rootDictionaryObjId||Bn;switch(er(),B("<<"),B("/Type /Catalog"),B("/Pages "+b+" 0 R"),tt||(tt="fullwidth"),tt){case"fullwidth":B("/OpenAction [3 0 R /FitH null]");break;case"fullheight":B("/OpenAction [3 0 R /FitV null]");break;case"fullpage":B("/OpenAction [3 0 R /Fit]");break;case"original":B("/OpenAction [3 0 R /XYZ null null 1]");break;default:var R=""+tt;R.substr(R.length-1)==="%"&&(tt=parseInt(tt)/100),typeof tt=="number"&&B("/OpenAction [3 0 R /XYZ null null "+v(tt)+"]")}switch(xt||(xt="continuous"),xt){case"continuous":B("/PageLayout /OneColumn");break;case"single":B("/PageLayout /SinglePage");break;case"two":case"twoleft":B("/PageLayout /TwoColumnLeft");break;case"tworight":B("/PageLayout /TwoColumnRight")}Je&&B("/PageMode /"+Je),Et.publish("putCatalog"),B(">>"),B("endobj")},Bs=p.__private__.putTrailer=function(){B("trailer"),B("<<"),B("/Size "+(te+1)),B("/Root "+te+" 0 R"),B("/Info "+(te-1)+" 0 R"),m!==null&&B("/Encrypt "+Lr.oid+" 0 R"),B("/ID [ <"+ie+"> <"+ie+"> ]"),B(">>")},pr=p.__private__.putHeader=function(){B("%PDF-"+E),B("%ºß¬à")},xo=p.__private__.putXRef=function(){var u="0000000000";B("xref"),B("0 "+(te+1)),B("0000000000 65535 f ");for(var b=1;b<=te;b++)typeof se[b]=="function"?B((u+se[b]()).slice(-10)+" 00000 n "):se[b]!==void 0?B((u+se[b]).slice(-10)+" 00000 n "):B("0000000000 00000 n ")},Mn=p.__private__.buildDocument=function(){var u;te=0,ge=0,pe=[],se=[],xe=[],Bn=sr(),Qr=sr(),Ve(pe),Et.publish("buildDocument"),pr(),j(),(function(){Et.publish("putAdditionalObjects");for(var R=0;R<xe.length;R++){var $=xe[R];vr($.objId,!0),B($.content),B("endobj")}Et.publish("postPutAdditionalObjects")})(),u=[],(function(){for(var R in yt)yt.hasOwnProperty(R)&&(_===!1||_===!0&&F.hasOwnProperty(R))&&P(yt[R])})(),(function(){var R;for(R in it)it.hasOwnProperty(R)&&Ee(it[R])})(),(function(){for(var R in Nr)Nr.hasOwnProperty(R)&&Se(Nr[R])})(),(function(R){var $;for($ in et)et.hasOwnProperty($)&&(et[$]instanceof ta?K(et[$]):et[$]instanceof Ra&&Ce(et[$],R))})(u),Et.publish("putResources"),u.forEach(Qe),Qe({resourcesOid:Qr,objectOid:Number.MAX_SAFE_INTEGER}),Et.publish("postPutResources"),m!==null&&(Lr.oid=er(),B("<<"),B("/Filter /Standard"),B("/V "+Lr.v),B("/R "+Lr.r),B("/U <"+Lr.toHexString(Lr.U)+">"),B("/O <"+Lr.toHexString(Lr.O)+">"),B("/P "+Lr.P),B(">>"),B("endobj")),Rn(),ca();var b=ge;return xo(),Bs(),B("startxref"),B(""+b),B("%%EOF"),Ve(Ie[z]),pe.join(`
8`)},da=p.__private__.getBlob=function(u){return new Blob([ot(u)],{type:"application/pdf"})},Ha=function(u){for(;u.firstChild;)u.removeChild(u.firstChild)},tn=function(u){var b,R=u.document,$=R.documentElement,re=R.head,ve=R.body;return re||(re=R.createElement("head"),$.appendChild(re)),ve||(ve=R.createElement("body"),$.appendChild(ve)),Ha(re),Ha(ve),(b=R.createElement("style")).appendChild(R.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),re.appendChild(b),{document:R,body:ve}},fa=p.output=p.__private__.output=(Tr=function(u,b){switch(typeof(b=b||{})=="string"?b={filename:b}:b.filename=b.filename||"generated.pdf",u){case void 0:return Mn();case"save":p.save(b.filename);break;case"arraybuffer":return ot(Mn());case"blob":return da(Mn());case"bloburi":case"bloburl":if(ut.URL!==void 0&&typeof ut.URL.createObjectURL=="function")return ut.URL&&ut.URL.createObjectURL(da(Mn()))||void 0;Ht.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var R="",$=Mn();try{R=td($)}catch{R=td(unescape(encodeURIComponent($)))}return"data:application/pdf;filename="+encodeURIComponent(b.filename)+";base64,"+R;case"pdfobjectnewwindow":if(Object.prototype.toString.call(ut)==="[object Window]"){var re="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",ve=!b.pdfObjectUrl;ve||(re=b.pdfObjectUrl);var Le=ut.open();if(Le!==null){var $e=tn(Le),ze=$e.document.createElement("script"),ft=this;ze.src=re,ve&&(ze.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",ze.crossOrigin="anonymous"),ze.onload=function(){Le.PDFObject.embed(ft.output("dataurlstring"),b)},$e.body.appendChild(ze)}return Le}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(ut)==="[object Window]"){var gt=b.pdfJsUrl||"examples/PDF.js/web/viewer.html",Pt=ut.open();if(Pt!==null){var mr=tn(Pt),zt=mr.document.createElement("iframe"),Ut=gt.indexOf("?")===-1?"?":"&";ft=this,zt.id="pdfViewer",zt.width="500px",zt.height="400px",zt.src=gt+Ut+"file=&downloadName="+encodeURIComponent(b.filename),zt.onload=function(){Pt.document.title=b.filename,zt.contentWindow.PDFViewerApplication.open(ft.output("bloburl"))},mr.body.appendChild(zt)}return Pt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(ut)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Xt=ut.open();if(Xt!==null){var rr=tn(Xt),nr=rr.document.createElement("iframe");nr.src=this.output("datauristring",b),rr.body.appendChild(nr),Xt.document.title=b.filename}if(Xt||typeof safari>"u")return Xt;break;case"datauri":case"dataurl":return ut.document.location.href=this.output("datauristring",b);default:return null}},Tr.foo=function(){try{return Tr.apply(this,arguments)}catch(R){var u=R.stack||"";~u.indexOf(" at ")&&(u=u.split(" at ")[1]);var b="Error in function "+u.split(`
9`)[0].split("<")[0]+": "+R.message;if(!ut.console)throw new Error(b);ut.console.error(b,R),ut.alert&&alert(b)}},Tr.foo.bar=Tr,Tr.foo),Zn=function(u){return Array.isArray(dn)===!0&&dn.indexOf(u)>-1};switch(n){case"pt":st=1;break;case"mm":st=72/25.4;break;case"cm":st=72/2.54;break;case"in":st=72;break;case"px":st=Zn("px_scaling")==1?.75:96/72;break;case"pc":case"em":st=12;break;case"ex":st=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);st=n}var Lr=null;_e(),Z();var Lo=p.__private__.getPageInfo=p.getPageInfo=function(u){if(isNaN(u)||u%1!=0)throw new Error("Invalid argument passed to 
9jsPDF.getPageInfo");return{objId:rt[u].objId,pageNumber:u,pageContext:rt[u]}},Rs=p.__private__.getPageInfoByObjId=function(u){if(isNaN(u)||u%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var b in rt)if(rt[b].objId===u)break;return Lo(b)},Ms=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:rt[z].objId,pageNumber:z,pageContext:rt[z]}};p.addPage=function(){return ua.apply(this,arguments),this},p.setPage=function(){return Ao.apply(this,arguments),Ve.call(this,Ie[z]),this},p.insertPage=function(u){return this.addPage(),this.movePage(z,u),this},p.movePage=function(u,b){var R,$;if(u>b){R=Ie[u],$=rt[u];for(var re=u;re>b;re--)Ie[re]=Ie[re-1],rt[re]=rt[re-1];Ie[b]=R,rt[b]=$,this.setPage(b)}else if(u<b){R=Ie[u],$=rt[u];for(var ve=u;ve<b;ve++)Ie[ve]=Ie[ve+1],rt[ve]=rt[ve+1];Ie[b]=R,rt[b]=$,this.setPage(b)}return this},p.deletePage=function(){return Di.apply(this,arguments),this},p.__private__.text=p.text=function(u,b,R,$,re){var ve,Le,$e,ze,ft,gt,Pt,mr,zt,Ut=($=$||{}).scope||this;if(typeof u=="number"&&typeof b=="number"&&(typeof R=="string"||Array.isArray(R))){var Xt=R;R=b,b=u,u=Xt}if(arguments[3]instanceof at==0?($e=arguments[4],ze=arguments[5],qt(Pt=arguments[3])==="object"&&Pt!==null||(typeof $e=="string"&&(ze=$e,$e=null),typeof Pt=="string"&&(ze=Pt,Pt=null),typeof Pt=="number"&&($e=Pt,Pt=null),$={flags:Pt,angle:$e,align:ze})):(q("The transform parameter of text() with a Matrix value"),zt=re),isNaN(b)||isNaN(R)||u==null)throw new Error("Invalid arguments passed to jsPDF.text");if(u.length===0)return Ut;var rr,nr="",Ir=typeof $.lineHeightFactor=="number"?$.lineHeightFactor:Ti,ni=Ut.internal.scaleFactor;function Xa(Gt){return Gt=Gt.split("	").join(Array($.TabLen||9).join(" ")),qr(Gt,Pt)}function Ui(Gt){for(var Yt,lr=Gt.concat(),yr=[],ai=lr.length;ai--;)typeof(Yt=lr.shift())=="string"?yr.push(Yt):Array.isArray(Gt)&&(Yt.length===1||Yt[1]===void 0&&Yt[2]===void 0)?yr.push(Yt[0]):yr.push([Yt[0],Yt[1],Yt[2]]);return yr}function zi(Gt,Yt){var lr;if(typeof Gt=="string")lr=Yt(Gt)[0];else if(Array.isArray(Gt)){for(var yr,ai,no=Gt.concat(),ka=[],Mo=no.length;Mo--;)typeof(yr=no.shift())=="string"?ka.push(Yt(yr)[0]):Array.isArray(yr)&&typeof yr[0]=="string"&&(ai=Yt(yr[0],yr[1],yr[2]),ka.push([ai[0],ai[1],ai[2]]));lr=ka}return lr}var yi=!1,Vi=!0;if(typeof u=="string")yi=!0;else if(Array.isArray(u)){var ba=u.concat();Le=[];for(var wa,Cr=ba.length;Cr--;)(typeof(wa=ba.shift())!="string"||Array.isArray(wa)&&typeof wa[0]!="string")&&(Vi=!1);yi=Vi}if(yi===!1)throw new Error('Type of text must be string or Array. "'+u+'" is not recognized.');typeof u=="string"&&(u=u.match(/[\r?\n]/)?u.split(/\r\n|\r|\n/g):[u]);var Hi=ke/Ut.internal.scaleFactor,Wi=Hi*(Ir-1);switch($.baseline){case"bottom":R-=Wi;break;case"top":R+=Hi-Wi;break;case"hanging":R+=Hi-2*Wi;break;case"middle":R+=Hi/2-Wi}if((gt=$.maxWidth||0)>0&&(typeof u=="string"?u=Ut.splitTextToSize(u,gt):Object.prototype.toString.call(u)==="[object Array]"&&(u=u.reduce(function(Gt,Yt){return Gt.concat(Ut.splitTextToSize(Yt,gt))},[]))),ve={text:u,x:b,y:R,options:$,mutex:{pdfEscape:qr,activeFontKey:He,fonts:yt,activeFontSize:ke}},Et.publish("preProcessText",ve),u=ve.text,$e=($=ve.options).angle,zt instanceof at==0&&$e&&typeof $e=="number"){$e*=Math.PI/180,$.rotationDirection===0&&($e=-$e),W===V&&($e=-$e);var Za=Math.cos($e),qn=Math.sin($e);zt=new at(Za,qn,-qn,Za,0,0)}else $e&&$e instanceof at&&(zt=$e);W!==V||zt||(zt=An),(ft=$.charSpace||ga)!==void 0&&(nr+=Q(U(ft))+` Tc
10`,this.setCharSpace(this.getCharSpace()||0)),(mr=$.horizontalScale)!==void 0&&(nr+=Q(100*mr)+` Tz
11`),$.lang;var jr=-1,Bo=$.renderingMode!==void 0?$.renderingMode:$.stroke,_a=Ut.internal.getCurrentPageInfo().pageContext;switch(Bo){case 0:case!1:case"fill":jr=0;break;case 1:case!0:case"stroke":jr=1;break;case 2:case"fillThenStroke":jr=2;break;case 3:case"invisible":jr=3;break;case 4:case"fillAndAddForClipping":jr=4;break;case 5:case"strokeAndAddPathForClipping":jr=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":jr=6;break;case 7:case"addToPathForClipping":jr=7}var Ro=_a.usedRenderingMode!==void 0?_a.usedRenderingMode:-1;jr!==-1?nr+=jr+` Tr
12`:Ro!==-1&&(nr+=`0 Tr
13`),jr!==-1&&(_a.usedRenderingMode=jr),ze=$.align||"left";var pn,$i=ke*Ir,Qa=Ut.internal.pageSize.getWidth(),Aa=yt[He];ft=$.charSpace||ga,gt=$.maxWidth||0,Pt=Object.assign({autoencode:!0,noBOM:!0},$.flags);var Gi=[],eo=function(Gt){return Ut.getStringUnitWidth(Gt,{font:Aa,charSpace:ft,fontSize:ke,doKerning:!1})*ke/ni};if(Object.prototype.toString.call(u)==="[object Array]"){var Ur;Le=Ui(u),ze!=="left"&&(pn=Le.map(eo));var Yr,Na=0;if(ze==="right"){b-=pn[0],u=[],Cr=Le.length;for(var bi=0;bi<Cr;bi++)bi===0?(Yr=Qn(b),Ur=ei(R)):(Yr=U(Na-pn[bi]),Ur=-$i),u.push([Le[bi],Yr,Ur]),Na=pn[bi]}else if(ze==="center"){b-=pn[0]/2,u=[],Cr=Le.length;for(var wi=0;wi<Cr;
vendor: 4,343 bytes, lines 13-23
13wi++)wi===0?(Yr=Qn(b),Ur=ei(R)):(Yr=U((Na-pn[wi])/2),Ur=-$i),u.push([Le[wi],Yr,Ur]),Na=pn[wi]}else if(ze==="left"){u=[],Cr=Le.length;for(var Sa=0;Sa<Cr;Sa++)u.push(Le[Sa])}else if(ze==="justify"&&Aa.encoding==="Identity-H"){u=[],Cr=Le.length,gt=gt!==0?gt:Qa;for(var Yi=0,gr=0;gr<Cr;gr++)if(Ur=gr===0?ei(R):-$i,Yr=gr===0?Qn(b):Yi,gr<Cr-1){var Xs=U((gt-pn[gr])/(Le[gr].split(" ").length-1)),jn=Le[gr].split(" ");u.push([jn[0]+" ",Yr,Ur]),Yi=0;for(var Nn=1;Nn<jn.length;Nn++){var Ki=(eo(jn[Nn-1]+" "+jn[Nn])-eo(jn[Nn]))*ni+Xs;Nn==jn.length-1?u.push([jn[Nn],Ki,0]):u.push([jn[Nn]+" ",Ki,0]),Yi-=Ki}}else u.push([Le[gr],Yr,Ur]);u.push(["",Yi,0])}else{if(ze!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(u=[],Cr=Le.length,gt=gt!==0?gt:Qa,gr=0;gr<Cr;gr++){Ur=gr===0?ei(R):-$i,Yr=gr===0?Qn(b):0;var to=Le[gr].split(" ").length-1,ro=to>0?(gt-pn[gr])/to:0;gr<Cr-1?Gi.push(Q(U(ro))):Gi.push(0),u.push([Le[gr],Yr,Ur])}}}(typeof $.R2L=="boolean"?$.R2L:qe)===!0&&(u=zi(u,function(Gt,Yt,lr){return[Gt.split("").reverse().join(""),Yt,lr]})),ve={text:u,x:b,y:R,options:$,mutex:{pdfEscape:qr,activeFontKey:He,fonts:yt,activeFontSize:ke}},Et.publish("postProcessText",ve),u=ve.text,rr=ve.mutex.isHex||!1;var xa=yt[He].encoding;xa!=="WinAnsiEncoding"&&xa!=="StandardEncoding"||(u=zi(u,function(Gt,Yt,lr){return[Xa(Gt),Yt,lr]})),Le=Ui(u),u=[];for(var Ji,Xi,_i,ii=Array.isArray(Le[0])?1:0,Ai="",La=function(Gt,Yt,lr){var yr="";return lr instanceof at?(lr=typeof $.angle=="number"?_n(lr,new at(1,0,0,1,Gt,Yt)):_n(new at(1,0,0,1,Gt,Yt),lr),W===V&&(lr=_n(new at(1,0,0,-1,0,0),lr)),yr=lr.join(" ")+` Tm
14`):yr=Q(Gt)+" "+Q(Yt)+` Td
15`,yr},Er=0;Er<Le.length;Er++){switch(Ai="",ii){case 1:_i=(rr?"<":"(")+Le[Er][0]+(rr?">":")"),Ji=parseFloat(Le[Er][1]),Xi=parseFloat(Le[Er][2]);break;case 0:_i=(rr?"<":"(")+Le[Er]+(rr?">":")"),Ji=Qn(b),Xi=ei(R)}Gi!==void 0&&Gi[Er]!==void 0&&(Ai=Gi[Er]+` Tw
16`),Er===0?u.push(Ai+La(Ji,Xi,zt)+_i):ii===0?u.push(Ai+_i):ii===1&&u.push(Ai+La(Ji,Xi,zt)+_i)}u=ii===0?u.join(` Tj
17T* `):u.join(` Tj
18`),u+=` Tj
19`;var Un=`BT
20/`;return Un+=He+" "+ke+` Tf
21`,Un+=Q(ke*Ir)+` TL
22`,Un+=Tn+`
23`,Un+=nr,Un+=u,B(Un+="ET"),F[He]=!0,Ut};var Ds=p.__private__.clip=p.clip=function(u){return B(u==="evenodd"?"W*":"W"),this};p.clipEvenOdd=function(){return Ds("evenodd")},p.__private__.discardPath=p.discardPath=function(){return B("n"),this};var Dn=p.__private__.isValidStyle=function(u){var b=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(u)!==-1&&(b=!0),b};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(u){return Dn(u)&&(f=u),this};var ko=p.__private__.getStyle=p.getStyle=function(u){var b=f;switch(u){case"D":case"S":b="S";break;case"F":b="f";break;case"FD":case"DF":b="B";break;case"f":case"f*":case"B":case"B*":b=u}return b},ha=p.close=function(){return B("h"),this};p.stroke=function(){return B("S"),this},p.fill=function(u){return pa("f",u),this},p.fillEvenOdd=function(u){return pa("f*",u),this},p.fillStroke=function(u){return pa("B",u),this},p.fillStrokeEvenOdd=function(u){return pa("B*",u),this};var pa=function(u,b){qt(b)==="object"?qs(b,u):B(u)},Wa=function(u){u===null||W===V&&u===void 0||(u=ko(u),B(u))};function Ts(u,b,R,$,re){var ve=new Ra(b||this.boundingBox,R||this.xStep,$||this.yStep,this.gState,re||this.matrix);ve.stream=this.stream;var Le=u+"$$"+this.cloneIndex+++"$$";return Wr(Le,ve),ve}var qs=function(u,b){var R=Bt[u.key],$=et[R];if($ instanceof ta)B("q"),B(js(b)),$.gState&&p.setGState($.gState),B(u.matrix.toString()+" cm"),B("/"+R+" sh"),B("Q");else if($ instanceof Ra){var re=new at(1,0,0,-1,0,ji());u.matrix&&(re=re.multiply(u.matrix||An),R=Ts.call($,u.key,u.boundingBox,u.xStep,u.yStep,re).id),B("q"),B("/Pattern cs"),B("/"+R+" scn"),$.gState&&p.setGState($.gState),B(b),B("Q")}},js=function(u){switch(u){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},mi=p.moveTo=function(u,b){return B(Q(U(u))+" "+Q(T(b))+" m"),this},Fo=p.lineTo=function(u,b){return B(Q(U(u))+" "+Q(T(b))+" l"),this},gi=p.curveTo=function(u,b,R,$,re,ve){return B([Q(U(u)),Q(T(b)),Q(U(R)),Q(T($)),Q(U(re)),Q(T(ve)),"c"].join(" ")),this};p.__private__.line=p.line=function(u,b,R,$,re){if(isNaN(u)||isNaN(b)||isNaN(R)||isNaN($)||!Dn(re))throw new Error("Invalid arguments passed to 
23jsPDF.line");return W===y?this.lines([[R-u,$-b]],u,b,[1,1],re||"S"):this.lines([[R-u,$-b]],u,b,[1,1]).stroke()},p.__private__.lines=p.lines=function(u,b,R,$,re,ve){var Le,$e,ze,ft,gt,Pt,mr,zt,Ut,Xt,rr,nr;if(typeof u=="number"&&(nr=R,R=b,b=u,u=nr),$=$||[1,1],ve=ve||!1,isNaN(b)||isNaN(R)||!Array.isArray(u)||!Array.isArray($)||!Dn(re)||typeof ve!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(mi(b,R),Le=$[0],$e=$[1],ft=u.length,Xt=b,rr=R,ze=0;ze<ft;ze++)(gt=u[ze]).length===2?(Xt=gt[0]*Le+Xt,rr=gt[1]*$e+rr,Fo(Xt,rr)):(Pt=gt[0]*Le+Xt,mr=gt[1]*$e+rr,zt=gt[2]*Le+Xt,Ut=gt[3]*$e+rr,Xt=gt[4]*Le+Xt,rr=gt[5]*$e+rr,gi(Pt,mr,zt,Ut,Xt,rr));return ve&&ha(),Wa(re),this},p.path=function(u){for(var b=0;b<u.length;b++){var R=u[b],$=R.c;switch(R.op){case"m":mi($[0],$[1]);break;case"l":Fo($[0],$[1]);break;case"c":gi.apply(this,$);break;case"h":ha()}}return this},p.__private__.rect=p.rect=function(u,b,R,$,re){if(isNaN(u)||isNaN(b)||isNaN(R)||isNaN($)||!Dn(re))throw new Error("Invalid arguments passed to jsPDF.rect");return W===y&&($=-$),B([Q(U(u)),Q(T(b)),Q(U(R)),Q(U($)),"re"].join(" ")),Wa(re),this},p.__private__.triangle=p.triangle=function(u,b,R,$,re,ve,Le){if(isNaN(u)||isNaN(b)||isNaN(R)||isNaN($)||isNaN(re)||isNaN(ve)||!Dn(Le))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[R-u,$-b],[re-R,ve-$],[u-re,b-ve]],u,b,[1,1],Le,!0),this},p.__private__.roundedRect=p.roundedRect=function(u,b,R,$,re,ve,Le){if(isNaN(u)||isNaN(b)||isNaN(R)||isNaN($)||isNaN(re)||isNaN(ve)||!Dn(Le))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var $e=4/3*(Math.SQRT2-1);return re=Math.min(re,.5*R),ve=Math.min(ve,.5*$),this.lines([[R-2*re,0],[re*$e,0,re,ve-ve*$e,re,ve],[0,$-2*ve],[0,ve*$e,-re*$e,ve,-re,ve],[2*re-R,0],[-re*$e,0,-re,-ve*$e,-re,-ve],[0,2*ve-$],[0,-ve*$e,re*$e,-ve,re,-ve]],u+re,b,[1,1],Le,!0),this},p.__private__.ellipse=p.ellipse=function(u,b,R,$,re){if(isNaN(u)||isNaN(b)||isNaN(R)||isNaN($)||!Dn(re))throw new Error("Invalid arguments passed to jsPDF.ellipse");var ve=4/3*(Math.SQRT2-1)*R,Le=4/3*(Math.SQRT2-1)*$;return mi(u+R,b),gi(u+R,b-Le,u+ve,b-$,u,b-$),gi(u-ve,b-$,u-R,b-Le,u-R,b),gi(u-R,b+Le,u-ve,b+$,u,b+$),gi(u+ve,b+$,u+R,b+Le,u+R,b),Wa(re),this},p.__private__.circle=p.circle=function(u,b,R,$){if(isNaN(u)||isNaN(b)||isNaN(R)||!Dn($))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(u,b,R,R,$)},p.setFont=function(u,b,R){return R&&(b=me(b,R)),He=So(u,b,{disableWarning:!1}),this};var Us=p.__private__.getFont=p.getFont=function(){return yt[So.apply(
vendor: 28,760 bytes, lines 23-31
23p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var u,b,R={};for(u in pt)if(pt.hasOwnProperty(u))for(b in R[u]=[],pt[u])pt[u].hasOwnProperty(b)&&R[u].push(b);return R},p.addFont=function(u,b,R,$,re){var ve=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&ve.indexOf(arguments[3])!==-1?re=arguments[3]:arguments[3]&&ve.indexOf(arguments[3])==-1&&(R=me(R,$)),Sr.call(this,u,b,R,re=re||"Identity-H")};var Ti,lt=r.lineWidth||.200025,zs=p.__private__.getLineWidth=p.getLineWidth=function(){return lt},Vs=p.__private__.setLineWidth=p.setLineWidth=function(u){return lt=u,B(Q(U(u))+" w"),this};p.__private__.setLineDash=Ze.API.setLineDash=Ze.API.setLineDashPattern=function(u,b){if(u=u||[],b=b||0,isNaN(b)||!Array.isArray(u))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return u=u.map(function(R){return Q(U(R))}).join(" "),b=Q(U(b)),B("["+u+"] "+b+" d"),this};var Hs=p.__private__.getLineHeight=p.getLineHeight=function(){return ke*Ti};p.__private__.getLineHeight=p.getLineHeight=function(){return ke*Ti};var Ws=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(u){return typeof(u=u||1.15)=="number"&&(Ti=u),this},$s=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return Ti};Ws(r.lineHeight);var Qn=p.__private__.getHorizontalCoordinate=function(u){return U(u)},ei=p.__private__.getVerticalCoordinate=function(u){return W===V?u:rt[z].mediaBox.topRightY-rt[z].mediaBox.bottomLeftY-U(u)},Gs=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(u){return Q(Qn(u))},Ys=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(u){return Q(ei(u))},ma=r.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return hn(ma)},p.__private__.setStrokeColor=p.setDrawColor=function(u,b,R,$){return ma=en({ch1:u,ch2:b,ch3:R,ch4:$,pdfColorType:"draw",precision:2}),B(ma),this};var $a=r.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return hn($a)},p.__private__.setFillColor=p.setFillColor=function(u,b,R,$){return $a=en({ch1:u,ch2:b,ch3:R,ch4:$,pdfColorType:"fill",precision:2}),B($a),this};var Tn=r.textColor||"0 g",Ks=p.__private__.getTextColor=p.getTextColor=function(){return hn(Tn)};p.__private__.setTextColor=p.setTextColor=function(u,b,R,$){return Tn=en({ch1:u,ch2:b,ch3:R,ch4:$,pdfColorType:"text",precision:3}),this};var ga=r.charSpace,Js=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(ga||0)};p.__private__.setCharSpace=p.setCharSpace=function(u){if(isNaN(u))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return ga=u,this};var Ga=0;p.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},p.__private__.setLineCap=p.setLineCap=function(u){var b=p.CapJoinStyles[u];if(b===void 0)throw new Error("Line cap style of '"+u+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Ga=b,B(b+" J"),this};var vi=0;p.__private__.setLineJoin=p.setLineJoin=function(u){var b=p.CapJoinStyles[u];if(b===void 0)throw new Error("Line join style of '"+u+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return vi=b,B(b+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(u){if(u=u||0,isNaN(u))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return B(Q(U(u))+" M"),this},p.GState=Ps,p.setGState=function(u){(u=typeof u=="string"?it[dt[u]]:Ya(null,u)).equals($t)||(B("/"+u.id+" gs"),$t=u)};var Ya=function(u,b){if(!u||!dt[u]){var R=!1;for(var $ in it)if(it.hasOwnProperty($)&&it[$].equals(b)){R=!0;break}if(R)b=it[$];else{var re="GS"+(Object.keys(it).length+1).toString(10);it[re]=b,b.id=re}return u&&(dt[u]=b.id),Et.publish("addGState",b),b}};p.addGState=function(u,b){return Ya(u,b),this},p.saveGraphicsState=function(){return B("q"),Wt.push({key:He,size:ke,color:Tn}),this},p.restoreGraphicsState=function(){B("Q");var u=Wt.pop();return He=u.key,ke=u.size,Tn=u.color,$t=null,this},p.setCurrentTransformationMatrix=function(u){return B(u.toString()+" cm"),this},p.comment=function(u){return B("#"+u),this};var qi=function(u,b){var R=u||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return R},set:function(ve){isNaN(ve)||(R=parseFloat(ve))}});var $=b||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return $},set:function(ve){isNaN(ve)||($=parseFloat(ve))}});var re="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return re},set:function(ve){re=ve.toString()}}),this},Ka=function(u,b,R,$){qi.call(this,u,b),this.type="rect";var re=R||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return re},set:function(Le){isNaN(Le)||(re=parseFloat(Le))}});var ve=$||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return ve},set:function(Le){isNaN(Le)||(ve=parseFloat(Le))}}),this},va=function(){this.page=St,this.currentPage=z,this.pages=Ie.slice(0),this.pagesContext=rt.slice(0),this.x=We,this.y=jt,this.matrix=kt,this.width=Po(z),this.height=ri(z),this.outputDestination=Me,this.id="",this.objectNumber=-1};va.prototype.restore=function(){St=this.page,z=this.currentPage,rt=this.pagesContext,Ie=this.pages,We=this.x,jt=this.y,kt=this.matrix,ti(z,this.width),Io(z,this.height),Me=this.outputDestination};var Ja=function(u,b,R,$,re){fn.push(new va),St=z=0,Ie=[],We=u,jt=b,kt=re,Xn([R,$])};for(var ya in p.beginFormObject=function(u,b,R,$,re){return Ja(u,b,R,$,re),this},p.endFormObject=function(u){return(function(b){if(Zr[b])fn.pop().restore();else{var R=new va,$="Xo"+(Object.keys(Nr).length+1).toString(10);R.id=$,Zr[b]=$,Nr[$]=R,Et.publish("addFormObject",R),fn.pop().restore()}})(u),this},p.doFormObject=function(u,b){var R=Nr[Zr[u]];return B("q"),B(b.toString()+" cm"),B("/"+R.id+" Do"),B("Q"),this},p.getFormObject=function(u){var b=Nr[Zr[u]];return{x:b.x,y:b.y,width:b.width,height:b.height,matrix:b.matrix}},p.save=function(u,b){return u=u||"generated.pdf",(b=b||{}).returnPromise=b.returnPromise||!1,b.returnPromise===!1?(ea(da(Mn()),u),typeof ea.unload=="function"&&ut.setTimeout&&setTimeout(ea.unload,911),this):new Promise(function(R,$){try{var re=ea(da(Mn()),u);typeof ea.unload=="function"&&ut.setTimeout&&setTimeout(ea.unload,911),R(re)}catch(ve){$(ve.message)}})},Ze.API)Ze.API.hasOwnProperty(ya)&&(ya==="events"&&Ze.API.events.length?(function(u,b){var R,$,re;for(re=b.length-1;re!==-1;re--)R=b[re][0],$=b[re][1],u.subscribe.apply(u,[R].concat(typeof $=="function"?[$]:$))})(Et,Ze.API.events):p[ya]=Ze.API[ya]);function Po(u){return rt[u].mediaBox.topRightX-rt[u].mediaBox.bottomLeftX}function ti(u,b){rt[u].mediaBox.topRightX=b+rt[u].mediaBox.bottomLeftX}function ri(u){return rt[u].mediaBox.topRightY-rt[u].mediaBox.bottomLeftY}function Io(u,b){rt[u].mediaBox.topRightY=b+rt[u].mediaBox.bottomLeftY}var Co=p.getPageWidth=function(u){return Po(u=u||z)/st},Eo=p.setPageWidth=function(u,b){ti(u,b*st)},ji=p.getPageHeight=function(u){return ri(u=u||z)/st},Oo=p.setPageHeight=function(u,b){Io(u,b*st)};return p.internal={pdfEscape:qr,getStyle:ko,getFont:Us,getFontSize:De,getCharSpace:Js,getTextColor:Ks,getLineHeight:Hs,getLineHeightFactor:$s,getLineWidth:zs,write:we,getHorizontalCoordinate:Qn,getVerticalCoordinate:ei,getCoordinateString:Gs,getVerticalCoordinateString:Ys,collections:{},newObject:er,newAdditionalObject:Kn,newObjectDeferred:sr,newObjectDeferredBegin:vr,getFilters:$r,putStream:Gr,events:Et,scaleFactor:st,pageSize:{getWidth:function(){return Co(z)},setWidth:function(u){Eo(z,u)},getHeight:function(){return ji(z)},setHeight:function(u){Oo(z,u)}},encryptionOptions:m,encryption:Lr,getEncryptor:function(u){return m!==null?Lr.encryptor(u,0):function(b){return b}},output:fa,getNumberOfPages:No,get pages(){return Ie},out:B,f2:v,f3:I,getPageInfo:Lo,getPageInfoByObjId:Rs,getCurrentPageInfo:Ms,getPDFVersion:k,Point:qi,Rectangle:Ka,Matrix:at,hasHotfix:Zn},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return Co(z)},set:function(u){Eo(z,u)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return ji(z)},set:function(u){Oo(z,u)},enumerable:!0,configurable:!0}),(function(u){for(var b=0,R=Ge.length;b<R;b++){var $=Sr.call(this,u[b][0],u[b][1],u[b][2],Ge[b][3],!0);_===!1&&(F[$]=!0);var re=u[b][0].split("-");Jt({id:$,fontName:re[0],fontStyle:re[1]||""})}Et.publish("addFonts",{fonts:yt,dictionary:pt})}).call(p,Ge),He="F1",ua(o,t),Et.publish("initialized"),p}Ea.prototype.lsbFirstWord=function(r){return String.fromCharCode(255&r,r>>8&255,r>>16&255,r>>24&255)},Ea.prototype.toHexString=function(r){return r.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Ea.prototype.hexToBytes=function(r){for(var e=[],t=0;t<r.length;t+=2)e.push(String.fromCharCode(parseInt(r.substr(t,2),16)));return e.join("")},Ea.prototype.processOwnerPassword=function(r,e){return nu(ru(e).substr(0,5),r)},Ea.prototype.encryptor=function(r,e){var t=ru(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&e,e>>8&255)).substr(0,10);return function(n){return nu(t,n)}},Ps.prototype.equals=function(r){var e,t="id,objectNumber,equals";if(!r||qt(r)!==qt(this))return!1;var n=0;for(e in this)if(!(t.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!r.hasOwnProperty(e)||this[e]!==r[e])return!1;n++}for(e in r)r.hasOwnProperty(e)&&t.indexOf(e)<0&&n--;return n===0},Ze.API={events:[]},Ze.version="4.2.1";var or=Ze.API,fu=1,la=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ia=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},oa=function(r){return r.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return"#"+(t.length===1?"0"+t:t)})},mt=function(r){return r.toFixed(2)},Oi=function(r){return r.toFixed(5)};or.__acroform__={};var Xr=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r},ad=function(r){return r*fu},Wn=function(r){var e=new mf,t=Ue.internal.getHeight(r)||0,n=Ue.internal.getWidth(r)||0;return e.BBox=[0,0,Number(mt(n)),Number(mt(t))],e},i2=or.__acroform__.setBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return r|1<<e},a2=or.__acroform__.clearBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return r&~(1<<e)},o2=or.__acroform__.getBit=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return r&1<<e?1:0},dr=or.__acroform__.getBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return o2(r,e-1)},fr=or.__acroform__.setBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return i2(r,e-1)},hr=or.__acroform__.clearBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return a2(r,e-1)},s2=or.__acroform__.calculateCoordinates=function(r,e){var t=e.internal.getHorizontalCoordinate,n=e.internal.getVerticalCoordinate,o=r[0],i=r[1],d=r[2],l=r[3],c={};return c.lowerLeft_X=t(o)||0,c.lowerLeft_Y=n(i+l)||0,c.upperRight_X=t(o+d)||0,c.upperRight_Y=n(i)||0,[Number(mt(c.lowerLeft_X)),Number(mt(c.lowerLeft_Y)),Number(mt(c.upperRight_X)),Number(mt(c.upperRight_Y))]},l2=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var e=[],t=r._V||r.DV,n=iu(r,t),o=r.scope.internal.getFont(r.fontName,r.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(r.scope.__private__.encodeColorString(r.color)),e.push("/"+o+" "+mt(n.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(n.text),e.push("ET"),e.push("Q"),e.push("EMC");var i=Wn(r);return i.scope=r.scope,i.stream=e.join(`
24`),i}},iu=function(r,e){var t=r.fontSize===0?r.maxFontSize:r.fontSize,n={text:"",fontSize:""},o=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");o=r.multiline?o.map(function(v){return v.split(`
25`)}):o.map(function(v){return[v]});var i=t,d=Ue.internal.getHeight(r)||0;d=d<0?-d:d;var l=Ue.internal.getWidth(r)||0;l=l<0?-l:l;var c=function(v,I,U){if(v+1<o.length){var T=I+" "+o[v+1][0];return ds(T,r,U).width<=l-4}return!1};i++;e:for(;i>0;){e="",i--;var f,m,_=ds("3",r,i).height,F=r.multiline?d-i:(d-_)/2,p=F+=2,E=0,k=0,L=0;if(i<=0){e=`(...) Tj
26`,e+="% Width of Text: "+ds(e,r,i=12).width+", FieldWidth:"+l+`
27`;break}for(var S="",y=0,V=0;V<o.length;V++)if(o.hasOwnProperty(V)){var W=!1;if(o[V].length!==1&&L!==o[V].length-1){if((_+2)*(y+2)+2>d)continue e;S+=o[V][L],W=!0,k=V,V--}else{S=(S+=o[V][L]+" ").substr(S.length-1)==" "?S.substr(0,S.length-1):S;var fe=parseInt(V),Ae=c(fe,S,i),me=V>=o.length-1;if(Ae&&!me){S+=" ",L=0;continue}if(Ae||me){if(me)k=fe;else if(r.multiline&&(_+2)*(y+2)+2>d)continue e}else{if(!r.multiline||(_+2)*(y+2)+2>d)continue e;k=fe}}for(var Q="",q=E;q<=k;q++){var G=o[q];if(r.multiline){if(q===k){Q+=G[L]+" ",L=(L+1)%G.length;continue}if(q===E){Q+=G[G.length-1]+" ";continue}}Q+=G[0]+" "}switch(Q=Q.substr(Q.length-1)==" "?Q.substr(0,Q.length-1):Q,m=ds(Q,r,i).width,r.textAlign){case"right":f=l-m-2;break;case"center":f=(l-m)/2;break;default:f=2}e+=mt(f)+" "+mt(p)+` Td
28`,e+="("+la(Q)+`) Tj
29`,e+=-mt(f)+` 0 Td
30`,p=-(i+2),m=0,E=W?k:k+1,y++,S=""}break}return n.text=e,n.fontSize=i,n},ds=function(r,e,t){var n=e.scope.internal.getFont(e.fontName,e.fontStyle),o=e.scope.getStringUnitWidth(r,{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:e.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:o}},u2={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},c2=function(r,e){var t={type:"reference",object:r};e.internal.getPageInfo(r.page).pageContext.annotations.find(function(n){return n.type===t.type&&n.object===t.object})===void 0&&e.internal.getPageInfo(r.page).pageContext.annotations.push(t)},d2=function(r,e){if(e.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(En.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(u2)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");fu=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new gf,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",function(){(function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})(r)}),r.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var o in n)if(n.hasOwnProperty(o)){var i=n[o];i.objId=void 0,i.hasAnnotation&&c2(i,t)}})(r)}),r.internal.events.subscribe("putCatalog",function(){(function(t){if(t.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(r)}),r.internal.events.subscribe("postPutPages",function(t){(function(n,o){var i=!n;for(var d in n||(o.internal.newObjectDeferredBegin(o.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),o.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||o.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(d)){var l=n[d],c=[],f=l.Rect;if(l.Rect&&(l.Rect=s2(l.Rect,o)),o.internal.newObjectDeferredBegin(l.objId,!0),l.DA=Ue.createDefaultAppearanceStream(l),qt(l)==="object"&&typeof l.getKeyValueListForStream=="function"&&(c=l.getKeyValueListForStream()),l.Rect=f,l.hasAppearanceStream&&!l.appearanceStreamContent){var m=l2(l);c.push({key:"AP",value:"<</N "+m+">>"}),o.internal.acroformPlugin.xForms.push(m)}if(l.appearanceStreamContent){var _="";for(var F in l.appearanceStreamContent)if(l.appearanceStreamContent.hasOwnProperty(F)){var p=l.appearanceStreamContent[F];if(_+="/"+F+" ",_+="<<",Object.keys(p).length>=1||Array.isArray(p)){for(var d in p)if(p.hasOwnProperty(d)){var E=p[d];typeof E=="function"&&(E=E.call(o,l)),_+="/"+d+" "+E+" ",o.internal.acroformPlugin.xForms.indexOf(E)>=0||o.internal.acroformPlugin.xForms.push(E)}}else typeof(E=p)=="function"&&(E=E.call(o,l)),_+="/"+d+" "+E,o.internal.acroformPlugin.xForms.indexOf(E)>=0||o.internal.acroformPlugin.xForms.push(E);_+=">>"}c.push({key:"AP",value:`<<
31`+_+">>"})}o.internal.putStream({additionalKeyValues:c,objectId:l.objId}),o.internal.out("endobj")}i&&(function(k,L){for(var S in k)if(k.hasOwnProperty(S)){var y=S,V=k[S];L.internal.newObjectDeferredBegin(V.objId,!0),qt(V)==="object"&&typeof V.putStream=="function"&&V.putStream(),delete k[y]}})(o.internal.acroformPlugin.xForms,o)})(t,r)}),r.internal.acroformPlugin.isInitialized=!0}},pf=or.__acroform__.arrayToPdfArray=function(r,e,t){var n=function(d){return d};if(Array.isArray(r)){for(var o="[",i=0;i<r.length;i++)switch(i!==0&&(o+=" "),qt(r[i])){case"boolean":case"number":case"object":o+=r[i].toString();break;case"string":r[i].substr(0,1)==="/"?o+="/"+oa(r[i].substr(1)):(e!==void 0&&t&&(n=t.internal.getEncryptor(e)),o+="("+la(n(r[i].toString()))+")")}return o+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},jl=function(r,e,t){var n=function(o){return o};return e!==void 0&&t&&(n=t.internal.getEncryptor(e)),(r=r||"").toString(),"("+la(n(r))+")"},Gn=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(r){this._objId=r}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Gn.prototype.toString=function(){return this.objId+" 0 R"},Gn.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},Gn.prototype.getKeyValueListForStream=function(){var r=[],e=Object.getOwnPropertyNames(this).filter(function(i){return i!="content"&&i!="appearanceStreamContent"&&i!="scope"&&i!="objId"&&i.substring(0,1)!="_"});for(var t in e)if(Object.getOwnPropertyDescriptor(this,e[t]).configurable===!1){var n=e[t],o=this[n];o&&(Array.isArray(o)?r.push({key:n,value:pf(o,this.objId,this.scope)}):o instanceof Gn?(o.scope=this.scope,r.push({key:n,value:o.objId+" 0 R"})):typeof o!="function"&&r.push({key:n,value:o}))}return r};var mf=function(){Gn.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var r,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){r=t.trim()},get:function(){return r||null}})};Xr(mf,Gn);var gf=function(){Gn.call(this);var r,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(r){var t=function(n){return n};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+la(t(r))+")"}},set:function(t){r=t}})};Xr(gf,Gn);var En=function r(){Gn.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute F supplied.');e=S}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!dr(e,3)},set:function(S){S?this.F=fr(e,3):this.F=hr(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(S){if(isNaN(S))throw new Error('Invalid value "'+S+'" for attribute Ff supplied.');t=S}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(S){n=S!==void 0?S:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(S){n[0]=S}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(S){n[1]=S}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(S){n[2]=S}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(S){n[3]=S}});var o="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return o},set:function(S){switch(S){case"/Btn":case"/Tx":case"/Ch":case"/Sig":o=S;break;default:throw new Error('Invalid value "'+S+'" for attribute FT supplied.')}}});var i=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!i||i.length<1){if(this instanceof Is)return;i="FieldObject"+r.FieldNum++}var S=function(y){return y};return this.scope&&(S=this.scope.internal.getEncryptor(this.objId)),"("+la(S(i))+")"},set:function(S){i=S.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return i},set:function(S){i=S}});var d="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return d},set:function(S){d=S}});var l="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return l},set:function(S){l=S}});var c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(S){c=S}});var f=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return f===void 0?50/fu:f},set:function(S){f=S}});var m="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return m},set:function(S){m=S}});var _="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!_||this instanceof Is||this instanceof na))return jl(_,this.objId,this.scope)},set:function(S){S=S.toString(),_=S}});var F=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(F)return this instanceof xr==0?jl(F,this.objId,this.scope):F},set:function(S){S=S.toString(),F=this instanceof xr==0?S.substr(0,1)==="("?Ia(S.substr(1,S.length-2)):Ia(S):S}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof xr==1?Ia(F.substr(1,F.length-1)):F},set:function(S){S=S.toString(),F=this instanceof xr==1?"/"+oa(S):S}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(S){this.V=S}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof xr==0?jl(p,this.objId,this.scope):p},set:function(S){S=S.toString(),p=this instanceof xr==0?S.substr(0,1)==="("?Ia(S.substr(1,S.length-2)):Ia(S):S}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof xr==1?Ia(p.substr(1,p.length-1)):p},set:function(S){S=S.toString(),p=this instanceof xr==1?"/"+oa(S):S}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var E,k=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return k},set:function(S){S=!!S,k=S}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(E)return E},set:function(S){E=S}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,1)},set:function(S){S?this.Ff=fr(this.Ff,1):this.Ff=hr(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,2)},set:function(S){S?this.Ff=fr(this.Ff,2):this.Ff=hr(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,3)},set:function(S){S?this.Ff=fr(this.Ff,3):this.Ff=hr(this.Ff,3)}});var L=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(L!==null)return L},set:function(S){if([0,1,2].indexOf(S)===-1)throw new Error('Invalid value "'+S+'" for attribute Q supplied.');L=S}}),Object.defineProperty(this,"textAlign",{get:function(){var S;switch(L){case 0:default:S="left";break;case 1:S="center";break;case 2:S="right"}return S},configurable:!0,enumerable:!0,set:function(S){switch(S){case"right":case 2:L=2;break;case"center":case 1:L=1;break;default:L=0}}})};Xr(En,Gn);var Ta=function(){En.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var r=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return r},set:function(t){r=t}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return pf(e,this.objId,this.scope)},set:function(t){var n,o;o=[],typeof(n=t)=="string"&&(o=(function(i,d,l){l||(l=1);for(var c,f=[];c=d.exec(i);)f.push(c[l]);return f})(n,/\((.*?)\)/g)),e=o}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,n){for(n=n||!1,t=(t=t||"").toString();e.indexOf(t)!==-1&&(e.splice(e.indexOf(t),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,18)},set:function(t){t?this.Ff=fr(this.Ff,18):this.Ff=hr(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,19)},set:function(t){this.combo===!0&&(t?this.Ff=fr(this.Ff,19):this.Ff=hr(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,20)},set:function(t){t?(this.Ff=fr(this.Ff,20),e.sort()):this.Ff=hr(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,22)},set:function(t){t?this.Ff=fr(this.Ff,22):this.Ff=hr(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,23)},set:function(t){t?this.Ff=fr(this.Ff,23):this.Ff=hr(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,27)},set:function(t){t?this.Ff=fr(this.Ff,27):this.Ff=hr(this.Ff,27)}}),this.hasAppearanceStream=!1};Xr(Ta,En);var qa=function(){Ta.call(this),this.fontName="helvetica",this.combo=!1};Xr(qa,Ta);var ja=function(){qa.call(this),this.combo=!0};Xr(ja,qa);var bs=function(){ja.call(this),this.edit=!0};Xr(bs,ja);var xr=function(){En.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,15)},set:function(t){t?this.Ff=fr(this.Ff,15):this.Ff=hr(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,16)},set:function(t){t?this.Ff=fr(this.Ff,16):this.Ff=hr(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,17)},set:function(t){t?this.Ff=fr(this.Ff,17):this.Ff=hr(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,26)},set:function(t){t?this.Ff=fr(this.Ff,26):this.Ff=hr(this.Ff,26)}});var r,e={};
31Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(i){return i};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var n,o=[];for(n in o.push("<<"),e)o.push("/"+n+" ("+la(t(e[n]))+")");return o.push(">>"),o.join(`
32`)}},set:function(t){qt(t)==="object"&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){typeof t=="string"&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){var n=t==null?"":t.toString();n.substr(0,1)==="/"&&(n=n.substr(1)),r="/"+oa(n)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+oa(t)}})};Xr(xr,En);var ws=function(){xr.call(this),this.pushButton=!0};Xr(ws,xr);var Ua=function(){xr.call(this),this.radio=!0,this.pushButton=!1;var r=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e!==void 0?e:[]}})};Xr(Ua,xr);var Is=function(){var r,e;En.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return r},set:function(o){r=o}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(o){e=o}});var t,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var o=function(l){return l};this.scope&&(o=this.scope.internal.getEncryptor(this.objId));var i,d=[];for(i in d.push("<<"),n)d.push("/"+i+" ("+la(o(n[i]))+")");return d.push(">>"),d.join(`
33`)},set:function(o){qt(o)==="object"&&(n=o)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(o){typeof o=="string"&&(n.CA=o)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(o){var i=o==null?"":o.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),t="/"+oa(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(o){var i=o==null?"":o.toString();i.substr(0,1)==="/"&&(i=i.substr(1)),t="/"+oa(i)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Ue.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Xr(Is,En),Ua.prototype.setAppearance=function(r){if(!("createAppearanceStream"in r)||!("getCA"in r))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var t=this.Kids[e];t.appearanceStreamContent=r.createAppearanceStream(t.optionName),t.caption=r.getCA()}},Ua.prototype.createOption=function(r){var e=new Is;return e.Parent=this,e.optionName=r,this.Kids.push(e),f2.call(this.scope,e),e};var _s=function(){xr.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Ue.CheckBox.createAppearanceStream()};Xr(_s,xr);var na=function(){En.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,13)},set:function(e){e?this.Ff=fr(this.Ff,13):this.Ff=hr(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,21)},set:function(e){e?this.Ff=fr(this.Ff,21):this.Ff=hr(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,23)},set:function(e){e?this.Ff=fr(this.Ff,23):this.Ff=hr(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,24)},set:function(e){e?this.Ff=fr(this.Ff,24):this.Ff=hr(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,25)},set:function(e){e?this.Ff=fr(this.Ff,25):this.Ff=hr(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,26)},set:function(e){e?this.Ff=fr(this.Ff,26):this.Ff=hr(this.Ff,26)}});var r=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return r},set:function(e){Number.isInteger(e)&&(r=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};Xr(na,En);
vendor: 14,970 bytes, lines 33-42
33var As=function(){na.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!dr(this.Ff,14)},set:function(r){r?this.Ff=fr(this.Ff,14):this.Ff=hr(this.Ff,14)}}),this.password=!0};Xr(As,na);var Ue={CheckBox:{createAppearanceStream:function(){return{N:{On:Ue.CheckBox.YesNormal},D:{On:Ue.CheckBox.YesPushDown,Off:Ue.CheckBox.OffPushDown}}},YesPushDown:function(r){var e=Wn(r);e.scope=r.scope;var t=[],n=r.scope.internal.getFont(r.fontName,r.fontStyle).id,o=r.scope.__private__.encodeColorString(r.color),i=iu(r,r.caption);return t.push("0.749023 g"),t.push("0 0 "+mt(Ue.internal.getWidth(r))+" "+mt(Ue.internal.getHeight(r))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+n+" "+mt(i.fontSize)+" Tf "+o),t.push("BT"),t.push(i.text),t.push("ET"),t.push("Q"),t.push("EMC"),e.stream=t.join(`
34`),e},YesNormal:function(r){var e=Wn(r);e.scope=r.scope;var t=r.scope.internal.getFont(r.fontName,r.fontStyle).id,n=r.scope.__private__.encodeColorString(r.color),o=[],i=Ue.internal.getHeight(r),d=Ue.internal.getWidth(r),l=iu(r,r.caption);return o.push("1 g"),o.push("0 0 "+mt(d)+" "+mt(i)+" re"),o.push("f"),o.push("q"),o.push("0 0 1 rg"),o.push("0 0 "+mt(d-1)+" "+mt(i-1)+" re"),o.push("W"),o.push("n"),o.push("0 g"),o.push("BT"),o.push("/"+t+" "+mt(l.fontSize)+" Tf "+n),o.push(l.text),o.push("ET"),o.push("Q"),e.stream=o.join(`
35`),e},OffPushDown:function(r){var e=Wn(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+mt(Ue.internal.getWidth(r))+" "+mt(Ue.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
36`),e}},RadioButton:{Circle:{createAppearanceStream:function(r){var e={D:{Off:Ue.RadioButton.Circle.OffPushDown},N:{}};return e.N[r]=Ue.RadioButton.Circle.YesNormal,e.D[r]=Ue.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(r){var e=Wn(r);e.scope=r.scope;var t=[],n=Ue.internal.getWidth(r)<=Ue.internal.getHeight(r)?Ue.internal.getWidth(r)/4:Ue.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var o=Ue.internal.Bezier_C,i=Number((n*o).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+Oi(Ue.internal.getWidth(r)/2)+" "+Oi(Ue.internal.getHeight(r)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+i+" "+i+" "+n+" 0 "+n+" c"),t.push("-"+i+" "+n+" -"+n+" "+i+" -"+n+" 0 c"),t.push("-"+n+" -"+i+" -"+i+" -"+n+" 0 -"+n+" c"),t.push(i+" -"+n+" "+n+" -"+i+" "+n+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
37`),e},YesPushDown:function(r){var e=Wn(r);e.scope=r.scope;var t=[],n=Ue.internal.getWidth(r)<=Ue.internal.getHeight(r)?Ue.internal.getWidth(r)/4:Ue.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var o=Number((2*n).toFixed(5)),i=Number((o*Ue.internal.Bezier_C).toFixed(5)),d=Number((n*Ue.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Oi(Ue.internal.getWidth(r)/2)+" "+Oi(Ue.internal.getHeight(r)/2)+" cm"),t.push(o+" 0 m"),t.push(o+" "+i+" "+i+" "+o+" 0 "+o+" c"),t.push("-"+i+" "+o+" -"+o+" "+i+" -"+o+" 0 c"),t.push("-"+o+" -"+i+" -"+i+" -"+o+" 0 -"+o+" c"),t.push(i+" -"+o+" "+o+" -"+i+" "+o+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+Oi(Ue.internal.getWidth(r)/2)+" "+Oi(Ue.internal.getHeight(r)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+d+" "+d+" "+n+" 0 "+n+" c"),t.push("-"+d+" "+n+" -"+n+" "+d+" -"+n+" 0 c"),t.push("-"+n+" -"+d+" -"+d+" -"+n+" 0 -"+n+" c"),t.push(d+" -"+n+" "+n+" -"+d+" "+n+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
38`),e},OffPushDown:function(r){var e=Wn(r);e.scope=r.scope;var t=[],n=Ue.internal.getWidth(r)<=Ue.internal.getHeight(r)?Ue.internal.getWidth(r)/4:Ue.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var o=Number((2*n).toFixed(5)),i=Number((o*Ue.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Oi(Ue.internal.getWidth(r)/2)+" "+Oi(Ue.internal.getHeight(r)/2)+" cm"),t.push(o+" 0 m"),t.push(o+" "+i+" "+i+" "+o+" 0 "+o+" c"),t.push("-"+i+" "+o+" -"+o+" "+i+" -"+o+" 0 c"),t.push("-"+o+" -"+i+" -"+i+" -"+o+" 0 -"+o+" c"),t.push(i+" -"+o+" "+o+" -"+i+" "+o+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
39`),e}},Cross:{createAppearanceStream:function(r){var e={D:{Off:Ue.RadioButton.Cross.OffPushDown},N:{}};return e.N[r]=Ue.RadioButton.Cross.YesNormal,e.D[r]=Ue.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(r){var e=Wn(r);e.scope=r.scope;var t=[],n=Ue.internal.calculateCross(r);return t.push("q"),t.push("1 1 "+mt(Ue.internal.getWidth(r)-2)+" "+mt(Ue.internal.getHeight(r)-2)+" re"),t.push("W"),t.push("n"),t.push(mt(n.x1.x)+" "+mt(n.x1.y)+" m"),t.push(mt(n.x2.x)+" "+mt(n.x2.y)+" l"),t.push(mt(n.x4.x)+" "+mt(n.x4.y)+" m"),t.push(mt(n.x3.x)+" "+mt(n.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
40`),e},YesPushDown:function(r){var e=Wn(r);e.scope=r.scope;var t=Ue.internal.calculateCross(r),n=[];return n.push("0.749023 g"),n.push("0 0 "+mt(Ue.internal.getWidth(r))+" "+mt(Ue.internal.getHeight(r))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+mt(Ue.internal.getWidth(r)-2)+" "+mt(Ue.internal.getHeight(r)-2)+" re"),n.push("W"),n.push("n"),n.push(mt(t.x1.x)+" "+mt(t.x1.y)+" m"),n.push(mt(t.x2.x)+" "+mt(t.x2.y)+" l"),n.push(mt(t.x4.x)+" "+mt(t.x4.y)+" m"),n.push(mt(t.x3.x)+" "+mt(t.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
41`),e},OffPushDown:function(r){var e=Wn(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+mt(Ue.internal.getWidth(r))+" "+mt(Ue.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
42`),e}}},createDefaultAppearanceStream:function(r){var e=r.scope.internal.getFont(r.fontName,r.fontStyle).id,t=r.scope.__private__.encodeColorString(r.color);return"/"+e+" "+r.fontSize+" Tf "+t}};Ue.internal={Bezier_C:.551915024494,calculateCross:function(r){var e=Ue.internal.getWidth(r),t=Ue.internal.getHeight(r),n=Math.min(e,t);return{x1:{x:(e-n)/2,y:(t-n)/2+n},x2:{x:(e-n)/2+n,y:(t-n)/2},x3:{x:(e-n)/2,y:(t-n)/2},x4:{x:(e-n)/2+n,y:(t-n)/2+n}}}},Ue.internal.getWidth=function(r){var e=0;return qt(r)==="object"&&(e=ad(r.Rect[2])),e},Ue.internal.getHeight=function(r){var e=0;return qt(r)==="object"&&(e=ad(r.Rect[3])),e};var f2=or.addField=function(r){if(d2(this,r),!(r instanceof En))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=r).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};or.AcroFormChoiceField=Ta,or.AcroFormListBox=qa,or.AcroFormComboBox=ja,or.AcroFormEditBox=bs,or.AcroFormButton=xr,or.AcroFormPushButton=ws,or.AcroFormRadioButton=Ua,or.AcroFormCheckBox=_s,or.AcroFormTextField=na,or.AcroFormPasswordField=As,or.AcroFormAppearance=Ue,or.AcroForm={ChoiceField:Ta,ListBox:qa,ComboBox:ja,EditBox:bs,Button:xr,PushButton:ws,RadioButton:Ua,CheckBox:_s,TextField:na,PasswordField:As,Appearance:Ue},Ze.AcroForm={ChoiceField:Ta,ListBox:qa,ComboBox:ja,EditBox:bs,Button:xr,PushButton:ws,RadioButton:Ua,CheckBox:_s,TextField:na,PasswordField:As,Appearance:Ue};Ze.AcroForm;function vf(r){return r.reduce(function(e,t,n){return e[t]=n,e},{})}(function(r){var e="addImage_";r.__addimage__={};var t="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},o=r.__addimage__.getImageFileTypeByImageData=function(v,I){var U,T,Y,ie,oe,Z=t;if((I=I||t)==="RGBA"||v.data!==void 0&&v.data instanceof Uint8ClampedArray&&"height"in v&&"width"in v)return"RGBA";if(Ae(v))for(oe in n)for(Y=n[oe],U=0;U<Y.length;U+=1){for(ie=!0,T=0;T<Y[U].length;T+=1)if(Y[U][T]!==void 0&&Y[U][T]!==v[T]){ie=!1;break}if(ie===!0){Z=oe;break}}else for(oe in n)for(Y=n[oe],U=0;U<Y.length;U+=1){for(ie=!0,T=0;T<Y[U].length;T+=1)if(Y[U][T]!==void 0&&Y[U][T]!==v.charCodeAt(T)){ie=!1;break}if(ie===!0){Z=oe;break}}return Z===t&&I!==t&&(Z=I),Z},i=function v(I){for(var U=this.internal.write,T=this.internal.putStream,Y=(0,this.internal.getFilters)();Y.indexOf("FlateEncode")!==-1;)Y.splice(Y.indexOf("FlateEncode"),1);I.objectId=this.internal.newObject();var ie=[];if(ie.push({key:"Type",value:"/XObject"}),ie.push({key:"Subtype",value:"/Image"}),ie.push({key:"Width",value:I.width}),ie.push({key:"Height",value:I.height}),I.colorSpace===S.INDEXED?ie.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(I.palette.length/3-1)+" "+("sMask"in I&&I.sMask!==void 0?I.objectId+2:I.objectId+1)+" 0 R]"}):(ie.push({key:"ColorSpace",value:"/"+I.colorSpace}),I.colorSpace===S.DEVICE_CMYK&&ie.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),ie.push({key:"BitsPerComponent",value:I.bitsPerComponent}),"decodeParameters"in I&&I.decodeParameters!==void 0&&ie.push({key:"DecodeParms",value:"<<"+I.decodeParameters+">>"}),"transparency"in I&&Array.isArray(I.transparency)&&I.transparency.length>0){for(var oe="",Z=0,le=I.transparency.length;Z<le;Z++)oe+=I.transparency[Z]+" "+I.transparency[Z]+" ";ie.push({key:"Mask",value:"["+oe+"]"})}I.sMask!==void 0&&ie.push({key:"SMask",value:I.objectId+1+" 0 R"});var ne=I.filter!==void 0?["/"+I.filter]:void 0;if(T({data:I.data,additionalKeyValues:ie,alreadyAppliedFilters:ne,objectId:I.objectId}),U("endobj"),"sMask"in I&&I.sMask!==void 0){var _e,N=(_e=I.sMaskBitsPerComponent)!==null&&_e!==void 0?_e:I.bitsPerComponent,z={width:I.width,height:I.height,colorSpace:"DeviceGray",bitsPerComponent:N,data:I.sMask};"filter"in I&&(z.decodeParameters="/Predictor ".concat(I.predictor," /Colors 1 /BitsPerComponent ").concat(N," /Columns ").concat(I.width),z.filter=I.filter),v.call(this,z)}if(I.colorSpace===S.INDEXED){var H=this.internal.newObject();T({data:Q(new Uint8Array(I.palette)),objectId:H}),U("endobj")}},d=function(){var v=this.internal.collections[e+"images"];for(var I in v)i.call(this,v[I])},l=function(){var v,I=this.internal.collections[e+"images"],U=this.internal.write;for(var T in I)U("/I"+(v=I[T]).index,v.objectId,"0","R")},c=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",d),this.internal.events.subscribe("putXobjectDict",l))},f=function(){var v=this.internal.collections[e+"images"];return c.call(this),v},m=function(){return Object.keys(this.internal.collections[e+"images"]).length},_=function(v){return typeof r["process"+v.toUpperCase()]=="function"},F=function(v){return qt(v)==="object"&&v.nodeType===1},p=function(v,I){if(v.nodeName==="IMG"&&v.hasAttribute("src")){var U=""+v.getAttribute("src");if(U.indexOf("data:image/")===0)return ys(unescape(U).split("base64,").pop());var T=r.loadFile(U,!0);if(T!==void 0)return T}if(v.nodeName==="CANVAS"){if(v.width===0||v.height===0)throw new Error("Given canvas must have data. Canvas width: "+v.width+", height: "+v.height);var Y;switch(I){case"PNG":Y="image/png";break;case"WEBP":Y="image/webp";break;default:Y="image/jpeg"}return ys(v.toDataURL(Y,1).split("base64,").pop())}},E=function(v){var I=this.internal.collections[e+"images"];if(I){for(var U in I)if(v===I[U].alias)return I[U]}},k=function(v,I,U){return v||I||(v=-96,I=-96),v<0&&(v=-1*U.width*72/v/this.internal.scaleFactor),I<0&&(I=-1*U.height*72/I/this.internal.scaleFactor),v===0&&(v=I*U.width/U.height),I===0&&(I=v*U.height/U.width),[v,I]},L=function(v,I,U,T,Y,ie){var oe=k.call(this,U,T,Y),Z=this.internal.getCoordinateString,le=this.internal.getVerticalCoordinateString,ne=f.call(this);if(U=oe[0],T=oe[1],ne[Y.index]=Y,ie){ie*=Math.PI/180;var _e=Math.cos(ie),N=Math.sin(ie),z=function(J){return J.toFixed(4)},H=[z(_e),z(N),z(-1*N),z(_e),0,0,"cm"]}this.internal.write("q"),ie?(this.internal.write([1,"0","0",1,Z(v),le(I+T),"cm"].join(" ")),this.internal.write(H.join(" ")),this.internal.write([Z(U),"0","0",Z(T),"0","0","cm"].join(" "))):this.internal.write([Z(U),"0","0",Z(T),Z(v),le(I+T),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+Y.index+" Do"),this.internal.write("Q")},S=r.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};r.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var y=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},V=r.__addimage__.sHashCode=function(v){var I,U,T=0;if(typeof v=="string")for(U=v.length,I=0;I<U;I++)T=(T<<5)-T+v.charCodeAt(I),T|=0;else if(Ae(v))for(U=v.byteLength/2,I=0;I<U;I++)T=(T<<5)-T+v[I],T|=0;return T},W=r.__addimage__.validateStringAsBase64=function(v){(v=v||"").toString().trim();var I=!0;return v.length===0&&(I=!1),v.length%4!=0&&(I=!1),/^[A-Za-z0-9+/]+$/.test(v.substr(0,v.length-2))===!1&&(I=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(v.substr(-2))===!1&&(I=!1),I},fe=r.__addimage__.extractImageFromDataUrl=function(v){if(v==null||!(v=v.trim()).startsWith("data:"))return null;var I=v.indexOf(",");return I<0?null:v.substring(0,I).trim().endsWith("base64")?v.substring(I+1):null};r.__addimage__.isArrayBuffer=function(v){return v instanceof ArrayBuffer};var Ae=r.__addimage__.isArrayBufferView=function(v){return v instanceof Int8Array||v instanceof Uint8Array||v instanceof Uint8ClampedArray||v instanceof Int16Array||v instanceof Uint16Array||v instanceof Int32Array||v instanceof Uint32Array||v instanceof Float32Array||v instanceof Float64Array},me=r.__addimage__.binaryStringToUint8Array=function(v){for(var I=v.length,U=new Uint8Array(I),T=0;T<I;T++)U[T]=v.charCodeAt(T);return U},Q=r.__addimage__.arrayBufferToBinaryString=function(v){for(var I="",U=Ae(v)?v:new Uint8Array(v),T=0;T<U.length;T+=8192)I+=String.fromCharCode.apply(null,U.subarray(T,T+8192));return I};r.addImage=function(){var v,I,U,T,Y,ie,oe,Z,le;if(typeof arguments[1]=="number"?(I=t,U=arguments[1],T=arguments[2],Y=arguments[3],ie=arguments[4],oe=arguments[5],Z=arguments[6],le=arguments[7]):(I=arguments[1],U=arguments[2],T=arguments[3],Y=arguments[4],ie=arguments[5],oe=arguments[6],Z=arguments[7],le=arguments[8]),qt(v=arguments[0])==="object"&&!F(v)&&"imageData"in v){var ne=v;v=ne.imageData,I=ne.format||I||t,U=ne.x||U||0,T=ne.y||T||0,Y=ne.w||ne.width||Y,ie=ne.h||ne.height||ie,oe=ne.alias||oe,Z=ne.compression||Z,le=ne.rotation||ne.angle||le}var _e=this.internal.getFilters();if(Z===void 0&&_e.indexOf("FlateEncode")!==-1&&(Z="SLOW"),isNaN(U)||isNaN(T))throw new Error("Invalid coordinates passed to 
42jsPDF.addImage");c.call(this);var N=q.call(this,v,I,oe,Z);return L.call(this,U,T,Y,ie,N,le),this};var q=function(v,I,U,T){var Y,ie,oe;if(typeof v=="string"&&o(v)===t){v=unescape(v);var Z=G(v,!1);(Z!==""||(Z=r.loadFile(v,!0))!==void 0)&&(v=Z)}if(F(v)&&(v=p(v,I)),I=o(v,I),!_(I))throw new Error("addImage does not support files of type '"+I+"', please ensure that a plugin for '"+I+"' support is added.");if(((oe=U)==null||oe.length===0)&&(U=(function(le){return typeof le=="string"||Ae(le)?V(le):Ae(le.data)?V(le.data):null})(v)),(Y=E.call(this,U))||(v instanceof Uint8Array||I==="RGBA"||(ie=v,v=me(v)),Y=this["process"+I.toUpperCase()](v,m.call(this),U,(function(le){return le&&typeof le=="string"&&(le=le.toUpperCase()),le in r.image_compression?le:y.NONE})(T),ie)),!Y)throw new Error("An unknown error occurred whilst processing the image.");return Y},G=r.__addimage__.convertBase64ToBinaryString=function(v,I){I=typeof I!="boolean"||I;var U,T="";if(typeof v=="string"){var Y;U=(Y=fe(v))!==null&&Y!==void 0?Y:v;try{T=ys(U)}catch(ie){if(I)throw W(U)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+ie.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return T};r.getImageProperties=function(v){var I,U,T="";if(F(v)&&(v=p(v)),typeof v=="string"&&o(v)===t&&((T=G(v,!1))===""&&(T=r.loadFile(v)||""),v=T),U=o(v),!_(U))throw new Error("addImage does not support files of type '"+U+"', please ensure that a plugin for '"+U+"' support is added.");if(v instanceof Uint8Array||(v=me(v)),!(I=this["process"+U.toUpperCase()](v)))throw new Error("An unknown error occurred whilst processing the image");return I.fileType=U,I}})(Ze.API),(function(r){var e=function(t){if(t!==void 0&&t!="")return!0};Ze.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),r.events.push(["putPage",function(t){for(var n,o,i,d=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,c=this.internal.getPageInfoByObjId(t.objId),f=t.pageContext.annotations,m=!1,_=0;_<f.length&&!m;_++)switch((n=f[_]).type){case"link":(e(n.options.url)||e(n.options.pageNumber))&&(m=!0);break;case"reference":case"text":case"freetext":m=!0}if(m!=0){this.internal.write("/Annots [");for(var F=0;F<f.length;F++){n=f[F];var p=this.internal.pdfEscape,E=this.internal.getEncryptor(t.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var k=this.internal.newAdditionalObject(),L=this.internal.newAdditionalObject(),S=this.internal.getEncryptor(k.objId),y=n.title||"Note";i="<</Type /Annot /Subtype /Text "+(o="/Rect ["+d(n.bounds.x)+" "+l(n.bounds.y+n.bounds.h)+" "+d(n.bounds.x+n.bounds.w)+" "+l(n.bounds.y)+"] ")+"/Contents ("+p(S(n.contents))+")",i+=" /Popup "+L.objId+" 0 R",i+=" /P "+c.objId+" 0 R",i+=" /T ("+p(S(y))+") >>",k.content=i;var V=k.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(o="/Rect ["+d(n.bounds.x+30)+" "+l(n.bounds.y+n.bounds.h)+" "+d(n.bounds.x+n.bounds.w+30)+" "+l(n.bounds.y)+"] ")+" /Parent "+V,n.open&&(i+=" /Open true"),i+=" >>",L.content=i,this.internal.write(k.objId,"0 R",L.objId,"0 R");break;case"freetext":o="/Rect ["+d(n.bounds.x)+" "+l(n.bounds.y)+" "+d(n.bounds.x+n.bounds.w)+" "+l(n.bounds.y+n.bounds.h)+"] ";var W="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(n.color||"#000000");i="<</Type /Annot /Subtype /FreeText "+o+"/Contents ("+p(E(n.contents))+")",i+=" /DS("+p(E(W))+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(n.options.name){var fe=this.annotations._nameMap[n.options.name];n.options.pageNumber=fe.page,n.options.top=fe.y}else n.options.top||(n.options.top=0);if(o="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",i="",n.options.url)i="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /A <</S /URI /URI ("+p(E(n.options.url))+") >>";else if(n.options.pageNumber)switch(i="<</Type /Annot /Subtype /Link "+o+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,i+=" /FitV "+n.options.left+"]";break;default:var Ae=l(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),i+=" /XYZ "+n.options.left+" "+Ae+" "+n.options.zoom+"]"}i!=""&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),r.createAnnotation=function(t){var n=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":n.pageContext.annotations.push(t)}},r.link=function(t,n,o,i,d){var l=this.internal.getCurrentPageInfo(),c=this.internal.getCoordinateString,f=this.internal.getVerticalCoordinateString;
42l.pageContext.annotations.push({finalBounds:{x:c(t),y:f(n),w:c(t+o),h:f(n+i)},options:d,type:"link"})},r.textWithLink=function(t,n,o,i){var d,l,c=this.getTextWidth(t),f=this.internal.getLineHeight()/this.internal.scaleFactor;if(i.maxWidth!==void 0){l=i.maxWidth;var m=this.splitTextToSize(t,l).length;d=Math.ceil(f*m)}else l=c,d=f;return this.text(t,n,o,i),o+=.2*f,i.align==="center"&&(n-=c/2),i.align==="right"&&(n-=c),this.link(n,o-f,l,d,i),c},r.getTextWidth=function(t){var n=this.internal.getFontSize();return this.getStringUnitWidth(t)*n/this.internal.scaleFactor}})(Ze.API),(function(r){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,6437
vendor: 22,873 bytes, line 42
427],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},t={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},o=[1570,1571,1573,1575];r.__arabicParser__={};var i=r.__arabicParser__.isInArabicSubstitutionA=function(k){return e[k.charCodeAt(0)]!==void 0},d=r.__arabicParser__.isArabicLetter=function(k){return typeof k=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(k)},l=r.__arabicParser__.isArabicEndLetter=function(k){return d(k)&&i(k)&&e[k.charCodeAt(0)].length<=2},c=r.__arabicParser__.isArabicAlfLetter=function(k){return d(k)&&o.indexOf(k.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(k){return d(k)&&i(k)&&e[k.charCodeAt(0)].length>=1};var f=r.__arabicParser__.arabicLetterHasFinalForm=function(k){return d(k)&&i(k)&&e[k.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(k){return d(k)&&i(k)&&e[k.charCodeAt(0)].length>=3};var m=r.__arabicParser__.arabicLetterHasMedialForm=function(k){return d(k)&&i(k)&&e[k.charCodeAt(0)].length==4},_=r.__arabicParser__.resolveLigatures=function(k){var L=0,S=t,y="",V=0;for(L=0;L<k.length;L+=1)S[k.charCodeAt(L)]!==void 0?(V++,typeof(S=S[k.charCodeAt(L)])=="number"&&(y+=String.fromCharCode(S),S=t,V=0),L===k.length-1&&(S=t,y+=k.charAt(L-(V-1)),L-=V-1,V=0)):(S=t,y+=k.charAt(L-V),L-=V,V=0);return y};r.__arabicParser__.isArabicDiacritic=function(k){return k!==void 0&&n[k.charCodeAt(0)]!==void 0};var F=r.__arabicParser__.getCorrectForm=function(k,L,S){return d(k)?i(k)===!1?-1:!f(k)||!d(L)&&!d(S)||!d(S)&&l(L)||l(k)&&!d(L)||l(k)&&c(L)||l(k)&&l(L)?0:m(k)&&d(L)&&!l(L)&&d(S)&&f(S)?3:l(k)||!d(S)?1:2:-1},p=function(k){var L=0,S=0,y=0,V="",W="",fe="",Ae=(k=k||"").split("\\s+"),me=[];for(L=0;L<Ae.length;L+=1){for(me.push(""),S=0;S<Ae[L].length;S+=1)V=Ae[L][S],W=Ae[L][S-1],fe=Ae[L][S+1],d(V)?(y=F(V,W,fe),me[L]+=y!==-1?String.fromCharCode(e[V.charCodeAt(0)][y]):V):me[L]+=V;me[L]=_(me[L])}return me.join(" ")},E=r.__arabicParser__.processArabic=r.processArabic=function(){var k,L=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,S=[];if(Array.isArray(L)){var y=0;for(S=[],y=0;y<L.length;y+=1)Array.isArray(L[y])?S.push([p(L[y][0]),L[y][1],L[y][2]]):S.push([p(L[y])]);k=S}else k=p(L);return typeof arguments[0]=="string"?k:(arguments[0].text=k,arguments[0])};r.events.push(["preProcessText",E])})(Ze.API),Ze.API.autoPrint=function(r){var e;return(r=r||{}).variant=r.variant||"non-conform",r.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},(function(r){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(l){t=l}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(l){n=isNaN(l)||Number.isInteger(l)===!1||l<0?150:l,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var o=300;Object.defineProperty(this,"height",{get:function(){return o},set:function(l){o=isNaN(l)||Number.isInteger(l)===!1||l<0?300:l,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=o+1)}});var i=[];Object.defineProperty(this,"childNodes",{get:function(){return i},set:function(l){i=l}});var d={};Object.defineProperty(this,"style",{get:function(){return d},set:function(l){d=l}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,n){var o;if((t=t||"2d")!=="2d")return null;for(o in n)this.pdf.context2d.hasOwnProperty(o)&&(this.pdf.context2d[o]=n[o]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},r.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])})(Ze.API),(function(r){var e={left:0,top:0,bottom:0,right:0},t=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),o.call(this))},o=function(){this.internal.__cell__.lastCell=new i,this.internal.__cell__.pages=1},i=function(){var c=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return c},set:function(k){c=k}});var f=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return f},set:function(k){f=k}});var m=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return m},set:function(k){m=k}});var _=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return _},set:function(k){_=k}});var F=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return F},set:function(k){F=k}});var p=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return p},set:function(k){p=k}});var E=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return E},set:function(k){E=k}}),this};i.prototype.clone=function(){return new i(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},i.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},r.setHeaderFunction=function(c){return n.call(this),this.internal.__cell__.headerFunction=typeof c=="function"?c:void 0,this},r.getTextDimensions=function(c,f){n.call(this);var m=(f=f||{}).fontSize||this.getFontSize(),_=f.font||this.getFont(),F=f.scaleFactor||this.internal.scaleFactor,p=0,E=0,k=0,L=this;if(!Array.isArray(c)&&typeof c!="string"){if(typeof c!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");c=String(c)}var S=f.maxWidth;S>0?typeof c=="string"?c=this.splitTextToSize(c,S):Object.prototype.toString.call(c)==="[object Array]"&&(c=c.reduce(function(V,W){return V.concat(L.splitTextToSize(W,S))},[])):c=Array.isArray(c)?c:[c];for(var y=0;y<c.length;y++)p<(k=this.getStringUnitWidth(c[y],{font:_})*m)&&(p=k);return p!==0&&(E=c.length),{w:p/=F,h:Math.max((E*m*this.getLineHeightFactor()-m*(this.getLineHeightFactor()-1))/F,0)}},r.cellAddPage=function(){n.call(this),this.addPage();var c=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new i(c.left,c.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var d=r.cell=function(){var c;c=arguments[0]instanceof i?arguments[0]:new i(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),n.call(this);var f=this.internal.__cell__.lastCell,m=this.internal.__cell__.padding,_=this.internal.__cell__.margins||e,F=this.internal.__cell__.tableHeaderRow,p=this.internal.__cell__.printHeaders;return f.lineNumber!==void 0&&(f.lineNumber===c.lineNumber?(c.x=(f.x||0)+(f.width||0),c.y=f.y||0):f.y+f.height+c.height+_.bottom>this.getPageHeight()?(this.cellAddPage(),c.y=_.top,p&&F&&(this.printHeaderRow(c.lineNumber,!0),c.y+=F[0].height)):c.y=f.y+f.height||c.y),c.text[0]!==void 0&&(this.rect(c.x,c.y,c.width,c.height,t===!0?"FD":void 0),c.align==="right"?this.text(c.text,c.x+c.width-m,c.y+m,{align:"right",baseline:"top"}):c.align==="center"?this.text(c.text,c.x+c.width/2,c.y+m,{align:"center",baseline:"top",maxWidth:c.width-m-m}):this.text(c.text,c.x+m,c.y+m,{align:"left",baseline:"top",maxWidth:c.width-m-m})),this.internal.__cell__.lastCell=c,this};r.table=function(c,f,m,_,F){if(n.call(this),!m)throw new Error("No data for PDF table.");var p,E,k,L,S=[],y=[],V=[],W={},fe={},Ae=[],me=[],Q=(F=F||{}).autoSize||!1,q=F.printHeaders!==!1,G=F.css&&F.css["font-size"]!==void 0?16*F.css["font-size"]:F.fontSize||12,v=F.margins||Object.assign({width:this.getPageWidth()},e),I=typeof F.padding=="number"?F.padding:3,U=F.headerBackgroundColor||"#c8c8c8",T=F.headerTextColor||"#000";if(o.call(this),this.internal.__cell__.printHeaders=q,this.internal.__cell__.margins=v,this.internal.__cell__.table_font_size=G,this.internal.__cell__.padding=I,this.internal.__cell__.headerBackgroundColor=U,this.internal.__cell__.headerTextColor=T,this.setFontSize(G),_==null)y=S=Object.keys(m[0]),V=S.map(function(){return"left"});else if(Array.isArray(_)&&qt(_[0])==="object")for(S=_.map(function(ne){return ne.name}),y=_.map(function(ne){return ne.prompt||ne.name||""}),V=_.map(function(ne){return ne.align||"left"}),p=0;p<_.length;p+=1)fe[_[p].name]=.7499990551181103*_[p].width;else Array.isArray(_)&&typeof _[0]=="string"&&(y=S=_,V=S.map(function(){return"left"}));if(Q||Array.isArray(_)&&typeof _[0]=="string")for(p=0;p<S.length;p+=1){for(W[L=S[p]]=m.map(function(ne){return ne[L]}),this.setFont(void 0,"bold"),Ae.push(this.getTextDimensions(y[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),E=W[L],this.setFont(void 0,"normal"),k=0;k<E.length;k+=1)Ae.push(this.getTextDimensions(E[k],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);fe[L]=Math.max.apply(null,Ae)+I+I,Ae=[]}if(q){var Y={};for(p=0;p<S.length;p+=1)Y[S[p]]={},Y[S[p]].text=y[p],Y[S[p]].align=V[p];var ie=l.call(this,Y,fe);me=S.map(function(ne){return new i(c,f,fe[ne],ie,Y[ne].text,void 0,Y[ne].align)}),this.setTableHeaderRow(me),this.printHeaderRow(1,!1)}var oe=_.reduce(function(ne,_e){return ne[_e.name]=_e.align,ne},{});for(p=0;p<m.length;p+=1){"rowStart"in F&&F.rowStart instanceof Function&&F.rowStart({row:p,data:m[p]},this);var Z=l.call(this,m[p],fe);for(k=0;k<S.length;k+=1){var le=m[p][S[k]];"cellStart"in F&&F.cellStart instanceof Function&&F.cellStart({row:p,col:k,data:le},this),d.call(this,new i(c,f,fe[S[k]],Z,le,p+2,oe[S[k]]))}}return this.internal.__cell__.table_x=c,this.internal.__cell__.table_y=f,this};var l=function(c,f){var m=this.internal.__cell__.padding,_=this.internal.__cell__.table_font_size,F=this.internal.scaleFactor;return Object.keys(c).map(function(p){var E=c[p];return this.splitTextToSize(E.hasOwnProperty("text")?E.text:E,f[p]-m-m)},this).map(function(p){return this.getLineHeightFactor()*p.length*_/F+m+m},this).reduce(function(p,E){return Math.max(p,E)},0)};r.setTableHeaderRow=function(c){n.call(this),this.internal.__cell__.tableHeaderRow=c},r.printHeaderRow=function(c,f){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var m;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var _=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new i(_[0],_[1],_[2],_[3],void 0,-1)}this.setFont(void 0,"bold");for(var F=[],p=0;p<this.internal.__cell__.tableHeaderRow.length;p+=1){m=this.internal.__cell__.tableHeaderRow[p].clone(),f&&(m.y=this.internal.__cell__.margins.top||0,F.push(m)),m.lineNumber=c;var E=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),d.call(this,m),this.setTextColor(E)}F.length>0&&this.setTableHeaderRow(F),this.setFont(void 0,"normal"),t=!1}})(Ze.API);var yf={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},bf=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],au=vf(bf),wf=[100,200,300,400,500,600,700,800,900],h2=vf(wf);function Ul(r){var e=r.family.replace(/"|'/g,"").toLowerCase(),t=(function(i){return yf[i=i||"normal"]?i:"normal"})(r.style),n=(function(i){return i?typeof i=="number"?i>=100&&i<=900&&i%100==0?i:400:/^\d00$/.test(i)?parseInt(i):i==="bold"?700:400:400})(r.weight),o=(function(i){return typeof au[i=i||"normal"]=="number"?i:"normal"})(r.stretch);return{family:e,style:t,weight:n,stretch:o,src:r.src||[],ref:r.ref||{name:e,style:[o,t,n].join(" ")}}}function od(r,e,t,n){var o;for(o=t;o>=0&&o<e.length;o+=n)if(r[e[o]])return r[e[o]];for(o=t;o>=0&&o<e.length;o-=n)if(r[e[o]])return r[e[o]]}var p2={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},sd={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function ld(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function ud(r){return r.trimLeft()}function m2(r,e){for(var t=0;t<r.length;){if(r.charAt(t)===e)return[r.substring(0,t),r.substring(t+1)];t+=1}return null}function g2(r){var e=r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],r.substring(e[0].length)]}var Ca,fs,cd,dd,fd,zl=["times"];function hd(r,e,t,n,o){var i=4,d=md;switch(o){case Ze.API.image_compression.FAST:i=1,d=pd;break;case Ze.API.image_compression.MEDIUM:i=6,d=gd;break;case Ze.API.image_compression.SLOW:i=9,d=vd}r=(function(c,f,m,_){for(var F,p=c.length/f,E=new Uint8Array(c.length+p),k=[v2,pd,md,gd,vd],L=0;L<p;L+=1){var S=L*f,y=c.subarray(S,S+f);if(_)E.set(_(y,m,F),S+L);else{for(var V=k.length,W=[],fe=0;fe<V;fe+=1)W[fe]=k[fe](y,m,F);var Ae=b2(W.concat());E.set(W[Ae],S+L)}F=y}return E})(r,e,Math.ceil(t*n/8),d);var l=Zl(r,{level:i});return Ze.API.__addimage__.arrayBufferToBinaryString(l)}function v2(r){var e=Array.apply([],r);return e.unshift(0),e}function pd(r,e){var t=r.length,n=[];n[0]=1;for(var o=0;o<t;o+=1){var i=r[o-e]||0;n[o+1]=r[o]-i+256&255}return n}function md(r,e,t){var n=r.length,o=[];o[0]=2;for(var i=0;i<n;i+=1){var d=t&&t[i]||0;o[i+1]=r[i]-d+256&255}return o}function gd(r,e,t){var n=r.length,o=[];o[0]=3;for(var i=0;i<n;i+=1){var d=r[i-e]||0,l=t&&t[i]||0;o[i+1]=r[i]+256-(d+l>>>1)&255}return o}function vd(r,e,t){var n=r.length,o=[];o[0]=4;for(var i=0;i<n;i+=1){var d=y2(r[i-e]||0,t&&t[i]||0,t&&t[i-e]||0);o[i+1]=r[i]-d+256&255}return o}function y2(r,e,t){if(r===e&&e===t)return r;var n=Math.abs(e-t),o=Math.abs(r-t),i=Math.abs(r+e-t-t);return n<=o&&n<=i?r:o<=i?e:t}function b2(r){var e=r.map(function(t){return t.reduce(function(n,o){return n+Math.abs(o)},0)});return e.indexOf(Math.min.apply(null,e))}function Vl(r,e,t){var n=e*t,o=Math.floor(n/8),i=16-(n-8*o+t),d=(1<<t)-1;return _f(r,o)>>i&d}function yd(r,e,t,n){var o=t*n,i=Math.floor(o/8),d=16-(o-8*i+n),l=(1<<n)-1,c=(e&l)<<d;(function(f,m,_){if(m+1<f.byteLength)f.setUint16(m,_,!1);else{var F=_>>8&255;f.setUint8(m,F)}})(r,i,_f(r,i)&~(l<<d)&65535|c)}function _f(r,e){return e+1<r.byteLength?r.getUint16(e,!1):r.getUint8(e)<<8}function w2(r){var e=0;if(r[e++]!==71||r[e++]!==73||r[e++]!==70||r[e++]!==56||(r[e++]+1&253)!=56||r[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var t=r[e++]|r[e++]<<8,n=r[e++]|r[e++]<<8,o=r[e++],i=o>>7,d=1<<1+(7&o);r[e++],r[e++];var l=null,c=null;i&&(l=e,c=d,e+=3*d);var f=!0,m=[],_=0,F=null,p=0,E=null;for(this.width=t,this.height=n;f&&e<r.length;)switch(r[e++]){case 33:switch(r[e++]){case 255:if(r[e]!==11||r[e+1]==78&&r[e+2]==69&&r[e+3]==84&&r[e+4]==83&&r[e+5]==67&&r[e+6]==65&&r[e+7]==80&&r[e+8]==69&&r[e+9]==50&&r[e+10]==46&&r[e+11]==48&&r[e+12]==3&&r[e+13]==1&&r[e+16]==0)e+=14,E=r[e++]|r[e++]<<8,e++;else for(e+=12;;){if(!((v=r[e++])>=0))throw Error("Invalid block size");if(v===0)break;e+=v}break;case 249:if(r[e++]!==4||r[e+4]!==0)throw new Error("Invalid graphics extension block.");var k=r[e++];_=r[e++]|r[e++]<<8,F=r[e++],1&k||(F=null),p=k>>2&7,e++;break;case 254:for(;;){if(!((v=r[e++])>=0))throw Error("Invalid block size");if(v===0)break;e+=v}break;default:throw new Error("Unknown graphic control label: 0x"+r[e-1].toString(16))}break;case 44:var L=r[e++]|r[e++]<<8,S=r[e++]|r[e++]<<8,y=r[e++]|r[e++]<<8,V=r[e++]|r[e++]<<8,W=r[e++],fe=W>>6&1,Ae=1<<1+(7&W),me=l,Q=c,q=!1;W>>7&&(q=!0,me=e,Q=Ae,e+=3*Ae);var G=e;for(e++;;){var v;if(!((v=r[e++])>=0))throw Error("Invalid block size");if(v===0)break;e+=v}m.push({x:L,y:S,width:y,height:V,has_local_palette:q,palette_offset:me,palette_size:Q,data_offset:G,data_length:e-G,transparent_index:F,interlaced:!!fe,delay:_,disposal:p});break;case 59:f=!1;break;default:throw new Error("Unknown gif block: 0x"+r[e-1].toString(16))}this.numFrames=function(){return m.length},this.loopCount=function(){return E},this.frameInfo=function(I){if(I<0||I>=m.length)throw new Error("Frame index out of range.");return m[I]},this.decodeAndBlitFrameBGRA=function(I,U){var T=this.frameInfo(I),Y=T.width*T.height;if(Y>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ie=new Uint8Array(Y);bd(r,T.data_offset,ie,Y);var oe=T.palette_offset,Z=T.transparent_index;Z===null&&(Z=256);var le=T.width,ne=t-le,_e=le,N=4*(T.y*t+T.x),z=4*((T.y+T.height)*t+T.x),H=N,J=4*ne;T.interlaced===!0&&(J+=4*t*7);for(var te=8,se=0,pe=ie.length;se<pe;++se){var ge=ie[se];if(_e===0&&(_e=le,(H+=J)>=z&&(J=4*ne+4*t*(te-1),H=N+(le+ne)*(te<<1),te>>=1)),ge===Z)H+=4;else{var xe=r[oe+3*ge],Ie=r[oe+3*ge+1],Oe=r[oe+3*ge+2];U[H++]=Oe,U[H++]=Ie,U[H++]=xe,U[H++]=255}--_e}},this.decodeAndBlitFrameRGBA=function(I,U){var T=this.frameInfo(I),Y=T.width*T.height;if(Y>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var ie=new Uint8Array(Y);bd(r,T.data_offset,ie,Y);var oe=T.palette_offset,Z=T.transparent_index;Z===null&&(Z=256);var le=T.width,ne=t-le,_e=le,N=4*(T.y*t+T.x),z=4*((T.y+T.height)*t+T.x),H=N,J=4*ne;T.interlaced===!0&&(J+=4*t*7);for(var te=8,se=0,pe=ie.length;se<pe;++se){var ge=ie[se];if(_e===0&&(_e=le,(H+=J)>=z&&(J=4*ne+4*t*(te-1),H=N+(le+ne)*(te<<1),te>>=1)),ge===Z)H+=4;else{var xe=r[oe+3*ge],Ie=r[oe+3*ge+1],Oe=r[oe+3*ge+2];U[H++]=xe,U[H++]=Ie,U[H++]=Oe,U[H++]=255}--_e}}}function bd(r,e,t,n){for(var o=r[e++],i=1<<o,d=i+1,l=d+1,c=o+1,f=(1<<c)-1,m=0,_=0,F=0,p=r[e++],E=new Int32Array(4096),k=null;;){for(;m<16&&p!==0;)_|=r[e++]<<m,m+=8,p===1?p=r[e++]:--p;if(m<c)break;var L=_&f;if(_>>=c,m-=c,L!==i){if(L===d)break;for(var S=L<l?L:k,y=0,V=S;V>i;)V=E[V]>>8,++y;var W=V;if(F+y+(S!==L?1:0)>n)return void Ht.log("Warning, gif stream longer than expected.");t[F++]=W;var fe=F+=y;for(S!==L&&(t[F++]=W),V=S;y--;)V=E[V],t[--fe]=255&V,V>>=8;k!==null&&l<4096&&(E[l++]=k<<8|W,l>=f+1&&c<12&&(++c,f=f<<1|1)),k=L}else l=d+1,f=(1<<(c=o+1))-1,k=null}return F!==n&&Ht.log("Warning, gif stream shorter than expected."),t}function Hl(r){var e,t,n,o,i,d=Math.floor,l=new Array(64),c=new Array(64),f=new Array(64),m=new Array(64),_=new Array(65535),F=new Array(65535),p=new Array(64),E=new Array(64),k=[],L=0,S=7,y=new Array(64),V=new Array(64),W=new Array(64),fe=new Array(256),Ae=new Array(2048),me=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],Q=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],q=[0,1,2,3,4,5,6,7,8,9,10,11],G=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],v=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],I=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],U=[0,1,2,3,4,5,6,7,8,9,10,11],T=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],Y=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ie(N,z){for(var H=0,J=0,te=new Array,se=1;se<=16;se++){for(var pe=1;pe<=N[se];pe++)te[z[J]]=[],te[z[J]][0]=H,te[z[J]][1]=se,J++,H++;H*=2}return te}function oe(N){for(var z=N[0],H=N[1]-1;H>=0;)z&1<<H&&(L|=1<<S),H--,--S<0&&(L==255?(Z(255),Z(0)):Z(L),S=7,L=0)}function Z(N){k.push(N)}function le(N){Z(N>>8&255),Z(255&N)}function ne(N,z,H,J,te){for(var se,pe=te[0],ge=te[240],xe=(function(ke,tt){var De,qe,Je,Ct,xt,ct,Nt,Lt,He,st,We=0;for(He=0;He<8;++He){De=ke[We],qe=ke[We+1],Je=ke[We+2],Ct=ke[We+3],xt=ke[We+4],ct=ke[We+5],Nt=ke[We+6];var jt=De+(Lt=ke[We+7]),kt=De-Lt,yt=qe+Nt,pt=qe-Nt,Wt=Je+ct,et=Je-ct,Bt=Ct+xt,it=Ct-xt,dt=jt+Bt,$t=jt-Bt,St=yt+Wt,rt=yt-Wt;ke[We]=dt+St,ke[We+4]=dt-St;var Et=.707106781*(rt+$t);ke[We+2]=$t+Et,ke[We+6]=$t-Et;var dn=.382683433*((dt=it+et)-(rt=pt+kt)),Nr=.5411961*dt+dn,Zr=1.306562965*rt+dn,fn=.707106781*(St=et+pt),at=kt+fn,_n=kt-fn;ke[We+5]=_n+Nr,ke[We+3]=_n-Nr,ke[We+1]=at+Zr,ke[We+7]=at-Zr,We+=8}for(We=0,He=0;He<8;++He){De=ke[We],qe=ke[We+8],Je=ke[We+16],Ct=ke[We+24],xt=ke[We+32],ct=ke[We+40],Nt=ke[We+48];var An=De+(Lt=ke[We+56]),Wr=De-Lt,Tr=qe+Nt,er=qe-Nt,sr=Je+ct,vr=Je-ct,Kn=Ct+xt,Bn=Ct-xt,Qr=An+Kn,hn=An-Kn,en=Tr+sr,$r=Tr-sr;ke[We]=Qr+en,ke[We+32]=Qr-en;var Gr=.707106781*($r+hn);ke[We+16]=hn+Gr,ke[We+48]=hn-Gr;var Jn=.382683433*((Qr=Bn+vr)-($r=er+Wr)),j=.5411961*Qr+Jn,P=1.306562965*$r+Jn,Se=.707106781*(en=vr+er),K=Wr+Se,Ce=Wr-Se;ke[We+40]=Ce+j,ke[We+24]=Ce-j,ke[We+8]=K+P,ke[We+56]=K-P,We++}for(He=0;He<64;++He)st=ke[He]*tt[He],p[He]=st>0?st+.5|0:st-.5|0;return p})(N,z),Ie=0;Ie<64;++Ie)E[me[Ie]]=xe[Ie];var Oe=E[0]-H;H=E[0],Oe==0?oe(J[0]):(oe(J[F[se=32767+Oe]]),oe(_[se]));for(var Me=63;Me>0&&E[Me]==0;)Me--;if(Me==0)return oe(pe),H;for(var Ve,B=1;B<=Me;){for(var we=B;E[B]==0&&B<=Me;)++B;var ot=B-we;if(ot>=16){Ve=ot>>4;
42for(var Ge=1;Ge<=Ve;++Ge)oe(ge);ot&=15}se=32767+E[B],oe(te[(ot<<4)+F[se]]),oe(_[se]),B++}return Me!=63&&oe(pe),H}function _e(N){N=Math.min(Math.max(N,1),100),i!=N&&((function(z){for(var H=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],J=0;J<64;J++){var te=d((H[J]*z+50)/100);te=Math.min(Math.max(te,1),255),l[me[J]]=te}for(var se=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],pe=0;pe<64;pe++){var ge=d((se[pe]*z+50)/100);ge=Math.min(Math.max(ge,1),255),c[me[pe]]=ge}for(var xe=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Ie=0,Oe=0;Oe<8;Oe++)for(var Me=0;Me<8;Me++)f[Ie]=1/(l[me[Ie]]*xe[Oe]*xe[Me]*8),m[Ie]=1/(c[me[Ie]]*xe[Oe]*xe[Me]*8),Ie++})(N<50?Math.floor(5e3/N):Math.floor(200-2*N)),i=N)}this.encode=function(N,z){z&&_e(z),k=new Array,L=0,S=7,le(65496),le(65504),le(16),Z(74),Z(70),Z(73),Z(70),Z(0),Z(1),Z(1),Z(0),le(1),le(1),Z(0),Z(0),(function(){le(65499),le(132),Z(0);for(var qe=0;qe<64;qe++)Z(l[qe]);Z(1);for(var Je=0;Je<64;Je++)Z(c[Je])})(),(function(qe,Je){le(65472),le(17),Z(8),le(Je),le(qe),Z(3),Z(1),Z(17),Z(0),Z(2),Z(17),Z(1),Z(3),Z(17),Z(1)})(N.width,N.height),(function(){le(65476),le(418),Z(0);for(var qe=0;qe<16;qe++)Z(Q[qe+1]);for(var Je=0;Je<=11;Je++)Z(q[Je]);Z(16);for(var Ct=0;Ct<16;Ct++)Z(G[Ct+1]);for(var xt=0;xt<=161;xt++)Z(v[xt]);Z(1);for(var ct=0;ct<16;ct++)Z(I[ct+1]);for(var Nt=0;Nt<=11;Nt++)Z(U[Nt]);Z(17);for(var Lt=0;Lt<16;Lt++)Z(T[Lt+1]);for(var He=0;He<=161;He++)Z(Y[He])})(),le(65498),le(12),Z(3),Z(1),Z(0),Z(2),Z(17),Z(3),Z(17),Z(0),Z(63),Z(0);var H=0,J=0,te=0;L=0,S=7,this.encode.displayName="_encode_";for(var se,pe,ge,xe,Ie,Oe,Me,Ve,B,we=N.data,ot=N.width,Ge=N.height,ke=4*ot,tt=0;tt<Ge;){for(se=0;se<ke;){for(Ie=ke*tt+se,Me=-1,Ve=0,B=0;B<64;B++)Oe=Ie+(Ve=B>>3)*ke+(Me=4*(7&B)),tt+Ve>=Ge&&(Oe-=ke*(tt+1+Ve-Ge)),se+Me>=ke&&(Oe-=se+Me-ke+4),pe=we[Oe++],ge=we[Oe++],xe=we[Oe++],y[B]=(Ae[pe]+Ae[ge+256|0]+Ae[xe+512|0]>>16)-128,V[B]=(Ae[pe+768|0]+Ae[ge+1024|0]+Ae[xe+1280|0]>>16)-128,W[B]=(Ae[pe+1280|0]+Ae[ge+1536|0]+Ae[xe+1792|0]>>16)-128;H=ne(y,f,H,e,n),J=ne(V,m,J,t,o),te=ne(W,m,te,t,o),se+=32}tt+=8}if(S>=0){var De=[];De[1]=S+1,De[0]=(1<<S+1)-1,oe(De)}return le(65497),new Uint8Array(k)},r=r||50,(function(){for(var N=String.fromCharCode,z=0;z<256;z++)fe[z]=N(z)})(),e=ie(Q,q),t=ie(I,U),n=ie(G,v),o=ie(T,Y),(function(){for(var N=1,z=2,H=1;H<=15;H++){for(var J=N;J<z;J++)F[32767+J]=H,_[32767+J]=[],_[32767+J][1]=H,_[32767+J][0]=J;for(var te=-(z-1);te<=-N;te++)F[32767+te]=H,_[32767+te]=[],_[32767+te][1]=H,_[32767+te][0]=z-1+te;N<<=1,z<<=1}})(),(function(){for(var N=0;N<256;N++)Ae[N]=19595*N,Ae[N+256|0]=38470*N,Ae[N+512|0]=7471*N+32768,Ae[N+768|0]=-11059*N,Ae[N+1024|0]=-21709*N,Ae[N+1280|0]=32768*N+8421375,Ae[N+1536|0]=-27439*N,Ae[N+1792|0]=-5329*N})(),_e(r)}function kn(r,e){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function wd(r){function e(q){if(!q)throw Error("assert :P")}function t(q,G,v){for(var I=0;4>I;I++)if(q[G+I]!=v.charCodeAt(I))return!0;return!1}function n(q,G,v,I,U){for(var T=0;T<U;T++)q[G+T]=v[I+T]}function o(q,G,v,I){for(var U=0;U<I;U++)q[G+U]=v}function i(q){return new Int32Array(q)}function d(q,G){for(var v=[],I=0;I<q;I++)v.push(new G);return v}function l(q,G){var v=[];return(function I(U,T,Y){for(var ie=Y[T],oe=0;oe<ie&&(U.push(Y.length>T+1?[]:new G),!(Y.length<T+1));oe++)I(U[oe],T+1,Y)})(v,0,q),v}var c=function(){var q=this;function G(a,s){for(var h=1<<s-1>>>0;a&h;)h>>>=1;return h?(a&h-1)+h:a}function v(a,s,h,g,w){e(!(g%h));do a[s+(g-=h)]=w;while(0<g)}function I(a,s,h,g,w){if(e(2328>=w),512>=w)var A=i(512);else if((A=i(w))==null)return 0;return(function(x,C,O,M,X,ce){var D,ee,ae=C,ye=1<<O,ue=i(16),be=i(16);for(e(X!=0),e(M!=null),e(x!=null),e(0<O),ee=0;ee<X;++ee){if(15<M[ee])return 0;++ue[M[ee]]}if(ue[0]==X)return 0;for(be[1]=0,D=1;15>D;
vendor: 46,423 bytes, line 42
42++D){if(ue[D]>1<<D)return 0;be[D+1]=be[D]+ue[D]}for(ee=0;ee<X;++ee)D=M[ee],0<M[ee]&&(ce[be[D]++]=ee);if(be[15]==1)return(M=new U).g=0,M.value=ce[0],v(x,ae,1,ye,M),ye;var Ne,Pe=-1,Fe=ye-1,Xe=0,je=1,wt=1,Ye=1<<O;for(ee=0,D=1,X=2;D<=O;++D,X<<=1){if(je+=wt<<=1,0>(wt-=ue[D]))return 0;for(;0<ue[D];--ue[D])(M=new U).g=D,M.value=ce[ee++],v(x,ae+Xe,X,Ye,M),Xe=G(Xe,D)}for(D=O+1,X=2;15>=D;++D,X<<=1){if(je+=wt<<=1,0>(wt-=ue[D]))return 0;for(;0<ue[D];--ue[D]){if(M=new U,(Xe&Fe)!=Pe){for(ae+=Ye,Ne=1<<(Pe=D)-O;15>Pe&&!(0>=(Ne-=ue[Pe]));)++Pe,Ne<<=1;ye+=Ye=1<<(Ne=Pe-O),x[C+(Pe=Xe&Fe)].g=Ne+O,x[C+Pe].value=ae-C-Pe}M.g=D-O,M.value=ce[ee++],v(x,ae+(Xe>>O),X,Ye,M),Xe=G(Xe,D)}}return je!=2*be[15]-1?0:ye})(a,s,h,g,w,A)}function U(){this.value=this.g=0}function T(){this.value=this.g=0}function Y(){this.G=d(5,U),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=d(Aa,T)}function ie(a,s,h,g){e(a!=null),e(s!=null),e(2147483648>g),a.Ca=254,a.I=0,a.b=-8,a.Ka=0,a.oa=s,a.pa=h,a.Jd=s,a.Yc=h+g,a.Zc=4<=g?h+g-4+1:h,pe(a)}function oe(a,s){for(var h=0;0<s--;)h|=xe(a,128)<<s;return h}function Z(a,s){var h=oe(a,s);return ge(a)?-h:h}function le(a,s,h,g){var w,A=0;for(e(a!=null),e(s!=null),e(4294967288>g),a.Sb=g,a.Ra=0,a.u=0,a.h=0,4<g&&(g=4),w=0;w<g;++w)A+=s[h+w]<<8*w;a.Ra=A,a.bb=g,a.oa=s,a.pa=h}function ne(a){for(;8<=a.u&&a.bb<a.Sb;)a.Ra>>>=8,a.Ra+=a.oa[a.pa+a.bb]<<Ur-8>>>0,++a.bb,a.u-=8;J(a)&&(a.h=1,a.u=0)}function _e(a,s){if(e(0<=s),!a.h&&s<=eo){var h=H(a)&Gi[s];return a.u+=s,ne(a),h}return a.h=1,a.u=0}function N(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function z(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function H(a){return a.Ra>>>(a.u&Ur-1)>>>0}function J(a){return e(a.bb<=a.Sb),a.h||a.bb==a.Sb&&a.u>Ur}function te(a,s){a.u=s,a.h=J(a)}function se(a){a.u>=Yr&&(e(a.u>=Yr),ne(a))}function pe(a){e(a!=null&&a.oa!=null),a.pa<a.Zc?(a.I=(a.oa[a.pa++]|a.I<<8)>>>0,a.b+=8):(e(a!=null&&a.oa!=null),a.pa<a.Yc?(a.b+=8,a.I=a.oa[a.pa++]|a.I<<8):a.Ka?a.b=0:(a.I<<=8,a.b+=8,a.Ka=1))}function ge(a){return oe(a,1)}function xe(a,s){var h=a.Ca;0>a.b&&pe(a);var g=a.b,w=h*s>>>8,A=(a.I>>>g>w)+0;for(A?(h-=w,a.I-=w+1<<g>>>0):h=w+1,g=h,w=0;256<=g;)w+=8,g>>=8;return g=7^w+Na[g],a.b-=g,a.Ca=(h<<g)-1,A}function Ie(a,s,h){a[s+0]=h>>24&255,a[s+1]=h>>16&255,a[s+2]=h>>8&255,a[s+3]=255&h}function Oe(a,s){return a[s+0]|a[s+1]<<8}function Me(a,s){return Oe(a,s)|a[s+2]<<16}function Ve(a,s){return Oe(a,s)|Oe(a,s+2)<<16}function B(a,s){var h=1<<s;return e(a!=null),e(0<s),a.X=i(h),a.X==null?0:(a.Mb=32-s,a.Xa=s,1)}function we(a,s){e(a!=null),e(s!=null),e(a.Xa==s.Xa),n(s.X,0,a.X,0,1<<s.Xa)}function ot(){this.X=[],this.Xa=this.Mb=0}function Ge(a,s,h,g){e(h!=null),e(g!=null);var w=h[0],A=g[0];return w==0&&(w=(a*A+s/2)/s),A==0&&(A=(s*w+a/2)/a),0>=w||0>=A?0:(h[0]=w,g[0]=A,1)}function ke(a,s){return a+(1<<s)-1>>>s}function tt(a,s){return((4278255360&a)+(4278255360&s)>>>0&4278255360)+((16711935&a)+(16711935&s)>>>0&16711935)>>>0}function De(a,s){q[s]=function(h,g,w,A,x,C,O){var M;for(M=0;M<x;++M){var X=q[a](C[O+M-1],w,A+M);C[O+M]=tt(h[g+M],X)}}}function qe(){this.ud=this.hd=this.jd=0}function Je(a,s){return((4278124286&(a^s))>>>1)+(a&s)>>>0}function Ct(a){return 0<=a&&256>a?a:0>a?0:255<a?255:void 0}function xt(a,s){return Ct(a+(a-s+.5>>1))}function ct(a,s,h){return Math.abs(s-h)-Math.abs(a-h)}function Nt(a,s,h,g,w,A,x){for(g=A[x-1],h=0;h<w;++h)A[x+h]=g=tt(a[s+h],g)}function Lt(a,s,h,g,w){var A;for(A=0;A<h;++A){var x=a[s+A],C=x>>8&255,O=16711935&(O=(O=16711935&x)+((C<<16)+C));g[w+A]=(4278255360&x)+O>>>0}}function He(a,s){s.jd=255&a,s.hd=a>>8&255,s.ud=a>>16&255}function st(a,s,h,g,w,A){var x;for(x=0;x<g;++x){var C=s[h+x],O=C>>>8,M=C,X=255&(X=(X=C>>>16)+((a.jd<<24>>24)*(O<<24>>24)>>>5));M=255&(M=(M+=(a.hd<<24>>24)*(O<<24>>24)>>>5)+((a.ud<<24>>24)*(X<<24>>24)>>>5)),w[A+x]=(4278255360&C)+(X<<16)+M}}function We(a,s,h,g,w){q[s]=function(A,x,C,O,M,X,ce,D,ee){for(O=ce;O<D;++O)for(ce=0;ce<ee;++ce)M[X++]=w(C[g(A[x++])])},q[a]=function(A,x,C,O,M,X,ce){var D=8>>A.b,ee=A.Ea,ae=A.K[0],ye=A.w;if(8>D)for(A=(1<<A.b)-1,ye=(1<<D)-1;x<C;++x){var ue,be=0;for(ue=0;ue<ee;++ue)ue&A||(be=g(O[M++])),X[ce++]=w(ae[be&ye]),be>>=D}else q["VP8LMapColor"+h](O,M,ae,ye,X,ce,x,C,ee)}}function jt(a,s,h,g,w){for(h=s+h;s<h;){var A=a[s++];g[w++]=A>>16&255,g[w++]=A>>8&255,g[w++]=255&A}}function kt(a,s,h,g,w){for(h=s+h;s<h;){var A=a[s++];g[w++]=A>>16&255,g[w++]=A>>8&255,g[w++]=255&A,g[w++]=A>>24&255}}function yt(a,s,h,g,w){for(h=s+h;s<h;){var A=(x=a[s++])>>16&240|x>>12&15,x=240&x|x>>28&15;g[w++]=A,g[w++]=x}}function pt(a,s,h,g,w){for(h=s+h;s<h;){var A=(x=a[s++])>>16&248|x>>13&7,x=x>>5&224|x>>3&31;g[w++]=A,g[w++]=x}}function Wt(a,s,h,g,w){for(h=s+h;s<h;){var A=a[s++];g[w++]=255&A,g[w++]=A>>8&255,g[w++]=A>>16&255}}function et(a,s,h,g,w,A){if(A==0)for(h=s+h;s<h;)Ie(g,((A=a[s++])[0]>>24|A[1]>>8&65280|A[2]<<8&16711680|A[3]<<24)>>>0),w+=32;else n(g,w,a,s,h)}function Bt(a,s){q[s][0]=q[a+"0"],q[s][1]=q[a+"1"],q[s][2]=q[a+"2"],q[s][3]=q[a+"3"],q[s][4]=q[a+"4"],q[s][5]=q[a+"5"],q[s][6]=q[a+"6"],q[s][7]=q[a+"7"],q[s][8]=q[a+"8"],q[s][9]=q[a+"9"],q[s][10]=q[a+"10"],q[s][11]=q[a+"11"],q[s][12]=q[a+"12"],q[s][13]=q[a+"13"],q[s][14]=q[a+"0"],q[s][15]=q[a+"0"]}function it(a){return a==el||a==tl||a==zo||a==rl}function dt(){this.eb=[],this.size=this.A=this.fb=0}function $t(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function St(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new dt,this.f.kb=new $t,this.sd=null}function rt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Et(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function dn(a){return alert("todo:WebPSamplerProcessPlane"),a.T}function Nr(a,s){var h=a.T,g=s.ba.f.RGBA,w=g.eb,A=g.fb+a.ka*g.A,x=gn[s.ba.S],C=a.y,O=a.O,M=a.f,X=a.N,ce=a.ea,D=a.W,ee=s.cc,ae=s.dc,ye=s.Mc,ue=s.Nc,be=a.ka,Ne=a.ka+a.T,Pe=a.U,Fe=Pe+1>>1;for(be==0?x(C,O,null,null,M,X,ce,D,M,X,ce,D,w,A,null,null,Pe):(x(s.ec,s.fc,C,O,ee,ae,ye,ue,M,X,ce,D,w,A-g.A,w,A,Pe),++h);be+2<Ne;be+=2)ee=M,ae=X,ye=ce,ue=D,X+=a.Rc,D+=a.Rc,A+=2*g.A,x(C,(O+=2*a.fa)-a.fa,C,O,ee,ae,ye,ue,M,X,ce,D,w,A-g.A,w,A,Pe);return O+=a.fa,a.j+Ne<a.o?(n(s.ec,s.fc,C,O,Pe),n(s.cc,s.dc,M,X,Fe),n(s.Mc,s.Nc,ce,D,Fe),h--):1&Ne||x(C,O,null,null,M,X,ce,D,M,X,ce,D,w,A+g.A,null,null,Pe),h}function Zr(a,s,h){var g=a.F,w=[a.J];if(g!=null){var A=a.U,x=s.ba.S,C=x==Uo||x==zo;s=s.ba.f.RGBA;var O=[0],M=a.ka;O[0]=a.T,a.Kb&&(M==0?--O[0]:(--M,w[0]-=a.width),a.j+a.ka+a.T==a.o&&(O[0]=a.o-a.j-M));var X=s.eb;M=s.fb+M*s.A,a=wu(g,w[0],a.width,A,O,X,M+(C?0:3),s.A),e(h==O),a&&it(x)&&io(X,M,C,A,O,s.A)}return 0}function fn(a){var s=a.ma,h=s.ba.S,g=11>h,w=h==qo||h==jo||h==Uo||h==Qs||h==12||it(h);if(s.memory=null,s.Ib=null,s.Jb=null,s.Nd=null,!pn(s.Oa,a,w?11:12))return 0;if(w&&it(h)&&ni(),a.da)alert("todo:use_scaling");else{if(g){if(s.Ib=dn,a.Kb){if(h=a.U+1>>1,s.memory=i(a.U+2*h),s.memory==null)return 0;s.ec=s.memory,s.fc=0,s.cc=s.ec,s.dc=s.fc+a.U,s.Mc=s.cc,s.Nc=s.dc+h,s.Ib=Nr,ni()}}else alert("todo:EmitYUV");w&&(s.Jb=Zr,g&&nr())}if(g&&!Mu){for(a=0;256>a;++a)Hf[a]=89858*(a-128)+Ho>>Vo,Gf[a]=-22014*(a-128)+Ho,$f[a]=-45773*(a-128),Wf[a]=113618*(a-128)+Ho>>Vo;for(a=oo;a<al;++a)s=76283*(a-16)+Ho>>Vo,Yf[a-oo]=Rn(s,255),Kf[a-oo]=Rn(s+8>>4,15);Mu=1}return 1}function at(a){var s=a.ma,h=a.U,g=a.T;return e(!(1&a.ka)),0>=h||0>=g?0:(h=s.Ib(a,s),s.Jb!=null&&s.Jb(a,s,h),s.Dc+=h,1)}function _n(a){a.ma.memory=null}function An(a,s,h,g){return _e(a,8)!=47?0:(s[0]=_e(a,14)+1,h[0]=_e(a,14)+1,g[0]=_e(a,1),_e(a,3)!=0?0:!a.h)}function Wr(a,s){if(4>a)return a+1;var h=a-2>>1;return(2+(1&a)<<h)+_e(s,h)+1}function Tr(a,s){return 120<s?s-120:1<=(h=((h=If[s-1])>>4)*a+(8-(15&h)))?h:1;var h}function er(a,s,h){var g=H(h),w=a[s+=255&g].g-8;return 0<w&&(te(h,h.u+8),g=H(h),s+=a[s].value,s+=g&(1<<w)-1),te(h,h.u+a[s].g),a[s].value}function sr(a,s,h){return h.g+=a.g,h.value+=a.value<<s>>>0,e(8>=h.g),a.g}function vr(a,s,h){var g=a.xc;return e((s=g==0?0:a.vc[a.md*(h>>g)+(s>>g)])<a.Wb),a.Ya[s]}function Kn(a,s,h,g){var w=a.ab,A=a.c*s,x=a.C;s=x+s;var C=h,O=g;for(g=a.Ta,h=a.Ua;0<w--;){var M=a.gc[w],X=x,ce=s,D=C,ee=O,ae=(O=g,C=h,M.Ea);switch(e(X<ce),e(ce<=M.nc),M.hc){case 2:Sa(D,ee,(ce-X)*ae,O,C);break;case 0:var ye=X,ue=ce,be=O,Ne=C,Pe=(Ye=M).Ea;ye==0&&(bi(D,ee,null,null,1,be,Ne),Nt(D,ee+1,0,0,Pe-1,be,Ne+1),ee+=Pe,Ne+=Pe,++ye);for(var Fe=1<<Ye.b,Xe=Fe-1,je=ke(Pe,Ye.b),wt=Ye.K,Ye=Ye.w+(ye>>Ye.b)*je;ye<ue;){var Ft=wt,br=Ye,_t=1;for(wi(D,ee,be,Ne-Pe,1,be,Ne);_t<Pe;){var Ke=(_t&~Xe)+Fe;Ke>Pe&&(Ke=Pe),(0,Nn[Ft[br++]>>8&15])(D,ee+ +_t,be,Ne+_t-Pe,Ke-_t,be,Ne+_t),_t=Ke}ee+=Pe,Ne+=Pe,++ye&Xe||(Ye+=je)}ce!=M.nc&&n(O,C-ae,O,C+(ce-X-1)*ae,ae);break;case 1:for(ae=D,ue=ee,Pe=(D=M.Ea)-(Ne=D&~(be=(ee=1<<M.b)-1)),ye=ke(D,M.b),Fe=M.K,M=M.w+(X>>M.b)*ye;X<ce;){for(Xe=Fe,je=M,wt=new qe,Ye=ue+Ne,Ft=ue+D;ue<Ye;)He(Xe[je++],wt),Ki(wt,ae,ue,ee,O,C),ue+=ee,C+=ee;ue<Ft&&(He(Xe[je++],wt),Ki(wt,ae,ue,Pe,O,C),ue+=Pe,C+=Pe),++X&be||(M+=ye)}break;case 3:if(D==O&&ee==C&&0<M.b){for(ue=O,D=ae=C+(ce-X)*ae-(Ne=(ce-X)*ke(M.Ea,M.b)),ee=O,be=C,ye=[],Ne=(Pe=Ne)-1;0<=Ne;--Ne)ye[Ne]=ee[be+Ne];for(Ne=Pe-1;0<=Ne;--Ne)ue[D+Ne]=ye[Ne];Yi(M,X,ce,O,ae,O,C)}else Yi(M,X,ce,D,ee,O,C)}C=g,O=h}O!=h&&n(g,h,C,O,A)}function Bn(a,s){var h=a.V,g=a.Ba+a.c*a.C,w=s-a.C;if(e(s<=a.l.o),e(16>=w),0<w){var A=a.l,x=a.Ta,C=a.Ua,O=A.width;if(Kn(a,w,h,g),w=C=[C],e((h=a.C)<(g=s)),e(A.v<A.va),g>A.o&&(g=A.o),h<A.j){var M=A.j-h;h=A.j,w[0]+=M*O}if(h>=g?h=0:(w[0]+=4*A.v,A.ka=h-A.j,A.U=A.va-A.v,A.T=g-h,h=1),h){if(C=C[0],11>(h=a.ca).S){var X=h.f.RGBA,ce=(g=h.S,w=A.U,A=A.T,M=X.eb,X.A),D=A;for(X=X.fb+a.Ma*X.A;0<D--;){var ee=x,ae=C,ye=w,ue=M,be=X;switch(g){case To:to(ee,ae,ye,ue,be);break;case qo:ro(ee,ae,ye,ue,be);break;case el:ro(ee,ae,ye,ue,be),io(ue,be,0,ye,1,0);break;case ku:Xi(ee,ae,ye,ue,be);break;case jo:et(ee,ae,ye,ue,be,1);break;case tl:et(ee,ae,ye,ue,be,1),io(ue,be,0,ye,1,0);break;case Uo:et(ee,ae,ye,ue,be,0);break;case zo:et(ee,ae,ye,ue,be,0),io(ue,be,1,ye,1,0);break;case Qs:xa(ee,ae,ye,ue,be);break;case rl:xa(ee,ae,ye,ue,be),bu(ue,be,ye,1,0);break;case Fu:Ji(ee,ae,ye,ue,be);break;default:e(0)}C+=O,X+=ce}a.Ma+=A}else alert("todo:EmitRescaledRowsYUVA");e(a.Ma<=h.height)}}a.C=s,e(a.C<=a.i)}function Qr(a){var s;if(0<a.ua)return 0;for(s=0;s<a.Wb;++s){var h=a.Ya[s].G,g=a.Ya[s].H;if(0<h[1][g[1]+0].g||0<h[2][g[2]+0].g||0<h[3][g[3]+0].g)return 0}return 1}function hn(a,s,h,g,w,A){if(a.Z!=0){var x=a.qd,C=a.rd;for(e(Si[a.Z]!=null);s<h;++s)Si[a.Z](x,C,g,w,g,w,A),x=g,C=w,w+=A;a.qd=x,a.rd=C}}function en(a,s){var h=a.l.ma,g=h.Z==0||h.Z==1?a.l.j:a.C;if(g=a.C<g?g:a.C,e(s<=a.l.o),s>g){var w=a.l.width,A=h.ca,x=h.tb+w*g,C=a.V,O=a.Ba+a.c*g,M=a.gc;e(a.ab==1),e(M[0].hc==3),Xs(M[0],g,s,C,O,A,x),hn(h,g,s,A,x,w)}a.C=a.Ma=s}function $r(a,s,h,g,w,A,x){var C=a.$/g,O=a.$%g,M=a.m,X=a.s,ce=h+a.$,D=ce;w=h+g*w;var ee=h+g*A,ae=280+X.ua,ye=a.Pb?C:16777216,ue=0<X.ua?X.Wa:null,be=X.wc,Ne=ce<ee?vr(X,O,C):null;e(a.C<A),e(ee<=w);var Pe=!1;e:for(;;){for(;Pe||ce<ee;){var Fe=0;if(C>=ye){var Xe=ce-h;e((ye=a).Pb),ye.wd=ye.m,ye.xd=Xe,0<ye.s.ua&&we(ye.s.Wa,ye.s.vb),ye=C+Ef}if(O&be||(Ne=vr(X,O,C)),e(Ne!=null),Ne.Qb&&(s[ce]=Ne.qb,Pe=!0),!Pe)if(se(M),Ne.jc){Fe=M,Xe=s;var je=ce,wt=Ne.pd[H(Fe)&Aa-1];e(Ne.jc),256>wt.g?(te(Fe,Fe.u+wt.g),Xe[je]=wt.value,Fe=0):(te(Fe,Fe.u+wt.g-256),e(256<=wt.value),Fe=wt.value),Fe==0&&(Pe=!0)}else Fe=er(Ne.G[0],Ne.H[0],M);if(M.h)break;if(Pe||256>Fe){if(!Pe)if(Ne.nd)s[ce]=(Ne.qb|Fe<<8)>>>0;else{if(se(M),Pe=er(Ne.G[1],Ne.H[1],M),se(M),Xe=er(Ne.G[2],Ne.H[2],M),je=er(Ne.G[3],Ne.H[3],M),M.h)break;s[ce]=(je<<24|Pe<<16|Fe<<8|Xe)>>>0}if(Pe=!1,++ce,++O>=g&&(O=0,++C,x!=null&&C<=A&&!(C%16)&&x(a,C),ue!=null))for(;D<ce;)Fe=s[D++],ue.X[(506832829*Fe&4294967295)>>>ue.Mb]=Fe}else if(280>Fe){if(Fe=Wr(Fe-256,M),Xe=er(Ne.G[4],Ne.H[4],M),se(M),Xe=Tr(g,Xe=Wr(Xe,M)),M.h)break;if(ce-h<Xe||w-ce<Fe)break e;for(je=0;je<Fe;++je)s[ce+je]=s[ce+je-Xe];for(ce+=Fe,O+=Fe;O>=g;)O-=g,++C,x!=null&&C<=A&&!(C%16)&&x(a,C);if(e(ce<=w),O&be&&(Ne=vr(X,O,C)),ue!=null)for(;D<ce;)Fe=s[D++],ue.X[(506832829*Fe&4294967295)>>>ue.Mb]=Fe}else{if(!(Fe<ae))break e;for(Pe=Fe-280,e(ue!=null);D<ce;)Fe=s[D++],ue.X[(506832829*Fe&4294967295)>>>ue.Mb]=Fe;Fe=ce,e(!(Pe>>>(Xe=ue).Xa)),s[Fe]=Xe.X[Pe],Pe=!0}Pe||e(M.h==J(M))}if(a.Pb&&M.h&&ce<w)e(a.m.h),a.a=5,a.m=a.wd,a.$=a.xd,0<a.s.ua&&we(a.s.vb,a.s.Wa);else{if(M.h)break e;x?.(a,C>A?A:C),a.a=0,a.$=ce-h}return 1}return a.a=3,0}function Gr(a){e(a!=null),a.vc=null,a.yc=null,a.Ya=null;var s=a.Wa;s!=null&&(s.X=null),a.vb=null,e(a!=null)}function Jn(){var a=new $e;return a==null?null:(a.a=0,a.xb=Cu,Bt("Predictor","VP8LPredictors"),Bt("Predictor","VP8LPredictors_C"),Bt("PredictorAdd","VP8LPredictorsAdd"),Bt("PredictorAdd","VP8LPredictorsAdd_C"),Sa=Lt,Ki=st,to=jt,ro=kt,xa=yt,Ji=pt,Xi=Wt,q.VP8LMapColor32b=gr,q.VP8LMapColor8b=jn,a)}function j(a,s,h,g,w){var A=1,x=[a],C=[s],O=g.m,M=g.s,X=null,ce=0;e:for(;;){if(h)for(;A&&_e(O,1);){var D=x,ee=C,ae=g,ye=1,ue=ae.m,be=ae.gc[ae.ab],Ne=_e(ue,2);if(ae.Oc&1<<Ne)A=0;else{switch(ae.Oc|=1<<Ne,be.hc=Ne,be.Ea=D[0],be.nc=ee[0],be.K=[null],++ae.ab,e(4>=ae.ab),Ne){case 0:case 1:be.b=_e(ue,3)+2,ye=j(ke(be.Ea,be.b),ke(be.nc,be.b),0,ae,be.K),be.K=be.K[0];break;case 3:var Pe,Fe=_e(ue,8)+1,Xe=16<Fe?0:4<Fe?1:2<Fe?2:3;if(D[0]=ke(be.Ea,Xe),be.b=Xe,Pe=ye=j(Fe,1,0,ae,be.K)){var je,wt=Fe,Ye=be,Ft=1<<(8>>Ye.b),br=i(Ft);if(br==null)Pe=0;else{var _t=Ye.K[0],Ke=Ye.w;for(br[0]=Ye.K[0][0],je=1;je<1*wt;++je)br[je]=tt(_t[Ke+je],br[je-1]);for(;je<4*Ft;++je)br[je]=0;Ye.K[0]=null,Ye.K[0]=br,Pe=1}}ye=Pe;break;case 2:break;default:e(0)}A=ye}}if(x=x[0],C=C[0],A&&_e(O,1)&&!(A=1<=(ce=_e(O,4))&&11>=ce)){g.a=3;break e}var Be;if(Be=A)t:{var ur,vt,It,Zt=g,kr=x,zr=C,ir=ce,Or=h,Vr=Zt.m,wr=Zt.s,Ot=[null],Rt=1,ar=0,Mt=Cf[ir];r:for(;;){if(Or&&_e(Vr,1)){var Fr=_e(Vr,3)+2,xn=ke(kr,Fr),cr=ke(zr,Fr),Kr=xn*cr;if(!j(xn,cr,0,Zt,Ot))break r;for(Ot=Ot[0],wr.xc=Fr,ur=0;ur<Kr;++ur){var Vt=Ot[ur]>>8&65535;Ot[ur]=Vt,Vt>=Rt&&(Rt=Vt+1)}}if(Vr.h)break r;for(vt=0;5>vt;++vt){var _r=Pu[vt];!vt&&0<ir&&(_r+=1<<ir),ar<_r&&(ar=_r)}var nn=d(Rt*Mt,U),Hr=Rt,an=d(Hr,Y);if(an==null)var on=null;else e(65536>=Hr),on=an;var Jr=i(ar);if(on==null||Jr==null||nn==null){Zt.a=1;break r}var sn=nn;for(ur=It=0;ur<Rt;++ur){var Kt=on[ur],ln=Kt.G,Ln=Kt.H,Zi=0,si=1,Pr=0;for(vt=0;5>vt;++vt){_r=Pu[vt],ln[vt]=sn,Ln[vt]=It,!vt&&0<ir&&(_r+=1<<ir);i:{var $o,ol=_r,Go=Zt,so=Jr,Zf=sn,Qf=It,sl=0,xi=Go.m,eh=_e(xi,1);if(o(so,0,0,ol),eh){var th=_e(xi,1)+1,rh=_e(xi,1),qu=_e(xi,rh==0?1:8);so[qu]=1,th==2&&(so[qu=_e(xi,8)]=1);var Yo=1}else{var ju=i(19),Uu=_e(xi,4)+4;if(19<Uu){Go.a=3;var Ko=0;break i}for($o=0;$o<Uu;++$o)ju[Pf[$o]]=_e(xi,3);var ll=void 0,lo=void 0,zu=Go,nh=ju,Jo=ol,Vu=so,ul=0,Li=zu.m,Hu=8,Wu=d(128,U);n:for(;I(Wu,0,7,nh,19);){if(_e(Li,1)){var ih=2+2*_e(Li,3);if((ll=2+_e(Li,ih))>Jo)break n}else ll=Jo;for(lo=0;lo<Jo&&ll--;){se(Li);var $u=Wu[0+(127&H(Li))];te(Li,Li.u+$u.g);var Fa=$u.value;if(16>Fa)Vu[lo++]=Fa,Fa!=0&&(Hu=Fa);else{var ah=Fa==16,Gu=Fa-16,oh=kf[Gu],Yu=_e(Li,Lf[Gu])+oh;if(lo+Yu>Jo)break n;for(var sh=ah?Hu:0;0<Yu--;)Vu[lo++]=sh}}ul=1;break n}ul||(zu.a=3),Yo=ul}(Yo=Yo&&!xi.h)&&(sl=I(Zf,Qf,8,so,ol)),Yo&&sl!=0?Ko=sl:(Go.a=3,Ko=0)}if(Ko==0)break r;if(si&&Ff[vt]==1&&(si=sn[It].g==0),Zi+=sn[It].g,It+=Ko,3>=vt){var uo,cl=Jr[0];for(uo=1;uo<_r;++uo)Jr[uo]>cl&&(cl=Jr[uo]);Pr+=cl}}if(Kt.nd=si,Kt.Qb=0,si&&(Kt.qb=(ln[3][Ln[3]+0].value<<24|ln[1][Ln[1]+0].value<<16|ln[2][Ln[2]+0].value)>>>0,Zi==0&&256>ln[0][Ln[0]+0].value&&(Kt.Qb=1,Kt.qb+=ln[0][Ln[0]+0].value<<8)),Kt.jc=!Kt.Qb&&6>Pr,Kt.jc){var Xo,li=Kt;for(Xo=0;Xo<Aa;++Xo){var ki=Xo,Fi=li.pd[ki],Zo=li.G[0][li.H[0]+ki];256<=Zo.value?(Fi.g=Zo.g+256,Fi.value=Zo.value):(Fi.g=0,Fi.value=0,ki>>=sr(Zo,8,Fi),ki>>=sr(li.G[1][li.H[1]+ki],16,Fi),ki>>=sr(li.G[2][li.H[2]+ki],0,Fi),sr(li.G[3][li.H[3]+ki],24,Fi))}}}wr.vc=Ot,wr.Wb=Rt,wr.Ya=on,wr.yc=nn,Be=1;break t}Be=0}if(!(A=Be)){g.a=3;break e}if(0<ce){if(M.ua=1<<ce,!B(M.Wa,ce)){g.a=1,A=0;break e}}else M.ua=0;var dl=g,Ku=x,lh=C,fl=dl.s,hl=fl.xc;if(dl.c=Ku,dl.i=lh,fl.md=ke(Ku,hl),fl.wc=hl==0?-1:(1<<hl)-1,h){g.xb=qf;break e}if((X=i(x*C))==null){g.a=1,A=0;break e}A=(A=$r(g,X,0,x,C,C,null))&&!O.h;break e}return A?(w!=null?w[0]=X:(e(X==null),e(h)),g.$=0,h||Gr(M)):Gr(M),A}function P(a,s){var h=a.c*a.i,g=h+s+16*s;return e(a.c<=s),a.V=i(g),a.V==null?(a.Ta=null,a.Ua=0,a.a=1,0):(a.Ta=a.V,a.Ua=a.Ba+h+s,1)}function Se(a,s){var h=a.C,g=s-h,w=a.V,A=a.Ba+a.c*h;for(e(s<=a.l.o);0<g;){var x=16<g?16:g,C=a.l.ma,O=a.l.width,M=O*x,X=C.ca,ce=C.tb+O*h,D=a.Ta,ee=a.Ua;Kn(a,x,w,A),_u(D,ee,X,ce,M),hn(C,h,h+x,X,ce,O),g-=x,w+=x*a.c,h+=x}e(h==s),a.C=a.Ma=s}function K(){this.ub=this.yd=this.td=this.Rb=0}function Ce(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ee(){this.Fb=this.Bb=this.Cb=0,this.Zb=i(4),this.Lb=i(4)}function Qe(){this.Yb=(function(){var a=[];return(function s(h,g,w){for(var A=w[g],x=0;x<A&&(h.push(w.length>g+1?[]:0),!(w.length<g+1));x++)s(h[x],g+1,w)})(a,0,[3,11]),a})()}function Jt(){this.jb=i(3),this.Wc=l([4,8],Qe),this.Xc=l([4,17],Qe)}function Sr(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new i(4),this.od=new i(4)}function qr(){this.ld=this.La=this.dd=this.tc=0}function Xn(){this.Na=this.la=0}function ua(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Di(){this.ad=i(384),this.Za=0,this.Ob=i(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Ao(){this.uc=this.M=this.Nb=0,this.wa=Array(new qr),this.Y=0,this.ya=Array(new Di),this.aa=0,this.l=new ca}function No(){this.y=i(16),this.f=i(8),this.ea=i(8)}function So(){this.cb=this.a=0,this.sc="",this.m=new N,this.Od=new K,this.Kc=new Ce,this.ed=new Sr,this.Qa=new Ee,this.Ic=this.$c=this.Aa=0,this.D=new Ao,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=d(8,N),this.ia=0,this.pb=d(4,ua),this.Pa=new Jt,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new No),this.Hd=0,this.rb=Array(new Xn),this.sb=0,this.wa=Array(new qr),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Di),this.L=this.aa=0,this.gd=l([4,2],qr),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Rn(a,s){return 0>a?0:a>s?s:a}function ca(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Bs(){var a=new So;return a!=null&&(a.a=0,a.sc="OK",a.cb=0,a.Xb=0,ao||(ao=da)),a}function pr(a,s,h){return a.a==0&&(a.a=s,a.sc=h,a.cb=0),0}function xo(a,s,h){return 3<=h&&a[s+0]==157&&a[s+1]==1&&a[s+2]==42}function Mn(a,s){if(a==null)return 0;if(a.a=0,a.sc="OK",s==null)return pr(a,2,"null VP8Io passed to VP8GetHeaders()");var h=s.data,g=s.w,w=s.ha;if(4>w)return pr(a,7,"Truncated header.");var A=h[g+0]|h[g+1]<<8|h[g+2]<<16,x=a.Od;if(x.Rb=!(1&A),x.td=A>>1&7,x.yd=A>>4&1,x.ub=A>>5,3<x.td)return pr(a,3,"Incorrect keyframe parameters.");if(!x.yd)return pr(a,4,"Frame not displayable.");g+=3,w-=3;var C=a.Kc;if(x.Rb){if(7>w)return pr(a,7,"cannot parse picture header");if(!xo(h,g,w))return pr(a,3,"Bad code word");C.c=16383&(h[g+4]<<8|h[g+3]),C.Td=h[g+4]>>6,C.i=16383&(h[g+6]<<8|h[g+5]),C.Ud=h[g+6]>>6,g+=7,w-=7,a.za=C.c+15>>4,a.Ub=C.i+15>>4,s.width=C.c,s.height=C.i,s.Da=0,s.j=0,s.v=0,s.va=s.width,s.o=s.height,s.da=0,s.ib=s.width,s.hb=s.height,s.U=s.width,s.T=s.height,o((A=a.Pa).jb,0,255,A.jb.length),e((A=a.Qa)!=null),A.Cb=0,A.Bb=0,A.Fb=1,o(A.Zb,0,0,A.Zb.length),o(A.Lb,0,0,A.Lb)}if(x.ub>w)return pr(a,7,"bad partition length");ie(A=a.m,h,g,x.ub),g+=x.ub,w-=x.ub,x.Rb&&(C.Ld=ge(A),C.Kd=ge(A)),C=a.Qa;var O,M=a.Pa;if(e(A!=null),e(C!=null),C.Cb=ge(A),C.Cb){if(C.Bb=ge(A),ge(A)){for(C.Fb=ge(A),O=0;4>O;++O)C.Zb[O]=ge(A)?Z(A,7):0;for(O=0;4>O;++O)C.Lb[O]=ge(A)?Z(A,6):0}if(C.Bb)for(O=0;3>O;++O)M.jb[O]=ge(A)?oe(A,8):255}else C.Bb=0;if(A.Ka)return pr(a,3,"cannot parse segment header");if((C=a.ed).zd=ge(A),C.Tb=oe(A,6),C.wb=oe(A,3),C.Pc=ge(A),C.Pc&&ge(A)){for(M=0;4>M;++M)ge(A)&&(C.vd[M]=Z(A,6));for(M=0;4>M;++M)ge(A)&&(C.od[M]=Z(A,6))}if(a.L=C.Tb==0?0:C.zd?1:2,A.Ka)return pr(a,3,"cannot parse filter header");var X=w;if(w=O=g,g=O+X,C=X,a.Xb=(1<<oe(a.m,2))-1,X<3*(M=a.Xb))h=7;else{for(O+=3*M,C-=3*M,X=0;X<M;++X){var ce=h[w+0]|h[w+1]<<8|h[w+2]<<16;ce>C&&(ce=C),ie(a.Jc[+X],h,O,ce),O+=ce,C-=ce,w+=3}ie(a.Jc[+M],h,O,C),h=O<g?0:5}if(h!=0)return pr(a,h,"cannot parse partitions");for(h=oe(O=a.m,7),w=ge(O)?Z(O,4):0,g=ge(O)?Z(O,4):0,C=ge(O)?Z(O,4):0,M=ge(O)?Z(O,4):0,O=ge(O)?Z(O,4):0,X=a.Qa,ce=0;4>ce;++ce){if(X.Cb){var D=X.Zb[ce];X.Fb||(D+=h)}else{if(0<ce){a.pb[ce]=a.pb[0];continue}D=h}var ee=a.pb[ce];ee.Sc[0]=nl[Rn(D+w,127)],ee.Sc[1]=il[Rn(D+0,127)],ee.Eb[0]=2*nl[Rn(D+g,127)],ee.Eb[1]=101581*il[Rn(D+C,127)]>>16,8>ee.Eb[1]&&(ee.Eb[1]=8),ee.Qc[0]=nl[Rn(D+M,117)],ee.Qc[1]=il[Rn(D+O,127)],ee.lc=D+O}if(!x.Rb)return pr(a,4,"Not a key frame.");for(ge(A),x=a.Pa,h=0;4>h;++h){for(w=0;8>w;++w)for(g=0;3>g;++g)for(C=0;11>C;++C)M=xe(A,Df[h][w][g][C])?oe(A,8):Rf[h][w][g][C],x.Wc[h][w].Yb[g][C]=M;for(w=0;17>w;++w)x.Xc[h][w]=x.Wc[h][Tf[w]]}return a.kc=ge(A),a.kc&&(a.Bd=oe(A,8)),a.cb=1}function da(a,s,h,g,w,A,x){var C=s[w].Yb[h];for(h=0;16>w;++w){if(!xe(a,C[h+0]))return w;for(;!xe(a,C[h+1]);)if(C=s[++w].Yb[0],h=0,w==16)return 16;var O=s[w+1].Yb;if(xe(a,C[h+2])){var M=a,X=0;if(xe(M,(D=C)[(ce=h)+3]))if(xe(M,D[ce+6])){for(C=0,ce=2*(X=xe(M,D[ce+8]))+(D=xe(M,D[ce+9+X])),X=0,D=Of[ce];D[C];++C)X+=X+xe(M,D[C]);X+=3+(8<<ce)}else xe(M,D[ce+7])?(X=7+2*xe(M,165),X+=xe(M,145)):X=5+xe(M,159);else X=xe(M,D[ce+4])?3+xe(M,D[ce+5]):2;C=O[2]}else X=1,C=O[1];O=x+Bf[w],0>(M=a).b&&pe(M);var ce,D=M.b,ee=(ce=M.Ca>>1)-(M.I>>D)>>31;--M.b,M.Ca+=ee,M.Ca|=1,M.I-=(ce+1&ee)<<D,A[O]=((X^ee)-ee)*g[(0<w)+0]}return 16}function Ha(a){var s=a.rb[a.sb-1];s.la=0,s.Na=0,o(a.zc,0,0,a.zc.length),a.ja=0}function tn(a,s,h,g,w){w=a[s+h+32*g]+(w>>3),a[s+h+32*g]=-256&w?0>w?0:255:w}function fa(a,s,h,g,w,A){tn(a,s,0,h,g+w),tn(a,s,1,h,g+A),tn(a,s,2,h,g-A),tn(a,s,3,h,g-w)}function Zn(a){return(20091*a>>16)+a}function Lr(a,s,h,g){var w,A=0,x=i(16);for(w=0;4>w;++w){var C=a[s+0]+a[s+8],O=a[s+0]-a[s+8],M=(35468*a[s+4]>>16)-Zn(a[s+12]),X=Zn(a[s+4])+(35468*a[s+12]>>16);x[A+0]=C+X,x[A+1]=O+M,x[A+2]=O-M,x[A+3]=C-X,A+=4,s++}for(w=A=0;4>w;++w)C=(a=x[A+0]+4)+x[A+8],O=a-x[A+8],M=(35468*x[A+4]>>16)-Zn(x[A+12]),tn(h,g,0,0,C+(X=Zn(x[A+4])+(35468*x[A+12]>>16))),tn(h,g,1,0,O+M),tn(h,g,2,0,O-M),tn(h,g,3,0,C-X),A++,g+=32}function Lo(a,s,h,g){var w=a[s+0]+4,A=35468*a[s+4]>>16,x=Zn(a[s+4]),C=35468*a[s+1]>>16;fa(h,g,0,w+x,a=Zn(a[s+1]),C),fa(h,g,1,w+A,a,C),fa(h,g,2,w-A,a,C),fa(h,g,3,w-x,a,C)}function Rs(a,s,h,g,w){Lr(a,s,h,g),w&&Lr(a,s+16,h,g+4)}function Ms(a,s,h,g){ii(a,s+0,h,g,1),ii(a,s+32,h,g+128,1)}function Ds(a,s,h,g){var w;for(a=a[s+0]+4,w=0;4>w;++w)for(s=0;4>s;++s)tn(h,g,s,w,a)}function Dn(a,s,h,g){a[s+0]&&Er(a,s+0,h,g),a[s+16]&&Er(a,s+16,h,g+4),a[s+32]&&Er(a,s+32,h,g+128),a[s+48]&&Er(a,s+48,h,g+128+4)}function ko(a,s,h,g){var w,A=i(16);for(w=0;4>w;++w){var x=a[s+0+w]+a[s+12+w],C=a[s+4+w]+a[s+8+w],O=a[s+4+w]-a[s+8+w],M=a[s+0+w]-a[s+12+w];A[0+w]=x+C,A[8+w]=x-C,A[4+w]=M+O,A[12+w]=M-O}for(w=0;4>w;++w)x=(a=A[0+4*w]+3)+A[3+4*w],C=A[1+4*w]+A[2+4*w],O=A[1+4*w]-A[2+4*w],M=a-A[3+4*w],h[g+0]=x+C>>3,h[g+16]=M+O>>3,h[g+32]=x-C>>3,h[g+48]=M-O>>3,g+=64}function ha(a,s,h){var g,w=s-32,A=rn,x=255-a[w-1];for(g=0;g<h;++g){var C,O=A,M=x+a[s-1];for(C=0;C<h;++C)a[s+C]=O[M+a[w+C]];s+=32}}function pa(a,s){ha(a,s,4)}function Wa(a,s){ha(a,s,8)}function Ts(a,s){ha(a,s,16)}function qs(a,s){var h;for(h=0;16>h;++h)n(a,s+32*h,a,s-32,16)}function js(a,s){var h;for(h=16;0<h;--h)o(a,s,a[s-1],16),s+=32}function mi(a,s,h){var g;for(g=0;16>g;++g)o(s,h+32*g,a,16)}function Fo(a,s){var h,g=16;for(h=0;16>h;++h)g+=a[s-1+32*h]+a[s+h-32];mi(g>>5,a,s)}function gi(a,s){var h,g=8;for(h=0;16>h;++h)g+=a[s-1+32*h];mi(g>>4,a,s)}function Us(a,s){var h,g=8;for(h=0;16>h;++h)g+=a[s+h-32];mi(g>>4,a,s)}function Ti(a,s){mi(128,a,s)}function lt(a,s,h){return a+2*s+h+2>>2}function zs(a,s){var h,g=s-32;for(g=new Uint8Array([lt(a[g-1],a[g+0],a[g+1]),lt(a[g+0],a[g+1],a[g+2]),lt(a[g+1],a[g+2],a[g+3]),lt(a[g+2],a[g+3],a[g+4])]),h=0;4>h;++h)n(a,s+32*h,g,0,g.length)}function Vs(a,s){var h=a[s-1],g=a[s-1+32],w=a[s-1+64],A=a[s-1+96];Ie(a,s+0,16843009*lt(a[s-1-32],h,g)),Ie(a,s+32,16843009*lt(h,g,w)),Ie(a,s+64,16843009*lt(g,w,A)),Ie(a,s+96,16843009*lt(w,A,A))}function Hs(a,s){var h,g=4;for(h=0;4>h;++h)g+=a[s+h-32]+a[s-1+32*h];for(g>>=3,h=0;4>h;++h)o(a,s+32*h,g,4)}function Ws(a,s){var h=a[s-1+0],g=a[s-1+32],w=a[s-1+64],A=a[s-1-32],x=a[s+0-32],C=a[s+1-32],O=a[s+2-32],M=a[s+3-32];a[s+0+96]=lt(g,w,a[s-1+96]),a[s+1+96]=a[s+0+64]=lt(h,g,w),a[s+2+96]=a[s+1+64]=a[s+0+32]=lt(A,h,g),a[s+3+96]=a[s+2+64]=a[s+1+32]=a[s+0+0]=lt(x,A,h),a[s+3+64]=a[s+2+32]=a[s+1+0]=lt(C,x,A),a[s+3+32]=a[s+2+0]=lt(O,C,x),a[s+3+0]=lt(M,O,C)}function $s(a,s){var h=a[s+1-32],g=a[s+2-32],w=a[s+3-32],A=a[s+4-32],x=a[s+5-32],C=a[s+6-32],O=a[s+7-32];a[s+0+0]=lt(a[s+0-32],h,g),a[s+1+0]=a[s+0+32]=lt(h,g,w),a[s+2+0]=a[s+1+32]=a[s+0+64]=lt(g,w,A),a[s+3+0]=a[s+2+32]=a[s+1+64]=a[s+0+96]=lt(w,A,x),a[s+3+32]=a[s+2+64]=a[s+1+96]=lt(A,x,C),a[s+3+64]=a[s+2+96]=lt(x,C,O),a[s+3+96]=lt(C,O,O)}function Qn(a,s){var h=a[s-1+0],g=a[s-1+32],w=a[s-1+64],A=a[s-1-32],x=a[s+0-32],C=a[s+1-32],O=a[s+2-32],M=a[s+3-32];a[s+0+0]=a[s+1+64]=A+x+1>>1,a[s+1+0]=a[s+2+64]=x+C+1>>1,a[s+2+0]=a[s+3+64]=C+O+1>>1,a[s+3+0]=O+M+1>>1,a[s+0+96]=lt(w,g,h),a[s+0+64]=lt(g,h,A),a[s+0+32]=a[s+1+96]=lt(h,A,x),a[s+1+32]=a[s+2+96]=lt(A,x,C),a[s+2+32]=a[s+3+96]=lt(x,C,O),a[s+3+32]=lt(C,O,M)}function ei(a,s){var h=a[s+0-32],g=a[s+1-32],w=a[s+2-32],A=a[s+3-32],x=a[s+4-32],C=a[s+5-32],O=a[s+6-32],M=a[s+7-32];a[s+0+0]=h+g+1>>1,a[s+1+0]=a[s+0+64]=g+w+1>>1,a[s+2+0]=a[s+1+64]=w+A+1>>1,a[s+3+0]=a[s+2+64]=A+x+1>>1,a[s+0+32]=lt(h,g,w),a[s+1+32]=a[s+0+96]=lt(g,w,A),a[s+2+32]=a[s+1+96]=lt(w,A,x),a[s+3+32]=a[s+2+96]=lt(A,x,C),a[s+3+64]=lt(x,C,O),a[s+3+96]=lt(C,O,M)}function Gs(a,s){var h=a[s-1+0],g=a[s-1+32],w=a[s-1+64],A=a[s-1+96];a[s+0+0]=h+g+1>>1,a[s+2+0]=a[s+0+32]=g+w+1>>1,a[s+2+32]=a[s+0+64]=w+A+1>>1,a[s+1+0]=lt(h,g,w),a[s+3+0]=a[s+1+32]=lt(g,w,A),a[s+3+32]=a[s+1+64]=lt(w,A,A),a[s+3+64]=a[s+2+64]=a[s+0+96]=a[s+1+96]=a[s+2+96]=a[s+3+96]=A}function Ys(a,s){var h=a[s-1+0],g=a[s-1+32],w=a[s-1+64],A=a[s-1+96],x=a[s-1-32],C=a[s+0-32],O=a[s+1-32],M=a[s+2-32];a[s+0+0]=a[s+2+32]=h+x+1>>1,a[s+0+32]=a[s+2+64]=g+h+1>>1,a[s+0+64]=a[s+2+96]=w+g+1>>1,a[s+0+96]=A+w+1>>1,a[s+3+0]=lt(C,O,M),a[s+2+0]=lt(x,C,O),a[s+1+0]=a[s+3+32]=lt(h,x,C),a[s+1+32]=a[s+3+64]=lt(g,h,x),a[s+1+64]=a[s+3+96]=lt(w,g,h),a[s+1+96]=lt(A,w,g)}function ma(a,s){var h;for(h=0;8>h;++h)n(a,s+32*h,a,s-32,8)}function $a(a,s){var h;for(h=0;8>h;++h)o(a,s,a[s-1],8),s+=32}function Tn(a,s,h){var g;for(g=0;8>g;++g)o(s,h+32*g,a,8)}function Ks(a,s){var h,g=8;for(h=0;8>h;++h)g+=a[s+h-32]+a[s-1+32*h];Tn(g>>4,a,s)}function ga(a,s){var h,g=4;for(h=0;8>h;++h)g+=a[s+h-32];Tn(g>>3,a,s)}function Js(a,s){var h,g=4;for(h=0;8>h;++h)g+=a[s-1+32*h];Tn(g>>3,a,s)}function Ga(a,s){Tn(128,a,s)}function vi(a,s,h){var g=a[s-h],w=a[s+0],A=3*(w-g)+Zs[1020+a[s-2*h]-a[s+h]],x=Do[112+(A+4>>3)];a[s-h]=rn[255+g+Do[112+(A+3>>3)]],a[s+0]=rn[255+w-x]}function Ya(a,s,h,g){var w=a[s+0],A=a[s+h];return mn[255+a[s-2*h]-a[s-h]]>g||mn[255+A-w]>g}function qi(a,s,h,g){return 4*mn[255+a[s-h]-a[s+0]]+mn[255+a[s-2*h]-a[s+h]]<=g}function Ka(a,s,h,g,w){var A=a[s-3*h],x=a[s-2*h],C=a[s-h],O=a[s+0],M=a[s+h],X=a[s+2*h],ce=a[s+3*h];return 4*mn[255+C-O]+mn[255+x-M]>g?0:mn[255+a[s-4*h]-A]<=w&&mn[255+A-x]<=w&&mn[255+x-C]<=w&&mn[255+ce-X]<=w&&mn[255+X-M]<=w&&mn[255+M-O]<=w}function va(a,s,h,g){var w=2*g+1;for(g=0;16>g;++g)qi(a,s+g,h,w)&&vi(a,s+g,h)}function Ja(a,s,h,g){var w=2*g+1;for(g=0;16>g;++g)qi(a,s+g*h,1,w)&&vi(a,s+g*h,1)}function ya(a,s,h,g){var w;for(w=3;0<w;--w)va(a,s+=4*h,h,g)}function Po(a,s,h,g){var w;for(w=3;0<w;--w)Ja(a,s+=4,h,g)}function ti(a,s,h,g,w,A,x,C){for(A=2*A+1;0<w--;){if(Ka(a,s,h,A,x))if(Ya(a,s,h,C))vi(a,s,h);else{var O=a,M=s,X=h,ce=O[M-2*X],D=O[M-X],ee=O[M+0],ae=O[M+X],ye=O[M+2*X],ue=27*(Ne=Zs[1020+3*(ee-D)+Zs[1020+ce-ae]])+63>>7,be=18*Ne+63>>7,Ne=9*Ne+63>>7;O[M-3*X]=rn[255+O[M-3*X]+Ne],O[M-2*X]=rn[255+ce+be],O[M-X]=rn[255+D+ue],O[M+0]=rn[255+ee-ue],O[M+X]=rn[255+ae-be],O[M+2*X]=rn[255+ye-Ne]}s+=g}}function ri(a,s,h,g,w,A,x,C){for(A=2*A+1;0<w--;){if(Ka(a,s,h,A,x))if(Ya(a,s,h,C))vi(a,s,h);else{var O=a,M=s,X=h,ce=O[M-X],D=O[M+0],ee=O[M+X],ae=Do[112+(4+(ye=3*(D-ce))>>3)],ye=Do[112+(ye+3>>3)],ue=ae+1>>1;O[M-2*X]=rn[255+O[M-2*X]+ue],O[M-X]=rn[255+ce+ye],O[M+0]=rn[255+D-ae],O[M+X]=rn[255+ee-ue]}s+=g}}function Io(a,s,h,g,w,A){ti(a,s,h,1,16,g,w,A)}function Co(a,s,h,g,w,A){ti(a,s,1,h,16,g,w,A)}function Eo(a,s,h,g,w,A){var x;for(x=3;0<x;--x)ri(a,s+=4*h,h,1,16,g,w,A)}function ji(a,s,h,g,w,A){var x;for(x=3;0<x;--x)ri(a,s+=4,1,h,16,g,w,A)}function Oo(a,s,h,g,w,A,x,C){ti(a,s,w,1,8,A,x,C),ti(h,g,w,1,8,A,x,C)}function u(a,s,h,g,w,A,x,C){ti(a,s,1,w,8,A,x,C),ti(h,g,1,w,8,A,x,C)}function b(a,s,h,g,w,A,x,C){ri(a,s+4*w,w,1,8,A,x,C),ri(h,g+4*w,w,1,8,A,x,C)}function R(a,s,h,g,w,A,x,C){ri(a,s+4,1,w,8,A,x,C),ri(h,g+4,1,w,8,A,x,C)}function $(){this.ba=new St,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Et,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function re(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function ve(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Le(){this.ua=0,this.Wa=new ot,this.vb=new ot,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new Y,this.yc=new U}function $e(){this.xb=this.a=0,this.l=new ca,this.ca=new St,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new z,this.Pb=0,this.wd=new z,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Le,this.ab=0,this.gc=d(4,ve),this.Oc=0}function ze(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new ca,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ft(a,s,h,g,w,A,x){for(a=a==null?0:a[s+0],s=0;s<x;++s)w[A+s]=a+h[g+s]&255,a=w[A+s]}function gt(a,s,h,g,w,A,x){var C;if(a==null)ft(null,null,h,g,w,A,x);else for(C=0;C<x;++C)w[A+C]=a[s+C]+h[g+C]&255}function Pt(a,s,h,g,w,A,x){if(a==null)ft(null,null,h,g,w,A,x);else{var C,O=a[s+0],M=O,X=O;for(C=0;C<x;++C)M=X+(O=a[s+C])-M,X=h[g+C]+(-256&M?0>M?0:255:M)&255,M=O,w[A+C]=X}}function mr(a,s,h,g){var w=s.width,A=s.o;if(e(a!=null&&s!=null),0>h||0>=g||h+g>A)return null;if(!a.Cc){if(a.ga==null){var x;if(a.ga=new ze,(x=a.ga==null)||(x=s.width*s.o,e(a.Gb.length==0),a.Gb=i(x),a.Uc=0,a.Gb==null?x=0:(a.mb=a.Gb,a.nb=a.Uc,a.rc=null,x=1),x=!x),!x){x=a.ga;var C=a.Fa,O=a.P,M=a.qc,X=a.mb,ce=a.nb,D=O+1,ee=M-1,ae=x.l;if(e(C!=null&&X!=null&&s!=null),Si[0]=null,Si[1]=ft,Si[2]=gt,Si[3]=Pt,x.ca=X,x.tb=ce,x.c=s.width,x.i=s.height,e(0<x.c&&0<x.i),1>=M)s=0;else if(x.$a=3&C[O+0],x.Z=C[O+0]>>2&3,x.Lc=C[O+0]>>4&3,O=C[O+0]>>6&3,0>x.$a||1<x.$a||4<=x.Z||1<x.Lc||O)s=0;else if(ae.put=at,ae.ac=fn,ae.bc=_n,ae.ma=x,ae.width=s.width,ae.height=s.height,ae.Da=s.Da,ae.v=s.v,ae.va=s.va,ae.j=s.j,ae.o=s.o,x.$a)e:{e(x.$a==1),s=Jn();t:for(;;){if(s==null){s=0;break e}if(e(x!=null),x.mc=s,s.c=x.c,s.i=x.i,s.l=x.l,s.l.ma=x,s.l.width=x.c,s.l.height=x.i,s.a=0,le(s.m,C,D,ee),!j(x.c,x.i,1,s,null)||(s.ab==1&&s.gc[0].hc==3&&Qr(s.s)?(x.ic=1,C=s.c*s.i,s.Ta=null,s.Ua=0,s.V=i(C),s.Ba=0,s.V==null?(s.a=1,s=0):s=1):(x.ic=0,s=P(s,x.c)),!s))break t;s=1;break e}x.mc=null,s=0}else s=ee>=x.c*x.i;x=!s}if(x)return null;a.ga.Lc!=1?a.Ga=0:g=A-h}e(a.ga!=null),e(h+g<=A);e:{if(s=(C=a.ga).c,A=C.l.o,C.$a==0){if(D=a.rc,ee=a.Vc,ae=a.Fa,O=a.P+1+h*s,M=a.mb,X=a.nb+h*s,e(O<=a.P+a.qc),C.Z!=0)for(e(Si[C.Z]!=null),x=0;x<g;++x)Si[C.Z](D,ee,ae,O,M,X,s),D=M,ee=X,X+=s,O+=s;else for(x=0;x<g;++x)n(M,X,ae,O,s),D=M,ee=X,X+=s,O+=s;a.rc=D,a.Vc=ee}else{if(e(C.mc!=null),s=h+g,e((x=C.mc)!=null),e(s<=x.i),x.C>=s)s=1;else if(C.ic||nr(),C.ic){C=x.V,D=x.Ba,ee=x.c;var ye=x.i,ue=(ae=1,O=x.$/ee,M=x.$%ee,X=x.m,ce=x.s,x.$),be=ee*ye,Ne=ee*s,Pe=ce.wc,Fe=ue<Ne?vr(ce,M,O):null;e(ue<=be),e(s<=ye),e(Qr(ce));t:for(;;){for(;!X.h&&ue<Ne;){if(M&Pe||(Fe=vr(ce,M,O)),e(Fe!=null),se(X),256>(ye=er(Fe.G[0],Fe.H[0],X)))C[D+ue]=ye,++ue,++M>=ee&&(M=0,++O<=s&&!(O%16)&&en(x,O));else{if(!(280>ye)){ae=0;break t}ye=Wr(ye-256,X);var Xe,je=er(Fe.G[4],Fe.H[4],X);if(se(X),!(ue>=(je=Tr(ee,je=Wr(je,X)))&&be-ue>=ye)){ae=0;break t}for(Xe=0;Xe<ye;++Xe)C[D+ue+Xe]=C[D+ue+Xe-je];for(ue+=ye,M+=ye;M>=ee;)M-=ee,++O<=s&&!(O%16)&&en(x,O);ue<Ne&&M&Pe&&(Fe=vr(ce,M,O))}e(X.h==J(X))}en(x,O>s?s:O);break t}!ae||X.h&&ue<be?(ae=0,x.a=X.h?5:3):x.$=ue,s=ae}else s=$r(x,x.V,x.Ba,x.c,x.i,s,Se);if(!s){g=0;break e}}h+g>=A&&(a.Cc=1),g=1}if(!g)return null;if(a.Cc&&((g=a.ga)!=null&&(g.mc=null),a.ga=null,0<a.Ga))return alert("todo:WebPDequantizeLevels"),null}return a.nb+h*w}function zt(a,s,h,g,w,A){for(;0<w--;){var x,C=a,O=s+(h?1:0),M=a,X=s+(h?0:3);for(x=0;x<g;++x){var ce=M[X+4*x];ce!=255&&(ce*=32897,C[O+4*x+0]=C[O+4*x+0]*ce>>23,C[O+4*x+1]=C[O+4*x+1]*ce>>23,C[O+4*x+2]=C[O+4*x+2]*ce>>23)}s+=A}}function Ut(a,s,h,g,w){for(;0<g--;){var A;for(A=0;A<h;++A){var x=a[s+2*A+0],C=15&(M=a[s+2*A+1]),O=4369*C,M=(240&M|M>>4)*O>>16;a[s+2*A+0]=(240&x|x>>4)*O>>16&240|(15&x|x<<4)*O>>16>>4&15,a[s+2*A+1]=240&M|C}s+=w}}function Xt(a,s,h,g,w,A,x,C){var O,M,X=255;for(M=0;M<w;++M){for(O=0;O<g;++O){var ce=a[s+O];A[x+4*O]=ce,X&=ce}s+=h,x+=C}return X!=255}function rr(a,s,h,g,w){var A;for(A=0;A<w;++A)h[g+A]=a[s+A]>>8}function nr(){io=zt,bu=Ut,wu=Xt,_u=rr}function Ir(a,s,h){q[a]=function(g,w,A,x,C,O,M,X,ce,D,ee,ae,ye,ue,be,Ne,Pe){var Fe,Xe=Pe-1>>1,je=C[O+0]|M[X+0]<<16,wt=ce[D+0]|ee[ae+0]<<16;e(g!=null);var Ye=3*je+wt+131074>>2;for(s(g[w+0],255&Ye,Ye>>16,ye,ue),A!=null&&(Ye=3*wt+je+131074>>2,s(A[x+0],255&Ye,Ye>>16,be,Ne)),Fe=1;Fe<=Xe;++Fe){var Ft=C[O+Fe]|M[X+Fe]<<16,br=ce[D+Fe]|ee[ae+Fe]<<16,_t=je+Ft+wt+br+524296,Ke=_t+2*(Ft+wt)>>3;Ye=Ke+je>>1,je=(_t=_t+2*(je+br)>>3)+Ft>>1,s(g[w+2*Fe-1],255&Ye,Ye>>16,ye,ue+(2*Fe-1)*h),s(g[w+2*Fe-0],255&je,je>>16,ye,ue+(2*Fe-0)*h),A!=null&&(Ye=_t+wt>>1,je=Ke+br>>1,s(A[x+2*Fe-1],255&Ye,Ye>>16,be,Ne+(2*Fe-1)*h),s(A[x+2*Fe+0],255&je,je>>16,be,Ne+(2*Fe+0)*h)),je=Ft,wt=br}1&Pe||(Ye=3*je+wt+131074>>2,s(g[w+Pe-1],255&Ye,Ye>>16,ye,ue+(Pe-1)*h),A!=null&&(Ye=3*wt+je+131074>>2,s(A[x+Pe-1],255&Ye,Ye>>16,be,Ne+(Pe-1)*h)))}}function ni(){gn[To]=jf,gn[qo]=Eu,gn[ku]=Uf,gn[jo]=Ou,gn[Uo]=Bu,gn[Qs]=Ru,gn[Fu]=zf,gn[el]=Eu,gn[tl]=Ou,gn[zo]=Bu,gn[rl]=Ru}function Xa(a){return a&-16384?0>a?0:255:a>>Vf}function Ui(a,s){return Xa((19077*a>>8)+(26149*s>>8)-14234)}function zi(a,s,h){return Xa((19077*a>>8)-(6419*s>>8)-(13320*h>>8)+8708)}function yi(a,s){return Xa((19077*a>>8)+(33050*s>>8)-17685)}function Vi(a,s,h,g,w){g[w+0]=Ui(a,h),g[w+1]=zi(a,s,h),g[w+2]=yi(a,s)}function ba(a,s,h,g,w){g[w+0]=yi(a,s),g[w+1]=zi(a,s,h),g[w+2]=Ui(a,h)}function wa(a,s,h,g,w){var A=zi(a,s,h);s=A<<3&224|yi(a,s)>>3,g[w+0]=248&Ui(a,h)|A>>5,g[w+1]=s}function Cr(a,s,h,g,w){var A=240&yi(a,s)|15;g[w+0]=240&Ui(a,h)|zi(a,s,h)>>4,g[w+1]=A}function Hi(a,s,h,g,w){g[w+0]=255,Vi(a,s,h,g,w+1)}function Wi(a,s,h,g,w){ba(a,s,h,g,w),g[w+3]=255}function Za(a,s,h,g,w){Vi(a,s,h,g,w),g[w+3]=255}function qn(a,s,h){q[a]=function(g,w,A,x,C,O,M,X,ce){for(var D=X+(-2&ce)*h;X!=D;)s(g[w+0],A[x+0],C[O+0],M,X),s(g[w+1],A[x+0],C[O+0],M,X+h),w+=2,++x,++O,X+=2*h;1&ce&&s(g[w+0],A[x+0],C[O+0],M,X)}}function jr(a,s,h){return h==0?a==0?s==0?6:5:s==0?4:0:h}function Bo(a,s,h,g,w){switch(a>>>30){case 3:ii(s,h,g,w,0);break;case 2:Ai(s,h,g,w);break;case 1:Er(s,h,g,w)}}function _a(a,s){var h,g,w=s.M,A=s.Nb,x=a.oc,C=a.pc+40,O=a.oc,M=a.pc+584,X=a.oc,ce=a.pc+600;for(h=0;16>h;++h)x[C+32*h-1]=129;for(h=0;8>h;++h)O[M+32*h-1]=129,X[ce+32*h-1]=129;for(0<w?x[C-1-32]=O[M-1-32]=X[ce-1-32]=129:(o(x,C-32-1,127,21),o(O,M-32-1,127,9),o(X,ce-32-1,127,9)),g=0;g<a.za;++g){var D=s.ya[s.aa+g];if(0<g){for(h=-1;16>h;++h)n(x,C+32*h-4,x,C+32*h+12,4);for(h=-1;8>h;++h)n(O,M+32*h-4,O,M+32*h+4,4),n(X,ce+32*h-4,X,ce+32*h+4,4)}var ee=a.Gd,ae=a.Hd+g,ye=D.ad,ue=D.Hc;if(0<w&&(n(x,C-32,ee[ae].y,0,16),n(O,M-32,ee[ae].f,0,8),n(X,ce-32,ee[ae].ea,0,8)),D.Za){var be=x,Ne=C-32+16;for(0<w&&(g>=a.za-1?o(be,Ne,ee[ae].y[15],4):n(be,Ne,ee[ae+1].y,0,4)),h=0;4>h;h++)be[Ne+128+h]=be[Ne+256+h]=be[Ne+384+h]=be[Ne+0+h];for(h=0;16>h;++h,ue<<=2)be=x,Ne=C+Du[h],Sn[D.Ob[h]](be,Ne),Bo(ue,ye,16*+h,be,Ne)}else if(be=jr(g,w,D.Ob[0]),Ni[be](x,C),ue!=0)for(h=0;16>h;++h,ue<<=2)Bo(ue,ye,16*+h,x,C+Du[h]);for(h=D.Gc,be=jr(g,w,D.Dd),oi[be](O,M),oi[be](X,ce),ue=ye,be=O,Ne=M,255&(D=0|h)&&(170&D?La(ue,256,be,Ne):Un(ue,256,be,Ne)),D=X,ue=ce,255&(h>>=8)&&(170&h?La(ye,320,D,ue):Un(ye,320,D,ue)),w<a.Ub-1&&(n(ee[ae].y,0,x,C+480,16),n(ee[ae].f,0,O,M+224,8),n(ee[ae].ea,0,X,ce+224,8)),h=8*A*a.B,ee=a.sa,ae=a.ta+16*g+16*A*a.R,ye=a.qa,D=a.ra+8*g+h,ue=a.Ha,be=a.Ia+8*g+h,h=0;16>h;++h)n(ee,ae+h*a.R,x,C+32*h,16);for(h=0;8>h;++h)n(ye,D+h*a.B,O,M+32*h,8),n(ue,be+h*a.B,X,ce+32*h,8)}}function Ro(a,s,h,g,w,A,x,C,O){var M=[0],X=[0],ce=0,D=O!=null?O.kd:0,ee=O??new re;if(a==null||12>h)return 7;ee.data=a,ee.w=s,ee.ha=h,s=[s],h=[h],ee.gb=[ee.gb];e:{var ae=s,ye=h,ue=ee.gb;if(e(a!=null),e(ye!=null),e(ue!=null),ue[0]=0,12<=ye[0]&&!t(a,ae[0],"RIFF")){if(t(a,ae[0]+8,"WEBP")){ue=3;break e}var be=Ve(a,ae[0]+4);if(12>be||4294967286<be){ue=3;break e}if(D&&be>ye[0]-8){ue=7;break e}ue[0]=be,ae[0]+=12,ye[0]-=12}ue=0}if(ue!=0)return ue;for(be=0<ee.gb[0],h=h[0];;){e:{var Ne=a;ye=s,ue=h;var Pe=M,Fe=X,Xe=ae=[0];if((Ye=ce=[ce])[0]=0,8>ue[0])ue=7;else{if(!t(Ne,ye[0],"VP8X")){if(Ve(Ne,ye[0]+4)!=10){ue=3;break e}if(18>ue[0]){ue=7;break e}var je=Ve(Ne,ye[0]+8),wt=1+Me(Ne,ye[0]+12);if(2147483648<=wt*(Ne=1+Me(Ne,ye[0]+15))){ue=3;break e}Xe!=null&&(Xe[0]=je),Pe!=null&&(Pe[0]=wt),Fe!=null&&(Fe[0]=Ne),ye[0]+=18,ue[0]-=18,Ye[0]=1}ue=0}}if(ce=ce[0],ae=ae[0],ue!=0)return ue;if(ye=!!(2&ae),!be&&ce)return 3;if(A!=null&&(A[0]=!!(16&ae)),x!=null&&(x[0]=ye),C!=null&&(C[0]=0),x=M[0],ae=X[0],ce&&ye&&O==null){ue=0;break}if(4>h){ue=7;break}if(be&&ce||!be&&!ce&&!t(a,s[0],"ALPH")){h=[h],ee.na=[ee.na],ee.P=[ee.P],ee.Sa=[ee.Sa];e:{je=a,ue=s,be=h;var Ye=ee.gb;Pe=ee.na,Fe=ee.P,Xe=ee.Sa,wt=22,e(je!=null),e(be!=null),Ne=ue[0];var Ft=be[0];for(e(Pe!=null),e(Xe!=null),Pe[0]=null,Fe[0]=null,Xe[0]=0;;){if(ue[0]=Ne,be[0]=Ft,8>Ft){ue=7;break e}var br=Ve(je,Ne+4);if(4294967286<br){ue=3;break e}var _t=8+br+1&-2;if(wt+=_t,0<Ye&&wt>Ye){ue=3;break e}if(!t(je,Ne,"VP8 ")||!t(je,Ne,"VP8L")){ue=0;break e}if(Ft[0]<_t){ue=7;break e}t(je,Ne,"ALPH")||(Pe[0]=je,Fe[0]=Ne+8,Xe[0]=br),Ne+=_t,Ft-=_t}}if(h=h[0],ee.na=ee.na[0],ee.P=ee.P[0],ee.Sa=ee.Sa[0],ue!=0)break}h=[h],ee.Ja=[ee.Ja],ee.xa=[ee.xa];e:if(Ye=a,ue=s,be=h,Pe=ee.gb[0],Fe=ee.Ja,Xe=ee.xa,je=ue[0],Ne=!t(Ye,je,"VP8 "),wt=!t(Ye,je,"VP8L"),e(Ye!=null),e(be!=null),e(Fe!=null),e(Xe!=null),8>be[0])ue=7;else{if(Ne||wt){if(Ye=Ve(Ye,je+4),12<=Pe&&Ye>Pe-12){ue=3;break e}if(D&&Ye>be[0]-8){ue=7;break e}Fe[0]=Ye,ue[0]+=8,be[0]-=8,Xe[0]=wt}else Xe[0]=5<=be[0]&&Ye[je+0]==47&&!(Ye[je+4]>>5),Fe[0]=be[0];ue=0}if(h=h[0],ee.Ja=ee.Ja[0],ee.xa=ee.xa[0],s=s[0],ue!=0)break;if(4294967286<ee.Ja)return 3;if(C==null||ye||(C[0]=ee.xa?2:1),x=[x],ae=[ae],ee.xa){if(5>h){ue=7;break}C=x,D=ae,ye=A,a==null||5>h?a=0:5<=h&&a[s+0]==47&&!(a[s+4]>>5)?(be=[0],Ye=[0],Pe=[0],le(Fe=new z,a,s,h),An(Fe,be,Ye,Pe)?(C!=null&&(C[0]=be[0]),D!=null&&(D[0]=Ye[0]),ye!=null&&(ye[0]=Pe[0]),a=1):a=0):a=0}else{if(10>h){ue=7;break}C=ae,a==null||10>h||!xo(a,s+3,h-3)?a=0:(D=a[s+0]|a[s+1]<<8|a[s+2]<<16,ye=16383&(a[s+7]<<8|a[s+6]),a=16383&(a[s+9]<<8|a[s+8]),1&D||3<(D>>1&7)||!(D>>4&1)||D>>5>=ee.Ja||!ye||!a?a=0:(x&&(x[0]=ye),C&&(C[0]=a),a=1))}if(!a||(x=x[0],ae=ae[0],ce&&(M[0]!=x||X[0]!=ae)))return 3;O!=null&&(O[0]=ee,O.offset=s-O.w,e(4294967286>s-O.w),e(O.offset==O.ha-h));break}return ue==0||ue==7&&ce&&O==null?(A!=null&&(A[0]|=ee.na!=null&&0<ee.na.length),g!=null&&(g[0]=x),w!=null&&(w[0]=ae),0):ue}function pn(a,s,h){var g=s.width,w=s.height,A=0,x=0,C=g,O=w;if(s.Da=a!=null&&0<a.Da,s.Da&&(C=a.cd,O=a.bd,A=a.v,x=a.j,11>h||(A&=-2,x&=-2),0>A||0>x||0>=C||0>=O||A+C>g||x+O>w))return 0;if(s.v=A,s.j=x,s.va=A+C,s.o=x+O,s.U=C,s.T=O,s.da=a!=null&&0<a.da,s.da){if(!Ge(C,O,h=[a.ib],A=[a.hb]))return 0;s.ib=h[0],s.hb=A[0]}return s.ob=a!=null&&a.ob,s.Kb=a==null||!a.Sd,s.da&&(s.ob=s.ib<3*g/4&&s.hb<3*w/4,s.Kb=0),1}function $i(a){if(a==null)return 2;if(11>a.S){var s=a.f.RGBA;s.fb+=(a.height-1)*s.A,s.A=-s.A}else s=a.f.kb,a=a.height,s.O+=(a-1)*s.fa,s.fa=-s.fa,s.N+=(a-1>>1)*s.Ab,s.Ab=-s.Ab,s.W+=(a-1>>1)*s.Db,s.Db=-s.Db,s.F!=null&&(s.J+=(a-1)*s.lb,s.lb=-s.lb);return 0}function Qa(a,s,h,g){if(g==null||0>=a||0>=s)return 2;if(h!=null){if(h.Da){var w=h.cd,A=h.bd,x=-2&h.v,C=-2&h.j;if(0>x||0>C||0>=w||0>=A||x+w>a||C+A>s)return 2;a=w,s=A}if(h.da){if(!Ge(a,s,w=[h.ib],A=[h.hb]))return 2;a=w[0],s=A[0]}}g.width=a,g.height=s;e:{var O=g.width,M=g.height;if(a=g.S,0>=O||0>=M||!(a>=To&&13>a))a=2;else{if(0>=g.Rd&&g.sd==null){x=A=w=s=0;var X=(C=O*Tu[a])*M;if(11>a||(A=(M+1)/2*(s=(O+1)/2),a==12&&(x=(w=O)*M)),(M=i(X+2*A+x))==null){a=1;break e}g.sd=M,11>a?((O=g.f.RGBA).eb=M,O.fb=0,O.A=C,O.size=X):((O=g.f.kb).y=M,O.O=0,O.fa=C,O.Fd=X,O.f=M,O.N=0+X,O.Ab=s,O.Cd=A,O.ea=M,O.W=0+X+A,O.Db=s,O.Ed=A,a==12&&(O.F=M,O.J=0+X+2*A),O.Tc=x,O.lb=w)}if(s=1,w=g.S,A=g.width,x=g.height,w>=To&&13>w)if(11>w)a=g.f.RGBA,s&=(C=Math.abs(a.A))*(x-1)+A<=a.size,s&=C>=A*Tu[w],s&=a.eb!=null;else{a=g.f.kb,C=(A+1)/2,X=(x+1)/2,O=Math.abs(a.fa),M=Math.abs(a.Ab);var ce=Math.abs(a.Db),D=Math.abs(a.lb),ee=D*(x-1)+A;s&=O*(x-1)+A<=a.Fd,s&=M*(X-1)+C<=a.Cd,s=(s&=ce*(X-1)+C<=a.Ed)&O>=A&M>=C&ce>=C,s&=a.y!=null,s&=a.f!=null,s&=a.ea!=null,w==12&&(s&=D>=A,s&=ee<=a.Tc,s&=a.F!=null)}else s=0;a=s?0:2}}return a!=0||h!=null&&h.fd&&(a=$i(g)),a}var Aa=64,Gi=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],eo=24,Ur=32,Yr=8,Na=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];De("Predictor0","PredictorAdd0"),q.Predictor0=function(){return 4278190080},q.Predictor1=function(a){return a},q.Predictor2=function(a,s,h){return s[h+0]},q.Predictor3=function(a,s,h){return s[h+1]},q.Predictor4=function(a,s,h){return s[h-1]},q.Predictor5=function(a,s,h){return Je(Je(a,s[h+1]),s[h+0])},q.Predictor6=function(a,s,h){return Je(a,s[h-1])},q.Predictor7=function(a,s,h){return Je(a,s[h+0])},q.Predictor8=function(a,s,h){return Je(s[h-1],s[h+0])},q.Predictor9=function(a,s,h){return Je(s[h+0],s[h+1])},q.Predictor10=function(a,s,h){return Je(Je(a,s[h-1]),Je(s[h+0],s[h+1]))},q.Predictor11=function(a,s,h){var g=s[h+0];return 0>=ct(g>>24&255,a>>24&255,(s=s[h-1])>>24&255)+ct(g>>16&255,a>>16&255,s>>16&255)+ct(g>>8&255,a>>8&255,s>>8&255)+ct(255&g,255&a,255&s)?g:a},q.Predictor12=function(a,s,h){var g=s[h+0];return(Ct((a>>24&255)+(g>>24&255)-((s=s[h-1])>>24&255))<<24|Ct((a>>16&255)+(g>>16&255)-(s>>16&255))<<16|Ct((a>>8&255)+(g>>8&255)-(s>>8&255))<<8|Ct((255&a)+(255&g)-(255&s)))>>>0},q.Predictor13=function(a,s,h){var g=s[h-1];return(xt((a=Je(a,s[h+0]))>>24&255,g>>24&255)<<24|xt(a>>16&255,g>>16&255)<<16|xt(a>>8&255,g>>8&255)<<8|xt(255&a,255&g))>>>0};var bi=q.PredictorAdd0;q.PredictorAdd1=Nt,De("Predictor2","PredictorAdd2"),De("Predictor3","PredictorAdd3"),De("Predictor4","PredictorAdd4"),De("Predictor5","PredictorAdd5"),De("Predictor6","PredictorAdd6"),De("Predictor7","PredictorAdd7"),De("Predictor8","PredictorAdd8"),De("Predictor9","PredictorAdd9"),De("Predictor10","PredictorAdd10"),De("Predictor11","PredictorAdd11"),De("Predictor12","PredictorAdd12"),De("Predictor13","PredictorAdd13");var wi=q.PredictorAdd2;We("ColorIndexInverseTransform","MapARGB","32b",function(a){return a>>8&255},function(a){return a}),We("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(a){return a},function(a){return a>>8&255});var Sa,Yi=q.ColorIndexInverseTransform,gr=q.MapARGB,Xs=q.VP8LColorIndexInverseTransformAlpha,jn=q.MapAlpha,Nn=q.VP8LPredictorsAdd=[];Nn.length=16,(q.VP8LPredictors=[]).length=16,(q.VP8LPredictorsAdd_C=[]).length=16,(q.VP8LPredictors_C=[]).length=16;var Ki,to,ro,xa,Ji,Xi,_i,ii,Ai,La,Er,Un,Gt,Yt,lr,yr,ai,no,ka,Mo,mu,gu,vu,yu,io,bu,wu,_u,Au=i(511),Nu=i(2041),Su=i(225),xu=i(767),Lu=0,Zs=Nu,Do=Su,rn=xu,mn=Au,To=0,qo=1,ku=2,jo=3,Uo=4,Qs=5,Fu=6,el=7,tl=8,zo=9,rl=10,Lf=[2,3,7],kf=[3,3,11],Pu=[280,256,256,256,40],Ff=[0,1,1,1,0],Pf=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],If=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Cf=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Ef=8,nl=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],il=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ao=null,Of=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],Bf=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],Iu=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],Rf=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,25
425,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Mf=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,25
425,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],Df=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,25
vendor: 10,325 bytes, line 42
425,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Tf=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Ni=[],Sn=[],oi=[],qf=1,Cu=2,Si=[],gn=[];Ir("UpsampleRgbLinePair",Vi,3),Ir("UpsampleBgrLinePair",ba,3),Ir("UpsampleRgbaLinePair",Za,4),Ir("UpsampleBgraLinePair",Wi,4),Ir("UpsampleArgbLinePair",Hi,4),Ir("UpsampleRgba4444LinePair",Cr,2),Ir("UpsampleRgb565LinePair",wa,2);var jf=q.UpsampleRgbLinePair,Uf=q.UpsampleBgrLinePair,Eu=q.UpsampleRgbaLinePair,Ou=q.UpsampleBgraLinePair,Bu=q.UpsampleArgbLinePair,Ru=q.UpsampleRgba4444LinePair,zf=q.UpsampleRgb565LinePair,Vo=16,Ho=1<<Vo-1,oo=-227,al=482,Vf=6,Mu=0,Hf=i(256),Wf=i(256),$f=i(256),Gf=i(256),Yf=i(al-oo),Kf=i(al-oo);qn("YuvToRgbRow",Vi,3),qn("YuvToBgrRow",ba,3),qn("YuvToRgbaRow",Za,4),qn("YuvToBgraRow",Wi,4),qn("YuvToArgbRow",Hi,4),qn("YuvToRgba4444Row",Cr,2),qn("YuvToRgb565Row",wa,2);var Du=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Wo=[0,2,8],Jf=[8,7,6,4,4,2,2,2,1,1,1,1],Xf=1;this.WebPDecodeRGBA=function(a,s,h,g,w){var A=qo,x=new $,C=new St;x.ba=C,C.S=A,C.width=[C.width],C.height=[C.height];var O=C.width,M=C.height,X=new rt;if(X==null||a==null)var ce=2;else e(X!=null),ce=Ro(a,s,h,X.width,X.height,X.Pd,X.Qd,X.format,null);if(ce!=0?O=0:(O!=null&&(O[0]=X.width[0]),M!=null&&(M[0]=X.height[0]),O=1),O){C.width=C.width[0],C.height=C.height[0],g!=null&&(g[0]=C.width),w!=null&&(w[0]=C.height);e:{if(g=new ca,(w=new re).data=a,w.w=s,w.ha=h,w.kd=1,s=[0],e(w!=null),((a=Ro(w.data,w.w,w.ha,null,null,null,s,null,w))==0||a==7)&&s[0]&&(a=4),(s=a)==0){if(e(x!=null),g.data=w.data,g.w=w.w+w.offset,g.ha=w.ha-w.offset,g.put=at,g.ac=fn,g.bc=_n,g.ma=x,w.xa){if((a=Jn())==null){x=1;break e}if((function(D,ee){var ae=[0],ye=[0],ue=[0];t:for(;;){if(D==null)return 0;if(ee==null)return D.a=2,0;if(D.l=ee,D.a=0,le(D.m,ee.data,ee.w,ee.ha),!An(D.m,ae,ye,ue)){D.a=3;break t}if(D.xb=Cu,ee.width=ae[0],ee.height=ye[0],!j(ae[0],ye[0],1,D,null))break t;return 1}return e(D.a!=0),0})(a,g)){if(g=(s=Qa(g.width,g.height,x.Oa,x.ba))==0){t:{g=a;r:for(;;){if(g==null){g=0;break t}if(e(g.s.yc!=null),e(g.s.Ya!=null),e(0<g.s.Wb),e((h=g.l)!=null),e((w=h.ma)!=null),g.xb!=0){if(g.ca=w.ba,g.tb=w.tb,e(g.ca!=null),!pn(w.Oa,h,jo)){g.a=2;break r}if(!P(g,h.width)||h.da)break r;if((h.da||it(g.ca.S))&&nr(),11>g.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),g.ca.f.kb.F!=null&&nr()),g.Pb&&0<g.s.ua&&g.s.vb.X==null&&!B(g.s.vb,g.s.Wa.Xa)){g.a=1;break r}g.xb=0}if(!$r(g,g.V,g.Ba,g.c,g.i,h.o,Bn))break r;w.Dc=g.Ma,g=1;break t}e(g.a!=0),g=0}g=!g}g&&(s=a.a)}else s=a.a}else{if((a=new Bs)==null){x=1;break e}if(a.Fa=w.na,a.P=w.P,a.qc=w.Sa,Mn(a,g)){if((s=Qa(g.width,g.height,x.Oa,x.ba))==0){if(a.Aa=0,h=x.Oa,e((w=a)!=null),h!=null){if(0<(O=0>(O=h.Md)?0:100<O?255:255*O/100)){for(M=X=0;4>M;++M)12>(ce=w.pb[M]).lc&&(ce.ia=O*Jf[0>ce.lc?0:ce.lc]>>3),X|=ce.ia;X&&(alert("todo:VP8InitRandom"),w.ia=1)}w.Ga=h.Id,100<w.Ga?w.Ga=100:0>w.Ga&&(w.Ga=0)}(function(D,ee){if(D==null)return 0;if(ee==null)return pr(D,2,"NULL VP8Io parameter in VP8Decode().");if(!D.cb&&!Mn(D,ee))return 0;if(e(D.cb),ee.ac==null||ee.ac(ee)){ee.ob&&(D.L=0);var ae=Wo[D.L];if(D.L==2?(D.yb=0,D.zb=0):(D.yb=ee.v-ae>>4,D.zb=ee.j-ae>>4,0>D.yb&&(D.yb=0),0>D.zb&&(D.zb=0)),D.Va=ee.o+15+ae>>4,D.Hb=ee.va+15+ae>>4,D.Hb>D.za&&(D.Hb=D.za),D.Va>D.Ub&&(D.Va=D.Ub),0<D.L){var ye=D.ed;for(ae=0;4>ae;++ae){var ue;if(D.Qa.Cb){var be=D.Qa.Lb[ae];D.Qa.Fb||(be+=ye.Tb)}else be=ye.Tb;for(ue=0;1>=ue;++ue){var Ne=D.gd[ae][ue],Pe=be;if(ye.Pc&&(Pe+=ye.vd[0],ue&&(Pe+=ye.od[0])),0<(Pe=0>Pe?0:63<Pe?63:Pe)){var Fe=Pe;0<ye.wb&&(Fe=4<ye.wb?Fe>>2:Fe>>1)>9-ye.wb&&(Fe=9-ye.wb),1>Fe&&(Fe=1),Ne.dd=Fe,Ne.tc=2*Pe+Fe,Ne.ld=40<=Pe?2:15<=Pe?1:0}else Ne.tc=0;Ne.La=ue}}}ae=0}else pr(D,6,"Frame setup failed"),ae=D.a;if(ae=ae==0){if(ae){D.$c=0,0<D.Aa||(D.Ic=Xf);t:{ae=D.Ic,ye=4*(Fe=D.za);var Xe=32*Fe,je=Fe+1,wt=0<D.L?Fe*(0<D.Aa?2:1):0,Ye=(D.Aa==2?2:1)*Fe;if((Ne=ye+832+(ue=3*(16*ae+Wo[D.L])/2*Xe)+(be=D.Fa!=null&&0<D.Fa.length?D.Kc.c*D.Kc.i:0))!=Ne)ae=0;else{if(Ne>D.Vb){if(D.Vb=0,D.Ec=i(Ne),D.Fc=0,D.Ec==null){ae=pr(D,1,"no memory during frame initialization.");break t}D.Vb=Ne}Ne=D.Ec,Pe=D.Fc,D.Ac=Ne,D.Bc=Pe,Pe+=ye,D.Gd=d(Xe,No),D.Hd=0,D.rb=d(je+1,Xn),D.sb=1,D.wa=wt?d(wt,qr):null,D.Y=0,D.D.Nb=0,D.D.wa=D.wa,D.D.Y=D.Y,0<D.Aa&&(D.D.Y+=Fe),e(!0),D.oc=Ne,D.pc=Pe,Pe+=832,D.ya=d(Ye,Di),D.aa=0,D.D.ya=D.ya,D.D.aa=D.aa,D.Aa==2&&(D.D.aa+=Fe),D.R=16*Fe,D.B=8*Fe,Fe=(Xe=Wo[D.L])*D.R,Xe=Xe/2*D.B,D.sa=Ne,D.ta=Pe+Fe,D.qa=D.sa,D.ra=D.ta+16*ae*D.R+Xe,D.Ha=D.qa,D.Ia=D.ra+8*ae*D.B+Xe,D.$c=0,Pe+=ue,D.mb=be?Ne:null,D.nb=be?Pe:null,e(Pe+be<=D.Fc+D.Vb),Ha(D),o(D.Ac,D.Bc,0,ye),ae=1}}if(ae){if(ee.ka=0,ee.y=D.sa,ee.O=D.ta,ee.f=D.qa,ee.N=D.ra,ee.ea=D.Ha,ee.Vd=D.Ia,ee.fa=D.R,ee.Rc=D.B,ee.F=null,ee.J=0,!Lu){for(ae=-255;255>=ae;++ae)Au[255+ae]=0>ae?-ae:ae;for(ae=-1020;1020>=ae;++ae)Nu[1020+ae]=-128>ae?-128:127<ae?127:ae;for(ae=-112;112>=ae;++ae)Su[112+ae]=-16>ae?-16:15<ae?15:ae;for(ae=-255;510>=ae;++ae)xu[255+ae]=0>ae?0:255<ae?255:ae;Lu=1}_i=ko,ii=Rs,La=Ms,Er=Ds,Un=Dn,Ai=Lo,Gt=Io,Yt=Co,lr=Oo,yr=u,ai=Eo,no=ji,ka=b,Mo=R,mu=va,gu=Ja,vu=ya,yu=Po,Sn[0]=Hs,Sn[1]=pa,Sn[2]=zs,Sn[3]=Vs,Sn[4]=Ws,Sn[5]=Qn,Sn[6]=$s,Sn[7]=ei,Sn[8]=Ys,Sn[9]=Gs,Ni[0]=Fo,Ni[1]=Ts,Ni[2]=qs,Ni[3]=js,Ni[4]=gi,Ni[5]=Us,Ni[6]=Ti,oi[0]=Ks,oi[1]=Wa,oi[2]=ma,oi[3]=$a,oi[4]=Js,oi[5]=ga,oi[6]=Ga,ae=1}else ae=0}ae&&(ae=(function(Ft,br){for(Ft.M=0;Ft.M<Ft.Va;++Ft.M){var _t,Ke=Ft.Jc[Ft.M&Ft.Xb],Be=Ft.m,ur=Ft;for(_t=0;_t<ur.za;++_t){var vt=Be,It=ur,Zt=It.Ac,kr=It.Bc+4*_t,zr=It.zc,ir=It.ya[It.aa+_t];if(It.Qa.Bb?ir.$b=xe(vt,It.Pa.jb[0])?2+xe(vt,It.Pa.jb[2]):xe(vt,It.Pa.jb[1]):ir.$b=0,It.kc&&(ir.Ad=xe(vt,It.Bd)),ir.Za=!xe(vt,145)+0,ir.Za){var Or=ir.Ob,Vr=0;for(It=0;4>It;++It){var wr,Ot=zr[0+It];for(wr=0;4>wr;++wr){Ot=Mf[Zt[kr+wr]][Ot];for(var Rt=Iu[xe(vt,Ot[0])];0<Rt;)Rt=Iu[2*Rt+xe(vt,Ot[Rt])];Ot=-Rt,Zt[kr+wr]=Ot}n(Or,Vr,Zt,kr,4),Vr+=4,zr[0+It]=Ot}}else Ot=xe(vt,156)?xe(vt,128)?1:3:xe(vt,163)?2:0,ir.Ob[0]=Ot,o(Zt,kr,Ot,4),o(zr,0,Ot,4);ir.Dd=xe(vt,142)?xe(vt,114)?xe(vt,183)?1:3:2:0}if(ur.m.Ka)return pr(Ft,7,"Premature end-of-partition0 encountered.");for(;Ft.ja<Ft.za;++Ft.ja){if(ur=Ke,vt=(Be=Ft).rb[Be.sb-1],Zt=Be.rb[Be.sb+Be.ja],_t=Be.ya[Be.aa+Be.ja],kr=Be.kc?_t.Ad:0)vt.la=Zt.la=0,_t.Za||(vt.Na=Zt.Na=0),_t.Hc=0,_t.Gc=0,_t.ia=0;else{var ar,Mt;if(vt=Zt,Zt=ur,kr=Be.Pa.Xc,zr=Be.ya[Be.aa+Be.ja],ir=Be.pb[zr.$b],It=zr.ad,Or=0,Vr=Be.rb[Be.sb-1],Ot=wr=0,o(It,Or,0,384),zr.Za)var Fr=0,xn=kr[3];else{Rt=i(16);var cr=vt.Na+Vr.Na;if(cr=ao(Zt,kr[1],cr,ir.Eb,0,Rt,0),vt.Na=Vr.Na=(0<cr)+0,1<cr)_i(Rt,0,It,Or);else{var Kr=Rt[0]+3>>3;for(Rt=0;256>Rt;Rt+=16)It[Or+Rt]=Kr}Fr=1,xn=kr[0]}var Vt=15&vt.la,_r=15&Vr.la;for(Rt=0;4>Rt;++Rt){var nn=1&_r;for(Kr=Mt=0;4>Kr;++Kr)Vt=Vt>>1|(nn=(cr=ao(Zt,xn,cr=nn+(1&Vt),ir.Sc,Fr,It,Or))>Fr)<<7,Mt=Mt<<2|(3<cr?3:1<cr?2:It[Or+0]!=0),Or+=16;Vt>>=4,_r=_r>>1|nn<<7,wr=(wr<<8|Mt)>>>0}for(xn=Vt,Fr=_r>>4,ar=0;4>ar;ar+=2){for(Mt=0,Vt=vt.la>>4+ar,_r=Vr.la>>4+ar,Rt=0;2>Rt;++Rt){for(nn=1&_r,Kr=0;2>Kr;++Kr)cr=nn+(1&Vt),Vt=Vt>>1|(nn=0<(cr=ao(Zt,kr[2],cr,ir.Qc,0,It,Or)))<<3,Mt=Mt<<2|(3<cr?3:1<cr?2:It[Or+0]!=0),Or+=16;Vt>>=2,_r=_r>>1|nn<<5}Ot|=Mt<<4*ar,xn|=Vt<<4<<ar,Fr|=(240&_r)<<ar}vt.la=xn,Vr.la=Fr,zr.Hc=wr,zr.Gc=Ot,zr.ia=43690&Ot?0:ir.ia,kr=!(wr|Ot)}if(0<Be.L&&(Be.wa[Be.Y+Be.ja]=Be.gd[_t.$b][_t.Za],Be.wa[Be.Y+Be.ja].La|=!kr),ur.Ka)return pr(Ft,7,"Premature end-of-file encountered.")}if(Ha(Ft),Be=br,ur=1,_t=(Ke=Ft).D,vt=0<Ke.L&&Ke.M>=Ke.zb&&Ke.M<=Ke.Va,Ke.Aa==0)t:{if(_t.M=Ke.M,_t.uc=vt,_a(Ke,_t),ur=1,_t=(Mt=Ke.D).Nb,vt=(Ot=Wo[Ke.L])*Ke.R,Zt=Ot/2*Ke.B,Rt=16*_t*Ke.R,Kr=8*_t*Ke.B,kr=Ke.sa,zr=Ke.ta-vt+Rt,ir=Ke.qa,It=Ke.ra-Zt+Kr,Or=Ke.Ha,Vr=Ke.Ia-Zt+Kr,_r=(Vt=Mt.M)==0,wr=Vt>=Ke.Va-1,Ke.Aa==2&&_a(Ke,Mt),Mt.uc)for(nn=(cr=Ke).D.M,e(cr.D.uc),Mt=cr.yb;Mt<cr.Hb;++Mt){Fr=Mt,xn=nn;var Hr=(an=(Pr=cr).D).Nb;ar=Pr.R;var an=an.wa[an.Y+Fr],on=Pr.sa,Jr=Pr.ta+16*Hr*ar+16*Fr,sn=an.dd,Kt=an.tc;if(Kt!=0)if(e(3<=Kt),Pr.L==1)0<Fr&&gu(on,Jr,ar,Kt+4),an.La&&yu(on,Jr,ar,Kt),0<xn&&mu(on,Jr,ar,Kt+4),an.La&&vu(on,Jr,ar,Kt);else{var ln=Pr.B,Ln=Pr.qa,Zi=Pr.ra+8*Hr*ln+8*Fr,si=Pr.Ha,Pr=Pr.Ia+8*Hr*ln+8*Fr;Hr=an.ld,0<Fr&&(Yt(on,Jr,ar,Kt+4,sn,Hr),yr(Ln,Zi,si,Pr,ln,Kt+4,sn,Hr)),an.La&&(no(on,Jr,ar,Kt,sn,Hr),Mo(Ln,Zi,si,Pr,ln,Kt,sn,Hr)),0<xn&&(Gt(on,Jr,ar,Kt+4,sn,Hr),lr(Ln,Zi,si,Pr,ln,Kt+4,sn,Hr)),an.La&&(ai(on,Jr,ar,Kt,sn,Hr),ka(Ln,Zi,si,Pr,ln,Kt,sn,Hr))}}if(Ke.ia&&alert("todo:DitherRow"),Be.put!=null){if(Mt=16*Vt,Vt=16*(Vt+1),_r?(Be.y=Ke.sa,Be.O=Ke.ta+Rt,Be.f=Ke.qa,Be.N=Ke.ra+Kr,Be.ea=Ke.Ha,Be.W=Ke.Ia+Kr):(Mt-=Ot,Be.y=kr,Be.O=zr,Be.f=ir,Be.N=It,Be.ea=Or,Be.W=Vr),wr||(Vt-=Ot),Vt>Be.o&&(Vt=Be.o),Be.F=null,Be.J=null,Ke.Fa!=null&&0<Ke.Fa.length&&Mt<Vt&&(Be.J=mr(Ke,Be,Mt,Vt-Mt),Be.F=Ke.mb,Be.F==null&&Be.F.length==0)){ur=pr(Ke,3,"Could not decode alpha data.");break t}Mt<Be.j&&(Ot=Be.j-Mt,Mt=Be.j,e(!(1&Ot)),Be.O+=Ke.R*Ot,Be.N+=Ke.B*(Ot>>1),Be.W+=Ke.B*(Ot>>1),Be.F!=null&&(Be.J+=Be.width*Ot)),Mt<Vt&&(Be.O+=Be.v,Be.N+=Be.v>>1,Be.W+=Be.v>>1,Be.F!=null&&(Be.J+=Be.v),Be.ka=Mt-Be.j,Be.U=Be.va-Be.v,Be.T=Vt-Mt,ur=Be.put(Be))}_t+1!=Ke.Ic||wr||(n(Ke.sa,Ke.ta-vt,kr,zr+16*Ke.R,vt),n(Ke.qa,Ke.ra-Zt,ir,It+8*Ke.B,Zt),n(Ke.Ha,Ke.Ia-Zt,Or,Vr+8*Ke.B,Zt))}if(!ur)return pr(Ft,6,"Output aborted.")}return 1})(D,ee)),ee.bc!=null&&ee.bc(ee),ae&=1}return ae?(D.cb=0,ae):0})(a,g)||(s=a.a)}}else s=a.a}s==0&&x.Oa!=null&&x.Oa.fd&&(s=$i(x.ba))}x=s}A=x!=0?null:11>A?C.f.RGBA.eb:C.f.kb.y}else A=null;return A};var Tu=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function f(q,G){for(var v="",I=0;I<4;I++)v+=String.fromCharCode(q[G++]);return v}function m(q,G){return q[G+0]|q[G+1]<<8}function _(q,G){return(q[G+0]|q[G+1]<<8|q[G+2]<<16)>>>0}function F(q,G){return(q[G+0]|q[G+1]<<8|q[G+2]<<16|q[G+3]<<24)>>>0}new c;var p=[0],E=[0],k=[],L=new c,S=r,y=(function(q,G){var v={},I=0,U=!1,T=0,Y=0;
42if(v.frames=[],!(function(N,z){for(var H=0;H<4;H++)if(N[z+H]!="RIFF".charCodeAt(H))return!0;return!1})(q,G)){for(F(q,G+=4),G+=8;G<q.length;){var ie=f(q,G),oe=F(q,G+=4);G+=4;var Z=oe+(1&oe);switch(ie){case"VP8 ":case"VP8L":v.frames[I]===void 0&&(v.frames[I]={}),(_e=v.frames[I]).src_off=U?Y:G-8,_e.src_size=T+oe+8,I++,U&&(U=!1,T=0,Y=0);break;case"VP8X":(_e=v.header={}).feature_flags=q[G];var le=G+4;_e.canvas_width=1+_(q,le),le+=3,_e.canvas_height=1+_(q,le),le+=3;break;case"ALPH":U=!0,T=Z+8,Y=G-8;break;case"ANIM":(_e=v.header).bgcolor=F(q,G),le=G+4,_e.loop_count=m(q,le),le+=2;break;case"ANMF":var ne,_e;(_e=v.frames[I]={}).offset_x=2*_(q,G),G+=3,_e.offset_y=2*_(q,G),G+=3,_e.width=1+_(q,G),G+=3,_e.height=1+_(q,G),G+=3,_e.duration=_(q,G),G+=3,ne=q[G++],_e.dispose=1&ne,_e.blend=ne>>1&1}ie!="ANMF"&&(G+=Z)}return v}})(S,0);y.response=S,y.rgbaoutput=!0,y.dataurl=!1;var V=y.header?y.header:null,W=y.frames?y.frames:null;if(V){V.loop_counter=V.loop_count,p=[V.canvas_height],E=[V.canvas_width];for(var fe=0;fe<W.length&&W[fe].blend!=0;fe++);}var Ae=W[0],me=L.WebPDecodeRGBA(S,Ae.src_off,Ae.src_size,E,p);Ae.rgba=me,Ae.imgwidth=E[0],Ae.imgheight=p[0];for(var Q=0;Q<E[0]*p[0]*4;Q++)k[Q]=me[Q];return this.width=E,this.height=p,this.data=k,this}function _2(){var r,e=this.internal.__metadata__.metadata,t=unescape(encodeURIComponent(e));r=this.internal.__metadata__.rawXml?t:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+r.length+" >>"),this.internal.write("stream"),this.internal.write(r),this.internal.write("endstream"),this.internal.write("endobj")}function A2(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}(function(r){var e,t,n,o,i,d,l,c,f,m=function(N){return N=N||{},this.isStrokeTransparent=N.isStrokeTransparent||!1,this.strokeOpacity=N.strokeOpacity||1,this.strokeStyle=N.strokeStyle||"#000000",this.fillStyle=N.fillStyle||"#000000",this.isFillTransparent=N.isFillTransparent||!1,this.fillOpacity=N.fillOpacity||1,this.font=N.font||"10px sans-serif",this.textBaseline=N.textBaseline||"alphabetic",this.textAlign=N.textAlign||"left",this.lineWidth=N.lineWidth||1,this.lineJoin=N.lineJoin||"miter",this.lineCap=N.lineCap||"butt",this.path=N.path||[],this.transform=N.transform!==void 0?N.transform.clone():new c,this.globalCompositeOperation=N.globalCompositeOperation||"normal",this.globalAlpha=N.globalAlpha||1,this.clip_path=N.clip_path||[],this.currentPoint=N.currentPoint||new d,this.miterLimit=N.miterLimit||10,this.lastPoint=N.lastPoint||new d,this.lineDashOffset=N.lineDashOffset||0,this.lineDash=N.lineDash||[],this.margin=N.margin||[0,0,0,0],this.prevPageLastElemOffset=N.prevPageLastElemOffset||0,this.ignoreClearRect=typeof N.ignoreClearRect!="boolean"||N.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new _(this),e=this.internal.f2,t=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,i=this.internal.getVerticalCoordinate,d=this.internal.Point,l=this.internal.Rectangle,c=this.internal.Matrix,f=new m}]);var _=function(N){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var z=N;Object.defineProperty(this,"pdf",{get:function(){return z}});var H=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return H},set:function(B){H=!!B}});var J=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return J},set:function(B){J=!!B}});var te=0;Object.defineProperty(this,"posX",{get:function(){return te},set:function(B){isNaN(B)||(te=B)}});var se=0;Object.defineProperty(this,"posY",{get:function(){return se},set:function(B){isNaN(B)||(se=B)}}),Object.defineProperty(this,"margin",{get:function(){return f.margin},set:function(B){var we;typeof B=="number"?we=[B,B,B,B]:((we=new Array(4))[0]=B[0],we[1]=B.length>=2?B[1]:we[0],we[2]=B.length>=3?B[2]:we[0],we[3]=B.length>=4?B[3]:we[1]),f.margin=we}});var pe=!1;Object.defineProperty(this,"autoPaging",{get:function(){return pe},set:function(B){pe=B}});var ge=0;Object.defineProperty(this,"lastBreak",{get:function(){return ge},set:function(B){ge=B}});var xe=[];Object.defineProperty(this,"pageBreaks",{get:function(){return xe},set:function(B){xe=B}}),Object.defineProperty(this,"ctx",{get:function(){return f},set:function(B){B instanceof m&&(f=B)}}),Object.defineProperty(this,"path",{get:function(){return f.path}
42,set:function(B){f.path=B}});var Ie=[];Object.defineProperty(this,"ctxStack",{get:function(){return Ie},set:function(B){Ie=B}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(B){var we;we=F(B),this.ctx.fillStyle=we.style,this.ctx.isFillTransparent=we.a===0,this.ctx.fillOpacity=we.a,this.pdf.setFillColor(we.r,we.g,we.b,{a:we.a}),this.pdf.setTextColor(we.r,we.g,we.b,{a:we.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(B){var we=F(B);this.ctx.strokeStyle=we.style,this.ctx.isStrokeTransparent=we.a===0,this.ctx.strokeOpacity=we.a,we.a===0?this.pdf.setDrawColor(255,255,255):(we.a,this.pdf.setDrawColor(we.r,we.g,we.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(B){["butt","round","square"].indexOf(B)!==-1&&(this.ctx.lineCap=B,this.pdf.setLineCap(B))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(B){isNaN(B)||(this.ctx.lineWidth=B,this.pdf.setLineWidth(B))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(B){["bevel","round","miter"].indexOf(B)!==-1&&(this.ctx.lineJoin=B,this.pdf.setLineJoin(B))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(B){isNaN(B)||(this.ctx.miterLimit=B,this.pdf.setMiterLimit(B))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(B){this.ctx.textBaseline=B}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(B){["right","end","center","left","start"].indexOf(B)!==-1&&(this.ctx.textAlign=B)}});var Oe=null,Me=null,Ve=null;Object.defineProperty(this,"fontFaces",{get:function(){return Ve},set:function(B){Oe=null,Me=null,Ve=B}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(B){var we;if(this.ctx.font=B,(we=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(B))!==null){var ot=we[1];we[2];var Ge=we[3],ke=we[4];we[5];var tt=we[6],De=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(ke)[2];ke=Math.floor(De==="px"?parseFloat(ke)*this.pdf.internal.scaleFactor:De==="em"?parseFloat(ke)*this.pdf.getFontSize():parseFloat(ke)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(ke);var qe=(function(We){var jt,kt,yt=[],pt=We.trim();if(pt==="")return zl;if(pt in sd)return[sd[pt]];for(;pt!=="";){switch(kt=null,jt=(pt=ud(pt)).charAt(0)){case'"':case"'":kt=m2(pt.substring(1),jt);break;default:kt=g2(pt)}if(kt===null||(yt.push(kt[0]),(pt=ud(kt[1]))!==""&&pt.charAt(0)!==","))return zl;pt=pt.replace(/^,/,"")}return yt})(tt);if(this.fontFaces){var Je=(function(We,jt){var kt=We.getFontList(),yt=JSON.stringify(kt);if(Oe===null||Me!==yt){var pt=(function(Wt){var et=[];return Object.keys(Wt).forEach(function(Bt){Wt[Bt].forEach(function(it){var dt=null;switch(it){case"bold":dt={family:Bt,weight:"bold"};break;case"italic":dt={family:Bt,style:"italic"};break;case"bolditalic":dt={family:Bt,weight:"bold",style:"italic"};break;case"":case"normal":dt={family:Bt}}dt!==null&&(dt.ref={name:Bt,style:it},et.push(dt))})}),et})(kt);Oe=(function(Wt){for(var et={},Bt=0;Bt<Wt.length;++Bt){var it=Ul(Wt[Bt]),dt=it.family,$t=it.stretch,St=it.style,rt=it.weight;et[dt]=et[dt]||{},et[dt][$t]=et[dt][$t]||{},et[dt][$t][St]=et[dt][$t][St]||{},et[dt][$t][St][rt]=it}return et})(pt.concat(jt)),Me=yt}return Oe})(this.pdf,this.fontFaces),Ct=qe.map(function(We){return{family:We,stretch:"normal",weight:Ge,style:ot}}),xt=(function(We,jt,kt){for(var yt=(kt=kt||{}).defaultFontFamily||"times",pt=Object.assign({},p2,kt.genericFontFamilies||{}),Wt=null,et=null,Bt=0;Bt<jt.length;++Bt)if(pt[(Wt=Ul(jt[Bt])).family]&&(Wt.family=pt[Wt.family]),We.hasOwnProperty(Wt.family)){et=We[Wt.family];break}if(!(et=et||We[yt]))throw new Error("Could not find a font-family for the rule '"+ld(Wt)+"' and default family '"+yt+"'.");if(et=(function(it,dt){if(dt[it])return dt[it];var $t=au[it],St=$t<=au.normal?-1:1,rt=od(dt,bf,$t,St);if(!rt)throw new Error("Could not find a matching font-stretch value for "+it);return rt})(Wt.stretch,et),et=(function(it,dt){if(dt[it])return dt[it];for(var $t=yf[it],St=0;St<$t.length;++St)if(dt[$t[St]])return dt[$t[St]];throw new Error("Could not find a matching font-style for "+it)})(Wt.style,et),!(et=(function(it,dt){if(dt[it])return dt[it];if(it===400&&dt[500])return dt[500];if(it===500&&dt[400])return dt[400];var $t=h2[it],St=od(dt,wf,$t,it<400?-1:1);if(!St)throw new Error("Could not find a matching font-weight for value "+it);return St})(Wt.weight,et)))throw new Error("Failed to resolve a font for the rule '"+ld(Wt)+"'.");return et})(Je,Ct);this.pdf.setFont(xt.ref.name,xt.ref.style)}
vendor: 4,164 bytes, line 42
42else{var ct="";(Ge==="bold"||parseInt(Ge,10)>=700||ot==="bold")&&(ct="bold"),ot==="italic"&&(ct+="italic"),ct.length===0&&(ct="normal");for(var Nt="",Lt={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},He=0;He<qe.length;He++){if(this.pdf.internal.getFont(qe[He],ct,{noFallback:!0,disableWarning:!0})!==void 0){Nt=qe[He];break}if(ct==="bolditalic"&&this.pdf.internal.getFont(qe[He],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Nt=qe[He],ct="bold";else if(this.pdf.internal.getFont(qe[He],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Nt=qe[He],ct="normal";break}}if(Nt===""){for(var st=0;st<qe.length;st++)if(Lt[qe[st]]){Nt=Lt[qe[st]];break}}Nt=Nt===""?"Times":Nt,this.pdf.setFont(Nt,ct)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(B){this.ctx.globalCompositeOperation=B}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(B){this.ctx.globalAlpha=B}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(B){this.ctx.lineDashOffset=B,_e.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(B){this.ctx.lineDash=B,_e.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(B){this.ctx.ignoreClearRect=!!B}})};_.prototype.setLineDash=function(N){this.lineDash=N},_.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},_.prototype.fill=function(){W.call(this,"fill",!1)},_.prototype.stroke=function(){W.call(this,"stroke",!1)},_.prototype.beginPath=function(){this.path=[{type:"begin"}]},_.prototype.moveTo=function(N,z){if(isNaN(N)||isNaN(z))throw Ht.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var H=this.ctx.transform.applyToPoint(new d(N,z));this.path.push({type:"mt",x:H.x,y:H.y}),this.ctx.lastPoint=new d(N,z)},_.prototype.closePath=function(){var N=new d(0,0),z=0;for(z=this.path.length-1;z!==-1;z--)if(this.path[z].type==="begin"&&qt(this.path[z+1])==="object"&&typeof this.path[z+1].x=="number"){N=new d(this.path[z+1].x,this.path[z+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new d(N.x,N.y)},_.prototype.lineTo=function(N,z){if(isNaN(N)||isNaN(z))throw Ht.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var H=this.ctx.transform.applyToPoint(new d(N,z));this.path.push({type:"lt",x:H.x,y:H.y}),this.ctx.lastPoint=new d(H.x,H.y)},_.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),W.call(this,null,!0)},_.prototype.quadraticCurveTo=function(N,z,H,J){if(isNaN(H)||isNaN(J)||isNaN(N)||isNaN(z))throw Ht.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var te=this.ctx.transform.applyToPoint(new d(H,J)),se=this.ctx.transform.applyToPoint(new d(N,z));this.path.push({type:"qct",x1:se.x,y1:se.y,x:te.x,y:te.y}),this.ctx.lastPoint=new d(te.x,te.y)},_.prototype.bezierCurveTo=function(N,z,H,J,te,se){if(isNaN(te)||isNaN(se)||isNaN(N)||isNaN(z)||isNaN(H)||isNaN(J))throw Ht.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var pe=this.ctx.transform.applyToPoint(new d(te,se)),ge=this.ctx.transform.applyToPoint(new d(N,z)),xe=this.ctx.transform.applyToPoint(new d(H,J));this.path.push({type:"bct",x1:ge.x,y1:ge.y,x2:xe.x,y2:xe.y,x:pe.x,y:pe.y}),this.ctx.lastPoint=new d(pe.x,pe.y)},_.prototype.arc=function(N,z,H,J,te,se){if(isNaN(N)||isNaN(z)||isNaN(H)||isNaN(J)||isNaN(te))throw Ht.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to 
42jsPDF.context2d.arc");if(se=!!se,!this.ctx.transform.isIdentity){var pe=this.ctx.transform.applyToPoint(new d(N,z));N=pe.x,z=pe.y;var ge=this.ctx.transform.applyToPoint(new d(0,H)),xe=this.ctx.transform.applyToPoint(new d(0,0));H=Math.sqrt(Math.pow(ge.x-xe.x,2)+Math.pow(ge.y-xe.y,2))}Math.abs(te-J)>=2*Math.PI&&(J=0,te=2*Math.PI),this.path.push({type:"arc",x:N,y:z,radius:H,startAngle:J,endAngle:te,counterclockwise:se})},_.prototype.arcTo=function(N,z,H,J,te){throw new Error("arcTo not implemented.")},_.prototype.rect=function(N,z,H,J){if(isNaN(N)||isNaN(z)||isNaN(H)||isNaN(J))throw Ht.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(N,z),this.lineTo(N+H,z),this.lineTo(N+H,z+J),this.lineTo(N,z+J),this.lineTo(N,z),this.lineTo(N+H,z),this.lineTo(N,z)},_.prototype.fillRect=function(N,z,H,J){if(isNaN(N)||isNaN(z)||isNaN(H)||isNaN(J))throw Ht.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var te={};this.lineCap!=="butt"&&(te.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(te.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(N,z,H,J),this.fill(),te.hasOwnProperty("lineCap")&&(this.lineCap=te.lineCap),te.hasOwnProperty("lineJoin")&&(this.lineJoin=te.lineJoin)}},_.prototype.strokeRect=function(N,z,H,J){if(isNaN(N)||isNaN(z)||isNaN(H)||isNaN(J))throw Ht.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");E.call(this)||(this.beginPath(),this.rect(N,z,H,J),this.stroke())},_.prototype.clearRect=function(N,z,H,J){if(isNaN(N)||isNaN(z)||isNaN(H)||isNaN(J))throw Ht.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(N,z,H,J))},_.prototype.save=function(N){N=typeof N!="boolean"||N;for(var z=this.pdf.internal.getCurrentPageInfo().pageNumber,H=0;H<this.pdf.internal.getNumberOfPages();H++)this.pdf.setPage(H+1),this.pdf.internal.out("q");if(this.pdf.setPage(z),N){this.ctx.fontSize=this.pdf.internal.getFontSize();var J=new m(this.ctx);this.ctxStack.push(this.ctx),this.ctx=J}},_.prototype.restore=function(N){N=typeof N!="boolean"||N;for(var z=this.pdf.internal.getCurrentPageInfo().pageNumber,H=0;H<this.pdf.internal.getNumberOfPages();H++)this.pdf.setPage(H+1),this.pdf.internal.out("Q");this.pdf.setPage(z),N&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},_.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var F=function(N){var z,H,J,te;if(N.isCanvasGradient===!0&&(N=N.getColor()),!N)return{r:0,g:0,b:0,a:0,style:N};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(N))z=0,H=0,J=0,te=0;else{var se=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(N);if(se!==null)z=parseInt(se[1]),H=parseInt(se[2]),J=parseInt(se[3]),te=1;else if((se=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(N))!==null)z=parseInt(se[1]),H=parseInt(se[2]),J=parseInt(se[3]),te=parseFloat(se[4]);else{if(te=1,typeof N=="string"&&N.charAt(0)!=="#"){var pe=new df(N);N=pe.ok?pe.toHex():"#000000"}N.length===4?(z=N.substring(1,2),z+=z,H=N.substring(2,3),H+=H,J=N.substring(3,4),J+=J):(z=N.substring(1,3),H=N.substring(3,5),J=N.substring(5,7)),z=parseInt(z,16),H=parseInt(H,16),J=parseInt(J,16)}}return{r:z,g:H,b:J,a:te,style:N}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},E=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};_.prototype.fillText=function(N,z,H,J){if(isNaN(z)||isNaN(H)||typeof N!="string")throw Ht.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to 
42jsPDF.context2d.fillText");if(J=isNaN(J)?void 0:J,!p.call(this)){var te=Z(this.ctx.transform.rotation),se=this.ctx.transform.scaleX;I.call(this,{text:N,x:z,y:H,scale:se,angle:te,align:this.textAlign,maxWidth:J})}},_.prototype.strokeText=function(N,z,H,J){if(isNaN(z)||isNaN(H)||typeof N!="string")throw Ht.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!E.call(this)){J=isNaN(J)?void 0:J;var te=Z(this.ctx.transform.rotation),se=this.ctx.transform.scaleX;I.call(this,{text:N,x:z,y:H,scale:se,renderingMode:"stroke",angle:te,align:this.textAlign,maxWidth:J})}},_.prototype.measureText=function(N){if(typeof N!="string")throw Ht.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var z=this.pdf,H=this.pdf.internal.scaleFactor,J=z.internal.getFontSize(),te=z.getStringUnitWidth(N)*J/z.internal.scaleFactor;return new function(se){var pe=(se=se||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return pe}}),this}({width:te*=Math.round(96*H/72*1e4)/1e4})},_.prototype.scale=function(N,z){if(isNaN(N)||isNaN(z))throw Ht.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var H=new c(N,0,0,z,0,0);this.ctx.transform=this.ctx.transform.multiply(H)},_.prototype.rotate=function(N){if(isNaN(N))throw Ht.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var z=new c(Math.cos(N),Math.sin(N),-Math.sin(N),Math.cos(N),0,0);this.ctx.transform=this.ctx.transform.multiply(z)},_.prototype.translate=function(N,z){if(isNaN(N)||isNaN(z))throw Ht.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var H=new c(1,0,0,1,N,z);this.ctx.transform=this.ctx.transform.multiply(H)},_.prototype.transform=function(N,z,H,J,te,se){if(isNaN(N)||isNaN(z)||isNaN(H)||isNaN(J)||isNaN(te)||isNaN(se))throw Ht.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var pe=new c(N,z,H,J,te,se);this.ctx.transform=this.ctx.transform.multiply(pe)},_.prototype.setTransform=function(N,z,H,J,te,se){N=isNaN(N)?1:N,z=isNaN(z)?0:z,H=isNaN(H)?0:H,J=isNaN(J)?1:J,te=isNaN(te)?0:te,se=isNaN(se)?0:se,this.ctx.transform=new c(N,z,H,J,te,se)};var k=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};_.prototype.drawImage=function(N,z,H,J,te,se,pe,ge,xe){var Ie=this.pdf.getImageProperties(N),Oe=1,Me=1,Ve=1,B=1;J!==void 0&&ge!==void 0&&(Ve=ge/J,B=xe/te,Oe=Ie.width/J*ge/J,Me=Ie.height/te*xe/te),se===void 0&&(se=z,pe=H,z=0,H=0),J!==void 0&&ge===void 0&&(ge=J,xe=te),J===void 0&&ge===void 0&&(ge=Ie.width,xe=Ie.height);var we=this.ctx.transform.decompose(),ot=Z(we.rotate.shx),Ge=new c,ke=(Ge=(Ge=(Ge=Ge.multiply(we.translate)).multiply(we.skew)).multiply(we.scale)).applyToRectangle(new l(se-z*Ve,pe-H*B,J*Oe,te*Me));if(this.autoPaging){for(var tt,De=L.call(this,ke),qe=[],Je=0;Je<De.length;Je+=1)qe.indexOf(De[Je])===-1&&qe.push(De[Je]);V(qe);for(var Ct=qe[0],xt=qe[qe.length-1],ct=Ct;ct<xt+1;ct++){this.pdf.setPage(ct);var Nt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Lt=ct===1?this.posY+this.margin[0]:this.margin[0],He=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],st=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],We=ct===1?0:He+(ct-2)*st;if(this.ctx.clip_path.length!==0){var jt=this.path;tt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(tt,this.posX+this.margin[3],-We+Lt+this.ctx.prevPageLastElemOffset),fe.call(this,"fill",!0),this.path=jt}var kt=JSON.parse(JSON.stringify(ke));kt=y([kt],this.posX+this.margin[3],-We+Lt+this.ctx.prevPageLastElemOffset)[0];var yt=(ct>Ct||ct<xt)&&k.call(this);yt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Nt,st,null).clip().discardPath()),this.pdf.addImage(N,"JPEG",kt.x,kt.y,kt.w,kt.h,null,
vendor: 10,107 bytes, line 42
42null,ot),yt&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(N,"JPEG",ke.x,ke.y,ke.w,ke.h,null,null,ot)};var L=function(N,z,H){var J=[];z=z||this.pdf.internal.pageSize.width,H=H||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var te=this.posY+this.ctx.prevPageLastElemOffset;switch(N.type){default:case"mt":case"lt":J.push(Math.floor((N.y+te)/H)+1);break;case"arc":J.push(Math.floor((N.y+te-N.radius)/H)+1),J.push(Math.floor((N.y+te+N.radius)/H)+1);break;case"qct":var se=le(this.ctx.lastPoint.x,this.ctx.lastPoint.y,N.x1,N.y1,N.x,N.y);J.push(Math.floor((se.y+te)/H)+1),J.push(Math.floor((se.y+se.h+te)/H)+1);break;case"bct":var pe=ne(this.ctx.lastPoint.x,this.ctx.lastPoint.y,N.x1,N.y1,N.x2,N.y2,N.x,N.y);J.push(Math.floor((pe.y+te)/H)+1),J.push(Math.floor((pe.y+pe.h+te)/H)+1);break;case"rect":J.push(Math.floor((N.y+te)/H)+1),J.push(Math.floor((N.y+N.h+te)/H)+1)}for(var ge=0;ge<J.length;ge+=1)for(;this.pdf.internal.getNumberOfPages()<J[ge];)S.call(this);return J},S=function(){var N=this.fillStyle,z=this.strokeStyle,H=this.font,J=this.lineCap,te=this.lineWidth,se=this.lineJoin;this.pdf.addPage(),this.fillStyle=N,this.strokeStyle=z,this.font=H,this.lineCap=J,this.lineWidth=te,this.lineJoin=se},y=function(N,z,H){for(var J=0;J<N.length;J++)switch(N[J].type){case"bct":N[J].x2+=z,N[J].y2+=H;case"qct":N[J].x1+=z,N[J].y1+=H;default:N[J].x+=z,N[J].y+=H}return N},V=function(N){return N.sort(function(z,H){return z-H})},W=function(N,z){var H=this.fillStyle,J=this.strokeStyle,te=this.lineCap,se=this.lineWidth,pe=Math.abs(se*this.ctx.transform.scaleX),ge=this.lineJoin;if(this.autoPaging){for(var xe,Ie,Oe=JSON.parse(JSON.stringify(this.path)),Me=JSON.parse(JSON.stringify(this.path)),Ve=[],B=0;B<Me.length;B++)if(Me[B].x!==void 0)for(var we=L.call(this,Me[B]),ot=0;ot<we.length;ot+=1)Ve.indexOf(we[ot])===-1&&Ve.push(we[ot]);for(var Ge=0;Ge<Ve.length;Ge++)for(;this.pdf.internal.getNumberOfPages()<Ve[Ge];)S.call(this);V(Ve);for(var ke=Ve[0],tt=Ve[Ve.length-1],De=ke;De<tt+1;De++){this.pdf.setPage(De),this.fillStyle=H,this.strokeStyle=J,this.lineCap=te,this.lineWidth=pe,this.lineJoin=ge;var qe=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Je=De===1?this.posY+this.margin[0]:this.margin[0],Ct=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],xt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ct=De===1?0:Ct+(De-2)*xt;if(this.ctx.clip_path.length!==0){var Nt=this.path;xe=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(xe,this.posX+this.margin[3],-ct+Je+this.ctx.prevPageLastElemOffset),fe.call(this,N,!0),this.path=Nt}if(Ie=JSON.parse(JSON.stringify(Oe)),this.path=y(Ie,this.posX+this.margin[3],-ct+Je+this.ctx.prevPageLastElemOffset),z===!1||De===0){var Lt=(De>ke||De<tt)&&k.call(this);Lt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],qe,xt,null).clip().discardPath()),fe.call(this,N,z),Lt&&this.pdf.restoreGraphicsState()}this.lineWidth=se}this.path=Oe}else this.lineWidth=pe,fe.call(this,N,z),this.lineWidth=se},fe=function(N,z){if((N!=="stroke"||z||!E.call(this))&&(N==="stroke"||z||!p.call(this))){for(var H,J,te=[],se=this.path,pe=0;pe<se.length;pe++){var ge=se[pe];switch(ge.type){case"begin":te.push({begin:!0});break;case"close":te.push({close:!0});break;case"mt":te.push({start:ge,deltas:[],abs:[]});break;case"lt":var xe=te.length;if(se[pe-1]&&!isNaN(se[pe-1].x)&&(H=[ge.x-se[pe-1].x,ge.y-se[pe-1].y],xe>0)){for(;xe>=0;xe--)if(te[xe-1].close!==!0&&te[xe-1].begin!==!0){te[xe-1].deltas.push(H),te[xe-1].abs.push(ge);break}}break;case"bct":H=[ge.x1-se[pe-1].x,ge.y1-se[pe-1].y,ge.x2-se[pe-1].x,ge.y2-se[pe-1].y,ge.x-se[pe-1].x,ge.y-se[pe-1].y],te[te.length-1].deltas.push(H);break;case"qct":var Ie=se[pe-1].x+2/3*(ge.x1-se[pe-1].x),Oe=se[pe-1].y+2/3*(ge.y1-se[pe-1].y),Me=ge.x+2/3*(ge.x1-ge.x),Ve=ge.y+2/3*(ge.y1-ge.y),B=ge.x,we=ge.y;H=[Ie-se[pe-1].x,Oe-se[pe-1].y,Me-se[pe-1].x,Ve-se[pe-1].y,B-se[pe-1].x,we-se[pe-1].y],te[te.length-1].deltas.push(H);break;case"arc":te.push({deltas:[],abs:[],arc:!0}),Array.isArray(te[te.length-1].abs)&&te[te.length-1].abs.push(ge)}}J=z?null:N==="stroke"?"stroke":"fill";for(var ot=!1,Ge=0;Ge<te.length;Ge++)if(te[Ge].arc)for(var ke=te[Ge].abs,tt=0;tt<ke.length;tt++){var De=ke[tt];De.type==="arc"?Q.call(this,De.x,De.y,De.radius,De.startAngle,De.endAngle,De.counterclockwise,void 0,z,!ot):U.call(this,De.x,De.y),ot=!0}else if(te[Ge].close===!0)this.pdf.internal.out("h"),ot=!1;else if(te[Ge].begin!==!0){var qe=te[Ge].start.x,Je=te[Ge].start.y;T.call(this,te[Ge].deltas,qe,Je),ot=!0}J&&q.call(this,J),z&&G.call(this)}},Ae=function(N){var z=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,H=z*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return N-H;case"top":return N+z-H;case"hanging":return N+z-2*H;case"middle":return N+z/2-H;default:return N}},me=function(N){return N+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};_.prototype.createLinearGradient=function(){var N=function(){};return N.colorStops=[],N.addColorStop=function(z,H){this.colorStops.push([z,H])},N.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},N.isCanvasGradient=!0,N},_.prototype.createPattern=function(){return this.createLinearGradient()},_.prototype.createRadialGradient=function(){return this.createLinearGradient()};var Q=function(N,z,H,J,te,se,pe,ge,xe){for(var Ie=ie.call(this,H,J,te,se),Oe=0;Oe<Ie.length;Oe++){var Me=Ie[Oe];Oe===0&&(xe?v.call(this,Me.x1+N,Me.y1+z):U.call(this,Me.x1+N,Me.y1+z)),Y.call(this,N,z,Me.x2,Me.y2,Me.x3,Me.y3,Me.x4,Me.y4)}ge?G.call(this):q.call(this,pe)},q=function(N){switch(N){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},G=function(){this.pdf.clip(),this.pdf.discardPath()},v=function(N,z){this.pdf.internal.out(t(N)+" "+n(z)+" m")},I=function(N){var z;switch(N.align){case"right":case"end":z="right";break;case"center":z="center";break;default:z="left"}var H,J,te,se=this.pdf.getTextDimensions(N.text),pe=Ae.call(this,N.y),ge=me.call(this,pe)-se.h,xe=this.ctx.transform.applyToPoint(new d(N.x,pe));if(this.autoPaging){var Ie=this.ctx.transform.decompose(),Oe=new c;Oe=(Oe=(Oe=Oe.multiply(Ie.translate)).multiply(Ie.skew)).multiply(Ie.scale);for(var Me=this.ctx.transform.applyToRectangle(new l(N.x,pe,se.w,se.h)),Ve=Oe.applyToRectangle(new l(N.x,ge,se.w,se.h)),B=L.call(this,Ve),we=[],ot=0;ot<B.length;ot+=1)we.indexOf(B[ot])===-1&&we.push(B[ot]);V(we);for(var Ge=we[0],ke=we[we.length-1],tt=Ge;tt<ke+1;tt++){this.pdf.setPage(tt);var De=tt===1?this.posY+this.margin[0]:this.margin[0],qe=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Je=this.pdf.internal.pageSize.height-this.margin[2],Ct=Je-this.margin[0],xt=this.pdf.internal.pageSize.width-this.margin[1],ct=xt-this.margin[3],Nt=tt===1?0:qe+(tt-2)*Ct;if(this.ctx.clip_path.length!==0){var Lt=this.path;H=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(H,this.posX+this.margin[3],-1*Nt+De),fe.call(this,"fill",!0),this.path=Lt}var He=y([JSON.parse(JSON.stringify(Ve))],this.posX+this.margin[3],-Nt+De+this.ctx.prevPageLastElemOffset)[0];N.scale>=.01&&(J=this.pdf.internal.getFontSize(),this.pdf.setFontSize(J*N.scale),te=this.lineWidth,this.lineWidth=te*N.scale);var st=this.autoPaging!=="text";if(st||He.y+He.h<=Je){if(st||He.y>=De&&He.x<=xt){var We=st?N.text:this.pdf.splitTextToSize(N.text,N.maxWidth||xt-He.x)[0],jt=y([JSON.parse(JSON.stringify(Me))],this.posX+this.margin[3],-Nt+De+this.ctx.prevPageLastElemOffset)[0],kt=st&&(tt>Ge||tt<ke)&&k.call(this);kt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ct,Ct,null).clip().discardPath()),this.pdf.text(We,jt.x,jt.y,{angle:N.angle,align:z,renderingMode:N.renderingMode}),kt&&this.pdf.restoreGraphicsState()}}else He.y<Je&&(this.ctx.prevPageLastElemOffset+=Je-He.y);N.scale>=.01&&(this.pdf.setFontSize(J),this.lineWidth=te)}}else N.scale>=.01&&(J=this.pdf.internal.getFontSize(),this.pdf.setFontSize(J*N.scale),te=this.lineWidth,this.lineWidth=te*N.scale),this.pdf.text(N.text,xe.x+this.posX,xe.y+this.posY,{angle:N.angle,align:z,renderingMode:N.renderingMode,maxWidth:N.maxWidth}),N.scale>=.01&&(this.pdf.setFontSize(J),this.lineWidth=te)},U=function(N,z,H,J){H=H||0,J=J||0,this.pdf.internal.out(t(N+H)+" "+n(z+J)+" l")},T=function(N,z,H){return this.pdf.lines(N,z,H,null,null)},Y=function(N,z,H,J,te,se,pe,ge){this.pdf.internal.out([e(o(H+N)),e(i(J+z)),e(o(te+N)),e(i(se+z)),e(o(pe+N)),e(i(ge+z)),"c"].join(" "))},ie=function(N,z,H,J){for(var te=2*Math.PI,se=Math.PI/2;z>H;)z-=te;var pe=Math.abs(H-z);pe<te&&J&&(pe=te-pe);for(var ge=[],xe=J?-1:1,Ie=z;pe>1e-5;){var Oe=Ie+xe*Math.min(pe,se);ge.push(oe.call(this,N,Ie,Oe)),pe-=Math.abs(Oe-Ie),Ie=Oe}return ge},oe=function(N,z,H){var J=(H-z)/2,te=N*Math.cos(J),se=N*Math.sin(J),pe=te,ge=-se,xe=pe*pe+ge*ge,Ie=xe+pe*te+ge*se,Oe=4/3*(Math.sqrt(2*xe*Ie)-Ie)/(pe*se-ge*te),Me=pe-Oe*ge,Ve=ge+Oe*pe,B=Me,we=-Ve,ot=J+z,Ge=Math.cos(ot),ke=Math.sin(ot);return{x1:N*Math.cos(z),y1:N*Math.sin(z),x2:Me*Ge-Ve*ke,y2:Me*ke+Ve*Ge,x3:B*Ge-we*ke,y3:B*ke+we*Ge,x4:N*Math.cos(H),y4:N*Math.sin(H)}},Z=function(N){return 180*N/Math.PI},le=function(N,z,H,J,te,se){var pe=N+.5*(H-N),ge=z+.5*(J-z),xe=te+.5*(H-te),Ie=se+.5*(J-se),Oe=Math.min(N,te,pe,xe),Me=Math.max(N,te,pe,xe),Ve=Math.min(z,se,ge,Ie),B=Math.max(z,se,ge,Ie);return new l(Oe,Ve,Me-Oe,B-Ve)},ne=function(N,z,H,J,te,se,pe,ge){var xe,Ie,Oe,Me,Ve,B,we,ot,Ge,ke,tt,De,qe,Je,Ct=H-N,xt=J-z,ct=te-H,Nt=se-J,Lt=pe-te,He=ge-se;for(Ie=0;Ie<41;Ie++)Ge=(we=(Oe=N+(xe=Ie/40)*Ct)+xe*((Ve=H+xe*ct)-Oe))+xe*(Ve+xe*(te+xe*Lt-Ve)-we),ke=(ot=(Me=z+xe*xt)+xe*((B=J+xe*Nt)-Me))+xe*(B+xe*(se+xe*He-B)-ot),Ie==0?(tt=Ge,De=ke,qe=Ge,Je=ke):(tt=Math.min(tt,Ge),De=Math.min(De,ke),qe=Math.max(qe,Ge),Je=Math.max(Je,ke));return new l(Math.round(tt),Math.round(De),Math.round(qe-tt),Math.round(Je-De))},_e=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var N,z,H=(N=this.ctx.lineDash,z=this.ctx.lineDashOffset,JSON.stringify({lineDash:N,lineDashOffset:z}));
42this.prevLineDash!==H&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=H)}}})(Ze.API),(function(r){var e=function(d){var l,c,f,m,_,F,p,E,k,L;for(c=[],f=0,m=(d+=l="\0\0\0\0".slice(d.length%4||4)).length;m>f;f+=4)(_=(d.charCodeAt(f)<<24)+(d.charCodeAt(f+1)<<16)+(d.charCodeAt(f+2)<<8)+d.charCodeAt(f+3))!==0?(F=(_=((_=((_=((_=(_-(L=_%85))/85)-(k=_%85))/85)-(E=_%85))/85)-(p=_%85))/85)%85,c.push(F+33,p+33,E+33,k+33,L+33)):c.push(122);return(function(S,y){for(var V=y;V>0;V--)S.pop()})(c,l.length),String.fromCharCode.apply(String,c)+"~>"},t=function(d){var l,c,f,m,_,F=String,p="length",E=255,k="charCodeAt",L="slice",S="replace";for(d[L](-2),d=d[L](0,-2)[S](/\s/g,"")[S]("z","!!!!!"),f=[],m=0,_=(d+=l="uuuuu"[L](d[p]%5||5))[p];_>m;m+=5)c=52200625*(d[k](m)-33)+614125*(d[k](m+1)-33)+7225*(d[k](m+2)-33)+85*(d[k](m+3)-33)+(d[k](m+4)-33),f.push(E&c>>24,E&c>>16,E&c>>8,E&c);return(function(y,V){for(var W=V;W>0;W--)y.pop()})(f,l[p]),F.fromCharCode.apply(F,f)},n=function(d){return d.split("").map(function(l){return("0"+l.charCodeAt().toString(16)).slice(-2)}).join("")+">"},o=function(d){var l=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((d=d.replace(/\s/g,"")).indexOf(">")!==-1&&(d=d.substr(0,d.indexOf(">"))),d.length%2&&(d+="0"),l.test(d)===!1)return"";for(var c="",f=0;f<d.length;f+=2)c+=String.fromCharCode("0x"+(d[f]+d[f+1]));return c},i=function(d){for(var l=new Uint8Array(d.length),c=d.length;c--;)l[c]=d.charCodeAt(c);return(l=Zl(l)).reduce(function(f,m){return f+String.fromCharCode(m)},"")};r.processDataByFilters=function(d,l){var c=0,f=d||"",m=[];for(typeof(l=l||[])=="string"&&(l=[l]),c=0;c<l.length;c+=1)switch(l[c]){case"ASCII85Decode":case"/ASCII85Decode":f=t(f),m.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":f=e(f),m.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":f=o(f),m.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":f=n(f),m.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":f=i(f),m.push("/FlateDecode");break;default:throw new Error('The filter: "'+l[c]+'" is not implemented')}return{data:f,reverseChain:m.reverse().join(" ")}}})(Ze.API),(function(r){r.loadFile=function(e,t,n){return(function(o,i,d){i=i!==!1,d=typeof d=="function"?d:function(){};var l=void 0;try{l=(function(c,f,m){var _=new XMLHttpRequest,F=0,p=function(E){var k=E.length,L=[],S=String.fromCharCode;for(F=0;F<k;F+=1)L.push(S(255&E.charCodeAt(F)));return L.join("")};if(_.open("GET",c,!f),_.overrideMimeType("text/plain; charset=x-user-defined"),f===!1&&(_.onload=function(){_.status===200?m(p(this.responseText)):m(void 0)}),_.send(null),f&&_.status===200)return p(_.responseText)})(o,i,d)}catch{}return l})(e,t,n)},r.allowFsRead=void 0,r.loadImageFile=r.loadFile})(Ze.API),(function(r){function e(){return(ut.html2canvas?Promise.resolve(ut.html2canvas):pl(()=>import("./html2canvas.esm-DXEQVQnt.js"),[])).catch(function(l){return Promise.reject(new Error("Could not load html2canvas: "+l))}).then(function(l){return l.default?l.default:l})}function t(){return(ut.DOMPurify?Promise.resolve(ut.DOMPurify):pl(()=>import("./purify.es-Cz4mVeUR.js"),[])).catch(function(l){return Promise.reject(new Error("Could not load dompurify: "+l))}).then(function(l){return l.default?l.default:l})}var n=function(l){var c=qt(l);return c==="undefined"?"undefined":c==="string"||l instanceof String?"string":c==="number"||l instanceof Number?"number":c==="function"||l instanceof Function?"function":l&&l.constructor===Array?"array":l&&l.nodeType===1?"element":c==="object"?"object":"unknown"},o=function(l,c){var f=document.createElement(l);for(var m in c.className&&(f.className=c.className),c.innerHTML&&c.dompurify&&(f.innerHTML=c.dompurify.sanitize(c.innerHTML)),c.style)f.style[m]=c.style[m];return f},i=function l(c,f){for(var m=c.nodeType===3?document.createTextNode(c.nodeValue):c.cloneNode(!1),_=c.firstChild;_;_=_.nextSibling)f!==!0&&_.nodeType===1&&_.nodeName==="SCRIPT"||m.appendChild(l(_,f));return c.nodeType===1&&(c.nodeName==="CANVAS"?(m.width=c.width,m.height=c.height,m.getContext("2d").drawImage(c,0,0)):c.nodeName!=="TEXTAREA"&&c.nodeName!=="SELECT"||(m.value=c.value),m.addEventListener("load",function(){m.scrollTop=c.scrollTop,m.scrollLeft=c.scrollLeft},!0)),m},d=function l(c){var f=Object.assign(l.convert(Promise.resolve()),JSON.parse(JSON.stringify(l.template))),m=l.convert(Promise.resolve(),f);return(m=m.setProgress(1,l,1,[l])).set(c)};(d.prototype=Object.create(Promise.prototype)).constructor=d,d.convert=function(l,c){return l.__proto__=c||d.prototype,l},d.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},d.prototype.from=function(l,c){return this.then(function(){switch(c=c||(function(f){switch(n(f)){case"string":return"string";case"element":return f.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}})(l),c){case"string":return this.then(t).then(function(f){return this.set({src:o("div",{innerHTML:l,dompurify:f})})});case"element":return this.set({src:l});case"canvas":return this.set({canvas:l});case"img":return this.set({img:l});default:return this.error("Unknown source type.")}})},d.prototype.to=function(l){switch(l){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();
vendor: 26,465 bytes, lines 42-48
42case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},d.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var l={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},c=i(this.prop.src,this.opt.html2canvas.javascriptEnabled);c.tagName==="BODY"&&(l.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:l}),this.prop.container.appendChild(c),this.prop.container.firstChild.appendChild(o("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},d.prototype.toCanvas=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(e).then(function(c){var f=Object.assign({},this.opt.html2canvas);return delete f.onrendered,c(this.prop.container,f)}).then(function(c){(this.opt.html2canvas.onrendered||function(){})(c),this.prop.canvas=c,document.body.removeChild(this.prop.overlay)})},d.prototype.toContext2d=function(){var l=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(l).then(e).then(function(c){var f=this.opt.jsPDF,m=this.opt.fontFaces,_=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,F=Object.assign({async:!0,allowTaint:!0,scale:_,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete F.onrendered,f.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,f.context2d.posX=this.opt.x,f.context2d.posY=this.opt.y,f.context2d.margin=this.opt.margin,f.context2d.fontFaces=m,m)for(var p=0;p<m.length;++p){var E=m[p],k=E.src.find(function(L){return L.format==="truetype"});k&&f.addFont(k.url,E.ref.name,E.ref.style)}return F.windowHeight=F.windowHeight||0,F.windowHeight=F.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):F.windowHeight,f.context2d.save(!0),c(this.prop.container,F)}).then(function(c){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(c),this.prop.canvas=c,document.body.removeChild(this.prop.overlay)})},d.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var l=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=l})},d.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},d.prototype.output=function(l,c,f){return(f=f||"pdf").toLowerCase()==="img"||f.toLowerCase()==="image"?this.outputImg(l,c):this.outputPdf(l,c)},d.prototype.outputPdf=function(l,c){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(l,c)})},d.prototype.outputImg=function(l){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(l){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+l+'" is not supported.'}})},d.prototype.save=function(l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(l?{filename:l}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},d.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},d.prototype.set=function(l){if(n(l)!=="object")return this;var c=Object.keys(l||{}).map(function(f){if(f in d.template.prop)return function(){this.prop[f]=l[f]};switch(f){case"margin":return this.setMargin.bind(this,l.margin);case"jsPDF":return function(){return this.opt.jsPDF=l.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,l.pageSize);default:return function(){this.opt[f]=l[f]}}},this);return this.then(function(){return this.thenList(c)})},d.prototype.get=function(l,c){return this.then(function(){var f=l in d.template.prop?this.prop[l]:this.opt[l];return c?c(f):f})},d.prototype.setMargin=function(l){return this.then(function(){switch(n(l)){case"number":l=[l,l,l,l];case"array":if(l.length===2&&(l=[l[0],l[1],l[0],l[1]]),l.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=l}).then(this.setPageSize)},d.prototype.setPageSize=function(l){function c(f,m){return Math.floor(f*m/72*96)}return this.then(function(){(l=l||Ze.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(l.inner={width:l.width-this.opt.margin[1]-this.opt.margin[3],height:l.height-this.opt.margin[0]-this.opt.margin[2]},l.inner.px={width:c(l.inner.width,l.k),height:c(l.inner.height,l.k)},l.inner.ratio=l.inner.height/l.inner.width),this.prop.pageSize=l})},d.prototype.setProgress=function(l,c,f,m){return l!=null&&(this.progress.val=l),c!=null&&(this.progress.state=c),f!=null&&(this.progress.n=f),m!=null&&(this.progress.stack=m),this.progress.ratio=this.progress.val/this.progress.state,this},d.prototype.updateProgress=function(l,c,f,m){return this.setProgress(l?this.progress.val+l:null,c||null,f?this.progress.n+f:null,m?this.progress.stack.concat(m):null)},d.prototype.then=function(l,c){var f=this;return this.thenCore(l,c,function(m,_){return f.updateProgress(null,null,1,[m]),Promise.prototype.then.call(this,function(F){return f.updateProgress(null,m),F}).then(m,_).then(function(F){return f.updateProgress(1),F})})},d.prototype.thenCore=function(l,c,f){f=f||Promise.prototype.then;var m=this;l&&(l=l.bind(m)),c&&(c=c.bind(m));var _=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?m:d.convert(Object.assign({},m),Promise.prototype),F=f.call(_,l,c);return d.convert(F,m.__proto__)},d.prototype.thenExternal=function(l,c){return Promise.prototype.then.call(this,l,c)},d.prototype.thenList=function(l){var c=this;return l.forEach(function(f){c=c.thenCore(f)}),c},d.prototype.catch=function(l){l&&(l=l.bind(this));var c=Promise.prototype.catch.call(this,l);return d.convert(c,this)},d.prototype.catchExternal=function(l){return Promise.prototype.catch.call(this,l)},d.prototype.error=function(l){return this.then(function(){throw new Error(l)})},d.prototype.using=d.prototype.set,d.prototype.saveAs=d.prototype.save,d.prototype.export=d.prototype.output,d.prototype.run=d.prototype.then,Ze.getPageSize=function(l,c,f){if(qt(l)==="object"){var m=l;l=m.orientation,c=m.unit||c,f=m.format||f}c=c||"mm",f=f||"a4",l=(""+(l||"P")).toLowerCase();var _,F=(""+f).toLowerCase(),p={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(c){case"pt":_=1;break;case"mm":_=72/25.4;break;case"cm":_=72/2.54;break;case"in":_=72;break;case"px":_=.75;break;case"pc":case"em":_=12;break;case"ex":_=6;break;default:throw"Invalid unit: "+c}var E,k=0,L=0;if(p.hasOwnProperty(F))k=p[F][1]/_,L=p[F][0]/_;else try{k=f[1],L=f[0]}catch{throw new Error("Invalid format: "+f)}if(l==="p"||l==="portrait")l="p",L>k&&(E=L,L=k,k=E);else{if(l!=="l"&&l!=="landscape")throw"Invalid orientation: "+l;l="l",k>L&&(E=L,L=k,k=E)}return{width:L,height:k,unit:c,k:_,orientation:l}},r.html=function(l,c){(c=c||{}).callback=c.callback||function(){},c.html2canvas=c.html2canvas||{},c.html2canvas.canvas=c.html2canvas.canvas||this.canvas,c.jsPDF=c.jsPDF||this,c.fontFaces=c.fontFaces?c.fontFaces.map(Ul):null;var f=new d(c);return c.worker?f:f.from(l).doCallback()}})(Ze.API),Ze.API.addJS=function(r){var e,t,n=(function(o){for(var i="",d=0;d<o.length;d++){var l=o[d];if(l==="("||l===")"){for(var c=0,f=d-1;f>=0&&o[f]==="\\";f--)c++;i+=c%2==0?"\\"+l:l}else i+=l}return i})(r);return this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+n+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){e!==void 0&&t!==void 0&&this.internal.out("/Names <</JavaScript "+e+" 0 R>>")}),this},(function(r){var e;r.events.push(["postPutResources",function(){var t=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var o=t.outline.render().split(/\r\n/),i=0;i<o.length;i++){var d=o[i],l=n.exec(d);if(l!=null){var c=l[1];t.internal.newObjectDeferredBegin(c,!1)}t.internal.write(d)}if(this.outline.createNamedDestinations){var f=this.internal.pages.length,m=[];for(i=0;i<f;i++){var _=t.internal.newObject();m.push(_);var F=t.internal.getPageInfo(i+1);t.internal.write("<< /D["+F.objId+" 0 R /XYZ null null null]>> endobj")}var p=t.internal.newObject();for(t.internal.write("<< /Names [ "),i=0;i<m.length;i++)t.internal.write("(page_"+(i+1)+")"+m[i]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+p+" 0 R"),t.internal.write(">>","endobj")}}]),r.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+e+" 0 R"))}]),r.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(n,o,i){var d={title:o,options:i,children:[]};return n==null&&(n=this.root),n.children.push(d),d},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(n){n.id=t.internal.newObjectDeferred();for(var o=0;o<n.children.length;o++)this.genIds_r(n.children[o])},t.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},t.outline.renderItems=function(n){for(var o=this.ctx.pdf.internal.getVerticalCoordinateString,i=0;i<n.children.length;i++){var d=n.children[i];this.objStart(d),this.line("/Title "+this.makeString(d.title)),this.line("/Parent "+this.makeRef(n)),i>0&&this.line("/Prev "+this.makeRef(n.children[i-1])),i<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[i+1])),d.children.length>0&&(this.line("/First "+this.makeRef(d.children[0])),this.line("/Last "+this.makeRef(d.children[d.children.length-1])));var l=this.count=this.count_r({count:0},d);if(l>0&&this.line("/Count "+l),d.options&&d.options.pageNumber){var c=t.internal.getPageInfo(d.options.pageNumber);this.line("/Dest ["+c.objId+" 0 R /XYZ 0 "+o(0)+" 0]")}this.objEnd()}for(var f=0;f<n.children.length;f++)this.renderItems(n.children[f])},t.outline.line=function(n){this.ctx.val+=n+`\r
43`},t.outline.makeRef=function(n){return n.id+" 0 R"},t.outline.makeString=function(n){return"("+t.internal.pdfEscape(n)+")"},t.outline.objStart=function(n){this.ctx.val+=`\r
44`+n.id+` 0 obj\r
45<<\r
46`},t.outline.objEnd=function(){this.ctx.val+=`>> \r
47endobj\r
48`},t.outline.count_r=function(n,o){for(var i=0;i<o.children.length;i++)n.count++,this.count_r(n,o.children[i]);return n.count}}])})(Ze.API),(function(r){var e=[192,193,194,195,196,197,198,199];r.processJPEG=function(t,n,o,i,d,l){var c,f=this.decode.DCT_DECODE,m=null;if(typeof t=="string"||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=d||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,c=(function(_){for(var F,p=256*_.charCodeAt(4)+_.charCodeAt(5),E=_.length,k={width:0,height:0,numcomponents:1},L=4;L<E;L+=2){if(L+=p,e.indexOf(_.charCodeAt(L+1))!==-1){F=256*_.charCodeAt(L+5)+_.charCodeAt(L+6),k={width:256*_.charCodeAt(L+7)+_.charCodeAt(L+8),height:F,numcomponents:_.charCodeAt(L+9)};break}p=256*_.charCodeAt(L+2)+_.charCodeAt(L+3)}return k})(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t),c.numcomponents){case 1:l=this.color_spaces.DEVICE_GRAY;break;case 4:l=this.color_spaces.DEVICE_CMYK;break;case 3:l=this.color_spaces.DEVICE_RGB}m={data:t,width:c.width,height:c.height,colorSpace:l,bitsPerComponent:8,filter:f,index:n,alias:o}}return m}})(Ze.API),Ze.API.processPNG=function(r,e,t,n){if(this.__addimage__.isArrayBuffer(r)&&(r=new Uint8Array(r)),this.__addimage__.isArrayBufferView(r)){var o,i=Qp(r,{checkCrc:!0}),d=i.width,l=i.height,c=i.channels,f=i.palette,m=i.depth;o=f&&c===1?(function(Q){for(var q=Q.width,G=Q.height,v=Q.data,I=Q.palette,U=Q.depth,T=!1,Y=[],ie=[],oe=void 0,Z=!1,le=0,ne=0;ne<I.length;ne++){var _e=hc(I[ne],4),N=_e[0],z=_e[1],H=_e[2],J=_e[3];Y.push(N,z,H),J!=null&&(J===0?(le++,ie.length<1&&ie.push(ne)):J<255&&(Z=!0))}if(Z||le>1){T=!0,ie=void 0;var te=q*G;oe=new Uint8Array(te);for(var se=new DataView(v.buffer),pe=0;pe<te;pe++){var ge=Vl(se,pe,U),xe=hc(I[ge],4)[3];oe[pe]=xe}}else le===0&&(ie=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:T?8:void 0,colorBytes:v,alphaBytes:oe,needSMask:T,palette:Y,mask:ie}})(i):c===2||c===4?(function(Q){for(var q=Q.data,G=Q.width,v=Q.height,I=Q.channels,U=Q.depth,T=I===2?"DeviceGray":"DeviceRGB",Y=I-1,ie=G*v,oe=Y,Z=ie*oe,le=1*ie,ne=Math.ceil(Z*U/8),_e=Math.ceil(le*U/8),N=new Uint8Array(ne),z=new Uint8Array(_e),H=new DataView(q.buffer),J=new DataView(N.buffer),te=new DataView(z.buffer),se=!1,pe=0;pe<ie;pe++){for(var ge=pe*I,xe=0;xe<oe;xe++)yd(J,Vl(H,ge+xe,U),pe*oe+xe,U);var Ie=Vl(H,ge+oe,U);Ie<(1<<U)-1&&(se=!0),yd(te,Ie,1*pe,U)}return{colorSpace:T,colorsPerPixel:Y,sMaskBitsPerComponent:se?U:void 0,colorBytes:N,alphaBytes:z,needSMask:se}})(i):(function(Q){var q=Q.data,G=Q.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:G,colorsPerPixel:G==="DeviceGray"?1:3,colorBytes:q instanceof Uint16Array?(function(v){for(var I=v.length,U=new Uint8Array(2*I),T=new DataView(U.buffer,U.byteOffset,U.byteLength),Y=0;Y<I;Y++)T.setUint16(2*Y,v[Y],!1);return U})(q):q,needSMask:!1}})(i);var _,F,p,E=o,k=E.colorSpace,L=E.colorsPerPixel,S=E.sMaskBitsPerComponent,y=E.colorBytes,V=E.alphaBytes,W=E.needSMask,fe=E.palette,Ae=E.mask,me=null;return n!==Ze.API.image_compression.NONE&&typeof Zl=="function"?(me=(function(Q){var q;switch(Q){case Ze.API.image_compression.FAST:q=11;break;case Ze.API.image_compression.MEDIUM:q=13;break;case Ze.API.image_compression.SLOW:q=14;break;default:q=12}return q})(n),_=this.decode.FLATE_DECODE,F="/Predictor ".concat(me," /Colors ").concat(L," /BitsPerComponent ").concat(m," /Columns ").concat(d),r=hd(y,Math.ceil(d*L*m/8),L,m,n),W&&(p=hd(V,Math.ceil(d*S/8),1,S,n))):(_=void 0,F=void 0,r=y,W&&(p=V)),(this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r))&&(r=this.__addimage__.arrayBufferToBinaryString(r)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:t,data:r,index:e,filter:_,decodeParameters:F,transparency:Ae,palette:fe,sMask:p,predictor:me,width:d,height:l,bitsPerComponent:m,sMaskBitsPerComponent:S,colorSpace:k}}},(function(r){r.processGIF89A=function(e,t,n,o){var i=new w2(e),d=i.width,l=i.height,c=[];i.decodeAndBlitFrameRGBA(0,c);var f={data:c,width:d,height:l},m=new Hl(100).encode(f,100);return r.processJPEG.call(this,m,t,n,o)},r.processGIF87A=r.processGIF89A})(Ze.API),kn.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var r=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(r);for(var e=0;e<r;e++){var t=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:o,green:n,blue:t,quad:i}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},kn.prototype.parseBGR=function(){this.pos=this.offset;var r="bit"+this.bitPP,e=this.width*this.height*4;if(e>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(e);try{this[r]()}catch(t){Ht.log("bit decode error:"+t)}},kn.prototype.bit1=function(){var r,e=Math.ceil(this.width/8),t=e%4;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,o=0;o<e;o++)for(var i=this.datav.getUint8(this.pos++,!0),d=n*this.width*4+8*o*4,l=0;l<8&&8*o+l<this.width;l++){var c=this.palette[i>>7-l&1];this.data[d+4*l]=c.blue,this.data[d+4*l+1]=c.green,this.data[d+4*l+2]=c.red,this.data[d+4*l+3]=255}t!==0&&(this.pos+=4-t)}},kn.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),e=r%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,o=0;o<r;o++){var i=this.datav.getUint8(this.pos++,!0),d=n*this.width*4+2*o*4,l=i>>4,c=15&i,f=this.palette[l];if(this.data[d]=f.blue,this.data[d+1]=f.green,this.data[d+2]=f.red,this.data[d+3]=255,2*o+1>=this.width)break;f=this.palette[c],this.data[d+4]=f.blue,this.data[d+4+1]=f.green,this.data[d+4+2]=f.red,this.data[d+4+3]=255}e!==0&&(this.pos+=4-e)}},kn.prototype.bit8=function(){for(var r=this.width%4,e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var o=this.datav.getUint8(this.pos++,!0),i=t*this.width*4+4*n;if(o<this.palette.length){var d=this.palette[o];this.data[i]=d.red,this.data[i+1]=d.green,this.data[i+2]=d.blue,this.data[i+3]=255}else this.data[i]=255,this.data[i+1]=255,this.data[i+2]=255,this.data[i+3]=255}r!==0&&(this.pos+=4-r)}},kn.prototype.bit15=function(){for(var r=this.width%3,e=parseInt("11111",2),t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,o=0;o<this.width;o++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var d=(i&e)/e*255|0,l=(i>>5&e)/e*255|0,c=(i>>10&e)/e*255|0,f=i>>15?255:0,m=n*this.width*4+4*o;this.data[m]=c,this.data[m+1]=l,this.data[m+2]=d,this.data[m+3]=f}this.pos+=r}},kn.prototype.bit16=function(){for(var r=this.width%3,e=parseInt("11111",2),t=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var o=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var d=this.datav.getUint16(this.pos,!0);this.pos+=2;var l=(d&e)/e*255|0,c=(d>>5&t)/t*255|0,f=(d>>11)/e*255|0,m=o*this.width*4+4*i;this.data[m]=f,this.data[m+1]=c,this.data[m+2]=l,this.data[m+3]=255}this.pos+=r}},kn.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),d=e*this.width*4+4*t;this.data[d]=i,this.data[d+1]=o,this.data[d+2]=n,this.data[d+3]=255}this.pos+=this.width%4}},kn.prototype.bit32=function(){for(var r=this.height-1;r>=0;r--)for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),d=this.datav.getUint8(this.pos++,!0),l=e*this.width*4+4*t;this.data[l]=i,this.data[l+1]=o,this.data[l+2]=n,this.data[l+3]=d}},kn.prototype.getData=function(){return this.data},(function(r){r.processBMP=function(e,t,n,o){var i=new kn(e,!1),d=i.width,l=i.height,c={data:i.getData(),width:d,height:l},f=new Hl(100).encode(c,100);return r.processJPEG.call(this,f,t,n,o)}})(Ze.API),wd.prototype.getData=function(){return this.data},(function(r){r.processWEBP=function(e,t,n,o){var i=new wd(e),d=i.width,l=i.height,c={data:i.getData(),width:d,height:l},f=new Hl(100).encode(c,100);return r.processJPEG.call(this,f,t,n,o)}})(Ze.API),Ze.API.processRGBA=function(r,e,t){for(var n=r.data,o=n.length,i=new Uint8Array(o/4*3),d=new Uint8Array(o/4),l=0,c=0,f=0;f<o;f+=4){var m=n[f],_=n[f+1],F=n[f+2],p=n[f+3];i[l++]=m,i[l++]=_,i[l++]=F,d[c++]=p}var E=this.__addimage__.arrayBufferToBinaryString(i);return{alpha:this.__addimage__.arrayBufferToBinaryString(d),data:E,index:e,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},Ze.API.setLanguage=function(r){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Sp
48ain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[r]!==void 0&&(this.internal.languageSettings.languageCode=r,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Ca=Ze.API,fs=Ca.getCharWidthsArray=function(r,e){var t,n,o=(e=e||{}).font||this.internal.getFont(),i=e.fontSize||this.internal.getFontSize(),d=e.charSpace||this.internal.getCharSpace(),l=e.widths?e.widths:o.metadata.Unicode.widths,c=l.fof?l.fof:1,f=e.kerning?e.kerning:o.metadata.Unicode.kerning,m=f.fof?f.fof:1,_=e.doKerning!==!1,F=0,p=r.length,E=0,k=l[0]||c,L=[];for(t=0;t<p;t++)n=r.charCodeAt(t),typeof o.metadata.widthOfString=="function"?L.push((o.metadata.widthOfGlyph(o.metadata.characterToGlyph(n))+d*(1e3/i)||0)/1e3):(F=_&&qt(f[n])==="object"&&!isNaN(parseInt(f[n][E],10))?f[n][E]/m:0,L.push((l[n]||k)/c+F)),E=n;return L},cd=Ca.getStringUnitWidth=function(r,e){var t=(e=e||{}).fontSize||this.internal.getFontSize(),n=e.font||this.internal.getFont(),o=e.charSpace||this.internal.getCharSpace();return Ca.processArabic&&(r=Ca.processArabic(r)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(r,t,o)/t:fs.apply(this,arguments).reduce(function(i,d){return i+d},0)},dd=function(r,e,t,n){for(var o=[],i=0,d=r.length,l=0;i!==d&&l+e[i]<t;)l+=e[i],i++;o.push(r.slice(0,i));var c=i;for(l=0;i!==d;)l+e[i]>n&&(o.push(r.slice(c,i)),l=0,c=i),l+=e[i],i++;return c!==i&&o.push(r.slice(c,i)),o},fd=function(r,e,t){t||(t={});var n,o,i,d,l,c,f,m=[],_=[m],F=t.textIndent||0,p=0,E=0,k=r.split(" "),L=fs.apply(this,[" ",t])[0];if(c=t.lineIndent===-1?k[0].length+2:t.lineIndent||0){var S=Array(c).join(" "),y=[];k.map(function(W){(W=W.split(/\s*\n/)).length>1?y=y.concat(W.map(function(fe,Ae){return(Ae&&fe.length?`
49`:"")+fe})):y.push(W[0])}),k=y,c=cd.apply(this,[S,t])}for(i=0,d=k.length;i<d;i++){var V=0;if(n=k[i],c&&n[0]==`
50`&&(n=n.substr(1),V=1),F+p+(E=(o=fs.apply(this,[n,t])).reduce(function(W,fe){return W+fe},0))>e||V){if(E>e){for(l=dd.apply(this,[n,o,e-(F+p),e]),m.push(l.shift()),m=[l.pop()];l.length;)_.push([l.shift()]);E=o.slice(n.length-(m[0]?m[0].length:0)).reduce(function(W,fe){return W+fe},0)}else m=[n];_.push(m),F=E+c,p=L}else m.push(n),F+=p+E,p=L}return f=c?function(W,fe){return(fe?S:"")+W.join(" ")}:function(W){return W.join(" ")},_.map(f)},Ca.splitTextToSize=function(r,e,t){var n,o=(t=t||{}).fontSize||this.internal.getFontSize(),i=(function(m){if(m.widths&&m.kerning)return{widths:m.widths,kerning:m.kerning};var _=this.internal.getFont(m.fontName,m.fontStyle),F="Unicode";return _.metadata[F]?{widths:_.metadata[F].widths||{0:1},kerning:_.metadata[F].kerning||{}}:{font:_.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,t);n=Array.isArray(r)?r:String(r).split(/\r?\n/);var d=1*this.internal.scaleFactor*e/o;i.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/o:0,i.lineIndent=t.lineIndent;var l,c,f=[];for(l=0,c=n.length;l<c;l++)f=f.concat(fd.apply(this,[n[l],d,i]));return f},(function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var e="0123456789abcdef",t="klmnopqrstuvwxyz",n={},o={},i=0;i<16;i++)n[t[i]]=e[i],o[e[i]]=t[i];var d=function(F){return"0x"+parseInt(F,10).toString(16)},l=r.__fontmetrics__.compress=function(F){var p,E,k,L,S=["{"];for(var y in F){if(p=F[y],isNaN(parseInt(y,10))?E="'"+y+"'":(y=parseInt(y,10),E=(E=d(y).slice(2)).slice(0,-1)+o[E.slice(-1)]),typeof p=="number")p<0?(k=d(p).slice(3),L="-"):(k=d(p).slice(2),L=""),k=L+k.slice(0,-1)+o[k.slice(-1)];else{if(qt(p)!=="object")throw new Error("Don't know what to do with value type "+qt(p)+".");k=l(p)}S.push(E+k)}return S.push("}"),S.join("")},c=r.__fontmetrics__.uncompress=function(F){if(typeof F!="string")throw new Error("Invalid argument passed to uncompress.");for(var p,E,k,L,S={},y=1,V=S,W=[],fe="",Ae="",me=F.length-1,Q=1;Q<me;Q+=1)(L=F[Q])=="'"?p?(k=p.join(""),p=void 0):p=[]:p?p.push(L):L=="{"?(W.push([V,k]),V={},k=void 0):L=="}"?((E=W.pop())[0][E[1]]=V,k=void 0,V=E[0]):L=="-"?y=-1:k===void 0?n.hasOwnProperty(L)?(fe+=n[L],
vendor: 570 bytes, line 50
50k=parseInt(fe,16)*y,y=1,fe=""):fe+=L:n.hasOwnProperty(L)?(Ae+=n[L],V[k]=parseInt(Ae,16)*y,y=1,k=void 0,Ae=""):Ae+=L;return S},f={codePages:["WinAnsiEncoding"],WinAnsiEncoding:c("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},m={Unicode:{Courier:f,"Courier-Bold":f,"Courier-BoldOblique":f,"Courier-Oblique":f,Helvetica:f,"Helvetica-Bold":f,"Helvetica-BoldOblique":f,"Helvetica-Oblique":f,"Times-Roman":f,"Times-Bold":f,"Times-BoldItalic":f,"Times-Italic":f}},_
vendor: 14,693 bytes, line 50
50={Unicode:{"Courier-Oblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":c("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":c("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:c("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:c("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":c("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":c("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};
vendor: 33,408 bytes, lines 50-78
50r.events.push(["addFont",function(F){var p=F.font,E=_.Unicode[p.postScriptName];E&&(p.metadata.Unicode={},p.metadata.Unicode.widths=E.widths,p.metadata.Unicode.kerning=E.kerning);var k=m.Unicode[p.postScriptName];k&&(p.metadata.Unicode.encoding=k,p.encoding=k.codePages[0])}])})(Ze.API),(function(r){var e=function(t){for(var n=t.length,o=new Uint8Array(n),i=0;i<n;i++)o[i]=t.charCodeAt(i);return o};r.API.events.push(["addFont",function(t){var n=void 0,o=t.font,i=t.instance;if(!o.isStandardFont){if(i===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");if(typeof(n=i.existsFileInVFS(o.postScriptName)===!1?i.loadFile(o.postScriptName):i.getFileFromVFS(o.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+o.postScriptName+"').");(function(d,l){l=/^\x00\x01\x00\x00/.test(l)?e(l):e(ys(l)),d.metadata=r.API.TTFFont.open(l),d.metadata.Unicode=d.metadata.Unicode||{encoding:{},kerning:{},widths:[]},d.metadata.glyIdsUsed=[0]})(o,n)}}])})(Ze),Ze.API.addSvgAsImage=function(r,e,t,n,o,i,d,l){if(isNaN(e)||isNaN(t))throw Ht.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(o))throw Ht.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=n,c.height=o;var f=c.getContext("2d");f.fillStyle="#fff",f.fillRect(0,0,c.width,c.height);var m={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},_=this;return(ut.canvg?Promise.resolve(ut.canvg):pl(()=>import("./index.es-BFHpOZYc.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))).catch(function(F){return Promise.reject(new Error("Could not load canvg: "+F))}).then(function(F){return F.default?F.default:F}).then(function(F){return F.fromString(f,r,m)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(F){return F.render(m)}).then(function(){_.addImage(c.toDataURL("image/jpeg",1),e,t,n,o,d,l)})},Ze.API.putTotalPages=function(r){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(r,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var o=0;o<this.internal.pages[n].length;o++)this.internal.pages[n][o]=this.internal.pages[n][o].replace(e,t);return this},Ze.API.viewerPreferences=function(r,e){var t;r=r||{},e=e||!1;var n,o,i,d={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},l=Object.keys(d),c=[],f=0,m=0,_=0;function F(E,k){var L,S=!1;for(L=0;L<E.length;L+=1)E[L]===k&&(S=!0);return S}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(d)),this.internal.viewerpreferences.isSubscribed=!1),t=this.internal.viewerpreferences.configuration,r==="reset"||e===!0){var p=l.length;for(_=0;_<p;_+=1)t[l[_]].value=t[l[_]].defaultValue,t[l[_]].explicitSet=!1}if(qt(r)==="object"){for(o in r)if(i=r[o],F(l,o)&&i!==void 0){if(t[o].type==="boolean"&&typeof i=="boolean")t[o].value=i;else if(t[o].type==="name"&&F(t[o].valueSet,i))t[o].value=i;else if(t[o].type==="integer"&&Number.isInteger(i))t[o].value=i;else if(t[o].type==="array"){for(f=0;f<i.length;f+=1)if(n=!0,i[f].length===1&&typeof i[f][0]=="number")c.push(String(i[f]-1));else if(i[f].length>1){for(m=0;m<i[f].length;m+=1)typeof i[f][m]!="number"&&(n=!1);n===!0&&c.push([i[f][0]-1,i[f][1]-1].join(" "))}t[o].value="["+c.join(" ")+"]"}else t[o].value=t[o].defaultValue;t[o].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var E,k=[];for(E in t)t[E].explicitSet===!0&&(t[E].type==="name"?k.push("/"+E+" /"+t[E].value):k.push("/"+E+" "+t[E].value));k.length!==0&&this.internal.write(`/ViewerPreferences
51<<
52`+k.join(`
53`)+`
54>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},Ze.API.addMetadata=function(r,e){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:r,namespaceUri:e??"http://jspdf.default.namespaceuri/",rawXml:typeof e=="boolean"&&e},this.internal.events.subscribe("putCatalog",A2),this.internal.events.subscribe("postPutResources",_2)),this},(function(r){var e=r.API,t=e.pdfEscape16=function(i,d){for(var l,c=d.metadata.Unicode.widths,f=["","0","00","000","0000"],m=[""],_=0,F=i.length;_<F;++_){if(l=d.metadata.characterToGlyph(i.charCodeAt(_)),d.metadata.glyIdsUsed.push(l),d.metadata.toUnicode[l]=i.charCodeAt(_),c.indexOf(l)==-1&&(c.push(l),c.push([parseInt(d.metadata.widthOfGlyph(l),10)])),l=="0")return m.join("");l=l.toString(16),m.push(f[4-l.length],l)}return m.join("")},n=function(i){var d,l,c,f,m,_,F;for(m=`/CIDInit /ProcSet findresource begin
5512 dict begin
56begincmap
57/CIDSystemInfo <<
58  /Registry (Adobe)
59  /Ordering (UCS)
60  /Supplement 0
61>> def
62/CMapName /Adobe-Identity-UCS def
63/CMapType 2 def
641 begincodespacerange
65<0000><ffff>
66endcodespacerange`,c=[],_=0,F=(l=Object.keys(i).sort(function(p,E){return p-E})).length;_<F;_++)d=l[_],c.length>=100&&(m+=`
67`+c.length+` beginbfchar
68`+c.join(`
69`)+`
70endbfchar`,c=[]),i[d]!==void 0&&i[d]!==null&&typeof i[d].toString=="function"&&(f=("0000"+i[d].toString(16)).slice(-4),d=("0000"+(+d).toString(16)).slice(-4),c.push("<"+d+"><"+f+">"));return c.length&&(m+=`
71`+c.length+` beginbfchar
72`+c.join(`
73`)+`
74endbfchar
75`),m+`endcmap
76CMapName currentdict /CMap defineresource pop
77end
78end`};e.events.push(["putFont",function(i){(function(d){var l=d.font,c=d.out,f=d.newObject,m=d.putStream;if(l.metadata instanceof r.API.TTFFont&&l.encoding==="Identity-H"){for(var _=l.metadata.Unicode.widths,F=l.metadata.subset.encode(l.metadata.glyIdsUsed,1),p="",E=0;E<F.length;E++)p+=String.fromCharCode(F[E]);var k=f();m({data:p,addLength1:!0,objectId:k}),c("endobj");var L=f();m({data:n(l.metadata.toUnicode),addLength1:!0,objectId:L}),c("endobj");var S=f();c("<<"),c("/Type /FontDescriptor"),c("/FontName /"+Oa(l.fontName)),c("/FontFile2 "+k+" 0 R"),c("/FontBBox "+r.API.PDFObject.convert(l.metadata.bbox)),c("/Flags "+l.metadata.flags),c("/StemV "+l.metadata.stemV),c("/ItalicAngle "+l.metadata.italicAngle),c("/Ascent "+l.metadata.ascender),c("/Descent "+l.metadata.decender),c("/CapHeight "+l.metadata.capHeight),c(">>"),c("endobj");var y=f();c("<<"),c("/Type /Font"),c("/BaseFont /"+Oa(l.fontName)),c("/FontDescriptor "+S+" 0 R"),c("/W "+r.API.PDFObject.convert(_)),c("/CIDToGIDMap /Identity"),c("/DW 1000"),c("/Subtype /CIDFontType2"),c("/CIDSystemInfo"),c("<<"),c("/Supplement 0"),c("/Registry (Adobe)"),c("/Ordering ("+l.encoding+")"),c(">>"),c(">>"),c("endobj"),l.objectNumber=f(),c("<<"),c("/Type /Font"),c("/Subtype /Type0"),c("/ToUnicode "+L+" 0 R"),c("/BaseFont /"+Oa(l.fontName)),c("/Encoding /"+l.encoding),c("/DescendantFonts ["+y+" 0 R]"),c(">>"),c("endobj"),l.isAlreadyPutted=!0}})(i)}]),e.events.push(["putFont",function(i){(function(d){var l=d.font,c=d.out,f=d.newObject,m=d.putStream;if(l.metadata instanceof r.API.TTFFont&&l.encoding==="WinAnsiEncoding"){for(var _=l.metadata.rawData,F="",p=0;p<_.length;p++)F+=String.fromCharCode(_[p]);var E=f();m({data:F,addLength1:!0,objectId:E}),c("endobj");var k=f();m({data:n(l.metadata.toUnicode),addLength1:!0,objectId:k}),c("endobj");var L=f();c("<<"),c("/Descent "+l.metadata.decender),c("/CapHeight "+l.metadata.capHeight),c("/StemV "+l.metadata.stemV),c("/Type /FontDescriptor"),c("/FontFile2 "+E+" 0 R"),c("/Flags 96"),c("/FontBBox "+r.API.PDFObject.convert(l.metadata.bbox)),c("/FontName /"+Oa(l.fontName)),c("/ItalicAngle "+l.metadata.italicAngle),c("/Ascent "+l.metadata.ascender),c(">>"),c("endobj"),l.objectNumber=f();for(var S=0;S<l.metadata.hmtx.widths.length;S++)l.metadata.hmtx.widths[S]=parseInt(l.metadata.hmtx.widths[S]*(1e3/l.metadata.head.unitsPerEm));c("<</Subtype/TrueType/Type/Font/ToUnicode "+k+" 0 R/BaseFont/"+Oa(l.fontName)+"/FontDescriptor "+L+" 0 R/Encoding/"+l.encoding+" /FirstChar 29 /LastChar 255 /Widths "+r.API.PDFObject.convert(l.metadata.hmtx.widths)+">>"),c("endobj"),l.isAlreadyPutted=!0}})(i)}]);var o=function(i){var d,l=i.text||"",c=i.x,f=i.y,m=i.options||{},_=i.mutex||{},F=_.pdfEscape,p=_.activeFontKey,E=_.fonts,k=p,L="",S=0,y="",V=E[k].encoding;if(E[k].encoding!=="Identity-H")return{text:l,x:c,y:f,options:m,mutex:_};for(y=l,k=p,Array.isArray(l)&&(y=l[0]),S=0;S<y.length;S+=1)E[k].metadata.hasOwnProperty("cmap")&&(d=E[k].metadata.cmap.unicode.codeMap[y[S].charCodeAt(0)]),d||y[S].charCodeAt(0)<256&&E[k].metadata.hasOwnProperty("Unicode")?L+=y[S]:L+="";var W="";return parseInt(k.slice(1))<14||V==="WinAnsiEncoding"?W=F(L,k).split("").map(function(fe){return fe.charCodeAt(0).toString(16)}).join(""):V==="Identity-H"&&(W=t(L,E[k])),_.isHex=!0,{text:W,x:c,y:f,options:m,mutex:_}};e.events.push(["postProcessText",function(i){var d=i.text||"",l=[],c={text:d,x:i.x,y:i.y,options:i.options,mutex:i.mutex};if(Array.isArray(d)){var f=0;for(f=0;f<d.length;f+=1)Array.isArray(d[f])&&d[f].length===3?l.push([o(Object.assign({},c,{text:d[f][0]})).text,d[f][1],d[f][2]]):l.push(o(Object.assign({},c,{text:d[f]})).text);i.text=l}else i.text=o(Object.assign({},c,{text:d})).text}])})(Ze),(function(r){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};r.existsFileInVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0},r.addFileToVFS=function(t,n){return e.call(this),this.internal.vFS[t]=n,this},r.getFileFromVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0?this.internal.vFS[t]:null}})(Ze.API),(function(r){r.__bidiEngine__=r.prototype.__bidiEngine__=function(n){var o,i,d,l,c,f,m,_=e,F=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],E={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},k={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},L=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],S=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),y=!1,V=0;this.__bidiEngine__={};var W=function(v){var I=v.charCodeAt(),U=I>>8,T=k[U];return T!==void 0?_[256*T+(255&I)]:U===252||U===253?"AL":S.test(U)?"L":U===8?"R":"N"},fe=function(v){for(var I,U=0;U<v.length;U++){if((I=W(v.charAt(U)))==="L")return!1;if(I==="R")return!0}return!1},Ae=function(v,I,U,T){var Y,ie,oe,Z,le=I[T];switch(le){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":y=!1;break;case"N":case"AN":break;case"EN":y&&(le="AN");break;case"AL":y=!0,le="R";break;case"WS":case"BN":le="N";break;case"CS":T<1||T+1>=I.length||(Y=U[T-1])!=="EN"&&Y!=="AN"||(ie=I[T+1])!=="EN"&&ie!=="AN"?le="N":y&&(ie="AN"),le=ie===Y?ie:"N";break;case"ES":le=(Y=T>0?U[T-1]:"B")==="EN"&&T+1<I.length&&I[T+1]==="EN"?"EN":"N";break;case"ET":if(T>0&&U[T-1]==="EN"){le="EN";break}if(y){le="N";break}for(oe=T+1,Z=I.length;oe<Z&&I[oe]==="ET";)oe++;le=oe<Z&&I[oe]==="EN"?"EN":"N";break;case"NSM":if(d&&!l){for(Z=I.length,oe=T+1;oe<Z&&I[oe]==="NSM";)oe++;if(oe<Z){var ne=v[T],_e=ne>=1425&&ne<=2303||ne===64286;if(Y=I[oe],_e&&(Y==="R"||Y==="AL")){le="R";break}}}le=T<1||(Y=I[T-1])==="B"?"N":U[T-1];break;case"B":y=!1,o=!0,le=V;break;case"S":i=!0,le="N"}return le},me=function(v,I,U){var T=v.split("");return U&&Q(T,U,{hiLevel:V}),T.reverse(),I&&I.reverse(),T.join("")},Q=function(v,I,U){var T,Y,ie,oe,Z,le=-1,ne=v.length,_e=0,N=[],z=V?p:F,H=[];for(y=!1,o=!1,i=!1,Y=0;Y<ne;Y++)H[Y]=W(v[Y]);for(ie=0;ie<ne;ie++){if(Z=_e,N[ie]=Ae(v,H,N,ie),T=240&(_e=z[Z][E[N[ie]]]),_e&=15,I[ie]=oe=z[_e][5],T>0)if(T===16){for(Y=le;Y<ie;Y++)I[Y]=1;le=-1}else le=-1;if(z[_e][6])le===-1&&(le=ie);else if(le>-1){for(Y=le;Y<ie;Y++)I[Y]=oe;le=-1}H[ie]==="B"&&(I[ie]=0),U.hiLevel|=oe}i&&(function(J,te,se){for(var pe=0;pe<se;pe++)if(J[pe]==="S"){te[pe]=V;for(var ge=pe-1;ge>=0&&J[ge]==="WS";ge--)te[ge]=V}})(H,I,ne)},q=function(v,I,U,T,Y){if(!(Y.hiLevel<v)){if(v===1&&V===1&&!o)return I.reverse(),void(U&&U.reverse());for(var ie,oe,Z,le,ne=I.length,_e=0;_e<ne;){if(T[_e]>=v){for(Z=_e+1;Z<ne&&T[Z]>=v;)Z++;for(le=_e,oe=Z-1;le<oe;le++,oe--)ie=I[le],I[le]=I[oe],I[oe]=ie,U&&(ie=U[le],U[le]=U[oe],U[oe]=ie);_e=Z}_e++}}},G=function(v,I,U){var T=v.split(""),Y={hiLevel:V};return U||(U=[]),Q(T,U,Y),(function(ie,oe,Z){if(Z.hiLevel!==0&&m)for(var le,ne=0;ne<ie.length;ne++)oe[ne]===1&&(le=L.indexOf(ie[ne]))>=0&&(ie[ne]=L[le+1])})(T,U,Y),q(2,T,I,U,Y),q(1,T,I,U,Y),T.join("")};return this.__bidiEngine__.doBidiReorder=function(v,I,U){if((function(Y,ie){if(ie)for(var oe=0;oe<Y.length;oe++)ie[oe]=oe;l===void 0&&(l=fe(Y)),f===void 0&&(f=fe(Y))})(v,I),d||!c||f)if(d&&c&&l^f)V=l?1:0,v=me(v,I,U);else if(!d&&c&&f)V=l?1:0,v=G(v,I,U),v=me(v,I);else if(!d||l||c||f){if(d&&!c&&l^f)v=me(v,I),l?(V=0,v=G(v,I,U)):(V=1,v=G(v,I,U),v=me(v,I));else if(d&&l&&!c&&f)V=1,v=G(v,I,U),v=me(v,I);else if(!d&&!c&&l^f){var T=m;l?(V=1,v=G(v,I,U),V=0,m=!1,v=G(v,I,U),m=T):(V=0,v=G(v,I,U),v=me(v,I),V=1,m=!1,v=G(v,I,U),m=T,v=me(v,I))}}else V=0,v=G(v,I,U);else V=l?1:0,v=G(v,I,U);return v},this.__bidiEngine__.setOptions=function(v){v&&(d=v.isInputVisual,c=v.isOutputVisual,l=v.isInputRtl,f=v.isOutputRtl,m=v.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],t=new r.__bidiEngine__({isInputVisual:!0});r.API.events.push(["postProcessText",function(n){var o=n.text;n.x,n.y;var i=n.options||{};n.mutex,i.lang;var d=[];if(i.isInputVisual=typeof i.isInputVisual!="boolean"||i.isInputVisual,t.setOptions(i),Object.prototype.toString.call(o)==="[object Array]"){var l=0;for(d=[],l=0;l<o.length;l+=1)Object.prototype.toString.call(o[l])==="[object Array]"?d.push([t.doBidiReorder(o[l][0]),o[l][1],o[l][2]]):d.push([t.doBidiReorder(o[l])]);n.text=d}else n.text=t.doBidiReorder(o);t.setOptions({isInputVisual:!0})}])})(Ze),Ze.API.TTFFont=(function(){function r(e){var t;if(this.rawData=e,t=this.contents=new Mi(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new D2(this),this.registerTTF()}return r.open=function(e){return new r(e)},r.prototype.parse=function(){return this.directory=new N2(this.contents),this.head=new x2(this),this.name=new I2(this),this.cmap=new Af(this),this.toUnicode={},this.hhea=new L2(this),this.maxp=new C2(this),this.hmtx=new E2(this),this.post=new F2(this),this.os2=new k2(this),this.loca=new M2(this),this.glyf=new O2(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},r.prototype.registerTTF=function(){var e,t,n,o,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var d,l,c,f;for(f=[],d=0,l=(c=this.bbox).length;d<l;d++)e=c[d],f.push(Math.round(e*this.scaleFactor));return f}).call(this),this.stemV=0,this.post.exists?(n=255&(o=this.post.italic_angle),32768&(t=o>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(i=this.familyClass)===1||i===2||i===3||i===4||i===5||i===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},r.prototype.characterToGlyph=function(e){var t;return((t=this.cmap.unicode)!=null?t.codeMap[e]:void 0)||0},r.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},r.prototype.widthOfString=function(e,t,n){var o,i,d,l;for(d=0,i=0,l=(e=""+e).length;0<=l?i<l:i>l;i=0<=l?++i:--i)o=e.charCodeAt(i),d+=this.widthOfGlyph(this.characterToGlyph(o))+n*(1e3/t)||0;return d*(t/1e3)},r.prototype.lineHeight=function(e,t){var n;return t==null&&(t=!1),n=t?this.lineGap:0,(this.ascender+n-this.decender)/1e3*e},r})();var On,Mi=(function(){function r(e){this.data=e??[],this.pos=0,this.length=this.data.length}return r.prototype.readByte=function(){return this.data[this.pos++]},r.prototype.writeByte=function(e){return this.data[this.pos++]=e},r.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},r.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},r.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},r.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},r.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},r.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},r.prototype.readString=function(e){var t,n;for(n=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join("")},r.prototype.writeString=function(e){var t,n,o;for(o=[],t=0,n=e.length;0<=n?t<n:t>n;t=0<=n?++t:--t)o.push(this.writeByte(e.charCodeAt(t)));return o},r.prototype.readShort=function(){return this.readInt16()},r.prototype.writeShort=function(e){return this.writeInt16(e)},r.prototype.readLongLong=function(){var e,t,n,o,i,d,l,c;return e=this.readByte(),t=this.readByte(),n=this.readByte(),o=this.readByte(),i=this.readByte(),d=this.readByte(),l=this.readByte(),c=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^o)+16777216*(255^i)+65536*(255^d)+256*(255^l)+(255^c)+1):72057594037927940*e+281474976710656*t+1099511627776*n+4294967296*o+16777216*i+65536*d+256*l+c},r.prototype.writeLongLong=function(e){var t,n;return t=Math.floor(e/4294967296),n=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},r.prototype.readInt=function(){return this.readInt32()},r.prototype.writeInt=function(e){return this.writeInt32(e)},r.prototype.read=function(e){var t,n;for(t=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)t.push(this.readByte());return t},r.prototype.write=function(e){var t,n,o,i;for(i=[],n=0,o=e.length;n<o;n++)t=e[n],i.push(this.writeByte(t));return i},r})(),N2=(function(){var r;function e(t){var n,o,i;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},o=0,i=this.tableCount;0<=i?o<i:o>i;o=0<=i?++o:--o)n={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[n.tag]=n}return e.prototype.encode=function(t){var n,o,i,d,l,c,f,m,_,F,p,E,k;for(k in p=Object.keys(t).length,c=Math.log(2),_=16*Math.floor(Math.log(p)/c),d=Math.floor(_/c),m=16*p-_,(o=new Mi).writeInt(this.scalarType),o.writeShort(p),o.writeShort(_),o.writeShort(d),o.writeShort(m),i=16*p,f=o.pos+i,l=null,E=[],t)for(F=t[k],o.writeString(k),o.writeInt(r(F)),o.writeInt(f),o.writeInt(F.length),E=E.concat(F),k==="head"&&(l=f),f+=F.length;f%4;)E.push(0),f++;return o.write(E),n=2981146554-r(o.data),o.pos=l+8,o.writeUInt32(n),o.data},r=function(t){var n,o,i,d;for(t=Nf.call(t);t.length%4;)t.push(0);for(i=new Mi(t),o=0,n=0,d=t.length;n<d;n=n+=4)o+=i.readUInt32();return 4294967295&o},e})(),S2={}.hasOwnProperty,Yn=function(r,e){for(var t in e)S2.call(e,t)&&(r[t]=e[t]);function n(){this.constructor=r}return n.prototype=e.prototype,r.prototype=new n,r.__super__=e.prototype,r};On=(function(){function r(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return r.prototype.parse=function(){},r.prototype.encode=function(){},r.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},r})();var x2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Yn(r,On),r.prototype.tag="head",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},r.prototype.encode=function(e){var t;return(t=new Mi).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax
78),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},r})(),_d=(function(){function r(e,t){var n,o,i,d,l,c,f,m,_,F,p,E,k,L,S,y,V;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),_=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(c=0;c<256;++c)this.codeMap[c]=e.readByte();break;case 4:for(p=e.readUInt16(),F=p/2,e.pos+=6,i=(function(){var W,fe;for(fe=[],c=W=0;0<=F?W<F:W>F;c=0<=F?++W:--W)fe.push(e.readUInt16());return fe})(),e.pos+=2,k=(function(){var W,fe;for(fe=[],c=W=0;0<=F?W<F:W>F;c=0<=F?++W:--W)fe.push(e.readUInt16());return fe})(),f=(function(){var W,fe;for(fe=[],c=W=0;0<=F?W<F:W>F;c=0<=F?++W:--W)fe.push(e.readUInt16());return fe})(),m=(function(){var W,fe;for(fe=[],c=W=0;0<=F?W<F:W>F;c=0<=F?++W:--W)fe.push(e.readUInt16());return fe})(),o=(this.length-e.pos+this.offset)/2,l=(function(){var W,fe;for(fe=[],c=W=0;0<=o?W<o:W>o;c=0<=o?++W:--W)fe.push(e.readUInt16());return fe})(),c=S=0,V=i.length;S<V;c=++S)for(L=i[c],n=y=E=k[c];E<=L?y<=L:y>=L;n=E<=L?++y:--y)m[c]===0?d=n+f[c]:(d=l[m[c]/2+(n-E)-(F-c)]||0)!==0&&(d+=f[c]),this.codeMap[n]=65535&d}e.pos=_}return r.encode=function(e,t){var n,o,i,d,l,c,f,m,_,F,p,E,k,L,S,y,V,W,fe,Ae,me,Q,q,G,v,I,U,T,Y,ie,oe,Z,le,ne,_e,N,z,H,J,te,se,pe,ge,xe,Ie,Oe;switch(T=new Mi,d=Object.keys(e).sort(function(Me,Ve){return Me-Ve}),t){case"macroman":for(k=0,L=(function(){var Me=[];for(E=0;E<256;++E)Me.push(0);return Me})(),y={0:0},i={},Y=0,le=d.length;Y<le;Y++)y[ge=e[o=d[Y]]]==null&&(y[ge]=++k),i[o]={old:e[o],new:y[e[o]]},L[o]=y[e[o]];return T.writeUInt16(1),T.writeUInt16(0),T.writeUInt32(12),T.writeUInt16(0),T.writeUInt16(262),T.writeUInt16(0),T.write(L),{charMap:i,subtable:T.data,maxGlyphID:k+1};case"unicode":for(I=[],_=[],V=0,y={},n={},S=f=null,ie=0,ne=d.length;ie<ne;ie++)y[fe=e[o=d[ie]]]==null&&(y[fe]=++V),n[o]={old:fe,new:y[fe]},l=y[fe]-o,S!=null&&l===f||(S&&_.push(S),I.push(o),f=l),S=o;for(S&&_.push(S),_.push(65535),I.push(65535),G=2*(q=I.length),Q=2*Math.pow(Math.log(q)/Math.LN2,2),F=Math.log(Q/2)/Math.LN2,me=2*q-Q,c=[],Ae=[],p=[],E=oe=0,_e=I.length;oe<_e;E=++oe){if(v=I[E],m=_[E],v===65535){c.push(0),Ae.push(0);break}if(v-(U=n[v].new)>=32768)for(c.push(0),Ae.push(2*(p.length+q-E)),o=Z=v;v<=m?Z<=m:Z>=m;o=v<=m?++Z:--Z)p.push(n[o].new);else c.push(U-v),Ae.push(0)}for(T.writeUInt16(3),T.writeUInt16(1),T.writeUInt32(12),T.writeUInt16(4),T.writeUInt16(16+8*q+2*p.length),T.writeUInt16(0),T.writeUInt16(G),T.writeUInt16(Q),T.writeUInt16(F),T.writeUInt16(me),se=0,N=_.length;se<N;se++)o=_[se],T.writeUInt16(o);for(T.writeUInt16(0),pe=0,z=I.length;pe<z;pe++)o=I[pe],T.writeUInt16(o);for(xe=0,H=c.length;xe<H;xe++)l=c[xe],T.writeUInt16(l);for(Ie=0,J=Ae.length;Ie<J;Ie++)W=Ae[Ie],T.writeUInt16(W);for(Oe=0,te=p.length;Oe<te;Oe++)k=p[Oe],T.writeUInt16(k);return{charMap:n,subtable:T.data,maxGlyphID:V+1}}},r})(),Af=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Yn(r,On),r.prototype.tag="cmap",r.prototype.parse=function(e){var t,n,o;for(e.pos=this.offset,this.version=e.readUInt16(),o=e.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=o?n<o:n>o;n=0<=o?++n:--n)t=new _d(e,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},r.encode=function(e,t){var n,o;return t==null&&(t="macroman"),n=_d.encode(e,t),(o=new Mi).writeUInt16(0),o.writeUInt16(1),n.table=o.data.concat(n.subtable),n},r})(),L2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Yn(r,On),r.prototype.tag="hhea",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},r})(),k2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Yn(r,On),r.prototype.tag="OS/2",r.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=(function(){var t,n;for(n=[],t=0;t<10;++t)n.push(e.readByte());return n})(),this.charRange=(function(){var t,n;for(n=[],t=0;t<4;++t)n.push(e.readInt());return n})(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=(function(){var t,n;for(n=[],t=0;t<2;t=++t)n.push(e.readInt());return n})(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},r})(),F2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Yn(r,On),r.prototype.tag="post",r.prototype.parse=function(e){var t,n,o;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var i;for(n=e.readUInt16(),this.glyphNameIndex=[],i=0;0<=n?i<n:i>n;i=0<=n?++i:--i)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],o=[];e.pos<this.offset+this.length;)t=e.readByte(),o.push(this.names.push(e.readString(t)));return o;case 151552:return n=e.readUInt16(),this.offsets=e.read(n);case 262144:return this.map=(function(){var d,l,c;for(c=[],i=d=0,l=this.file.maxp.numGlyphs;0<=l?d<l:d>l;i=0<=l?++d:--d)c.push(e.readUInt32());return c}).call(this)}},r})(),P2=function(r,e){this.raw=r,this.length=r.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},I2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Yn(r,On),r.prototype.tag="name",r.prototype.parse=function(e){var t,n,o,i,d,l,c,f,m,_,F;for(e.pos=this.offset,e.readShort(),t=e.readShort(),l=e.readShort(),n=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)n.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+l+e.readShort()});for(c={},i=m=0,_=n.length;m<_;i=++m)o=n[i],e.pos=o.offset,f=e.readString(o.length),d=new P2(f,o),c[F=o.nameID]==null&&(c[F]=[]),c[o.nameID].push(d);this.strings=c,this.copyright=c[0],this.fontFamily=c[1],this.fontSubfam
78ily=c[2],this.uniqueSubfamily=c[3],this.fontName=c[4],this.version=c[5];try{this.postscriptName=c[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=c[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=c[7],this.manufacturer=c[8],this.designer=c[9],this.description=c[10],this.vendorUrl=c[11],this.designerUrl=c[12],this.license=c[13],this.licenseUrl=c[14],this.preferredFamily=c[15],this.preferredSubfamily=c[17],this.compatibleFull=c[18],this.sampleText=c[19]},r})(),C2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Yn(r,On),r.prototype.tag="maxp",r.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},r})(),E2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Yn(r,On),r.prototype.tag="hmtx",r.prototype.parse=function(e){var t,n,o,i,d,l,c;for(e.pos=this.offset,this.metrics=[],t=0,l=this.file.hhea.numberOfMetrics;0<=l?t<l:t>l;t=0<=l?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(o=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=(function(){var f,m;for(m=[],t=f=0;0<=o?f<o:f>o;t=0<=o?++f:--f)m.push(e.readInt16());return m})(),this.widths=(function(){var f,m,_,F;for(F=[],f=0,m=(_=this.metrics).length;f<m;f++)i=_[f],F.push(i.advance);return F}).call(this),n=this.widths[this.widths.length-1],c=[],t=d=0;0<=o?d<o:d>o;t=0<=o?++d:--d)c.push(this.widths.push(n));return c},r.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},r})(),Nf=[].slice,O2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Yn(r,On),r.prototype.tag="glyf",r.prototype.parse=function(){return this.cache={}},r.prototype.glyphFor=function(e){var t,n,o,i,d,l,c,f,m,_;return e in this.cache?this.cache[e]:(i=this.file.loca,t=this.file.contents,n=i.indexOf(e),(o=i.lengthOf(e))===0?this.cache[e]=null:(t.pos=this.offset+n,d=(l=new Mi(t.read(o))).readShort(),f=l.readShort(),_=l.readShort(),c=l.readShort(),m=l.readShort(),this.cache[e]=d===-1?new R2(l,f,_,c,m):new B2(l,d,f,_,c,m),this.cache[e]))},r.prototype.encode=function(e,t,n){var o,i,d,l,c;for(d=[],i=[],l=0,c=t.length;l<c;l++)o=e[t[l]],i.push(d.length),o&&(d=d.concat(o.encode(n)));return i.push(d.length),{table:d,offsets:i}},r})(),B2=(function(){function r(e,t,n,o,i,d){this.raw=e,this.numberOfContours=t,this.xMin=n,this.yMin=o,this.xMax=i,this.yMax=d,this.compound=!1}return r.prototype.encode=function(){return this.raw.data},r})(),R2=(function(){function r(e,t,n,o,i){var d,l;for(this.raw=e,this.xMin=t,this.yMin=n,this.xMax=o,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],d=this.raw;l=d.readShort(),this.glyphOffsets.push(d.pos),this.glyphIDs.push(d.readUInt16()),32&l;)d.pos+=1&l?4:2,128&l?d.pos+=8:64&l?d.pos+=4:8&l&&(d.pos+=2)}return r.prototype.encode=function(){var e,t,n;for(t=new Mi(Nf.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},r})(),M2=(function(){function r(){return r.__super__.constructor.apply(this,arguments)}return Yn(r,On),r.prototype.tag="loca",r.prototype.parse=function(e){var t,n;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=t===0?(function(){var o,i;for(i=[],n=0,o=this.length;n<o;n+=2)i.push(2*e.readUInt16());return i}).call(this):(function(){var o,i;for(i=[],n=0,o=this.length;n<o;n+=4)i.push(e.readUInt32());return i}).call(this)},r.prototype.indexOf=function(e){return this.offsets[e]},r.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},r.prototype.encode=function(e,t){for(var n=new Uint32Array(this.offsets.length),o=0,i=0,d=0;d<n.length;++d)if(n[d]=o,i<t.length&&t[i]==d){++i,n[d]=o;var l=this.offsets[d],c=this.offsets[d+1]-l;c>0&&(o+=c)}for(var f=new Array(4*n.length),m=0;m<n.length;++m)f[4*m+3]=255&n[m],f[4*m+2]=(65280&n[m])>>8,f[4*m+1]=(16711680&n[m])>>16,f[4*m]=(4278190080&n[m])>>24;return f},r})(),D2=(function(){function r(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return r.prototype.generateCmap=function(){var e,t,n,o,i;for(t in o=this.font.cmap.tables[0].codeMap,e={},i=this.subset)n=i[t],e[t]=o[n];return e},r.prototype.glyphsFor=function(e){var t,n,o,i,d,l,c;for(o={},d=0,l=e.length;d<l;d++)o[i=e[d]]=this.font.glyf.glyphFor(i);
78for(i in t=[],o)(n=o[i])!=null&&n.compound&&t.push.apply(t,n.glyphIDs);if(t.length>0)for(i in c=this.glyphsFor(t))n=c[i],o[i]=n;return o},r.prototype.encode=function(e,t){var n,o,i,d,l,c,f,m,_,F,p,E,k,L,S;for(o in n=Af.encode(this.generateCmap(),"unicode"),d=this.glyphsFor(e),p={0:0},S=n.charMap)p[(c=S[o]).old]=c.new;for(E in F=n.maxGlyphID,d)E in p||(p[E]=F++);return m=(function(y){var V,W;for(V in W={},y)W[y[V]]=V;return W})(p),_=Object.keys(m).sort(function(y,V){return y-V}),k=(function(){var y,V,W;for(W=[],y=0,V=_.length;y<V;y++)l=_[y],W.push(m[l]);return W})(),i=this.font.glyf.encode(d,k,p),f=this.font.loca.encode(i.offsets,k),L={cmap:this.font.cmap.raw(),glyf:i.table,loca:f,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(L["OS/2"]=this.font.os2.raw()),this.font.directory.encode(L)},r})();Ze.API.PDFObject=(function(){var r;function e(){}return r=function(t,n){return(Array(n+1).join("0")+t).slice(-n)},e.convert=function(t){var n,o,i,d;if(Array.isArray(t))return"["+(function(){var l,c,f;for(f=[],l=0,c=t.length;l<c;l++)n=t[l],f.push(e.convert(n));return f})().join(" ")+"]";if(typeof t=="string")return"/"+t;if(t?.isString)return"("+t+")";if(t instanceof Date)return"(D:"+r(t.getUTCFullYear(),4)+r(t.getUTCMonth(),2)+r(t.getUTCDate(),2)+r(t.getUTCHours(),2)+r(t.getUTCMinutes(),2)+r(t.getUTCSeconds(),2)+"Z)";if({}.toString.call(t)==="[object Object]"){for(o in i=["<<"],t)d=t[o],i.push("/"+o+" "+e.convert(d));return i.push(">>"),i.join(`
79`)}return""+t},e})();const Wl=[37,99,235],hs=[17,24,39],$l=[107,114,128];async function T2(r,e={}){const t=Id(r,{...e,submittedAt:e.submittedAt||new Date}),n=new Ze({unit:"mm",format:"a4"}),o=n.internal.pageSize.getWidth(),i=16,d=o-i*2,l=8,c=(d-l)/2;let f=18;const m=(G=20)=>{const v=n.internal.pageSize.getHeight();f+G>v-16&&(n.addPage(),f=18)},_=G=>{m(16),f+=6,n.setFont("helvetica","bold"),n.setFontSize(13),n.setTextColor(...Wl),n.text(G,i,f),f+=2,n.setDrawColor(...Wl),n.setLineWidth(.4),n.line(i,f,i+d,f),f+=8},F=(G,v,I,U)=>{const T=String(G||""),Y=String(v==null||v===""?"—":v);n.setFont("helvetica","normal"),n.setFontSize(9),n.setTextColor(...$l),n.text(T,I,f),n.setFont("helvetica","bold"),n.setFontSize(11),n.setTextColor(...hs);const ie=n.splitTextToSize(Y,U);return n.text(ie,I,f+5),5+ie.length*5},p=(G,v)=>{m(18);const I=F(G.label,G.value,i,c),U=v?F(v.label,v.value,i+c+l,c):0;f+=Math.max(I,U)+6},E=(G,v)=>{m(18);const I=F(G,v,i,d);f+=I+6};n.setFont("helvetica","bold"),n.setFontSize(22),n.setTextColor(...Wl),n.text(t.title||"Discovery Form",o/2,f,{align:"center"}),f+=9,n.setFontSize(12),n.setTextColor(...hs),n.text(String(t.company_name||"—").toUpperCase(),o/2,f,{align:"center"}),f+=6,n.setFont("helvetica","normal"),n.setFontSize(10),n.setTextColor(...$l),n.text(`Submitted on: ${t.submitted_on||"—"}`,o/2,f,{align:"center"}),f+=4;const k=t.company||{};_("Company Information"),p({label:"Company Name:",value:k.company_name},{label:"Company Number:",value:k.company_number}),p({label:"Founded Date:",value:k.founded_date},{label:"Website:",value:k.website}),E("Registered Address:",k.registered_address),p({label:"Funding Required:",value:k.funding_required},{label:"Multiple Currencies:",value:k.multiple_currencies}),E("Funds Usage:",k.funds_usage),(k.card_revenue||k.payment_processor)&&p({label:"Card Revenue:",value:k.card_revenue||"—"},{label:"Payment Processor:",value:k.payment_processor||"—"});const L=t.contact||{};_("Contact Information"),(L.name||L.role)&&p({label:"Name:",value:L.name},{label:"Role:",value:L.role}),p({label:"Email:",value:L.email},{label:"Phone:",value:L.phone}),_("Directors Information");const S=Array.isArray(t.directors)?t.directors:[];S.length?S.forEach((G,v)=>{m(40),v>0&&(n.setDrawColor(229,231,235),n.setLineWidth(.2),n.line(i,f,i+d,f),f+=8),n.setFont("helvetica","bold"),n.setFontSize(11),n.setTextColor(55,65,81);const I=`Director ${G.index||v+1}${G.is_primary?" (Primary)":""}`;n.text(I,i,f),f+=8,p({label:"Full Name:",value:G.full_name},{label:"Date of Birth:",value:Pd(G.date_of_birth||G.restrictedDOB)}),p({label:"Email:",value:G.email},{label:"Mobile:",value:G.mobile}),E("Personal Address:",G.residential_address),p({label:"Date Moved In:",value:G.moved_in},{label:"Property Ownership:",value:G.owns_uk_property}),G.previous_address&&G.previous_address!=="—"&&E("Previous Address:",G.previous_address),G.equity_in_property&&E("Equity in Property:",G.equity_in_property)}):(m(10),n.setFont("helvetica","normal"),n.setFontSize(10),n.setTextColor(...$l),n.text("No directors provided.",i,f),f+=8);const y=t.documents||{};_("Uploaded Documents"),p({label:"Latest Full Filed Accounts:",value:y.latest_full_filed_accounts},{label:"6-Months Business Bank Statements:",value:y.bank_statements}),p({label:"Aged Debtors Report:",value:y.aged_debtors_report},{label:"Management Accounts:",value:y.management_accounts});const V=t.declaration||{};_("Declaration & Signature"),m(36),n.setFont("helvetica","normal"),n.setFontSize(9),n.setTextColor(...hs);const W=n.splitTextToSize(V.text||"By signing and submitting this form I hereby certify that the above information given is true and correct as to the best of my knowledge. I hereby authorise Compare My Funding (a trading name of BAMOPS Limited) to share this information with their partner, Funding Bay Limited. I also authorise the financial institution introduced by Funding Bay Limited to conduct credit checks on my profile in order to conduct a complete financial analysis of my affairs, for the purposes of providing a line of credit. By signing this form, you also acknowledge that there may be a fee levied by Funding Bay in the event of a successful funding line being delivered.",d);n.text(W,i,f),f+=W.length*4.2+8,p({label:"Declaration Accepted:",value:V.accepted},{label:"Digital Signature:",value:V.digital_signature}),m(20),f+=4;const fe=V.digital_signature||"—",Ae=V.signed_date||t.submitted_on||"—";n.setFont("helvetica","bold"),n.setFontSize(11),n.setTextColor(...hs),n.text(`Signed: ${fe}`,o-i,f,{align:"right"}),f+=6,n.text(`Date: ${Ae}`,o-i,f,{align:"right"});const me=n.internal.pageSize.getHeight();n.setFont("helvetica","normal"),n.setFontSize(8),n.setTextColor(156,163,175),n.text(`Generated on ${t.generated_on||"—"}`,o/2,me-10,{align:"center"});const Q=t.suggested_filename||"Discovery Form.pdf";return{blob:n.output("blob"),filename:Q,summary:t}}
79async function q2({applicationUuid:r,submissionData:e,uploadGoogleDrive:t,gdriveFolderId:n,gdriveFieldFolderIds:o,context:i={}}){const{blob:d,filename:l,summary:c}=await T2(e,i),f=new File([d],l,{type:"application/pdf"}),m=i.gdriveDiscoveryFormFolderId||o?.[hi]||null;try{return{...await t(r,f,{companyName:e.company_name,fieldFolder:hi,gdriveFolderId:n,gdriveFieldFolderIds:o,bucket:"Documents"}),filename:l,summary:c}}catch(_){const F=String(_?.message||_||"");if(!(F.includes("already committed")||F.includes("409")||F.toLowerCase().includes("committed")))throw _;const E=new FormData;E.append("file",f),E.append("applicationUuid",r),E.append("filename",l),n&&E.append("gdriveFolderId",n),m&&E.append("discoveryFormFolderId",m);const k=pi.VITE_SUPABASE_ANON_KEY,L=await fetch(`${pi.VITE_SUPABASE_URL}/functions/v1/gdrive-upload-discovery-pdf`,{method:"POST",headers:{Authorization:`Bearer ${k}`,apikey:k},body:E}),S=await L.json().catch(()=>({}));if(!L.ok)throw new Error(S.error||`Discovery PDF upload failed (${L.status})`);return{path:null,folderId:S.folderId,fileId:S.fileId,destination:"gdrive",filename:l,summary:c}}}const j2=/\b([A-Z]{1,2}\d[A-Z\d]?\s*\d[A-Z]{2})\b/i,U2={st:"street",str:"street",rd:"road",ln:"lane",cl:"close",ct:"court",dr:"drive",av:"avenue",ave:"avenue",pl:"place",gdns:"gardens",gdn:"garden",sq:"square",ter:"terrace",terr:"terrace"};function ou(r){let e=String(r||"").toLowerCase().replace(/[,'.]/g," ").replace(/\s+/g," ").trim();const t=e.match(j2);if(t){const n=t[1].replace(/\s/g,"").toUpperCase(),o=`${n.slice(0,-3)} ${n.slice(-3)}`.toLowerCase();e=e.replace(t[1],o)}return e.split(" ").map(n=>U2[n]||n).join(" ").replace(/\s+/g," ").trim()}function Sf(r,e){if(r===e)return 0;if(!r.length)return e.length;if(!e.length)return r.length;const t=r.length+1,n=e.length+1,o=Array.from({length:t},()=>Array(n).fill(0));for(let i=0;i<t;i++)o[i][0]=i;for(let i=0;i<n;i++)o[0][i]=i;for(let i=1;i<t;i++)for(let d=1;d<n;d++){const l=r[i-1]===e[d-1]?0:1;o[i][d]=Math.min(o[i-1][d]+1,o[i][d-1]+1,o[i-1][d-1]+l)}return o[t-1][n-1]}function z2(r,e){if(!r||!e)return 0;if(r===e)return 1;if(e.startsWith(r)||r.startsWith(e))return .92;const t=Math.max(r.length,e.length);if(t>24)return 0;const o=1-Sf(r,e)/t;return r.length>=4&&o>=.72||r.length===3&&o>=.67||o>=.85?o:0}function V2(r,e){if(!r)return!0;let t=0;for(const n of e)if(n===r[t]&&(t+=1),t===r.length)return!0;return!1}function hu(r,e){const t=ou(r),n=ou(e);if(!t||!n)return 0;if(n.includes(t))return 1;const o=t.replace(/\s/g,""),i=n.replace(/\s/g,"");if(i.includes(o))return .96;const d=t.split(" ").filter(_=>_.length>=2);if(!d.length)return 0;let l=0;for(const _ of d){let F=0;for(const p of n.split(" "))F=Math.max(F,z2(_,p));F===0&&V2(_,i)&&(F=.7),l+=F}const c=l/d.length,m=1-Sf(o,i)/Math.max(o.length,i.length,1);return Math.max(c*.85,m*.65)}function H2(r,e,t=n=>n){return[...e].map(n=>({item:n,score:hu(r,t(n))})).sort((n,o)=>o.score-n.score).map(({item:n})=>n)}function W2(r,e,t=o=>o,n=.34){return e.filter(o=>hu(r,t(o))>=n)}const $2={class:"address-autocomplete"},G2={class:"address-input-wrapper"},Y2={key:0,class:"address-loading-spinner","aria-hidden":"true"},K2={key:0,class:"address-dropdown"},J2=["onMousedown","onClick","onMouseup","onTouchend"],X2={key:0,class:"address-helper-text"},Z2=3,Ad=250,Q2={__name:"AddressAutocomplete",props:{modelValue:{type:String,default:""},label:{type:String,default:"Address"},placeholder:{type:String,default:"Start typing your address"},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},error:{type:String,default:""},helperText:{type:String,default:""}},emits:["update:modelValue","address-selected"],setup(r,{emit:e}){const t=r,n=e,o=bt(""),i=bt([]),d=bt(!1),l=bt(!1),c=bt(-1);let f=null,m=0,_=null;su(()=>{f&&clearTimeout(f),_?.abort()});const F=new Map,p=Lh(o,400);Bi(p,async Y=>{const ie=String(Y||"").trim();ie&&ie.length>=Z2&&!t.disabled?await G(ie):(i.value=[],l.value=!1)});const E=Y=>new Promise(ie=>setTimeout(ie,Y)),k=Y=>Y.formatted_address||Y.address_line_1||String(Y),L=Y=>{const ie=new Set;return Y.filter(oe=>{const Z=k(oe);return!Z||ie.has(Z)?!1:(ie.add(Z),!0)})},S=Y=>{const ie=Y.toLowerCase(),oe=Array.from(F.entries()).filter(([le,ne])=>le.startsWith(ie)&&Array.isArray(ne)&&ne.length>0).sort((le,ne)=>le[0].length-ne[0].length);if(oe.length>0)return oe[0][1];const Z=L(Array.from(F.values()).flatMap(le=>Array.isArray(le)?le:[]));return W2(Y,Z,k)},y=(Y,ie)=>{const oe=L(ie);return H2(Y,oe,k).filter(Z=>hu(Y,k(Z))>=.2)},V=async(Y,ie,oe)=>{const Z=await fetch("https://places.googleapis.com/v1/places:autocomplete",{method:"POST",headers:{"Content-Type":"application/json","X-Goog-Api-Key":ie},body:JSON.stringify(me(Y)),signal:oe});if(!Z.ok)throw new Error(`Google Places Autocomplete error: ${Z.status}`);const le=await Z.json();return Q(le.suggestions)},W=/\b([A-Z]{1,2}\d[A-Z\d]?\s*\d[A-Z]{2})\b/i,fe=Y=>{const ie=String(Y||"").replace(/\s/g,"").toUpperCase();return ie.length<5?"":`${ie.slice(0,-3)} ${ie.slice(-3)}`},Ae=(...Y)=>{for(const ie of Y){const oe=String(ie||"").match(W);if(oe)return fe(oe[1])}return""},me=Y=>({input:Y,includedPrimaryTypes:["premise","subpremise","street_address","postal_code"],includedReg
79ionCodes:["gb"],regionCode:"gb"}),Q=Y=>{const ie=(Y||[]).filter(Z=>Z.placePrediction).map(Z=>{const le=Z.placePrediction,ne=le.structuredFormat?.mainText?.text||le.text?.text||"",_e=le.structuredFormat?.secondaryText?.text||"",N=_e.replace(/\s*,\s*(UK|United Kingdom|GB)\s*$/i,""),z=[ne,N].filter(Boolean).join(" "),H=Ae(le.text?.text,_e,z);return{formatted_address:z,address_line_1:le.structuredFormat?.mainText?.text||"",locality:N,placeId:le.placeId,postcode:H,country:"United Kingdom",latitude:null,longitude:null}}),oe=new Set;return ie.filter(Z=>oe.has(Z.formatted_address)?!1:(oe.add(Z.formatted_address),!0))},q=async(Y,ie,oe)=>{let Z=await V(Y,ie,oe);if(Z=y(Y,Z),Z.length===0){const le=ou(Y);if(le&&le!==Y.toLowerCase().trim()){const ne=await V(le,ie,oe);Z=y(Y,ne)}}return Z.length===0&&(Z=S(Y)),Z},G=async Y=>{const ie=Y.toLowerCase(),oe=F.get(ie);if(oe&&oe.length>0){i.value=y(Y,oe),l.value=!0;return}const Z=++m,le=Date.now();_?.abort(),_=new AbortController;const{signal:ne}=_;try{d.value=!0;const N=await q(Y,"AIzaSyCt1VCDDhSwyqvJlWSFeEM1nw0lyjd-6xU",ne);if(Z!==m)return;F.set(ie,N),i.value=N,l.value=N.length>0}catch{if(Z!==m)return;const _e=y(Y,S(Y));i.value=_e,l.value=_e.length>0}finally{const _e=Date.now()-le;if(_e<Ad&&await E(Ad-_e),Z!==m)return;d.value=!1}},v=Y=>{o.value=Y,n("update:modelValue",Y)},I=Y=>{const ie=Y.formatted_address||Y.address_line_1||Y;f&&(clearTimeout(f),f=null),n("update:modelValue",ie),n("address-selected",Y),l.value=!1,i.value=[]},U=Y=>{Y.key==="ArrowDown"?(Y.preventDefault(),c.value=Math.min(c.value+1,i.value.length-1)):Y.key==="ArrowUp"?(Y.preventDefault(),c.value=Math.max(c.value-1,-1)):Y.key==="Enter"&&c.value>=0?(Y.preventDefault(),I(i.value[c.value])):Y.key==="Escape"&&(l.value=!1)},T=()=>{f=setTimeout(()=>{l.value=!1},200)};return(Y,ie)=>(Re(),Te("div",$2,[he("div",G2,[ht(Hn,{"model-value":r.modelValue||o.value,label:r.label,placeholder:r.placeholder,required:r.required,disabled:r.disabled,error:r.error,"onUpdate:modelValue":v,onKeydown:U,onBlur:T},{suffix:Vn(()=>[d.value?(Re(),Te("span",Y2)):nt("",!0)]),_:1},8,["model-value","label","placeholder","required","disabled","error"]),l.value&&i.value.length>0&&!r.disabled?(Re(),Te("div",K2,[(Re(!0),Te(mo,null,go(i.value,(oe,Z)=>(Re(),Te("div",{key:Z,class:Dt(["address-option",{"address-option-selected":c.value===Z}]),onMousedown:vo(le=>I(oe),["prevent"]),onClick:le=>I(oe),onMouseup:le=>I(oe),onTouchend:vo(le=>I(oe),["prevent"])},At(oe.formatted_address||oe.address_line_1||oe),43,J2))),128))])):nt("",!0)]),r.helperText?(Re(),Te("p",X2,At(r.helperText),1)):nt("",!0)]))}},e5=Cs(Q2,[["__scopeId","data-v-96c60662"]]),t5={class:"file-upload-field"},r5={key:0,class:"form-label"},n5={key:0,class:"file-upload-required"},i5={class:"file-upload-picker"},a5=["disabled","accept"],o5=["disabled"],s5={key:0,class:"file-picker-summary"},l5=["aria-label"],u5={class:"uploading-icon"},c5={class:"uploading-details"},d5={class:"uploading-name"},f5={class:"uploading-meta"},h5={class:"uploading-status"},p5={key:1,class:"file-upload-help"},m5={key:0},g5={key:2,class:"uploaded-files"},v5={class:"file-name"},y5=["onClick"],b5={key:1,class:"form-error"},w5={__name:"MultiFileUpload",props:{modelValue:{type:Array,default:()=>[]},label:{type:String,default:"Upload Files"},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},error:{type:String,default:""},bucket:{type:String,default:"Documents"},applicationUuid:{type:String,default:""},keyPrefix:{type:String,default:""},fieldFolder:{type:String,default:""},gdriveFolderId:{type:String,default:""},gdriveFieldFolderIds:{type:Object,default:()=>({})},maxFiles:{type:Number,default:25},acceptedTypes:{type:Array,default:()=>["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/xml","text/xml","application/xbrl+xml"]},destinations:{type:Array,default:()=>["gdrive"],validator:r=>r.every(e=>["s3","gdrive"].includes(e))},showSupportedFileTypes:{type:Boolean,default:!0},fieldKey:{type:String,default:""}},emits:["update:modelValue","gdrive-folder","file-uploaded","uploading-change"],setup(r,{emit:e}){const t=r,n=e,{upload:o,uploadS3Presigned:i,uploadGoogleDrive:d,uploading:l,validateFile:c}=Fd(),f=bt([]),m=bt(null),_=bt(""),F=bt(null),p=bt(!1),E=bt(0),k=q=>{E.value=Math.max(0,E.value+q),t.fieldKey&&n("uploading-change",{fieldKey:t.fieldKey,uploading:E.value>0})},L=()=>{m.value&&(m.value.value="")},S=()=>{t.disabled||l.value||m.value?.click()};Bi(()=>t.modelValue,q=>{q&&q.length>0&&f.value.length===0&&(f.value=q.map((G,v)=>({name:G.split("/").pop()||`File ${v+1}`,path:G,size:0,type:""})))},{immediate:!0});const y=async q=>{const G=Array.from(q||[]);if(G.length!==0){if(_.value="",t.modelValue.length+G.length>t.maxFiles){_.value=`Maximum ${t.maxFiles} files allowed`;return}for(const v of G)try{c(v,{maxSize:50*1024*1024,allowedTypes:t.acceptedTypes}),F.value={name:v.name,size:v.size},k(1);let I=null,U=null;t.destinations.includes("gdrive")&&t.applicationUuid?(U=await d(t.applicationUuid,v,{companyName:t.keyPrefix,fieldFolder:t.fieldFolder,bucket:t.bucket,gdriveFolderId:t.gdriveFolderId,gdriveFieldFolderIds:t.gdriveFieldFolderIds}),I=U,U.folderId&&n("gdrive-folder",U.folderId)):t.destinations.includes("s3")&&(I=t.applicationUuid?await i(t.bucket,t.applicationUuid,v,{companyName:t.keyPrefix,fieldFolder:t.fieldFolder}):await o(t.bucket,`${Date.now()}-${v.name}`,v));const T=I?.path;f.value.push({name:v.name,path:T,size:v.size,type:v.type}),n("update:modelValue",[...t.modelValue,T]),n("file-uploaded",{label:t.label,fieldFolder:t.fieldFolder,primaryPath:T,fileName:v.name,gdrive_file_id:U?.fileId||null,gdrive:U}
79)}catch(I){_.value=I.message||"Failed to upload file"}finally{k(-1),F.value=null}}},V=async q=>{if(!(t.disabled||l.value))try{await y(q.target.files)}finally{L()}},W=q=>{q.preventDefault(),!(t.disabled||l.value)&&(p.value=!0)},fe=q=>{q.preventDefault(),!(t.disabled||l.value)&&(p.value=!1)},Ae=async q=>{q.preventDefault(),p.value=!1,!(t.disabled||l.value)&&await y(q.dataTransfer?.files)},me=q=>{if(!Number.isFinite(q)||q<=0)return"0 B";const G=["B","KiB","MiB","GiB"],v=Math.min(Math.floor(Math.log(q)/Math.log(1024)),G.length-1),I=q/Math.pow(1024,v);return`${I.toFixed(I>=10||v===0?0:1)} ${G[v]}`},Q=q=>{f.value.splice(q,1);const G=[...t.modelValue];G.splice(q,1),n("update:modelValue",G),L()};return(q,G)=>{const v=xd("FontAwesomeIcon");return Re(),Te("div",t5,[r.label?(Re(),Te("label",r5,[Tt(At(r.label)+" ",1),r.required?(Re(),Te("span",n5,"*")):nt("",!0)])):nt("",!0),he("div",{class:Dt(["file-upload-container",{"is-dragging":p.value}]),onDragover:vo(W,["prevent"]),onDragleave:vo(fe,["prevent"]),onDrop:vo(Ae,["prevent"])},[he("div",i5,[he("input",{ref_key:"fileInputRef",ref:m,type:"file",multiple:"",disabled:r.disabled||de(l),accept:r.acceptedTypes.join(","),class:"file-input-hidden",onChange:V},null,40,a5),he("button",{type:"button",class:"file-picker-button",disabled:r.disabled||de(l),onClick:S}," Choose Files ",8,o5),f.value.length>0?(Re(),Te("span",s5,At(f.value.length)+" file"+At(f.value.length===1?"":"s")+" added ",1)):nt("",!0)]),de(l)&&F.value?(Re(),Te("div",{key:0,class:"uploading-card",role:"status","aria-live":"polite","aria-label":`Uploading ${F.value.name}`},[he("div",u5,[ht(v,{icon:["fas","cloud-arrow-up"],class:"uploading-icon-fa","aria-hidden":"true"})]),he("div",c5,[he("p",d5,At(F.value.name),1),he("div",f5,[he("span",null,At(me(F.value.size)),1),G[1]||(G[1]=he("span",{class:"uploading-divider"},"–",-1)),he("span",h5,[ht(Ld,{size:14,"show-text":!1,inline:"","aria-label":"Uploading file"}),G[0]||(G[0]=Tt(" Uploading ",-1))])])])],8,l5)):nt("",!0),f.value.length===0&&!de(l)?(Re(),Te("p",p5,[G[2]||(G[2]=Tt(" Drag and drop files here, or click the picker. You can select multiple files at once. ",-1)),r.showSupportedFileTypes?(Re(),Te("span",m5," Supported: PDF, DOC/DOCX, XLS/XLSX, XML.")):nt("",!0)])):nt("",!0),f.value.length>0?(Re(),Te("div",g5,[(Re(!0),Te(mo,null,go(f.value,(I,U)=>(Re(),Te("div",{key:U,class:"uploaded-file"},[he("span",v5,At(I.name),1),!r.disabled&&!de(l)?(Re(),Te("button",{key:0,type:"button",class:"remove-file","aria-label":"Remove file",onClick:T=>Q(U)},[ht(v,{icon:["fas","xmark"]})],8,y5)):nt("",!0)]))),128))])):nt("",!0)],34),r.error||_.value?(Re(),Te("p",b5,At(r.error||_.value),1)):nt("",!0)])}}},ps=Cs(w5,[["__scopeId","data-v-36e22925"]]),_5={class:"form-field"},A5={key:0,class:"form-label"},N5={key:0,class:"text-red-500"},S5=["value","placeholder","required","disabled","rows"],x5={key:1,class:"form-error"},L5={__name:"TextAreaField",props:{modelValue:{type:String,default:""},label:{type:String,default:""},placeholder:{type:String,default:""},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},error:{type:String,default:""},rows:{type:Number,default:4}},emits:["update:modelValue"],setup(r,{emit:e}){const t=e,n=o=>{t("update:modelValue",o.target.value)};return(o,i)=>(Re(),Te("div",_5,[r.label?(Re(),Te("label",A5,[Tt(At(r.label)+" ",1),r.required?(Re(),Te("span",N5,"*")):nt("",!0)])):nt("",!0),he("textarea",{value:r.modelValue,placeholder:r.placeholder,required:r.required,disabled:r.disabled,rows:r.rows,class:Dt(["form-textarea",{"form-textarea-error":r.error}]),onInput:n},null,42,S5),r.error?(Re(),Te("p",x5,At(r.error),1)):nt("",!0)]))}},Nd=Cs(L5,[["__scopeId","data-v-6d81632c"]]);function Ns(r){const e=Array.isArray(r.directors)?r.directors[0]:null,t=r.contact_email||e?.emailAddress||e?.email_address||null,n=r.contact_full_name||e?.fullName||e?.full_name||null,o=r.contact_phone_number||e?.mobileNumber||e?.mobile_number||null;return{card_revenue:r.card_revenue??null,payment_company:r.payment_company??null,company:r.company_name?{title:r.company_name,company_name:r.company_name,company_number:r.company_number||null,registered_office_address:r.company_registered_address||null,date_of_creation:r.company_founded_date||null,sic_code:r.sic_code||null,company_type:r.company_type||null,company_
79status:r.company_status||null,years_of_trading:r.years_of_trading??null,companies_house_url:r.companies_house_url||null,net_assets:r.net_assets??null,profitability:r.profitability??null,turnover:r.turnover??null}:null,user_email:t,user_name:n,user_tel:o,loan_amount:r.funding_required??null,use_of_funds:r.funds_usage||null,years_of_trading:r.years_of_trading??null}}function k5(r,{isStandalone:e=!1,companiesHouseDirector:t=null}={}){const n=Ns(r);let o={...n};if(e){const i=gs({...r,...n},{companiesHouseDirector:t});o=Yl(o,i)}try{const i=kd({...o,company:o.company??null});i&&typeof i=="object"&&(Object.assign(o,i),i.scores_breakdown?.callback_required&&(o.callback_required=!0))}catch{}return o}const pu="cmf_standalone_application_uuid",xf=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function F5(){if(typeof window>"u"||!window.sessionStorage)return null;try{const r=window.sessionStorage.getItem(pu);return!r||!xf.test(r.trim())?null:r.trim()}catch{return null}}function Sd(r){if(typeof window>"u"||!window.sessionStorage)return;const e=typeof r=="string"?r.trim():"";if(xf.test(e))try{window.sessionStorage.setItem(pu,e)}catch{}}function ms(){if(!(typeof window>"u"||!window.sessionStorage))try{window.sessionStorage.removeItem(pu)}catch{}}const P5={class:"ui-card ui-card-70"},I5={key:0,class:"py-10",role:"status","aria-live":"polite","aria-label":"Loading application form"},C5={class:"discovery-loader-wrap"},E5={class:"discovery-progress-section"},O5={class:"discovery-progress-numbers"},B5=["onClick"],R5={class:"discovery-progress-bar"},M5={key:"discovery-step-1",class:"discovery-step"},D5={key:0,class:"discovery-field"},T5=["value"],q5={class:"discovery-field"},j5=["value","disabled"],U5={key:0,class:"discovery-error"},z5={key:"card-revenue-fields",class:"discovery-conditional-fields"},V5={class:"discovery-field"},H5=["value","disabled"],W5={key:0,class:"discovery-error"},$5={class:"discovery-field"},G5={key:2,class:"discovery-contact-fields"},Y5={key:0,class:"ui-button ui-button-secondary",disabled:""},K5=["disabled","aria-busy"],J5={key:"discovery-step-2",class:"space-y-6"},X5={class:"discovery-step-header-row discovery-step-header-row--grouped"},Z5={class:"discovery-step-header-group"},Q5={class:"discovery-director-header"},e0={class:"discovery-director-title-group"},t0={class:"discovery-director-title"},r0={class:"discovery-director-primary-toggle"},n0={class:"discovery-director-header-actions"},i0=["onClick"],a0={key:0,class:"discovery-error"},o0={key:1,class:"discovery-hint"},s0={class:"discovery-field"},l0={class:"discovery-date-group"},u0={key:0,class:"discovery-date-select discovery-select-flex"},c0=["value"],d0={key:2,class:"discovery-date-select discovery-select-flex"},f0=["value"],h0={key:0,class:"discovery-error"},p0={class:"discovery-field"},m0={class:"discovery-date-select discovery-select-flex"},g0={class:"discovery-date-select discovery-select-flex"},v0={key:0,class:"discovery-error"},y0=["value","disabled","onInput"],b0={key:0,class:"discovery-error"},w0={class:"discovery-button-group"},_0=["disabled","aria-busy"],A0={key:"discovery-step-3",class:"discovery-step"},N0={class:"discovery-button-group"},S0=["disabled","aria-busy"],x0={key:"discovery-step-4",class:"discovery-step"},L0={class:"discovery-step-header-row"},k0={class:"discovery-step-title"},F0={class:"discovery-review-sections"},P0={class:"discovery-review-card"},I0={key:0},C0={key:1},E0={key:2},O0={key:3},B0={key:4},R0={key:5},M0={class:"discovery-review-card"},D0={class:"discovery-review-title"},T0={key:0,class:"discovery-review-primary-badge"},q0={key:0,class:"discovery-review-detail"},j0={key:1,class:"discovery-review-detail"},U0={key:2,class:"discovery-review-detail"},z0={class:"discovery-review-card"},V0={key:0},H0={key:1},W0={key:0,class:"discovery-review-card discovery-review-card-signature"},$0={class:"discovery-review-accepted"},G0={key:0,class:"discovery-declaration"},Y0={class:"discovery-declaration-toggle"},K0=["disabled","aria-busy"],J0={key:0,class:"discovery-submit-loading"},X0={key:1},Z0="cmf_standalone_broker",Q0={__name:"DiscoveryForm",setup(r){const{error:e}=gh(),{prepareGDriveFolders:t,uploadGoogleDrive:n}=Fd(),o=["Latest Full Filed Accounts","Bank Statements","Aged Debtors Report","Management Accounts",hi];function i(j){return j==null?"":typeof j=="string"?j.trim():typeof j!="object"?String(j):[j.address_line_1,j.address_line_2,j.address_line_3,j.locality,j.region,j.postal_code,j.country].filter(
79Boolean).map(Se=>typeof Se=="string"?Se.trim():String(Se)).join(", ")}function d(j){const P=String(j?.fullName||"").trim();if(!P)return"This Director";const Se=P.indexOf(",");if(Se!==-1){const K=P.slice(Se+1).trim();if(K)return K.split(/\s+/)[0]}return P.split(/\s+/)[0]}const l=ph(),c=mh(),f=yn(()=>{const j=l.query.standalone;return j==="true"||j==="1"});Bi(f,j=>{if(j)try{sessionStorage.setItem(Z0,"1")}catch{}},{immediate:!0});function m(j){if(j===!0||j===!1)return j;if(j==null)return null;const P=String(j).trim().toLowerCase();return P==="true"||P==="1"||P==="yes"||P==="y"||P==="on"?!0:P==="false"||P==="0"||P==="no"||P==="n"||P==="off"?!1:null}function _(j){const P=Qu(j);return P==null||!Number.isFinite(P)||P<=0?null:P}function F(j){const P=Qu(j);return P==null||!Number.isFinite(P)||P<=0?null:P}function p(){const j=m(l.query?.propertyOwnership);if(j==null)return;const P=j===!0?_(l.query?.equityInProperty):0;j===!0&&P==null||y.value.directors.forEach(Se=>{Se.propertyOwnership==null&&(Se.propertyOwnership=j,Se.equityInProperty=j===!0?P:0)})}function E(){const j=m(l.query?.requiresCardRevenue);if(j===!0)y.value.requireCardRevenue=!0;else if(j===!1){y.value.requireCardRevenue=!1,y.value.cardRevenue=null,y.value.processingCompany="";return}if(!y.value.requireCardRevenue){y.value.cardRevenue=null,y.value.processingCompany="";return}if(y.value.cardRevenue!=null&&Number(y.value.cardRevenue)>0)return;const P=F(l.query?.cardRevenue);P!=null&&(y.value.cardRevenue=P)}const k=bt({uploadedLatestFullFiledAccounts:!1,uploadedBusinessBankStatements:!1,uploadedAgedDebtorsReport:!1,uploadedManagementAccounts:!1}),{currentStep:L,totalSteps:S,formData:y,errors:V,advanceToNextStep:W,previousStep:fe,goToStep:Ae,addDirector:me,removeDirector:Q,setPrimaryDirector:q,transformForSubmission:G,restoreFromSubmission:v,validateCurrentStep:I,getErrorCount:U,getFirstErrorMessage:T}=zh({skipStep1DirectorContact:f,hasPendingUpload:j=>!!k.value[j]}),Y=bt(null),ie=bt(null),oe=bt(!1);Bi(L,j=>{j===3&&(oe.value=!0),z(j)});const Z=yn(()=>Object.values(k.value).some(Boolean)),le=({fieldKey:j,uploading:P})=>{j&&(k.value={...k.value,[j]:P})},ne=bt(!1),_e=bt(!1);function N(){return f.value?rs.STANDALONE:rs.QUOTE}function z(j){ne.value||tc({applicationUuid:we.value,funnelType:N(),funnelStage:Ii.DISCOVERY,funnelStep:String(j)})}function H(j){rc({applicationUuid:we.value,funnelType:N(),funnelStage:Ii.DISCOVERY,funnelStep:String(j)})}kh({getApplicationUuid:()=>we.value,getFunnelType:N,getFunnelStage:()=>Ii.DISCOVERY,getFunnelStep:()=>String(L.value),isCompleted:()=>_e.value});const J=bt(null);Fh({rootRef:J,getApplicationUuid:()=>we.value,getFunnelType:N,getFunnelStage:()=>Ii.DISCOVERY,getFunnelStep:()=>String(L.value)});const te=yn(()=>{const j=String(l.query?.edit??"").toLowerCase().trim();return j==="true"||j==="1"||j==="yes"||j==="on"}),se=bt(!1),pe=j=>{!ne.value&&j>L.value||Ae(j)};async function ge(){if(!(!we.value||!f.value))try{const j=G(),P=Ns(j),Se=gs({...j,...P},{companiesHouseDirector:Ge.value[0]??null});await Qi.update(we.value,Yl(P,Se))}catch{}}async function xe(){if(!(!we.value||!f.value))try{const j=G(),P=Ns(j),Se=gs({...j,...P});await Qi.update(we.value,Yl(P,Se))}catch{}}async function Ie(j){if(!we.value||!f.value)return null;try{const P=Ns(j),Se=gs({...j,...P}),K=await Rh(l.query),Ce={uuid:we.value,...K,status:"pending",email_opt_in:!1,selected_offers:[],is_standalone:!0,directors:j.directors,...P,...Se},Ee={...Ce,...kd(Ce)};Ee.scores_breakdown?.callback_required&&(Ee.callback_required=!0),Ee.disco_url=`${window.location.origin}${c.resolve({name:"discovery-form",query:{uuid:we.value,standalone:"true",...es(l.query)}}).href}`;const Qe=await Mh.sendStandaloneDiscoveryApplication(we.value,Ee,{background:!1}),Jt=Qe?.lead_id??null;if(Jt)try{await Qi.update(we.value,{lead_id:Jt})}catch{}return Qe?.error==="CORS_ERROR"||Qe?.error,Jt}catch{return null}}const Oe=bt(!1),Me=async()=>{if(Oe.value)return;if(!I()){const P=U();e(P===1?T():`Please fix ${P} fields before continuing`);return}Oe.value=!0;try{L.value===1&&String(y.value.companyNumber??"").trim()&&await rt(),L.value===1&&f.value&&we.value&&(dn(),ge()),L.value===2&&f.value&&we.value&&xe(),H(L.value),W()}finally{Oe.value=!1}},Ve=bt(!1),B=bt(!1),we=bt(null),ot=bt(null),Ge=bt([]),ke=bt(!1),tt=bt(!1),De=bt(null),qe=bt(null),Je=bt({}),Ct=bt({last_full_filed_accounts:null,last_6_months_business_bank_statements:null,aged_debtors_receivables_report:null,management_accounts:null});function xt(j){if(j==null)return null;if(typeof j=="string"&&j.trim())return j.trim();if(Array.isArray(j)){const P=j.map(Se=>
79String(Se).trim()).filter(Boolean);return P.length?P:null}return null}function ct(j){const P=xt(j);return P==null?[]:Array.isArray(P)?P:[P]}function Nt(j,P,Se){const K=Array.isArray(j)?j:[],Ce=ct(P);if(!K.length||!Ce.length)return;const Ee=Math.min(K.length,Ce.length);for(let Qe=0;Qe<Ee;Qe++){const Jt=K[Qe],Sr=Ce[Qe];Jt&&Sr&&(Se[Jt]={fileId:Sr,label:""})}}function Lt(j){if(!j)return;Ct.value={last_full_filed_accounts:j.last_full_filed_accounts??null,last_6_months_business_bank_statements:j.last_6_months_business_bank_statements??null,aged_debtors_receivables_report:j.aged_debtors_receivables_report??null,management_accounts:j.management_accounts??null};const P={...Je.value};Nt(y.value.uploadedLatestFullFiledAccounts,j.last_full_filed_accounts,P),Nt(y.value.uploadedBusinessBankStatements,j.last_6_months_business_bank_statements,P),Nt(y.value.uploadedAgedDebtorsReport,j.aged_debtors_receivables_report,P),Nt(y.value.uploadedManagementAccounts,j.management_accounts,P),Je.value=P,j.gdrive_folder_id&&(De.value=j.gdrive_folder_id)}const He=j=>{let P=!1;return()=>{P||(P=!0,queueMicrotask(j))}},st=(j,P)=>{const Se=He(P);if(!j||!j.isConnected)return Se();if(ts()){vn.set(j,{autoAlpha:1,y:0,scale:1}),Se();return}vn.killTweensOf(j),vn.set(j,{willChange:"transform,opacity",autoAlpha:0,y:0,scale:.99}),vn.to(j,{autoAlpha:1,y:0,scale:1,duration:.45,ease:ml.easeOut,clearProps:"transform,opacity,willChange",overwrite:"auto",onComplete:Se,onInterrupt:Se})},We=(j,P)=>{const Se=He(P);if(!j||!j.parentNode||!j.isConnected)return Se();if(ts()){vn.set(j,{autoAlpha:0}),Se();return}vn.killTweensOf(j),vn.to(j,{autoAlpha:0,y:0,duration:.22,ease:ml.easeIn,clearProps:"transform,opacity,willChange",overwrite:"auto",onComplete:Se,onInterrupt:Se})},jt=async j=>{if(!(!j||De.value)&&(De.value=j,!!we.value))try{await Ci.update(we.value,{gdrive_folder_id:j})}catch{}};async function kt(){if(!we.value||!y.value.companyName||ne.value)return;const j=!!qe.value?.fieldFolderIds?.[hi];if(!(qe.value&&j))try{qe.value=await t({applicationUuid:we.value,companyName:y.value.companyName,fieldFolders:o}),qe.value?.applicationFolderId&&await jt(qe.value.applicationFolderId)}catch{}}Bi(()=>[we.value,ne.value],()=>{kt()});const yt=j=>{const P=Je.value||{},Se=(Qe=[])=>Qe.map(Jt=>P[Jt]?.fileId||null).filter(Boolean),K=Qe=>Qe.length?Qe.length===1?Qe[0]:Qe:null,Ce=(Qe,Jt)=>{const Sr=K(Se(Qe));return Sr??(!Qe||Qe.length===0?null:xt(Jt))},Ee=Ct.value;return{last_full_filed_accounts:Ce(j.uploaded_latest_full_filed_accounts,Ee.last_full_filed_accounts),last_6_months_business_bank_statements:Ce(j.uploaded_bank_statements,Ee.last_6_months_business_bank_statements),aged_debtors_receivables_report:Ce(j.uploaded_aged_debtors_report,Ee.aged_debtors_receivables_report),management_accounts:Ce(j.uploaded_management_accounts,Ee.management_accounts),gdrive_folder_id:De.value||null}},pt=async j=>{const P=j?.gdrive_file_id||j?.gdrive?.fileId,Se=j?.primaryPath;if(!(!P||!Se)&&(Je.value={...Je.value,[Se]:{fileId:P,label:j?.label||""}},!(!we.value||!ot.value)))try{const K=G();K.uuid=we.value,K.application_id=ot.value,Object.assign(K,yt(K)),await Ci.update(we.value,K)}catch{}},{selectCompany:Wt}=Ph(),et=bt(!1),Bt=yn(()=>!f.value&&!te.value&&!!we.value),it=async j=>{if(!(!j||!j.trim()))try{et.value=!0;const P=await Eh(j.trim());P&&gl(y.value,P)}catch{}finally{et.value=!1}},dt=async j=>{if(j){if(y.value.companyName=j.title||j.company_name||"",y.value.companyNumber=j.company_number||"",j.date_of_creation&&(y.value.companyFoundedDate=j.date_of_creation),j.registered_office_address){const P=j.registered_office_address;y.value.companyRegisteredAddress=typeof P=="string"?P:`${P.address_line_1}, ${P.postal_code}`}
79j.company_status&&(y.value.companyStatus=j.company_status),j.company_type&&(y.value.companyType=j.company_type),j.company_number&&await it(j.company_number)}},$t=async j=>{Wt(j),await dt(j),kt(),f.value&&String(y.value.companyNumber??"").trim()&&rt()},St=async({skipExistingLookup:j=!1}={})=>{if(!we.value||!ot.value)return null;if(!j)try{return await Ci.getByUuid(we.value)}catch(P){if((P?.originalError?.code||P?.code)!=="PGRST116")throw P}try{return await Ci.create({uuid:we.value,application_id:ot.value,company_name:y.value.companyName||null,company_number:y.value.companyNumber||null,company_registered_address:y.value.companyRegisteredAddress||null,company_founded_date:y.value.companyFoundedDate||null,funding_required:y.value.fundingRequired||null,funds_usage:y.value.fundsUsage||null,contact_full_name:y.value.contactFullName||null,contact_email:y.value.contactEmail||null,contact_phone_number:y.value.contactPhoneNumber||null,is_director:y.value.isDirector,sic_code:y.value.sicCode||null,company_type:y.value.companyType||null,company_status:y.value.companyStatus||null,years_of_trading:y.value.yearsOfTrading||null,companies_house_url:y.value.companiesHouseUrl||null,net_assets:y.value.netAssets||null,profitability:y.value.profitability||null,turnover:y.value.turnover||null})}catch(P){if((P?.originalError?.code||P?.code)==="23505")return await Ci.getByUuid(we.value);throw P}},rt=async()=>{const j=String(y.value.companyNumber??"").trim();if(j)try{ke.value=!0,tt.value=!1;const Se=(await Ma.post(pi.supabaseFunctionUrl("director-search"),{companyNumber:j},{dedupe:!1})).data.directors||[];Ge.value=Se,y.value.directors.forEach((K,Ce)=>{const Ee=K.selectedDirectorId;if(!Ee)return;const Qe=Se.find(Jt=>String(Jt.id)===String(Ee))||Se.find(Jt=>(Jt.name||"").trim().toUpperCase()===(K.fullName||"").trim().toUpperCase());Qe&&Qe.date_of_birth&&sr(Ce,Qe,Qe.id!=null?String(Qe.id):Ee)})}catch(P){if(Ba(P).isAborted)return;Ge.value=[],tt.value=!0}finally{ke.value=!1}};Bi(L,async j=>{await Xu(),window.scrollTo({top:0,behavior:ts()?"auto":"smooth"}),j===2&&String(y.value.companyNumber??"").trim()&&(f.value&&dn(),await rt())}),ch(async()=>{Ve.value=!0;let j=l.query.uuid;if(!j&&f.value)try{let P=null;const Se=F5();if(Se)try{const K=await Qi.getByUuid(Se);K?.uuid?(P=K.uuid,ot.value=K.id??null):ms()}catch{ms()}if(!P){const K=dh(),Ce=await Qi.create({uuid:K,status:"pending",source:"Compare My Funding",company:null,loan_amount:null,user_email:null,user_name:null,user_tel:null,selected_offers:[],email_opt_in:!1,funnel_type:rs.STANDALONE,funnel_stage:Ii.STANDALONE,funnel_step:"started",funnel_session_id:fh()});P=K,ot.value=Ce?.id??null,tc({applicationUuid:K,funnelType:rs.STANDALONE,funnelStage:Ii.STANDALONE,funnelStep:"started"})}Sd(P),j=P,await c.replace({path:"/application",query:{uuid:P,standalone:"true",...es(l.query)}})}catch{e("Failed to start application. Please try again."),Ve.value=!1;return}if(j){we.value=String(j),f.value&&Sd(we.value);try{const[P,Se]=await Promise.all([Qi.getByUuid(we.value),Ci.getByUuid(we.value).catch(Ee=>null)]);if(ot.value=P?.id??null,Se&&Se.declaration_accepted&&Se.digital_signature&&(v(Se),Lt(Se),se.value=!!te.value,ne.value=!te.value,L.value=4,!te.value)){ms(),Ve.value=!1;return}Se&&(v(Se),Lt(Se)),P.company&&(y.value.companyName||(y.value.companyName=P.company.title||P.company.company_name||""),y.value.companyNumber||(y.value.companyNumber=P.company.company_number||""),!y.value.companyRegisteredAddress&&P.company.registered_office_address&&(y.value.companyRegisteredAddress=i(P.company.registered_office_address)),!y.value.companyFoundedDate&&P.company.date_of_creation&&(y.value.companyFoundedDate=P.company.date_of_creation)),!y.value.contactEmail&&P.user_email&&(y.value.contactEmail=P.user_email),!y.value.contactFullName&&P.user_name&&(y.value.contactFullName=P.user_name),!y.value.contactPhoneNumber&&P.user_tel&&(y.value.contactPhoneNumber=P.user_tel),(y.value.fundingRequired===null||y.value.fundingRequired===void 0)&&P.loan_amount!==null&&P.loan_amount!==void 0&&(y.value.fundingRequired=P.loan_amount),!y.value.fundsUsage&&P.use_of_funds&&(y.value.fundsUsage=Gl(P.use_of_funds)||P.use_of_funds),y.value.isDirector===null&&(y.value.isDirector=!0),y.value.companyName&&kt();const K=P.company?.company_number?.trim()||"",Ce=[];if(K){const Ee=P.company;if(Ih(Ee))gl(y.value,Ee);else{const Qe=Ch(K);Qe?gl(y.value,Qe):Ce.push(it(K))}}Se||Ce.push(St({skipExistingLookup:!0}
79)),Ce.length&&await Promise.all(Ce),ne.value||z(L.value),p(),E(),f.value&&dn()}catch{}finally{Ve.value=!1}}else{hh(c,l.query),Ve.value=!1;return}});function Et(j){return Ge.value.filter(P=>P.id&&!y.value.directors.some((Se,K)=>K!==j&&String(Se.selectedDirectorId)===String(P.id))).map(P=>({text:P.name,value:String(P.id)}))}function dn(){f.value&&y.value.directors.forEach(j=>{const P=j.selectedDirectorId;P===!0||P===!1?j.selectedDirectorId=null:P!=null&&P!==""&&(j.selectedDirectorId=String(P))})}function Nr(j){if(!f.value)return j.selectedDirectorId;const P=j.selectedDirectorId;return P===!0||P===!1||P==null||P===""?null:String(P)}function Zr(j){j&&(j.selectedDirectorId=null,j.fullName="",j.restrictedDOB=null,j.dayOfBirth=null,j.monthOfBirth=null,j.yearOfBirth=null,j.monthOfBirthFromApi=!1,j.yearOfBirthFromApi=!1,j.mobileNumber="",j.emailAddress="",j.personalAddress="",j.dateMovedIn=null,j.monthMovedIn=null,j.yearMovedIn=null,j.previousAddress="",j.propertyOwnership=null,j.equityInProperty=0)}const fn=(j=0)=>{Zr(y.value.directors[j])},at=j=>{const P=yl(j);y.value.fundingRequired=P},_n=j=>{const P=yl(j);y.value.cardRevenue=P},An=yn(()=>{const j=co(y.value.fundingRequired);return j?`£${j}`:""}),Wr=(j,P)=>{const Se=yl(P);y.value.directors[j].equityInProperty=Se},Tr=j=>{const P=y.value.directors[j];P&&(xs(P.monthMovedIn,P.yearMovedIn)||(P.previousAddress=""))};function er(j){let P=null,Se=null,K=null;if(typeof j=="string"&&j.trim()){const Ce=j.trim().split(/[-/]/);if(Ce.length>=1){const Ee=parseInt(Ce[0],10);Number.isFinite(Ee)&&Ee>1900&&(K=Ee)}if(Ce.length>=2){const Ee=parseInt(Ce[1],10);Number.isFinite(Ee)&&Ee>=1&&Ee<=12&&(Se=Ee)}if(Ce.length>=3){const Ee=parseInt(Ce[2],10);Number.isFinite(Ee)&&Ee>=1&&Ee<=31&&(P=Ee)}}else if(j&&typeof j=="object"){const Ce=Number(j.month??j.month_of_birth??""),Ee=Number(j.year??j.year_of_birth??""),Qe=Number(j.day??j.day_of_birth??"");!Number.isNaN(Ce)&&Ce>=1&&Ce<=12&&(Se=Math.floor(Ce)),!Number.isNaN(Ee)&&Ee>1900&&(K=Math.floor(Ee)),!Number.isNaN(Qe)&&Qe>=1&&Qe<=31&&(P=Math.floor(Qe))}return{day:P,month:Se,year:K}}function sr(j,P,Se){const K=P?.date_of_birth,{day:Ce,month:Ee,year:Qe}=er(K),Jt=Ee!==null||Qe!==null||Ce!==null,Sr=y.value.directors[j];if(!Sr)return;const qr=Sr.dayOfBirth,Xn=Ce??qr??null,ua=Qe&&Ee&&Xn?`${Qe}-${String(Ee).padStart(2,"0")}-${String(Xn).padStart(2,"0")}`:null,Di=Se!=null?String(Se):P?.id!=null?String(P.id):Sr.selectedDirectorId!=null?String(Sr.selectedDirectorId):null;y.value.directors[j]={...Sr,selectedDirectorId:Di,fullName:P?.name||Sr.fullName||"",restrictedDOB:ua,monthOfBirth:Ee,yearOfBirth:Qe,monthOfBirthFromApi:Jt&&Ee!==null,yearOfBirthFromApi:Jt&&Qe!==null,dayOfBirth:Xn}}const vr=(j,P)=>{f.value&&(P===!0||P===!1)&&(P=null);let Se=Ge.value.find(Qe=>String(Qe.id)===String(P));if(!Se&&P){const Qe=y.value.directors[j]?.fullName?.trim();Qe&&(Se=Ge.value.find(Jt=>(Jt.name||"").trim().toUpperCase()===Qe.toUpperCase()))}if(!Se){const Qe=y.value.directors[j];Zr(Qe);return}const K=Se.id!=null?String(Se.id):P!=null?String(P):null,Ce=y.value.directors[j];y.value.directors.length===1&&Ce?.selectedDirectorId!=null&&K!=null&&String(Ce.selectedDirectorId)!==String(K)&&Zr(Ce),sr(j,Se,K)},Kn=j=>{y.value.isDirector=j,j===!0&&(y.value.contactFullName="",y.value.contactRole="",y.value.contactEmail="",y.value.contactPhoneNumber="",f.value&&(Ge.value=[],fn(0),dn()))},Bn=(j,P)=>{y.value.directors[j].propertyOwnership=P,P===!1&&(y.value.directors[j].equityInProperty=0)};Bi(ne,async j=>{if(!j)return;await Xu();const P=Y.value,Se=ie.value;if(!P)return;if(ts()){vn.set(P,{autoAlpha:1,y:0,scale:1});return}if(vn.killTweensOf(P),vn.fromTo(P,{autoAlpha:0,y:24,scale:.9},{autoAlpha:1,y:0,scale:1,duration:.5,ease:ml.easeOut,clearProps:"transform,opacity"}),!Se||typeof Se.querySelector!="function")return;const K=Se.querySelector(".discovery-submitted-circle"),Ce=Se.querySelector(".discovery-submitted-check");if(!K||!Ce||typeof K.getTotalLength!="function"||typeof Ce.getTotalLength!="function"){vn.fromTo(Se,{scale:0,rotation:-180},{scale:1,rotation:0,duration:.6,ease:"back.out(1.7)",clearProps:"transform"});return}const Ee=K.getTotalLength(),Qe=Ce.getTotalLength();K.style.strokeDasharray=String(Ee),K.style.strokeDashoffset=String(Ee),Ce.style.strokeDasharray=String(Qe),Ce.style.strokeDashoffset=String(Qe),vn.timeline().fromTo(Se,{scale:0,rotation:-200},{scale:1,rotation:0,duration:.5,ease:"back.out(1.7)",clearProps:"transform"}).to(K,{strokeDashoffset:0,duration:.45,ease:"power2.out"},"-=0.35").to(Ce,{strokeDashoffset:0,duration:.35,ease:"power2.out"},"-=0.25")});const Qr=async()=>
79{if(!(!y.value.declarationAccepted||!y.value.digitalSignature.trim())){if(Z.value){e("Please wait for file uploads to finish before submitting");return}try{B.value=!0;const j=G();if(Array.isArray(j.directors)&&(j.directors=j.directors.map(Se=>{const K=Se.dayOfBirth,Ce=Se.monthOfBirth,Ee=Se.yearOfBirth;return K&&Ce&&Ee&&(Se.restrictedDOB=`${Ee}-${String(Ce).padStart(2,"0")}-${String(K).padStart(2,"0")}`),Se})),j.uuid=we.value,!ot.value)throw new Error("Missing application id. Please restart the flow and try again.");j.application_id=ot.value,Object.assign(j,yt(j));let P=qe.value?.fieldFolderIds?.[hi]||null;try{const Se=await t({applicationUuid:we.value,companyName:j.company_name||y.value.companyName,fieldFolders:o});Se&&(qe.value=Se,Se.applicationFolderId&&(await jt(Se.applicationFolderId),j.gdrive_folder_id=Se.applicationFolderId),P=Se.fieldFolderIds?.[hi]||P)}catch{}try{const Se=j.gdrive_folder_id||qe.value?.applicationFolderId||De.value;await q2({applicationUuid:we.value,submissionData:j,uploadGoogleDrive:n,gdriveFolderId:Se,gdriveFieldFolderIds:{...qe.value?.fieldFolderIds||{},...P?{[hi]:P}:{}},context:{submittedAt:new Date,gdriveFolderId:Se,gdriveDiscoveryFormFolderId:P}})}catch{}await Ci.update(we.value,j);try{await Gh.commit(we.value)}catch{}await Qi.update(we.value,k5(j,{isStandalone:f.value,companiesHouseDirector:f.value?Ge.value[0]??null:null}));try{const Se=j.gdrive_folder_id||De.value,K=Se?`https://drive.google.com/drive/folders/${Se}`:null;let Ce=null;f.value&&(Ce=await Ie(j));const Ee=`${window.location.origin}${c.resolve({name:"discovery-form",query:{uuid:we.value,...f.value?{standalone:"true"}:{},...es(l.query)}}).href}`,Qe=Cd(j,{applicationUuid:we.value,googleDriveLink:K,discoUrl:Ee,resubmitted:!!se.value,isStandalone:f.value,leadId:Ce,submittedAt:new Date,gdriveFolderId:Se,gdriveDiscoveryFormFolderId:P,routeQuery:l.query});await Ci.submit(Qe)}catch{}rc({applicationUuid:we.value,funnelType:N(),funnelStage:Ii.DISCOVERY,funnelStep:"submitted"}),_e.value=!0,Th({applicationUuid:we.value,funnelType:N(),funnelStage:Ii.COMPLETED,funnelStep:"done"}),f.value&&ms(),c.push({name:"application-success",query:{uuid:we.value,...f.value?{standalone:"true"}:{},...es(l.query)}})}catch(j){e(Fn(j))}finally{B.value=!1}}},hn=yn(()=>L.value/S*100),en=yn(()=>Array.from({length:31},(j,P)=>({text:String(P+1),value:P+1}))),$r=yn(()=>Array.from({length:12},(j,P)=>({text:new Date(2e3,P,1).toLocaleString(void 0,{month:"long"}),value:P+1}))),Gr=yn(()=>{const j=new Date().getFullYear();return Array.from({length:j-1899},(P,Se)=>({text:String(j-Se),value:j-Se}))}),Jn=yn(()=>{const j=new Date().getFullYear();return Array.from({length:j-1939},(P,Se)=>({text:String(j-Se),value:j-Se}))});return(j,P)=>{const Se=xd("FontAwesomeIcon");return Re(),Ju(Dh,{title:"Application Form"},{default:Vn(()=>[he("div",P5,[Ve.value?(Re(),Te("div",I5,[he("div",C5,[ht(Ld,{size:64,"show-text":!1,"aria-label":"Loading application form"}),P[29]||(P[29]=he("p",{class:"discovery-loader-title"},"Loading application form",-1)),P[30]||(P[30]=he("p",{class:"discovery-loader-text"},"Please wait while we prepare your details.",-1))])])):(Re(),Te("div",{key:1,ref_key:"discoveryFormRoot",ref:J,class:"discovery-form"},[ne.value?(Re(),Te("div",{key:0,ref_key:"submittedBannerEl",ref:Y,class:"discovery-submitted-banner"},[he("div",{ref_key:"submittedTickEl",ref:ie,class:"discovery-submitted-icon"},[...P[31]||(P[31]=[he("svg",{class:"discovery-submitted-svg",viewBox:"0 0 48 48","aria-hidden":"true"},[he("circle",{class:"discovery-submitted-circle",cx:"24",cy:"24",r:"20"}),he("polyline",{class:"discovery-submitted-check",points:"15 25 21 31 33 17"})],-1)])],512),P[32]||(P[32]=he("div",{class:"discovery-submitted-content"},[he("h3",{class:"discovery-submitted-title"},"Application Submitted"),he("p",{class:"discovery-submitted-text"},"Your application form has been submitted. You can review your application details below.")],-1))],512)):nt("",!0),he("div",E5,[he("div",O5,[(Re(!0),Te(mo,null,go(de(S),K=>(Re(),Te("span",{key:K,class:Dt(["step-number",de(L)>=K?"step-active":"step-inactive",ne.value||K<=de(L)?"step-clickable":""]),onClick:Ce=>pe(K)},At(K),11,B5))),128))]),he("div",R5,[he("div",{class:"discovery-progress-fill",style:vh({width:`${hn.value}%`})},null,4)]),P[33]||(P[33]=he("div",{class:"discovery-progress-labels"},[he("span",null,"Company Information"),he("span",null,"Directors"),he("span",null,"Documents"),he("span",null,"Review & Submit")],-1))]),ht(Pi,{css:!1,mode:"out-in",onEnter:st,onLeave:We},{default:Vn(()=>[de(L)===1?(Re(),Te("div",M5,[P[40]||(P[40]=he("h2",{class:"discovery-step-title"},"Company Information",-1)),he("div",{class:Dt({"required-pulse-input":!ne.value&&!de(y).c
79ompanyName})},[ht(Oh,{modelValue:de(y).companyName,"onUpdate:modelValue":P[0]||(P[0]=K=>de(y).companyName=K),disabled:ne.value||Bt.value&&!!de(y).companyName,error:de(V).companyName,onCompanySelected:$t},null,8,["modelValue","disabled","error"])],2),he("div",{class:Dt({"required-pulse-input":!ne.value&&!de(y).companyNumber})},[ht(Hn,{modelValue:de(y).companyNumber,"onUpdate:modelValue":P[1]||(P[1]=K=>de(y).companyNumber=K),label:"Company Number",disabled:ne.value||Bt.value&&!!de(y).companyNumber,error:de(V).companyNumber},null,8,["modelValue","disabled","error"])],2),de(y).companyFoundedDate?(Re(),Te("div",D5,[P[34]||(P[34]=he("label",{class:"discovery-label"}," Incorporated Date ",-1)),he("input",{type:"text",class:"discovery-input",disabled:"",value:de(sc)(de(y).companyFoundedDate,"Day Month Year")},null,8,T5)])):nt("",!0),he("div",{class:Dt({"required-pulse-input":!ne.value&&!de(y).companyRegisteredAddress})},[ht(Hn,{modelValue:de(y).companyRegisteredAddress,"onUpdate:modelValue":P[2]||(P[2]=K=>de(y).companyRegisteredAddress=K),label:"Registered Address",disabled:ne.value||Bt.value&&!!de(y).companyRegisteredAddress,error:de(V).companyRegisteredAddress},null,8,["modelValue","disabled","error"])],2),ht(Hn,{modelValue:de(y).website,"onUpdate:modelValue":P[3]||(P[3]=K=>de(y).website=K),label:"Website (Optional)",placeholder:"https://example.com",disabled:ne.value},null,8,["modelValue","disabled"]),he("div",q5,[P[36]||(P[36]=he("label",{class:"discovery-label"},[Tt(" How Much Funding Is Required? "),he("span",{class:"discovery-required"},"*")],-1)),he("div",{class:Dt(["discovery-funding-row discovery-funding-input-wrap",{"required-pulse-input":!ne.value&&(de(y).fundingRequired==null||de(y).fundingRequired===""||!Number(de(y).fundingRequired))}])},[P[35]||(P[35]=he("span",{class:"discovery-currency-prefix","aria-hidden":"true"},"£",-1)),he("input",{value:de(co)(de(y).fundingRequired),type:"text",inputmode:"numeric",pattern:"[0-9]*",autocomplete:"off",placeholder:"Enter amount",disabled:ne.value||Bt.value&&de(y).fundingRequired!==null&&de(y).fundingRequired!==void 0,class:"discovery-input discovery-input-amount",onInput:P[4]||(P[4]=K=>at(K.target.value))},null,40,j5)],2),de(V).fundingRequired?(Re(),Te("p",U5,At(de(V).fundingRequired),1)):nt("",!0)]),ht(Pi,{name:"ui-fade-slide"},{default:Vn(()=>[de(y).requireCardRevenue?(Re(),Te("div",z5,[he("div",V5,[P[38]||(P[38]=he("label",{class:"discovery-label"},[Tt(" Card Revenue "),he("span",{class:"discovery-required"},"*")],-1)),he("div",{class:Dt(["discovery-funding-row discovery-funding-input-wrap",{"required-pulse-input":!ne.value&&(de(y).cardRevenue==null||de(y).cardRevenue===""||!Number(de(y).cardRevenue))}])},[P[37]||(P[37]=he("span",{class:"discovery-currency-prefix","aria-hidden":"true"},"£",-1)),he("input",{value:de(co)(de(y).cardRevenue),type:"text",inputmode:"numeric",pattern:"[0-9]*",autocomplete:"off",placeholder:"Enter amount",disabled:ne.value,class:"discovery-input discovery-input-amount",onInput:P[5]||(P[5]=K=>_n(K.target.value))},null,40,H5)],2),de(V).cardRevenue?(Re(),Te("p",W5,At(de(V).cardRevenue),1)):nt("",!0)]),he("div",$5,[he("div",{class:Dt({"required-pulse-input":!ne.value&&de(y).requireCardRevenue&&!String(de(y).processingCompany||"").trim()})},[ht(ui,{modelValue:de(y).processingCompany,"onUpdate:modelValue":P[6]||(P[6]=K=>de(y).processingCompany=K),name:"processingCompany",label:"Payment Processor",placeholder:"Select payment processor",required:!0,disabled:ne.value,options:de(Bh),error:de(V).processingCompany},null,8,["modelValue","disabled","options","error"])],2)])])):nt("",!0)]),_:1}),ht(ui,{modelValue:de(y).useMultipleCurrencies,"onUpdate:modelValue":P[7]||(P[7]=K=>de(y).useMultipleCurrencies=K),label:"Do You Do Business in Multiple Currencies?",placeholder:"Select an option",disabled:ne.value,options:[{text:"Select an option",value:""},{text:"Yes",value:!0},{text:"No",value:!1}]},null,8,["modelValue","disabled"]),f.value?nt("",!0):(Re(),Te("div",{key:1,class:Dt({"required-pulse-input":!ne.value&&de(y).isDirector===null})},[P[39]||(P[39]=he("label",{class:"discovery-label"},[Tt(" Are You a Director? "),he("span",{class:"discovery-required"},"*")],-1)),ht(vl,{"model-value":de(y).isDirector===!0,label:"",variant:"toggle",disabled:ne.value,error:de(V).isDirector,"onUpdate:modelValue":Kn},null,8,["model-value","disabled","error"])],2)),!f.value&&de(y).isDirector===!1?(Re(),Te("div",G5,[he("div",{class:Dt({"required-pulse-input":!ne.value&&!de(y).c
79ontactFullName})},[ht(Hn,{modelValue:de(y).contactFullName,"onUpdate:modelValue":P[8]||(P[8]=K=>de(y).contactFullName=K),label:"Full Name",placeholder:"e.g. John Smith",required:!0,disabled:ne.value,error:de(V).contactFullName},null,8,["modelValue","disabled","error"])],2),he("div",{class:Dt({"required-pulse-input":!ne.value&&!de(y).contactRole})},[ht(Hn,{modelValue:de(y).contactRole,"onUpdate:modelValue":P[9]||(P[9]=K=>de(y).contactRole=K),label:"Role",placeholder:"e.g. Manager, Employee",required:!0,disabled:ne.value,error:de(V).contactRole},null,8,["modelValue","disabled","error"])],2),he("div",{class:Dt({"required-pulse-input":!ne.value&&!de(y).contactEmail})},[ht(Hn,{modelValue:de(y).contactEmail,"onUpdate:modelValue":P[10]||(P[10]=K=>de(y).contactEmail=K),label:"Email Address",type:"email",placeholder:"e.g. [email protected]",required:!0,disabled:ne.value,error:de(V).contactEmail},null,8,["modelValue","disabled","error"])],2),he("div",{class:Dt({"required-pulse-input":!ne.value&&!de(y).contactPhoneNumber})},[ht(ec,{modelValue:de(y).contactPhoneNumber,"onUpdate:modelValue":P[11]||(P[11]=K=>
79de(y).contactPhoneNumber=K),"country-code":de(y).contactPhoneCountryCode,"onUpdate:countryCode":P[12]||(P[12]=K=>de(y).contactPhoneCountryCode=K),name:"contactPhoneNumber",label:"Mobile Number",placeholder:"Enter your mobile number",required:!0,disabled:ne.value,error:de(V).contactPhoneNumber},null,8,["modelValue","country-code","disabled","error"])],2)])):nt("",!0),ht(Nd,{modelValue:de(y).fundsUsage,"onUpdate:modelValue":P[13]||(P[13]=K=>de(y).fundsUsage=K),label:"What Would You Use the Funding For?",rows:4,disabled:ne.value},null,8,["modelValue","disabled"]),he("div",{class:Dt(["discovery-button-group",{"discovery-button-group-end":!ne.value}])},[ne.value?(Re(),Te("button",Y5," Back ")):nt("",!0),he("button",{class:"ui-button ui-button-primary",disabled:Oe.value,"aria-busy":Oe.value,onClick:P[14]||(P[14]=K=>ne.value?L.value=2:Me())}," Next ",8,K5)],2)])):nt("",!0)]),_:1}),ht(Pi,{css:!1,mode:"out-in",onEnter:st,onLeave:We},{default:Vn(()=>[de(L)===2?(Re(),Te("div",J5,[he("div",X5,[he("div",Z5,[P[41]||(P[41]=he("h2",{class:"discovery-step-title"},"Director Contact Information",-1)),!ne.value&&Ge.value.length>de(y).directors.length?(Re(),Te("button",{key:0,type:"button",class:"ui-button ui-button-secondary",onClick:P[15]||(P[15]=(...K)=>de(me)&&de(me)(...K))}," Add Director ")):nt("",!0)])]),(Re(!0),Te(mo,null,go(de(y).directors,(K,Ce)=>(Re(),Te("div",{key:Ce,class:"discovery-director-card"},[he("div",Q5,[he("div",e0,[he("h3",t0,"Director "+At(Ce+1),1),he("div",r0,[ht(vl,{"model-value":!!K.isPrimary,label:"Primary Director",variant:"toggle",disabled:ne.value||!!K.isPrimary,"onUpdate:modelValue":Ee=>Ee&&de(q)(Ce)},null,8,["model-value","disabled","onUpdate:modelValue"])])]),he("div",n0,[Ce>0&&!ne.value?(Re(),Te("button",{key:0,type:"button",class:"discovery-remove-button","aria-label":"Remove director",onClick:Ee=>de(Q)(Ce)},[ht(Se,{icon:["fas","trash-can"],class:"discovery-remove-icon"}),P[42]||(P[42]=Tt(" Remove ",-1))],8,i0)):nt("",!0)])]),he("div",{class:Dt({"required-pulse-input":!ne.value&&!K.selectedDirectorId&&!ke.value})},[ht(ui,{"model-value":Nr(K),label:"Select Director",placeholder:ke.value?"Loading directors...":"Select a director",disabled:ne.value||ke.value,options:Et(Ce),"onUpdate:modelValue":Ee=>vr(Ce,Ee)},null,8,["model-value","placeholder","disabled","options","onUpdate:modelValue"]),tt.value?(Re(),Te("p",a0," Could not load directors. Check the company number and try again. ")):!ke.value&&!Et(Ce).length&&de(y).companyNumber?(Re(),Te("p",o0," No directors found for this company. Check the company number on step 1. ")):nt("",!0)],2),he("div",{class:Dt({"required-pulse-input":!ne.value&&K.selectedDirectorId&&!K.fullName})},[ht(Hn,{modelValue:K.fullName,"onUpdate:modelValue":Ee=>K.fullName=Ee,label:"Full Name",required:!0,disabled:"",error:de(V)[`directors.${Ce}.fullName`]},null,8,["modelValue","onUpdate:modelValue","error"])],2),he("div",s0,[P[43]||(P[43]=he("label",{class:"discovery-label"},[Tt(" Date of Birth "),he("span",{class:"discovery-required"},"*")],-1)),he("div",l0,[he("div",{class:Dt(["discovery-date-select discovery-select-day",{"required-pulse-input":!ne.value&&K.selectedDirectorId&&K.dayOfBirth==null}])},[ht(ui,{modelValue:K.dayOfBirth,"onUpdate:modelValue":Ee=>K.dayOfBirth=Ee,placeholder:"Day",options:en.value,disabled:ne.value||!K.selectedDirectorId},null,8,["modelValue","onUpdate:modelValue","options","disabled"])],2),K.monthOfBirthFromApi&&Number.isFinite(Number(K.monthOfBirth))&&Number(K.monthOfBirth)>=1&&Number(K.monthOfBirth)<=12?(Re(),Te("div",u0,[he("input",{value:new Date(2e3,Number(K.monthOfBirth)-1).toLocaleString(void 0,{month:"long"}),type:"text",disabled:"",class:"discovery-input discovery-input-disabled discovery-input-flex"},null,8,c0)])):(Re(),Te("div",{key:1,class:Dt(["discovery-date-select discovery-select-flex",{"required-pulse-input":!ne.value&&K.selectedDirectorId&&K.monthOfBirth==null}])},[ht(ui,{modelValue:K.monthOfBirth,"onUpdate:modelValue":Ee=>K.monthOfBirth=Ee,placeholder:"Month",options:$r.value,disabled:ne.value||!K.selectedDirectorId},null,8,["modelValue","onUpdate:modelValue","options","disabled"])],2)),K.yearOfBirthFromApi&&Number.isFinite(Number(K.yearOfBirth))?(Re(),Te("div",d0,[he("input",{value:K.yearOfBirth||"",type:"text",disabled:"",class:"discovery-input discovery-input-disabled discovery-input-flex"},null,8,f0)])):(Re(),Te("div",{key:3,class:Dt(["discovery-date-select discovery-select-flex",{"required-pulse-input":!ne.value&&K.selectedDirectorId&&K.yearOfBirth==null}])},[ht(ui,{modelValue:K.yearOfBirth,"onUpdate:modelValue":Ee=>K.yearOfBirth=Ee,placeholder:"Year",options:Gr.value,disabled:ne.value||!K.selectedDirectorId},null,8,["modelValue","onUpdate:modelValue","options","disabled"])],2))]),de(V)[`directors.${Ce}.restrictedDOB`]?(Re(),Te("p",h0,At(de(V)[`directors.${Ce}.restrictedDOB`]),1)):nt("",!0)]),he("div",{class:Dt({"required-pulse-input":!ne.value&&K.selectedDirectorId&&!K.mobileNumber})},[ht(ec,{modelValue:K.mobileNumber,"onUpdate:modelValue":Ee=>K.mobileNumber=Ee,"country-code":K.mobileCountryCode,"onUpdate:countryCode":Ee=>K.mobileCountryCode=Ee,name:`directors.${Ce}.mobileNumber`,label:"Mobile Number",placeholder:"Enter phone number",required:!0,disabled:ne.value||!K.selectedDirectorId,error:de(V)[`directors.${Ce}.mobileNumber`]},null,8,["modelValue","onUpdate:modelValue","country-code","onUpdate:countryCode","name","disabled","error"])],2),he("div",{class:Dt({"required-pulse-input":!ne.value&&K.selectedDirectorId&&!K.emailAddress})},[ht(Hn,{modelValue:K.emailAddress,"onUpdate:modelValue":Ee=>K.emailAddress=Ee,label:"Email Address",type:"email",placeholder:"e.g. [email protected]",required:!0,disabled:ne.value||!K.selectedDirectorId,error:de(V)[`directors.${Ce}.emailAddress`]},null,8,["modelValue","onUpdate:modelValue","disabled","error"])],2),he("div",{class:Dt({"required-pulse-input":!ne.value&&K.selectedDirectorId&&!K.personalAddress})},[ht(e5,{modelValue:K.personalAddress,"onUpdate:modelValue":Ee=>K.personalAddress=Ee,label:"Residential Address",placeholder:"Start typing your address",required:!0,disabled:ne.value||!K.selectedDirectorId,error:de(V)[`directors.${Ce}.personalAddress`]},null,8,["modelValue","onUpdate:modelValue","disabled","error"])],2),he("div",p0,[P[44]||(P[44]=he("label",{class:"discovery-label"},[Tt(" Date Moved In "),he("span",{class:"discovery-required"},"*")],-1)),he("div",{class:Dt(["discovery-date-group",{"required-pulse-input":!ne.value&&K.selectedDirectorId&&(K.monthMovedIn==null||K.yearMovedIn==null)}])},[he("div",m0,[ht(ui,{modelValue:K.monthMovedIn,"onUpdate:modelValue":[Ee=>K.monthMovedIn=Ee,()=>Tr(Ce)],placeholder:"Month",options:$r.value,disabled:ne.value||!K.selectedDirectorId},null,8,["modelValue","onUpdate:modelValue","options","disabled"])]),he("div",g0,[ht(ui,{modelValue:K.yearMovedIn,"onUpdate:modelValue":[Ee=>K.yearMovedIn=Ee,()=>Tr(Ce)],placeholder:"Year",options:Jn.value,disabled:ne.value||!K.selectedDirectorId},null,8,["modelValue","onUpdate:modelValue","options","disabled"])])],2),de(V)[`directors.${Ce}.dateMovedIn`]?(Re(),Te("p",v0,At(de(V)[`directors.${Ce}.dateMovedIn`]),1)):nt("",!0)]),ht(Pi,{name:"ui-fade-slide"},{default:Vn(()=>[de(xs)(K.monthMovedIn,K.yearMovedIn)?(Re(),Te("div",{key:`previous-address-${Ce}`,class:Dt({"required-pulse-input":!ne.value&&K.selectedDirectorId&&!String(K.previousAddress||"").trim()})},[ht(Nd,{modelValue:K.previousAddress,"onUpdate:modelValue":Ee=>K.previousAddress=Ee,label:"Previous Address",placeholder:"Enter previous address(es) to cover the last 3 years",required:!0,rows:2,disabled:ne.value||!K.selectedDirectorId,error:de(V)[`directors.${Ce}.previousAddress`]},null,8,["modelValue","onUpdate:modelValue","disabled","error"])],2)):nt("",!0)]),_:2},1024),he("div",{class:Dt({"required-pulse-input":!ne.value&&K.selectedDirectorId&&K.propertyOwnership==null})},[ht(ui,{modelValue:K.propertyOwnership,"onUpdate:modelValue":[Ee=>K.propertyOwnership=Ee,Ee=>Bn(Ce,Ee)],label:`Does ${d(K)} Own Property in the UK?`,required:!0,disabled:ne.value||!K.selectedDirectorId,placeholder:"Select an option",options:[{text:"Yes",value:!0},{text:"No",value:!1}],error:de(V)[`directors.${Ce}.propertyOwnership`]},null,8,["modelValue","onUpdate:modelValue","label","disabled","error"])],2),ht(Pi,{name:"ui-fade-slide"},{default:Vn(()=>[K.propertyOwnership===!0?(Re(),Te("div",{key:`equity-${Ce}`,class:"discovery-field"}
79,[P[45]||(P[45]=he("label",{class:"discovery-label"},[Tt(" How Much Equity Does This Director Have in Property in the UK? "),he("span",{class:"discovery-required"},"*")],-1)),he("div",{class:Dt({"required-pulse-input":!ne.value&&K.selectedDirectorId&&(K.equityInProperty==null||K.equityInProperty==="")})},[he("input",{value:de(co)(K.equityInProperty),type:"text",inputmode:"numeric",pattern:"[0-9]*",autocomplete:"off",placeholder:"Enter amount",disabled:ne.value||!K.selectedDirectorId,class:"discovery-input",onInput:Ee=>Wr(Ce,Ee.target.value)},null,40,y0)],2),de(V)[`directors.${Ce}.equityInProperty`]?(Re(),Te("p",b0,At(de(V)[`directors.${Ce}.equityInProperty`]),1)):nt("",!0)])):nt("",!0)]),_:2},1024)]))),128)),he("div",w0,[he("button",{class:"ui-button ui-button-secondary",onClick:P[16]||(P[16]=K=>ne.value?L.value=1:de(fe)())}," Back "),he("button",{class:"ui-button ui-button-primary",disabled:Oe.value,"aria-busy":Oe.value,onClick:P[17]||(P[17]=K=>ne.value?L.value=3:Me())}," Next ",8,_0)])])):nt("",!0)]),_:1}),ht(Pi,{css:!1,mode:"out-in",onEnter:st,onLeave:We},{default:Vn(()=>[oe.value?yh((Re(),Te("div",A0,[P[46]||(P[46]=he("h2",{class:"discovery-step-title"},"Document Upload",-1)),P[47]||(P[47]=he("p",{class:"discovery-hint"},"You can upload multiple files per section.",-1)),ht(ps,{modelValue:de(y).uploadedLatestFullFiledAccounts,"onUpdate:modelValue":P[18]||(P[18]=K=>de(y).uploadedLatestFullFiledAccounts=K),"field-key":"uploadedLatestFullFiledAccounts",label:"Latest Full Filed Accounts",required:!0,"application-uuid":we.value||"","key-prefix":de(y).companyName,"field-folder":"Latest Full Filed Accounts","gdrive-folder-id":qe.value?.applicationFolderId||De.value||"","gdrive-field-folder-ids":qe.value?.fieldFolderIds||{},bucket:"Documents",error:de(V).uploadedLatestFullFiledAccounts,disabled:ne.value,onGdriveFolder:jt,onFileUploaded:pt,onUploadingChange:le},null,8,["modelValue","application-uuid","key-prefix","gdrive-folder-id","gdrive-field-folder-ids","error","disabled"]),ht(ps,{modelValue:de(y).uploadedBusinessBankStatements,"onUpdate:modelValue":P[19]||(P[19]=K=>de(y).uploadedBusinessBankStatements=K),"field-key":"uploadedBusinessBankStatements",label:"Last 6-Months Business Bank Statements",required:!0,"application-uuid":we.value||"","key-prefix":de(y).companyName,"field-folder":"Bank Statements","gdrive-folder-id":qe.value?.applicationFolderId||De.value||"","gdrive-field-folder-ids":qe.value?.fieldFolderIds||{},bucket:"Documents","show-supported-file-types":!1,error:de(V).uploadedBusinessBankStatements,disabled:ne.value,onGdriveFolder:jt,onFileUploaded:pt,onUploadingChange:le},null,8,["modelValue","application-uuid","key-prefix","gdrive-folder-id","gdrive-field-folder-ids","error","disabled"]),ht(ps,{modelValue:de(y).uploadedAgedDebtorsReport,"onUpdate:modelValue":P[20]||(P[20]=K=>de(y).uploadedAgedDebtorsReport=K),"field-key":"uploadedAgedDebtorsReport",label:"Aged Debtors/Receivables Report (Optional)","application-uuid":we.value||"","key-prefix":de(y).companyName,"field-folder":"Aged Debtors Report","gdrive-folder-id":qe.value?.applicationFolderId||De.value||"","gdrive-field-folder-ids":qe.value?.fieldFolderIds||{},bucket:"Documents","show-supported-file-types":!1,disabled:ne.value,onGdriveFolder:jt,onFileUploaded:pt,onUploadingChange:le},null,8,["modelValue","application-uuid","key-prefix","gdrive-folder-id","gdrive-field-folder-ids","disabled"]),ht(ps,{modelValue:de(y).uploadedManagementAccounts,"onUpdate:modelValue":P[21]||(P[21]=K=>de(y).uploadedManagementAccounts=K),"field-key":"uploadedManagementAccounts",label:"Management Accounts (Optional)","application-uuid":we.value||"","key-prefix":de(y).companyName,"field-folder":"Management Accounts","gdrive-folder-id":qe.value?.applicationFolderId||De.value||"","gdrive-field-folder-ids":qe.value?.fieldFolderIds||{},bucket:"Documents","show-supported-file-types":!1,disabled:ne.value,onGdriveFolder:jt,onFileUploaded:pt,onUploadingChange:le},null,8,["modelValue","application-uuid","key-prefix","gdrive-folder-id","gdrive-field-folder-ids","disabled"]),he("div",N0,[he("button",{class:"ui-button ui-button-secondary",onClick:P[22]||(P[22]=K=>ne.value?L.value=2:de(fe)())}," Back "),he("button",{class:"ui-button ui-button-primary",disabled:Oe.value,"aria-busy":Oe.value,onClick:P[23]||(P[23]=K=>ne.value?L.value=4:Me())}," Next ",8,S0)])],512)),[[bh,de(L)===3]]):nt("",!0)]),_:1}),ht(Pi,{css:!1,mode:"out-in",onEnter:st,onLeave:We},{default:Vn(()=>[de(L)===4?(Re(),Te("div",x0,[he("div",L0,[he("h2",k0,At(ne.value?"Application Summary":se.value?"Review & Resubmit":"Review & Submit"),1),ne.value?(Re(),Te("button",{key:0,t
79ype:"button",class:"ui-button ui-button-secondary discovery-back-to-review",onClick:P[24]||(P[24]=K=>L.value=3)}," Back to Review Application ")):nt("",!0)]),he("div",F0,[he("div",P0,[P[57]||(P[57]=he("h3",{class:"discovery-review-title"},"Company Information",-1)),he("p",null,[P[48]||(P[48]=he("strong",null,"Company:",-1)),Tt(" "+At(de(y).companyName),1)]),he("p",null,[P[49]||(P[49]=he("strong",null,"Number:",-1)),Tt(" "+At(de(y).companyNumber),1)]),de(y).companyRegisteredAddress?(Re(),Te("p",I0,[P[50]||(P[50]=he("strong",null,"Registered Address:",-1)),Tt(" "+At(i(de(y).companyRegisteredAddress)),1)])):nt("",!0),de(y).companyFoundedDate?(Re(),Te("p",C0,[P[51]||(P[51]=he("strong",null,"Founded:",-1)),Tt(" "+At(de(sc)(de(y).companyFoundedDate,"Day Month Year")),1)])):nt("",!0),he("p",null,[P[52]||(P[52]=he("strong",null,"Funding Required:",-1)),Tt(" "+At(An.value),1)]),de(y).requireCardRevenue&&de(y).cardRevenue!=null?(Re(),Te("p",E0,[P[53]||(P[53]=he("strong",null,"Card Revenue:",-1)),Tt(" £"+At(de(co)(de(y).cardRevenue)),1)])):nt("",!0),de(y).requireCardRevenue&&de(y).processingCompany?(Re(),Te("p",O0,[P[54]||(P[54]=he("strong",null,"Payment processor:",-1)),Tt(" "+At(de(y).processingCompany),1)])):nt("",!0),de(y).website?(Re(),Te("p",B0,[P[55]||(P[55]=he("strong",null,"Website:",-1)),Tt(" "+At(de(y).website),1)])):nt("",!0),de(y).fundsUsage?(Re(),Te("p",R0,[P[56]||(P[56]=he("strong",null,"Funds Usage:",-1)),Tt(" "+At(de(Gl)(de(y).fundsUsage)),1)])):nt("",!0)]),he("div",M0,[he("h3",D0,"Directors("+At(de(y).directors.length)+")",1),(Re(!0),Te(mo,null,go(de(y).directors,(K,Ce)=>(Re(),Te("div",{key:Ce,class:"discovery-review-item"},[he("p",null,[he("strong",null,"Director "+At(Ce+1)+":",1),Tt(" "+At(K.fullName)+" ",1),K.isPrimary?(Re(),Te("span",T0,"(Primary)")):nt("",!0)]),K.emailAddress?(Re(),Te("p",q0,[P[58]||(P[58]=he("strong",null,"Email:",-1)),Tt(" "+At(K.emailAddress),1)])):nt("",!0),K.mobileNumber?(Re(),Te("p",j0,[P[59]||(P[59]=he("strong",null,"Phone:",-1)),Tt(" "+At(K.mobileCountryCode)+At(K.mobileNumber),1)])):nt("",!0),K.personalAddress?(Re(),Te("p",U0,[P[60]||(P[60]=he("strong",null,"Address:",-1)),Tt(" "+At(K.personalAddress),1)])):nt("",!0)]))),128))]),he("div",z0,[P[61]||(P[61]=he("h3",{class:"discovery-review-title"},"Documents",-1)),he("p",null,"Latest Accounts: "+At(de(y).uploadedLatestFullFiledAccounts.length)+" file(s)",1),he("p",null,"Bank Statements: "+At(de(y).uploadedBusinessBankStatements.length)+" file(s)",1),de(y).uploadedAgedDebtorsReport.length?(Re(),Te("p",V0,"Aged Debtors Report: "+At(de(y).uploadedAgedDebtorsReport.length)+" file(s)",1)):nt("",!0),de(y).uploadedManagementAccounts.length?(Re(),Te("p",H0,"Management Accounts: "+At(de(y).uploadedManagementAccounts.length)+" file(s)",1)):nt("",!0)]),ne.value?(Re(),Te("div",W0,[P[64]||(P[64]=he("h3",{class:"discovery-review-title"},"Declaration",-1)),he("p",null,[P[62]||(P[62]=he("strong",null,"Signed by:",-1)),Tt(" "+At(de(y).digitalSignature),1)]),he("p",$0,[ht(Se,{icon:["fas","check"],class:"discovery-review-check-icon"}),P[63]||(P[63]=Tt(" Terms and Conditions Accepted ",-1))])])):nt("",!0)]),ne.value?nt("",!0):(Re(),Te("div",G0,[P[65]||(P[65]=he("p",{class:"discovery-declaration-text"},[Tt(" By signing and submitting this form below I hereby certify that the above information given is true and correct as to the best of my knowledge and I certify that I have read through the terms and conditions in the "),he("a",{href:"https://fundingbay.co.uk/privacy-policy/",target:"_blank",rel:"noopener noreferrer",class:"discovery-declaration-link"},"privacy policy"),Tt(". ")],-1)),he("div",Y0,[ht(vl,{modelValue:de(y).declarationAccepted,"onUpdate:modelValue":P[25]||(P[25]=K=>de(y).declarationAccepted=K),label:"I Accept the Terms and Conditions",required:!0,error:de(V).declarationAccepted,variant:"toggle"},null,8,["modelValue","error"])]),ht(Pi,{name:"ui-fade-slide"},{default:Vn(()=>[de(y).declarationAccepted?(Re(),Ju(Hn,{key:"digital-signature",modelValue:de(y).digitalSignature,"onUpdate:modelValue":P[26]||(P[26]=K=>de(y).digitalSignature=K),label:"Digital Signature",placeholder:"Type your full name",required:!0,error:de(V).digitalSignature},null,8,["modelValue","error"])):nt("",!0)]),_:1})])),he("div",{class:Dt(["discovery-button-group",{"discovery-button-group-end":ne.value}])},[ne.value?(Re(),Te("button",{key:0,class:"ui-button ui-button-secondary",onClick:P[27]||
79(P[27]=K=>L.value=3)}," Back ")):nt("",!0),ne.value?nt("",!0):(Re(),Te("button",{key:1,class:"ui-button ui-button-secondary",onClick:P[28]||(P[28]=(...K)=>de(fe)&&de(fe)(...K))}," Back ")),ne.value?nt("",!0):(Re(),Te("button",{key:2,disabled:!de(y).declarationAccepted||!de(y).digitalSignature.trim()||B.value||Z.value,class:"ui-button ui-button-primary","aria-busy":B.value,"aria-live":"polite",onClick:Qr},[B.value?(Re(),Te("span",J0,[...P[66]||(P[66]=[he("span",{class:"discovery-submit-spinner","aria-hidden":"true"},null,-1),Tt(" Submitting... ",-1)])])):(Re(),Te("span",X0,At(se.value?"Resubmit":"Submit"),1))],8,K0))],2)])):nt("",!0)]),_:1})],512))])]),_:1})}}},em=Cs(Q0,[["__scopeId","data-v-2e2fc6be"]]),am=Object.freeze(Object.defineProperty({__proto__:null,default:em},Symbol.toStringTag,{value:"Module"}));export{am as D,qt as _};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.