@nutrient-sdk/viewer 1.10.0-nightly.20251128 → 1.10.0-nightly.20251130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/ACKNOWLEDGEMENTS.md +907 -20
  2. package/dist/index.d.ts +54 -8
  3. package/dist/nutrient-viewer-lib/{chunk-848-7f594631170847a2.js → chunk-848-39a949ba79e78587.js} +1 -1
  4. package/dist/nutrient-viewer-lib/{chunk-core-worker-a9a56c6c61f79ca3.js → chunk-core-worker-0a67c40f319d85d6.js} +2 -2
  5. package/dist/nutrient-viewer-lib/{chunk-gdpicture-019d8969d2d61916.js → chunk-gdpicture-d35f0c297d1d92eb.js} +1 -1
  6. package/dist/nutrient-viewer-lib/{chunk-gdpicture-worker-f90091f5e1c41dbd.js → chunk-gdpicture-worker-d42cb12344aec83d.js} +2 -2
  7. package/dist/nutrient-viewer-lib/{chunk-lazy-sha-501782b619370519.js → chunk-lazy-sha-2e000f3c45cce199.js} +1 -1
  8. package/dist/nutrient-viewer-lib/{chunk-locale-ar-32b1009ca606dcdd.js → chunk-locale-ar-3190199230584785.js} +1 -1
  9. package/dist/nutrient-viewer-lib/{chunk-locale-cs-0df89df5ff7f4138.js → chunk-locale-cs-c33fbb5aeaeec3fd.js} +1 -1
  10. package/dist/nutrient-viewer-lib/{chunk-locale-cy-100c1f68b21e5c6f.js → chunk-locale-cy-eebeadf840cd591a.js} +1 -1
  11. package/dist/nutrient-viewer-lib/{chunk-locale-da-bd73fb602da66523.js → chunk-locale-da-a7d218f41ac4e8d5.js} +1 -1
  12. package/dist/nutrient-viewer-lib/{chunk-locale-de-1a8c6e1daaefff6b.js → chunk-locale-de-6e8bc06afa6bc4ce.js} +1 -1
  13. package/dist/nutrient-viewer-lib/{chunk-locale-el-bcaee837d8efdfee.js → chunk-locale-el-4f909fadcab8b503.js} +1 -1
  14. package/dist/nutrient-viewer-lib/{chunk-locale-en-GB-a76e77c09dd22859.js → chunk-locale-en-GB-ee181856e4bc5e76.js} +1 -1
  15. package/dist/nutrient-viewer-lib/{chunk-locale-es-780fdf4fba8fd42e.js → chunk-locale-es-c7bda2470eeda082.js} +1 -1
  16. package/dist/nutrient-viewer-lib/{chunk-locale-fi-ed8ab6558733c026.js → chunk-locale-fi-7b80a90ab85cf4c2.js} +1 -1
  17. package/dist/nutrient-viewer-lib/{chunk-locale-fr-aca0b4bfa47d15b3.js → chunk-locale-fr-75310230030aa9bb.js} +1 -1
  18. package/dist/nutrient-viewer-lib/{chunk-locale-fr-CA-fbc305f4167c9f52.js → chunk-locale-fr-CA-f68b17064c24bb07.js} +1 -1
  19. package/dist/nutrient-viewer-lib/{chunk-locale-he-5fb3045d1928dfe9.js → chunk-locale-he-80e65069db0484ce.js} +1 -1
  20. package/dist/nutrient-viewer-lib/{chunk-locale-hr-48e81ef1f6017832.js → chunk-locale-hr-6727a65e6bd88b8f.js} +1 -1
  21. package/dist/nutrient-viewer-lib/{chunk-locale-id-86f4eccb859c9fe8.js → chunk-locale-id-d4ae55b51adf13a9.js} +1 -1
  22. package/dist/nutrient-viewer-lib/{chunk-locale-it-5fad2acc295f1600.js → chunk-locale-it-7201de500cbd24d2.js} +1 -1
  23. package/dist/nutrient-viewer-lib/{chunk-locale-ja-ededceb23a8ba707.js → chunk-locale-ja-e591eddbe39ba958.js} +1 -1
  24. package/dist/nutrient-viewer-lib/{chunk-locale-ko-1d22f8ead2ba0aa3.js → chunk-locale-ko-175759766c591d71.js} +1 -1
  25. package/dist/nutrient-viewer-lib/{chunk-locale-ms-2b481000e253dcc0.js → chunk-locale-ms-80fbc7256bc43b8b.js} +1 -1
  26. package/dist/nutrient-viewer-lib/{chunk-locale-nb-NO-b77ae4d53f30b17c.js → chunk-locale-nb-NO-e1dc62da890506f6.js} +1 -1
  27. package/dist/nutrient-viewer-lib/{chunk-locale-nl-39717b6991a98c93.js → chunk-locale-nl-9ca9c0a1d401ddbf.js} +1 -1
  28. package/dist/nutrient-viewer-lib/{chunk-locale-pl-627803a9b7643a83.js → chunk-locale-pl-a839610ff46783ff.js} +1 -1
  29. package/dist/nutrient-viewer-lib/{chunk-locale-pt-e04f314b37eee3dc.js → chunk-locale-pt-94de203bbcec4c6d.js} +1 -1
  30. package/dist/nutrient-viewer-lib/{chunk-locale-pt-PT-1636e96167cf8022.js → chunk-locale-pt-PT-b085b76d77c29bca.js} +1 -1
  31. package/dist/nutrient-viewer-lib/{chunk-locale-ru-317b1c56b0214a13.js → chunk-locale-ru-05f7ced040202a01.js} +1 -1
  32. package/dist/nutrient-viewer-lib/{chunk-locale-sk-75ecec937422e3b6.js → chunk-locale-sk-88ef755879e9bd75.js} +1 -1
  33. package/dist/nutrient-viewer-lib/{chunk-locale-sl-a1702548e63eabeb.js → chunk-locale-sl-d8068155cff7c1d3.js} +1 -1
  34. package/dist/nutrient-viewer-lib/{chunk-locale-sv-927a60b4ce637dac.js → chunk-locale-sv-79ceda4767ab505f.js} +1 -1
  35. package/dist/nutrient-viewer-lib/{chunk-locale-th-9543be6825d3a1d8.js → chunk-locale-th-718e19688b8c356f.js} +1 -1
  36. package/dist/nutrient-viewer-lib/{chunk-locale-tr-24577f661b673471.js → chunk-locale-tr-d7e492946b4cc229.js} +1 -1
  37. package/dist/nutrient-viewer-lib/{chunk-locale-uk-808576e0f06287e1.js → chunk-locale-uk-1cc20f89228069df.js} +1 -1
  38. package/dist/nutrient-viewer-lib/{chunk-locale-zh-Hans-4f423a98ec4571b0.js → chunk-locale-zh-Hans-4edc02b67bbee970.js} +1 -1
  39. package/dist/nutrient-viewer-lib/{chunk-locale-zh-Hant-dcb9a21411842240.js → chunk-locale-zh-Hant-65662d93e846f86d.js} +1 -1
  40. package/dist/nutrient-viewer-lib/{chunk-offscreen-renderer-worker-f00da92e29c20d35.js → chunk-offscreen-renderer-worker-73a6cb89ad971ed2.js} +2 -2
  41. package/dist/nutrient-viewer-lib/{chunk-server-84b6e1b969cafd10.js → chunk-server-feaa6537a88aedc1.js} +2 -2
  42. package/dist/nutrient-viewer-lib/{chunk-server-instant-8cf4c724a82289f1.js → chunk-server-instant-84b797440ffb454c.js} +1 -1
  43. package/dist/nutrient-viewer-lib/{chunk-server-rest-243028a9e46074a3.js → chunk-server-rest-18d2bd16c236f909.js} +1 -1
  44. package/dist/nutrient-viewer-lib/{chunk-standalone-f606911301ef19e4.js → chunk-standalone-471c1299a6417678.js} +1 -1
  45. package/dist/nutrient-viewer-lib/{chunk-standalone-server-87d713c7f7a73b81.js → chunk-standalone-server-9ec16e9a097cf6db.js} +1 -1
  46. package/dist/nutrient-viewer-lib/core-worker.js +2 -2
  47. package/dist/nutrient-viewer-lib/dark-402cc98d3d69bff8.css +1 -1
  48. package/dist/nutrient-viewer-lib/gdpicture-worker.js +1 -1
  49. package/dist/nutrient-viewer-lib/{nutrient-viewer-1.10.0-e0d6751.css → nutrient-viewer-1.10.0-909205e.css} +1 -1
  50. package/dist/nutrient-viewer-lib/nutrient-viewer-9303291e7f6b26aa.wasm.js +1 -1
  51. package/dist/nutrient-viewer-lib/{nutrient-viewer-a7a34b7150766a07.wasm → nutrient-viewer-e303ab2716e6586c.wasm} +0 -0
  52. package/dist/nutrient-viewer-lib/offscreen-render-worker.js +1 -1
  53. package/dist/nutrient-viewer.js +2 -2
  54. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -10,4 +10,4 @@
