ngx-extended-pdf-viewer
Version:
Embedding PDF files in your Angular application. Highly configurable viewer including the toolbar, sidebar, and all the features you're used to.
28 lines • 98.5 kB
JavaScript
/**
* @licstart The following is the entire license notice for the
* JavaScript code in this page
*
* Copyright 2024 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* @licend The above is the entire license notice for the
* JavaScript code in this page
*/
/**
* pdfjsVersion = 6.5.1523
* pdfjsBuild = d757f8ee7
*/
class NgxConsole{static log(e,t){NgxConsole.ngxConsoleFilter("log",e)&&(void 0!==t?console.log("%s",e,t):console.log(e))}static error(e,t){NgxConsole.ngxConsoleFilter("error",e)&&(void 0!==t?console.error("%s",e,t):console.error(e))}static warn(e,t){NgxConsole.ngxConsoleFilter("warn",e)&&(void 0!==t?console.warn("%s",e,t):console.warn(e))}static debug(e,t){NgxConsole.ngxConsoleFilter("debug",e)&&(void 0!==t?console.warn("%s",e,t):console.warn(e))}get ngxConsoleFilter(){return NgxConsole.ngxConsoleFilter}set ngxConsoleFilter(e){NgxConsole.ngxConsoleFilter=e}reset(){NgxConsole.ngxConsoleFilter=(e,t)=>!0}}!function _defineProperty(e,t,i){return(t=function _toPropertyKey(e){var t=function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var i;if("undefined"!=typeof Symbol&&void 0!==(i=e[Symbol.toPrimitive])){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}(NgxConsole,"ngxConsoleFilter",(e,t)=>!0);class SandboxSupportBase{constructor(e,t){this.win=e;this.ngxSandbox=t;this.timeoutIds=new Map;this.commFun=null}destroy(){this.commFun=null;for(const e of this.timeoutIds.values())this.win.clearTimeout(e);this.timeoutIds=null}exportValueToSandbox(e){throw new Error("Not implemented")}importValueFromSandbox(e){throw new Error("Not implemented")}createErrorForSandbox(e){throw new Error("Not implemented")}callSandboxFunction(e,t){if(this.commFun)try{t=this.exportValueToSandbox(t);this.commFun(e,t)}catch(e){this.win.console.error(e)}}createSandboxExternals(){const e={setTimeout:(e,t)=>{if("number"!=typeof e||"number"!=typeof t)return;0===e&&this.win.clearTimeout(this.timeoutIds.get(e));const i=this.win.setTimeout(()=>{this.timeoutIds.delete(e);this.callSandboxFunction("timeoutCb",{callbackId:e,interval:!1})},t);this.timeoutIds.set(e,i)},clearTimeout:e=>{this.win.clearTimeout(this.timeoutIds.get(e));this.timeoutIds.delete(e)},setInterval:(e,t)=>{if("number"!=typeof e||"number"!=typeof t)return;const i=this.win.setInterval(()=>{this.callSandboxFunction("timeoutCb",{callbackId:e,interval:!0})},t);this.timeoutIds.set(e,i)},clearInterval:e=>{this.win.clearInterval(this.timeoutIds.get(e));this.timeoutIds.delete(e)},alert:e=>{"string"==typeof e&&this.win.alert(e)},confirm:e=>"string"==typeof e&&this.win.confirm(e),prompt:(e,t)=>"string"!=typeof e||"string"!=typeof t?null:this.win.prompt(e,t),parseURL:e=>{const t=new this.win.URL(e);return Object.fromEntries(["hash","host","hostname","href","origin","password","pathname","port","protocol","search","searchParams","username"].map(e=>[e,t[e].toString()]))},send:e=>{if(!e)return;const t=new this.win.CustomEvent("updatefromsandbox",{detail:this.importValueFromSandbox(e)});t.ngxSandbox=this.ngxSandbox;this.win.dispatchEvent(t)}};Object.setPrototypeOf(e,null);return(t,i)=>{try{const s=e[t](...i);return this.exportValueToSandbox(s)}catch(e){throw this.createErrorForSandbox(e?.toString()??"")}}}}class SandboxSupport extends SandboxSupportBase{exportValueToSandbox(e){return JSON.stringify(e,(e,t)=>t instanceof Map?Object.fromEntries(t):t)}importValueFromSandbox(e){return e}createErrorForSandbox(e){return new Error(e)}}class Sandbox{constructor(e,t){this.support=new SandboxSupport(e,this);t.externalCall=this.support.createSandboxExternals();this._module=t;this._alertOnError=0}create(e){const t=['(()=>{"use strict";const{apply:e}=Reflect;function uncurryThis(t){return(i,...s)=>e(t,i,s)}function serializeError(e,t=""){let i,s;try{i=String(e)}catch{i="Unknown error"}try{s=e?.stack}catch{}return{command:"error",value:`${t}${"string"==typeof s?`${i}\\n${s}`:i}`}}const makeArr=()=>[],makeMap=()=>new Map,t=new Map,i=new WeakSet;function addPublicFunctions(...e){for(const t of e)"function"==typeof t&&i.add(t)}function exposeObject(e,i=!1){const s=Object.getPrototypeOf(e);let a=!i&&t.get(s);if(!a){const r=Object.getOwnPropertyDescriptors(s);delete r.constructor;for(const t of Object.values(r)){const{value:s,get:a,set:r}=t;addPublicFunctions(s,a,r);i&&"function"==typeof s&&(t.value=s.bind(e))}a=Object.create(Object.prototype,r);i||t.set(s,a)}return Object.setPrototypeOf(e,a)}const s=Object.freeze({s:"solid",d:"dashed",b:"beveled",i:"inset",u:"underline"}),a=Object.freeze({visible:0,hidden:1,delay:2}),r=Object.freeze({visible:0,hidden:1,noPrint:2,noView:3}),l=Object.freeze({Times:"Times-Roman",TimesB:"Times-Bold",TimesI:"Times-Italic",TimesBI:"Times-BoldItalic",Helv:"Helvetica",HelvB:"Helvetica-Bold",HelvI:"Helvetica-Oblique",HelvBI:"Helvetica-BoldOblique",Cour:"Courier",CourB:"Courier-Bold",CourI:"Courier-Oblique",CourBI:"Courier-BoldOblique",Symbol:"Symbol",ZapfD:"ZapfDingbats",KaGo:"HeiseiKakuGo-W5-UniJIS-UCS2-H",KaMi:"HeiseiMin-W3-UniJIS-UCS2-H"}),n=Object.freeze({n:"none",i:"invert",p:"push",o:"outline"}),o=Object.freeze({textOnly:0,iconOnly:1,iconTextV:2,textIconV:3,iconTextH:4,textIconH:5,overlay:6}),c=Object.freeze({proportional:0,anamorphic:1}),d=Object.freeze({always:0,never:1,tooBig:2,tooSmall:3}),h=Object.freeze({ch:"check",cr:"cross",di:"diamond",ci:"circle",st:"star",sq:"square"}),u=Object.freeze({blindsH:"BlindsHorizontal",blindsV:"BlindsVertical",boxI:"BoxIn",boxO:"BoxOut",dissolve:"Dissolve",glitterD:"GlitterDown",glitterR:"GlitterRight",glitterRD:"GlitterRightDown",random:"Random",replace:"Replace",splitHI:"SplitHorizontalIn",splitHO:"SplitHorizontalOut",splitVI:"SplitVerticalIn",splitVO:"SplitVerticalOut",wipeD:"WipeDown",wipeL:"WipeLeft",wipeR:"WipeRight",wipeU:"WipeUp"}),p=Object.freeze({none:"NoVary",fitP:"FitPage",fitW:"FitWidth",fitH:"FitHeight",fitV:"FitVisibleWidth",pref:"Preferred",refW:"ReflowWidth"}),v=Object.freeze({IDS_GREATER_THAN:"Invalid value: must be greater than or equal to % s.",IDS_GT_AND_LT:"Invalid value: must be greater than or equal to % s and less than or equal to % s.",IDS_LESS_THAN:"Invalid value: must be less than or equal to % s.",IDS_INVALID_MONTH:"** Invalid **",IDS_INVALID_DATE:"Invalid date / time: please ensure that the date / time exists. Field",IDS_INVALID_DATE2:" should match format ",IDS_INVALID_VALUE:"The value entered does not match the format of the field",IDS_AM:"am",IDS_PM:"pm",IDS_MONTH_INFO:"January[1] February[2] March[3] April[4] May[5] June[6] July[7] August[8] September[9] October[10] November[11] December[12] Sept[9] Jan[1] Feb[2] Mar[3] Apr[4] Jun[6] Jul[7] Aug[8] Sep[9] Oct[10] Nov[11] Dec[12]",IDS_STARTUP_CONSOLE_MSG:"** ^ _ ^ **",RE_NUMBER_ENTRY_DOT_SEP:["[+-]?\\\\d*\\\\.?\\\\d*"],RE_NUMBER_COMMIT_DOT_SEP:["[+-]?\\\\d+(\\\\.\\\\d+)?","[+-]?\\\\.\\\\d+","[+-]?\\\\d+\\\\."],RE_NUMBER_ENTRY_COMMA_SEP:["[+-]?\\\\d*,?\\\\d*"],RE_NUMBER_COMMIT_COMMA_SEP:["[+-]?\\\\d+([.,]\\\\d+)?","[+-]?[.,]\\\\d+","[+-]?\\\\d+[.,]"],RE_ZIP_ENTRY:["\\\\d{0,5}"],RE_ZIP_COMMIT:["\\\\d{5}"],RE_ZIP4_ENTRY:["\\\\d{0,5}(\\\\.|[- ])?\\\\d{0,4}"],RE_ZIP4_COMMIT:["\\\\d{5}(\\\\.|[- ])?\\\\d{4}"],RE_PHONE_ENTRY:["\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,4}","\\\\(\\\\d{0,3}","\\\\(\\\\d{0,3}\\\\)(\\\\.|[- ])?\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,4}","\\\\(\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,4}","\\\\d{0,3}\\\\)(\\\\.|[- ])?\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,4}","011(\\\\.|[- \\\\d])*"],RE_PHONE_COMMIT:["\\\\d{3}(\\\\.|[- ])?\\\\d{4}","\\\\d{3}(\\\\.|[- ])?\\\\d{3}(\\\\.|[- ])?\\\\d{4}","\\\\(\\\\d{3}\\\\)(\\\\.|[- ])?\\\\d{3}(\\\\.|[- ])?\\\\d{4}","011(\\\\.|[- \\\\d])*"],RE_SSN_ENTRY:["\\\\d{0,3}(\\\\.|[- ])?\\\\d{0,2}(\\\\.|[- ])?\\\\d{0,4}"],RE_SSN_COMMIT:["\\\\d{3}(\\\\.|[- ])?\\\\d{2}(\\\\.|[- ])?\\\\d{4}"]});function _classPrivateFieldInitSpec(e,t,i){(function _checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,i)}function _classPrivateFieldGet(e,t){return e.get(function _assertClassBrand(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}(e,t))}var _=new WeakMap,f=new WeakMap,P=new WeakMap,F=new WeakMap,m=new WeakMap,g=new WeakMap,S=new WeakMap,y=new WeakMap,w=new WeakMap,b=new WeakMap;class FullScreen{constructor(){_classPrivateFieldInitSpec(this,_,[]);_classPrivateFieldInitSpec(this,f,!0);_classPrivateFieldInitSpec(this,P,a.hidden);_classPrivateFieldInitSpec(this,F,"");_classPrivateFieldInitSpec(this,m,!0);_classPrivateFieldInitSpec(this,g,!0);_classPrivateFieldInitSpec(this,S,!1);_classPrivateFieldInitSpec(this,y,3600);_classPrivateFieldInitSpec(this,w,!1);_classPrivateFieldInitSpec(this,b,!1)}get backgroundColor(){return _classPrivateFieldGet(_,this)}set backgroundColor(e){}get clickAdvances(){return _classPrivateFieldGet(f,this)}set clickAdvances(e){}get cursor(){return _classPrivateFieldGet(P,this)}set cursor(e){}get defaultTransition(){return _classPrivateFieldGet(F,this)}set defaultTransition(e){}get escapeExits(){return _classPrivateFieldGet(m,this)}set escapeExits(e){}get isFullScreen(){return _classPrivateFieldGet(g,this)}set isFullScreen(e){}get loop(){return _classPrivateFieldGet(S,this)}set loop(e){}get timeDelay(){return _classPrivateFieldGet(y,this)}set timeDelay(e){}get transitions(){return["Replace","WipeRight","WipeLeft","WipeDown","WipeUp","SplitHorizontalIn","SplitHorizontalOut","SplitVerticalIn","SplitVerticalOut","BlindsHorizontal","BlindsVertical","BoxIn","BoxOut","GlitterRight","GlitterDown","GlitterRightDown","Dissolve","Random"]}set transitions(e){throw new Error("fullscreen.transitions is read-only")}get usePageTiming(){return _classPrivateFieldGet(w,this)}set usePageTiming(e){}get useTimer(){return _classPrivateFieldGet(b,this)}set useTimer(e){}}function MathClamp(e,t,i){return Math.min(Math.max(e,t),i)}function makeColorComp(e){return Math.floor(255*MathClamp(e,0,1)).toString(16).padStart(2,"0")}function scaleAndClamp(e){return 255*MathClamp(e,0,1)}class ColorConverters{static CMYK_G([e,t,i,s]){return["G",1-Math.min(1,.3*e+.59*i+.11*t+s)]}static G_CMYK([e]){return["CMYK",0,0,0,1-e]}static G_RGB([e]){return["RGB",e,e,e]}static G_rgb([e]){return[e=scaleAndClamp(e),e,e]}static G_HTML([e]){const t=makeColorComp(e);return`#${t}${t}${t}`}static RGB_G([e,t,i]){return["G",.3*e+.59*t+.11*i]}static RGB_rgb(e){return e.map(scaleAndClamp)}static RGB_HTML(e){return`#${e.map(makeColorComp).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([e,t,i,s]){return["RGB",1-Math.min(1,e+s),1-Math.min(1,i+s),1-Math.min(1,t+s)]}static CMYK_rgb([e,t,i,s]){return[scaleAndClamp(1-Math.min(1,e+s)),scaleAndClamp(1-Math.min(1,i+s)),scaleAndClamp(1-Math.min(1,t+s))]}static CMYK_HTML(e){const t=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(t)}static RGB_CMYK([e,t,i]){const s=1-e,a=1-t,r=1-i;return["CMYK",s,a,r,Math.min(s,a,r)]}}const G=["m/d","m/d/yy","mm/dd/yy","mm/yy","d-mmm","d-mmm-yy","dd-mmm-yy","yy-mm-dd","mmm-yy","mmmm-yy","mmm d, yyyy","mmmm d, yyyy","m/d/yy h:MM tt","m/d/yy HH:MM"],I=["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"];function _defineProperty(e,t,i){return(t=function _toPropertyKey(e){var t=function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var i;if("undefined"!=typeof Symbol&&void 0!==(i=e[Symbol.toPrimitive])){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function isValidSpace(e){return"string"==typeof e&&("T"===e||"G"===e||"RGB"===e||"CMYK"===e)}function isValidColor(e){if(!Array.isArray(e)||0===e.length)return!1;const t=e[0];if(!isValidSpace(t))return!1;const i={T:1,G:2,RGB:4,CMYK:5}[t];return e.length===i&&e.slice(1).every(e=>"number"==typeof e&&e>=0&&e<=1)}function getCorrectColor(e){return isValidColor(e)?e:["G",0]}class Color{constructor(){_defineProperty(this,"transparent",["T"]);_defineProperty(this,"black",["G",0]);_defineProperty(this,"white",["G",1]);_defineProperty(this,"red",["RGB",1,0,0]);_defineProperty(this,"green",["RGB",0,1,0]);_defineProperty(this,"blue",["RGB",0,0,1]);_defineProperty(this,"cyan",["CMYK",1,0,0,0]);_defineProperty(this,"magenta",["CMYK",0,1,0,0]);_defineProperty(this,"yellow",["CMYK",0,0,1,0]);_defineProperty(this,"dkGray",["G",.25]);_defineProperty(this,"gray",["G",.5]);_defineProperty(this,"ltGray",["G",.75])}convert(e,t){return isValidSpace(t)?"T"===t?["T"]:(e=getCorrectColor(e))[0]===t?e:"T"===e[0]?this.convert(this.black,t):ColorConverters[`${e[0]}_${t}`](e.slice(1)):this.black}equal(e,t){e=getCorrectColor(e);t=getCorrectColor(t);if("T"===e[0]||"T"===t[0])return"T"===e[0]&&"T"===t[0];e[0]!==t[0]&&(t=this.convert(t,e[0]));return e.slice(1).every((e,i)=>e===t[i+1])}}function thermometer_classPrivateFieldInitSpec(e,t,i){(function thermometer_checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,i)}function _classPrivateFieldSet(e,t,i){return e.set(thermometer_assertClassBrand(e,t),i),i}function thermometer_classPrivateFieldGet(e,t){return e.get(thermometer_assertClassBrand(e,t))}function thermometer_assertClassBrand(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}var C=new WeakMap,M=new WeakMap,k=new WeakMap,A=new WeakMap;class Thermometer{constructor(){thermometer_classPrivateFieldInitSpec(this,C,!1);thermometer_classPrivateFieldInitSpec(this,M,100);thermometer_classPrivateFieldInitSpec(this,k,"");thermometer_classPrivateFieldInitSpec(this,A,0)}get cancelled(){return thermometer_classPrivateFieldGet(C,this)}set cancelled(e){throw new Error("thermometer.cancelled is read-only")}get duration(){return thermometer_classPrivateFieldGet(M,this)}set duration(e){_classPrivateFieldSet(M,this,e)}get text(){return thermometer_classPrivateFieldGet(k,this)}set text(e){_classPrivateFieldSet(k,this,e)}get value(){return thermometer_classPrivateFieldGet(A,this)}set value(e){_classPrivateFieldSet(A,this,e)}begin(){}end(){}}function app_classPrivateFieldInitSpec(e,t,i){app_checkPrivateRedeclaration(e,t),t.set(e,i)}function app_checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function app_classPrivateFieldGet(e,t){return e.get(app_assertClassBrand(e,t))}function app_classPrivateFieldSet(e,t,i){return e.set(app_assertClassBrand(e,t),i),i}function app_assertClassBrand(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}const T=uncurryThis(Map.prototype.delete),E=uncurryThis(Map.prototype.get),W=uncurryThis(Map.prototype.set),O=uncurryThis(WeakMap.prototype.delete),D=uncurryThis(WeakMap.prototype.get),x=uncurryThis(WeakMap.prototype.set),B=uncurryThis(FinalizationRegistry.prototype.register),V=uncurryThis(FinalizationRegistry.prototype.unregister),j=Object.create(null);var R=new WeakMap,N=new WeakMap,H=new WeakMap,z=new WeakMap,L=new WeakMap,$=new WeakMap,K=new WeakMap,U=new WeakMap,Y=new WeakMap,X=new WeakMap,q=new WeakMap,Z=new WeakMap,J=new WeakMap,Q=new WeakMap,ee=new WeakMap,te=new WeakMap,ie=new WeakMap,se=new WeakMap,ae=new WeakMap,re=new WeakSet;class App{constructor(e){!function _classPrivateMethodInitSpec(e,t){app_checkPrivateRedeclaration(e,t),t.add(e)}(this,re);app_classPrivateFieldInitSpec(this,R,null);app_classPrivateFieldInitSpec(this,N,!0);app_classPrivateFieldInitSpec(this,H,exposeObject(new FullScreen,!0));app_classPrivateFieldInitSpec(this,z,void 0);app_classPrivateFieldInitSpec(this,L,!1);app_classPrivateFieldInitSpec(this,$,void 0);app_classPrivateFieldInitSpec(this,K,!1);app_classPrivateFieldInitSpec(this,U,["T"]);app_classPrivateFieldInitSpec(this,Y,exposeObject(new Thermometer,!0));app_classPrivateFieldInitSpec(this,X,!1);app_classPrivateFieldInitSpec(this,q,void 0);app_classPrivateFieldInitSpec(this,Z,new WeakMap);app_classPrivateFieldInitSpec(this,J,new FinalizationRegistry(app_assertClassBrand(re,this,_cleanTimeout).bind(this)));app_classPrivateFieldInitSpec(this,Q,new Map);app_classPrivateFieldInitSpec(this,ee,1);app_classPrivateFieldInitSpec(this,te,void 0);app_classPrivateFieldInitSpec(this,ie,void 0);app_classPrivateFieldInitSpec(this,se,void 0);app_classPrivateFieldInitSpec(this,ae,void 0);app_classPrivateFieldSet(se,this,e.send);app_classPrivateFieldSet(ae,this,e.userActivationData);app_classPrivateFieldSet(z,this,_getLanguage.call(App,e.language));app_classPrivateFieldSet($,this,_getPlatform.call(App,e.platform));app_classPrivateFieldSet(q,this,e.doc);app_classPrivateFieldSet(te,this,e.globalEval);app_classPrivateFieldSet(ie,this,e.externalCall)}get activeDocs(){return[globalThis]}set activeDocs(e){throw new Error("app.activeDocs is read-only")}get calculate(){return app_classPrivateFieldGet(q,this).calculate}set calculate(e){app_classPrivateFieldGet(q,this).calculate=e}get constants(){return app_classPrivateFieldGet(R,this)??app_classPrivateFieldSet(R,this,Object.freeze({align:Object.freeze({left:0,center:1,right:2,top:3,bottom:4})}))}set constants(e){throw new Error("app.constants is read-only")}get focusRect(){return app_classPrivateFieldGet(N,this)}set focusRect(e){app_classPrivateFieldSet(N,this,e)}get formsVersion(){return 21.00720099}set formsVersion(e){throw new Error("app.formsVersion is read-only")}get fromPDFConverters(){return[]}set fromPDFConverters(e){throw new Error("app.fromPDFConverters is read-only")}get fs(){return app_classPrivateFieldGet(H,this)}set fs(e){throw new Error("app.fs is read-only")}get language(){return app_classPrivateFieldGet(z,this)}set language(e){throw new Error("app.language is read-only")}get media(){}set media(e){throw new Error("app.media is read-only")}get monitors(){return[]}set monitors(e){throw new Error("app.monitors is read-only")}get numPlugins(){return 0}set numPlugins(e){throw new Error("app.numPlugins is read-only")}get openInPlace(){return app_classPrivateFieldGet(L,this)}set openInPlace(e){app_classPrivateFieldSet(L,this,e)}get platform(){return app_classPrivateFieldGet($,this)}set platform(e){throw new Error("app.platform is read-only")}get plugins(){return[]}set plugins(e){throw new Error("app.plugins is read-only")}get printColorProfiles(){return[]}set printColorProfiles(e){throw new Error("app.printColorProfiles is read-only")}get printerNames(){return[]}set printerNames(e){throw new Error("app.printerNames is read-only")}get runtimeHighlight(){return app_classPrivateFieldGet(K,this)}set runtimeHighlight(e){app_classPrivateFieldSet(K,this,e)}get runtimeHighlightColor(){return app_classPrivateFieldGet(U,this)}set runtimeHighlightColor(e){isValidColor(e)&&app_classPrivateFieldSet(U,this,e)}get thermometer(){return app_classPrivateFieldGet(Y,this)}set thermometer(e){throw new Error("app.thermometer is read-only")}get toolbar(){return app_classPrivateFieldGet(X,this)}set toolbar(e){app_classPrivateFieldSet(X,this,e)}get toolbarHorizontal(){return this.toolbar}set toolbarHorizontal(e){this.toolbar=e}get toolbarVertical(){return this.toolbar}set toolbarVertical(e){this.toolbar=e}get viewerType(){return"PDF.js"}set viewerType(e){throw new Error("app.viewerType is read-only")}get viewerVariation(){return"Full"}set viewerVariation(e){throw new Error("app.viewerVariation is read-only")}get viewerVersion(){return 21.00720099}set viewerVersion(e){throw new Error("app.viewerVersion is read-only")}addMenuItem(){}addSubMenu(){}addToolButton(){}alert(e,t=0,i=0,s="PDF.js",a=null,r=null){if(!app_classPrivateFieldGet(ae,this).userActivation)return 0;app_classPrivateFieldGet(ae,this).userActivation=!1;if(e&&"object"==typeof e){i=e.nType;e=e.cMsg}if(!(e=(e||"").toString()))return 0;if((i="number"!=typeof i||isNaN(i)||i<0||i>3?0:i)>=2)return app_classPrivateFieldGet(ie,this).call(this,"confirm",[e])?4:3;app_classPrivateFieldGet(ie,this).call(this,"alert",[e]);return 1}beep(){}beginPriv(){}browseForDoc(){}clearInterval(e){app_assertClassBrand(re,this,_unregisterTimeout).call(this,e)}clearTimeOut(e){app_assertClassBrand(re,this,_unregisterTimeout).call(this,e)}endPriv(){}execDialog(){}execMenuItem(e){if(app_classPrivateFieldGet(ae,this).userActivation){app_classPrivateFieldGet(ae,this).userActivation=!1;switch(e){case"SaveAs":if(app_classPrivateFieldGet(ae,this).disableSaving)return;app_classPrivateFieldGet(se,this).call(this,{command:e});break;case"FirstPage":case"LastPage":case"NextPage":case"PrevPage":case"ZoomViewIn":case"ZoomViewOut":app_classPrivateFieldGet(se,this).call(this,{command:e});break;case"FitPage":app_classPrivateFieldGet(se,this).call(this,{command:"zoom",value:"page-fit"});break;case"Print":if(app_classPrivateFieldGet(ae,this).disablePrinting)return;app_classPrivateFieldGet(se,this).call(this,{command:"print"})}}}getNthPlugInName(){}getPath(){}goBack(){}goForward(){}hideMenuItem(){}hideToolbarButton(){}launchURL(){}listMenuItems(){}listToolbarButtons(){}loadPolicyFile(){}mailGetAddrs(){}mailMsg(){}newDoc(){}newCollection(){}newFDF(){}openDoc(){}openFDF(){}popUpMenu(){}popUpMenuEx(){}removeToolButton(){}response(e,t="",i="",s="",a=""){if(!app_classPrivateFieldGet(ae,this).userActivation)return null;app_classPrivateFieldGet(ae,this).userActivation=!1;if(e&&"object"==typeof e){i=e.cDefault;e=e.cQuestion}e=(e||"").toString();i=(i||"").toString();return app_classPrivateFieldGet(ie,this).call(this,"prompt",[e,i||""])}setInterval(e,t=0){if(e&&"object"==typeof e){t=e.nMilliseconds||0;e=e.cExpr}if("string"!=typeof e)throw new TypeError("First argument of app.setInterval must be a string");if("number"!=typeof t)throw new TypeError("Second argument of app.setInterval must be a number");const i=app_assertClassBrand(re,this,_registerTimeoutCallback).call(this,e);app_classPrivateFieldGet(ie,this).call(this,"setInterval",[i,t]);return app_assertClassBrand(re,this,_registerTimeout).call(this,i,!0)}setTimeOut(e,t=0){if(e&&"object"==typeof e){t=e.nMilliseconds||0;e=e.cExpr}if("string"!=typeof e)throw new TypeError("First argument of app.setTimeOut must be a string");if("number"!=typeof t)throw new TypeError("Second argument of app.setTimeOut must be a number");const i=app_assertClassBrand(re,this,_registerTimeoutCallback).call(this,e);app_classPrivateFieldGet(ie,this).call(this,"setTimeout",[i,t]);return app_assertClassBrand(re,this,_registerTimeout).call(this,i,!1)}trustedFunction(){}trustPropagatorFunction(){}}function _registerTimeoutCallback(e){var t,i;const s=(app_classPrivateFieldSet(ee,this,(t=app_classPrivateFieldGet(ee,this),i=t++,t)),i);W(app_classPrivateFieldGet(Q,this),s,e);return s}function _unregisterTimeoutCallback(e){T(app_classPrivateFieldGet(Q,this),e)}function _evalCallback({callbackId:e,interval:t}){if(0===e){app_classPrivateFieldGet(ae,this).userActivation=!1;return}const i=E(app_classPrivateFieldGet(Q,this),e);t||app_assertClassBrand(re,this,_unregisterTimeoutCallback).call(this,e);if(i){const e=app_classPrivateFieldGet(ae,this).userActivation;app_classPrivateFieldGet(ae,this).userActivation=!1;app_classPrivateFieldGet(te,this).call(this,i);app_classPrivateFieldGet(ae,this).userActivation=e}}function _registerTimeout(e,t){const i=Object.create(null),s={callbackId:e,interval:t};x(app_classPrivateFieldGet(Z,this),i,s);B(app_classPrivateFieldGet(J,this),i,s,i);return i}function _unregisterTimeout(e){const t=D(app_classPrivateFieldGet(Z,this),e);if(t){O(app_classPrivateFieldGet(Z,this),e);V(app_classPrivateFieldGet(J,this),e);app_assertClassBrand(re,this,_cleanTimeout).call(this,t)}}function _cleanTimeout({callbackId:e,interval:t}){app_assertClassBrand(re,this,_unregisterTimeoutCallback).call(this,e);t?app_classPrivateFieldGet(ie,this).call(this,"clearInterval",[e]):app_classPrivateFieldGet(ie,this).call(this,"clearTimeout",[e])}function _getPlatform(e){if("string"==typeof e){if((e=e.toLowerCase()).includes("win"))return"WIN";if(e.includes("mac"))return"MAC"}return"UNIX"}function _getLanguage(e){const[t,i]=e.toLowerCase().split(/[-_]/,2);switch(t){case"zh":return"cn"===i||"sg"===i?"CHS":"CHT";case"da":return"DAN";case"de":return"DEU";case"es":return"ESP";case"fr":return"FRA";case"it":return"ITA";case"ko":return"KOR";case"ja":return"JPN";case"nl":return"NLD";case"no":return"NOR";case"pt":return"br"===i?"PTB":"ENU";case"fi":return"SUO";case"SV":return"SVE";default:return"ENU"}}Object.assign(j,{evalCallback:(e,t)=>app_assertClassBrand(re,e,_evalCallback).call(e,t)});const le=0,ne=1,oe=2,ce=3,de=4;function createMap(e){return e instanceof Map?e:new Map(e?Object.entries(e):null)}var he;function field_classPrivateFieldInitSpec(e,t,i){field_checkPrivateRedeclaration(e,t),t.set(e,i)}function field_checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateGetter(e,t,i){return i(field_assertClassBrand(e,t))}function field_classPrivateFieldGet(e,t){return e.get(field_assertClassBrand(e,t))}function field_classPrivateFieldSet(e,t,i){return e.set(field_assertClassBrand(e,t),i),i}function field_assertClassBrand(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}const ue=Object.create(null);let pe=null;const ve=["display","editable","hidden","multipleSelection","print","readonly","required","userName"];var _e=new WeakMap,fe=new WeakMap,Pe=new WeakMap,Fe=new WeakMap,me=new WeakMap,ge=new WeakMap,Se=new WeakMap,ye=new WeakMap,we=new WeakMap,be=new WeakMap,Ge=new WeakMap,Ie=new WeakMap,Ce=new WeakMap,Me=new WeakMap,ke=new WeakMap,Ae=new WeakMap,Te=new WeakMap,Ee=new WeakMap,We=new WeakMap,Oe=new WeakMap,De=new WeakMap,xe=new WeakMap,Be=new WeakMap,Ve=new WeakMap,je=new WeakMap,Re=new WeakMap,Ne=new WeakMap,He=new WeakMap,ze=new WeakMap,Le=new WeakMap,$e=new WeakMap,Ke=new WeakMap,Ue=new WeakMap,Ye=new WeakMap,Xe=new WeakMap,qe=new WeakMap,Ze=new WeakSet;class Field{constructor(e,t=[]){!function field_classPrivateMethodInitSpec(e,t){field_checkPrivateRedeclaration(e,t),t.add(e)}(this,Ze);field_classPrivateFieldInitSpec(this,_e,void 0);field_classPrivateFieldInitSpec(this,fe,void 0);field_classPrivateFieldInitSpec(this,Pe,void 0);field_classPrivateFieldInitSpec(this,Fe,null);field_classPrivateFieldInitSpec(this,me,null);field_classPrivateFieldInitSpec(this,ge,void 0);field_classPrivateFieldInitSpec(this,Se,null);field_classPrivateFieldInitSpec(this,ye,null);field_classPrivateFieldInitSpec(this,we,void 0);field_classPrivateFieldInitSpec(this,be,void 0);field_classPrivateFieldInitSpec(this,Ge,void 0);field_classPrivateFieldInitSpec(this,Ie,void 0);field_classPrivateFieldInitSpec(this,Ce,void 0);field_classPrivateFieldInitSpec(this,Me,void 0);field_classPrivateFieldInitSpec(this,ke,void 0);field_classPrivateFieldInitSpec(this,Ae,void 0);field_classPrivateFieldInitSpec(this,Te,void 0);field_classPrivateFieldInitSpec(this,Ee,void 0);field_classPrivateFieldInitSpec(this,We,!1);field_classPrivateFieldInitSpec(this,Oe,void 0);field_classPrivateFieldInitSpec(this,De,void 0);field_classPrivateFieldInitSpec(this,xe,void 0);field_classPrivateFieldInitSpec(this,Be,void 0);field_classPrivateFieldInitSpec(this,Ve,null);field_classPrivateFieldInitSpec(this,je,void 0);field_classPrivateFieldInitSpec(this,Re,null);field_classPrivateFieldInitSpec(this,Ne,null);field_classPrivateFieldInitSpec(this,He,null);field_classPrivateFieldInitSpec(this,ze,void 0);field_classPrivateFieldInitSpec(this,Le,void 0);field_classPrivateFieldInitSpec(this,$e,void 0);field_classPrivateFieldInitSpec(this,Ke,void 0);field_classPrivateFieldInitSpec(this,Ue,void 0);field_classPrivateFieldInitSpec(this,Ye,void 0);field_classPrivateFieldInitSpec(this,Xe,null);field_classPrivateFieldInitSpec(this,qe,void 0);this.alignment=e.alignment||"left";this.borderStyle=e.borderStyle||"";this.buttonAlignX=e.buttonAlignX||50;this.buttonAlignY=e.buttonAlignY||50;this.buttonFitBounds=e.buttonFitBounds;this.buttonPosition=e.buttonPosition;this.buttonScaleHow=e.buttonScaleHow;this.ButtonScaleWhen=e.buttonScaleWhen;this.calcOrderIndex=e.calcOrderIndex;this.comb=e.comb;this.commitOnSelChange=e.commitOnSelChange;this.defaultStyle=e.defaultStyle;this.defaultValue=e.defaultValue;this.doNotScroll=e.doNotScroll;this.doNotSpellCheck=e.doNotSpellCheck;this.delay=e.delay;this.doc=globalThis;this.exportValues=e.exportValues;this.fileSelect=e.fileSelect;this.highlight=e.highlight;this.lineWidth=e.lineWidth;this.multiline=e.multiline;this.name=e.name;this.password=e.password;this.radiosInUnison=e.radiosInUnison;this.rect=e.rect;this.richText=e.richText;this.richValue=e.richValue;this.style=e.style;this.submitName=e.submitName;this.textFont=e.textFont;this.textSize=e.textSize;this.type=e.type;field_classPrivateFieldSet(_e,this,createMap(e.actions));field_classPrivateFieldSet(fe,this,e.appObjects);field_classPrivateFieldSet(Pe,this,e.browseForFileToSubmit||null);field_classPrivateFieldSet(ge,this,e.charLimit);field_classPrivateFieldSet(we,this,e.currentValueIndices||0);field_classPrivateFieldSet(be,this,e.datetimeFormat||null);field_classPrivateFieldSet(Ge,this,e.fieldPath);field_classPrivateFieldSet(Ie,this,function getFieldType(e){let t=e.get("Format");if(!t)return le;t=t[0].trim();return t.startsWith("AFNumber_")?ne:t.startsWith("AFPercent_")?oe:t.startsWith("AFDate_")?ce:t.startsWith("AFTime_")?de:le}(field_classPrivateFieldGet(_e,this)));field_classPrivateFieldSet(Ce,this,e.fillColor||["T"]);field_classPrivateFieldSet(Me,this,e.getTerminalChildren);field_classPrivateFieldSet(ke,this,e.globalEval);field_classPrivateFieldSet(Ae,this,!!e.hasDatetimeHTML);field_classPrivateFieldSet(Te,this,Object.hasOwn(e,"value"));field_classPrivateFieldSet(Ee,this,e.id);field_classPrivateFieldSet(Oe,this,Array.isArray(e.items));field_classPrivateFieldSet(De,this,e.items||[]);field_classPrivateFieldSet(xe,this,e.kidIds||null);field_classPrivateFieldSet(je,this,e.page||0);field_classPrivateFieldSet(ze,this,e.rotation||0);field_classPrivateFieldSet(Le,this,e.send||(()=>{}));field_classPrivateFieldSet($e,this,e.sendError);field_classPrivateFieldSet(Ke,this,e.strokeColor||["G",0]);field_classPrivateFieldSet(Ue,this,e.textColor||["G",0]);field_classPrivateFieldSet(Ye,this,e.util);field_classPrivateFieldSet(qe,this,Object.fromEntries(ve.map(t=>[t,e[t]])));field_classPrivateFieldGet(qe,this).multipleSelection=!!e.multipleSelection;if("radiobutton"===e.type||"checkbox"===e.type){field_classPrivateFieldSet(We,this,"checkbox"===e.type);this.exportValues=[this.exportValues];field_classPrivateFieldSet(Ne,this,[field_classPrivateFieldGet(Ee,this)]);field_classPrivateFieldSet(Re,this,[field_classPrivateFieldGet(_e,this)]);field_classPrivateFieldSet(He,this,[field_classPrivateFieldGet(je,this)]);for(const i of t){this.exportValues.push(i.exportValues);field_classPrivateFieldGet(Ne,this).push(i.id);field_classPrivateFieldGet(Re,this).push(createMap(i.actions));field_classPrivateFieldGet(He,this).push(i.page||0);e.value===i.exportValues&&field_classPrivateFieldSet(Ee,this,i.id)}field_classPrivateFieldSet(Xe,this,e.value||"")}else{t.length>0&&field_classPrivateFieldSet(Ve,this,t.map(e=>e.id));field_assertClassBrand(Ze,this,_setValue).call(this,e.value||"")}if(field_classPrivateFieldGet(xe,this)){field_classPrivateFieldSet(ye,this,{...this});pe??=_getContainerDescriptors.call(Field,Object.keys(this));Object.defineProperties(this,pe)}}get currentValueIndices(){return field_classPrivateFieldGet(Oe,this)?field_classPrivateFieldGet(we,this):0}set currentValueIndices(e){field_assertClassBrand(Ze,this,_setOnKids).call(this,"currentValueIndices",e);if(field_classPrivateFieldGet(Oe,this)){Array.isArray(e)||(e=[e]);if(e.every(e=>Number.isInteger(e)&&e>=0&&e<this.numItems)){e.sort((e,t)=>e-t);if(field_classPrivateFieldGet(qe,this).multipleSelection){field_classPrivateFieldSet(we,this,e);field_classPrivateFieldSet(Xe,this,e.map(e=>field_classPrivateFieldGet(De,this)[e].exportValue))}else if(e.length>0){e=[e[0]];field_classPrivateFieldSet(we,this,e[0]);field_classPrivateFieldSet(Xe,this,field_classPrivateFieldGet(De,this)[e[0]].exportValue)}field_classPrivateFieldGet(Le,this).call(this,{id:field_classPrivateFieldGet(Ee,this),indices:e})}}}get fillColor(){return field_classPrivateFieldGet(Ce,this)}set fillColor(e){if(isValidColor(e)){field_classPrivateFieldSet(Ce,this,e);field_assertClassBrand(Ze,this,_update).call(this,"fillColor",e)}}get bgColor(){return this.fillColor}set bgColor(e){this.fillColor=e}get charLimit(){return field_classPrivateFieldGet(ge,this)}set charLimit(e){if("number"!=typeof e)throw new Error("Invalid argument value");field_classPrivateFieldSet(ge,this,Math.max(0,Math.floor(e)));field_assertClassBrand(Ze,this,_update).call(this,"charLimit",field_classPrivateFieldGet(ge,this))}get numItems(){if(!field_classPrivateFieldGet(Oe,this))throw new Error("Not a choice widget");return field_classPrivateFieldGet(De,this).length}set numItems(e){throw new Error("field.numItems is read-only")}get strokeColor(){return field_classPrivateFieldGet(Ke,this)}set strokeColor(e){if(isValidColor(e)){field_classPrivateFieldSet(Ke,this,e);field_assertClassBrand(Ze,this,_update).call(this,"strokeColor",e)}}get borderColor(){return this.strokeColor}set borderColor(e){this.strokeColor=e}get page(){return field_classPrivateFieldGet(je,this)}set page(e){throw new Error("field.page is read-only")}get rotation(){return field_classPrivateFieldGet(ze,this)}set rotation(e){if((e=Math.floor(e))%90!=0)throw new Error("Invalid rotation: must be a multiple of 90");(e%=360)<0&&(e+=360);field_classPrivateFieldSet(ze,this,e);field_assertClassBrand(Ze,this,_update).call(this,"rotation",e)}get textColor(){return field_classPrivateFieldGet(Ue,this)}set textColor(e){if(isValidColor(e)){field_classPrivateFieldSet(Ue,this,e);field_assertClassBrand(Ze,this,_update).call(this,"textColor",e)}}get fgColor(){return this.textColor}set fgColor(e){this.textColor=e}get value(){return field_classPrivateFieldGet(Xe,this)}set value(e){field_assertClassBrand(Ze,this,_setValue).call(this,e)&&field_assertClassBrand(Ze,this,_update).call(this,"value",e,field_classPrivateFieldGet(Be,this)??field_classPrivateFieldGet(Xe,this))}get valueAsString(){return(field_classPrivateFieldGet(Xe,this)??"").toString()}set valueAsString(e){}browseForFileToSubmit(){field_classPrivateFieldGet(Pe,this)&&field_classPrivateFieldGet(Pe,this).call(this)}buttonGetCaption(e=0){return field_classPrivateFieldGet(Fe,this)?field_classPrivateFieldGet(Fe,this)[e]:""}buttonGetIcon(e=0){return field_classPrivateFieldGet(me,this)?field_classPrivateFieldGet(me,this)[e]:null}buttonImportIcon(e=null,t=0){}buttonSetCaption(e,t=0){field_classPrivateFieldGet(Fe,this)??field_classPrivateFieldSet(Fe,this,["","",""]);field_classPrivateFieldGet(Fe,this)[t]=e}buttonSetIcon(e,t=0){field_classPrivateFieldGet(me,this)??field_classPrivateFieldSet(me,this,[null,null,null]);field_classPrivateFieldGet(me,this)[t]=e}checkThisBox(e,t=!0){const i=field_assertClassBrand(Ze,this,_getWidgetIndex).call(this,e);if(-1===i||!t&&!field_classPrivateFieldGet(We,this))return;const s=t?this.exportValues[i]:"Off";field_assertClassBrand(Ze,this,_check).call(this,i,s);field_classPrivateFieldGet(Le,this).call(this,{id:field_classPrivateFieldGet(Ee,this),value:s})}clearItems(){if(!field_classPrivateFieldGet(Oe,this))throw new Error("Not a choice widget");field_classPrivateFieldSet(De,this,[]);field_classPrivateFieldGet(Le,this).call(this,{id:field_classPrivateFieldGet(Ee,this),clear:null})}deleteItemAt(e=null){if(!field_classPrivateFieldGet(Oe,this))throw new Error("Not a choice widget");if(this.numItems){if(null===e){e=Array.isArray(field_classPrivateFieldGet(we,this))?field_classPrivateFieldGet(we,this)[0]:field_classPrivateFieldGet(we,this);e||=0}(e<0||e>=this.numItems)&&(e=this.numItems-1);field_classPrivateFieldGet(De,this).splice(e,1);if(Array.isArray(field_classPrivateFieldGet(we,this))){let t=field_classPrivateFieldGet(we,this).findIndex(t=>t>=e);if(-1!==t){field_classPrivateFieldGet(we,this)[t]===e&&field_classPrivateFieldGet(we,this).splice(t,1);for(const e=field_classPrivateFieldGet(we,this).length;t<e;t++)--field_classPrivateFieldGet(we,this)[t]}}else if(field_classPrivateFieldGet(we,this)===e)field_classPrivateFieldSet(we,this,this.numItems>0?0:-1);else if(field_classPrivateFieldGet(we,this)>e){var t;field_classPrivateFieldSet(we,this,(t=field_classPrivateFieldGet(we,this),--t))}field_classPrivateFieldGet(Le,this).call(this,{id:field_classPrivateFieldGet(Ee,this),remove:e})}}getItemAt(e=-1,t=!1){if(!field_classPrivateFieldGet(Oe,this))throw new Error("Not a choice widget");(e<0||e>=this.numItems)&&(e=this.numItems-1);const i=field_classPrivateFieldGet(De,this)[e];return t?i.exportValue:i.displayValue}getArray(){if(field_classPrivateFieldGet(xe,this)){const e=[],fillArrayWithKids=t=>{for(const i of t){const t=field_classPrivateFieldGet(fe,this)[i];if(t){field_classPrivateFieldGet(Te,t)&&e.push(t);field_classPrivateFieldGet(xe,t)&&fillArrayWithKids(field_classPrivateFieldGet(xe,t))}}};fillArrayWithKids(field_classPrivateFieldGet(xe,this));return e}return field_classPrivateFieldGet(Se,this)??field_classPrivateFieldSet(Se,this,field_classPrivateFieldGet(Me,this).call(this,field_classPrivateFieldGet(Ge,this)))}getLock(){}isBoxChecked(e){const t=field_assertClassBrand(Ze,this,_getWidgetIndex).call(this,e);return-1!==t&&field_classPrivateFieldGet(Ee,this)===field_classPrivateFieldGet(Ne,this)[t]&&field_classPrivateFieldGet(Xe,this)===this.exportValues[t]}isDefaultChecked(e){const t=field_assertClassBrand(Ze,this,_getWidgetIndex).call(this,e);return-1!==t&&this.defaultValue===this.exportValues[t]}insertItemAt(e,t=void 0,i=0){if(!field_classPrivateFieldGet(Oe,this))throw new Error("Not a choice widget");if(!e)return;(i<0||i>this.numItems)&&(i=this.numItems);if(field_classPrivateFieldGet(De,this).some(({displayValue:t})=>t===e))return;void 0===t&&(t=e);const s={displayValue:e,exportValue:t};field_classPrivateFieldGet(De,this).splice(i,0,s);if(Array.isArray(field_classPrivateFieldGet(we,this))){let e=field_classPrivateFieldGet(we,this).findIndex(e=>e>=i);if(-1!==e)for(const t=field_classPrivateFieldGet(we,this).length;e<t;e++)++field_classPrivateFieldGet(we,this)[e]}else if(field_classPrivateFieldGet(we,this)>=i){var a;field_classPrivateFieldSet(we,this,(a=field_classPrivateFieldGet(we,this),++a))}field_classPrivateFieldGet(Le,this).call(this,{id:field_classPrivateFieldGet(Ee,this),insert:{index:i,...s}})}setAction(e,t){"string"==typeof e&&"string"==typeof t&&field_classPrivateFieldGet(_e,this).getOrInsertComputed(e,makeArr).push(t)}setFocus(){field_classPrivateFieldGet(Le,this).call(this,{id:field_classPrivateFieldGet(Ee,this),focus:!0})}setItems(e){if(!field_classPrivateFieldGet(Oe,this))throw new Error("Not a choice widget");field_classPrivateFieldGet(De,this).length=0;for(const t of e){let e,i;if(Array.isArray(t)){e=t[0]?.toString()||"";i=t[1]?.toString()||""}else e=i=t?.toString()||"";field_classPrivateFieldGet(De,this).push({displayValue:e,exportValue:i})}field_classPrivateFieldSet(we,this,0);field_classPrivateFieldGet(Le,this).call(this,{id:field_classPrivateFieldGet(Ee,this),items:field_classPrivateFieldGet(De,this)})}setLock(){}signatureGetModifications(){}signatureGetSeedValue(){}signatureInfo(){}signatureSetSeedValue(){}signatureSign(){}signatureValidate(){}}he=Field;function _getContainerDescriptors(e){const t=Object.create(null);for(const i of e){const e={get(){return field_classPrivateFieldGet(ye,this)[i]},set(e){field_classPrivateFieldGet(ye,this)[i]=e;field_assertClassBrand(Ze,this,_setOnKids).call(this,i,e)},enumerable:!0,configurable:!0};addPublicFunctions(e.get,e.set);t[i]=e}return t}function _get_siblings(e){return field_classPrivateFieldGet(Ne,e)?.filter(t=>t!==field_classPrivateFieldGet(Ee,e))??field_classPrivateFieldGet(Ve,e)}function _getPageActions(){const e=field_classPrivateFieldGet(Re,this)??[field_classPrivateFieldGet(_e,this)],t=field_classPrivateFieldGet(He,this)??[field_classPrivateFieldGet(je,this)],i=[];for(let s=0,a=e.length;s<a;s++)for(const a of["PageOpen","PageClose"]){const r=e[s].get(a);r&&i.push([t[s],a,r])}return i}function _setOnKids(e,t){if(field_classPrivateFieldGet(xe,this))for(const i of field_classPrivateFieldGet(xe,this)){const s=field_classPrivateFieldGet(fe,this)[i];s&&(s[e]=t)}}function _sendToView(e){const t=_classPrivateGetter(Ze,this,_get_siblings);field_classPrivateFieldGet(Le,this).call(this,t?{id:field_classPrivateFieldGet(Ee,this),siblings:t,...e}:{id:field_classPrivateFieldGet(Ee,this),...e})}function _update(e,t,i=t){field_assertClassBrand(Ze,this,_setOnKids).call(this,e,t);field_assertClassBrand(Ze,this,_sendToView).call(this,{[e]:i})}function _setValue(e){if(field_classPrivateFieldGet(Ne,this))return field_assertClassBrand(Ze,this,_setRadioValue).call(this,e);if(field_classPrivateFieldGet(Oe,this)){field_assertClassBrand(Ze,this,_setChoiceValue).call(this,e);return!0}if(field_classPrivateFieldGet(Ae,this)&&e){const t=field_classPrivateFieldGet(Ye,this).scand(field_classPrivateFieldGet(be,this),e);if(t){field_classPrivateFieldSet(Be,this,t.valueOf());e=field_classPrivateFieldGet(Ye,this).printd(field_classPrivateFieldGet(be,this),t);field_classPrivateFieldSet(Xe,this,isNaN(e)?e:parseFloat(e));return!0}}if(""===e||"string"!=typeof e||field_classPrivateFieldGet(Ie,this)>=ce){field_classPrivateFieldSet(Be,this,void 0);field_classPrivateFieldSet(Xe,this,e);return!0}field_classPrivateFieldSet(Be,this,e);const t=e.trim().replace(",",".");field_classPrivateFieldSet(Xe,this,isNaN(t)?e:parseFloat(t));return!0}function _get_checkedIndex(e){return field_classPrivateFieldGet(Ne,e).indexOf(field_classPrivateFieldGet(Ee,e))}function _getWidgetIndex(e){if(!field_classPrivateFieldGet(Ne,this))return-1;const t=Number(e);return Number.isInteger(t)&&t>=0&&t<field_classPrivateFieldGet(Ne,this).length&&`${t}`==`${e}`?t:-1}function _check(e,t){field_classPrivateFieldSet(Ee,this,field_classPrivateFieldGet(Ne,this)[e]);field_classPrivateFieldSet(Xe,this,t)}function _setRadioValue(e){if(field_classPrivateFieldGet(We,this)&&(!e||"Off"===e||!this.exportValues.includes(e))){field_classPrivateFieldSet(Xe,this,"Off");return!0}if(null==e){field_classPrivateFieldSet(Xe,this,"");return!0}const t=this.exportValues.indexOf(e);if(-1!==t){field_assertClassBrand(Ze,this,_check).call(this,t,e);return!0}if("Off"===e&&2===field_classPrivateFieldGet(Ne,this).length){const e=(1+_classPrivateGetter(Ze,this,_get_checkedIndex))%2;field_assertClassBrand(Ze,this,_check).call(this,e,this.exportValues[e]);return!0}return!1}function _setChoiceValue(e){if(field_classPrivateFieldGet(qe,this).multipleSelection){Array.isArray(e)||(e=[e]);const t=new Set(e);if(Array.isArray(field_classPrivateFieldGet(we,this))){field_classPrivateFieldGet(we,this).length=0;field_classPrivateFieldGet(Xe,this).length=0}else{field_classPrivateFieldSet(we,this,[]);field_classPrivateFieldSet(Xe,this,[])}field_classPrivateFieldGet(De,this).forEach((e,i)=>{if(t.has(e.exportValue)){field_classPrivateFieldGet(we,this).push(i);field_classPrivateFieldGet(Xe,this).push(e.exportValue)}})}else{Array.isArray(e)&&(e=e[0]);const t=field_classPrivateFieldGet(De,this).findIndex(({exportValue:t})=>e===t);if(-1!==t){field_classPrivateFieldSet(we,this,t);field_classPrivateFieldSet(Xe,this,field_classPrivateFieldGet(De,this)[t].exportValue)}}}function _runActions(e){field_classPrivateFieldGet(Ne,this)&&field_classPrivateFieldSet(_e,this,field_classPrivateFieldGet(Re,this)[_classPrivateGetter(Ze,this,_get_checkedIndex)]);const t=e.name,i=field_classPrivateFieldGet(_e,this).get(t);if(!i)return!1;for(const e of i)try{field_classPrivateFieldGet(ke,this).call(this,e)}catch(e){field_classPrivateFieldGet($e,this).call(this,serializeError(e,`Error when executing "${t}" for field "${field_classPrivateFieldGet(Ee,this)}"\\n`))}return!0}(()=>{Object.assign(ue,{getComputedValue:e=>field_classPrivateFieldGet(Be,e)??field_classPrivateFieldGet(Xe,e),getHasValue:e=>field_classPrivateFieldGet(Te,e),getInitialValue:e=>field_classPrivateFieldGet(Ae,e)&&field_classPrivateFieldGet(Be,e)||null,getIsChoice:e=>field_classPrivateFieldGet(Oe,e),getKidIds:e=>field_classPrivateFieldGet(xe,e),getPageActions:e=>field_assertClassBrand(Ze,e,_getPageActions).call(e),getValue:e=>field_classPrivateFieldGet(Xe,e),setValue:(e,t)=>field_assertClassBrand(Ze,e,_setValue).call(e,t),prepareEvent(e,t,i){if(field_classPrivateFieldGet(Ne,e)){field_classPrivateFieldSet(Ee,e,t);i.value=field_classPrivateFieldGet(We,e)&&!i.value?"Off":e.exportValues[_classPrivateGetter(Ze,e,_get_checkedIndex)];"Action"===i.name&&field_classPrivateFieldSet(Xe,e,i.value)}},runActions:(e,t)=>field_assertClassBrand(Ze,e,_runActions).call(e,t),send:(e,t)=>field_assertClassBrand(Ze,e,_sendToView).call(e,t)});for(const e of ve)Object.defineProperty(he.prototype,e,{get(){return field_classPrivateFieldGet(qe,this)[e]},set(t){field_classPrivateFieldGet(qe,this)[e]=t;field_assertClassBrand(Ze,this,_update).call(this,e,t)},configurable:!0});for(const[e,{value:t}]of Object.entries(Object.getOwnPropertyDescriptors(he.prototype)))"constructor"!==e&&"function"==typeof t&&Object.defineProperty(he.prototype,e,{writable:!1})})();function print_params_defineProperty(e,t,i){return(t=function print_params_toPropertyKey(e){var t=function print_params_toPrimitive(e,t){if("object"!=typeof e||!e)return e;var i;if("undefined"!=typeof Symbol&&void 0!==(i=e[Symbol.toPrimitive])){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class PrintParams{constructor(e){print_params_defineProperty(this,"binaryOk",!0);print_params_defineProperty(this,"bitmapDPI",150);print_params_defineProperty(this,"booklet",{binding:0,duplexMode:0,subsetFrom:0,subsetTo:-1});print_params_defineProperty(this,"colorOverride",0);print_params_defineProperty(this,"colorProfile","");print_params_defineProperty(this,"constants",Object.freeze({bookletBindings:Object.freeze({Left:0,Right:1,LeftTall:2,RightTall:3}),bookletDuplexMode:Object.freeze({BothSides:0,FrontSideOnly:1,BasicSideOnly:2}),colorOverrides:Object.freeze({auto:0,gray:1,mono:2}),fontPolicies:Object.freeze({everyPage:0,jobStart:1,pageRange:2}),handling:Object.freeze({none:0,fit:1,shrink:2,tileAll:3,tileLarge:4,nUp:5,booklet:6}),interactionLevel:Object.freeze({automatic:0,full:1,silent:2}),nUpPageOrders:Object.freeze({Horizontal:0,HorizontalReversed:1,Vertical:2}),printContents:Object.freeze({doc:0,docAndComments:1,formFieldsOnly:2}),flagValues:Object.freeze({applyOverPrint:1,applySoftProofSettings:2,applyWorkingColorSpaces:4,emitHalftones:8,emitPostScriptXObjects:16,emitFormsAsPSForms:32,maxJP2KRes:64,setPageSize:128,suppressBG:256,suppressCenter:512,suppressCJKFontSubst:1024,suppressCropClip:2048,suppressRotate:4096,suppressTransfer:8192,suppressUCR:16384,useTrapAnnots:32768,usePrintersMarks:65536}),rasterFlagValues:Object.freeze({textToOutline:1,strokesToOutline:2,allowComplexClip:4,preserveOverprint:8}),subsets:Object.freeze({all:0,even:1,odd:2}),tileMarks:Object.freeze({none:0,west:1,east:2}),usages:Object.freeze({auto:0,use:1,noUse:2})}));print_params_defineProperty(this,"downloadFarEastFonts",!1);print_params_defineProperty(this,"fileName","");print_params_defineProperty(this,"firstPage",0);print_params_defineProperty(this,"flags",0);print_params_defineProperty(this,"fontPolicy",0);print_params_defineProperty(this,"gradientDPI",150);print_params_defineProperty(this,"interactive",1);print_params_defineProperty(this,"npUpAutoRotate",!1);print_params_defineProperty(this,"npUpNumPagesH",2);print_params_defineProperty(this,"npUpNumPagesV",2);print_params_defineProperty(this,"npUpPageBorder",!1);print_params_defineProperty(this,"npUpPageOrder",0);print_params_defineProperty(this,"pageHandling",0);print_params_defineProperty(this,"pageSubset",0);print_params_defineProperty(this,"printAsImage",!1);print_params_defineProperty(this,"printContent",0);print_params_defineProperty(this,"printerName","");print_params_defineProperty(this,"psLevel",0);print_params_defineProperty(this,"rasterFlags",0);print_params_defineProperty(this,"reversePages",!1);print_params_defineProperty(this,"tileLabel",!1);print_params_defineProperty(this,"tileMark",0);print_params_defineProperty(this,"tileOverlap",0);print_params_defineProperty(this,"tileScale",1);print_params_defineProperty(this,"transparencyLevel",75);print_params_defineProperty(this,"usePrinterCRD",0);print_params_defineProperty(this,"useT1Conversion",0);this.lastPage=e.lastPage}}function doc_classPrivateFieldInitSpec(e,t,i){doc_checkPrivateRedeclaration(e,t),t.set(e,i)}function doc_checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function doc_classPrivateFieldGet(e,t){return e.get(doc_assertClassBrand(e,t))}function doc_classPrivateFieldSet(e,t,i){return e.set(doc_assertClassBrand(e,t),i),i}function doc_assertClassBrand(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}class InfoProxyHandler{static get(e,t){return e[t.toLowerCase()]}static set(e,t,i){throw new Error(`doc.info.${t} is read-only`)}}const Je=Object.create(null);var Qe=new WeakMap,et=new WeakMap,tt=new WeakMap,it=new WeakMap,st=new WeakMap,at=new WeakMap,rt=new WeakMap,lt=new WeakMap,nt=new WeakMap,ot=new WeakMap,ct=new WeakMap,dt=new WeakMap,ht=new WeakMap,ut=new WeakMap,pt=new WeakMap,vt=new WeakMap,_t=new WeakMap,ft=new WeakMap,Pt=new WeakMap,Ft=new WeakMap,mt=new WeakMap,gt=new WeakMap,St=new WeakMap,yt=new WeakMap,wt=new WeakMap,bt=new WeakMap,Gt=new WeakMap,It=new WeakMap,Ct=new WeakMap,Mt=new WeakMap,kt=new WeakMap,At=new WeakMap,Tt=new WeakMap,Et=new WeakMap,Wt=new WeakMap,Ot=new WeakMap,Dt=new WeakMap,xt=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,jt=new WeakMap,Rt=new WeakSet;class Doc{constructor(e){!function doc_classPrivateMethodInitSpec(e,t){doc_checkPrivateRedeclaration(e,t),t.add(e)}(this,Rt);doc_classPrivateFieldInitSpec(this,Qe,null);doc_classPrivateFieldInitSpec(this,et,null);doc_classPrivateFieldInitSpec(this,tt,void 0);doc_classPrivateFieldInitSpec(this,it,!0);doc_classPrivateFieldInitSpec(this,st,!1);doc_classPrivateFieldInitSpec(this,at,!1);doc_classPrivateFieldInitSpec(this,rt,!1);doc_classPrivateFieldInitSpec(this,lt,void 0);doc_classPrivateFieldInitSpec(this,nt,void 0);doc_classPrivateFieldInitSpec(this,ot,void 0);doc_classPrivateFieldInitSpec(this,ct,void 0);doc_classPrivateFieldInitSpec(this,dt,[]);doc_classPrivateFieldInitSpec(this,ht,[]);doc_classPrivateFieldInitSpec(this,ut,void 0);doc_classPrivateFieldInitSpec(this,pt,new Map);doc_classPrivateFieldInitSpec(this,vt,[]);doc_classPrivateFieldInitSpec(this,_t,void 0);doc_classPrivateFieldInitSpec(this,ft,void 0);doc_classPrivateFieldInitSpec(this,Pt,void 0);doc_classPrivateFieldInitSpec(this,Ft,void 0);doc_classPrivateFieldInitSpec(this,mt,void 0);doc_classPrivateFieldInitSpec(this,gt,void 0);doc_classPrivateFieldInitSpec(this,St,void 0);doc_classPrivateFieldInitSpec(this,yt,void 0);doc_classPrivateFieldInitSpec(this,wt,void 0);doc_classPrivateFieldInitSpec(this,bt,void 0);doc_classPrivateFieldInitSpec(this,Gt,void 0);doc_classPrivateFieldInitSpec(this,It,void 0);doc_classPrivateFieldInitSpec(this,Ct,void 0);doc_classPrivateFieldInitSpec(this,Mt,void 0);doc_classPrivateFieldInitSpec(this,kt,void 0);doc_classPrivateFieldInitSpec(this,At,void 0);doc_classPrivateFieldInitSpec(this,Tt,void 0);doc_classPrivateFieldInitSpec(this,Et,p.none);doc_classPrivateFieldInitSpec(this,Wt,void 0);doc_classPrivateFieldInitSpec(this,Ot,void 0);doc_classPrivateFieldInitSpec(this,Dt,void 0);doc_classPrivateFieldInitSpec(this,xt,void 0);doc_classPrivateFieldInitSpec(this,Bt,void 0);doc_classPrivateFieldInitSpec(this,Vt,void 0);doc_classPrivateFieldInitSpec(this,jt,void 0);doc_classPrivateFieldSet(tt,this,e.baseURL||"");doc_classPrivateFieldSet(nt,this,e.metadata||"");doc_classPrivateFieldSet(_t,this,e.Author||"");doc_classPrivateFieldSet(ft,this,e.Creator||"");doc_classPrivateFieldSet(Pt,this,doc_assertClassBrand(Rt,this,_getDate).call(this,e.CreationDate)||null);doc_classPrivateFieldSet(Ft,this,e.docID||["",""]);doc_classPrivateFieldSet(mt,this,e.filename||"");doc_classPrivateFieldSet(gt,this,e.filesize||0);doc_classPrivateFieldSet(St,this,e.Keywords||"");doc_classPrivateFieldSet(yt,this,e.layout||"");doc_classPrivateFieldSet(wt,this,doc_assertClassBrand(Rt,this,_getDate).call(this,e.ModDate)||null);doc_classPrivateFieldSet(bt,this,e.numPages||1);doc_classPrivateFieldSet(Gt,this,e.pageNum||0);doc_classPrivateFieldSet(It,this,e.Producer||"");doc_classPrivateFieldSet(Ct,this,e.EncryptFilterName||null);doc_classPrivateFieldSet(Mt,this,e.Subject||"");doc_classPrivateFieldSet(kt,this,e.Title||"");doc_classPrivateFieldSet(At,this,e.URL||"");doc_classPrivateFieldSet(Tt,this,new Proxy(Object.assign(Object.create(null),{title:doc_classPrivateFieldGet(kt,this),author:doc_classPrivateFieldGet(_t,this),authors:e.authors||[doc_classPrivateFieldGet(_t,this)],subject:doc_classPrivateFieldGet(Mt,this),keywords:doc_classPrivateFieldGet(St,this),creator:doc_classPrivateFieldGet(ft,this),producer:doc_classPrivateFieldGet(It,this),creationdate:doc_classPrivateFieldGet(Pt,this),moddate:doc_classPrivateFieldGet(wt,this),trapped:e.Trapped||"Unknown"}),InfoProxyHandler));doc_classPrivateFieldSet(Wt,this,e.zoom||100);doc_classPrivateFieldSet(Ot,this,createMap(e.actions));doc_classPrivateFieldSet(Dt,this,e.appObjects);doc_classPrivateFieldSet(jt,this,e.calculateNow);doc_classPrivateFieldSet(xt,this,e.globalEval);doc_classPrivateFieldSet(Bt,this,e.send);doc_classPrivateFieldSet(Vt,this,e.userActivationData);doc_classPrivateFieldSet(ut,this,exposeObject(new PrintParams({lastPage:doc_classPrivateFieldGet(bt,this)-1}),!0))}get author(){return doc_classPrivateFieldGet(_t,this)}set author(e){throw new Error("doc.author is read-only")}get baseURL(){return doc_classPrivateFieldGet(tt,this)}set baseURL(e){doc_classPrivateFieldSet(tt,this,e)}get bookmarkRoot(){}set bookmarkRoot(e){throw new Error("doc.bookmarkRoot is read-only")}get calculate(){return doc_classPrivateFieldGet(it,this)}set calculate(e){doc_classPrivateFieldSet(it,this,e)}get creator(){return doc_classPrivateFieldGet(ft,this)}set creator(e){throw new Error("doc.creator is read-only")}get dataObjects(){return[]}set dataObjects(e){throw new Error("doc.dataObjects is read-only")}get delay(){return doc_classPrivateFieldGet(st,this)}set delay(e){doc_classPrivateFieldSet(st,this,e)}get dirty(){return doc_classPrivateFieldGet(at,this)}set dirty(e){doc_classPrivateFieldSet(at,this,e)}get disclosed(){return doc_classPrivateFieldGet(rt,this)}set disclosed(e){doc_classPrivateFieldSet(rt,this,e)}get docID(){return doc_classPrivateFieldGet(Ft,this)}set docID(e){throw new Error("doc.docID is read-only")}get documentFileName(){return doc_classPrivateFieldGet(mt,this)}set documentFileName(e){throw new Error("doc.documentFileName is read-only")}get dynamicXFAForm(){return!1}set dynamicXFAForm(e){throw new Error("doc.dynamicXFAForm is read-only")}get external(){return false}set external(e){throw new Error("doc.external is read-only")}get filesize(){return doc_classPrivateFieldGet(gt,this)}set filesize(e){throw new Error("doc.filesize is read-only")}get hidden(){return!1}set hidden(e){throw new Error("doc.hidden is read-only")}get hostContainer(){}set hostContainer(e){throw new Error("doc.hostContainer is read-only")}get icons(){}set icons(e){throw new Error("doc.icons is read-only")}get info(){return doc_classPrivateFieldGet(Tt,this)}set info(e){throw new Error("doc.info is read-only")}get innerAppWindowRect(){return[0,0,0,0]}set innerAppWindowRect(e){throw new Error("doc.innerAppWindowRect is read-only")}get innerDocWindowRect(){return[0,0,0,0]}set innerDocWindowRect(e){throw new Error("doc.innerDocWindowRect is read-only")}get isModal(){return!1}set isModal(e){throw new Error("doc.isModal is read-only")}get keywords(){return doc_classPrivateFieldGet(St,this)}set keywords(e){throw new Error("doc.keywords is read-only")}get layout(){return doc_classPrivateFieldGet(yt,this)}set layout(e){if(doc_classPrivateFieldGet(Vt,this).userActivation){doc_classPrivateFieldGet(Vt,this).userActivation=!1;if("string"==typeof e){"SinglePage"!==e&&"OneColumn"!==e&&"TwoColumnLeft"!==e&&"TwoPageLeft"!==e&&"TwoColumnRight"!==e&&"TwoPageRight"!==e&&(e="SinglePage");doc_classPrivateFieldGet(Bt,this).call(this,{command:"layout",value:e});doc_classPrivateFieldSet(yt,this,e)}}}get media(){return doc_classPrivateFieldGet(lt,this)}set media(e){doc_classPrivateFieldSet(lt,this,e)}get metadata(){return doc_classPrivateFieldGet(nt,this)}set metadata(e){doc_classPrivateFieldSet(nt,this,e)}get modDate(){return doc_classPrivateFieldGet(wt,this)}set modDate(e){throw new Error("doc.modDate is read-only")}get mouseX(){return 0}set mouseX(e){throw new Error("doc.mouseX is read-only")}get mouseY(){return 0}set mouseY(e){throw new Error("doc.mouseY is read-only")}get noautocomplete(){return doc_classPrivateFieldGet(ot,this)}set noautocomplete(e){doc_classPrivateFieldSet(ot,this,e)}get nocache(){return doc_classPrivateFieldGet(ct,this)}set nocache(e){doc_classPrivateFieldSet(ct,this,e)}get numFields(){return doc_classPrivateFieldGet(vt,this).length}set numFields(e){throw new Error("doc.numFields is read-only")}get numPages(){return doc_classPrivateFieldGet(bt,this)}set numPages(e){throw new Error("doc.numPages is read-only")}get numTemplates(){return 0}set numTemplates(e){throw new Error("doc.numTemplates is read-only")}get outerAppWindowRect(){return[0,0,0,0]}set outerAppWindowRect(e){throw new Error("doc.outerAppWindowRect is read-only")}get outerDocWindowRect(){return[0,0,0,0]}set outerDocWindowRect(e){throw new Error("doc.outerDocWindowRect is read-only")}get pageNum(){return doc_classPrivateFieldGet(Gt,this)}set pageNum(e){if(doc_classPrivateFieldGet(Vt,this).userActivation){doc_classPrivateFieldGet(Vt,this).userActivation=!1;if(!("number"!=typeof e||e<0||e>=doc_classPrivateFieldGet(bt,this))){doc_classPrivateFieldGet(Bt,this).call(this,{command:"page-num",value:e});doc_classPrivateFieldSet(Gt,this,e)}}}get pageWindowRect(){return[0,0,0,0]}set pageWindowRect(e){throw new Error("doc.pageWindowRect is read-only")}get path(){return""}set path(e){throw new Error("doc.path is read-only")}get permStatusReady(){return!0}set permStatusReady(e){throw new Error("doc.permStatusReady is read-only")}get producer(){return doc_classPrivateFieldGet(It,this)}set producer(e){throw new Error("doc.producer is read-only")}get requiresFullSave(){return!1}set requiresFullSave(e){throw new Error("doc.requiresFullSave is read-only")}get securityHandler(){return doc_classPrivateFieldGet(Ct,this)}set securityHandler(e){throw new Error("doc.securityHandler is read-only")}get selectedAnnots(){return[]}set selectedAnnots(e){throw new Error("doc.selectedAnnots is read-only")}get sounds(){return[]}set sounds(e){throw new Error("doc.sounds is read-only")}get spellDictionaryOrder(){return doc_classPrivateFieldGet(dt,this)}set spellDictionaryOrder(e){doc_classPrivateFieldSet(dt,this,e)}get spellLanguageOrder(){return doc_classPrivateFieldGet(ht,this)}set spellLanguageOrder(e){doc_classPrivateFieldSet(ht,this,e)}get subject(){return doc_classPrivateFieldGet(Mt,this)}set subject(e){throw new Error("doc.subject is read-only")}get templates(){return[]}set templates(e){throw new Error("doc.templates is read-only")}get title(){return doc_classPrivateFieldGet(kt,this)}set title(e){throw new Error("doc.title is read-only")}get URL(){return doc_classPrivateFieldGet(At,this)}set URL(e){throw new Error("doc.URL is read-only")}get viewState(){}set viewState(e){throw new Error("doc.viewState is read-only")}get xfa(){}set xfa(e){throw new Error("doc.xfa is read-only")}get XFAForeground(){return!1}set XFAForeground(e){throw new Error("doc.XFAForeground is read-only")}get zoomType(){return doc_classPrivateFieldGet(Et,this)}set zoomType(e){if(doc_classPrivateFieldGet(Vt,this).userActivation){doc_classPrivateFieldGet(Vt,this).userActivation=!1;if("string"==typeof e){switch(e){case p.none:doc_classPrivateFieldGet(Bt,this).call(this,{command:"zoom",value:1});break;case p.fitP:doc_classPrivateFieldGet(Bt,this).call(this,{command:"zoom",value:"page-fit"});break;case p.fitW:doc_classPrivateFieldGet(Bt,this).call(this,{command:"zoom",value:"page-width"});break;case p.fitH:doc_classPrivateFieldGet(Bt,this).call(this,{command:"zoom",value:"page-height"});break;case p.fitV:doc_classPrivateFieldGet(Bt,this).call(this,{command:"zoom",value:"auto"});break;case p.pref:case p.refW:break;default:return}doc_classPrivateFieldSet(Et,this,e)}}}get zoom(){return doc_classPrivateFieldGet(Wt,this)}set zoom(e){if(doc_classPrivateFieldGet(Vt,this).userActivation){doc_classPrivateFieldGet(Vt,this).userActivation=!1;"number"!=typeof e||e<8.33||e>6400||doc_classPrivateFieldGet(Bt,this).call(this,{command:"zoom",value:e/100})}}addAnnot(){}addField(){}addIcon(){}addLink(){}addRecipientListCryptFilter(){}addRequirement(){}addScript(){}addThumbnails(){}addWatermarkFromFile(){}addWatermarkFromText(){}addWeblinks(){}bringToFront(){}calculateNow(){doc_classPrivateFieldGet(jt,this).call(this)}closeDoc(){}colorConvertPage(){}createDataObject(){}createTemplate(){}deletePages(){}deleteSound(){}embedDocAsDataObject(){}embedOutputIntent(){}encryptForRecipients(){}encryptUsingPolicy(){}exportAsFDF(){}exportAsFDFStr(){}exportAsText(){}exportAsXFDF(){}exportAsXFDFStr(){}exportDataObject(){}exportXFAData(){}extractPages(){}flattenPages(){}getAnnot(){}getAnnots(){}getAnnot3D(){}getAnnots3D(){}getColorConvertAction(){}getDataObject(){}getDataObjectContents(){}getField(e){e&&"object"==typeof e&&(e=e.cName);if("string"!=typeof e)throw new TypeError("Invalid field name: must be a string");const t=doc_classPrivateFieldGet(pt,this).get(e);if(t)return t;const i=e.split("#");let s=NaN;if(2===i.length){s=Math.floor(parseFloat(i[1]));e=i[0]}for(const[t,i]of doc_classPrivateFieldGet(pt,this))if(t.endsWith(e)){if(!isNaN(s)){const i=doc_assertClassBrand(Rt,this,_getChildren).call(this,t);(s<0||s>=i.length)&&(s=0);if(s<i.length){doc_classPrivateFieldGet(pt,this).set(e,i[s]);return i[s]}}doc_classPrivateFieldGet(pt,this).set(e,i);return i}return null}getIcon(){}getLegalWarnings(){}getLinks(){}getNthFieldName(e){e&&"object"==typeof e&&(e=e.nIndex);if("number"!=typeof e)throw new TypeError("Invalid field index: must be a number");return e>=0&&e<this.numFields?doc_classPrivateFieldGet(vt,this)[Math.trunc(e)]:null}getNthTemplate(){return null}getOCGs(){}getOCGOrder(){}getPageBox(){}getPageLabel(){}getPageNthWord(){}getPageNthWordQuads(){}getPageNumWords(){}getPageRotation(){}getPageTransition(){}getPrintParams(){return doc_classPrivateFieldGet(ut,this)}getSound(){}getTemplate(){}getURL(){}gotoNamedDest(){}importAnFDF(){}importAnXFDF(){}importDataObject(){}importIcon(){}importSound(){}importTextData(){}importXFAData(){}insertPages(){}mailDoc(){}mailForm(){}movePage(){}newPage(){}openDataObject(){}print(e=!0,t=0,i=-1,s=!1,a=!1,r=!1,l=!1,n=!0,o=null){if(!doc_classPrivateFieldGet(Vt,this).disablePrinting&&doc_classPrivateFieldGet(Vt,this).userActivation){doc_classPrivateFieldGet(Vt,this).userActivation=!1;if(e&&"object"==typeof e){t=e.nStart;i=e.nEnd;e.bSilent;e.bShrinkToFit;e.bPrintAsImage;e.bReverse;e.bAnnotations;o=e.printParams;e=e.bUI}if(o){t=o.firstPage;i=o.lastPage}t="number"==typeof t?Math.max(0,Math.trunc(t)):0;i="number"==typeof i?Math.max(0,Math.trunc(i)):-1;doc_classPrivateFieldGet(Bt,this).call(this,{command:"print",start:t,end:i})}}removeDataObject(){}removeField(){}removeIcon(){}removeLinks(){}removeRequirement(){}removeScript(){}removeTemplate(){}removeThumbnails(){}removeWeblinks(){}replacePages(){}resetForm(e=null){e&&"object"==typeof e&&!Array.isArray(e)&&(e=e.aFields);e&&!Array.isArray(e)&&(e=[e]);let t,i=!1;if(e){t=new Set;for(const s of e){if(!s)continue;if("string"!=typeof s){t=null;break}const e=this.getField(s);if(e){t.add(e);i=!0}}}if(t)for(const e of t)for(const i of ue.getKidIds(e)||[]){const e=doc_classPrivateFieldGet(Dt,this)[i];e&&t.add(e)}else{t=doc_classPrivateFieldGet(pt,this).values();i=0!==doc_classPrivateFieldGet(pt,this).size}for(const e of t){ue.setValue(e,e.defaultValue);ue.send(e,{value:e.defaultValue,formattedValue:null,selRange:[0,0]})}i&&this.calculateNow()}saveAs(){}scroll(){}selectPageNthWord(){}setAction(){}setDataObjectContents(){}setOCGOrder(){}setPageAction(){}setPageBoxes(){}setPageLabels(){}setPageRotations(){}setPageTabOrder(){}setPageTransitions(){}spawnPageFromTemplate(){}submitForm(){}syncAnnotScan(){}}function _initActions(){for(const e of doc_classPrivateFieldGet(pt,this).values()){const t=ue.getInitialValue(e);t&&ue.send(e,{value:t,formattedValue:ue.getValue(e).toString()})}const e=new Set(["WillClose","WillSave","DidSave","WillPrint","DidPrint","OpenAction"]);doc_classPrivateFieldGet(Vt,this).disableSaving=!0;for(const t of doc_classPrivateFieldGet(Ot,this).keys())e.has(t)||doc_assertClassBrand(Rt,this,doc_runActions).call(this,t);doc_classPrivateFieldGet(Vt,this).disableSaving=!1}function _dispatchDocEvent(e){switch(e){case"Open":doc_classPrivateFieldGet(Vt,this).disableSaving=!0;doc_assertClassBrand(Rt,this,doc_runActions).call(this,"OpenAction");doc_classPrivateFieldGet(Vt,this).disableSaving=!1;break;case"WillPrint":doc_classPrivateFieldGet(Vt,this).disablePrinting=!0;try{doc_assertClassBrand(Rt,this,doc_runActions).call(this,e)}catch(e){doc_classPrivateFieldGet(Bt,this).call(this,serializeError(e))}doc_classPrivateFieldGet(Bt,this).call(this,{command:"WillPrintFinished"});doc_classPrivateFieldGet(Vt,this).disablePrinting=!1;break;case"WillSave":doc_classPrivateFieldGet(Vt,this).disableSaving=!0;try{doc_assertClassBrand(Rt,this,doc_runActions).call(this,e)}catch(e){doc_classPrivateFieldGet(Bt,this).call(this,serializeError(e))}doc_classPrivateFieldGet(Bt,this).call(this,{command:"WillSaveFinished"});doc_classPrivateFieldGet(Vt,this).disableSaving=!1;break;default:doc_assertClassBrand(Rt,this,doc_runActions).call(this,e)}}function _dispatchPageEvent(e,t,i){if("PageOpen"===e){doc_classPrivateFieldGet(Qe,this)??doc_classPrivateFieldSet(Qe,this,new Map);doc_classPrivateFieldGet(Qe,this).getOrInsertComputed(i,()=>createMap(t));doc_classPrivateFieldSet(Gt,this,i-1)}for(const s of[doc_classPrivateFieldGet(Qe,this),doc_classPrivateFieldGet(et,this)]){t=s?.get(i)?.get(e);if(t)for(const e of t)doc_classPrivateFieldGet(xt,this).call(this,e)}}function doc_runActions(e){const t=doc_classPrivateFieldGet(Ot,this).get(e);if(t)for(const i of t)try{doc_classPrivateFieldGet(xt,this).call(this,i)}catch(t){doc_classPrivateFieldGet(Bt,this).call(this,serializeError(t,`Error when executing "${e}" for document\\n`))}}function _addField(e,t){doc_classPrivateFieldGet(pt,this).set(e,t);doc_classPrivateFieldGet(vt,this).push(e);for(const[e,i,s]of ue.getPageActions(t)){doc_classPrivateFieldGet(et,this)??doc_classPrivateFieldSet(et,this,new Map);doc_classPrivateFieldGet(et,this).getOrInsertComputed(e+1,makeMap).getOrInsertComputed(i,makeArr).push(...s)}}function _getDate(e){if(!e||e.length<15||!e.startsWith("D:"))return e;const t=(e=e.substring(2)).substring(0,4),i=e.substring(4,6),s=e.substring(6,8),a=e.substring(8,10),r=e.substring(10,12),l=e.charAt(12);let n,o;if("Z"===l||"+"===l||"-"===l){n="00";o=12}else{n=e.substring(12,14);o=14}const c=e.substring(o).replaceAll("\'","");return new Date(`${t}-${i}-${s}T${a}:${r}:${n}${c}`)}function _getChildren(e){const t=e.length,i=[],s=/^\\.[^.]+$/;for(const[a,r]of doc_classPrivateFieldGet(pt,this))if(a.startsWith(e)){const e=a.slice(t);s.test(e)&&i.push(r)}return i}function doc_getTerminalChildren(e){const t=[],i=e.length;for(const[s,a]of doc_classPrivateFieldGet(pt,this))if(s.startsWith(e)){const e=s.slice(i);ue.getHasValue(a)&&(""===e||e.startsWith("."))&&t.push(a)}return t}Object.assign(Je,{addField:(e,t,i)=>doc_assertClassBrand(Rt,e,_addField).call(e,t,i),dispatchDocEvent:(e,t)=>doc_assertClassBrand(Rt,e,_dispatchDocEvent).call(e,t),dispatchPageEvent:(e,t,i,s)=>doc_assertClassBrand(Rt,e,_dispatchPageEvent).call(e,t,i,s),getTerminalChildren:(e,t)=>doc_assertClassBrand(Rt,e,doc_getTerminalChildren).call(e,t),initActions:e=>doc_assertClassBrand(Rt,e,_initActions).call(e)});function event_classPrivateFieldInitSpec(e,t,i){event_checkPrivateRedeclaration(e,t),t.set(e,i)}function event_checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function event_classPrivateFieldGet(e,t){return e.get(event_assertClassBrand(e,t))}function event_classPrivateFieldSet(e,t,i){return e.set(event_assertClassBrand(e,t),i),i}function event_assertClassBrand(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}const{values:Nt}=Object,Ht=Object.create(Object.prototype,{[Symbol.toStringTag]:{value:"Event"}});function createEvent(e){return{__proto__:Ht,change:e.change||"",changeEx:e.changeEx||null,commitKey:e.commitKey||0,fieldFull:e.fieldFull||!1,keyDown:e.keyDown||!1,modifier:e.modifier||!1,name:e.name,rc:!0,richChange:e.richChange||[],richChangeEx:e.richChangeEx||[],richValue:e.richValue||[],selEnd:e.selEnd??-1,selStart:e.selStart??-1,shift:e.shift||!1,source:e.source||null,target:e.target||null,targetName:"",type:"Field",value:e.value||"",willCommit:e.willCommit||!1}}function mergeChange(e){let t=e.value;if(Array.isArray(t))return t;"string"!=typeof t&&(t=t.toString());const i=e.selStart>=0?t.substring(0,e.selStart):"",s=e.selEnd>=0&&e.selEnd<=t.length?t.substring(e.selEnd):"";return`${i}${e.change}${s}`}var zt=new WeakMap,Lt=new WeakMap,$t=new WeakMap,Kt=new WeakMap,Ut=new WeakMap,Yt=new WeakMap,Xt=new WeakSet;class EventDispatcher{constructor(e,t,i,s,a){!function event_classPrivateMethodInitSpec(e,t){event_checkPrivateRedeclaration(e,t),t.add(e)}(this,Xt);event_classPrivateFieldInitSpec(this,zt,void 0);event_classPrivateFieldInitSpec(this,Lt,void 0);event_classPrivateFieldInitSpec(this,$t,void 0);event_classPrivateFieldInitSpec(this,Kt,!1);event_classPrivateFieldInitSpec(this,Ut,void 0);event_classPrivateFieldInitSpec(this,Yt,void 0);event_classPrivateFieldSet(Lt,this,e);event_classPrivateFieldSet(zt,this,t);event_classPrivateFieldSet(Ut,this,i);event_classPrivateFieldSet($t,this,s);event_classPrivateFieldSet(Yt,this,a)}dispatch(e){const t=e.id;if(!(t in event_classPrivateFieldGet(Ut,this))){let i;if("doc"===t||"page"===t){i=globalThis.event=createEvent(e);i.source=i.target=globalThis}if("doc"===t){const e=i.name;if("Open"===e){event_assertClassBrand(Xt,this,_userActivation).call(this);Je.initActions(event_classPrivateFieldGet(Lt,this));event_assertClassBrand(Xt,this,_formatAll).call(this)}["DidPrint","DidSave","WillPrint","WillSave"].includes(e)||event_assertClassBrand(Xt,this,_userActivation).call(this);Je.dispatchDocEvent(event_classPrivateFieldGet(Lt,this),i.name)}else if("page"===t){event_assertClassBrand(Xt,this,_userActivation).call(this);Je.dispatchPageEvent(event_classPrivateFieldGet(Lt,this),i.name,e.actions,e.pageNumber)}else if("app"===t&&"ResetForm"===e.name){event_assertClassBrand(Xt,this,_userActivation).call(this);for(const t of e.ids){const e=event_classPrivateFieldGet(Ut,this)[t];e&&ue.setValue(e,e.defaultValue)}}return}const i=e.name,s=event_classPrivateFieldGet(Ut,this)[t],a=globalThis.event=createEvent(e);let r;event_assertClassBrand(Xt,this,_userActivation).call(this);ue.prepareEvent(s,t,a);switch(i){case"Keystroke":r={value:a.value,changeEx:a.changeEx,change:a.change,selStart:a.selStart,selEnd:a.selEnd};break;case"Blur":case"Focus":Object.defineProperty(a,"value",{configurable:!1,writable:!1,enumerable:!0,value:a.value});break;case"Validate":event_assertClassBrand(Xt,this,_runValidation).call(this,s,a);return;case"Action":event_assertClassBrand(Xt,this,event_runActions).call(this,s,s,a,i);event_assertClassBrand(Xt,this,_runCalculate).call(this,s,a);return}event_assertClassBrand(Xt,this,event_runActions).call(this,s,s,a,i);if("Keystroke"===i)if(a.rc)if(a.willCommit)event_assertClassBrand(Xt,this,_runValidation).call(this,s,a);else{if(ue.getIsChoice(s)){ue.setValue(s,r.changeEx);ue.send(s,{value:ue.getValue(s)});return}const e=mergeChange(a);ue.setValue(s,e);let t,i;if(a.selStart!==r.selStart||a.selEnd!==r.selEnd){t=a.selStart;i=a.selEnd}else i=t=r.selStart+a.change.length;ue.send(s,{value:e,selRange:[t,i]})}else a.willCommit?ue.send(s,{value:"",formattedValue:null,selRange:[0,0]}):ue.send(s,{value:r.value,selRange:[r.selStart,r.selEnd]})}calculateNow(){if(!event_classPrivateFieldGet(zt,this)||event_classPrivateFieldGet(Kt,this)||!event_classPrivateFieldGet(Lt,this).calculate)return;event_classPrivateFieldSet(Kt,this,!0);const e=event_classPrivateFieldGet(zt,this)[0],t=event_classPrivateFieldGet(Ut,this)[e];globalThis.event=createEvent({});event_assertClassBrand(Xt,this,_runCalculate).call(this,t,globalThis.event);event_classPrivateFieldSet(Kt,this,!1)}}function _userActivation(){event_classPrivateFieldGet(Yt,this).userActivation=!0;event_classPrivateFieldGet($t,this).call(this,"setTimeout",[0,5e3])}function _formatAll(){const e=globalThis.event=createEvent({});for(const t of Nt(event_classPrivateFieldGet(Ut,this))){e.value=ue.getComputedValue(t);event_assertClassBrand(Xt,this,event_runActions).call(this,t,t,e,"Format")}}function _runValidation(e,t){const i=event_assertClassBrand(Xt,this,event_runActions).call(this,e,e,t,"Validate");if(t.rc){ue.setValue(e,t.value);event_assertClassBrand(Xt,this,_runCalculate).call(this,e,t);const i=t.value=ue.getComputedValue(e),s=event_assertClassBrand(Xt,this,event_runActions).call(this,e,e,t,"Format")?t.value?.toString?.():null;ue.send(e,{value:i,formattedValue:s});t.value=i}else i&&ue.send(e,{value:"",formattedValue:null,selRange:[0,0],focus:!0})}function event_runActions(e,t,i,s){i.source=e;i.target=t;i.name=s;i.targetName=t.name;i.rc=!0;return ue.runActions(t,i)}function _runCalculate(e,t){if(event_classPrivateFieldGet(zt,this)&&event_classPrivateFieldGet(Lt,this).calculate)for(const i of event_classPrivateFieldGet(zt,this)){if(!(i in event_classPrivateFieldGet(Ut,this)))continue;if(!event_classPrivateFieldGet(Lt,this).calculate)break;t.value=null;const s=event_classPrivateFieldGet(Ut,this)[i];let a=ue.getComputedValue(s);event_assertClassBrand(Xt,this,event_runActions).call(this,e,s,t,"Calculate");if(!t.rc)continue;null!==t.value?ue.setValue(s,t.value):t.value=ue.getComputedValue(s);event_assertClassBrand(Xt,this,event_runActions).call(this,s,s,t,"Validate");if(!t.rc){ue.getComputedValue(s)!==a&&(s.value=a);continue}null===t.value&&(t.value=ue.getComputedValue(s));a=ue.getComputedValue(s);const r=event_assertClassBrand(Xt,this,event_runActions).call(this,s,s,t,"Format")?t.value?.toString?.():null;ue.send(s,{value:a,formattedValue:r})}}function aform_classPrivateFieldInitSpec(e,t,i){aform_checkPrivateRedeclaration(e,t),t.set(e,i)}function aform_checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function aform_classPrivateFieldGet(e,t){return e.get(aform_assertClassBrand(e,t))}function aform_classPrivateFieldSet(e,t,i){return e.set(aform_assertClassBrand(e,t),i),i}function aform_assertClassBrand(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}var qt=new WeakMap,Zt=new WeakMap,Jt=new WeakMap,Qt=new WeakMap,ei=new WeakMap,ti=new WeakSet;class AForm{constructor(e,t,i,s){!function aform_classPrivateMethodInitSpec(e,t){aform_checkPrivateRedeclaration(e,t),t.add(e)}(this,ti);aform_classPrivateFieldInitSpec(this,qt,void 0);aform_classPrivateFieldInitSpec(this,Zt,void 0);aform_classPrivateFieldInitSpec(this,Jt,void 0);aform_classPrivateFieldInitSpec(this,Qt,void 0);aform_classPrivateFieldInitSpec(this,ei,new RegExp("^[\\\\w.!#$%&\'*+/=?^`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$"));aform_classPrivateFieldSet(qt,this,e);aform_classPrivateFieldSet(Zt,this,t);aform_classPrivateFieldSet(Jt,this,i);aform_classPrivateFieldSet(Qt,this,s)}AFMergeChange(e=globalThis.event){return e.willCommit?e.value.toString():mergeChange(e)}AFParseDateEx(e,t){return aform_assertClassBrand(ti,this,_parseDate).call(this,t,e)}AFExtractNums(e){if("number"==typeof e)return[e];if(!e||"string"!=typeof e)return null;const t=e.charAt(0);"."!==t&&","!==t||(e=`0${e}`);const i=e.match(/(\\d+)/g);return 0===i.length?null:i}AFMakeNumber(e){if("number"==typeof e)return e;if("string"!=typeof e)return null;e=e.trim().replace(",",".");const t=parseFloat(e);return isNaN(t)||!isFinite(t)?null:t}AFMakeArrayFromList(e){return"string"==typeof e?e.split(/, ?/g):e}AFNumber_Format(e,t,i,s,a,r){const l=globalThis.event;let n=this.AFMakeNumber(l.value);if(null===n){l.value="";return}const o=Math.sign(n),c=[];let d=!1;-1===o&&r&&0===i&&c.push("-");if((2===i||3===i)&&-1===o){c.push("(");d=!0}r&&c.push(a);t=MathClamp(Math.floor(t),0,4);c.push("%,",t,".",e.toString(),"f");r||c.push(a);d&&c.push(")");1!==i&&3!==i||(l.target.textColor=1===o?aform_classPrivateFieldGet(Qt,this).black:aform_classPrivateFieldGet(Qt,this).red);0===i&&!r||-1!==o||(n=-n);const h=c.join("");l.value=aform_classPrivateFieldGet(Jt,this).printf(h,n)}AFNumber_Keystroke(e,t,i,s,a,r){const l=globalThis.event;let n,o=this.AFMergeChange(l);if(o){o=o.trim();n=t>1?l.willCommit?/^[+-]?(\\d+(,\\d*)?|,\\d+)$/:/^[+-]?\\d*(?:,\\d*)?$/:l.willCommit?/^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)$/:/^[+-]?\\d*(?:\\.\\d*)?$/;if(!n.test(o)){if(l.willCommit){const e=`${v.IDS_INVALID_VALUE} ${aform_assertClassBrand(ti,this,_mkTargetName).call(this,l)}`;aform_classPrivateFieldGet(Zt,this).alert(e)}l.rc=!1}l.willCommit&&t>1&&(l.value=parseFloat(o.replace(",",".")))}}AFPercent_Format(e,t,i=!1){if("number"!=typeof e||"number"!=typeof t)return;if(e<0)throw new Error("Invalid nDec value in AFPercent_Format");const s=globalThis.event;if(e>512){s.value="%";return}e=Math.floor(e);t=MathClamp(Math.floor(t),0,4);let a=this.AFMakeNumber(s.value);if(null===a){s.value="%";return}const r=`%,${t}.${e}f`;a=aform_classPrivateFieldGet(Jt,this).printf(r,100*a);s.value=i?`%${a}`:`${a}%`}AFPercent_Keystroke(e,t){this.AFNumber_Keystroke(e,t,0,0,"",!0)}AFDate_FormatEx(e){const t=globalThis.event,i=t.value;if(!i)return;const s=aform_assertClassBrand(ti,this,_parseDate).call(this,e,i);null!==s&&(t.value=aform_classPrivateFieldGet(Jt,this).printd(e,s))}AFDate_Format(e){this.AFDate_FormatEx(G[e]??e)}AFDate_KeystrokeEx(e){const t=globalThis.event;if(!t.willCommit)return;const i=this.AFMergeChange(t);if(i&&null===aform_assertClassBrand(ti,this,_parseDate).call(this,e,i)){const i=v.IDS_INVALID_DATE,s=v.IDS_INVALID_DATE2,a=`${i} ${aform_assertClassBrand(ti,this,_mkTargetName).call(this,t)}${s}${e}`;aform_classPrivateFieldGet(Zt,this).alert(a);t.rc=!1}}AFDate_Keystroke(e){e>=0&&e<G.length&&this.AFDate_KeystrokeEx(G[e])}AFRange_Validate(e,t,i,s){const a=globalThis.event;if(!a.value)return;const r=this.AFMakeNumber(a.value);if(null===r)return;i=!!i;if((e=!!e)&&null===(t=this.AFMakeNumber(t)))return;if(i&&null===(s=this.AFMakeNumber(s)))return;let l="";e&&i?(r<t||r>s)&&(l=aform_classPrivateFieldGet(Jt,this).printf(v.IDS_GT_AND_LT,t,s)):e?r<t&&(l=aform_classPrivateFieldGet(Jt,this).printf(v.IDS_GREATER_THAN,t)):r>s&&(l=aform_classPrivateFieldGet(Jt,this).printf(v.IDS_LESS_THAN,s));if(l){aform_classPrivateFieldGet(Zt,this).alert(l);a.rc=!1}}AFSimple(e,t,i){const s=this.AFMakeNumber(t);if(null===s)throw new Error("Invalid nValue1 in AFSimple");const a=this.AFMakeNumber(i);if(null===a)throw new Error("Invalid nValue2 in AFSimple");switch(e){case"AVG":return(s+a)/2;case"SUM":return s+a;case"PRD":return s*a;case"MIN":return Math.min(s,a);case"MAX":return Math.max(s,a)}throw new Error("Invalid cFunction in AFSimple")}AFSimple_Calculate(e,t){const i={AVG:e=>Math.sumPrecise(e)/e.length,SUM:e=>Math.sumPrecise(e),PRD:e=>e.reduce((e,t)=>e*t,1),MIN:e=>Math.min(...e),MAX:e=>Math.max(...e)};if(!(e in i))throw new TypeError("Invalid function in AFSimple_Calculate");const s=globalThis.event,a=[];t=this.AFMakeArrayFromList(t);for(const e of t){const t=aform_classPrivateFieldGet(qt,this).getField(e);if(t)for(const e of t.getArray()){const t=this.AFMakeNumber(e.value);a.push(t??0)}}if(0===a.length){s.value=0;return}const r=i[e](a);s.value=Math.round(1e6*r)/1e6}AFSpecial_Format(e){const t=globalThis.event;if(!t.value)return;let i;switch(e=this.AFMakeNumber(e)){case 0:i="99999";break;case 1:i="99999-9999";break;case 2:i=aform_classPrivateFieldGet(Jt,this).printx("9999999999",t.value).length>=10?"(999) 999-9999":"999-9999";break;case 3:i="999-99-9999";break;default:throw new Error("Invalid psf in AFSpecial_Format")}t.value=aform_classPrivateFieldGet(Jt,this).printx(i,t.value)}AFSpecial_KeystrokeEx(e){const t=globalThis.event,i=e.replaceAll(/[^9AOX]/g,"");aform_assertClassBrand(ti,this,_AFSpecial_KeystrokeEx_helper).call(this,i,null,!1);if(!t.rc){t.rc=!0;aform_assertClassBrand(ti,this,_AFSpecial_KeystrokeEx_helper).call(this,e,null,!0)}}AFSpecial_Keystroke(e){const t=globalThis.event;e=this.AFMakeNumber(e);let i,s,a=this.AFMergeChange(t);switch(e){case 0:i="99999";break;case 1:i="99999-9999";break;case 2:i="999-9999";s="(999) 999-9999";break;case 3:i="999-99-9999";break;default:throw new Error("Invalid psf in AFSpecial_Keystroke")}const r=s?[i,s]:[i];for(const e of r){aform_assertClassBrand(ti,this,_AFSpecial_KeystrokeEx_helper).call(this,e,a,!1);if(t.rc)return;t.rc=!0}const l=/[-()\\s]+/g;a=a.replaceAll(l,"");for(const e of r){aform_assertClassBrand(ti,this,_AFSpecial_KeystrokeEx_helper).call(this,e.replaceAll(l,""),a,!1);if(t.rc)return;t.rc=!0}this.AFSpecial_KeystrokeEx((s&&a.match(/\\d/g)||[]).length>7?s:i)}AFTime_FormatEx(e){this.AFDate_FormatEx(e)}AFTime_Format(e){this.AFDate_FormatEx(I[e]??e)}AFTime_KeystrokeEx(e){this.AFDate_KeystrokeEx(e)}AFTime_Keystroke(e){e>=0&&e<I.length&&this.AFDate_KeystrokeEx(I[e])}eMailValidate(e){return aform_classPrivateFieldGet(ei,this).test(e)}AFExactMatch(e,t){return e instanceof RegExp?t.match(e)?.[0]===t||0:e.findIndex(e=>t.match(e)?.[0]===t)+1}}function _mkTargetName(e){return e.target?`[ ${e.target.name} ]`:""}function _parseDate(e,t){let i=null;try{i=aform_classPrivateFieldGet(Jt,this).scand(e,t)}catch{}if(i)return i;i=Date.parse(t);return isNaN(i)?null:new Date(i)}function _AFSpecial_KeystrokeEx_helper(e,t,i){if(!e)return;const s=globalThis.event;t||=this.AFMergeChange(s);if(!t)return;const a=new Map([["9",e=>e>="0"&&e<="9"],["A",e=>"a"<=e&&e<="z"||"A"<=e&&e<="Z"],["O",e=>"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"0"<=e&&e<="9"],["X",e=>!0]]);function _checkValidity(e,t){for(let i=0,s=e.length;i<s;i++){const s=t.charAt(i),r=e.charAt(i),l=a.get(s);if(l){if(!l(r))return!1}else if(s!==r)return!1}return!0}const r=`${v.IDS_INVALID_VALUE} = "${e}"`;if(t.length>e.length){i&&aform_classPrivateFieldGet(Zt,this).alert(r);s.rc=!1}else if(s.willCommit){if(t.length<e.length){i&&aform_classPrivateFieldGet(Zt,this).alert(r);s.rc=!1;return}if(!_checkValidity(t,e)){i&&aform_classPrivateFieldGet(Zt,this).alert(r);s.rc=!1;return}s.value+=e.substring(t.length)}else{t.length<e.length&&(e=e.substring(0,t.length));if(!_checkValidity(t,e)){i&&aform_classPrivateFieldGet(Zt,this).alert(r);s.rc=!1}}}function console_classPrivateFieldInitSpec(e,t,i){(function console_checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,i)}function console_classPrivateFieldGet(e,t){return e.get(console_assertClassBrand(e,t))}function console_assertClassBrand(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}var ii=new WeakMap;class Console{constructor({send:e}){console_classPrivateFieldInitSpec(this,ii,void 0);!function console_classPrivateFieldSet(e,t,i){return e.set(console_assertClassBrand(e,t),i),i}(ii,this,e)}clear(){console_classPrivateFieldGet(ii,this).call(this,{id:"clear"})}hide(){}println(e){if("string"!=typeof e)try{e=JSON.stringify(e)}catch{e=e.toString?.()||"[Unserializable object]"}console_classPrivateFieldGet(ii,this).call(this,{command:"println",value:`PDF.js Console:: ${e}`})}show(){}}function util_defineProperty(e,t,i){return(t=function util_toPropertyKey(e){var t=function util_toPrimitive(e,t){if("object"!=typeof e||!e)return e;var i;if("undefined"!=typeof Symbol&&void 0!==(i=e[Symbol.toPrimitive])){var s=i.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function util_classPrivateFieldInitSpec(e,t,i){util_checkPrivateRedeclaration(e,t),t.set(e,i)}function util_checkPrivateRedeclaration(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function util_classPrivateFieldSet(e,t,i){return e.set(util_assertClassBrand(e,t),i),i}function util_classPrivateFieldGet(e,t){return e.get(util_assertClassBrand(e,t))}function util_assertClassBrand(e,t,i){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:i;throw new TypeError("Private element is not present on this object")}var si=new WeakMap,ai=new WeakMap,ri=new WeakMap,li=new WeakMap,ni=new WeakMap,oi=new WeakMap,ci=new WeakSet;class Util{constructor(){!function util_classPrivateMethodInitSpec(e,t){util_checkPrivateRedeclaration(e,t),t.add(e)}(this,ci);util_classPrivateFieldInitSpec(this,si,util_assertClassBrand(ci,this,_createDateActions).bind(this));util_classPrivateFieldInitSpec(this,ai,util_assertClassBrand(ci,this,_createScandData).bind(this));util_classPrivateFieldInitSpec(this,ri,null);util_classPrivateFieldInitSpec(this,li,null);util_classPrivateFieldInitSpec(this,ni,["January","February","March","April","May","June","July","August","September","October","November","December"]);util_classPrivateFieldInitSpec(this,oi,["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);util_defineProperty(this,"MILLISECONDS_IN_DAY",864e5);util_defineProperty(this,"MILLISECONDS_IN_WEEK",6048e5)}printf(...e){if(0===e.length)throw new Error("Invalid number of params in printf");if("string"!=typeof e[0])throw new TypeError("First argument of printf must be a string");let t=0;return e[0].replaceAll(/%(,[0-4])?([+ 0#]+)?(\\d+)?(\\.\\d+)?(.)/g,function(i,s,a,r,l,n){if("d"!==n&&"f"!==n&&"s"!==n&&"x"!==n){const e=["%"];for(const t of[s,a,r,l,n])t&&e.push(t);return e.join("")}t++;if(t===e.length)throw new Error("Not enough arguments in printf");const o=e[t];if("s"===n)return o.toString();let c=0;if(a)for(const e of a)switch(e){case"+":c|=1;break;case" ":c|=2;break;case"0":c|=4;break;case"#":c|=8}a=c;r&&=parseInt(r);let d=Math.trunc(o);if("x"===n){let e=Math.abs(d).toString(16).toUpperCase();void 0!==r&&(e=e.padStart(r,4&a?"0":" "));8&a&&(e=`0x${e}`);return e}l&&=parseInt(l.substring(1));s=s?s.substring(1):"0";const[h,u]={0:[",","."],1:["","."],2:[".",","],3:["",","],4:["\'","."]}[s];let p="";if("f"===n){p=void 0!==l?Math.abs(o-d).toFixed(l):Math.abs(o-d).toString();if(p.length>2)if(/^1\\.0+$/.test(p)){d+=Math.sign(o);p=`${u}${p.split(".")[1]}`}else p=`${u}${p.substring(2)}`;else{"1"===p&&(d+=Math.sign(o));p=8&a?".":""}}let v="";if(d<0||"f"===n&&o<0){v="-";d=-d}else 1&a?v="+":2&a&&(v=" ");if(h&&d>=1e3){const e=[];for(;;){e.push((d%1e3).toString().padStart(3,"0"));d=Math.trunc(d/1e3);if(d<1e3){e.push(d.toString());break}}d=e.reverse().join(h)}else d=d.toString();let _=`${d}${p}`;void 0!==r&&(_=_.padStart(r-v.length,4&a?"0":" "));return`${v}${_}`})}iconStreamFromIcon(){}printd(e,t){switch(e){case 0:return this.printd("D:yyyymmddHHMMss",t);case 1:return this.printd("yyyy.mm.dd HH:MM:ss",t);case 2:return this.printd("m/d/yy h:MM:ss tt",t)}const i={mmmm:e=>util_classPrivateFieldGet(ni,this)[e.month],mmm:e=>util_classPrivateFieldGet(ni,this)[e.month].substring(0,3),mm:e=>(e.month+1).toString().padStart(2,"0"),m:e=>(e.month+1).toString(),dddd:e=>util_classPrivateFieldGet(oi,this)[e.dayOfWeek],ddd:e=>util_classPrivateFieldGet(oi,this)[e.dayOfWeek].substring(0,3),dd:e=>e.day.toString().padStart(2,"0"),d:e=>e.day.toString(),yyyy:e=>e.year.toString().padStart(4,"0"),yy:e=>(e.year%100).toString().padStart(2,"0"),HH:e=>e.hours.toString().padStart(2,"0"),H:e=>e.hours.toString(),hh:e=>(1+(e.hours+11)%12).toString().padStart(2,"0"),h:e=>(1+(e.hours+11)%12).toString(),MM:e=>e.minutes.toString().padStart(2,"0"),M:e=>e.minutes.toString(),ss:e=>e.seconds.toString().padStart(2,"0"),s:e=>e.seconds.toString(),tt:e=>e.hours<12?"am":"pm",t:e=>e.hours<12?"a":"p"},s={year:t.getFullYear(),month:t.getMonth(),day:t.getDate(),dayOfWeek:t.getDay(),hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds()};return e.replaceAll(/(mmmm|mmm|mm|m|dddd|ddd|dd|d|yyyy|yy|HH|H|hh|h|MM|M|ss|s|tt|t|\\\\.)/g,(e,t)=>t in i?i[t](s):t.charAt(1))}printx(e,t){const i=[e=>e,e=>e.toUpperCase(),e=>e.toLowerCase()],s=[];let a=0;const r=(t=(t??"").toString()).length;let l=i[0],n=!1;for(const o of e)if(n){s.push(o);n=!1}else{if(a>=r)break;switch(o){case"?":s.push(l(t.charAt(a++)));break;case"X":for(;a<r;){const e=t.charAt(a++);if("a"<=e&&e<="z"||"A"<=e&&e<="Z"||"0"<=e&&e<="9"){s.push(l(e));break}}break;case"A":for(;a<r;){const e=t.charAt(a++);if("a"<=e&&e<="z"||"A"<=e&&e<="Z"){s.push(l(e));break}}break;case"9":for(;a<r;){const e=t.charAt(a++);if("0"<=e&&e<="9"){s.push(e);break}}break;case"*":for(;a<r;)s.push(l(t.charAt(a++)));break;case"\\\\":n=!0;break;case">":l=i[1];break;case"<":l=i[2];break;case"=":l=i[0];break;default:s.push(o)}}return s.join("")}scand(e,t){if("string"!=typeof t)return new Date(t);if(""===t)return new Date;switch(e){case 0:return this.scand("D:yyyymmddHHMMss",t);case 1:return this.scand("yyyy.mm.dd HH:MM:ss",t);case 2:return this.scand("m/d/yy h:MM:ss tt",t)}const[i,s]=(util_classPrivateFieldGet(li,this)??util_classPrivateFieldSet(li,this,new Map)).getOrInsertComputed(e,util_classPrivateFieldGet(ai,this)),a=i.exec(t);if(!a||a.length!==s.length+1)return util_assertClassBrand(ci,this,_tryToGuessDate).call(this,e,t);const r={year:2e3,month:0,day:1,hours:0,minutes:0,seconds:0,am:null};s.forEach((e,t)=>e(a[t+1],r));null!==r.am&&(r.hours=r.hours%12+(r.am?0:12));return new Date(r.year,r.month,r.day,r.hours,r.minutes,r.seconds)}spansToXML(){}stringFromStream(){}xmlToSpans(){}}function _createDateActions(e){const t=[];e.replaceAll(/(d+)|(m+)|(y+)|(H+)|(M+)|(s+)/g,function(e,i,s,a,r,l,n){i?t.push((e,t)=>{if(e>=1&&e<=31){t.day=e;return!0}return!1}):s?t.push((e,t)=>{if(e>=1&&e<=12){t.month=e-1;return!0}return!1}):a?t.push((e,t)=>{e<50?e+=2e3:e<100&&(e+=1900);t.year=e;return!0}):r?t.push((e,t)=>{if(e>=0&&e<=23){t.hours=e;return!0}return!1}):l?t.push((e,t)=>{if(e>=0&&e<=59){t.minutes=e;return!0}return!1}):n&&t.push((e,t)=>{if(e>=0&&e<=59){t.seconds=e;return!0}return!1});return""});return t}function _tryToGuessDate(e,t){const i=(util_classPrivateFieldGet(ri,this)??util_classPrivateFieldSet(ri,this,new Map)).getOrInsertComputed(e,util_classPrivateFieldGet(si,this)),s=/\\d+/g;let a,r=0;const l={year:(new Date).getFullYear(),month:0,day:1,hours:12,minutes:0,seconds:0};for(;null!==(a=s.exec(t))&&r<i.length;)if(!i[r++](parseInt(a[0]),l))return null;return 0===r?null:new Date(l.year,l.month,l.day,l.hours,l.minutes,l.seconds)}function _createScandData(e){const t=util_classPrivateFieldGet(ni,this),i=util_classPrivateFieldGet(oi,this),s={mmmm:{pattern:`(${t.join("|")})`,action:(e,i)=>{i.month=t.indexOf(e)}},mmm:{pattern:`(${t.map(e=>e.substring(0,3)).join("|")})`,action:(e,i)=>{i.month=t.findIndex(t=>t.substring(0,3)===e)}},mm:{pattern:"(\\\\d{2})",action:(e,t)=>{t.month=parseInt(e)-1}},m:{pattern:"(\\\\d{1,2})",action:(e,t)=>{t.month=parseInt(e)-1}},dddd:{pattern:`(${i.join("|")})`,action:(e,t)=>{t.day=i.indexOf(e)}},ddd:{pattern:`(${i.map(e=>e.substring(0,3)).join("|")})`,action:(e,t)=>{t.day=i.findIndex(t=>t.substring(0,3)===e)}},dd:{pattern:"(\\\\d{2})",action:(e,t)=>{t.day=parseInt(e)}},d:{pattern:"(\\\\d{1,2})",action:(e,t)=>{t.day=parseInt(e)}},yyyy:{pattern:"(\\\\d{4})",action:(e,t)=>{t.year=parseInt(e)}},yy:{pattern:"(\\\\d{2})",action:(e,t)=>{t.year=2e3+parseInt(e)}},HH:{pattern:"(\\\\d{2})",action:(e,t)=>{t.hours=parseInt(e)}},H:{pattern:"(\\\\d{1,2})",action:(e,t)=>{t.hours=parseInt(e)}},hh:{pattern:"(\\\\d{2})",action:(e,t)=>{t.hours=parseInt(e)}},h:{pattern:"(\\\\d{1,2})",action:(e,t)=>{t.hours=parseInt(e)}},MM:{pattern:"(\\\\d{2})",action:(e,t)=>{t.minutes=parseInt(e)}},M:{pattern:"(\\\\d{1,2})",action:(e,t)=>{t.minutes=parseInt(e)}},ss:{pattern:"(\\\\d{2})",action:(e,t)=>{t.seconds=parseInt(e)}},s:{pattern:"(\\\\d{1,2})",action:(e,t)=>{t.seconds=parseInt(e)}},tt:{pattern:"([aApP][mM])",action:(e,t)=>{const i=e.charAt(0);t.am="a"===i||"A"===i}},t:{pattern:"([aApP])",action:(e,t)=>{t.am="a"===e||"A"===e}}},a=e.replaceAll(/[.*+\\-?^${}()|[\\]\\\\]/g,"\\\\$&"),r=[],l=a.replaceAll(/(mmmm|mmm|mm|m|dddd|ddd|dd|d|yyyy|yy|HH|H|hh|h|MM|M|ss|s|tt|t)/g,function(e,t){const{pattern:i,action:a}=s[t];r.push(a);return i.includes(",")?`(?=${i})\\\\${r.length}`:i});return[new RegExp(`^${l}$`),r]}globalThis.pdfjsScripting={initSandbox:function initSandbox(t){delete globalThis.pdfjsScripting;const _=globalThis.callExternalFunction;delete globalThis.callExternalFunction;const f=globalThis.eval.bind(globalThis),send=e=>_("send",[e]),{data:P}=t,F=Object.create(null),m={userActivation:!1,disablePrinting:!1,disableSaving:!1};let g=null;const S=new Doc({...P.docInfo,send,globalEval:f,appObjects:F,userActivationData:m,calculateNow:()=>g.calculateNow()});g=new EventDispatcher(S,P.calculationOrder,F,_,m);const y=new App({...P.appInfo,send,globalEval:f,externalCall:_,doc:S,userActivationData:m}),w=new Util,getTerminalChildren=e=>Je.getTerminalChildren(S,e);for(const[e,t]of createMap(P.objects)){const i=[];let s=null;for(const e of t)""!==e.type?i.push(e):s=e;let a=s;if(i.length>0){a=i[0];a.send=send}a.globalEval=f;a.sendError=send;a.fieldPath=e;a.appObjects=F;a.util=w;a.getTerminalChildren=getTerminalChildren;const r=exposeObject(new Field(a,i.slice(1)));Je.addField(S,e,r);for(const e of t)F[e.id]=r;s&&(F[s.id]=r)}const b=exposeObject(new Color,!0);globalThis.event=null;globalThis.global=Object.create(null);globalThis.app=exposeObject(y,!0);globalThis.color=b;globalThis.console=exposeObject(new Console({send}),!0);globalThis.util=exposeObject(w,!0);globalThis.border=s;globalThis.cursor=a;globalThis.display=r;globalThis.font=l;globalThis.highlight=n;globalThis.position=o;globalThis.scaleHow=c;globalThis.scaleWhen=d;globalThis.style=h;globalThis.trans=u;globalThis.zoomtype=p;globalThis.ADBE={Reader_Value_Asked:!0,Viewer_Value_Asked:!0};const G=new AForm(S,y,w,b);for(const e of Object.getOwnPropertyNames(AForm.prototype))"constructor"!==e&&(globalThis[e]=G[e].bind(G));for(const[e,t]of Object.entries(v))Object.defineProperty(globalThis,e,{value:t,writable:!1});Object.defineProperties(globalThis,{ColorConvert:{value:b.convert.bind(b),writable:!0},ColorEqual:{value:b.equal.bind(b),writable:!0}});const I=Object.create(null);for(const e of Object.getOwnPropertyNames(Doc.prototype)){if("constructor"===e)continue;const t=Object.getOwnPropertyDescriptor(Doc.prototype,e);t.get?I[e]={get:t.get.bind(S),set:t.set.bind(S)}:I[e]={value:Doc.prototype[e].bind(S)}}Object.defineProperties(globalThis,I);!function useNativeToStringForPublicFunctions(){const t=Function.prototype.toString,s=uncurryThis(WeakSet.prototype.has),[a,r]=e(t,t,[]).split("toString"),{toString:l}={toString(){return s(i,this)?`${a}${this.name}${r}`:e(t,this,[])}};i.add(l);Object.defineProperty(Function.prototype,"toString",{value:l,writable:!0,configurable:!0})}();const C={dispatchEvent:e=>g.dispatch(e),timeoutCb:e=>j.evalCallback(y,e)};return(e,t)=>{try{C[e](t)}catch(e){send(serializeError(e))}}}}})();'];t.push("delete dump;");let i=!1,s=0;try{const a=this.support.exportValueToSandbox(e);t.push(`pdfjsScripting.initSandbox({ data: ${a} })`);s=this._module.stringToNewUTF8(t.join("\n"));i=!!this._module.ccall("init","number",["number","number"],[s,this._alertOnError])}catch(e){NgxConsole.error(e)}finally{s&&this._module.ccall("free","number",["number"],[s])}if(!i){this.nukeSandbox();throw new Error("Cannot start sandbox")}this.support.commFun=this._module.cwrap("commFun",null,["string","string"])}dispatchEvent(e){this.support?.callSandboxFunction("dispatchEvent",e)}dumpMemoryUse(){this._module?.ccall("dumpMemoryUse",null,[])}nukeSandbox(){if(null!==this._module){this.support.destroy();this.support=null;this._module.ccall("nukeSandbox",null,[]);this._module=null}}evalForTesting(e,t){throw new Error("Not implemented: evalForTesting")}}async function QuickJSSandbox(e="../web/wasm/"){const{default:t}=await(import(
/*webpackIgnore: true*/
/*@vite-ignore*/
`${e}quickjs-eval.js`)),i=await t();return new Sandbox(window,i)}globalThis.pdfjsSandbox={QuickJSSandbox};export{QuickJSSandbox};