/*! * PSPDFKit for Web 2023.4.6 (https://pspdfkit.com/web) * * Copyright (c) 2016-2023 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES. * This notice may not be removed from this file. * * PSPDFKit uses several open source third-party components: https://pspdfkit.com/acknowledgements/web/ */ (self.webpackChunkPSPDFKit=self.webpackChunkPSPDFKit||[]).push([[4516],{14516:(t,e,r)=>{"use strict";r.r(e),r.d(e,{Conformance:()=>s,GdPicture:()=>b,GdPictureClientNative:()=>h,GdPictureWorker:()=>g});var n=r(84121),o=r(50974);let s;function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e1?r-1:0),s=1;s{const e=t.data,r=this.requests.get(e.id);(0,o.kG)(r,`No request was made for id ${e.id}.`);const{resolve:n,reject:s}=r;if(this.requests=this.requests.delete(e.id),e.error){const t=new o.p2(e.error);t.callArgs=e.callArgs,s(t)}else n(e.result)})),this.worker=new(y()),this.worker.onmessage=this.handleMessage,this.moduleLoadPromise=this.sendRequest("loadModule",[e,r,s,i,a])}toPdf(t,e){let r;return e&&(r=e.replace("pdf","pdf_").replaceAll("-","_")),this.sendRequest("toPdf",[t,r])}destroy(){var t;null===(t=this.worker)||void 0===t||t.terminate(),this.worker=null}async sendRequest(t,e){(0,o.kG)(this.worker,"GdPictureClient has been destroyed"),this.moduleLoadPromise&&await this.moduleLoadPromise;const r=this.worker;return new Promise(((n,o)=>{const s=this.assignId(),i=[...e].filter((t=>t instanceof ArrayBuffer));r.postMessage({id:s,action:t,args:e},i),this.requests=this.requests.set(s,{resolve:n,reject:o})}))}assignId(){const t=this.nextRequestId;return this.nextRequestId=this.nextRequestId+1,t}};const h=class{constructor(t){let{baseUrl:e,aot:r,mainThreadOrigin:n,licenseKey:o,customFonts:s}=t;this.gdPicture=new b,this.moduleLoadPromise=this.gdPicture.loadModule(e,r,n,o,s)}async toPdf(t,e){let r;return this.moduleLoadPromise&&await this.moduleLoadPromise,e&&(r=e.replace("pdf","pdf_").replaceAll("-","_")),this.gdPicture.toPdf(t,r)}destroy(){}}},81414:(t,e,r)=>{t.exports=function(){return r(69855)('/*!\n * PSPDFKit for Web 2023.4.6 (https://pspdfkit.com/web)\n *\n * Copyright (c) 2016-2023 PSPDFKit GmbH. All rights reserved.\n *\n * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW\n * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.\n * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.\n * This notice may not be removed from this file.\n *\n * PSPDFKit uses several open source third-party components: https://pspdfkit.com/acknowledgements/web/\n */(()=>{"use strict";const t=function t(e){let r;return r=e instanceof Error?e:new Error(e),Object.setPrototypeOf(r,t.prototype),r};t.prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}});const e=t;function r(t,r){if(!t)throw new e(`Assertion failed: ${r||"Condition not met"}\\n\\nFor further assistance, please go to: https://pspdfkit.com/support/request`)}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}function i(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}["a[href]","area[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","iframe","object","embed","[contenteditable]",\'[tabindex]:not([tabindex^="-"])\'].join(",");new WeakMap;let a;function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e1?n-1:0),i=1;i{let e,r,{data:n}=t;try{const t=await y[n.action](...n.args);if(e={id:n.id,result:t},Array.isArray(t)){const e=t.filter((t=>t instanceof ArrayBuffer));e.length>0&&(r=e)}t instanceof ArrayBuffer&&(r=[t])}catch(t){const o=[...n.args].filter((t=>t instanceof ArrayBuffer));o.length>0&&(r=o),e={id:n.id,error:t.message||t.toString(),callArgs:n.args}}_.postMessage(e,r)}})();',null)}}}]);