10
10
  *
11
11
  * PSPDFKit uses several open source third-party components: https://www.nutrient.io/legal/acknowledgements/web-acknowledgements/
12
12
  */
13
- "use strict";(globalThis.webpackChunkNutrientViewer=globalThis.webpackChunkNutrientViewer||[]).push([[11],{37979:(t,e,n)=>{n.d(e,{default:()=>a});var o=n(55512),r=n.n(o);function a(){return r()('/*!\n * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)\n *\n * Copyright (c) 2016-2025 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://www.nutrient.io/legal/acknowledgements/web-acknowledgements/\n */(()=>{"use strict";const t=function t(e){let n;return n=e instanceof Error?e:new Error(e),Object.setPrototypeOf(n,t.prototype),n};t.prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}});const e=t;function n(t,n){if(!t)throw new e(`Assertion failed: ${n||"Condition not met"}\\n\\nFor further assistance, please go to: https://www.nutrient.io/support/request`)}["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;async function o(t){const n=(await async function(t){try{const n=await fetch(t).catch((n=>{throw new e(`Error fetching dynamic fonts file ${t}. ${n}`)}));if(200!==n.status)throw new e(`Error fetching dynamic fonts file ${t}. Status code: ${n.status}`);return n}catch(t){throw t}}(t)).json().catch((n=>{throw new e(`Error parsing dynamic fonts file ${t}. ${n}`)}));return n}let r=function(t){return t[t.pdf_a_1a=0]="pdf_a_1a",t[t.pdf_a_1b=1]="pdf_a_1b",t[t.pdf_a_2a=2]="pdf_a_2a",t[t.pdf_a_2u=3]="pdf_a_2u",t[t.pdf_a_2b=4]="pdf_a_2b",t[t.pdf_a_3a=5]="pdf_a_3a",t[t.pdf_a_3u=6]="pdf_a_3u",t[t.pdf_a_3b=7]="pdf_a_3b",t[t.pdf_a_4=8]="pdf_a_4",t[t.pdf_a_4e=9]="pdf_a_4e",t[t.pdf_a_4f=10]="pdf_a_4f",t}({});const a="/create.pdf",i="/save.pdf",s="/create.docx",c="/save.docx",l="/templateData.json",d="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;let f=null,u=null;function p(t){let e;n(u,"GdPicture WebAssembly is not loaded.");for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];for(const t of r)e=Object.assign(r[0],t);const i=JSON.stringify({type:t,...e}),s=JSON.parse(u.CommandHandler(i));if(!s.success)throw new Error(s.errorReason+": "+s.errorMessage+"\\n"+s.error);return s}const m={allMarkup:0,simpleMarkup:1,noMarkup:2,original:3},y=m.noMarkup,_={documentMarkupMode:y};function w(t){if(!t)return _;if(!t.documentMarkupMode)return{...t,documentMarkupMode:y};if(!(t.documentMarkupMode in m))throw new Error(`Invalid documentMarkupMode value: ${t.documentMarkupMode}. Allowed values are: ${Object.keys(m).join(", ")}`);return{...t,documentMarkupMode:m[t.documentMarkupMode]}}const g={"application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt"},b=new class{_mountCustomFonts(t,e){n(f,"WebAssembly module not loaded."),f.FS.mkdir(e);{const n=d?f.FS.filesystems.WORKERFS:f.FS.filesystems.MEMFS;f.FS.mount(n,{blobs:t},e)}}async loadModule(t,e,n,r,a,i,s){const{Assemblies:c,Module:l}=await async function(t,e){if("string"==typeof t){const n="nutrient-viewer-lib/",o=`${n}gdpicture-174da64a/jit`,r=`${n}gdpicture-174da64a/aot`;let a,i;e?(a=`${t}${r}/initDotnet.js`,i=`${t}${r}`):(a=`${t}${o}/initDotnet.js`,i=`${t}${o}`);const{initDotnet:s}=await import(a);return s(i,((t,e,n,o,r)=>"blazor.boot.json"===e?fetch(n,{credentials:"same-origin"}):null))}throw new Error("GdPicture WASM loader not implemented")}(t,e);u=c.GdPictureWasm.API,f=l,p("gdpicture/setLicense",{origin:n},{licenseKey:r||"DEMO_PSPDFKIT_WEB"});const d=a?"/fonts":"";if(a&&!f.FS.analyzePath(d).exists&&(this._mountCustomFonts(a,d),p("gdpicture/setFonts",{fontPaths:[d]})),i){const t=await o(i);p("gdpicture/setDynamicFontLoading",{baseUrl:i.split("/").slice(0,-1).join("/"),allowedFonts:t.availableFonts,v:1})}s&&p("gdpicture/setFontSubstitutions",{fontSubstitutions:s})}toPdf(t,e,n,o,s){let c=a;if(s&&"pdf"!==s)c+=`.${s}`;else if(o&&"application/pdf"!==o){const t=o.toLowerCase(),e=g.hasOwnProperty(t)&&g[t];e&&(c+=`.${e}`)}f.FS.writeFile(c,new Uint8Array(t));const l={file:i,format:"pdf",conformance:e&&e in r?e:void 0,officeConversionSettings:w(n)};try{return p("gdpicture/process",{input:{file:c},output:l}),f.FS.readFile(i).buffer}finally{try{f.FS.unlink(i),f.FS.unlink(c)}catch(t){}}}toOffice(t,e){f.FS.writeFile(a,new Uint8Array(t));const n=`/save.${e}`;try{return p("gdpicture/process",{input:{file:a},output:{file:n,format:e}}),f.FS.readFile(n).buffer}finally{try{f.FS.unlink(n),f.FS.unlink(a)}catch(t){console.log(t.message)}}}async populateDocumentTemplate(t,e){let n;f.FS.writeFile(s,new Uint8Array(t));try{n=JSON.stringify(e,null,2)}catch(t){throw new Error("Invalid config data")}f.FS.writeFile(l,n);try{return p("gdpicture/process-office-template",{inputFile:s,modelAndConfigFile:l,outputFile:c}),f.FS.readFile(c).buffer}finally{try{f.FS.unlink(c),f.FS.unlink(l),f.FS.unlink(s)}catch(t){console.log(t.message)}}}},F=self;F.global=F,F.module={},F.onmessage=async t=>{let e,n,{data:o}=t;try{const t=await b[o.action](...o.args);if(e={id:o.id,result:t},Array.isArray(t)){const e=t.filter((t=>t instanceof ArrayBuffer));e.length>0&&(n=e)}t instanceof ArrayBuffer&&(n=[t])}catch(t){const r=[...o.args].filter((t=>t instanceof ArrayBuffer));r.length>0&&(n=r),e={id:o.id,error:t.message||t.toString(),callArgs:o.args}}F.postMessage(e,n)}})();',"Worker",void 0,void 0)}},55512:t=>{t.exports=function(t,e,n,o){var r=self||window;try{try{var a;try{a=new r.Blob([t])}catch(e){(a=new(r.BlobBuilder||r.WebKitBlobBuilder||r.MozBlobBuilder||r.MSBlobBuilder)).append(t),a=a.getBlob()}var i=r.URL||r.webkitURL,s=i.createObjectURL(a),c=new r[e](s,n);return i.revokeObjectURL(s),c}catch(o){return new r[e]("data:application/javascript,".concat(encodeURIComponent(t)),n)}}catch(t){if(!o)throw Error("Inline worker is not supported");return new r[e](o,n)}}}}]);
13
+ "use strict";(globalThis.webpackChunkNutrientViewer=globalThis.webpackChunkNutrientViewer||[]).push([[11],{37979:(t,e,n)=>{n.d(e,{default:()=>a});var o=n(55512),r=n.n(o);function a(){return r()('/*!\n * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)\n *\n * Copyright (c) 2016-2025 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://www.nutrient.io/legal/acknowledgements/web-acknowledgements/\n */(()=>{"use strict";const t=function t(e){let n;return n=e instanceof Error?e:new Error(e),Object.setPrototypeOf(n,t.prototype),n};t.prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}});const e=t;function n(t,n){if(!t)throw new e(`Assertion failed: ${n||"Condition not met"}\\n\\nFor further assistance, please go to: https://www.nutrient.io/support/request`)}["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;async function o(t){const n=(await async function(t){try{const n=await fetch(t).catch((n=>{throw new e(`Error fetching dynamic fonts file ${t}. ${n}`)}));if(200!==n.status)throw new e(`Error fetching dynamic fonts file ${t}. Status code: ${n.status}`);return n}catch(t){throw t}}(t)).json().catch((n=>{throw new e(`Error parsing dynamic fonts file ${t}. ${n}`)}));return n}let r=function(t){return t[t.pdf_a_1a=0]="pdf_a_1a",t[t.pdf_a_1b=1]="pdf_a_1b",t[t.pdf_a_2a=2]="pdf_a_2a",t[t.pdf_a_2u=3]="pdf_a_2u",t[t.pdf_a_2b=4]="pdf_a_2b",t[t.pdf_a_3a=5]="pdf_a_3a",t[t.pdf_a_3u=6]="pdf_a_3u",t[t.pdf_a_3b=7]="pdf_a_3b",t[t.pdf_a_4=8]="pdf_a_4",t[t.pdf_a_4e=9]="pdf_a_4e",t[t.pdf_a_4f=10]="pdf_a_4f",t}({});const a="/create.pdf",i="/save.pdf",s="/create.docx",c="/save.docx",l="/templateData.json",d="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope;let f=null,u=null;function p(t){let e;n(u,"GdPicture WebAssembly is not loaded.");for(var o=arguments.length,r=new Array(o>1?o-1:0),a=1;a<o;a++)r[a-1]=arguments[a];for(const t of r)e=Object.assign(r[0],t);const i=JSON.stringify({type:t,...e}),s=JSON.parse(u.CommandHandler(i));if(!s.success)throw new Error(s.errorReason+": "+s.errorMessage+"\\n"+s.error);return s}const m={allMarkup:0,simpleMarkup:1,noMarkup:2,original:3},y=m.noMarkup,_={documentMarkupMode:y};function w(t){if(!t)return _;if(!t.documentMarkupMode)return{...t,documentMarkupMode:y};if(!(t.documentMarkupMode in m))throw new Error(`Invalid documentMarkupMode value: ${t.documentMarkupMode}. Allowed values are: ${Object.keys(m).join(", ")}`);return{...t,documentMarkupMode:m[t.documentMarkupMode]}}const g={"application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt"},b=new class{_mountCustomFonts(t,e){n(f,"WebAssembly module not loaded."),f.FS.mkdir(e);{const n=d?f.FS.filesystems.WORKERFS:f.FS.filesystems.MEMFS;f.FS.mount(n,{blobs:t},e)}}async loadModule(t,e,n,r,a,i,s){const{Assemblies:c,Module:l}=await async function(t,e){if("string"==typeof t){const n="nutrient-viewer-lib/",o=`${n}gdpicture-174da64a/jit`,r=`${n}gdpicture-174da64a/aot`;let a,i;e?(a=`${t}${r}/initDotnet.js`,i=`${t}${r}`):(a=`${t}${o}/initDotnet.js`,i=`${t}${o}`);const{initDotnet:s}=await import(a);return s(i,((t,e,n,o,r)=>"blazor.boot.json"===e?fetch(n,{credentials:"same-origin"}):null))}throw new Error("GdPicture WASM loader not implemented")}(t,e);u=c.GdPictureWasm.API,f=l,p("gdpicture/setLicense",{origin:n},{licenseKey:r||"DEMO_PSPDFKIT_WEB"});const d=a?"/fonts":"";if(a&&!f.FS.analyzePath(d).exists&&(this._mountCustomFonts(a,d),p("gdpicture/setFonts",{fontPaths:[d]})),i){const t=await o(i);p("gdpicture/setDynamicFontLoading",{baseUrl:i.split("/").slice(0,-1).join("/"),allowedFonts:t.availableFonts,v:1})}s&&p("gdpicture/setFontSubstitutions",{fontSubstitutions:s})}toPdf(t,e,n,o,s){let c=a;if(s&&"pdf"!==s)c+=`.${s}`;else if(o&&"application/pdf"!==o){const t=o.toLowerCase(),e=g.hasOwnProperty(t)&&g[t];e&&(c+=`.${e}`)}f.FS.writeFile(c,new Uint8Array(t));const l={file:i,format:"pdf",conformance:e&&e in r?e:void 0,officeConversionSettings:w(n)};try{return p("gdpicture/process",{input:{file:c},output:l}),f.FS.readFile(i).buffer}finally{try{f.FS.unlink(i),f.FS.unlink(c)}catch(t){}}}toOffice(t,e){f.FS.writeFile(a,new Uint8Array(t));const n=`/save.${e}`;try{return p("gdpicture/process",{input:{file:a},output:{file:n,format:e}}),f.FS.readFile(n).buffer}finally{try{f.FS.unlink(n),f.FS.unlink(a)}catch(t){console.log(t.message)}}}async populateDocumentTemplate(t,e){let n;f.FS.writeFile(s,new Uint8Array(t));try{n=JSON.stringify(e,null,2)}catch(t){throw new Error("Invalid config data")}f.FS.writeFile(l,n);try{return p("gdpicture/process-office-template",{inputFile:s,modelAndConfigFile:l,outputFile:c}),f.FS.readFile(c).buffer}finally{try{f.FS.unlink(c),f.FS.unlink(l),f.FS.unlink(s)}catch(t){console.log(t.message)}}}},F=self;F.global=F,F.module={},F.onmessage=async t=>{let e,n,{data:o}=t;try{const t=await b[o.action](...o.args);if(e={id:o.id,result:t},Array.isArray(t)){const e=t.filter((t=>t instanceof ArrayBuffer));e.length>0&&(n=e)}t instanceof ArrayBuffer&&(n=[t])}catch(t){const r=[...o.args].filter((t=>t instanceof ArrayBuffer));r.length>0&&(n=r),e={id:o.id,error:t.message||t.toString(),callArgs:o.args}}F.postMessage(e,n)}})();',"Worker",void 0,void 0)}},55512:t=>{t.exports=function(t,e,n,o){var r=self||window;try{try{var a;try{a=new r.Blob([t])}catch(e){(a=new(r.BlobBuilder||r.WebKitBlobBuilder||r.MozBlobBuilder||r.MSBlobBuilder)).append(t),a=a.getBlob()}var i=r.URL||r.webkitURL,s=i.createObjectURL(a),c=new r[e](s,n);return i.revokeObjectURL(s),c}catch(o){return new r[e]("data:application/javascript,".concat(encodeURIComponent(t)),n)}}catch(t){if(!o)throw Error("Inline worker is not supported");return new r[e](o,n)}}}}]);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)
2
+ * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)
3
3
  *
4
4
  * Copyright (c) 2016-2025 PSPDFKit GmbH. All rights reserved.
5
5
  *
@@ -10,4 +10,4 @@
10
10
  *
11
11
  * PSPDFKit uses several open source third-party components: https://www.nutrient.io/legal/acknowledgements/web-acknowledgements/
12
12
  */
13
- "use strict";(globalThis.webpackChunkNutrientViewer=globalThis.webpackChunkNutrientViewer||[]).push([[861],{22292:(e,t,n)=>{n.d(t,{default:()=>i});var r=n(55512),s=n.n(r);function i(){return s()('/*!\n * Nutrient Web SDK 1.10.0-e0d6751 (https://www.nutrient.io/sdk/web)\n *\n * Copyright (c) 2016-2025 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://www.nutrient.io/legal/acknowledgements/web-acknowledgements/\n */(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var s=r.call(t,n||"default");if("object"!=e(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function n(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}const r=Symbol("Comlink.proxy"),s=Symbol("Comlink.endpoint"),i=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),o=Symbol("Comlink.thrown"),c=e=>"object"==typeof e&&null!==e||"function"==typeof e,u=new Map([["proxy",{canHandle:e=>c(e)&&e[r],serialize(e){const{port1:t,port2:n}=new MessageChannel;return l(e,t),[n,[n]]},deserialize:e=>(e.start(),h(e))}],["throw",{canHandle:e=>c(e)&&o in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function l(e,t=globalThis,n=["*"]){t.addEventListener("message",(function s(i){if(!i||!i.data)return;if(!function(e,t){for(const n of e){if(t===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}return!1}(n,i.origin))return void console.warn(`Invalid origin \'${i.origin}\' for comlink proxy`);const{id:c,type:u,path:h}=Object.assign({path:[]},i.data),f=(i.data.argumentList||[]).map(v);let p;try{const t=h.slice(0,-1).reduce(((e,t)=>e[t]),e),n=h.reduce(((e,t)=>e[t]),e);switch(u){case"GET":p=n;break;case"SET":t[h.slice(-1)[0]]=v(i.data.value),p=!0;break;case"APPLY":p=n.apply(t,f);break;case"CONSTRUCT":p=function(e){return Object.assign(e,{[r]:!0})}(new n(...f));break;case"ENDPOINT":{const{port1:t,port2:n}=new MessageChannel;l(e,n),p=function(e,t){return w.set(e,t),e}(t,[t])}break;case"RELEASE":p=void 0;break;default:return}}catch(e){p={value:e,[o]:0}}Promise.resolve(p).catch((e=>({value:e,[o]:0}))).then((n=>{const[r,i]=R(n);t.postMessage(Object.assign(Object.assign({},r),{id:c}),i),"RELEASE"===u&&(t.removeEventListener("message",s),d(t),a in e&&"function"==typeof e[a]&&e[a]())})).catch((e=>{const[n,r]=R({value:new TypeError("Unserializable return value"),[o]:0});t.postMessage(Object.assign(Object.assign({},n),{id:c}),r)}))})),t.start&&t.start()}function d(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function h(e,t){const n=new Map;return e.addEventListener("message",(function(e){const{data:t}=e;if(!t||!t.id)return;const r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}})),y(e,n,[],t)}function f(e){if(e)throw new Error("Proxy has been released and is not useable")}function p(e){return E(e,new Map,{type:"RELEASE"}).then((()=>{d(e)}))}const g=new WeakMap,m="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(g.get(e)||0)-1;g.set(e,t),0===t&&p(e)}));function y(e,t,n=[],r=function(){}){let a=!1;const o=new Proxy(r,{get(r,s){if(f(a),s===i)return()=>{!function(e){m&&m.unregister(e)}(o),p(e),t.clear(),a=!0};if("then"===s){if(0===n.length)return{then:()=>o};const r=E(e,t,{type:"GET",path:n.map((e=>e.toString()))}).then(v);return r.then.bind(r)}return y(e,t,[...n,s])},set(r,s,i){f(a);const[o,c]=R(i);return E(e,t,{type:"SET",path:[...n,s].map((e=>e.toString())),value:o},c).then(v)},apply(r,i,o){f(a);const c=n[n.length-1];if(c===s)return E(e,t,{type:"ENDPOINT"}).then(v);if("bind"===c)return y(e,t,n.slice(0,-1));const[u,l]=b(o);return E(e,t,{type:"APPLY",path:n.map((e=>e.toString())),argumentList:u},l).then(v)},construct(r,s){f(a);const[i,o]=b(s);return E(e,t,{type:"CONSTRUCT",path:n.map((e=>e.toString())),argumentList:i},o).then(v)}});return function(e,t){const n=(g.get(t)||0)+1;g.set(t,n),m&&m.register(e,t,e)}(o,e),o}function b(e){const t=e.map(R);return[t.map((e=>e[0])),(n=t.map((e=>e[1])),Array.prototype.concat.apply([],n))];var n}const w=new WeakMap;function R(e){for(const[t,n]of u)if(n.canHandle(e)){const[r,s]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},s]}return[{type:"RAW",value:e},w.get(e)||[]]}function v(e){switch(e.type){case"HANDLER":return u.get(e.name).deserialize(e.value);case"RAW":return e.value}}function E(e,t,n,r){return new Promise((s=>{const i=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(i,s),e.start&&e.start(),e.postMessage(Object.assign({id:i},n),r)}))}class C{constructor(e,t){n(this,"queue",[]),n(this,"activeRequests",new Map),n(this,"isProcessing",!1),n(this,"renderCallbacks",new Map),n(this,"errorCallbacks",new Map),n(this,"maxConcurrentRequests",1),n(this,"activeRequestCount",0),this.renderChannel=e,this.maxConcurrentRequests=t}static async create(e){const t=await e.isServer();return new C(e,t?4:1)}setCallbacks(e,t,n){this.renderCallbacks.set(e,t),this.errorCallbacks.set(e,n)}enqueue(e,t){const n=Date.now();for(const r of t){if(this.activeRequests.has(r.id))continue;const t=this.queue.findIndex((e=>e.request.id===r.id));-1===t?this.queue.push({request:r,sessionId:e,priority:this.calculatePriority(r),timestamp:n,cancelled:!1}):this.queue[t].priority=this.calculatePriority(r)}this.sortQueue(),this.isProcessing||this.startProcessing()}cancel(e,t){const n=new Set(t);for(const t of this.queue)t.sessionId===e&&n.has(t.request.id)&&(t.cancelled=!0);for(const[t,r]of this.activeRequests)r.sessionId===e&&n.has(t)&&(r.cancelled=!0)}cancelSession(e){for(const t of this.queue)t.sessionId===e&&(t.cancelled=!0);for(const t of this.activeRequests.values())t.sessionId===e&&(t.cancelled=!0)}async startProcessing(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0||this.activeRequestCount>0;){for(;this.activeRequestCount<this.maxConcurrentRequests&&this.queue.length>0;){const e=this.getNextRequest();if(!e)break;this.activeRequestCount++,this.processRequest(e).finally((()=>{this.activeRequestCount--}))}await new Promise((e=>setTimeout(e,0)))}this.isProcessing=!1}}getNextRequest(){for(;this.queue.length>0;){const e=this.queue.shift();if(!e)break;if(!e.cancelled)return this.activeRequests.set(e.request.id,e),e}return null}async processRequest(e){const{request:t,sessionId:n}=e;try{if(e.cancelled)return;"undefined"!=typeof performance&&performance.mark&&performance.mark(`tile-render-start-${t.id}`);const r=await this.renderTile(t);if("undefined"!=typeof performance&&performance.mark&&(performance.mark(`tile-render-ready-${t.id}`),performance.measure))try{performance.measure(`tile-wasm-render-${t.id}`,`tile-render-start-${t.id}`,`tile-render-ready-${t.id}`)}catch(e){}if(e.cancelled)return;const s=this.renderCallbacks.get(n);s&&s(n,t.id,r)}catch(r){if(console.error("[SharedRenderQueue] Error processing request:",r),!e.cancelled){const e=this.errorCallbacks.get(n);e&&e(n,t.id,r)}}finally{this.activeRequests.delete(t.id)}}async renderTile(e){const{sourceInfo:t,options:n}=e,r=await this.renderChannel.render(t.pageIndex,t.pageSize,t.tileRect,{renderForPrinting:n.renderForPrinting,renderText:n.renderText,priority:n.priority||"high"});return{buffer:r,format:n.format||"bitmap",width:r.width,height:r.height}}calculatePriority(e){let t=0;"high"===e.options.priority&&(t-=1e3),e.targetInfo.isVisible&&(t-=500),t-=10*e.viewportRenderUpdateId;return t+=100*Math.abs(e.targetInfo.scale-e.targetInfo.targetScale),t}sortQueue(){this.queue.sort(((e,t)=>e.priority-t.priority))}}const q=function e(t){let n;return n=t instanceof Error?t:new Error(t),Object.setPrototypeOf(n,e.prototype),n};q.prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}});const S=q;["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;l(new class{constructor(){n(this,"sharedRenderQueue",null),n(this,"sessionCallbacks",new Map),n(this,"sessionErrors",new Map),n(this,"renderChannel",null),n(this,"sessionCounter",0)}async setupRenderMessageChannel(e){this.renderChannel=h(e)}async beginRenderer(e,t,n,r,s){!function(e,t){if(!e)throw new S(`Assertion failed: ${t||"Condition not met"}\\n\\nFor further assistance, please go to: https://www.nutrient.io/support/request`)}(this.renderChannel,"Setup render channel first"),this.sharedRenderQueue||(this.sharedRenderQueue=await C.create(this.renderChannel));const i=`page-${e}-${this.sessionCounter++}`;return this.sessionCallbacks.set(i,r),this.sessionErrors.set(i,s),this.sharedRenderQueue.setCallbacks(i,this.handleTileReady.bind(this),this.handleTileError.bind(this)),i}async requestTiles(e,t){if(!this.sharedRenderQueue)return void console.warn("SharedRenderQueue not initialized");const n=t.map((e=>({id:e.id,viewportRenderUpdateId:Date.now(),sourceInfo:{pageIndex:e.pageIndex,pageSize:e.pageSize,tileRect:e.tileRect},targetInfo:{scale:e.mip,targetScale:e.mip,isVisible:!0,canvasRect:{left:0,top:0,width:e.tileRect.width,height:e.tileRect.height}},options:{renderAnnotations:e.options.renderAnnotations,renderText:e.options.renderText,format:"bitmap",priority:e.options.priority}})));this.sharedRenderQueue.enqueue(e,n)}async cancelTiles(e,t){this.sharedRenderQueue&&this.sharedRenderQueue.cancel(e,t)}async endRenderer(e){this.sessionCallbacks.delete(e),this.sessionErrors.delete(e),this.sharedRenderQueue?.cancelSession(e)}handleTileReady(e,t,n){const r=this.sessionCallbacks.get(e);r&&r(e,t,n)}handleTileError(e,t,n){const r=this.sessionErrors.get(e);r&&r(e,t,n)}})})();',"Worker",void 0,void 0)}},55512:e=>{e.exports=function(e,t,n,r){var s=self||window;try{try{var i;try{i=new s.Blob([e])}catch(t){(i=new(s.BlobBuilder||s.WebKitBlobBuilder||s.MozBlobBuilder||s.MSBlobBuilder)).append(e),i=i.getBlob()}var o=s.URL||s.webkitURL,a=o.createObjectURL(i),c=new s[t](a,n);return o.revokeObjectURL(a),c}catch(r){return new s[t]("data:application/javascript,".concat(encodeURIComponent(e)),n)}}catch(e){if(!r)throw Error("Inline worker is not supported");return new s[t](r,n)}}}}]);
13
+ "use strict";(globalThis.webpackChunkNutrientViewer=globalThis.webpackChunkNutrientViewer||[]).push([[861],{22292:(e,t,n)=>{n.d(t,{default:()=>i});var r=n(55512),s=n.n(r);function i(){return s()('/*!\n * Nutrient Web SDK 1.10.0-909205e (https://www.nutrient.io/sdk/web)\n *\n * Copyright (c) 2016-2025 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://www.nutrient.io/legal/acknowledgements/web-acknowledgements/\n */(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var s=r.call(t,n||"default");if("object"!=e(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function n(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}const r=Symbol("Comlink.proxy"),s=Symbol("Comlink.endpoint"),i=Symbol("Comlink.releaseProxy"),a=Symbol("Comlink.finalizer"),o=Symbol("Comlink.thrown"),c=e=>"object"==typeof e&&null!==e||"function"==typeof e,u=new Map([["proxy",{canHandle:e=>c(e)&&e[r],serialize(e){const{port1:t,port2:n}=new MessageChannel;return l(e,t),[n,[n]]},deserialize:e=>(e.start(),h(e))}],["throw",{canHandle:e=>c(e)&&o in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function l(e,t=globalThis,n=["*"]){t.addEventListener("message",(function s(i){if(!i||!i.data)return;if(!function(e,t){for(const n of e){if(t===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}return!1}(n,i.origin))return void console.warn(`Invalid origin \'${i.origin}\' for comlink proxy`);const{id:c,type:u,path:h}=Object.assign({path:[]},i.data),f=(i.data.argumentList||[]).map(v);let p;try{const t=h.slice(0,-1).reduce(((e,t)=>e[t]),e),n=h.reduce(((e,t)=>e[t]),e);switch(u){case"GET":p=n;break;case"SET":t[h.slice(-1)[0]]=v(i.data.value),p=!0;break;case"APPLY":p=n.apply(t,f);break;case"CONSTRUCT":p=function(e){return Object.assign(e,{[r]:!0})}(new n(...f));break;case"ENDPOINT":{const{port1:t,port2:n}=new MessageChannel;l(e,n),p=function(e,t){return w.set(e,t),e}(t,[t])}break;case"RELEASE":p=void 0;break;default:return}}catch(e){p={value:e,[o]:0}}Promise.resolve(p).catch((e=>({value:e,[o]:0}))).then((n=>{const[r,i]=R(n);t.postMessage(Object.assign(Object.assign({},r),{id:c}),i),"RELEASE"===u&&(t.removeEventListener("message",s),d(t),a in e&&"function"==typeof e[a]&&e[a]())})).catch((e=>{const[n,r]=R({value:new TypeError("Unserializable return value"),[o]:0});t.postMessage(Object.assign(Object.assign({},n),{id:c}),r)}))})),t.start&&t.start()}function d(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function h(e,t){const n=new Map;return e.addEventListener("message",(function(e){const{data:t}=e;if(!t||!t.id)return;const r=n.get(t.id);if(r)try{r(t)}finally{n.delete(t.id)}})),y(e,n,[],t)}function f(e){if(e)throw new Error("Proxy has been released and is not useable")}function p(e){return E(e,new Map,{type:"RELEASE"}).then((()=>{d(e)}))}const g=new WeakMap,m="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(g.get(e)||0)-1;g.set(e,t),0===t&&p(e)}));function y(e,t,n=[],r=function(){}){let a=!1;const o=new Proxy(r,{get(r,s){if(f(a),s===i)return()=>{!function(e){m&&m.unregister(e)}(o),p(e),t.clear(),a=!0};if("then"===s){if(0===n.length)return{then:()=>o};const r=E(e,t,{type:"GET",path:n.map((e=>e.toString()))}).then(v);return r.then.bind(r)}return y(e,t,[...n,s])},set(r,s,i){f(a);const[o,c]=R(i);return E(e,t,{type:"SET",path:[...n,s].map((e=>e.toString())),value:o},c).then(v)},apply(r,i,o){f(a);const c=n[n.length-1];if(c===s)return E(e,t,{type:"ENDPOINT"}).then(v);if("bind"===c)return y(e,t,n.slice(0,-1));const[u,l]=b(o);return E(e,t,{type:"APPLY",path:n.map((e=>e.toString())),argumentList:u},l).then(v)},construct(r,s){f(a);const[i,o]=b(s);return E(e,t,{type:"CONSTRUCT",path:n.map((e=>e.toString())),argumentList:i},o).then(v)}});return function(e,t){const n=(g.get(t)||0)+1;g.set(t,n),m&&m.register(e,t,e)}(o,e),o}function b(e){const t=e.map(R);return[t.map((e=>e[0])),(n=t.map((e=>e[1])),Array.prototype.concat.apply([],n))];var n}const w=new WeakMap;function R(e){for(const[t,n]of u)if(n.canHandle(e)){const[r,s]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},s]}return[{type:"RAW",value:e},w.get(e)||[]]}function v(e){switch(e.type){case"HANDLER":return u.get(e.name).deserialize(e.value);case"RAW":return e.value}}function E(e,t,n,r){return new Promise((s=>{const i=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");t.set(i,s),e.start&&e.start(),e.postMessage(Object.assign({id:i},n),r)}))}class C{constructor(e,t){n(this,"queue",[]),n(this,"activeRequests",new Map),n(this,"isProcessing",!1),n(this,"renderCallbacks",new Map),n(this,"errorCallbacks",new Map),n(this,"maxConcurrentRequests",1),n(this,"activeRequestCount",0),this.renderChannel=e,this.maxConcurrentRequests=t}static async create(e){const t=await e.isServer();return new C(e,t?4:1)}setCallbacks(e,t,n){this.renderCallbacks.set(e,t),this.errorCallbacks.set(e,n)}enqueue(e,t){const n=Date.now();for(const r of t){if(this.activeRequests.has(r.id))continue;const t=this.queue.findIndex((e=>e.request.id===r.id));-1===t?this.queue.push({request:r,sessionId:e,priority:this.calculatePriority(r),timestamp:n,cancelled:!1}):this.queue[t].priority=this.calculatePriority(r)}this.sortQueue(),this.isProcessing||this.startProcessing()}cancel(e,t){const n=new Set(t);for(const t of this.queue)t.sessionId===e&&n.has(t.request.id)&&(t.cancelled=!0);for(const[t,r]of this.activeRequests)r.sessionId===e&&n.has(t)&&(r.cancelled=!0)}cancelSession(e){for(const t of this.queue)t.sessionId===e&&(t.cancelled=!0);for(const t of this.activeRequests.values())t.sessionId===e&&(t.cancelled=!0)}async startProcessing(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0||this.activeRequestCount>0;){for(;this.activeRequestCount<this.maxConcurrentRequests&&this.queue.length>0;){const e=this.getNextRequest();if(!e)break;this.activeRequestCount++,this.processRequest(e).finally((()=>{this.activeRequestCount--}))}await new Promise((e=>setTimeout(e,0)))}this.isProcessing=!1}}getNextRequest(){for(;this.queue.length>0;){const e=this.queue.shift();if(!e)break;if(!e.cancelled)return this.activeRequests.set(e.request.id,e),e}return null}async processRequest(e){const{request:t,sessionId:n}=e;try{if(e.cancelled)return;"undefined"!=typeof performance&&performance.mark&&performance.mark(`tile-render-start-${t.id}`);const r=await this.renderTile(t);if("undefined"!=typeof performance&&performance.mark&&(performance.mark(`tile-render-ready-${t.id}`),performance.measure))try{performance.measure(`tile-wasm-render-${t.id}`,`tile-render-start-${t.id}`,`tile-render-ready-${t.id}`)}catch(e){}if(e.cancelled)return;const s=this.renderCallbacks.get(n);s&&s(n,t.id,r)}catch(r){if(console.error("[SharedRenderQueue] Error processing request:",r),!e.cancelled){const e=this.errorCallbacks.get(n);e&&e(n,t.id,r)}}finally{this.activeRequests.delete(t.id)}}async renderTile(e){const{sourceInfo:t,options:n}=e,r=await this.renderChannel.render(t.pageIndex,t.pageSize,t.tileRect,{renderForPrinting:n.renderForPrinting,renderText:n.renderText,priority:n.priority||"high"});return{buffer:r,format:n.format||"bitmap",width:r.width,height:r.height}}calculatePriority(e){let t=0;"high"===e.options.priority&&(t-=1e3),e.targetInfo.isVisible&&(t-=500),t-=10*e.viewportRenderUpdateId;return t+=100*Math.abs(e.targetInfo.scale-e.targetInfo.targetScale),t}sortQueue(){this.queue.sort(((e,t)=>e.priority-t.priority))}}const q=function e(t){let n;return n=t instanceof Error?t:new Error(t),Object.setPrototypeOf(n,e.prototype),n};q.prototype=Object.create(Error.prototype,{name:{value:"PSPDFKitError",enumerable:!1}});const S=q;["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;l(new class{constructor(){n(this,"sharedRenderQueue",null),n(this,"sessionCallbacks",new Map),n(this,"sessionErrors",new Map),n(this,"renderChannel",null),n(this,"sessionCounter",0)}async setupRenderMessageChannel(e){this.renderChannel=h(e)}async beginRenderer(e,t,n,r,s){!function(e,t){if(!e)throw new S(`Assertion failed: ${t||"Condition not met"}\\n\\nFor further assistance, please go to: https://www.nutrient.io/support/request`)}(this.renderChannel,"Setup render channel first"),this.sharedRenderQueue||(this.sharedRenderQueue=await C.create(this.renderChannel));const i=`page-${e}-${this.sessionCounter++}`;return this.sessionCallbacks.set(i,r),this.sessionErrors.set(i,s),this.sharedRenderQueue.setCallbacks(i,this.handleTileReady.bind(this),this.handleTileError.bind(this)),i}async requestTiles(e,t){if(!this.sharedRenderQueue)return void console.warn("SharedRenderQueue not initialized");const n=t.map((e=>({id:e.id,viewportRenderUpdateId:Date.now(),sourceInfo:{pageIndex:e.pageIndex,pageSize:e.pageSize,tileRect:e.tileRect},targetInfo:{scale:e.mip,targetScale:e.mip,isVisible:!0,canvasRect:{left:0,top:0,width:e.tileRect.width,height:e.tileRect.height}},options:{renderAnnotations:e.options.renderAnnotations,renderText:e.options.renderText,format:"bitmap",priority:e.options.priority}})));this.sharedRenderQueue.enqueue(e,n)}async cancelTiles(e,t){this.sharedRenderQueue&&this.sharedRenderQueue.cancel(e,t)}async endRenderer(e){this.sessionCallbacks.delete(e),this.sessionErrors.delete(e),this.sharedRenderQueue?.cancelSession(e)}handleTileReady(e,t,n){const r=this.sessionCallbacks.get(e);r&&r(e,t,n)}handleTileError(e,t,n){const r=this.sessionErrors.get(e);r&&r(e,t,n)}})})();',"Worker",void 0,void 0)}},55512:e=>{e.exports=function(e,t,n,r){var s=self||window;try{try{var i;try{i=new s.Blob([e])}catch(t){(i=new(s.BlobBuilder||s.WebKitBlobBuilder||s.MozBlobBuilder||s.MSBlobBuilder)).append(e),i=i.getBlob()}var o=s.URL||s.webkitURL,a=o.createObjectURL(i),c=new s[t](a,n);return o.revokeObjectURL(a),c}catch(r){return new s[t]("data:application/javascript,".concat(encodeURIComponent(e)),n)}}catch(e){if(!r)throw Error("Inline worker is not supported");return new s[t](r,n)}}}}]);