From 2188e3e38c9fa340c4d1c4710c8e8b14e3ef4dcf Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 4 Dec 2026 21:56:53 +0800 Subject: [PATCH 1/2] chore: bump version 11.0.5 --- .../BootstrapBlazor.MediaMtx.Cli.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/BootstrapBlazor.MediaMtx.Cli/BootstrapBlazor.MediaMtx.Cli.csproj b/tools/BootstrapBlazor.MediaMtx.Cli/BootstrapBlazor.MediaMtx.Cli.csproj index 0db4ca4b..0606e772 100644 --- a/tools/BootstrapBlazor.MediaMtx.Cli/BootstrapBlazor.MediaMtx.Cli.csproj +++ b/tools/BootstrapBlazor.MediaMtx.Cli/BootstrapBlazor.MediaMtx.Cli.csproj @@ -1,7 +1,7 @@ - 11.0.4 + 11.0.5 Exe From 1610b199a9adc9fff45ad81cd9ebe02938631c0d Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Fri, 4 Dec 2026 23:25:28 +0800 Subject: [PATCH 2/2] chore: bump version 3.6.0 --- .../BootstrapBlazor.EmbedPDF.csproj | 2 +- ... => annotation-style-BZv7nj7j-z_uZITv9.js} | 6 +- ...=> attachments-panel-CBvOCDpU-B7OO6xRT.js} | 4 +- ...js => comments-panel-BJ1GRhZ0-MnxRXHtZ.js} | 4 +- ...mbedpdf-worker.source-CCHXFWYh-CTEHza5m.js | 5 - ...mbedpdf-worker.source-Z0o39l7i-qFIWKZ_I.js | 5 + ...=> form-design-panel-B4qGH4r--CLCbLmeD.js} | 6 +- ...O.js => grant-prompt-Co4bzHaR-EijIs4Sr.js} | 4 +- .../wwwroot/chunks/index-BCXWVSWX.js | 1482 -- .../{index-gudfJIGx.js => index-CRnA8aVz.js} | 4 +- .../wwwroot/chunks/index-Cp6ojw-X.js | 1572 ++ ...5fBXix.js => inline-transport-DLWGAv7G.js} | 24 +- ...pJCC3cf.js => labels-C6_i87Oj-xAdFtKWd.js} | 4 +- ...1I.js => link-editor-BQl5WwML-7K8D2W_R.js} | 4 +- ...UB.js => measurement-6M_KEsFK-DhJ1Dnhv.js} | 4 +- ....js => outline-panel-BfusJ14a-awUDJM2i.js} | 4 +- ...> outline-properties-D2EBON1r-CMs5r_jq.js} | 4 +- .../{parse-Cv_kCMGz.js => parse-BNZey3Fv.js} | 4 +- ...K.js => print-dialog-DPur4IlU-D6FsF7fz.js} | 4 +- ...js => redact-confirm-C0AI8Tbt-BhOcPITJ.js} | 6 +- ...tion-T5ICfn86.js => redaction-CHJXJ8Tl.js} | 4 +- ...s => redaction-panel-Djm12Ydh-BY55F6C2.js} | 6 +- ...t.js => search-panel-BsY-2v13-BzjGBsPo.js} | 4 +- ...ed-DIdbaT2K.js => self-signed-BsJCIg7s.js} | 4 +- ...DM.js => sign-dialog-BZ-u3DaO-A_aSCrL7.js} | 4 +- ... signature-inspector-DgkYwQHv-DecD2jME.js} | 4 +- ...s => signature-maker-Lp7uuutB-qzUGKTPq.js} | 4 +- ... => signatures-panel-smWbAS42-C8ccrvhV.js} | 4 +- ...t.js => stamps-panel-BfRJ9uBl-CcPfGL64.js} | 4 +- .../wwwroot/chunks/timestamp-DdhyGESj.js | 290 - .../wwwroot/chunks/timestamp-YjVubp40.js | 309 + ...-rny.js => timestamp-protocol-C2RoyYm6.js} | 4 +- ...sqnq1cad.js => wasm-url-asset-Dc0HnHB_.js} | 18465 ++++++++-------- .../wwwroot/embedpdf-worker.js | 4 +- .../wwwroot/embedpdf.js | 34 +- .../wwwroot/embedpdf.wasm | Bin 7909000 -> 7924542 bytes .../wwwroot/readme.txt | 2 +- 37 files changed, 11230 insertions(+), 11068 deletions(-) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{annotation-style-BZv7nj7j-BDYrzgLn.js => annotation-style-BZv7nj7j-z_uZITv9.js} (99%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{attachments-panel-CBvOCDpU-DcNUtnoD.js => attachments-panel-CBvOCDpU-B7OO6xRT.js} (97%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{comments-panel-BJ1GRhZ0-BOiDUolf.js => comments-panel-BJ1GRhZ0-MnxRXHtZ.js} (99%) delete mode 100644 src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/embedpdf-worker.source-CCHXFWYh-CTEHza5m.js create mode 100644 src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/embedpdf-worker.source-Z0o39l7i-qFIWKZ_I.js rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{form-design-panel-B4qGH4r--T0yv-8g7.js => form-design-panel-B4qGH4r--CLCbLmeD.js} (98%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{grant-prompt-Co4bzHaR-ibAjp4kO.js => grant-prompt-Co4bzHaR-EijIs4Sr.js} (98%) delete mode 100644 src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-BCXWVSWX.js rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{index-gudfJIGx.js => index-CRnA8aVz.js} (98%) create mode 100644 src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-Cp6ojw-X.js rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{inline-transport-GZ5fBXix.js => inline-transport-DLWGAv7G.js} (99%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{labels-C6_i87Oj-BpJCC3cf.js => labels-C6_i87Oj-xAdFtKWd.js} (50%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{link-editor-BQl5WwML-BMgM601I.js => link-editor-BQl5WwML-7K8D2W_R.js} (96%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{measurement-6M_KEsFK-ARa1M4UB.js => measurement-6M_KEsFK-DhJ1Dnhv.js} (99%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{outline-panel-BfusJ14a-CrwTtYxN.js => outline-panel-BfusJ14a-awUDJM2i.js} (99%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{outline-properties-D2EBON1r-Lwj1vkS_.js => outline-properties-D2EBON1r-CMs5r_jq.js} (98%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{parse-Cv_kCMGz.js => parse-BNZey3Fv.js} (98%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{print-dialog-DPur4IlU-0p7zQEeK.js => print-dialog-DPur4IlU-D6FsF7fz.js} (98%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{redact-confirm-C0AI8Tbt-DoYTi75M.js => redact-confirm-C0AI8Tbt-BhOcPITJ.js} (93%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{redaction-T5ICfn86.js => redaction-CHJXJ8Tl.js} (86%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{redaction-panel-Djm12Ydh-D9gDjih9.js => redaction-panel-Djm12Ydh-BY55F6C2.js} (95%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{search-panel-BsY-2v13-ZjlYoC7t.js => search-panel-BsY-2v13-BzjGBsPo.js} (98%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{self-signed-DIdbaT2K.js => self-signed-BsJCIg7s.js} (95%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{sign-dialog-BZ-u3DaO-DUNRfJDM.js => sign-dialog-BZ-u3DaO-A_aSCrL7.js} (98%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{signature-inspector-DgkYwQHv-B4iHMa4u.js => signature-inspector-DgkYwQHv-DecD2jME.js} (98%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{signature-maker-Lp7uuutB-fK8F7XzG.js => signature-maker-Lp7uuutB-qzUGKTPq.js} (98%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{signatures-panel-smWbAS42-BS1McmH7.js => signatures-panel-smWbAS42-C8ccrvhV.js} (99%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{stamps-panel-BfRJ9uBl-Cs7BhHXt.js => stamps-panel-BfRJ9uBl-CcPfGL64.js} (98%) delete mode 100644 src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-DdhyGESj.js create mode 100644 src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-YjVubp40.js rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{timestamp-protocol-DQ1E-rny.js => timestamp-protocol-C2RoyYm6.js} (93%) rename src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/{wasm-url-asset-sqnq1cad.js => wasm-url-asset-Dc0HnHB_.js} (84%) diff --git a/src/components/BootstrapBlazor.EmbedPDF/BootstrapBlazor.EmbedPDF.csproj b/src/components/BootstrapBlazor.EmbedPDF/BootstrapBlazor.EmbedPDF.csproj index d65f7d52..3f138017 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/BootstrapBlazor.EmbedPDF.csproj +++ b/src/components/BootstrapBlazor.EmbedPDF/BootstrapBlazor.EmbedPDF.csproj @@ -1,7 +1,7 @@ - 11.0.4 + 11.0.5 bb-embedpdf diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/annotation-style-BZv7nj7j-BDYrzgLn.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/annotation-style-BZv7nj7j-z_uZITv9.js similarity index 99% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/annotation-style-BZv7nj7j-BDYrzgLn.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/annotation-style-BZv7nj7j-z_uZITv9.js index d39e6786..0a272514 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/annotation-style-BZv7nj7j-BDYrzgLn.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/annotation-style-BZv7nj7j-z_uZITv9.js @@ -1,5 +1,5 @@ -import { u as y, d as G, F as Z, $ as H, a0 as U, e as O, a1 as V, x as B, a2 as _, h as t, j as p, a3 as X, a4 as j, a5 as Y, g as L, r as D, E as J, i as W, a6 as Q, a7 as $, a8 as ee, a9 as te, W as ne, s as le, aa as ae } from "./wasm-url-asset-sqnq1cad.js"; -import { u as x } from "./labels-C6_i87Oj-BpJCC3cf.js"; +import { u as y, d as G, F as Z, $ as H, a0 as U, e as O, a1 as V, x as B, a2 as _, h as t, j as p, a3 as X, a4 as j, a5 as Y, g as L, r as D, E as J, i as W, a6 as Q, a7 as $, a8 as ee, a9 as te, W as ne, s as le, aa as ae } from "./wasm-url-asset-Dc0HnHB_.js"; +import { u as x } from "./labels-C6_i87Oj-xAdFtKWd.js"; const re = [ "#000000", "#5f6368", @@ -765,4 +765,4 @@ function Se() { export { Te as AnnotationStylePanel }; -//# sourceMappingURL=annotation-style-BZv7nj7j-BDYrzgLn.js.map +//# sourceMappingURL=annotation-style-BZv7nj7j-z_uZITv9.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/attachments-panel-CBvOCDpU-DcNUtnoD.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/attachments-panel-CBvOCDpU-B7OO6xRT.js similarity index 97% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/attachments-panel-CBvOCDpU-DcNUtnoD.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/attachments-panel-CBvOCDpU-B7OO6xRT.js index ce0aeef5..0408298f 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/attachments-panel-CBvOCDpU-DcNUtnoD.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/attachments-panel-CBvOCDpU-B7OO6xRT.js @@ -1,4 +1,4 @@ -import { u as k, N as F, at as O, au as j, F as A, P, m as B, av as L, s as N, g as S, n as z, h as n, H as E, aw as I, k as M, j as $, Q as H } from "./wasm-url-asset-sqnq1cad.js"; +import { u as k, N as F, at as O, au as j, F as A, P, m as B, av as L, s as N, g as S, n as z, h as n, H as E, aw as I, k as M, j as $, Q as H } from "./wasm-url-asset-Dc0HnHB_.js"; function R(t, r) { const [s, o] = t < 1e3 ? [t, "byte"] : t < 1e6 ? [t / 1e3, "kilobyte"] : [t / 1e6, "megabyte"]; return new Intl.NumberFormat(r, { @@ -142,4 +142,4 @@ function Q() { export { G as AttachmentsPanel }; -//# sourceMappingURL=attachments-panel-CBvOCDpU-DcNUtnoD.js.map +//# sourceMappingURL=attachments-panel-CBvOCDpU-B7OO6xRT.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/comments-panel-BJ1GRhZ0-BOiDUolf.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/comments-panel-BJ1GRhZ0-MnxRXHtZ.js similarity index 99% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/comments-panel-BJ1GRhZ0-BOiDUolf.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/comments-panel-BJ1GRhZ0-MnxRXHtZ.js index dbda96a6..3199d067 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/comments-panel-BJ1GRhZ0-BOiDUolf.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/comments-panel-BJ1GRhZ0-MnxRXHtZ.js @@ -1,4 +1,4 @@ -import { u as v, x as I, y as w, z as _, B as R, C as W, D as Y, n as D, s as P, E as A, r as H, h as t, F as $, G as j, j as T, H as G, g as q, J, K as Q, W as E, i as K, o as U, L as V, N as X, R as Z, P as ee, Q as te } from "./wasm-url-asset-sqnq1cad.js"; +import { u as v, x as I, y as w, z as _, B as R, C as W, D as Y, n as D, s as P, E as A, r as H, h as t, F as $, G as j, j as T, H as G, g as q, J, K as Q, W as E, i as K, o as U, L as V, N as X, R as Z, P as ee, Q as te } from "./wasm-url-asset-Dc0HnHB_.js"; const ne = { text: { icon: "message", @@ -467,4 +467,4 @@ function fe(e) { export { ge as CommentsPanel }; -//# sourceMappingURL=comments-panel-BJ1GRhZ0-BOiDUolf.js.map +//# sourceMappingURL=comments-panel-BJ1GRhZ0-MnxRXHtZ.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/embedpdf-worker.source-CCHXFWYh-CTEHza5m.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/embedpdf-worker.source-CCHXFWYh-CTEHza5m.js deleted file mode 100644 index 2fa2f9a7..00000000 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/embedpdf-worker.source-CCHXFWYh-CTEHza5m.js +++ /dev/null @@ -1,5 +0,0 @@ -var e = '"use strict";(()=>{let e,t,n,r,i,o,a,s,l,u,d,c,f,m,p;var h,F,g,_,P,D,b,y,w=Object.defineProperty,E=Object.getOwnPropertyNames,A=(e=function(e){if("u">typeof require)return require.apply(this,arguments);throw Error(\'Dynamic require of "\'+e+\'" is not supported\')},"u">typeof require?require:"u">typeof Proxy?new Proxy(e,{get:(e,t)=>("u">typeof require?require:e)[t]}):e),v=(e,t)=>{for(var n in t)w(e,n,{get:t[n],enumerable:!0})},S=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?w(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n},k={};v(k,{default:()=>_});var x=(t={"../runtime/npm/wasm32/lib/embedpdf.browser.js"(){var e;e=self.location.href,_=function(t={}){var n,r,i,o,a,s,l,u,d,c,f,m,p,h,F,g,_,P,D,b,y=new Promise((e,t)=>{n=e,r=t});["_EPDF_CheckPasswordPermissions","_EPDF_DigestBuffer","_EPDF_FreeBuffer","_EPDF_GetDecodedImageBytes","_EPDF_GetMetaKeyCount","_EPDF_GetMetaKeyName","_EPDF_GetMetaTrapped","_EPDF_GetPageBoxByIndex","_EPDF_GetPageRotateByIndex","_EPDF_GetPageTabOrderByIndex","_EPDF_GetPageUserUnitByIndex","_EPDF_HasMetaText","_EPDF_InitThread","_EPDF_IsEncrypted","_EPDF_IsOwnerUnlocked","_EPDF_LoadBaseDocument","_EPDF_LoadMemBaseDocument","_EPDF_LoadMemBaseDocument64","_EPDF_LoadPageNormalized","_EPDF_PNG_EncodeRGBA","_EPDF_ReleaseBaseDocument","_EPDF_RemoveEncryption","_EPDF_RenderAnnotBitmap","_EPDF_RenderAnnotBitmapUnrotated","_EPDF_RenderPage_Continue","_EPDF_RenderPageBitmapWithMatrix_Start","_EPDF_SaveAsCopyEx","_EPDF_SaveDocumentToOwnedBuffer","_EPDF_SaveDocumentToOwnedBufferEx","_EPDF_SaveDocumentToOwnedBufferWithVersion","_EPDF_SetBaseDocumentSha256","_EPDF_SetDecodedImageBudget","_EPDF_SetEncryption","_EPDF_SetMetaText","_EPDF_SetMetaTrapped","_EPDF_SetRuntimeOwnerPermissions","_EPDF_ShutdownThread","_EPDF_UnlockOwnerPermissions","_EPDFAction_CloseModel","_EPDFAction_CreateGoTo","_EPDFAction_CreateGoToNamed","_EPDFAction_CreateHide","_EPDFAction_CreateJavaScript","_EPDFAction_CreateLaunch","_EPDFAction_CreateNamed","_EPDFAction_CreateRemoteGoToByName","_EPDFAction_CreateRemoteGoToDest","_EPDFAction_CreateResetForm","_EPDFAction_CreateSubmitForm","_EPDFAction_CreateURI","_EPDFAction_GetNextAt","_EPDFAction_GetNextCount","_EPDFAction_GetNodeCount","_EPDFAction_GetNodeDest","_EPDFAction_GetNodeFilePath","_EPDFAction_GetNodeHideFlag","_EPDFAction_GetNodeJavaScript","_EPDFAction_GetNodeName","_EPDFAction_GetNodeResetForm","_EPDFAction_GetNodeSubmitForm","_EPDFAction_GetNodeSubmitFormCharSet","_EPDFAction_GetNodeSubmitFormURL","_EPDFAction_GetNodeSubtype","_EPDFAction_GetNodeTargetCount","_EPDFAction_GetNodeTargetName","_EPDFAction_GetNodeTargetObjectNumber","_EPDFAction_GetNodeType","_EPDFAction_GetNodeURI","_EPDFAction_GetNodeURIIsMap","_EPDFAction_GetRootNode","_EPDFAction_GetWarningFlags","_EPDFAction_IsComplete","_EPDFAction_LoadModel","_EPDFAction_NodeHasJavaScript","_EPDFAction_SetNext","_EPDFAnnot_AddMeasure","_EPDFAnnot_ClearBorderEffect","_EPDFAnnot_ClearColor","_EPDFAnnot_ClearEmbedMetadata","_EPDFAnnot_ClearEmbedMetadataKey","_EPDFAnnot_ClearMKColor","_EPDFAnnot_ClearMKIcon","_EPDFAnnot_ClearRectangleDifferences","_EPDFAnnot_ExportAppearance","_EPDFAnnot_GenerateAppearance","_EPDFAnnot_GenerateAppearanceWithBlend","_EPDFAnnot_GenerateFormFieldAP","_EPDFAnnot_GetActionModel","_EPDFAnnot_GetAPMatrix","_EPDFAnnot_GetAppearanceState","_EPDFAnnot_GetAppearanceStateCount","_EPDFAnnot_GetAppearanceStateName","_EPDFAnnot_GetAppearanceTransform","_EPDFAnnot_GetAvailableAppearanceModes","_EPDFAnnot_GetBlendMode","_EPDFAnnot_GetBooleanValue","_EPDFAnnot_GetBorderDashPattern","_EPDFAnnot_GetBorderDashPatternCount","_EPDFAnnot_GetBorderEffect","_EPDFAnnot_GetBorderStyle","_EPDFAnnot_GetCalloutLine","_EPDFAnnot_GetCalloutLineCount","_EPDFAnnot_GetColor","_EPDFAnnot_GetDefaultAppearance","_EPDFAnnot_GetDefaultAppearanceFontFace","_EPDFAnnot_GetDefaultAppearanceFontPostScriptName","_EPDFAnnot_GetDrawing","_EPDFAnnot_GetDrawingRect","_EPDFAnnot_GetEmbedMetadataBoolean","_EPDFAnnot_GetEmbedMetadataJSON","_EPDFAnnot_GetEmbedMetadataNumber","_EPDFAnnot_GetEmbedMetadataRect","_EPDFAnnot_GetEmbedMetadataString","_EPDFAnnot_GetFileAttachmentForWrite","_EPDFAnnot_GetIntent","_EPDFAnnot_GetLineCaption","_EPDFAnnot_GetLineEndings","_EPDFAnnot_GetLineLeader","_EPDFAnnot_GetMeasure","_EPDFAnnot_GetMKColor","_EPDFAnnot_GetMKIcon","_EPDFAnnot_GetMKRotation","_EPDFAnnot_GetMKText","_EPDFAnnot_GetMKTextPosition","_EPDFAnnot_GetName","_EPDFAnnot_GetObjectNumber","_EPDFAnnot_GetOpacity","_EPDFAnnot_GetOverlayText","_EPDFAnnot_GetOverlayTextRepeat","_EPDFAnnot_GetRect","_EPDFAnnot_GetRectangleDifferences","_EPDFAnnot_GetReplyType","_EPDFAnnot_GetRichContent","_EPDFAnnot_GetRichTextJSON","_EPDFAnnot_GetRotate","_EPDFAnnot_GetShapeCaption","_EPDFAnnot_GetStructurePosition","_EPDFAnnot_GetTextAlignment","_EPDFAnnot_HasAppearanceStream","_EPDFAnnot_HasEmbedMetadata","_EPDFAnnot_HasMKIcon","_EPDFAnnot_IsValid","_EPDFAnnot_RemoveAction","_EPDFAnnot_RemoveDest","_EPDFAnnot_RemoveKey","_EPDFAnnot_RemoveMeasure","_EPDFAnnot_SetAction","_EPDFAnnot_SetAPMatrix","_EPDFAnnot_SetAppearanceFromPage","_EPDFAnnot_SetBooleanValue","_EPDFAnnot_SetBorderDashPattern","_EPDFAnnot_SetBorderEffect","_EPDFAnnot_SetBorderStyle","_EPDFAnnot_SetCalloutLine","_EPDFAnnot_SetColor","_EPDFAnnot_SetDefaultAppearance","_EPDFAnnot_SetDefaultAppearanceDocumentFont","_EPDFAnnot_SetDefaultAppearanceRegisteredFont","_EPDFAnnot_SetDrawing","_EPDFAnnot_SetEmbedMetadataBoolean","_EPDFAnnot_SetEmbedMetadataJSON","_EPDFAnnot_SetEmbedMetadataNumber","_EPDFAnnot_SetEmbedMetadataRect","_EPDFAnnot_SetEmbedMetadataString","_EPDFAnnot_SetEventAction","_EPDFAnnot_SetIntent","_EPDFAnnot_SetLine","_EPDFAnnot_SetLineCaption","_EPDFAnnot_SetLineEndings","_EPDFAnnot_SetLineLeader","_EPDFAnnot_SetLinkedAnnot","_EPDFAnnot_SetMKColor","_EPDFAnnot_SetMKIcon","_EPDFAnnot_SetMKRotation","_EPDFAnnot_SetMKText","_EPDFAnnot_SetMKTextPosition","_EPDFAnnot_SetName","_EPDFAnnot_SetNoColor","_EPDFAnnot_SetNumberValue","_EPDFAnnot_SetOpacity","_EPDFAnnot_SetOverlayText","_EPDFAnnot_SetOverlayTextRepeat","_EPDFAnnot_SetRect","_EPDFAnnot_SetReplyType","_EPDFAnnot_SetRichTextJSON","_EPDFAnnot_SetRichTextXHTML","_EPDFAnnot_SetRotate","_EPDFAnnot_SetShapeCaption","_EPDFAnnot_SetStampOpacity","_EPDFAnnot_SetSubtype","_EPDFAnnot_SetTextAlignment","_EPDFAnnot_SetVertices","_EPDFAnnot_UpdateAppearanceToRect","_EPDFAttachment_ExportCanonicalToOwnedBuffer","_EPDFAttachment_ExportRawToOwnedBuffer","_EPDFAttachment_ExtractFile","_EPDFAttachment_ExtractFileToOwnedBuffer","_EPDFAttachment_GetDescription","_EPDFAttachment_GetIntegerValue","_EPDFAttachment_ImportRaw","_EPDFAttachment_SetDescription","_EPDFAttachment_SetName","_EPDFAttachment_SetSubtype","_EPDFCatalog_GetLanguage","_EPDFCatalog_GetMetadata","_EPDFCatalog_SetMetadata","_EPDFDest_CreateRemoteView","_EPDFDest_CreateRemoteXYZ","_EPDFDest_CreateView","_EPDFDest_CreateViewByObjectNumber","_EPDFDest_CreateXYZ","_EPDFDest_CreateXYZByObjectNumber","_EPDFDest_GetPageObjectNumber","_EPDFDest_GetViewNullParams","_EPDFDoc_CanonicalDrawing","_EPDFDoc_ClearMissingCharacters","_EPDFDoc_ClearPagePieceInfoEntry","_EPDFDoc_ClearPagePieceInfoKey","_EPDFDoc_ClearPieceInfoEntry","_EPDFDoc_ClearPieceInfoKey","_EPDFDoc_CompareRevisions","_EPDFDoc_CountMissingCharacters","_EPDFDoc_DeletePageByObjectNumber","_EPDFDoc_ExportDictCanonicalToOwnedBuffer","_EPDFDoc_ExportDictRawToOwnedBuffer","_EPDFDoc_ExportDrawing","_EPDFDoc_ExportPagesFlattened","_EPDFDoc_GetAdditionalActionModel","_EPDFDoc_GetAttachmentIndexByKey","_EPDFDoc_GetAttachmentKey","_EPDFDoc_GetBaseBytesSize","_EPDFDoc_GetDrawings","_EPDFDoc_GetFontDisplayProgramCoverage","_EPDFDoc_GetFontDisplayProgramData","_EPDFDoc_GetFontEmbeddingPolicy","_EPDFDoc_GetFontProgramData","_EPDFDoc_GetFontsFingerprint","_EPDFDoc_GetImportFieldRoots","_EPDFDoc_GetLastModified","_EPDFDoc_GetLoadedBytesSize","_EPDFDoc_GetLoadedObjectValue","_EPDFDoc_GetMissingCharacter","_EPDFDoc_GetNamedJavaScriptActionModel","_EPDFDoc_GetNamedPageAt","_EPDFDoc_GetNamedPageCount","_EPDFDoc_GetOpenActionDest","_EPDFDoc_GetOpenActionModel","_EPDFDoc_GetPageActionModel","_EPDFDoc_GetPageLabelSectionAt","_EPDFDoc_GetPageLabelSectionCount","_EPDFDoc_GetPageLastModified","_EPDFDoc_GetPageObjectNumberByIndex","_EPDFDoc_GetPagePieceInfoBoolean","_EPDFDoc_GetPagePieceInfoEntryAt","_EPDFDoc_GetPagePieceInfoEntryCount","_EPDFDoc_GetPagePieceInfoKeyAt","_EPDFDoc_GetPagePieceInfoKeyCount","_EPDFDoc_GetPagePieceInfoLastModified","_EPDFDoc_GetPagePieceInfoName","_EPDFDoc_GetPagePieceInfoNumber","_EPDFDoc_GetPagePieceInfoString","_EPDFDoc_GetPagePieceInfoStringArrayAt","_EPDFDoc_GetPagePieceInfoStringArrayCount","_EPDFDoc_GetPagePieceInfoValueType","_EPDFDoc_GetPieceInfoBoolean","_EPDFDoc_GetPieceInfoEntryAt","_EPDFDoc_GetPieceInfoEntryCount","_EPDFDoc_GetPieceInfoKeyAt","_EPDFDoc_GetPieceInfoKeyCount","_EPDFDoc_GetPieceInfoLastModified","_EPDFDoc_GetPieceInfoName","_EPDFDoc_GetPieceInfoNumber","_EPDFDoc_GetPieceInfoString","_EPDFDoc_GetPieceInfoStringArrayAt","_EPDFDoc_GetPieceInfoStringArrayCount","_EPDFDoc_GetPieceInfoValueType","_EPDFDoc_GetRevision","_EPDFDoc_GetRevisionCount","_EPDFDoc_GetStructureObjectNumbers","_EPDFDoc_GetTypographicFeatures","_EPDFDoc_HasPagePieceInfoEntry","_EPDFDoc_HasPieceInfoEntry","_EPDFDoc_ImportDictRaw","_EPDFDoc_ImportDrawing","_EPDFDoc_ImportPages","_EPDFDoc_LoadPageByObjectNumber","_EPDFDoc_LoadPageByObjectNumberNormalized","_EPDFDoc_OpenBaseOverlay","_EPDFDoc_OpenBaseOverlayFromPath","_EPDFDoc_OpenRevision","_EPDFDoc_ReadLoadedBytes","_EPDFDoc_RemoveNamedPage","_EPDFDoc_RemoveNamedPagesForPage","_EPDFDoc_ResolveFonts","_EPDFDoc_SetFontEmbeddingPolicy","_EPDFDoc_SetNamedPage","_EPDFDoc_SetPageLabelSections","_EPDFDoc_SetPagePieceInfoBoolean","_EPDFDoc_SetPagePieceInfoName","_EPDFDoc_SetPagePieceInfoNumber","_EPDFDoc_SetPagePieceInfoString","_EPDFDoc_SetPagePieceInfoStringArray","_EPDFDoc_SetPageRotationByObjectNumber","_EPDFDoc_SetPieceInfoBoolean","_EPDFDoc_SetPieceInfoName","_EPDFDoc_SetPieceInfoNumber","_EPDFDoc_SetPieceInfoString","_EPDFDoc_SetPieceInfoStringArray","_EPDFDoc_SetTypographicFeatures","_EPDFDoc_StartLoadPageByObjectNumber","_EPDFDocument_ClearEmbedMetadata","_EPDFDss_Add","_EPDFDss_GetCount","_EPDFDss_GetData","_EPDFFont_AddFallbackFont","_EPDFFont_AuthorizeEditing","_EPDFFont_ClearFallbackFonts","_EPDFFont_ClearRegisteredFonts","_EPDFFont_GetCoverage","_EPDFFont_GetEmbeddingPermission","_EPDFFont_GetFallbackOrder","_EPDFFont_GetFamilyName","_EPDFFont_GetLastResortFont","_EPDFFont_GetMetrics","_EPDFFont_GetPostScriptName","_EPDFFont_GetProgramData","_EPDFFont_GetProgramFormat","_EPDFFont_GetProgramHash","_EPDFFont_GetWeight","_EPDFFont_IsEditingAuthorized","_EPDFFont_IsInstanced","_EPDFFont_IsItalic","_EPDFFont_RegisterFont","_EPDFFont_RegisterMemFont","_EPDFFont_RegisterMemFont64","_EPDFFont_SetLastResortFont","_EPDFFontFaces_Close","_EPDFFontFaces_Count","_EPDFFontFaces_CountPrograms","_EPDFFontFaces_GetFamily","_EPDFFontFaces_GetProgramDisplayHash","_EPDFFontFaces_GetProgramEmbedded","_EPDFFontFaces_GetProgramEmbeddingPermission","_EPDFFontFaces_GetProgramFormat","_EPDFFontFaces_GetProgramHash","_EPDFFontFaces_GetProgramMetrics","_EPDFFontFaces_GetProgramObjNum","_EPDFFontFaces_GetProgramPostScriptName","_EPDFFontFaces_GetWeight","_EPDFFontFaces_IsItalic","_EPDFFontFaces_Load","_EPDFFontFaces_ProgramMapsUnicode","_EPDFFontResolution_Close","_EPDFFontResolution_CountMissingCharacters","_EPDFFontResolution_GetBaseFontName","_EPDFFontResolution_GetFallbacks","_EPDFFontResolution_GetFamily","_EPDFFontResolution_GetMissingCharacter","_EPDFFontResolution_GetProgramDisplayHash","_EPDFFontResolution_GetProgramObjNum","_EPDFFontResolution_GetRegisteredFont","_EPDFFontResolution_GetSource","_EPDFFontResolution_GetWeight","_EPDFFontResolution_IsDegraded","_EPDFFontResolution_IsItalic","_EPDFForm_AttachWidget","_EPDFForm_ClearFieldEmbedMetadata","_EPDFForm_ClearFieldEmbedMetadataKey","_EPDFForm_CloseModel","_EPDFForm_CountCalculationOrder","_EPDFForm_CountFieldDefaultValues","_EPDFForm_CountFieldOptions","_EPDFForm_CountFields","_EPDFForm_CountFieldValues","_EPDFForm_CountFieldWidgets","_EPDFForm_CreateField","_EPDFForm_DeleteField","_EPDFForm_DetachWidget","_EPDFForm_ExportFDF","_EPDFForm_ExportFieldRawToOwnedBuffer","_EPDFForm_ExportXFDF","_EPDFForm_GetCalculationOrderFieldIndex","_EPDFForm_GetFieldActionModel","_EPDFForm_GetFieldAlternateName","_EPDFForm_GetFieldDefaultValueAt","_EPDFForm_GetFieldDefaultValueKind","_EPDFForm_GetFieldEmbedMetadataBoolean","_EPDFForm_GetFieldEmbedMetadataJSON","_EPDFForm_GetFieldEmbedMetadataNumber","_EPDFForm_GetFieldEmbedMetadataString","_EPDFForm_GetFieldFamily","_EPDFForm_GetFieldFlags","_EPDFForm_GetFieldIndexByObjNum","_EPDFForm_GetFieldIndexForWidget","_EPDFForm_GetFieldMappingName","_EPDFForm_GetFieldMaxLen","_EPDFForm_GetFieldName","_EPDFForm_GetFieldObjNum","_EPDFForm_GetFieldOptionLabel","_EPDFForm_GetFieldOptionValue","_EPDFForm_GetFieldOrigin","_EPDFForm_GetFieldPartialName","_EPDFForm_GetFieldTopIndex","_EPDFForm_GetFieldValueAt","_EPDFForm_GetFieldValueKind","_EPDFForm_GetFieldWidgetExportValue","_EPDFForm_GetFieldWidgetObjNum","_EPDFForm_GetFieldWidgetOnState","_EPDFForm_GetFieldWidgetPageObjNum","_EPDFForm_GetFieldWidgetRect","_EPDFForm_GetFormKind","_EPDFForm_GetNeedAppearances","_EPDFForm_HasFieldEmbedMetadata","_EPDFForm_HasFieldValuesList","_EPDFForm_ImportFieldRaw","_EPDFForm_IsFieldOptionSelected","_EPDFForm_IsFieldWidgetChecked","_EPDFForm_LoadModel","_EPDFForm_RedrawFieldWidgets","_EPDFForm_Repair","_EPDFForm_SetCalculationOrder","_EPDFForm_SetFieldAlternateName","_EPDFForm_SetFieldAppearanceText","_EPDFForm_SetFieldDefaultValue","_EPDFForm_SetFieldDisplay","_EPDFForm_SetFieldEmbedMetadataBoolean","_EPDFForm_SetFieldEmbedMetadataJSON","_EPDFForm_SetFieldEmbedMetadataNumber","_EPDFForm_SetFieldEmbedMetadataString","_EPDFForm_SetFieldEventAction","_EPDFForm_SetFieldFlags","_EPDFForm_SetFieldMappingName","_EPDFForm_SetFieldMaxLen","_EPDFForm_SetFieldName","_EPDFForm_SetFieldOptions","_EPDFForm_SetFieldSelectedIndices","_EPDFForm_SetFieldValue","_EPDFForm_SetFieldWidgetsChecked","_EPDFImageObj_SetJpeg","_EPDFImageObj_SetPng","_EPDFLayer_AbortTransaction","_EPDFLayer_BeginTransaction","_EPDFLayer_CommitTransaction","_EPDFLayer_GetBaseDocument","_EPDFLayer_GetBaseSha256","_EPDFLayer_GetBirthName","_EPDFLayer_GetBirthObjectNumber","_EPDFLayer_GetLastObjectNumber","_EPDFLayer_GetPromotedObjectCount","_EPDFLayer_IsInTransaction","_EPDFLayer_IsObjectPromoted","_EPDFLayer_IsPagePromoted","_EPDFLayer_OpenLayer","_EPDFLayer_OpenLayerArtifact","_EPDFLayer_OpenLayerArtifactFromPath","_EPDFLayer_RaiseLastObjectNumber","_EPDFLayer_SaveDelta","_EPDFLayer_SaveDeltaEx","_EPDFLayer_SaveDeltaToOwnedBuffer","_EPDFLayer_SaveDeltaToOwnedBufferEx","_EPDFLayer_SaveLayerArtifact","_EPDFLayer_SaveLayerArtifactEx","_EPDFLayer_SaveLayerArtifactToOwnedBuffer","_EPDFLayer_SaveLayerArtifactToOwnedBufferEx","_EPDFMeasure_AddFormat","_EPDFMeasure_CountFormats","_EPDFMeasure_GetCYX","_EPDFMeasure_GetFormat","_EPDFMeasure_GetOrigin","_EPDFMeasure_GetRatio","_EPDFMeasure_GetSubtype","_EPDFMeasure_RemoveFormats","_EPDFMeasure_SetCYX","_EPDFMeasure_SetOrigin","_EPDFMeasure_SetRatio","_EPDFNamedDest_Remove","_EPDFNamedDest_SetDest","_EPDFNumberFormat_GetConversion","_EPDFNumberFormat_GetFixedDenominator","_EPDFNumberFormat_GetFraction","_EPDFNumberFormat_GetLabelPosition","_EPDFNumberFormat_GetPrecision","_EPDFNumberFormat_GetText","_EPDFNumberFormat_GetUnit","_EPDFNumberFormat_SetConversion","_EPDFNumberFormat_SetFixedDenominator","_EPDFNumberFormat_SetFraction","_EPDFNumberFormat_SetLabelPosition","_EPDFNumberFormat_SetPrecision","_EPDFNumberFormat_SetText","_EPDFNumberFormat_SetUnit","_EPDFObjectDiff_Close","_EPDFObjectDiff_GetCount","_EPDFObjectDiff_GetEntry","_EPDFObjectDiff_GetReadStatus","_EPDFObjectDiff_GetReferrer","_EPDFObjectDiff_GetReferrerCount","_EPDFObjectDiff_GetRevisionHealth","_EPDFObjectDiff_GetValue","_EPDFOutline_CreateItem","_EPDFOutline_DeleteItem","_EPDFOutline_ExportItemRawToOwnedBuffer","_EPDFOutline_GetItem","_EPDFOutline_GetObjectNumber","_EPDFOutline_ImportItemRaw","_EPDFOutline_MoveItem","_EPDFOutline_SetAction","_EPDFOutline_SetColor","_EPDFOutline_SetOpen","_EPDFOutline_SetStyle","_EPDFOutline_SetTitle","_EPDFPage_AddViewport","_EPDFPage_AddViewportRaw","_EPDFPage_ApplyRedactions","_EPDFPage_ContinueLoad","_EPDFPage_CountViewports","_EPDFPage_CountViewportsRaw","_EPDFPage_CreateAnnot","_EPDFPage_CreateAnnotRaw","_EPDFPage_ExportAnnotationsAsDocument","_EPDFPage_ExportAnnotsRawToOwnedBuffer","_EPDFPage_ExportRawToOwnedBuffer","_EPDFPage_FindViewport","_EPDFPage_Flatten","_EPDFPage_FlattenAnnotations","_EPDFPage_GetAnnotByName","_EPDFPage_GetAnnotByObjectNumber","_EPDFPage_GetAnnotCountRaw","_EPDFPage_GetAnnotIndexByNameRaw","_EPDFPage_GetAnnotIndexByObjectNumberRaw","_EPDFPage_GetAnnotRaw","_EPDFPage_GetObjectNumber","_EPDFPage_GetParsedSize","_EPDFPage_GetViewport","_EPDFPage_GetViewportRaw","_EPDFPage_ImportAnnotsRaw","_EPDFPage_ImportRaw","_EPDFPage_InsertBlankRaw","_EPDFPage_IsContentCurrent","_EPDFPage_IsValid","_EPDFPage_MoveAnnots","_EPDFPage_MoveAnnotsRaw","_EPDFPage_PromoteInlineAnnotsRaw","_EPDFPage_RemoveAnnot","_EPDFPage_RemoveAnnotByName","_EPDFPage_RemoveAnnotByObjectNumber","_EPDFPage_RemoveAnnotRaw","_EPDFPage_RemoveViewport","_EPDFPage_RemoveViewportRaw","_EPDFPage_ResetRenderCache","_EPDFSig_CloseModel","_EPDFSig_Count","_EPDFSig_DigestByteRange","_EPDFSig_DigestFileRange","_EPDFSig_GetByteRange","_EPDFSig_GetContents","_EPDFSig_GetCoverage","_EPDFSig_GetDocMDPPermission","_EPDFSig_GetFieldMDPAction","_EPDFSig_GetFieldName","_EPDFSig_GetFieldNameAt","_EPDFSig_GetFieldNameCount","_EPDFSig_GetFieldObjNum","_EPDFSig_GetIndexByFieldObjNum","_EPDFSig_GetKind","_EPDFSig_GetLockAction","_EPDFSig_GetLockPermission","_EPDFSig_GetRevisionIndex","_EPDFSig_GetSeedValueFilter","_EPDFSig_GetSeedValueListAt","_EPDFSig_GetSeedValueListCount","_EPDFSig_GetSeedValueMDP","_EPDFSig_GetSeedValuePresentFlags","_EPDFSig_GetSeedValueRequiredFlags","_EPDFSig_GetSeedValueVersion","_EPDFSig_GetString","_EPDFSig_GetValueObjNum","_EPDFSig_GetWidgetObjNum","_EPDFSig_GetWidgetPageObjNum","_EPDFSig_HasSeedValue","_EPDFSig_IsCatalogCertification","_EPDFSig_IsRevisionChainValid","_EPDFSig_IsSigned","_EPDFSig_LoadModel","_EPDFSig_Prepare","_EPDFSig_SaveCandidate","_EPDFSig_SaveCandidateToOwnedBuffer","_EPDFSig_Seal","_EPDFSig_SealSpan","_EPDFSig_SetFieldLock","_EPDFSig_WriteContents","_EPDFText_GetCharGeometry","_EPDFText_GetCharToTextMap","_EPDFText_GetPageGeometry","_EPDFText_GetTextFull","_EPDFText_RedactInQuads","_EPDFText_RedactInRect","_EPDFViewport_AddMeasure","_EPDFViewport_Close","_EPDFViewport_GetBBox","_EPDFViewport_GetMeasure","_EPDFViewport_GetName","_EPDFViewport_RemoveMeasure","_EPDFViewport_SetBBox","_EPDFViewport_SetName","_FORM_CanRedo","_FORM_CanUndo","_FORM_DoDocumentAAction","_FORM_DoDocumentJSAction","_FORM_DoDocumentOpenAction","_FORM_DoPageAAction","_FORM_ForceToKillFocus","_FORM_GetFocusedAnnot","_FORM_GetFocusedText","_FORM_GetSelectedText","_FORM_GetTextDirection","_FORM_IsIndexSelected","_FORM_OnAfterLoadPage","_FORM_OnBeforeClosePage","_FORM_OnChar","_FORM_OnFocus","_FORM_OnKeyDown","_FORM_OnKeyUp","_FORM_OnLButtonDoubleClick","_FORM_OnLButtonDown","_FORM_OnLButtonUp","_FORM_OnMouseMove","_FORM_OnMouseWheel","_FORM_OnRButtonDown","_FORM_OnRButtonUp","_FORM_Redo","_FORM_ReplaceAndKeepSelection","_FORM_ReplaceSelection","_FORM_SelectAllText","_FORM_SetFocusedAnnot","_FORM_SetIndexSelected","_FORM_SetTextDirection","_FORM_Undo","_FPDF_AddInstalledFont","_FPDF_CloseDocument","_FPDF_ClosePage","_FPDF_CloseXObject","_FPDF_CopyViewerPreferences","_FPDF_CountNamedDests","_FPDF_CreateClipPath","_FPDF_CreateNewDocument","_FPDF_DestroyClipPath","_FPDF_DestroyLibrary","_FPDF_DeviceToPage","_FPDF_DocumentHasValidCrossReferenceTable","_FPDF_FFLDraw","_FPDF_FreeDefaultSystemFontInfo","_FPDF_GetDefaultSystemFontInfo","_FPDF_GetDefaultTTFMap","_FPDF_GetDefaultTTFMapCount","_FPDF_GetDefaultTTFMapEntry","_FPDF_GetDocPermissions","_FPDF_GetDocUserPermissions","_FPDF_GetFileIdentifier","_FPDF_GetFileVersion","_FPDF_GetFormType","_FPDF_GetLastError","_FPDF_GetMetaText","_FPDF_GetNamedDest","_FPDF_GetNamedDestByName","_FPDF_GetPageAAction","_FPDF_GetPageBoundingBox","_FPDF_GetPageCount","_FPDF_GetPageHeight","_FPDF_GetPageHeightF","_FPDF_GetPageLabel","_FPDF_GetPageSizeByIndex","_FPDF_GetPageSizeByIndexF","_FPDF_GetPageWidth","_FPDF_GetPageWidthF","_FPDF_GetSecurityHandlerRevision","_FPDF_GetSignatureCount","_FPDF_GetSignatureObject","_FPDF_GetTrailerEnds","_FPDF_GetXFAPacketContent","_FPDF_GetXFAPacketCount","_FPDF_GetXFAPacketName","_FPDF_ImportNPagesToOne","_FPDF_ImportPages","_FPDF_ImportPagesByIndex","_FPDF_InitLibrary","_FPDF_InitLibraryWithConfig","_FPDF_LoadCustomDocument","_FPDF_LoadDocument","_FPDF_LoadMemDocument","_FPDF_LoadMemDocument64","_FPDF_LoadPage","_FPDF_LoadXFA","_FPDF_MovePages","_FPDF_NewFormObjectFromXObject","_FPDF_NewXObjectFromPage","_FPDF_PageToDevice","_FPDF_RemoveFormFieldHighlight","_FPDF_RenderPage_Close","_FPDF_RenderPage_Continue","_FPDF_RenderPageBitmap","_FPDF_RenderPageBitmap_Start","_FPDF_RenderPageBitmapWithColorScheme_Start","_FPDF_RenderPageBitmapWithMatrix","_FPDF_SaveAsCopy","_FPDF_SaveWithVersion","_FPDF_SetFormFieldHighlightAlpha","_FPDF_SetFormFieldHighlightColor","_FPDF_SetSandBoxPolicy","_FPDF_SetSystemFontInfo","_FPDF_StructElement_Attr_CountChildren","_FPDF_StructElement_Attr_GetBlobValue","_FPDF_StructElement_Attr_GetBooleanValue","_FPDF_StructElement_Attr_GetChildAtIndex","_FPDF_StructElement_Attr_GetCount","_FPDF_StructElement_Attr_GetName","_FPDF_StructElement_Attr_GetNumberValue","_FPDF_StructElement_Attr_GetStringValue","_FPDF_StructElement_Attr_GetType","_FPDF_StructElement_Attr_GetValue","_FPDF_StructElement_CountChildren","_FPDF_StructElement_GetActualText","_FPDF_StructElement_GetAltText","_FPDF_StructElement_GetAttributeAtIndex","_FPDF_StructElement_GetAttributeCount","_FPDF_StructElement_GetChildAtIndex","_FPDF_StructElement_GetChildMarkedContentID","_FPDF_StructElement_GetExpansion","_FPDF_StructElement_GetID","_FPDF_StructElement_GetLang","_FPDF_StructElement_GetMarkedContentID","_FPDF_StructElement_GetMarkedContentIdAtIndex","_FPDF_StructElement_GetMarkedContentIdCount","_FPDF_StructElement_GetObjType","_FPDF_StructElement_GetParent","_FPDF_StructElement_GetRawType","_FPDF_StructElement_GetStringAttribute","_FPDF_StructElement_GetTitle","_FPDF_StructElement_GetType","_FPDF_StructTree_Close","_FPDF_StructTree_CountChildren","_FPDF_StructTree_GetChildAtIndex","_FPDF_StructTree_GetForPage","_FPDF_VIEWERREF_GetDuplex","_FPDF_VIEWERREF_GetName","_FPDF_VIEWERREF_GetNumCopies","_FPDF_VIEWERREF_GetPrintPageRange","_FPDF_VIEWERREF_GetPrintPageRangeCount","_FPDF_VIEWERREF_GetPrintPageRangeElement","_FPDF_VIEWERREF_GetPrintScaling","_FPDFAction_GetDest","_FPDFAction_GetFilePath","_FPDFAction_GetType","_FPDFAction_GetURIPath","_FPDFAnnot_AddFileAttachment","_FPDFAnnot_AddInkStroke","_FPDFAnnot_AppendAttachmentPoints","_FPDFAnnot_AppendObject","_FPDFAnnot_CountAttachmentPoints","_FPDFAnnot_GetAP","_FPDFAnnot_GetAttachmentPoints","_FPDFAnnot_GetBorder","_FPDFAnnot_GetColor","_FPDFAnnot_GetFileAttachment","_FPDFAnnot_GetFlags","_FPDFAnnot_GetFocusableSubtypes","_FPDFAnnot_GetFocusableSubtypesCount","_FPDFAnnot_GetFontColor","_FPDFAnnot_GetFontSize","_FPDFAnnot_GetFormAdditionalActionJavaScript","_FPDFAnnot_GetFormControlCount","_FPDFAnnot_GetFormControlIndex","_FPDFAnnot_GetFormFieldAlternateName","_FPDFAnnot_GetFormFieldAtPoint","_FPDFAnnot_GetFormFieldExportValue","_FPDFAnnot_GetFormFieldFlags","_FPDFAnnot_GetFormFieldName","_FPDFAnnot_GetFormFieldType","_FPDFAnnot_GetFormFieldValue","_FPDFAnnot_GetInkListCount","_FPDFAnnot_GetInkListPath","_FPDFAnnot_GetLine","_FPDFAnnot_GetLink","_FPDFAnnot_GetLinkedAnnot","_FPDFAnnot_GetNumberValue","_FPDFAnnot_GetObject","_FPDFAnnot_GetObjectCount","_FPDFAnnot_GetOptionCount","_FPDFAnnot_GetOptionLabel","_FPDFAnnot_GetRect","_FPDFAnnot_GetStringValue","_FPDFAnnot_GetSubtype","_FPDFAnnot_GetValueType","_FPDFAnnot_GetVertices","_FPDFAnnot_HasAttachmentPoints","_FPDFAnnot_HasKey","_FPDFAnnot_IsChecked","_FPDFAnnot_IsObjectSupportedSubtype","_FPDFAnnot_IsOptionSelected","_FPDFAnnot_IsSupportedSubtype","_FPDFAnnot_RemoveInkList","_FPDFAnnot_RemoveObject","_FPDFAnnot_SetAP","_FPDFAnnot_SetAttachmentPoints","_FPDFAnnot_SetBorder","_FPDFAnnot_SetColor","_FPDFAnnot_SetFlags","_FPDFAnnot_SetFocusableSubtypes","_FPDFAnnot_SetFontColor","_FPDFAnnot_SetFormFieldFlags","_FPDFAnnot_SetRect","_FPDFAnnot_SetStringValue","_FPDFAnnot_SetURI","_FPDFAnnot_UpdateObject","_FPDFAttachment_GetAFRelationship","_FPDFAttachment_GetDescription","_FPDFAttachment_GetFile","_FPDFAttachment_GetName","_FPDFAttachment_GetStringValue","_FPDFAttachment_GetSubtype","_FPDFAttachment_GetValueType","_FPDFAttachment_HasKey","_FPDFAttachment_SetDescription","_FPDFAttachment_SetFile","_FPDFAttachment_SetStringValue","_FPDFAvail_Create","_FPDFAvail_Destroy","_FPDFAvail_GetDocument","_FPDFAvail_GetFirstPageNum","_FPDFAvail_IsDocAvail","_FPDFAvail_IsFormAvail","_FPDFAvail_IsLinearized","_FPDFAvail_IsPageAvail","_FPDFBitmap_Create","_FPDFBitmap_CreateEx","_FPDFBitmap_Destroy","_FPDFBitmap_FillRect","_FPDFBitmap_GetBuffer","_FPDFBitmap_GetFormat","_FPDFBitmap_GetHeight","_FPDFBitmap_GetStride","_FPDFBitmap_GetWidth","_FPDFBookmark_Find","_FPDFBookmark_GetAction","_FPDFBookmark_GetColor","_FPDFBookmark_GetCount","_FPDFBookmark_GetDest","_FPDFBookmark_GetFirstChild","_FPDFBookmark_GetNextSibling","_FPDFBookmark_GetStyle","_FPDFBookmark_GetTitle","_FPDFCatalog_GetLanguage","_FPDFCatalog_IsTagged","_FPDFCatalog_SetLanguage","_FPDFClipPath_CountPaths","_FPDFClipPath_CountPathSegments","_FPDFClipPath_GetPathSegment","_FPDFDest_GetDestPageIndex","_FPDFDest_GetLocationInPage","_FPDFDest_GetView","_FPDFDoc_AddAttachment","_FPDFDoc_CloseJavaScriptAction","_FPDFDoc_DeleteAttachment","_FPDFDOC_ExitFormFillEnvironment","_FPDFDoc_GetAttachment","_FPDFDoc_GetAttachmentCount","_FPDFDoc_GetJavaScriptAction","_FPDFDoc_GetJavaScriptActionCount","_FPDFDoc_GetPageMode","_FPDFDOC_InitFormFillEnvironment","_FPDFFont_Close","_FPDFFont_GetAscent","_FPDFFont_GetBaseFontName","_FPDFFont_GetDescent","_FPDFFont_GetFamilyName","_FPDFFont_GetFlags","_FPDFFont_GetFontData","_FPDFFont_GetGlyphPath","_FPDFFont_GetGlyphWidth","_FPDFFont_GetIsEmbedded","_FPDFFont_GetItalicAngle","_FPDFFont_GetWeight","_FPDFFormObj_CountObjects","_FPDFFormObj_GetObject","_FPDFFormObj_RemoveObject","_FPDFGlyphPath_CountGlyphSegments","_FPDFGlyphPath_GetGlyphPathSegment","_FPDFImageObj_GetBitmap","_FPDFImageObj_GetIccProfileDataDecoded","_FPDFImageObj_GetImageDataDecoded","_FPDFImageObj_GetImageDataRaw","_FPDFImageObj_GetImageFilter","_FPDFImageObj_GetImageFilterCount","_FPDFImageObj_GetImageMetadata","_FPDFImageObj_GetImagePixelSize","_FPDFImageObj_GetRenderedBitmap","_FPDFImageObj_LoadJpegFile","_FPDFImageObj_LoadJpegFileInline","_FPDFImageObj_SetBitmap","_FPDFImageObj_SetMatrix","_FPDFJavaScriptAction_GetName","_FPDFJavaScriptAction_GetScript","_FPDFLink_CloseWebLinks","_FPDFLink_CountQuadPoints","_FPDFLink_CountRects","_FPDFLink_CountWebLinks","_FPDFLink_Enumerate","_FPDFLink_GetAction","_FPDFLink_GetAnnot","_FPDFLink_GetAnnotRect","_FPDFLink_GetDest","_FPDFLink_GetLinkAtPoint","_FPDFLink_GetLinkZOrderAtPoint","_FPDFLink_GetQuadPoints","_FPDFLink_GetRect","_FPDFLink_GetTextRange","_FPDFLink_GetURL","_FPDFLink_LoadWebLinks","_FPDFPage_CloseAnnot","_FPDFPage_CountObjects","_FPDFPage_CreateAnnot","_FPDFPage_Delete","_FPDFPage_Flatten","_FPDFPage_FormFieldZOrderAtPoint","_FPDFPage_GenerateContent","_FPDFPage_GetAnnot","_FPDFPage_GetAnnotCount","_FPDFPage_GetAnnotIndex","_FPDFPage_GetArtBox","_FPDFPage_GetBleedBox","_FPDFPage_GetCropBox","_FPDFPage_GetDecodedThumbnailData","_FPDFPage_GetMediaBox","_FPDFPage_GetObject","_FPDFPage_GetRawThumbnailData","_FPDFPage_GetRotation","_FPDFPage_GetThumbnailAsBitmap","_FPDFPage_GetTrimBox","_FPDFPage_HasFormFieldAtPoint","_FPDFPage_HasTransparency","_FPDFPage_InsertClipPath","_FPDFPage_InsertObject","_FPDFPage_InsertObjectAtIndex","_FPDFPage_New","_FPDFPage_RemoveAnnot","_FPDFPage_RemoveObject","_FPDFPage_SetArtBox","_FPDFPage_SetBleedBox","_FPDFPage_SetCropBox","_FPDFPage_SetMediaBox","_FPDFPage_SetRotation","_FPDFPage_SetTrimBox","_FPDFPage_TransformAnnots","_FPDFPage_TransFormWithClip","_FPDFPageObj_AddExistingMark","_FPDFPageObj_AddMark","_FPDFPageObj_CountMarks","_FPDFPageObj_CreateNewPath","_FPDFPageObj_CreateNewRect","_FPDFPageObj_CreateTextObj","_FPDFPageObj_Destroy","_FPDFPageObj_GetBounds","_FPDFPageObj_GetClipPath","_FPDFPageObj_GetDashArray","_FPDFPageObj_GetDashCount","_FPDFPageObj_GetDashPhase","_FPDFPageObj_GetFillColor","_FPDFPageObj_GetIsActive","_FPDFPageObj_GetLineCap","_FPDFPageObj_GetLineJoin","_FPDFPageObj_GetMark","_FPDFPageObj_GetMarkedContentID","_FPDFPageObj_GetMatrix","_FPDFPageObj_GetRenderedFillPattern","_FPDFPageObj_GetRenderedStrokePattern","_FPDFPageObj_GetRotatedBounds","_FPDFPageObj_GetStrokeColor","_FPDFPageObj_GetStrokeWidth","_FPDFPageObj_GetType","_FPDFPageObj_HasTransparency","_FPDFPageObj_NewImageObj","_FPDFPageObj_NewTextObj","_FPDFPageObj_RemoveMark","_FPDFPageObj_SetBlendMode","_FPDFPageObj_SetDashArray","_FPDFPageObj_SetDashPhase","_FPDFPageObj_SetFillColor","_FPDFPageObj_SetIsActive","_FPDFPageObj_SetLineCap","_FPDFPageObj_SetLineJoin","_FPDFPageObj_SetMatrix","_FPDFPageObj_SetStrokeColor","_FPDFPageObj_SetStrokeWidth","_FPDFPageObj_Transform","_FPDFPageObj_TransformClipPath","_FPDFPageObj_TransformF","_FPDFPageObjMark_CountParams","_FPDFPageObjMark_GetName","_FPDFPageObjMark_GetParamBlobValue","_FPDFPageObjMark_GetParamFloatValue","_FPDFPageObjMark_GetParamIntValue","_FPDFPageObjMark_GetParamKey","_FPDFPageObjMark_GetParamStringValue","_FPDFPageObjMark_GetParamValueType","_FPDFPageObjMark_RemoveParam","_FPDFPageObjMark_SetBlobParam","_FPDFPageObjMark_SetFloatParam","_FPDFPageObjMark_SetIntParam","_FPDFPageObjMark_SetStringParam","_FPDFPath_BezierTo","_FPDFPath_Close","_FPDFPath_CountSegments","_FPDFPath_GetBezierControlPoints","_FPDFPath_GetDrawMode","_FPDFPath_GetPathSegment","_FPDFPath_LineTo","_FPDFPath_MoveTo","_FPDFPath_SetDrawMode","_FPDFPathSegment_GetClose","_FPDFPathSegment_GetPoint","_FPDFPathSegment_GetType","_FPDFSignatureObj_GetByteRange","_FPDFSignatureObj_GetContents","_FPDFSignatureObj_GetDocMDPPermission","_FPDFSignatureObj_GetReason","_FPDFSignatureObj_GetSubFilter","_FPDFSignatureObj_GetTime","_FPDFText_ClosePage","_FPDFText_CountChars","_FPDFText_CountRects","_FPDFText_FindClose","_FPDFText_FindNext","_FPDFText_FindPrev","_FPDFText_FindStart","_FPDFText_GetBoundedText","_FPDFText_GetCharAngle","_FPDFText_GetCharBox","_FPDFText_GetCharIndexAtPos","_FPDFText_GetCharIndexFromTextIndex","_FPDFText_GetCharOrigin","_FPDFText_GetFillColor","_FPDFText_GetFontInfo","_FPDFText_GetFontSize","_FPDFText_GetFontWeight","_FPDFText_GetLooseCharBox","_FPDFText_GetMatrix","_FPDFText_GetRect","_FPDFText_GetSchCount","_FPDFText_GetSchResultIndex","_FPDFText_GetStrokeColor","_FPDFText_GetText","_FPDFText_GetTextIndexFromCharIndex","_FPDFText_GetTextObject","_FPDFText_GetUnicode","_FPDFText_HasUnicodeMapError","_FPDFText_IsGenerated","_FPDFText_IsHyphen","_FPDFText_LoadCidType2Font","_FPDFText_LoadFont","_FPDFText_LoadPage","_FPDFText_LoadStandardFont","_FPDFText_SetCharcodes","_FPDFText_SetPositions","_FPDFText_SetText","_FPDFTextObj_GetFont","_FPDFTextObj_GetFontSize","_FPDFTextObj_GetRenderedBitmap","_FPDFTextObj_GetText","_FPDFTextObj_GetTextRenderMode","_FPDFTextObj_SetFontSize","_FPDFTextObj_SetTextRenderMode","_malloc","_free","_memory","___indirect_function_table","onRuntimeInitialized"].forEach(e=>{Object.getOwnPropertyDescriptor(y,e)||Object.defineProperty(y,e,{get:()=>J("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>J("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})});var w="object"==typeof window,E="u">typeof WorkerGlobalScope,v="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&"renderer"!=process.type,k=!w&&!v&&!E,x=Object.assign({},t),G="./this.program",O="";if(k){if("object"==typeof process&&"function"==typeof A||"object"==typeof window||"u">typeof WorkerGlobalScope)throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)")}else if(w||E){if(E?O=self.location.href:"u">typeof document&&document.currentScript&&(O=document.currentScript.src),e&&(O=e),O=O.startsWith("blob:")?"":O.substr(0,O.replace(/[?#].*/,"").lastIndexOf("/")+1),"object"!=typeof window&&"u"{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),i=e=>(M(!Q(e),"readAsync does not work with file:// URLs"),fetch(e,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+" : "+e.url))))}else throw Error("environment detection error");var I=t.print||console.log.bind(console),N=t.printErr||console.error.bind(console);Object.assign(t,x),x=null,Object.getOwnPropertyDescriptor(t,b="fetchSettings")&&J(`\\`Module.${b}\\` was supplied but \\`${b}\\` not included in INCOMING_MODULE_JS_API`),t.arguments&&t.arguments,er("arguments","arguments_"),t.thisProgram&&(G=t.thisProgram),er("thisProgram","thisProgram"),M(void 0===t.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.read,"Module.read option was removed"),M(void 0===t.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),M(void 0===t.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),M(void 0===t.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),M(void 0===t.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),er("asm","wasmExports"),er("readAsync","readAsync"),er("readBinary","readBinary"),er("setWindowTitle","setWindowTitle"),M(!v,"node environment detected but not enabled at build time. Add `node` to `-sENVIRONMENT` to enable."),M(!k,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable.");var C=t.wasmBinary;er("wasmBinary","wasmBinary"),"object"!=typeof WebAssembly&&N("no native wasm support detected");var j=!1;function M(e,t){e||J("Assertion failed"+(t?": "+t:""))}function R(){var e=a.buffer;t.HEAP8=s=new Int8Array(e),t.HEAP16=u=new Int16Array(e),t.HEAPU8=l=new Uint8Array(e),t.HEAPU16=d=new Uint16Array(e),t.HEAP32=c=new Int32Array(e),t.HEAPU32=f=new Uint32Array(e),t.HEAPF32=m=new Float32Array(e),t.HEAPF64=p=new Float64Array(e)}function T(){if(!j){var e=e1();0==e&&(e+=4);var t=f[e>>>2>>>0],n=f[e+4>>>2>>>0];(0x2135467!=t||0x89bacdfe!=n)&&J(`Stack overflow! Stack cookie has been overwritten at ${ec(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ec(n)} ${ec(t)}`),0x63736d65!=f[0]&&J("Runtime error: The application has corrupted its heap memory area (address zero)!")}}M(!t.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),M("u">typeof Int32Array&&"u">typeof Float64Array&&void 0!=Int32Array.prototype.subarray&&void 0!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),M(!t.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),M(!t.INITIAL_MEMORY,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically");var B=[],L=[],$=[],z=!1;M(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var U=0,V=null,W=null,q={};function H(e){for(var t=e;;){if(!q[e])return e;e=t+Math.random()}}function K(e){U++,t.monitorRunDependencies?.(U),e?(M(!q[e]),q[e]=1,null===V&&"u">typeof setInterval&&(V=setInterval(()=>{if(j){clearInterval(V),V=null;return}var e=!1;for(var t in q)e||(e=!0,N("still waiting on run dependencies:")),N(`dependency: ${t}`);e&&N("(end of list)")},1e4))):N("warning: run dependency added without ID")}function Z(e){if(U--,t.monitorRunDependencies?.(U),e?(M(q[e]),delete q[e]):N("warning: run dependency removed without ID"),0==U&&(null!==V&&(clearInterval(V),V=null),W)){var n=W;W=null,n()}}function J(e){t.onAbort?.(e),N(e="Aborted("+e+")"),j=!0;var n=new WebAssembly.RuntimeError(e);throw r(n),n}var Q=e=>e.startsWith("file://");function X(e,t){return(...n)=>{M(z,`native function \\`${e}\\` called before runtime initialization`);var r=eZ[e];return M(r,`exported native function \\`${e}\\` not found`),M(n.length<=t,`native function \\`${e}\\` called with ${n.length} args but expects ${t}`),r(...n)}}function Y(e){if(e==h&&C)return new Uint8Array(C);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function ee(e,t,n){return(!C?i(e).then(e=>new Uint8Array(e),()=>Y(e)):Promise.resolve().then(()=>Y(e))).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{N(`failed to asynchronously prepare wasm: ${e}`),Q(h)&&N(`warning: Loading from a file URI (${h}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),J(e)})}var et=new Int16Array(1),en=new Int8Array(et.buffer);if(et[0]=25459,115!==en[0]||99!==en[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)";if(t.ENVIRONMENT)throw Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");function er(e,n,r=!0){Object.getOwnPropertyDescriptor(t,e)||Object.defineProperty(t,e,{configurable:!0,get(){J(`\\`Module.${e}\\` has been replaced by \\`${n}\\``+(r?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function ei(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function eo(e,t){"u">typeof globalThis&&!Object.getOwnPropertyDescriptor(globalThis,e)&&Object.defineProperty(globalThis,e,{configurable:!0,get(){t()}})}function ea(e,t){eo(e,()=>{em(`\\`${e}\\` is not longer defined by emscripten. ${t}`)})}function es(e){Object.getOwnPropertyDescriptor(t,e)||Object.defineProperty(t,e,{configurable:!0,get(){var t=`\'${e}\' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;ei(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),J(t)}})}ea("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),ea("asm","Please use wasmExports instead");class el{constructor(e){S(this,"name","ExitStatus"),this.message=`Program terminated with exit(${e})`,this.status=e}}var eu=e=>{for(;e.length>0;)e.shift()(t)},ed=t.noExitRuntime||!0,ec=e=>(M("number"==typeof e),"0x"+e.toString(16).padStart(8,"0")),ef=()=>e6(),em=e=>{em.shown||(em.shown={}),em.shown[e]||(em.shown[e]=1,N(e))},ep=(e,t)=>(M(e==e>>>0||e==(0|e)),M(t===(0|t)),t+2097152>>>0<4194305-!!e?(e>>>0)+0x100000000*t:0/0),eh="u">typeof TextDecoder?new TextDecoder:void 0,eF=(e,t=0,n=0/0)=>{for(var r=(t>>>=0)+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&eh)return eh.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&u)}}return o},eg=(e,t)=>(M("number"==typeof e,`UTF8ToString expects a number (got ${typeof e})`),(e>>>=0)?eF(l,e,t):""),e_=()=>{M(void 0!=eC.varargs);var e=c[eC.varargs>>>2>>>0];return eC.varargs+=4,e},eP={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:e=>{var t=eP.isAbs(e),n="/"===e.substr(-1);return(e=eP.normalizeArray(e.split("/").filter(e=>!!e),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=eP.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=eP.normalize(e)).replace(/\\/$/,"")).lastIndexOf("/");return -1===t?e:e.substr(t+1)},join:(...e)=>eP.normalize(e.join("/")),join2:(e,t)=>eP.normalize(e+"/"+t)},eD=e=>(eD=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);J("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),eb={resolve:(...e)=>{for(var t="",n=!1,r=e.length-1;r>=-1&&!n;r--){var i=r>=0?e[r]:eN.cwd();if("string"!=typeof i)throw TypeError("Arguments to path.resolve must be strings");if(!i)return"";t=i+"/"+t,n=eP.isAbs(i)}return t=eP.normalizeArray(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."},relative:(e,t)=>{function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=eb.resolve(e).substr(1),t=eb.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),o=Math.min(r.length,i.length),a=o,s=0;s{for(var t=0,n=0;n=55296&&r<=57343?(t+=4,++n):t+=3}return t},eE=(e,t,n,r)=>{if(n>>>=0,M("string"==typeof e,`stringToUTF8Array expects a string (got ${typeof e})`),!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(n>=o)break;t[n++>>>0]=s}else if(s<=2047){if(n+1>=o)break;t[n++>>>0]=192|s>>6,t[n++>>>0]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++>>>0]=224|s>>12,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|63&s}else{if(n+3>=o)break;s>1114111&&em("Invalid Unicode code point "+ec(s)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[n++>>>0]=240|s>>18,t[n++>>>0]=128|s>>12&63,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|63&s}}return t[n>>>0]=0,n-i};function eA(e,t,n){var r=Array(n>0?n:ew(e)+1),i=eE(e,r,0,r.length);return t&&(r.length=i),r}var ev={ttys:[],init(){},shutdown(){},register(e,t){ev.ttys[e]={input:[],output:[],ops:t},eN.registerDevice(e,ev.stream_ops)},stream_ops:{open(e){var t=ev.ttys[e.node.rdev];if(!t)throw new eN.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,i){if(!e.tty||!e.tty.ops.get_char)throw new eN.ErrnoError(60);for(var o,a=0,s=0;s(()=>{if(!ey.length){var e=null;if("u">typeof window&&"function"==typeof window.prompt&&null!==(e=window.prompt("Input: "))&&(e+=`\n`),!e)return null;ey=eA(e,!0)}return ey.shift()})(),put_char(e,t){null===t||10===t?(I(eF(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(I(eF(e.output)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,n)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(N(eF(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(N(eF(e.output)),e.output=[])}}},eS=(e,t)=>(M(t,"alignment argument is required"),Math.ceil(e/t)*t),ek=e=>{var t,n=eX(65536,e=eS(e,65536));return n&&(t=e,l.fill(0,n,n+t)),n},ex={ops_table:null,mount:e=>ex.createNode(null,"/",16895,0),createNode(e,t,n,r){if(eN.isBlkdev(n)||eN.isFIFO(n))throw new eN.ErrnoError(63);ex.ops_table||(ex.ops_table={dir:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr,lookup:ex.node_ops.lookup,mknod:ex.node_ops.mknod,rename:ex.node_ops.rename,unlink:ex.node_ops.unlink,rmdir:ex.node_ops.rmdir,readdir:ex.node_ops.readdir,symlink:ex.node_ops.symlink},stream:{llseek:ex.stream_ops.llseek}},file:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr},stream:{llseek:ex.stream_ops.llseek,read:ex.stream_ops.read,write:ex.stream_ops.write,allocate:ex.stream_ops.allocate,mmap:ex.stream_ops.mmap,msync:ex.stream_ops.msync}},link:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr,readlink:ex.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr},stream:eN.chrdev_stream_ops}});var i=eN.createNode(e,t,n,r);return eN.isDir(i.mode)?(i.node_ops=ex.ops_table.dir.node,i.stream_ops=ex.ops_table.dir.stream,i.contents={}):eN.isFile(i.mode)?(i.node_ops=ex.ops_table.file.node,i.stream_ops=ex.ops_table.file.stream,i.usedBytes=0,i.contents=null):eN.isLink(i.mode)?(i.node_ops=ex.ops_table.link.node,i.stream_ops=ex.ops_table.link.stream):eN.isChrdev(i.mode)&&(i.node_ops=ex.ops_table.chrdev.node,i.stream_ops=ex.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var n=e.contents?e.contents.length:0;if(!(n>=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var n=e.contents;e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=eN.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,eN.isDir(e.mode)?t.size=4096:eN.isFile(e.mode)?t.size=e.usedBytes:eN.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&ex.resizeFileStorage(e,t.size)},lookup(e,t){throw new eN.ErrnoError(44)},mknod:(e,t,n,r)=>ex.createNode(e,t,n,r),rename(e,t,n){if(eN.isDir(e.mode)){var r;try{r=eN.lookupNode(t,n)}catch{}if(r)for(var i in r.contents)throw new eN.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=n,t.contents[n]=e,t.timestamp=e.parent.timestamp},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var n=eN.lookupNode(e,t);for(var r in n.contents)throw new eN.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var n of Object.keys(e.contents))t.push(n);return t},symlink(e,t,n){var r=ex.createNode(e,t,41471,0);return r.link=n,r},readlink(e){if(!eN.isLink(e.mode))throw new eN.ErrnoError(28);return e.link}},stream_ops:{read(e,t,n,r,i){var o=e.node.contents;if(i>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,r);if(M(a>=0),a>8&&o.subarray)t.set(o.subarray(i,i+a),n);else for(var s=0;s0||n+t>>0))}return{ptr:o,allocated:a}},msync:(e,t,n,r,i)=>(ex.stream_ops.write(e,t,0,r,n,!1),0)}},eG=t.preloadPlugins||[],eO=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},eI={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},eN={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class extends Error{constructor(e){for(var t in super(z?eg(eQ(e)):""),S(this,"name","ErrnoError"),this.errno=e,eI)if(eI[t]===e){this.code=t;break}}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{constructor(){S(this,"shared",{})}get object(){return this.node}set object(e){this.node=e}get isRead(){return(2097155&this.flags)!=1}get isWrite(){return(2097155&this.flags)!=0}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{constructor(e,t,n,r){S(this,"node_ops",{}),S(this,"stream_ops",{}),S(this,"readMode",365),S(this,"writeMode",146),S(this,"mounted",null),e||(e=this),this.parent=e,this.mount=e.mount,this.id=eN.nextInode++,this.name=t,this.mode=n,this.rdev=r}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return eN.isDir(this.mode)}get isDevice(){return eN.isChrdev(this.mode)}},lookupPath(e,t={}){if(!(e=eb.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new eN.ErrnoError(32);for(var n=e.split("/").filter(e=>!!e),r=eN.root,i="/",o=0;o40)throw new eN.ErrnoError(32)}}return{path:i,node:r}},getPath(e){for(var t;;){if(eN.isRoot(e)){var n=e.mount.mountpoint;if(!t)return n;return"/"!==n[n.length-1]?`${n}/${t}`:n+t}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var n=0,r=0;r>>0)%eN.nameTable.length},hashAddNode(e){var t=eN.hashName(e.parent.id,e.name);e.name_next=eN.nameTable[t],eN.nameTable[t]=e},hashRemoveNode(e){var t=eN.hashName(e.parent.id,e.name);if(eN.nameTable[t]===e)eN.nameTable[t]=e.name_next;else for(var n=eN.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode(e,t){var n=eN.mayLookup(e);if(n)throw new eN.ErrnoError(n);for(var r=eN.hashName(e.id,t),i=eN.nameTable[r];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return eN.lookup(e,t)},createNode(e,t,n,r){M("object"==typeof e);var i=new eN.FSNode(e,t,n,r);return eN.hashAddNode(i),i},destroyNode(e){eN.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>(61440&e)==32768,isDir:e=>(61440&e)==16384,isLink:e=>(61440&e)==40960,isChrdev:e=>(61440&e)==8192,isBlkdev:e=>(61440&e)==24576,isFIFO:e=>(61440&e)==4096,isSocket:e=>(49152&e)==49152,flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>eN.ignorePermissions?0:t.includes("r")&&!(292&e.mode)||t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0,mayLookup:e=>eN.isDir(e.mode)?eN.nodePermissions(e,"x")||2*!e.node_ops.lookup:54,mayCreate(e,t){try{return eN.lookupNode(e,t),20}catch(e){}return eN.nodePermissions(e,"wx")},mayDelete(e,t,n){try{r=eN.lookupNode(e,t)}catch(e){return e.errno}var r,i=eN.nodePermissions(e,"wx");if(i)return i;if(n){if(!eN.isDir(r.mode))return 54;if(eN.isRoot(r)||eN.getPath(r)===eN.cwd())return 10}else if(eN.isDir(r.mode))return 31;return 0},mayOpen:(e,t)=>e?eN.isLink(e.mode)?32:eN.isDir(e.mode)&&("r"!==eN.flagsToPermissionString(t)||512&t)?31:eN.nodePermissions(e,eN.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=eN.MAX_OPEN_FDS;e++)if(!eN.streams[e])return e;throw new eN.ErrnoError(33)},getStreamChecked(e){var t=eN.getStream(e);if(!t)throw new eN.ErrnoError(8);return t},getStream:e=>eN.streams[e],createStream:(e,t=-1)=>(M(t>=-1),e=Object.assign(new eN.FSStream,e),-1==t&&(t=eN.nextfd()),e.fd=t,eN.streams[t]=e,e),closeStream(e){eN.streams[e]=null},dupStream(e,t=-1){var n=eN.createStream(e,t);return n.stream_ops?.dup?.(n),n},chrdev_stream_ops:{open(e){var t=eN.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new eN.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){eN.devices[e]={stream_ops:t}},getDevice:e=>eN.devices[e],getMounts(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push(...r.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),eN.syncFSRequests++,eN.syncFSRequests>1&&N(`warning: ${eN.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=eN.getMounts(eN.root.mount),r=0;function i(e){return M(eN.syncFSRequests>0),eN.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++r>=n.length&&i(null)}n.forEach(t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)})},mount(e,t,n){if("string"==typeof e)throw e;var r,i="/"===n,o=!n;if(i&&eN.root)throw new eN.ErrnoError(10);if(!i&&!o){var a=eN.lookupPath(n,{follow_mount:!1});if(n=a.path,r=a.node,eN.isMountpoint(r))throw new eN.ErrnoError(10);if(!eN.isDir(r.mode))throw new eN.ErrnoError(54)}var s={type:e,opts:t,mountpoint:n,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,i?eN.root=l:r&&(r.mounted=s,r.mount&&r.mount.mounts.push(s)),l},unmount(e){var t=eN.lookupPath(e,{follow_mount:!1});if(!eN.isMountpoint(t.node))throw new eN.ErrnoError(28);var n=t.node,r=n.mounted,i=eN.getMounts(r);Object.keys(eN.nameTable).forEach(e=>{for(var t=eN.nameTable[e];t;){var n=t.name_next;i.includes(t.mount)&&eN.destroyNode(t),t=n}}),n.mounted=null;var o=n.mount.mounts.indexOf(r);M(-1!==o),n.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,n){var r=eN.lookupPath(e,{parent:!0}).node,i=eP.basename(e);if(!i||"."===i||".."===i)throw new eN.ErrnoError(28);var o=eN.mayCreate(r,i);if(o)throw new eN.ErrnoError(o);if(!r.node_ops.mknod)throw new eN.ErrnoError(63);return r.node_ops.mknod(r,i,t,n)},create:(e,t)=>(t=(void 0!==t?t:438)&4095|32768,eN.mknod(e,t,0)),mkdir:(e,t)=>(t=(void 0!==t?t:511)&1023|16384,eN.mknod(e,t,0)),mkdirTree(e,t){for(var n=e.split("/"),r="",i=0;i(void 0===n&&(n=t,t=438),t|=8192,eN.mknod(e,t,n)),symlink(e,t){if(!eb.resolve(e))throw new eN.ErrnoError(44);var n=eN.lookupPath(t,{parent:!0}).node;if(!n)throw new eN.ErrnoError(44);var r=eP.basename(t),i=eN.mayCreate(n,r);if(i)throw new eN.ErrnoError(i);if(!n.node_ops.symlink)throw new eN.ErrnoError(63);return n.node_ops.symlink(n,r,e)},rename(e,t){var n,r,i,o=eP.dirname(e),a=eP.dirname(t),s=eP.basename(e),l=eP.basename(t);if(n=eN.lookupPath(e,{parent:!0}).node,r=eN.lookupPath(t,{parent:!0}).node,!n||!r)throw new eN.ErrnoError(44);if(n.mount!==r.mount)throw new eN.ErrnoError(75);var u=eN.lookupNode(n,s),d=eb.relative(e,a);if("."!==d.charAt(0))throw new eN.ErrnoError(28);if("."!==(d=eb.relative(t,o)).charAt(0))throw new eN.ErrnoError(55);try{i=eN.lookupNode(r,l)}catch(e){}if(u!==i){var c=eN.isDir(u.mode),f=eN.mayDelete(n,s,c);if(f||(f=i?eN.mayDelete(r,l,c):eN.mayCreate(r,l)))throw new eN.ErrnoError(f);if(!n.node_ops.rename)throw new eN.ErrnoError(63);if(eN.isMountpoint(u)||i&&eN.isMountpoint(i))throw new eN.ErrnoError(10);if(r!==n&&(f=eN.nodePermissions(n,"w")))throw new eN.ErrnoError(f);eN.hashRemoveNode(u);try{n.node_ops.rename(u,r,l),u.parent=r}catch(e){throw e}finally{eN.hashAddNode(u)}}},rmdir(e){var t=eN.lookupPath(e,{parent:!0}).node,n=eP.basename(e),r=eN.lookupNode(t,n),i=eN.mayDelete(t,n,!0);if(i)throw new eN.ErrnoError(i);if(!t.node_ops.rmdir)throw new eN.ErrnoError(63);if(eN.isMountpoint(r))throw new eN.ErrnoError(10);t.node_ops.rmdir(t,n),eN.destroyNode(r)},readdir(e){var t=eN.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new eN.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=eN.lookupPath(e,{parent:!0}).node;if(!t)throw new eN.ErrnoError(44);var n=eP.basename(e),r=eN.lookupNode(t,n),i=eN.mayDelete(t,n,!1);if(i)throw new eN.ErrnoError(i);if(!t.node_ops.unlink)throw new eN.ErrnoError(63);if(eN.isMountpoint(r))throw new eN.ErrnoError(10);t.node_ops.unlink(t,n),eN.destroyNode(r)},readlink(e){var t=eN.lookupPath(e).node;if(!t)throw new eN.ErrnoError(44);if(!t.node_ops.readlink)throw new eN.ErrnoError(28);return eb.resolve(eN.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var n=eN.lookupPath(e,{follow:!t}).node;if(!n)throw new eN.ErrnoError(44);if(!n.node_ops.getattr)throw new eN.ErrnoError(63);return n.node_ops.getattr(n)},lstat:e=>eN.stat(e,!0),chmod(e,t,n){var r;if(!(r="string"==typeof e?eN.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new eN.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})},lchmod(e,t){eN.chmod(e,t,!0)},fchmod(e,t){var n=eN.getStreamChecked(e);eN.chmod(n.node,t)},chown(e,t,n,r){var i;if(!(i="string"==typeof e?eN.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new eN.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,n){eN.chown(e,t,n,!0)},fchown(e,t,n){var r=eN.getStreamChecked(e);eN.chown(r.node,t,n)},truncate(e,t){if(t<0)throw new eN.ErrnoError(28);if("string"==typeof e){var n;n=eN.lookupPath(e,{follow:!0}).node}else n=e;if(!n.node_ops.setattr)throw new eN.ErrnoError(63);if(eN.isDir(n.mode))throw new eN.ErrnoError(31);if(!eN.isFile(n.mode))throw new eN.ErrnoError(28);var r=eN.nodePermissions(n,"w");if(r)throw new eN.ErrnoError(r);n.node_ops.setattr(n,{size:t,timestamp:Date.now()})},ftruncate(e,t){var n=eN.getStreamChecked(e);if((2097155&n.flags)==0)throw new eN.ErrnoError(28);eN.truncate(n.node,t)},utime(e,t,n){var r=eN.lookupPath(e,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(t,n)})},open(e,n,r){if(""===e)throw new eN.ErrnoError(44);if(r=64&(n="string"==typeof n?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw Error(`Unknown file open mode: ${e}`);return t})(n):n)?4095&(r=void 0===r?438:r)|32768:0,"object"==typeof e)i=e;else{e=eP.normalize(e);try{var i;i=eN.lookupPath(e,{follow:!(131072&n)}).node}catch(e){}}var o=!1;if(64&n)if(i){if(128&n)throw new eN.ErrnoError(20)}else i=eN.mknod(e,r,0),o=!0;if(!i)throw new eN.ErrnoError(44);if(eN.isChrdev(i.mode)&&(n&=-513),65536&n&&!eN.isDir(i.mode))throw new eN.ErrnoError(54);if(!o){var a=eN.mayOpen(i,n);if(a)throw new eN.ErrnoError(a)}512&n&&!o&&eN.truncate(i,0),n&=-131713;var s=eN.createStream({node:i,path:eN.getPath(i),flags:n,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!t.logReadFiles||1&n||e in eN.readFiles||(eN.readFiles[e]=1),s},close(e){if(eN.isClosed(e))throw new eN.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{eN.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,n){if(eN.isClosed(e))throw new eN.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new eN.ErrnoError(70);if(0!=n&&1!=n&&2!=n)throw new eN.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,n),e.ungotten=[],e.position},read(e,t,n,r,i){if(M(n>=0),r<0||i<0)throw new eN.ErrnoError(28);if(eN.isClosed(e)||(2097155&e.flags)==1)throw new eN.ErrnoError(8);if(eN.isDir(e.node.mode))throw new eN.ErrnoError(31);if(!e.stream_ops.read)throw new eN.ErrnoError(28);var o=void 0!==i;if(o){if(!e.seekable)throw new eN.ErrnoError(70)}else i=e.position;var a=e.stream_ops.read(e,t,n,r,i);return o||(e.position+=a),a},write(e,t,n,r,i,o){if(M(n>=0),r<0||i<0)throw new eN.ErrnoError(28);if(eN.isClosed(e)||(2097155&e.flags)==0)throw new eN.ErrnoError(8);if(eN.isDir(e.node.mode))throw new eN.ErrnoError(31);if(!e.stream_ops.write)throw new eN.ErrnoError(28);e.seekable&&1024&e.flags&&eN.llseek(e,0,2);var a=void 0!==i;if(a){if(!e.seekable)throw new eN.ErrnoError(70)}else i=e.position;var s=e.stream_ops.write(e,t,n,r,i,o);return a||(e.position+=s),s},allocate(e,t,n){if(eN.isClosed(e))throw new eN.ErrnoError(8);if(t<0||n<=0)throw new eN.ErrnoError(28);if((2097155&e.flags)==0)throw new eN.ErrnoError(8);if(!eN.isFile(e.node.mode)&&!eN.isDir(e.node.mode))throw new eN.ErrnoError(43);if(!e.stream_ops.allocate)throw new eN.ErrnoError(138);e.stream_ops.allocate(e,t,n)},mmap(e,t,n,r,i){if((2&r)!=0&&(2&i)==0&&(2097155&e.flags)!=2||(2097155&e.flags)==1)throw new eN.ErrnoError(2);if(!e.stream_ops.mmap)throw new eN.ErrnoError(43);if(!t)throw new eN.ErrnoError(28);return e.stream_ops.mmap(e,t,n,r,i)},msync:(e,t,n,r,i)=>(M(n>=0),e.stream_ops.msync)?e.stream_ops.msync(e,t,n,r,i):0,ioctl(e,t,n){if(!e.stream_ops.ioctl)throw new eN.ErrnoError(59);return e.stream_ops.ioctl(e,t,n)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw Error(`Invalid encoding type "${t.encoding}"`);var n,r=eN.open(e,t.flags),i=eN.stat(e).size,o=new Uint8Array(i);return eN.read(r,o,0,i,0),"utf8"===t.encoding?n=eF(o):"binary"===t.encoding&&(n=o),eN.close(r),n},writeFile(e,t,n={}){n.flags=n.flags||577;var r=eN.open(e,n.flags,n.mode);if("string"==typeof t){var i=new Uint8Array(ew(t)+1),o=eE(t,i,0,i.length);eN.write(r,i,0,o,void 0,n.canOwn)}else if(ArrayBuffer.isView(t))eN.write(r,t,0,t.byteLength,void 0,n.canOwn);else throw Error("Unsupported data type");eN.close(r)},cwd:()=>eN.currentPath,chdir(e){var t=eN.lookupPath(e,{follow:!0});if(null===t.node)throw new eN.ErrnoError(44);if(!eN.isDir(t.node.mode))throw new eN.ErrnoError(54);var n=eN.nodePermissions(t.node,"x");if(n)throw new eN.ErrnoError(n);eN.currentPath=t.path},createDefaultDirectories(){eN.mkdir("/tmp"),eN.mkdir("/home"),eN.mkdir("/home/web_user")},createDefaultDevices(){eN.mkdir("/dev"),eN.registerDevice(eN.makedev(1,3),{read:()=>0,write:(e,t,n,r,i)=>r,llseek:()=>0}),eN.mkdev("/dev/null",eN.makedev(1,3)),ev.register(eN.makedev(5,0),ev.default_tty_ops),ev.register(eN.makedev(6,0),ev.default_tty1_ops),eN.mkdev("/dev/tty",eN.makedev(5,0)),eN.mkdev("/dev/tty1",eN.makedev(6,0));var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=eD(e).byteLength),e[--t]);eN.createDevice("/dev","random",n),eN.createDevice("/dev","urandom",n),eN.mkdir("/dev/shm"),eN.mkdir("/dev/shm/tmp")},createSpecialDirectories(){eN.mkdir("/proc");var e=eN.mkdir("/proc/self");eN.mkdir("/proc/self/fd"),eN.mount({mount(){var t=eN.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var n=eN.getStreamChecked(+t),r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams(e,t,n){e?eN.createDevice("/dev","stdin",e):eN.symlink("/dev/tty","/dev/stdin"),t?eN.createDevice("/dev","stdout",null,t):eN.symlink("/dev/tty","/dev/stdout"),n?eN.createDevice("/dev","stderr",null,n):eN.symlink("/dev/tty1","/dev/stderr");var r=eN.open("/dev/stdin",0),i=eN.open("/dev/stdout",1),o=eN.open("/dev/stderr",1);M(0===r.fd,`invalid handle for stdin (${r.fd})`),M(1===i.fd,`invalid handle for stdout (${i.fd})`),M(2===o.fd,`invalid handle for stderr (${o.fd})`)},staticInit(){eN.nameTable=Array(4096),eN.mount(ex,{},"/"),eN.createDefaultDirectories(),eN.createDefaultDevices(),eN.createSpecialDirectories(),eN.filesystems={MEMFS:ex}},init(e,n,r){M(!eN.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),eN.initialized=!0,e??(e=t.stdin),n??(n=t.stdout),r??(r=t.stderr),eN.createStandardStreams(e,n,r)},quit(){eN.initialized=!1,eJ(0);for(var e=0;etypeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{e.contents=o(e.url),e.usedBytes=e.contents.length}catch(e){throw new eN.ErrnoError(29)}},createLazyFile(e,t,n,r,i){if("u">typeof XMLHttpRequest){if(!E)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o={isDevice:!1,contents:new class{constructor(){S(this,"lengthKnown",!1),S(this,"chunks",[])}get(e){if(!(e>this.length-1)&&!(e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}}setDataGetter(e){this.getter=e}cacheLength(){var e,t=new XMLHttpRequest;if(t.open("HEAD",n,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw Error("Couldn\'t load "+n+". Status: "+t.status);var r=Number(t.getResponseHeader("Content-length")),i=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,o=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;i||(a=r);var s=this;s.setDataGetter(e=>{var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw Error("Couldn\'t load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):eA(i.responseText||"",!0)})(t,i)),void 0===s.chunks[e])throw Error("doXHR failed!");return s.chunks[e]}),(o||!r)&&(a=r=1,a=r=this.getter(0).length,I("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}}}else var o={isDevice:!1,url:n};var a=eN.createFile(e,t,o,r,i);o.contents?a.contents=o.contents:o.url&&(a.contents=null,a.url=o.url),Object.defineProperties(a,{usedBytes:{get:function(){return this.contents.length}}});var l={};function u(e,t,n,r,i){var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,r);if(M(a>=0),o.slice)for(var s=0;s{var t=a.stream_ops[e];l[e]=(...e)=>(eN.forceLoadFile(a),t(...e))}),l.read=(e,t,n,r,i)=>(eN.forceLoadFile(a),u(e,t,n,r,i)),l.mmap=(e,t,n,r,i)=>{eN.forceLoadFile(a);var o=ek(t);if(!o)throw new eN.ErrnoError(48);return u(e,s,o,t,n),{ptr:o,allocated:!0}},a.stream_ops=l,a},absolutePath(){J("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){J("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){J("FS.createLink has been removed; use FS.symlink instead")},joinPath(){J("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){J("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){J("FS.standardizePath has been removed; use PATH.normalize instead")}},eC={DEFAULT_POLLMASK:5,calculateAt(e,t,n){if(eP.isAbs(t))return t;if(-100===e)r=eN.cwd();else{var r;r=eC.getStreamFromFD(e).path}if(0==t.length){if(!n)throw new eN.ErrnoError(44);return r}return eP.join2(r,t)},doStat(e,t,n){var r=e(t);c[n>>>2>>>0]=r.dev,c[n+4>>>2>>>0]=r.mode,f[n+8>>>2>>>0]=r.nlink,c[n+12>>>2>>>0]=r.uid,c[n+16>>>2>>>0]=r.gid,c[n+20>>>2>>>0]=r.rdev,g=[r.size>>>0,+Math.abs(F=r.size)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+24>>>2>>>0]=g[0],c[n+28>>>2>>>0]=g[1],c[n+32>>>2>>>0]=4096,c[n+36>>>2>>>0]=r.blocks;var i=r.atime.getTime(),o=r.mtime.getTime(),a=r.ctime.getTime();return g=[Math.floor(i/1e3)>>>0,+Math.abs(F=Math.floor(i/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+40>>>2>>>0]=g[0],c[n+44>>>2>>>0]=g[1],f[n+48>>>2>>>0]=i%1e3*1e6,g=[Math.floor(o/1e3)>>>0,+Math.abs(F=Math.floor(o/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+56>>>2>>>0]=g[0],c[n+60>>>2>>>0]=g[1],f[n+64>>>2>>>0]=o%1e3*1e6,g=[Math.floor(a/1e3)>>>0,+Math.abs(F=Math.floor(a/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+72>>>2>>>0]=g[0],c[n+76>>>2>>>0]=g[1],f[n+80>>>2>>>0]=a%1e3*1e6,g=[r.ino>>>0,+Math.abs(F=r.ino)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+88>>>2>>>0]=g[0],c[n+92>>>2>>>0]=g[1],0},doMsync(e,t,n,r,i){if(!eN.isFile(t.node.mode))throw new eN.ErrnoError(43);if(2&r)return 0;var o=l.slice(e,e+n);eN.msync(t,o,i,n,r)},getStreamFromFD:e=>eN.getStreamChecked(e),varargs:void 0,getStr:e=>eg(e)},ej=(e,t,n)=>(M("number"==typeof n,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),eE(e,l,t,n)),eM=[0,31,60,91,121,152,182,213,244,274,305,335],eR=[0,31,59,90,120,151,181,212,243,273,304,334],eT=e=>{var t=a.buffer,n=(e-t.byteLength+65535)/65536|0;try{return a.grow(n),R(),1}catch(n){N(`growMemory: Attempted to grow heap from ${t.byteLength} bytes to ${e} bytes, but got error: ${n}`)}},eB={},eL=()=>{if(!eL.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:G||"./this.program"};for(var t in eB)void 0===eB[t]?delete e[t]:e[t]=eB[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);eL.strings=n}return eL.strings},e$=[],ez=e=>{var t=e$[e];return t||(e>=e$.length&&(e$.length=e+1),e$[e]=t=_.get(e)),M(_.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t},eU="u">typeof TextDecoder?new TextDecoder("utf-16le"):void 0,eV=(e,t)=>{M(e<16384),e<128?t.push(e):t.push(e%128|128,e>>7)},eW=[],eq=(e,t)=>{_.set(e,t),e$[e]=_.get(e)},eH=(e,n,r,i,o)=>{var a,l,u={string:e=>{var t,n,r=0;return null!=e&&0!==e&&(t=ew(e)+1,ej(e,n=e2(t),t),r=n),r},array:e=>{let t;var n=(t=e.length,e2(t));return M(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),s.set(e,n>>>0),n}},d=(M(a=t["_"+e],"Cannot call unknown function "+e+", make sure it is exported"),a),c=[],f=0;if(M("array"!==n,\'Return type should not be "array".\'),i)for(var m=0;m{var c,f=t?eb.resolve(eP.join2(e,t)):e,m=H(`cp ${f}`);function p(n){var i,c;function p(n){d?.(),l||eN.createDataFile(e,t,n,r,o,u),a?.(),Z(m)}i=()=>{s?.(),Z(m)},"u">typeof Browser&&Browser.init(),c=!1,eG.forEach(e=>{!c&&e.canHandle(f)&&(e.handle(n,f,p,i),c=!0)}),c||p(n)}(K(m),"string"==typeof n)?(c=H(`al ${n}`),i(n).then(e=>{M(e,`Loading data file "${n}" failed (no arrayBuffer).`),p(new Uint8Array(e)),c&&Z(c)},e=>{if(s)s();else throw`Loading data file "${n}" failed.`}),c&&K(c)):p(n)},eN.staticInit();var eK={__assert_fail:function(e,t,n,r){e>>>=0,t>>>=0,r>>>=0,J(`Assertion failed: ${eg(e)}, at: `+[t?eg(t):"unknown filename",n,r?eg(r):"unknown function"])},__syscall_fcntl64:function(e,t,n){eC.varargs=n>>>=0;try{var r=eC.getStreamFromFD(e);switch(t){case 0:var i=e_();if(i<0)break;for(;eN.streams[i];)i++;return eN.dupStream(r,i).fd;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:var i=e_();return r.flags|=i,0;case 12:var i=e_();return u[i+0>>>1>>>0]=2,0}return -28}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fstat64:function(e,t){t>>>=0;try{var n=eC.getStreamFromFD(e);return eC.doStat(eN.stat,n.path,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ftruncate64:function(e,t,n){var r=ep(t,n);try{if(isNaN(r))return 61;return eN.ftruncate(e,r),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_getdents64:function(e,t,n){t>>>=0,n>>>=0;try{var r=eC.getStreamFromFD(e);r.getdents||(r.getdents=eN.readdir(r.path));for(var i=0,o=eN.llseek(r,0,1),a=Math.floor(o/280);a>>0,(F=l,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[t+i>>>2>>>0]=g[0],c[t+i+4>>>2>>>0]=g[1],g=[(a+1)*280>>>0,(F=(a+1)*280,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[t+i+8>>>2>>>0]=g[0],c[t+i+12>>>2>>>0]=g[1],u[t+i+16>>>1>>>0]=280,s[t+i+18>>>0]=d,ej(f,t+i+19,256),i+=280,a+=1}return eN.llseek(r,280*a,0),i}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ioctl:function(e,t,n){eC.varargs=n>>>=0;try{var r=eC.getStreamFromFD(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:if(!r.tty)return -59;return 0;case 21505:if(!r.tty)return -59;if(r.tty.ops.ioctl_tcgets){var i=r.tty.ops.ioctl_tcgets(r),o=e_();c[o>>>2>>>0]=i.c_iflag||0,c[o+4>>>2>>>0]=i.c_oflag||0,c[o+8>>>2>>>0]=i.c_cflag||0,c[o+12>>>2>>>0]=i.c_lflag||0;for(var a=0;a<32;a++)s[o+a+17>>>0]=i.c_cc[a]||0}return 0;case 21506:case 21507:case 21508:if(!r.tty)return -59;if(r.tty.ops.ioctl_tcsets){for(var o=e_(),l=c[o>>>2>>>0],d=c[o+4>>>2>>>0],f=c[o+8>>>2>>>0],m=c[o+12>>>2>>>0],p=[],a=0;a<32;a++)p.push(s[o+a+17>>>0]);return r.tty.ops.ioctl_tcsets(r.tty,t,{c_iflag:l,c_oflag:d,c_cflag:f,c_lflag:m,c_cc:p})}return 0;case 21519:if(!r.tty)return -59;var o=e_();return c[o>>>2>>>0]=0,0;case 21520:if(!r.tty)return -59;return -28;case 21531:var o=e_();return eN.ioctl(r,t,o);case 21523:if(!r.tty)return -59;if(r.tty.ops.ioctl_tiocgwinsz){var h=r.tty.ops.ioctl_tiocgwinsz(r.tty),o=e_();u[o>>>1>>>0]=h[0],u[o+2>>>1>>>0]=h[1]}return 0;default:return -28}}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_lstat64:function(e,t){e>>>=0,t>>>=0;try{return e=eC.getStr(e),eC.doStat(eN.lstat,e,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_newfstatat:function(e,t,n,r){t>>>=0,n>>>=0;try{t=eC.getStr(t);var i=256&r,o=4096&r;return r&=-6401,M(!r,`unknown flags in __syscall_newfstatat: ${r}`),t=eC.calculateAt(e,t,o),eC.doStat(i?eN.lstat:eN.stat,t,n)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,t,n,r){t>>>=0,eC.varargs=r>>>=0;try{t=eC.getStr(t),t=eC.calculateAt(e,t);var i=r?e_():0;return eN.open(t,n,i).fd}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_rmdir:function(e){e>>>=0;try{return e=eC.getStr(e),eN.rmdir(e),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_stat64:function(e,t){e>>>=0,t>>>=0;try{return e=eC.getStr(e),eC.doStat(eN.stat,e,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_unlinkat:function(e,t,n){t>>>=0;try{return t=eC.getStr(t),t=eC.calculateAt(e,t),0===n?eN.unlink(t):512===n?eN.rmdir(t):J("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_abort_js:()=>{J("native code called abort()")},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:function(e,t,n){return e>>>=0,t>>>=0,n>>>=0,l.copyWithin(e>>>0,t>>>0,t+n>>>0)},_emscripten_throw_longjmp:()=>{throw 1/0},_gmtime_js:function(e,t,n){var r=ep(e,t);n>>>=0;var i=new Date(1e3*r);c[n>>>2>>>0]=i.getUTCSeconds(),c[n+4>>>2>>>0]=i.getUTCMinutes(),c[n+8>>>2>>>0]=i.getUTCHours(),c[n+12>>>2>>>0]=i.getUTCDate(),c[n+16>>>2>>>0]=i.getUTCMonth(),c[n+20>>>2>>>0]=i.getUTCFullYear()-1900,c[n+24>>>2>>>0]=i.getUTCDay();var o=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),a=(i.getTime()-o)/864e5|0;c[n+28>>>2>>>0]=a},_localtime_js:function(e,t,n){let r;var i=ep(e,t);n>>>=0;var o=new Date(1e3*i);c[n>>>2>>>0]=o.getSeconds(),c[n+4>>>2>>>0]=o.getMinutes(),c[n+8>>>2>>>0]=o.getHours(),c[n+12>>>2>>>0]=o.getDate(),c[n+16>>>2>>>0]=o.getMonth(),c[n+20>>>2>>>0]=o.getFullYear()-1900,c[n+24>>>2>>>0]=o.getDay();var a=0|((r=o.getFullYear())%4==0&&(r%100!=0||r%400==0)?eM:eR)[o.getMonth()]+o.getDate()-1;c[n+28>>>2>>>0]=a,c[n+36>>>2>>>0]=-(60*o.getTimezoneOffset());var s=new Date(o.getFullYear(),0,1),l=new Date(o.getFullYear(),6,1).getTimezoneOffset(),u=s.getTimezoneOffset(),d=0|(l!=u&&o.getTimezoneOffset()==Math.min(u,l));c[n+32>>>2>>>0]=d},_mmap_js:function(e,t,n,r,i,o,a,s){e>>>=0;var l=ep(i,o);a>>>=0,s>>>=0;try{if(isNaN(l))return 61;var u=eC.getStreamFromFD(r),d=eN.mmap(u,e,l,t,n),m=d.ptr;return c[a>>>2>>>0]=d.allocated,f[s>>>2>>>0]=m,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_munmap_js:function(e,t,n,r,i,o,a){e>>>=0,t>>>=0;var s=ep(o,a);try{var l=eC.getStreamFromFD(i);2&n&&eC.doMsync(e,l,t,r,s)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_tzset_js:function(e,t,n,r){e>>>=0,t>>>=0,n>>>=0,r>>>=0;var i=(new Date).getFullYear(),o=new Date(i,0,1),a=new Date(i,6,1),s=o.getTimezoneOffset(),l=a.getTimezoneOffset(),u=Math.max(s,l);f[e>>>2>>>0]=60*u,c[t>>>2>>>0]=Number(s!=l);var d=e=>{var t=Math.abs(e),n=String(Math.floor(t/60)).padStart(2,"0"),r=String(t%60).padStart(2,"0");return`UTC${e>=0?"-":"+"}${n}${r}`},m=d(s),p=d(l);M(m),M(p),M(16>=ew(m),`timezone name truncated to fit in TZNAME_MAX (${m})`),M(16>=ew(p),`timezone name truncated to fit in TZNAME_MAX (${p})`),lDate.now(),emscripten_err:function(e){return e>>>=0,N(eg(e))},emscripten_get_now:()=>performance.now(),emscripten_resize_heap:function(e){e>>>=0;var t=l.length;M(e>t);if(e>0xffff0000)return N(`Cannot enlarge memory, requested ${e} bytes, but the limit is 4294901760 bytes!`),!1;for(var n=1;n<=4;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+0x6000000);var i=Math.min(0xffff0000,eS(Math.max(e,r),65536));if(eT(i))return!0}return N(`Failed to grow the heap from ${t} bytes to ${i} bytes, not enough memory!`),!1},environ_get:function(e,t){e>>>=0,t>>>=0;var n=0;return eL().forEach((r,i)=>{var o=t+n;f[e+4*i>>>2>>>0]=o;for(var a=o,l=0;l>>0]=r.charCodeAt(l);s[a>>>0]=0,n+=r.length+1}),0},environ_sizes_get:function(e,t){e>>>=0,t>>>=0;var n=eL();f[e>>>2>>>0]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),f[t>>>2>>>0]=r,0},exit:(e,n)=>{if(function(){var e=I,t=N,n=!1;I=N=e=>{n=!0};try{eJ(0),["stdout","stderr"].forEach(e=>{var t=eN.analyzePath("/dev/"+e);if(t){var r=t.object.rdev,i=ev.ttys[r];i?.output?.length&&(n=!0)}})}catch{}I=e,N=t,n&&em("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}(),(ed||0)&&!n){var i=`program exited (with status: ${e}), but keepRuntimeAlive() is set (counter=0) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;r(i),N(i)}throw ed||(t.onExit?.(e),j=!0),new el(e)},fd_close:function(e){try{var t=eC.getStreamFromFD(e);return eN.close(t),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,t,n,r){t>>>=0,n>>>=0,r>>>=0;try{var i=eC.getStreamFromFD(e),o=((e,t,n,r)=>{for(var i=0,o=0;o>>2>>>0],l=f[t+4>>>2>>>0];t+=8;var u=eN.read(e,s,a,l,r);if(u<0)return -1;if(i+=u,u>>2>>>0]=o,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,t,n,r,i){var o=ep(t,n);i>>>=0;try{if(isNaN(o))return 61;var a=eC.getStreamFromFD(e);return eN.llseek(a,o,r),g=[a.position>>>0,(F=a.position,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[i>>>2>>>0]=g[0],c[i+4>>>2>>>0]=g[1],a.getdents&&0===o&&0===r&&(a.getdents=null),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_sync:function(e){try{var t=eC.getStreamFromFD(e);if(t.stream_ops?.fsync)return t.stream_ops.fsync(t);return 0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_write:function(e,t,n,r){t>>>=0,n>>>=0,r>>>=0;try{var i=eC.getStreamFromFD(e),o=((e,t,n,r)=>{for(var i=0,o=0;o>>2>>>0],l=f[t+4>>>2>>>0];t+=8;var u=eN.write(e,s,a,l,r);if(u<0)return -1;if(i+=u,u>>2>>>0]=o,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},invoke_ii:function(e,t){var n=ef();try{return ez(e)(t)}catch(e){if(e3(n),e!==e+0)throw e;eY(1,0)}},invoke_iii:function(e,t,n){var r=ef();try{return ez(e)(t,n)}catch(e){if(e3(r),e!==e+0)throw e;eY(1,0)}},invoke_iiii:function(e,t,n,r){var i=ef();try{return ez(e)(t,n,r)}catch(e){if(e3(i),e!==e+0)throw e;eY(1,0)}},invoke_iiiii:function(e,t,n,r,i){var o=ef();try{return ez(e)(t,n,r,i)}catch(e){if(e3(o),e!==e+0)throw e;eY(1,0)}},invoke_iiiiii:function(e,t,n,r,i,o){var a=ef();try{return ez(e)(t,n,r,i,o)}catch(e){if(e3(a),e!==e+0)throw e;eY(1,0)}},invoke_iiiiiii:function(e,t,n,r,i,o,a){var s=ef();try{return ez(e)(t,n,r,i,o,a)}catch(e){if(e3(s),e!==e+0)throw e;eY(1,0)}},invoke_v:function(e){var t=ef();try{ez(e)()}catch(e){if(e3(t),e!==e+0)throw e;eY(1,0)}},invoke_vi:function(e,t){var n=ef();try{ez(e)(t)}catch(e){if(e3(n),e!==e+0)throw e;eY(1,0)}},invoke_vii:function(e,t,n){var r=ef();try{ez(e)(t,n)}catch(e){if(e3(r),e!==e+0)throw e;eY(1,0)}},invoke_viii:function(e,t,n,r){var i=ef();try{ez(e)(t,n,r)}catch(e){if(e3(i),e!==e+0)throw e;eY(1,0)}},invoke_viiii:function(e,t,n,r,i){var o=ef();try{ez(e)(t,n,r,i)}catch(e){if(e3(o),e!==e+0)throw e;eY(1,0)}},invoke_viiiiiiiii:function(e,t,n,r,i,o,a,s,l,u){var d=ef();try{ez(e)(t,n,r,i,o,a,s,l,u)}catch(e){if(e3(d),e!==e+0)throw e;eY(1,0)}},random_get:function(e,t){e>>>=0,t>>>=0;try{return eD(l.subarray(e>>>0,e+t>>>0)),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}}},eZ=function(){function e(e,n){var r,i,o,s;let l,u;return i=Object.assign({},i=eZ=e.exports),o=e=>t=>e(t)>>>0,s=e=>()=>e()>>>0,i.strerror=(l=i.strerror,e=>l(e)>>>0),i.emscripten_builtin_memalign=(u=i.emscripten_builtin_memalign,(e,t)=>u(e,t)>>>0),i.malloc=o(i.malloc),i.emscripten_stack_get_base=s(i.emscripten_stack_get_base),i.emscripten_stack_get_end=s(i.emscripten_stack_get_end),i._emscripten_stack_alloc=o(i._emscripten_stack_alloc),i.emscripten_stack_get_current=s(i.emscripten_stack_get_current),t.wasmExports=eZ=i,M(a=eZ.memory,"memory not found in wasm exports"),R(),M(_=eZ.__indirect_function_table,"table not found in wasm exports"),r=eZ.__wasm_call_ctors,L.unshift(r),Z("wasm-instantiate"),eZ}K("wasm-instantiate");var n,i,o=t,s={env:eK,wasi_snapshot_preview1:eK};if(t.instantiateWasm)try{return t.instantiateWasm(s,e)}catch(e){N(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}return h??(h=function(){if(t.locateFile){var e="embedpdf.wasm";return e.startsWith("data:application/octet-stream;base64,")?e:t.locateFile?t.locateFile(e,O):O+e}return new URL("embedpdf.wasm",self.location.href).href}()),(n=h,i=function(n){M(t===o,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),o=null,e(n.instance)},!C&&"function"==typeof WebAssembly.instantiateStreaming&&!n.startsWith("data:application/octet-stream;base64,")&&"function"==typeof fetch?fetch(n,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,s).then(i,function(e){return N(`wasm streaming compile failed: ${e}`),N("falling back to ArrayBuffer instantiation"),ee(n,s,i)})):ee(n,s,i)).catch(r),{}}();X("__wasm_call_ctors",0),t._EPDFAction_CloseModel=X("EPDFAction_CloseModel",1),t._EPDFAction_LoadModel=X("EPDFAction_LoadModel",1),t._EPDFAction_GetRootNode=X("EPDFAction_GetRootNode",1),t._EPDFAction_GetNodeCount=X("EPDFAction_GetNodeCount",1),t._EPDFAction_GetNodeType=X("EPDFAction_GetNodeType",2),t._EPDFAction_GetNodeSubtype=X("EPDFAction_GetNodeSubtype",4),t._EPDFAction_NodeHasJavaScript=X("EPDFAction_NodeHasJavaScript",2),t._EPDFAction_GetNodeJavaScript=X("EPDFAction_GetNodeJavaScript",4),t._EPDFAction_GetNodeDest=X("EPDFAction_GetNodeDest",3),t._EPDFAction_GetNodeURI=X("EPDFAction_GetNodeURI",5),t._EPDFAction_GetNodeFilePath=X("EPDFAction_GetNodeFilePath",4),t._EPDFAction_GetNodeName=X("EPDFAction_GetNodeName",4),t._EPDFAction_GetNodeTargetCount=X("EPDFAction_GetNodeTargetCount",2),t._EPDFAction_GetNodeTargetName=X("EPDFAction_GetNodeTargetName",5),t._EPDFAction_GetNodeTargetObjectNumber=X("EPDFAction_GetNodeTargetObjectNumber",4),t._EPDFAction_GetNodeHideFlag=X("EPDFAction_GetNodeHideFlag",3),t._EPDFAction_GetNodeResetForm=X("EPDFAction_GetNodeResetForm",4),t._EPDFAction_GetNodeSubmitForm=X("EPDFAction_GetNodeSubmitForm",4),t._EPDFAction_GetNodeSubmitFormURL=X("EPDFAction_GetNodeSubmitFormURL",4),t._EPDFAction_GetNodeSubmitFormCharSet=X("EPDFAction_GetNodeSubmitFormCharSet",4),t._EPDFAction_GetNodeURIIsMap=X("EPDFAction_GetNodeURIIsMap",3),t._EPDFAction_GetNextCount=X("EPDFAction_GetNextCount",2),t._EPDFAction_GetNextAt=X("EPDFAction_GetNextAt",3),t._EPDFAction_GetWarningFlags=X("EPDFAction_GetWarningFlags",1),t._EPDFAction_IsComplete=X("EPDFAction_IsComplete",1),t._EPDFDoc_GetOpenActionModel=X("EPDFDoc_GetOpenActionModel",1),t._EPDFDoc_GetOpenActionDest=X("EPDFDoc_GetOpenActionDest",1),t._EPDFDoc_GetAdditionalActionModel=X("EPDFDoc_GetAdditionalActionModel",2),t._EPDFDoc_GetPageActionModel=X("EPDFDoc_GetPageActionModel",3),t._EPDFAnnot_GetActionModel=X("EPDFAnnot_GetActionModel",2),t._EPDFAction_CreateJavaScript=X("EPDFAction_CreateJavaScript",2),t._EPDFAction_CreateHide=X("EPDFAction_CreateHide",4),t._EPDFAction_CreateResetForm=X("EPDFAction_CreateResetForm",4),t._EPDFAction_CreateSubmitForm=X("EPDFAction_CreateSubmitForm",5),t._EPDFAction_SetNext=X("EPDFAction_SetNext",4),t._EPDFAnnot_SetEventAction=X("EPDFAnnot_SetEventAction",3),t._EPDFAnnot_SetNumberValue=X("EPDFAnnot_SetNumberValue",3),t._EPDFAnnot_HasEmbedMetadata=X("EPDFAnnot_HasEmbedMetadata",1),t._EPDFAnnot_ClearEmbedMetadata=X("EPDFAnnot_ClearEmbedMetadata",1),t._EPDFAnnot_ClearEmbedMetadataKey=X("EPDFAnnot_ClearEmbedMetadataKey",2),t._EPDFAnnot_SetEmbedMetadataString=X("EPDFAnnot_SetEmbedMetadataString",3),t._EPDFAnnot_GetEmbedMetadataString=X("EPDFAnnot_GetEmbedMetadataString",4),t._EPDFAnnot_SetEmbedMetadataNumber=X("EPDFAnnot_SetEmbedMetadataNumber",3),t._EPDFAnnot_GetEmbedMetadataNumber=X("EPDFAnnot_GetEmbedMetadataNumber",3),t._EPDFAnnot_SetEmbedMetadataBoolean=X("EPDFAnnot_SetEmbedMetadataBoolean",3),t._EPDFAnnot_GetEmbedMetadataBoolean=X("EPDFAnnot_GetEmbedMetadataBoolean",3),t._EPDFAnnot_SetEmbedMetadataRect=X("EPDFAnnot_SetEmbedMetadataRect",3),t._EPDFAnnot_GetEmbedMetadataRect=X("EPDFAnnot_GetEmbedMetadataRect",3),t._EPDFAnnot_SetEmbedMetadataJSON=X("EPDFAnnot_SetEmbedMetadataJSON",2),t._EPDFAnnot_GetEmbedMetadataJSON=X("EPDFAnnot_GetEmbedMetadataJSON",3),t._EPDFDocument_ClearEmbedMetadata=X("EPDFDocument_ClearEmbedMetadata",1),t._EPDFAnnot_SetAction=X("EPDFAnnot_SetAction",2),t._EPDFAnnot_RemoveAction=X("EPDFAnnot_RemoveAction",1),t._EPDFAnnot_RemoveDest=X("EPDFAnnot_RemoveDest",1),t._EPDFAnnot_RemoveKey=X("EPDFAnnot_RemoveKey",2),t._EPDFAnnot_GetFileAttachmentForWrite=X("EPDFAnnot_GetFileAttachmentForWrite",1),t._EPDFAnnot_SetColor=X("EPDFAnnot_SetColor",5),t._EPDFAnnot_GetColor=X("EPDFAnnot_GetColor",5),t._EPDFAnnot_ClearColor=X("EPDFAnnot_ClearColor",2),t._EPDFAnnot_SetNoColor=X("EPDFAnnot_SetNoColor",2),t._EPDFAnnot_SetOpacity=X("EPDFAnnot_SetOpacity",2),t._EPDFAnnot_GetOpacity=X("EPDFAnnot_GetOpacity",2),t._EPDFAnnot_GetBorderEffect=X("EPDFAnnot_GetBorderEffect",2),t._EPDFAnnot_SetBorderEffect=X("EPDFAnnot_SetBorderEffect",2),t._EPDFAnnot_ClearBorderEffect=X("EPDFAnnot_ClearBorderEffect",1),t._EPDFAnnot_GetRectangleDifferences=X("EPDFAnnot_GetRectangleDifferences",5),t._EPDFAnnot_ClearRectangleDifferences=X("EPDFAnnot_ClearRectangleDifferences",1),t._EPDFAnnot_GetBorderDashPatternCount=X("EPDFAnnot_GetBorderDashPatternCount",1),t._EPDFAnnot_GetBorderDashPattern=X("EPDFAnnot_GetBorderDashPattern",3),t._EPDFAnnot_SetBorderDashPattern=X("EPDFAnnot_SetBorderDashPattern",3),t._EPDFAnnot_GetBorderStyle=X("EPDFAnnot_GetBorderStyle",2),t._EPDFAnnot_SetBorderStyle=X("EPDFAnnot_SetBorderStyle",3),t._EPDFAnnot_GenerateAppearance=X("EPDFAnnot_GenerateAppearance",1),t._EPDFAnnot_GenerateAppearanceWithBlend=X("EPDFAnnot_GenerateAppearanceWithBlend",2),t._EPDFAnnot_GetBlendMode=X("EPDFAnnot_GetBlendMode",1),t._EPDFAnnot_SetIntent=X("EPDFAnnot_SetIntent",2),t._EPDFAnnot_GetIntent=X("EPDFAnnot_GetIntent",3),t._EPDFAnnot_GetRichContent=X("EPDFAnnot_GetRichContent",3),t._EPDFAnnot_GetRichTextJSON=X("EPDFAnnot_GetRichTextJSON",3),t._EPDFAnnot_SetRichTextJSON=X("EPDFAnnot_SetRichTextJSON",2),t._EPDFAnnot_SetRichTextXHTML=X("EPDFAnnot_SetRichTextXHTML",2),t._EPDFDoc_SetTypographicFeatures=X("EPDFDoc_SetTypographicFeatures",2),t._EPDFDoc_GetTypographicFeatures=X("EPDFDoc_GetTypographicFeatures",1),t._EPDFAnnot_SetLineEndings=X("EPDFAnnot_SetLineEndings",3),t._EPDFAnnot_GetLineEndings=X("EPDFAnnot_GetLineEndings",3),t._EPDFAnnot_SetVertices=X("EPDFAnnot_SetVertices",3),t._EPDFAnnot_SetLine=X("EPDFAnnot_SetLine",3),t._EPDFAnnot_SetDefaultAppearance=X("EPDFAnnot_SetDefaultAppearance",6),t._EPDFAnnot_SetDefaultAppearanceRegisteredFont=X("EPDFAnnot_SetDefaultAppearanceRegisteredFont",6),t._EPDFAnnot_GetDefaultAppearance=X("EPDFAnnot_GetDefaultAppearance",6),t._EPDFAnnot_GetDefaultAppearanceFontFace=X("EPDFAnnot_GetDefaultAppearanceFontFace",5),t._EPDFAnnot_GetDefaultAppearanceFontPostScriptName=X("EPDFAnnot_GetDefaultAppearanceFontPostScriptName",3),t._EPDFAnnot_SetDefaultAppearanceDocumentFont=X("EPDFAnnot_SetDefaultAppearanceDocumentFont",6),t._EPDFAnnot_SetTextAlignment=X("EPDFAnnot_SetTextAlignment",2),t._EPDFAnnot_GetTextAlignment=X("EPDFAnnot_GetTextAlignment",1),t._EPDFPage_GetAnnotByName=X("EPDFPage_GetAnnotByName",2),t._EPDFPage_RemoveAnnotByName=X("EPDFPage_RemoveAnnotByName",2),t._EPDFAnnot_SetLinkedAnnot=X("EPDFAnnot_SetLinkedAnnot",3),t._EPDFPage_GetAnnotIndexByNameRaw=X("EPDFPage_GetAnnotIndexByNameRaw",3),t._EPDFPage_GetAnnotIndexByObjectNumberRaw=X("EPDFPage_GetAnnotIndexByObjectNumberRaw",3),t._EPDFPage_GetAnnotCountRaw=X("EPDFPage_GetAnnotCountRaw",2),t._EPDFPage_GetAnnotRaw=X("EPDFPage_GetAnnotRaw",3),t._EPDFPage_CreateAnnotRaw=X("EPDFPage_CreateAnnotRaw",4),t._EPDFPage_RemoveAnnotRaw=X("EPDFPage_RemoveAnnotRaw",3),t._EPDFPage_PromoteInlineAnnotsRaw=X("EPDFPage_PromoteInlineAnnotsRaw",2),t._EPDFAnnot_IsValid=X("EPDFAnnot_IsValid",1),t._EPDFAnnot_SetSubtype=X("EPDFAnnot_SetSubtype",2),t._EPDFAnnot_SetName=X("EPDFAnnot_SetName",2),t._EPDFAnnot_GetName=X("EPDFAnnot_GetName",3),t._EPDFAnnot_UpdateAppearanceToRect=X("EPDFAnnot_UpdateAppearanceToRect",2),t._EPDFAnnot_SetStampOpacity=X("EPDFAnnot_SetStampOpacity",3),t._EPDFPage_CreateAnnot=X("EPDFPage_CreateAnnot",2),t._EPDFAnnot_SetRotate=X("EPDFAnnot_SetRotate",2),t._EPDFAnnot_GetRotate=X("EPDFAnnot_GetRotate",2),t._EPDFAnnot_GetAppearanceTransform=X("EPDFAnnot_GetAppearanceTransform",3),t._EPDFAnnot_GetReplyType=X("EPDFAnnot_GetReplyType",1),t._EPDFAnnot_SetReplyType=X("EPDFAnnot_SetReplyType",2),t._EPDFAnnot_GetBooleanValue=X("EPDFAnnot_GetBooleanValue",3),t._EPDFAnnot_SetBooleanValue=X("EPDFAnnot_SetBooleanValue",3),t._EPDFAnnot_SetOverlayText=X("EPDFAnnot_SetOverlayText",2),t._EPDFAnnot_GetOverlayText=X("EPDFAnnot_GetOverlayText",3),t._EPDFAnnot_SetOverlayTextRepeat=X("EPDFAnnot_SetOverlayTextRepeat",2),t._EPDFAnnot_GetOverlayTextRepeat=X("EPDFAnnot_GetOverlayTextRepeat",1),t._EPDFAnnot_SetAppearanceFromPage=X("EPDFAnnot_SetAppearanceFromPage",3),t._EPDFAnnot_ExportAppearance=X("EPDFAnnot_ExportAppearance",3),t._EPDFDoc_CanonicalDrawing=X("EPDFDoc_CanonicalDrawing",2),t._EPDFDoc_ImportDrawing=X("EPDFDoc_ImportDrawing",2),t._EPDFDoc_ExportDrawing=X("EPDFDoc_ExportDrawing",2),t._EPDFDoc_GetDrawings=X("EPDFDoc_GetDrawings",3),t._EPDFAnnot_SetDrawing=X("EPDFAnnot_SetDrawing",3),t._EPDFAnnot_GetDrawing=X("EPDFAnnot_GetDrawing",1),t._EPDFAnnot_GetRect=X("EPDFAnnot_GetRect",2),t._EPDFAnnot_SetRect=X("EPDFAnnot_SetRect",2),t._EPDFAnnot_SetAPMatrix=X("EPDFAnnot_SetAPMatrix",3),t._EPDFAnnot_GetAPMatrix=X("EPDFAnnot_GetAPMatrix",3),t._EPDFAnnot_GetAvailableAppearanceModes=X("EPDFAnnot_GetAvailableAppearanceModes",1),t._EPDFAnnot_GetAppearanceStateCount=X("EPDFAnnot_GetAppearanceStateCount",2),t._EPDFAnnot_GetAppearanceStateName=X("EPDFAnnot_GetAppearanceStateName",5),t._EPDFAnnot_GetAppearanceState=X("EPDFAnnot_GetAppearanceState",3),t._EPDFAnnot_HasAppearanceStream=X("EPDFAnnot_HasAppearanceStream",2),t._EPDFAnnot_GetDrawingRect=X("EPDFAnnot_GetDrawingRect",3),t._EPDFAnnot_SetMKColor=X("EPDFAnnot_SetMKColor",5),t._EPDFAnnot_GetMKColor=X("EPDFAnnot_GetMKColor",5),t._EPDFAnnot_ClearMKColor=X("EPDFAnnot_ClearMKColor",2),t._EPDFAnnot_SetMKText=X("EPDFAnnot_SetMKText",3),t._EPDFAnnot_GetMKText=X("EPDFAnnot_GetMKText",4),t._EPDFAnnot_SetMKTextPosition=X("EPDFAnnot_SetMKTextPosition",2),t._EPDFAnnot_GetMKTextPosition=X("EPDFAnnot_GetMKTextPosition",1),t._EPDFAnnot_SetMKIcon=X("EPDFAnnot_SetMKIcon",3),t._EPDFAnnot_GetMKIcon=X("EPDFAnnot_GetMKIcon",2),t._EPDFAnnot_ClearMKIcon=X("EPDFAnnot_ClearMKIcon",2),t._EPDFAnnot_HasMKIcon=X("EPDFAnnot_HasMKIcon",2),t._EPDFAnnot_SetMKRotation=X("EPDFAnnot_SetMKRotation",2),t._EPDFAnnot_GetMKRotation=X("EPDFAnnot_GetMKRotation",1),t._EPDFAnnot_GenerateFormFieldAP=X("EPDFAnnot_GenerateFormFieldAP",1),t._EPDFAnnot_GetCalloutLineCount=X("EPDFAnnot_GetCalloutLineCount",1),t._EPDFAnnot_GetCalloutLine=X("EPDFAnnot_GetCalloutLine",3),t._EPDFAnnot_SetCalloutLine=X("EPDFAnnot_SetCalloutLine",3),t._EPDFAnnot_GetObjectNumber=X("EPDFAnnot_GetObjectNumber",1),t._EPDFAnnot_GetStructurePosition=X("EPDFAnnot_GetStructurePosition",3),t._EPDFPage_GetAnnotByObjectNumber=X("EPDFPage_GetAnnotByObjectNumber",2),t._EPDFPage_RemoveAnnot=X("EPDFPage_RemoveAnnot",2),t._EPDFPage_RemoveAnnotByObjectNumber=X("EPDFPage_RemoveAnnotByObjectNumber",2),t._EPDFPage_MoveAnnots=X("EPDFPage_MoveAnnots",4),t._EPDFPage_MoveAnnotsRaw=X("EPDFPage_MoveAnnotsRaw",5),t._EPDF_LoadBaseDocument=X("EPDF_LoadBaseDocument",2),t._EPDF_LoadMemBaseDocument=X("EPDF_LoadMemBaseDocument",3),t._EPDF_LoadMemBaseDocument64=X("EPDF_LoadMemBaseDocument64",3),t._EPDF_ReleaseBaseDocument=X("EPDF_ReleaseBaseDocument",1),t._EPDFPage_ExportAnnotsRawToOwnedBuffer=X("EPDFPage_ExportAnnotsRawToOwnedBuffer",5),t._EPDFPage_ImportAnnotsRaw=X("EPDFPage_ImportAnnotsRaw",4),t._EPDFDoc_ExportDictRawToOwnedBuffer=X("EPDFDoc_ExportDictRawToOwnedBuffer",4),t._EPDFDoc_ExportDictCanonicalToOwnedBuffer=X("EPDFDoc_ExportDictCanonicalToOwnedBuffer",5),t._EPDFDoc_ImportDictRaw=X("EPDFDoc_ImportDictRaw",3),t._EPDFForm_ExportFieldRawToOwnedBuffer=X("EPDFForm_ExportFieldRawToOwnedBuffer",3),t._EPDFForm_ImportFieldRaw=X("EPDFForm_ImportFieldRaw",3),t._EPDFOutline_ExportItemRawToOwnedBuffer=X("EPDFOutline_ExportItemRawToOwnedBuffer",3),t._EPDFOutline_ImportItemRaw=X("EPDFOutline_ImportItemRaw",3),t._EPDFPage_ExportRawToOwnedBuffer=X("EPDFPage_ExportRawToOwnedBuffer",3),t._EPDFPage_ImportRaw=X("EPDFPage_ImportRaw",3),t._EPDFAttachment_ExportRawToOwnedBuffer=X("EPDFAttachment_ExportRawToOwnedBuffer",3),t._EPDFAttachment_ExportCanonicalToOwnedBuffer=X("EPDFAttachment_ExportCanonicalToOwnedBuffer",3),t._EPDFAttachment_ImportRaw=X("EPDFAttachment_ImportRaw",3),t._EPDFCatalog_GetMetadata=X("EPDFCatalog_GetMetadata",3),t._EPDFCatalog_SetMetadata=X("EPDFCatalog_SetMetadata",3),t._EPDFFont_RegisterFont=X("EPDFFont_RegisterFont",4),t._EPDFFont_RegisterMemFont=X("EPDFFont_RegisterMemFont",5),t._EPDFFont_RegisterMemFont64=X("EPDFFont_RegisterMemFont64",5),t._EPDFFont_ClearRegisteredFonts=X("EPDFFont_ClearRegisteredFonts",0),t._EPDFFont_GetEmbeddingPermission=X("EPDFFont_GetEmbeddingPermission",1),t._EPDFFont_IsEditingAuthorized=X("EPDFFont_IsEditingAuthorized",1),t._EPDFFont_AuthorizeEditing=X("EPDFFont_AuthorizeEditing",1),t._EPDFFont_IsInstanced=X("EPDFFont_IsInstanced",1),t._EPDFFont_GetFamilyName=X("EPDFFont_GetFamilyName",3),t._EPDFFont_GetWeight=X("EPDFFont_GetWeight",1),t._EPDFFont_IsItalic=X("EPDFFont_IsItalic",1),t._EPDFDoc_SetFontEmbeddingPolicy=X("EPDFDoc_SetFontEmbeddingPolicy",2),t._EPDFDoc_GetFontEmbeddingPolicy=X("EPDFDoc_GetFontEmbeddingPolicy",1),t._EPDFFont_AddFallbackFont=X("EPDFFont_AddFallbackFont",2),t._EPDFFont_ClearFallbackFonts=X("EPDFFont_ClearFallbackFonts",0),t._EPDFFont_SetLastResortFont=X("EPDFFont_SetLastResortFont",1),t._EPDFFont_GetLastResortFont=X("EPDFFont_GetLastResortFont",0),t._EPDFFont_GetFallbackOrder=X("EPDFFont_GetFallbackOrder",4),t._EPDFFont_GetProgramData=X("EPDFFont_GetProgramData",3),t._EPDFFont_GetProgramFormat=X("EPDFFont_GetProgramFormat",1),t._EPDFFont_GetProgramHash=X("EPDFFont_GetProgramHash",2),t._EPDFFont_GetCoverage=X("EPDFFont_GetCoverage",3),t._EPDFFont_GetMetrics=X("EPDFFont_GetMetrics",3),t._EPDFFont_GetPostScriptName=X("EPDFFont_GetPostScriptName",3),t._EPDFFontFaces_Load=X("EPDFFontFaces_Load",1),t._EPDFFontFaces_Close=X("EPDFFontFaces_Close",1),t._EPDFDoc_GetFontsFingerprint=X("EPDFDoc_GetFontsFingerprint",2),t._EPDFFontFaces_Count=X("EPDFFontFaces_Count",1),t._EPDFFontFaces_GetFamily=X("EPDFFontFaces_GetFamily",4),t._EPDFFontFaces_GetWeight=X("EPDFFontFaces_GetWeight",2),t._EPDFFontFaces_IsItalic=X("EPDFFontFaces_IsItalic",2),t._EPDFFontFaces_CountPrograms=X("EPDFFontFaces_CountPrograms",2),t._EPDFFontFaces_GetProgramObjNum=X("EPDFFontFaces_GetProgramObjNum",3),t._EPDFFontFaces_GetProgramFormat=X("EPDFFontFaces_GetProgramFormat",3),t._EPDFFontFaces_GetProgramEmbedded=X("EPDFFontFaces_GetProgramEmbedded",3),t._EPDFFontFaces_GetProgramPostScriptName=X("EPDFFontFaces_GetProgramPostScriptName",5),t._EPDFFontFaces_GetProgramEmbeddingPermission=X("EPDFFontFaces_GetProgramEmbeddingPermission",3),t._EPDFFontFaces_ProgramMapsUnicode=X("EPDFFontFaces_ProgramMapsUnicode",3),t._EPDFFontFaces_GetProgramHash=X("EPDFFontFaces_GetProgramHash",4),t._EPDFFontFaces_GetProgramDisplayHash=X("EPDFFontFaces_GetProgramDisplayHash",4),t._EPDFFontFaces_GetProgramMetrics=X("EPDFFontFaces_GetProgramMetrics",5),t._EPDFDoc_GetFontProgramData=X("EPDFDoc_GetFontProgramData",4),t._EPDFDoc_GetFontDisplayProgramData=X("EPDFDoc_GetFontDisplayProgramData",4),t._EPDFDoc_GetFontDisplayProgramCoverage=X("EPDFDoc_GetFontDisplayProgramCoverage",4),t._EPDFDoc_ResolveFonts=X("EPDFDoc_ResolveFonts",8),t._EPDFFontResolution_Close=X("EPDFFontResolution_Close",1),t._EPDFFontResolution_GetSource=X("EPDFFontResolution_GetSource",2),t._EPDFFontResolution_GetRegisteredFont=X("EPDFFontResolution_GetRegisteredFont",2),t._EPDFFontResolution_GetProgramObjNum=X("EPDFFontResolution_GetProgramObjNum",2),t._EPDFFontResolution_GetProgramDisplayHash=X("EPDFFontResolution_GetProgramDisplayHash",3),t._EPDFFontResolution_GetBaseFontName=X("EPDFFontResolution_GetBaseFontName",4),t._EPDFFontResolution_GetFamily=X("EPDFFontResolution_GetFamily",4),t._EPDFFontResolution_GetWeight=X("EPDFFontResolution_GetWeight",2),t._EPDFFontResolution_IsItalic=X("EPDFFontResolution_IsItalic",2),t._EPDFFontResolution_IsDegraded=X("EPDFFontResolution_IsDegraded",2),t._EPDFFontResolution_GetFallbacks=X("EPDFFontResolution_GetFallbacks",4),t._EPDFFontResolution_CountMissingCharacters=X("EPDFFontResolution_CountMissingCharacters",1),t._EPDFFontResolution_GetMissingCharacter=X("EPDFFontResolution_GetMissingCharacter",4),t._EPDFDoc_ClearMissingCharacters=X("EPDFDoc_ClearMissingCharacters",1),t._EPDFDoc_CountMissingCharacters=X("EPDFDoc_CountMissingCharacters",1),t._EPDFDoc_GetMissingCharacter=X("EPDFDoc_GetMissingCharacter",4),t._EPDFForm_LoadModel=X("EPDFForm_LoadModel",1),t._EPDFForm_CloseModel=X("EPDFForm_CloseModel",1),t._EPDFForm_GetFormKind=X("EPDFForm_GetFormKind",1),t._EPDFForm_GetNeedAppearances=X("EPDFForm_GetNeedAppearances",1),t._EPDFForm_CountFields=X("EPDFForm_CountFields",1),t._EPDFForm_GetFieldActionModel=X("EPDFForm_GetFieldActionModel",3),t._EPDFForm_CountCalculationOrder=X("EPDFForm_CountCalculationOrder",1),t._EPDFForm_GetCalculationOrderFieldIndex=X("EPDFForm_GetCalculationOrderFieldIndex",2),t._EPDFForm_GetFieldObjNum=X("EPDFForm_GetFieldObjNum",2),t._EPDFForm_GetFieldFamily=X("EPDFForm_GetFieldFamily",2),t._EPDFForm_GetFieldFlags=X("EPDFForm_GetFieldFlags",2),t._EPDFForm_GetFieldOrigin=X("EPDFForm_GetFieldOrigin",2),t._EPDFForm_GetFieldName=X("EPDFForm_GetFieldName",4),t._EPDFForm_GetFieldAlternateName=X("EPDFForm_GetFieldAlternateName",4),t._EPDFForm_GetFieldMappingName=X("EPDFForm_GetFieldMappingName",4),t._EPDFForm_HasFieldEmbedMetadata=X("EPDFForm_HasFieldEmbedMetadata",2),t._EPDFForm_HasFieldValuesList=X("EPDFForm_HasFieldValuesList",2),t._EPDFForm_GetFieldEmbedMetadataString=X("EPDFForm_GetFieldEmbedMetadataString",5),t._EPDFForm_GetFieldEmbedMetadataNumber=X("EPDFForm_GetFieldEmbedMetadataNumber",4),t._EPDFForm_GetFieldEmbedMetadataBoolean=X("EPDFForm_GetFieldEmbedMetadataBoolean",4),t._EPDFForm_GetFieldEmbedMetadataJSON=X("EPDFForm_GetFieldEmbedMetadataJSON",4),t._EPDFForm_GetFieldValueKind=X("EPDFForm_GetFieldValueKind",2),t._EPDFForm_CountFieldValues=X("EPDFForm_CountFieldValues",2),t._EPDFForm_GetFieldValueAt=X("EPDFForm_GetFieldValueAt",5),t._EPDFForm_GetFieldDefaultValueKind=X("EPDFForm_GetFieldDefaultValueKind",2),t._EPDFForm_CountFieldDefaultValues=X("EPDFForm_CountFieldDefaultValues",2),t._EPDFForm_GetFieldDefaultValueAt=X("EPDFForm_GetFieldDefaultValueAt",5),t._EPDFForm_GetFieldMaxLen=X("EPDFForm_GetFieldMaxLen",2),t._EPDFForm_GetFieldTopIndex=X("EPDFForm_GetFieldTopIndex",2),t._EPDFForm_CountFieldOptions=X("EPDFForm_CountFieldOptions",2),t._EPDFForm_GetFieldOptionLabel=X("EPDFForm_GetFieldOptionLabel",5),t._EPDFForm_GetFieldOptionValue=X("EPDFForm_GetFieldOptionValue",5),t._EPDFForm_IsFieldOptionSelected=X("EPDFForm_IsFieldOptionSelected",3),t._EPDFForm_CountFieldWidgets=X("EPDFForm_CountFieldWidgets",2),t._EPDFForm_GetFieldWidgetObjNum=X("EPDFForm_GetFieldWidgetObjNum",3),t._EPDFForm_GetFieldWidgetPageObjNum=X("EPDFForm_GetFieldWidgetPageObjNum",3),t._EPDFForm_GetFieldWidgetRect=X("EPDFForm_GetFieldWidgetRect",4),t._EPDFForm_GetFieldWidgetOnState=X("EPDFForm_GetFieldWidgetOnState",5),t._EPDFForm_GetFieldWidgetExportValue=X("EPDFForm_GetFieldWidgetExportValue",5),t._EPDFForm_IsFieldWidgetChecked=X("EPDFForm_IsFieldWidgetChecked",3),t._EPDFForm_GetFieldIndexByObjNum=X("EPDFForm_GetFieldIndexByObjNum",2),t._EPDFForm_GetFieldIndexForWidget=X("EPDFForm_GetFieldIndexForWidget",2),t._EPDFForm_SetFieldValue=X("EPDFForm_SetFieldValue",5),t._EPDFForm_SetFieldDefaultValue=X("EPDFForm_SetFieldDefaultValue",5),t._EPDFForm_SetFieldSelectedIndices=X("EPDFForm_SetFieldSelectedIndices",4),t._EPDFForm_SetFieldWidgetsChecked=X("EPDFForm_SetFieldWidgetsChecked",7),t._EPDFForm_RedrawFieldWidgets=X("EPDFForm_RedrawFieldWidgets",5),t._EPDFForm_SetFieldDisplay=X("EPDFForm_SetFieldDisplay",6),t._EPDFForm_SetFieldAppearanceText=X("EPDFForm_SetFieldAppearanceText",6),t._EPDFForm_ExportFDF=X("EPDFForm_ExportFDF",5),t._EPDFForm_ExportXFDF=X("EPDFForm_ExportXFDF",5),t._EPDFForm_Repair=X("EPDFForm_Repair",3),t._EPDFForm_CreateField=X("EPDFForm_CreateField",4),t._EPDFForm_AttachWidget=X("EPDFForm_AttachWidget",6),t._EPDFForm_DetachWidget=X("EPDFForm_DetachWidget",3),t._EPDFForm_DeleteField=X("EPDFForm_DeleteField",5),t._EPDFForm_SetFieldName=X("EPDFForm_SetFieldName",3),t._EPDFForm_GetFieldPartialName=X("EPDFForm_GetFieldPartialName",4),t._EPDFForm_SetFieldFlags=X("EPDFForm_SetFieldFlags",4),t._EPDFForm_SetFieldEventAction=X("EPDFForm_SetFieldEventAction",4),t._EPDFForm_SetCalculationOrder=X("EPDFForm_SetCalculationOrder",3),t._EPDFForm_SetFieldMaxLen=X("EPDFForm_SetFieldMaxLen",3),t._EPDFForm_SetFieldAlternateName=X("EPDFForm_SetFieldAlternateName",3),t._EPDFForm_SetFieldMappingName=X("EPDFForm_SetFieldMappingName",3),t._EPDFForm_SetFieldEmbedMetadataString=X("EPDFForm_SetFieldEmbedMetadataString",4),t._EPDFForm_SetFieldEmbedMetadataNumber=X("EPDFForm_SetFieldEmbedMetadataNumber",4),t._EPDFForm_SetFieldEmbedMetadataBoolean=X("EPDFForm_SetFieldEmbedMetadataBoolean",4),t._EPDFForm_SetFieldEmbedMetadataJSON=X("EPDFForm_SetFieldEmbedMetadataJSON",3),t._EPDFForm_ClearFieldEmbedMetadataKey=X("EPDFForm_ClearFieldEmbedMetadataKey",3),t._EPDFForm_ClearFieldEmbedMetadata=X("EPDFForm_ClearFieldEmbedMetadata",2),t._EPDFForm_SetFieldOptions=X("EPDFForm_SetFieldOptions",5),t._EPDFPage_Flatten=X("EPDFPage_Flatten",2),t._EPDFPage_FlattenAnnotations=X("EPDFPage_FlattenAnnotations",5),t._EPDFPage_ExportAnnotationsAsDocument=X("EPDFPage_ExportAnnotationsAsDocument",3),t._EPDFDoc_ExportPagesFlattened=X("EPDFDoc_ExportPagesFlattened",5),t._EPDFLayer_OpenLayer=X("EPDFLayer_OpenLayer",4),t._EPDFLayer_OpenLayerArtifact=X("EPDFLayer_OpenLayerArtifact",4),t._EPDFLayer_OpenLayerArtifactFromPath=X("EPDFLayer_OpenLayerArtifactFromPath",4),t._EPDFLayer_IsObjectPromoted=X("EPDFLayer_IsObjectPromoted",2),t._EPDFPage_IsValid=X("EPDFPage_IsValid",1),t._EPDFLayer_IsPagePromoted=X("EPDFLayer_IsPagePromoted",2),t._EPDFLayer_GetBirthObjectNumber=X("EPDFLayer_GetBirthObjectNumber",3),t._EPDFLayer_GetBirthName=X("EPDFLayer_GetBirthName",4),t._EPDFLayer_BeginTransaction=X("EPDFLayer_BeginTransaction",1),t._EPDFLayer_CommitTransaction=X("EPDFLayer_CommitTransaction",1),t._EPDFLayer_AbortTransaction=X("EPDFLayer_AbortTransaction",1),t._EPDFLayer_IsInTransaction=X("EPDFLayer_IsInTransaction",1),t._EPDFLayer_GetLastObjectNumber=X("EPDFLayer_GetLastObjectNumber",1),t._EPDFLayer_RaiseLastObjectNumber=X("EPDFLayer_RaiseLastObjectNumber",2),t._EPDFLayer_GetPromotedObjectCount=X("EPDFLayer_GetPromotedObjectCount",1),t._EPDFLayer_GetBaseDocument=X("EPDFLayer_GetBaseDocument",1),t._EPDF_SetBaseDocumentSha256=X("EPDF_SetBaseDocumentSha256",2),t._EPDFLayer_GetBaseSha256=X("EPDFLayer_GetBaseSha256",2),t._EPDFLayer_SaveDelta=X("EPDFLayer_SaveDelta",3),t._EPDFLayer_SaveDeltaEx=X("EPDFLayer_SaveDeltaEx",4),t._EPDFLayer_SaveDeltaToOwnedBuffer=X("EPDFLayer_SaveDeltaToOwnedBuffer",3),t._EPDFLayer_SaveDeltaToOwnedBufferEx=X("EPDFLayer_SaveDeltaToOwnedBufferEx",4),t._EPDFLayer_SaveLayerArtifact=X("EPDFLayer_SaveLayerArtifact",3),t._EPDFLayer_SaveLayerArtifactEx=X("EPDFLayer_SaveLayerArtifactEx",4),t._EPDFLayer_SaveLayerArtifactToOwnedBuffer=X("EPDFLayer_SaveLayerArtifactToOwnedBuffer",3),t._EPDFLayer_SaveLayerArtifactToOwnedBufferEx=X("EPDFLayer_SaveLayerArtifactToOwnedBufferEx",4),t._EPDFNamedDest_SetDest=X("EPDFNamedDest_SetDest",3),t._EPDFNamedDest_Remove=X("EPDFNamedDest_Remove",2),t._EPDFDest_CreateView=X("EPDFDest_CreateView",4),t._EPDFDest_CreateXYZ=X("EPDFDest_CreateXYZ",7),t._EPDFDest_CreateRemoteView=X("EPDFDest_CreateRemoteView",5),t._EPDFDest_CreateRemoteXYZ=X("EPDFDest_CreateRemoteXYZ",8),t._EPDFDest_CreateXYZByObjectNumber=X("EPDFDest_CreateXYZByObjectNumber",8),t._EPDFDest_CreateViewByObjectNumber=X("EPDFDest_CreateViewByObjectNumber",5),t._EPDFDest_GetViewNullParams=X("EPDFDest_GetViewNullParams",1),t._EPDFAction_CreateGoTo=X("EPDFAction_CreateGoTo",2),t._EPDFAction_CreateGoToNamed=X("EPDFAction_CreateGoToNamed",2),t._EPDFAction_CreateLaunch=X("EPDFAction_CreateLaunch",2),t._EPDFAction_CreateRemoteGoToByName=X("EPDFAction_CreateRemoteGoToByName",3),t._EPDFAction_CreateRemoteGoToDest=X("EPDFAction_CreateRemoteGoToDest",3),t._EPDFAction_CreateURI=X("EPDFAction_CreateURI",2),t._EPDFAction_CreateNamed=X("EPDFAction_CreateNamed",2),t._EPDFOutline_GetObjectNumber=X("EPDFOutline_GetObjectNumber",1),t._EPDFOutline_GetItem=X("EPDFOutline_GetItem",2),t._EPDFOutline_CreateItem=X("EPDFOutline_CreateItem",5),t._EPDFOutline_MoveItem=X("EPDFOutline_MoveItem",4),t._EPDFOutline_DeleteItem=X("EPDFOutline_DeleteItem",2),t._EPDFOutline_SetTitle=X("EPDFOutline_SetTitle",3),t._EPDFOutline_SetOpen=X("EPDFOutline_SetOpen",3),t._EPDFOutline_SetColor=X("EPDFOutline_SetColor",6),t._EPDFOutline_SetStyle=X("EPDFOutline_SetStyle",3),t._EPDFOutline_SetAction=X("EPDFOutline_SetAction",3),t._EPDFDoc_GetNamedPageCount=X("EPDFDoc_GetNamedPageCount",2),t._EPDFDoc_GetNamedPageAt=X("EPDFDoc_GetNamedPageAt",7),t._EPDFDoc_SetNamedPage=X("EPDFDoc_SetNamedPage",3),t._EPDFDoc_RemoveNamedPage=X("EPDFDoc_RemoveNamedPage",2),t._EPDFDoc_RemoveNamedPagesForPage=X("EPDFDoc_RemoveNamedPagesForPage",2),t._EPDFDoc_GetPageLabelSectionCount=X("EPDFDoc_GetPageLabelSectionCount",1),t._EPDFDoc_GetPageLabelSectionAt=X("EPDFDoc_GetPageLabelSectionAt",7),t._EPDFDoc_SetPageLabelSections=X("EPDFDoc_SetPageLabelSections",6),t._EPDF_DigestBuffer=X("EPDF_DigestBuffer",5),t._EPDFDoc_GetRevisionCount=X("EPDFDoc_GetRevisionCount",1),t._EPDFDoc_GetRevision=X("EPDFDoc_GetRevision",4),t._EPDFDoc_OpenRevision=X("EPDFDoc_OpenRevision",3),t._EPDFDoc_OpenBaseOverlayFromPath=X("EPDFDoc_OpenBaseOverlayFromPath",2),t._EPDFDoc_OpenBaseOverlay=X("EPDFDoc_OpenBaseOverlay",3),t._EPDFSig_LoadModel=X("EPDFSig_LoadModel",1),t._EPDFSig_CloseModel=X("EPDFSig_CloseModel",1),t._EPDFSig_Count=X("EPDFSig_Count",1),t._EPDFSig_IsRevisionChainValid=X("EPDFSig_IsRevisionChainValid",1),t._EPDFSig_GetIndexByFieldObjNum=X("EPDFSig_GetIndexByFieldObjNum",2),t._EPDFSig_GetFieldObjNum=X("EPDFSig_GetFieldObjNum",2),t._EPDFSig_GetWidgetObjNum=X("EPDFSig_GetWidgetObjNum",2),t._EPDFSig_GetWidgetPageObjNum=X("EPDFSig_GetWidgetPageObjNum",2),t._EPDFSig_GetValueObjNum=X("EPDFSig_GetValueObjNum",2),t._EPDFSig_GetFieldName=X("EPDFSig_GetFieldName",4),t._EPDFSig_IsSigned=X("EPDFSig_IsSigned",2),t._EPDFSig_GetKind=X("EPDFSig_GetKind",2),t._EPDFSig_GetByteRange=X("EPDFSig_GetByteRange",3),t._EPDFSig_GetCoverage=X("EPDFSig_GetCoverage",2),t._EPDFSig_GetRevisionIndex=X("EPDFSig_GetRevisionIndex",2),t._EPDFSig_GetContents=X("EPDFSig_GetContents",4),t._EPDFSig_GetString=X("EPDFSig_GetString",5),t._EPDFSig_GetDocMDPPermission=X("EPDFSig_GetDocMDPPermission",2),t._EPDFSig_IsCatalogCertification=X("EPDFSig_IsCatalogCertification",2),t._EPDFSig_GetFieldMDPAction=X("EPDFSig_GetFieldMDPAction",2),t._EPDFSig_GetLockAction=X("EPDFSig_GetLockAction",2),t._EPDFSig_GetLockPermission=X("EPDFSig_GetLockPermission",2),t._EPDFSig_GetFieldNameCount=X("EPDFSig_GetFieldNameCount",3),t._EPDFSig_GetFieldNameAt=X("EPDFSig_GetFieldNameAt",6),t._EPDFSig_HasSeedValue=X("EPDFSig_HasSeedValue",2),t._EPDFSig_GetSeedValueRequiredFlags=X("EPDFSig_GetSeedValueRequiredFlags",2),t._EPDFSig_GetSeedValuePresentFlags=X("EPDFSig_GetSeedValuePresentFlags",2),t._EPDFSig_GetSeedValueMDP=X("EPDFSig_GetSeedValueMDP",2),t._EPDFSig_GetSeedValueVersion=X("EPDFSig_GetSeedValueVersion",2),t._EPDFSig_GetSeedValueFilter=X("EPDFSig_GetSeedValueFilter",4),t._EPDFSig_GetSeedValueListCount=X("EPDFSig_GetSeedValueListCount",3),t._EPDFSig_GetSeedValueListAt=X("EPDFSig_GetSeedValueListAt",6),t._EPDFSig_DigestByteRange=X("EPDFSig_DigestByteRange",5),t._EPDFSig_DigestFileRange=X("EPDFSig_DigestFileRange",5),t._EPDFDoc_GetLoadedBytesSize=X("EPDFDoc_GetLoadedBytesSize",1),t._EPDFDoc_GetBaseBytesSize=X("EPDFDoc_GetBaseBytesSize",1),t._EPDFDoc_GetStructureObjectNumbers=X("EPDFDoc_GetStructureObjectNumbers",4),t._EPDFDoc_ReadLoadedBytes=X("EPDFDoc_ReadLoadedBytes",5),t._EPDFSig_Prepare=X("EPDFSig_Prepare",3),t._EPDFSig_SetFieldLock=X("EPDFSig_SetFieldLock",6),t._EPDFSig_SaveCandidateToOwnedBuffer=X("EPDFSig_SaveCandidateToOwnedBuffer",5),t._EPDFSig_SaveCandidate=X("EPDFSig_SaveCandidate",6),t._EPDFSig_Seal=X("EPDFSig_Seal",13),t._EPDFSig_SealSpan=X("EPDFSig_SealSpan",10),t._EPDFSig_WriteContents=X("EPDFSig_WriteContents",9),t._EPDFDss_GetCount=X("EPDFDss_GetCount",2),t._EPDFDss_GetData=X("EPDFDss_GetData",5),t._EPDFDss_Add=X("EPDFDss_Add",4),t._EPDFDoc_CompareRevisions=X("EPDFDoc_CompareRevisions",2),t._EPDFObjectDiff_Close=X("EPDFObjectDiff_Close",1),t._EPDFObjectDiff_GetCount=X("EPDFObjectDiff_GetCount",1),t._EPDFObjectDiff_GetEntry=X("EPDFObjectDiff_GetEntry",8),t._EPDFObjectDiff_GetValue=X("EPDFObjectDiff_GetValue",6),t._EPDFObjectDiff_GetReadStatus=X("EPDFObjectDiff_GetReadStatus",3),t._EPDFObjectDiff_GetRevisionHealth=X("EPDFObjectDiff_GetRevisionHealth",5),t._EPDFObjectDiff_GetReferrerCount=X("EPDFObjectDiff_GetReferrerCount",3),t._EPDFObjectDiff_GetReferrer=X("EPDFObjectDiff_GetReferrer",7),t._EPDFDoc_GetLoadedObjectValue=X("EPDFDoc_GetLoadedObjectValue",6),t._EPDFDoc_HasPieceInfoEntry=X("EPDFDoc_HasPieceInfoEntry",2),t._EPDFDoc_GetPieceInfoEntryCount=X("EPDFDoc_GetPieceInfoEntryCount",1),t._EPDFDoc_GetPieceInfoEntryAt=X("EPDFDoc_GetPieceInfoEntryAt",4),t._EPDFDoc_GetLastModified=X("EPDFDoc_GetLastModified",3),t._EPDFDoc_GetPieceInfoLastModified=X("EPDFDoc_GetPieceInfoLastModified",4),t._EPDFDoc_GetPieceInfoKeyCount=X("EPDFDoc_GetPieceInfoKeyCount",2),t._EPDFDoc_GetPieceInfoKeyAt=X("EPDFDoc_GetPieceInfoKeyAt",5),t._EPDFDoc_GetPieceInfoValueType=X("EPDFDoc_GetPieceInfoValueType",3),t._EPDFDoc_SetPieceInfoString=X("EPDFDoc_SetPieceInfoString",5),t._EPDFDoc_GetPieceInfoString=X("EPDFDoc_GetPieceInfoString",5),t._EPDFDoc_SetPieceInfoNumber=X("EPDFDoc_SetPieceInfoNumber",5),t._EPDFDoc_GetPieceInfoNumber=X("EPDFDoc_GetPieceInfoNumber",4),t._EPDFDoc_SetPieceInfoBoolean=X("EPDFDoc_SetPieceInfoBoolean",5),t._EPDFDoc_GetPieceInfoBoolean=X("EPDFDoc_GetPieceInfoBoolean",4),t._EPDFDoc_SetPieceInfoName=X("EPDFDoc_SetPieceInfoName",5),t._EPDFDoc_GetPieceInfoName=X("EPDFDoc_GetPieceInfoName",5),t._EPDFDoc_SetPieceInfoStringArray=X("EPDFDoc_SetPieceInfoStringArray",6),t._EPDFDoc_GetPieceInfoStringArrayCount=X("EPDFDoc_GetPieceInfoStringArrayCount",3),t._EPDFDoc_GetPieceInfoStringArrayAt=X("EPDFDoc_GetPieceInfoStringArrayAt",6),t._EPDFDoc_ClearPieceInfoKey=X("EPDFDoc_ClearPieceInfoKey",4),t._EPDFDoc_ClearPieceInfoEntry=X("EPDFDoc_ClearPieceInfoEntry",2),t._EPDFDoc_HasPagePieceInfoEntry=X("EPDFDoc_HasPagePieceInfoEntry",3),t._EPDFDoc_GetPagePieceInfoEntryCount=X("EPDFDoc_GetPagePieceInfoEntryCount",2),t._EPDFDoc_GetPagePieceInfoEntryAt=X("EPDFDoc_GetPagePieceInfoEntryAt",5),t._EPDFDoc_GetPageLastModified=X("EPDFDoc_GetPageLastModified",4),t._EPDFDoc_GetPagePieceInfoLastModified=X("EPDFDoc_GetPagePieceInfoLastModified",5),t._EPDFDoc_GetPagePieceInfoKeyCount=X("EPDFDoc_GetPagePieceInfoKeyCount",3),t._EPDFDoc_GetPagePieceInfoKeyAt=X("EPDFDoc_GetPagePieceInfoKeyAt",6),t._EPDFDoc_GetPagePieceInfoValueType=X("EPDFDoc_GetPagePieceInfoValueType",4),t._EPDFDoc_SetPagePieceInfoString=X("EPDFDoc_SetPagePieceInfoString",6),t._EPDFDoc_GetPagePieceInfoString=X("EPDFDoc_GetPagePieceInfoString",6),t._EPDFDoc_SetPagePieceInfoNumber=X("EPDFDoc_SetPagePieceInfoNumber",6),t._EPDFDoc_GetPagePieceInfoNumber=X("EPDFDoc_GetPagePieceInfoNumber",5),t._EPDFDoc_SetPagePieceInfoBoolean=X("EPDFDoc_SetPagePieceInfoBoolean",6),t._EPDFDoc_GetPagePieceInfoBoolean=X("EPDFDoc_GetPagePieceInfoBoolean",5),t._EPDFDoc_SetPagePieceInfoName=X("EPDFDoc_SetPagePieceInfoName",6),t._EPDFDoc_GetPagePieceInfoName=X("EPDFDoc_GetPagePieceInfoName",6),t._EPDFDoc_SetPagePieceInfoStringArray=X("EPDFDoc_SetPagePieceInfoStringArray",7),t._EPDFDoc_GetPagePieceInfoStringArrayCount=X("EPDFDoc_GetPagePieceInfoStringArrayCount",4),t._EPDFDoc_GetPagePieceInfoStringArrayAt=X("EPDFDoc_GetPagePieceInfoStringArrayAt",7),t._EPDFDoc_ClearPagePieceInfoKey=X("EPDFDoc_ClearPagePieceInfoKey",5),t._EPDFDoc_ClearPagePieceInfoEntry=X("EPDFDoc_ClearPagePieceInfoEntry",3),t._EPDFAnnot_GetMeasure=X("EPDFAnnot_GetMeasure",1),t._EPDFAnnot_AddMeasure=X("EPDFAnnot_AddMeasure",1),t._EPDFAnnot_RemoveMeasure=X("EPDFAnnot_RemoveMeasure",1),t._EPDFPage_CountViewports=X("EPDFPage_CountViewports",1),t._EPDFPage_GetViewport=X("EPDFPage_GetViewport",2),t._EPDFPage_AddViewport=X("EPDFPage_AddViewport",2),t._EPDFPage_RemoveViewport=X("EPDFPage_RemoveViewport",2),t._EPDFPage_CountViewportsRaw=X("EPDFPage_CountViewportsRaw",2),t._EPDFPage_GetViewportRaw=X("EPDFPage_GetViewportRaw",3),t._EPDFPage_AddViewportRaw=X("EPDFPage_AddViewportRaw",3),t._EPDFPage_RemoveViewportRaw=X("EPDFPage_RemoveViewportRaw",3),t._EPDFViewport_Close=X("EPDFViewport_Close",1),t._EPDFPage_FindViewport=X("EPDFPage_FindViewport",2),t._EPDFViewport_GetBBox=X("EPDFViewport_GetBBox",2),t._EPDFViewport_SetBBox=X("EPDFViewport_SetBBox",2),t._EPDFViewport_GetMeasure=X("EPDFViewport_GetMeasure",1),t._EPDFViewport_AddMeasure=X("EPDFViewport_AddMeasure",1),t._EPDFViewport_RemoveMeasure=X("EPDFViewport_RemoveMeasure",1),t._EPDFMeasure_GetSubtype=X("EPDFMeasure_GetSubtype",1),t._EPDFMeasure_GetOrigin=X("EPDFMeasure_GetOrigin",2),t._EPDFMeasure_SetOrigin=X("EPDFMeasure_SetOrigin",2),t._EPDFMeasure_GetCYX=X("EPDFMeasure_GetCYX",2),t._EPDFMeasure_SetCYX=X("EPDFMeasure_SetCYX",2),t._EPDFMeasure_CountFormats=X("EPDFMeasure_CountFormats",2),t._EPDFMeasure_GetFormat=X("EPDFMeasure_GetFormat",3),t._EPDFMeasure_AddFormat=X("EPDFMeasure_AddFormat",4),t._EPDFMeasure_RemoveFormats=X("EPDFMeasure_RemoveFormats",2),t._EPDFViewport_GetName=X("EPDFViewport_GetName",3),t._EPDFViewport_SetName=X("EPDFViewport_SetName",2),t._EPDFMeasure_GetRatio=X("EPDFMeasure_GetRatio",3),t._EPDFMeasure_SetRatio=X("EPDFMeasure_SetRatio",2),t._EPDFNumberFormat_GetUnit=X("EPDFNumberFormat_GetUnit",3),t._EPDFNumberFormat_SetUnit=X("EPDFNumberFormat_SetUnit",2),t._EPDFNumberFormat_GetConversion=X("EPDFNumberFormat_GetConversion",2),t._EPDFNumberFormat_SetConversion=X("EPDFNumberFormat_SetConversion",2),t._EPDFNumberFormat_GetPrecision=X("EPDFNumberFormat_GetPrecision",2),t._EPDFNumberFormat_SetPrecision=X("EPDFNumberFormat_SetPrecision",2),t._EPDFNumberFormat_GetFixedDenominator=X("EPDFNumberFormat_GetFixedDenominator",2),t._EPDFNumberFormat_SetFixedDenominator=X("EPDFNumberFormat_SetFixedDenominator",2),t._EPDFNumberFormat_GetText=X("EPDFNumberFormat_GetText",4),t._EPDFNumberFormat_SetText=X("EPDFNumberFormat_SetText",3),t._EPDFNumberFormat_GetFraction=X("EPDFNumberFormat_GetFraction",2),t._EPDFNumberFormat_SetFraction=X("EPDFNumberFormat_SetFraction",2),t._EPDFNumberFormat_GetLabelPosition=X("EPDFNumberFormat_GetLabelPosition",2),t._EPDFNumberFormat_SetLabelPosition=X("EPDFNumberFormat_SetLabelPosition",2),t._EPDFAnnot_SetLineLeader=X("EPDFAnnot_SetLineLeader",4),t._EPDFAnnot_GetLineLeader=X("EPDFAnnot_GetLineLeader",4),t._EPDFAnnot_SetLineCaption=X("EPDFAnnot_SetLineCaption",4),t._EPDFAnnot_GetLineCaption=X("EPDFAnnot_GetLineCaption",4),t._EPDFAnnot_SetShapeCaption=X("EPDFAnnot_SetShapeCaption",3),t._EPDFAnnot_GetShapeCaption=X("EPDFAnnot_GetShapeCaption",4),t._EPDFPage_GetParsedSize=X("EPDFPage_GetParsedSize",2),t._EPDFPage_IsContentCurrent=X("EPDFPage_IsContentCurrent",1),t._EPDF_PNG_EncodeRGBA=X("EPDF_PNG_EncodeRGBA",6),t._EPDFDoc_ImportPages=X("EPDFDoc_ImportPages",6),t._EPDFDoc_GetImportFieldRoots=X("EPDFDoc_GetImportFieldRoots",5),t._EPDFPage_ApplyRedactions=X("EPDFPage_ApplyRedactions",4),t._EPDF_InitThread=X("EPDF_InitThread",0),t._EPDF_ShutdownThread=X("EPDF_ShutdownThread",0),t._FPDFAnnot_IsSupportedSubtype=X("FPDFAnnot_IsSupportedSubtype",1),t._FPDFPage_CreateAnnot=X("FPDFPage_CreateAnnot",2),t._FPDFPage_GetAnnotCount=X("FPDFPage_GetAnnotCount",1),t._FPDFPage_GetAnnot=X("FPDFPage_GetAnnot",2),t._FPDFPage_GetAnnotIndex=X("FPDFPage_GetAnnotIndex",2),t._FPDFPage_CloseAnnot=X("FPDFPage_CloseAnnot",1),t._FPDFPage_RemoveAnnot=X("FPDFPage_RemoveAnnot",2),t._FPDFAnnot_GetSubtype=X("FPDFAnnot_GetSubtype",1),t._FPDFAnnot_IsObjectSupportedSubtype=X("FPDFAnnot_IsObjectSupportedSubtype",1),t._FPDFAnnot_UpdateObject=X("FPDFAnnot_UpdateObject",2),t._FPDFAnnot_AddInkStroke=X("FPDFAnnot_AddInkStroke",3),t._FPDFAnnot_RemoveInkList=X("FPDFAnnot_RemoveInkList",1),t._FPDFAnnot_AppendObject=X("FPDFAnnot_AppendObject",2),t._FPDFAnnot_GetObjectCount=X("FPDFAnnot_GetObjectCount",1),t._FPDFAnnot_GetObject=X("FPDFAnnot_GetObject",2),t._FPDFAnnot_RemoveObject=X("FPDFAnnot_RemoveObject",2),t._FPDFAnnot_SetColor=X("FPDFAnnot_SetColor",6),t._FPDFAnnot_GetColor=X("FPDFAnnot_GetColor",6),t._FPDFAnnot_HasAttachmentPoints=X("FPDFAnnot_HasAttachmentPoints",1),t._FPDFAnnot_SetAttachmentPoints=X("FPDFAnnot_SetAttachmentPoints",3),t._FPDFAnnot_AppendAttachmentPoints=X("FPDFAnnot_AppendAttachmentPoints",2),t._FPDFAnnot_CountAttachmentPoints=X("FPDFAnnot_CountAttachmentPoints",1),t._FPDFAnnot_GetAttachmentPoints=X("FPDFAnnot_GetAttachmentPoints",3),t._FPDFAnnot_SetRect=X("FPDFAnnot_SetRect",2),t._FPDFAnnot_GetRect=X("FPDFAnnot_GetRect",2),t._FPDFAnnot_GetVertices=X("FPDFAnnot_GetVertices",3),t._FPDFAnnot_GetInkListCount=X("FPDFAnnot_GetInkListCount",1),t._FPDFAnnot_GetInkListPath=X("FPDFAnnot_GetInkListPath",4),t._FPDFAnnot_GetLine=X("FPDFAnnot_GetLine",3),t._FPDFAnnot_SetBorder=X("FPDFAnnot_SetBorder",4),t._FPDFAnnot_GetBorder=X("FPDFAnnot_GetBorder",4),t._FPDFAnnot_HasKey=X("FPDFAnnot_HasKey",2),t._FPDFAnnot_GetValueType=X("FPDFAnnot_GetValueType",2),t._FPDFAnnot_SetStringValue=X("FPDFAnnot_SetStringValue",3),t._FPDFAnnot_GetStringValue=X("FPDFAnnot_GetStringValue",4),t._FPDFAnnot_GetNumberValue=X("FPDFAnnot_GetNumberValue",3),t._FPDFAnnot_SetAP=X("FPDFAnnot_SetAP",3),t._FPDFAnnot_GetAP=X("FPDFAnnot_GetAP",4),t._FPDFAnnot_GetLinkedAnnot=X("FPDFAnnot_GetLinkedAnnot",2),t._FPDFAnnot_GetFlags=X("FPDFAnnot_GetFlags",1),t._FPDFAnnot_SetFlags=X("FPDFAnnot_SetFlags",2),t._FPDFAnnot_GetFormFieldFlags=X("FPDFAnnot_GetFormFieldFlags",2),t._FPDFAnnot_SetFormFieldFlags=X("FPDFAnnot_SetFormFieldFlags",3),t._FPDFAnnot_GetFormFieldAtPoint=X("FPDFAnnot_GetFormFieldAtPoint",3),t._FPDFAnnot_GetFormFieldName=X("FPDFAnnot_GetFormFieldName",4),t._FPDFAnnot_GetFormFieldType=X("FPDFAnnot_GetFormFieldType",2),t._FPDFAnnot_GetFormAdditionalActionJavaScript=X("FPDFAnnot_GetFormAdditionalActionJavaScript",5),t._FPDFAnnot_GetFormFieldAlternateName=X("FPDFAnnot_GetFormFieldAlternateName",4),t._FPDFAnnot_GetFormFieldValue=X("FPDFAnnot_GetFormFieldValue",4),t._FPDFAnnot_GetOptionCount=X("FPDFAnnot_GetOptionCount",2),t._FPDFAnnot_GetOptionLabel=X("FPDFAnnot_GetOptionLabel",5),t._FPDFAnnot_IsOptionSelected=X("FPDFAnnot_IsOptionSelected",3),t._FPDFAnnot_GetFontSize=X("FPDFAnnot_GetFontSize",3),t._FPDFAnnot_SetFontColor=X("FPDFAnnot_SetFontColor",5),t._FPDFAnnot_GetFontColor=X("FPDFAnnot_GetFontColor",5),t._FPDFAnnot_IsChecked=X("FPDFAnnot_IsChecked",2),t._FPDFAnnot_SetFocusableSubtypes=X("FPDFAnnot_SetFocusableSubtypes",3),t._FPDFAnnot_GetFocusableSubtypesCount=X("FPDFAnnot_GetFocusableSubtypesCount",1),t._FPDFAnnot_GetFocusableSubtypes=X("FPDFAnnot_GetFocusableSubtypes",3),t._FPDFAnnot_GetLink=X("FPDFAnnot_GetLink",1),t._FPDFAnnot_GetFormControlCount=X("FPDFAnnot_GetFormControlCount",2),t._FPDFAnnot_GetFormControlIndex=X("FPDFAnnot_GetFormControlIndex",2),t._FPDFAnnot_GetFormFieldExportValue=X("FPDFAnnot_GetFormFieldExportValue",4),t._FPDFAnnot_SetURI=X("FPDFAnnot_SetURI",2),t._FPDFAnnot_GetFileAttachment=X("FPDFAnnot_GetFileAttachment",1),t._FPDFAnnot_AddFileAttachment=X("FPDFAnnot_AddFileAttachment",2),t._FPDFDoc_GetAttachmentCount=X("FPDFDoc_GetAttachmentCount",1),t._FPDFDoc_AddAttachment=X("FPDFDoc_AddAttachment",2),t._FPDFDoc_GetAttachment=X("FPDFDoc_GetAttachment",2),t._EPDFDoc_GetAttachmentKey=X("EPDFDoc_GetAttachmentKey",4),t._EPDFDoc_GetAttachmentIndexByKey=X("EPDFDoc_GetAttachmentIndexByKey",2),t._FPDFDoc_DeleteAttachment=X("FPDFDoc_DeleteAttachment",2),t._FPDFAttachment_GetName=X("FPDFAttachment_GetName",3),t._FPDFAttachment_HasKey=X("FPDFAttachment_HasKey",2),t._FPDFAttachment_GetValueType=X("FPDFAttachment_GetValueType",2),t._FPDFAttachment_SetStringValue=X("FPDFAttachment_SetStringValue",3),t._FPDFAttachment_GetStringValue=X("FPDFAttachment_GetStringValue",4),t._FPDFAttachment_SetDescription=X("FPDFAttachment_SetDescription",2),t._FPDFAttachment_GetDescription=X("FPDFAttachment_GetDescription",3),t._FPDFAttachment_SetFile=X("FPDFAttachment_SetFile",4),t._FPDFAttachment_GetFile=X("FPDFAttachment_GetFile",4),t._FPDFAttachment_GetSubtype=X("FPDFAttachment_GetSubtype",3),t._FPDFAttachment_GetAFRelationship=X("FPDFAttachment_GetAFRelationship",3),t._EPDFAttachment_SetSubtype=X("EPDFAttachment_SetSubtype",2),t._EPDFAttachment_SetDescription=X("EPDFAttachment_SetDescription",2),t._EPDFAttachment_SetName=X("EPDFAttachment_SetName",2),t._EPDFAttachment_GetDescription=X("EPDFAttachment_GetDescription",3),t._EPDFAttachment_GetIntegerValue=X("EPDFAttachment_GetIntegerValue",3),t._EPDFAttachment_ExtractFile=X("EPDFAttachment_ExtractFile",6),t._EPDFAttachment_ExtractFileToOwnedBuffer=X("EPDFAttachment_ExtractFileToOwnedBuffer",6),t._FPDFCatalog_IsTagged=X("FPDFCatalog_IsTagged",1),t._FPDFCatalog_GetLanguage=X("FPDFCatalog_GetLanguage",3),t._FPDFCatalog_SetLanguage=X("FPDFCatalog_SetLanguage",2),t._EPDFCatalog_GetLanguage=X("EPDFCatalog_GetLanguage",3),t._FPDFAvail_Create=X("FPDFAvail_Create",2),t._FPDFAvail_Destroy=X("FPDFAvail_Destroy",1),t._FPDFAvail_IsDocAvail=X("FPDFAvail_IsDocAvail",2),t._FPDFAvail_GetDocument=X("FPDFAvail_GetDocument",2),t._FPDFAvail_GetFirstPageNum=X("FPDFAvail_GetFirstPageNum",1),t._FPDFAvail_IsPageAvail=X("FPDFAvail_IsPageAvail",3),t._FPDFAvail_IsFormAvail=X("FPDFAvail_IsFormAvail",2),t._FPDFAvail_IsLinearized=X("FPDFAvail_IsLinearized",1),t._FPDFBookmark_GetFirstChild=X("FPDFBookmark_GetFirstChild",2),t._FPDFBookmark_GetNextSibling=X("FPDFBookmark_GetNextSibling",2),t._FPDFBookmark_GetTitle=X("FPDFBookmark_GetTitle",3),t._FPDFBookmark_GetCount=X("FPDFBookmark_GetCount",1),t._FPDFBookmark_Find=X("FPDFBookmark_Find",2),t._FPDFBookmark_GetDest=X("FPDFBookmark_GetDest",2),t._FPDFBookmark_GetAction=X("FPDFBookmark_GetAction",1),t._FPDFBookmark_GetColor=X("FPDFBookmark_GetColor",4),t._FPDFBookmark_GetStyle=X("FPDFBookmark_GetStyle",1),t._FPDFAction_GetType=X("FPDFAction_GetType",1),t._FPDFAction_GetDest=X("FPDFAction_GetDest",2),t._FPDFAction_GetFilePath=X("FPDFAction_GetFilePath",3),t._FPDFAction_GetURIPath=X("FPDFAction_GetURIPath",4),t._FPDFDest_GetDestPageIndex=X("FPDFDest_GetDestPageIndex",2),t._EPDFDest_GetPageObjectNumber=X("EPDFDest_GetPageObjectNumber",2),t._FPDFDest_GetView=X("FPDFDest_GetView",3),t._FPDFDest_GetLocationInPage=X("FPDFDest_GetLocationInPage",7),t._FPDFLink_GetLinkAtPoint=X("FPDFLink_GetLinkAtPoint",3),t._FPDFLink_GetLinkZOrderAtPoint=X("FPDFLink_GetLinkZOrderAtPoint",3),t._FPDFLink_GetDest=X("FPDFLink_GetDest",2),t._FPDFLink_GetAction=X("FPDFLink_GetAction",1),t._FPDFLink_Enumerate=X("FPDFLink_Enumerate",3),t._FPDFLink_GetAnnot=X("FPDFLink_GetAnnot",2),t._FPDFLink_GetAnnotRect=X("FPDFLink_GetAnnotRect",2),t._FPDFLink_CountQuadPoints=X("FPDFLink_CountQuadPoints",1),t._FPDFLink_GetQuadPoints=X("FPDFLink_GetQuadPoints",3),t._FPDF_GetPageAAction=X("FPDF_GetPageAAction",2),t._FPDF_GetFileIdentifier=X("FPDF_GetFileIdentifier",4),t._FPDF_GetMetaText=X("FPDF_GetMetaText",4),t._FPDF_GetPageLabel=X("FPDF_GetPageLabel",4),t._EPDF_SetMetaText=X("EPDF_SetMetaText",3),t._EPDF_HasMetaText=X("EPDF_HasMetaText",2),t._EPDF_GetMetaTrapped=X("EPDF_GetMetaTrapped",1),t._EPDF_SetMetaTrapped=X("EPDF_SetMetaTrapped",2),t._EPDF_GetMetaKeyCount=X("EPDF_GetMetaKeyCount",2),t._EPDF_GetMetaKeyName=X("EPDF_GetMetaKeyName",5),t._FPDFPageObj_NewImageObj=X("FPDFPageObj_NewImageObj",1),t._FPDFImageObj_LoadJpegFile=X("FPDFImageObj_LoadJpegFile",4),t._FPDFImageObj_LoadJpegFileInline=X("FPDFImageObj_LoadJpegFileInline",4),t._FPDFImageObj_SetMatrix=X("FPDFImageObj_SetMatrix",7),t._FPDFImageObj_SetBitmap=X("FPDFImageObj_SetBitmap",4),t._FPDFImageObj_GetBitmap=X("FPDFImageObj_GetBitmap",1),t._FPDFImageObj_GetRenderedBitmap=X("FPDFImageObj_GetRenderedBitmap",3),t._FPDFImageObj_GetImageDataDecoded=X("FPDFImageObj_GetImageDataDecoded",3),t._FPDFImageObj_GetImageDataRaw=X("FPDFImageObj_GetImageDataRaw",3),t._FPDFImageObj_GetImageFilterCount=X("FPDFImageObj_GetImageFilterCount",1),t._FPDFImageObj_GetImageFilter=X("FPDFImageObj_GetImageFilter",4),t._FPDFImageObj_GetImageMetadata=X("FPDFImageObj_GetImageMetadata",3),t._FPDFImageObj_GetImagePixelSize=X("FPDFImageObj_GetImagePixelSize",3),t._FPDFImageObj_GetIccProfileDataDecoded=X("FPDFImageObj_GetIccProfileDataDecoded",5),t._EPDFImageObj_SetPng=X("EPDFImageObj_SetPng",5),t._EPDFImageObj_SetJpeg=X("EPDFImageObj_SetJpeg",5),t._FPDF_CreateNewDocument=X("FPDF_CreateNewDocument",0),t._FPDFPage_Delete=X("FPDFPage_Delete",2),t._FPDF_MovePages=X("FPDF_MovePages",4),t._FPDFPage_New=X("FPDFPage_New",4),t._EPDFPage_InsertBlankRaw=X("EPDFPage_InsertBlankRaw",5),t._FPDFPage_GetRotation=X("FPDFPage_GetRotation",1),t._FPDFPage_InsertObject=X("FPDFPage_InsertObject",2),t._FPDFPage_InsertObjectAtIndex=X("FPDFPage_InsertObjectAtIndex",3),t._FPDFPage_RemoveObject=X("FPDFPage_RemoveObject",2),t._FPDFPage_CountObjects=X("FPDFPage_CountObjects",1),t._FPDFPage_GetObject=X("FPDFPage_GetObject",2),t._FPDFPage_HasTransparency=X("FPDFPage_HasTransparency",1),t._FPDFPageObj_Destroy=X("FPDFPageObj_Destroy",1),t._FPDFPageObj_GetMarkedContentID=X("FPDFPageObj_GetMarkedContentID",1),t._FPDFPageObj_CountMarks=X("FPDFPageObj_CountMarks",1),t._FPDFPageObj_GetMark=X("FPDFPageObj_GetMark",2),t._FPDFPageObj_AddExistingMark=X("FPDFPageObj_AddExistingMark",2),t._FPDFPageObj_AddMark=X("FPDFPageObj_AddMark",2),t._FPDFPageObj_RemoveMark=X("FPDFPageObj_RemoveMark",2),t._FPDFPageObjMark_GetName=X("FPDFPageObjMark_GetName",4),t._FPDFPageObjMark_CountParams=X("FPDFPageObjMark_CountParams",1),t._FPDFPageObjMark_GetParamKey=X("FPDFPageObjMark_GetParamKey",5),t._FPDFPageObjMark_GetParamValueType=X("FPDFPageObjMark_GetParamValueType",2),t._FPDFPageObjMark_GetParamIntValue=X("FPDFPageObjMark_GetParamIntValue",3),t._FPDFPageObjMark_GetParamFloatValue=X("FPDFPageObjMark_GetParamFloatValue",3),t._FPDFPageObjMark_GetParamStringValue=X("FPDFPageObjMark_GetParamStringValue",5),t._FPDFPageObjMark_GetParamBlobValue=X("FPDFPageObjMark_GetParamBlobValue",5),t._FPDFPageObj_HasTransparency=X("FPDFPageObj_HasTransparency",1),t._FPDFPageObjMark_SetIntParam=X("FPDFPageObjMark_SetIntParam",5),t._FPDFPageObjMark_SetFloatParam=X("FPDFPageObjMark_SetFloatParam",5),t._FPDFPageObjMark_SetStringParam=X("FPDFPageObjMark_SetStringParam",5),t._FPDFPageObjMark_SetBlobParam=X("FPDFPageObjMark_SetBlobParam",6),t._FPDFPageObjMark_RemoveParam=X("FPDFPageObjMark_RemoveParam",3),t._FPDFPageObj_GetType=X("FPDFPageObj_GetType",1),t._FPDFPageObj_GetIsActive=X("FPDFPageObj_GetIsActive",2),t._FPDFPageObj_SetIsActive=X("FPDFPageObj_SetIsActive",2),t._FPDFPage_GenerateContent=X("FPDFPage_GenerateContent",1),t._FPDFPageObj_Transform=X("FPDFPageObj_Transform",7),t._FPDFPageObj_TransformF=X("FPDFPageObj_TransformF",2),t._FPDFPageObj_GetMatrix=X("FPDFPageObj_GetMatrix",2),t._FPDFPageObj_SetMatrix=X("FPDFPageObj_SetMatrix",2),t._FPDFPageObj_SetBlendMode=X("FPDFPageObj_SetBlendMode",2),t._FPDFPage_TransformAnnots=X("FPDFPage_TransformAnnots",7),t._FPDFPage_SetRotation=X("FPDFPage_SetRotation",2),t._FPDFPageObj_SetFillColor=X("FPDFPageObj_SetFillColor",5),t._FPDFPageObj_GetFillColor=X("FPDFPageObj_GetFillColor",5),t._FPDFPageObj_GetBounds=X("FPDFPageObj_GetBounds",5),t._FPDFPageObj_GetRotatedBounds=X("FPDFPageObj_GetRotatedBounds",2),t._FPDFPageObj_SetStrokeColor=X("FPDFPageObj_SetStrokeColor",5),t._FPDFPageObj_GetStrokeColor=X("FPDFPageObj_GetStrokeColor",5),t._FPDFPageObj_SetStrokeWidth=X("FPDFPageObj_SetStrokeWidth",2),t._FPDFPageObj_GetStrokeWidth=X("FPDFPageObj_GetStrokeWidth",2),t._FPDFPageObj_GetLineJoin=X("FPDFPageObj_GetLineJoin",1),t._FPDFPageObj_SetLineJoin=X("FPDFPageObj_SetLineJoin",2),t._FPDFPageObj_GetLineCap=X("FPDFPageObj_GetLineCap",1),t._FPDFPageObj_SetLineCap=X("FPDFPageObj_SetLineCap",2),t._FPDFPageObj_GetDashPhase=X("FPDFPageObj_GetDashPhase",2),t._FPDFPageObj_SetDashPhase=X("FPDFPageObj_SetDashPhase",2),t._FPDFPageObj_GetDashCount=X("FPDFPageObj_GetDashCount",1),t._FPDFPageObj_GetDashArray=X("FPDFPageObj_GetDashArray",3),t._FPDFPageObj_SetDashArray=X("FPDFPageObj_SetDashArray",4),t._FPDFPageObj_GetRenderedStrokePattern=X("FPDFPageObj_GetRenderedStrokePattern",2),t._FPDFPageObj_GetRenderedFillPattern=X("FPDFPageObj_GetRenderedFillPattern",2),t._FPDFFormObj_CountObjects=X("FPDFFormObj_CountObjects",1),t._FPDFFormObj_GetObject=X("FPDFFormObj_GetObject",2),t._FPDFFormObj_RemoveObject=X("FPDFFormObj_RemoveObject",2),t._FPDFPageObj_CreateNewPath=X("FPDFPageObj_CreateNewPath",2),t._FPDFPageObj_CreateNewRect=X("FPDFPageObj_CreateNewRect",4),t._FPDFPath_CountSegments=X("FPDFPath_CountSegments",1),t._FPDFPath_GetPathSegment=X("FPDFPath_GetPathSegment",2),t._FPDFPath_MoveTo=X("FPDFPath_MoveTo",3),t._FPDFPath_LineTo=X("FPDFPath_LineTo",3),t._FPDFPath_BezierTo=X("FPDFPath_BezierTo",7),t._FPDFPath_GetBezierControlPoints=X("FPDFPath_GetBezierControlPoints",4),t._FPDFPath_Close=X("FPDFPath_Close",1),t._FPDFPath_SetDrawMode=X("FPDFPath_SetDrawMode",3),t._FPDFPath_GetDrawMode=X("FPDFPath_GetDrawMode",3),t._FPDFPathSegment_GetPoint=X("FPDFPathSegment_GetPoint",3),t._FPDFPathSegment_GetType=X("FPDFPathSegment_GetType",1),t._FPDFPathSegment_GetClose=X("FPDFPathSegment_GetClose",1),t._FPDFPageObj_NewTextObj=X("FPDFPageObj_NewTextObj",3),t._FPDFText_SetText=X("FPDFText_SetText",2),t._FPDFText_SetCharcodes=X("FPDFText_SetCharcodes",3),t._FPDFText_SetPositions=X("FPDFText_SetPositions",3),t._FPDFText_LoadFont=X("FPDFText_LoadFont",5),t._FPDFText_LoadStandardFont=X("FPDFText_LoadStandardFont",2),t._FPDFText_LoadCidType2Font=X("FPDFText_LoadCidType2Font",6),t._FPDFTextObj_GetFontSize=X("FPDFTextObj_GetFontSize",2),t._FPDFTextObj_SetFontSize=X("FPDFTextObj_SetFontSize",2),t._FPDFTextObj_GetText=X("FPDFTextObj_GetText",4),t._FPDFTextObj_GetRenderedBitmap=X("FPDFTextObj_GetRenderedBitmap",4),t._FPDFFont_Close=X("FPDFFont_Close",1),t._FPDFPageObj_CreateTextObj=X("FPDFPageObj_CreateTextObj",3),t._FPDFTextObj_GetTextRenderMode=X("FPDFTextObj_GetTextRenderMode",1),t._FPDFTextObj_SetTextRenderMode=X("FPDFTextObj_SetTextRenderMode",2),t._FPDFTextObj_GetFont=X("FPDFTextObj_GetFont",1),t._FPDFFont_GetBaseFontName=X("FPDFFont_GetBaseFontName",3),t._FPDFFont_GetFamilyName=X("FPDFFont_GetFamilyName",3),t._FPDFFont_GetFontData=X("FPDFFont_GetFontData",4),t._FPDFFont_GetIsEmbedded=X("FPDFFont_GetIsEmbedded",1),t._FPDFFont_GetFlags=X("FPDFFont_GetFlags",1),t._FPDFFont_GetWeight=X("FPDFFont_GetWeight",1),t._FPDFFont_GetItalicAngle=X("FPDFFont_GetItalicAngle",2),t._FPDFFont_GetAscent=X("FPDFFont_GetAscent",3),t._FPDFFont_GetDescent=X("FPDFFont_GetDescent",3),t._FPDFFont_GetGlyphWidth=X("FPDFFont_GetGlyphWidth",4),t._FPDFFont_GetGlyphPath=X("FPDFFont_GetGlyphPath",3),t._FPDFGlyphPath_CountGlyphSegments=X("FPDFGlyphPath_CountGlyphSegments",1),t._FPDFGlyphPath_GetGlyphPathSegment=X("FPDFGlyphPath_GetGlyphPathSegment",2),t._EPDFText_RedactInRect=X("EPDFText_RedactInRect",4),t._EPDFText_RedactInQuads=X("EPDFText_RedactInQuads",5),t._FPDFDoc_GetPageMode=X("FPDFDoc_GetPageMode",1),t._FPDFPage_Flatten=X("FPDFPage_Flatten",2),t._FPDFPage_HasFormFieldAtPoint=X("FPDFPage_HasFormFieldAtPoint",4),t._FPDFPage_FormFieldZOrderAtPoint=X("FPDFPage_FormFieldZOrderAtPoint",4),t._FPDFDOC_InitFormFillEnvironment=X("FPDFDOC_InitFormFillEnvironment",2),t._FPDFDOC_ExitFormFillEnvironment=X("FPDFDOC_ExitFormFillEnvironment",1),t._FORM_OnMouseMove=X("FORM_OnMouseMove",5),t._FORM_OnMouseWheel=X("FORM_OnMouseWheel",6),t._FORM_OnFocus=X("FORM_OnFocus",5),t._FORM_OnLButtonDown=X("FORM_OnLButtonDown",5),t._FORM_OnLButtonUp=X("FORM_OnLButtonUp",5),t._FORM_OnLButtonDoubleClick=X("FORM_OnLButtonDoubleClick",5),t._FORM_OnRButtonDown=X("FORM_OnRButtonDown",5),t._FORM_OnRButtonUp=X("FORM_OnRButtonUp",5),t._FORM_OnKeyDown=X("FORM_OnKeyDown",4),t._FORM_OnKeyUp=X("FORM_OnKeyUp",4),t._FORM_OnChar=X("FORM_OnChar",4),t._FORM_GetFocusedText=X("FORM_GetFocusedText",4),t._FORM_GetSelectedText=X("FORM_GetSelectedText",4),t._FORM_ReplaceAndKeepSelection=X("FORM_ReplaceAndKeepSelection",3),t._FORM_ReplaceSelection=X("FORM_ReplaceSelection",3),t._FORM_SelectAllText=X("FORM_SelectAllText",2),t._FORM_CanUndo=X("FORM_CanUndo",2),t._FORM_CanRedo=X("FORM_CanRedo",2),t._FORM_Undo=X("FORM_Undo",2),t._FORM_Redo=X("FORM_Redo",2),t._FORM_ForceToKillFocus=X("FORM_ForceToKillFocus",1),t._FORM_GetFocusedAnnot=X("FORM_GetFocusedAnnot",3),t._FORM_SetFocusedAnnot=X("FORM_SetFocusedAnnot",2),t._FPDF_FFLDraw=X("FPDF_FFLDraw",9),t._FPDF_SetFormFieldHighlightColor=X("FPDF_SetFormFieldHighlightColor",3),t._FPDF_SetFormFieldHighlightAlpha=X("FPDF_SetFormFieldHighlightAlpha",2),t._FPDF_RemoveFormFieldHighlight=X("FPDF_RemoveFormFieldHighlight",1),t._FORM_OnAfterLoadPage=X("FORM_OnAfterLoadPage",2),t._FORM_OnBeforeClosePage=X("FORM_OnBeforeClosePage",2),t._FORM_DoDocumentJSAction=X("FORM_DoDocumentJSAction",1),t._FORM_DoDocumentOpenAction=X("FORM_DoDocumentOpenAction",1),t._FORM_DoDocumentAAction=X("FORM_DoDocumentAAction",2),t._FORM_DoPageAAction=X("FORM_DoPageAAction",3),t._FORM_SetIndexSelected=X("FORM_SetIndexSelected",4),t._FORM_IsIndexSelected=X("FORM_IsIndexSelected",3),t._FORM_GetTextDirection=X("FORM_GetTextDirection",2),t._FORM_SetTextDirection=X("FORM_SetTextDirection",3),t._FPDFDoc_GetJavaScriptActionCount=X("FPDFDoc_GetJavaScriptActionCount",1),t._FPDFDoc_GetJavaScriptAction=X("FPDFDoc_GetJavaScriptAction",2),t._EPDFDoc_GetNamedJavaScriptActionModel=X("EPDFDoc_GetNamedJavaScriptActionModel",2),t._FPDFDoc_CloseJavaScriptAction=X("FPDFDoc_CloseJavaScriptAction",1),t._FPDFJavaScriptAction_GetName=X("FPDFJavaScriptAction_GetName",3),t._FPDFJavaScriptAction_GetScript=X("FPDFJavaScriptAction_GetScript",3),t._FPDF_ImportPagesByIndex=X("FPDF_ImportPagesByIndex",5),t._FPDF_ImportPages=X("FPDF_ImportPages",4),t._FPDF_ImportNPagesToOne=X("FPDF_ImportNPagesToOne",5),t._FPDF_NewXObjectFromPage=X("FPDF_NewXObjectFromPage",3),t._FPDF_CloseXObject=X("FPDF_CloseXObject",1),t._FPDF_NewFormObjectFromXObject=X("FPDF_NewFormObjectFromXObject",1),t._FPDF_CopyViewerPreferences=X("FPDF_CopyViewerPreferences",2),t._FPDF_RenderPageBitmapWithColorScheme_Start=X("FPDF_RenderPageBitmapWithColorScheme_Start",10),t._FPDF_RenderPageBitmap_Start=X("FPDF_RenderPageBitmap_Start",9),t._FPDF_RenderPage_Continue=X("FPDF_RenderPage_Continue",2),t._FPDF_RenderPage_Close=X("FPDF_RenderPage_Close",1),t._EPDF_RenderPageBitmapWithMatrix_Start=X("EPDF_RenderPageBitmapWithMatrix_Start",6),t._EPDF_RenderPage_Continue=X("EPDF_RenderPage_Continue",2),t._EPDF_FreeBuffer=X("EPDF_FreeBuffer",1),t._FPDF_SaveAsCopy=X("FPDF_SaveAsCopy",3),t._FPDF_SaveWithVersion=X("FPDF_SaveWithVersion",4),t._EPDF_SaveDocumentToOwnedBuffer=X("EPDF_SaveDocumentToOwnedBuffer",3),t._EPDF_SaveDocumentToOwnedBufferWithVersion=X("EPDF_SaveDocumentToOwnedBufferWithVersion",4),t._EPDF_SaveDocumentToOwnedBufferEx=X("EPDF_SaveDocumentToOwnedBufferEx",5),t._EPDF_SaveAsCopyEx=X("EPDF_SaveAsCopyEx",4),t._FPDFText_GetCharIndexFromTextIndex=X("FPDFText_GetCharIndexFromTextIndex",2),t._FPDFText_GetTextIndexFromCharIndex=X("FPDFText_GetTextIndexFromCharIndex",2),t._FPDF_GetSignatureCount=X("FPDF_GetSignatureCount",1),t._FPDF_GetSignatureObject=X("FPDF_GetSignatureObject",2),t._FPDFSignatureObj_GetContents=X("FPDFSignatureObj_GetContents",3),t._FPDFSignatureObj_GetByteRange=X("FPDFSignatureObj_GetByteRange",3),t._FPDFSignatureObj_GetSubFilter=X("FPDFSignatureObj_GetSubFilter",3),t._FPDFSignatureObj_GetReason=X("FPDFSignatureObj_GetReason",3),t._FPDFSignatureObj_GetTime=X("FPDFSignatureObj_GetTime",3),t._FPDFSignatureObj_GetDocMDPPermission=X("FPDFSignatureObj_GetDocMDPPermission",1),t._FPDF_StructTree_GetForPage=X("FPDF_StructTree_GetForPage",1),t._FPDF_StructTree_Close=X("FPDF_StructTree_Close",1),t._FPDF_StructTree_CountChildren=X("FPDF_StructTree_CountChildren",1),t._FPDF_StructTree_GetChildAtIndex=X("FPDF_StructTree_GetChildAtIndex",2),t._FPDF_StructElement_GetAltText=X("FPDF_StructElement_GetAltText",3),t._FPDF_StructElement_GetActualText=X("FPDF_StructElement_GetActualText",3),t._FPDF_StructElement_GetExpansion=X("FPDF_StructElement_GetExpansion",3),t._FPDF_StructElement_GetID=X("FPDF_StructElement_GetID",3),t._FPDF_StructElement_GetLang=X("FPDF_StructElement_GetLang",3),t._FPDF_StructElement_GetAttributeCount=X("FPDF_StructElement_GetAttributeCount",1),t._FPDF_StructElement_GetAttributeAtIndex=X("FPDF_StructElement_GetAttributeAtIndex",2),t._FPDF_StructElement_GetStringAttribute=X("FPDF_StructElement_GetStringAttribute",4),t._FPDF_StructElement_GetMarkedContentID=X("FPDF_StructElement_GetMarkedContentID",1),t._FPDF_StructElement_GetRawType=X("FPDF_StructElement_GetRawType",3),t._FPDF_StructElement_GetType=X("FPDF_StructElement_GetType",3),t._FPDF_StructElement_GetObjType=X("FPDF_StructElement_GetObjType",3),t._FPDF_StructElement_GetTitle=X("FPDF_StructElement_GetTitle",3),t._FPDF_StructElement_CountChildren=X("FPDF_StructElement_CountChildren",1),t._FPDF_StructElement_GetChildAtIndex=X("FPDF_StructElement_GetChildAtIndex",2),t._FPDF_StructElement_GetChildMarkedContentID=X("FPDF_StructElement_GetChildMarkedContentID",2),t._FPDF_StructElement_GetParent=X("FPDF_StructElement_GetParent",1),t._FPDF_StructElement_Attr_GetCount=X("FPDF_StructElement_Attr_GetCount",1),t._FPDF_StructElement_Attr_GetName=X("FPDF_StructElement_Attr_GetName",5),t._FPDF_StructElement_Attr_GetValue=X("FPDF_StructElement_Attr_GetValue",2),t._FPDF_StructElement_Attr_GetType=X("FPDF_StructElement_Attr_GetType",1),t._FPDF_StructElement_Attr_GetBooleanValue=X("FPDF_StructElement_Attr_GetBooleanValue",2),t._FPDF_StructElement_Attr_GetNumberValue=X("FPDF_StructElement_Attr_GetNumberValue",2),t._FPDF_StructElement_Attr_GetStringValue=X("FPDF_StructElement_Attr_GetStringValue",4),t._FPDF_StructElement_Attr_GetBlobValue=X("FPDF_StructElement_Attr_GetBlobValue",4),t._FPDF_StructElement_Attr_CountChildren=X("FPDF_StructElement_Attr_CountChildren",1),t._FPDF_StructElement_Attr_GetChildAtIndex=X("FPDF_StructElement_Attr_GetChildAtIndex",2),t._FPDF_StructElement_GetMarkedContentIdCount=X("FPDF_StructElement_GetMarkedContentIdCount",1),t._FPDF_StructElement_GetMarkedContentIdAtIndex=X("FPDF_StructElement_GetMarkedContentIdAtIndex",2),t._FPDF_AddInstalledFont=X("FPDF_AddInstalledFont",3),t._FPDF_SetSystemFontInfo=X("FPDF_SetSystemFontInfo",1),t._FPDF_GetDefaultTTFMap=X("FPDF_GetDefaultTTFMap",0),t._FPDF_GetDefaultTTFMapCount=X("FPDF_GetDefaultTTFMapCount",0),t._FPDF_GetDefaultTTFMapEntry=X("FPDF_GetDefaultTTFMapEntry",1),t._FPDF_GetDefaultSystemFontInfo=X("FPDF_GetDefaultSystemFontInfo",0),t._FPDF_FreeDefaultSystemFontInfo=X("FPDF_FreeDefaultSystemFontInfo",1),t._FPDFText_LoadPage=X("FPDFText_LoadPage",1),t._FPDFText_ClosePage=X("FPDFText_ClosePage",1),t._FPDFText_CountChars=X("FPDFText_CountChars",1),t._FPDFText_GetUnicode=X("FPDFText_GetUnicode",2),t._FPDFText_GetTextObject=X("FPDFText_GetTextObject",2),t._FPDFText_IsGenerated=X("FPDFText_IsGenerated",2),t._FPDFText_IsHyphen=X("FPDFText_IsHyphen",2),t._FPDFText_HasUnicodeMapError=X("FPDFText_HasUnicodeMapError",2),t._FPDFText_GetFontSize=X("FPDFText_GetFontSize",2),t._FPDFText_GetFontInfo=X("FPDFText_GetFontInfo",5),t._FPDFText_GetFontWeight=X("FPDFText_GetFontWeight",2),t._FPDFText_GetFillColor=X("FPDFText_GetFillColor",6),t._FPDFText_GetStrokeColor=X("FPDFText_GetStrokeColor",6),t._FPDFText_GetCharAngle=X("FPDFText_GetCharAngle",2),t._FPDFText_GetCharBox=X("FPDFText_GetCharBox",6),t._FPDFText_GetLooseCharBox=X("FPDFText_GetLooseCharBox",3),t._EPDFText_GetCharGeometry=X("EPDFText_GetCharGeometry",3),t._EPDFText_GetPageGeometry=X("EPDFText_GetPageGeometry",4),t._EPDFText_GetTextFull=X("EPDFText_GetTextFull",3),t._EPDFText_GetCharToTextMap=X("EPDFText_GetCharToTextMap",3),t._FPDFText_GetMatrix=X("FPDFText_GetMatrix",3),t._FPDFText_GetCharOrigin=X("FPDFText_GetCharOrigin",4),t._FPDFText_GetCharIndexAtPos=X("FPDFText_GetCharIndexAtPos",5),t._FPDFText_GetText=X("FPDFText_GetText",4),t._FPDFText_CountRects=X("FPDFText_CountRects",3),t._FPDFText_GetRect=X("FPDFText_GetRect",6),t._FPDFText_GetBoundedText=X("FPDFText_GetBoundedText",7),t._FPDFText_FindStart=X("FPDFText_FindStart",4),t._FPDFText_FindNext=X("FPDFText_FindNext",1),t._FPDFText_FindPrev=X("FPDFText_FindPrev",1),t._FPDFText_GetSchResultIndex=X("FPDFText_GetSchResultIndex",1),t._FPDFText_GetSchCount=X("FPDFText_GetSchCount",1),t._FPDFText_FindClose=X("FPDFText_FindClose",1),t._FPDFLink_LoadWebLinks=X("FPDFLink_LoadWebLinks",1),t._FPDFLink_CountWebLinks=X("FPDFLink_CountWebLinks",1),t._FPDFLink_GetURL=X("FPDFLink_GetURL",4),t._FPDFLink_CountRects=X("FPDFLink_CountRects",2),t._FPDFLink_GetRect=X("FPDFLink_GetRect",7),t._FPDFLink_GetTextRange=X("FPDFLink_GetTextRange",4),t._FPDFLink_CloseWebLinks=X("FPDFLink_CloseWebLinks",1),t._FPDFPage_GetDecodedThumbnailData=X("FPDFPage_GetDecodedThumbnailData",3),t._FPDFPage_GetRawThumbnailData=X("FPDFPage_GetRawThumbnailData",3),t._FPDFPage_GetThumbnailAsBitmap=X("FPDFPage_GetThumbnailAsBitmap",1),t._FPDFPage_SetMediaBox=X("FPDFPage_SetMediaBox",5),t._FPDFPage_SetCropBox=X("FPDFPage_SetCropBox",5),t._FPDFPage_SetBleedBox=X("FPDFPage_SetBleedBox",5),t._FPDFPage_SetTrimBox=X("FPDFPage_SetTrimBox",5),t._FPDFPage_SetArtBox=X("FPDFPage_SetArtBox",5),t._FPDFPage_GetMediaBox=X("FPDFPage_GetMediaBox",5),t._FPDFPage_GetCropBox=X("FPDFPage_GetCropBox",5),t._FPDFPage_GetBleedBox=X("FPDFPage_GetBleedBox",5),t._FPDFPage_GetTrimBox=X("FPDFPage_GetTrimBox",5),t._FPDFPage_GetArtBox=X("FPDFPage_GetArtBox",5),t._FPDFPage_TransFormWithClip=X("FPDFPage_TransFormWithClip",3),t._FPDFPageObj_TransformClipPath=X("FPDFPageObj_TransformClipPath",7),t._FPDFPageObj_GetClipPath=X("FPDFPageObj_GetClipPath",1),t._FPDFClipPath_CountPaths=X("FPDFClipPath_CountPaths",1),t._FPDFClipPath_CountPathSegments=X("FPDFClipPath_CountPathSegments",2),t._FPDFClipPath_GetPathSegment=X("FPDFClipPath_GetPathSegment",3),t._FPDF_CreateClipPath=X("FPDF_CreateClipPath",4),t._FPDF_DestroyClipPath=X("FPDF_DestroyClipPath",1),t._FPDFPage_InsertClipPath=X("FPDFPage_InsertClipPath",2),t._FPDF_InitLibrary=X("FPDF_InitLibrary",0),t._FPDF_InitLibraryWithConfig=X("FPDF_InitLibraryWithConfig",1),t._FPDF_DestroyLibrary=X("FPDF_DestroyLibrary",0),t._FPDF_SetSandBoxPolicy=X("FPDF_SetSandBoxPolicy",2),t._FPDF_LoadDocument=X("FPDF_LoadDocument",2),t._FPDF_GetFormType=X("FPDF_GetFormType",1),t._FPDF_LoadXFA=X("FPDF_LoadXFA",1),t._FPDF_LoadMemDocument=X("FPDF_LoadMemDocument",3),t._FPDF_LoadMemDocument64=X("FPDF_LoadMemDocument64",3),t._FPDF_LoadCustomDocument=X("FPDF_LoadCustomDocument",2),t._FPDF_GetFileVersion=X("FPDF_GetFileVersion",2),t._FPDF_DocumentHasValidCrossReferenceTable=X("FPDF_DocumentHasValidCrossReferenceTable",1),t._FPDF_GetDocPermissions=X("FPDF_GetDocPermissions",1),t._FPDF_GetDocUserPermissions=X("FPDF_GetDocUserPermissions",1),t._FPDF_GetSecurityHandlerRevision=X("FPDF_GetSecurityHandlerRevision",1),t._EPDF_SetEncryption=X("EPDF_SetEncryption",4),t._EPDF_RemoveEncryption=X("EPDF_RemoveEncryption",1),t._EPDF_UnlockOwnerPermissions=X("EPDF_UnlockOwnerPermissions",2),t._EPDF_CheckPasswordPermissions=X("EPDF_CheckPasswordPermissions",6),t._EPDF_SetRuntimeOwnerPermissions=X("EPDF_SetRuntimeOwnerPermissions",2),t._EPDF_IsEncrypted=X("EPDF_IsEncrypted",1),t._EPDF_IsOwnerUnlocked=X("EPDF_IsOwnerUnlocked",1),t._FPDF_GetPageCount=X("FPDF_GetPageCount",1),t._FPDF_LoadPage=X("FPDF_LoadPage",2),t._EPDFDoc_LoadPageByObjectNumber=X("EPDFDoc_LoadPageByObjectNumber",2),t._EPDFDoc_LoadPageByObjectNumberNormalized=X("EPDFDoc_LoadPageByObjectNumberNormalized",2),t._EPDFDoc_GetPageObjectNumberByIndex=X("EPDFDoc_GetPageObjectNumberByIndex",2),t._EPDFDoc_DeletePageByObjectNumber=X("EPDFDoc_DeletePageByObjectNumber",2),t._EPDFDoc_SetPageRotationByObjectNumber=X("EPDFDoc_SetPageRotationByObjectNumber",3),t._EPDFDoc_StartLoadPageByObjectNumber=X("EPDFDoc_StartLoadPageByObjectNumber",3),t._EPDFPage_ContinueLoad=X("EPDFPage_ContinueLoad",2),t._EPDFPage_GetObjectNumber=X("EPDFPage_GetObjectNumber",1),t._FPDF_GetPageWidthF=X("FPDF_GetPageWidthF",1),t._FPDF_GetPageWidth=X("FPDF_GetPageWidth",1),t._FPDF_GetPageHeightF=X("FPDF_GetPageHeightF",1),t._FPDF_GetPageHeight=X("FPDF_GetPageHeight",1),t._FPDF_GetPageBoundingBox=X("FPDF_GetPageBoundingBox",2),t._FPDF_RenderPageBitmap=X("FPDF_RenderPageBitmap",8),t._FPDF_RenderPageBitmapWithMatrix=X("FPDF_RenderPageBitmapWithMatrix",5),t._EPDF_RenderAnnotBitmap=X("EPDF_RenderAnnotBitmap",7),t._EPDF_RenderAnnotBitmapUnrotated=X("EPDF_RenderAnnotBitmapUnrotated",9),t._EPDF_SetDecodedImageBudget=X("EPDF_SetDecodedImageBudget",1),t._EPDF_GetDecodedImageBytes=X("EPDF_GetDecodedImageBytes",0),t._EPDFPage_ResetRenderCache=X("EPDFPage_ResetRenderCache",1),t._FPDF_ClosePage=X("FPDF_ClosePage",1),t._FPDF_CloseDocument=X("FPDF_CloseDocument",1),t._FPDF_GetLastError=X("FPDF_GetLastError",0),t._FPDF_DeviceToPage=X("FPDF_DeviceToPage",10),t._FPDF_PageToDevice=X("FPDF_PageToDevice",10),t._FPDFBitmap_Create=X("FPDFBitmap_Create",3),t._FPDFBitmap_CreateEx=X("FPDFBitmap_CreateEx",5),t._FPDFBitmap_GetFormat=X("FPDFBitmap_GetFormat",1),t._FPDFBitmap_FillRect=X("FPDFBitmap_FillRect",6),t._FPDFBitmap_GetBuffer=X("FPDFBitmap_GetBuffer",1),t._FPDFBitmap_GetWidth=X("FPDFBitmap_GetWidth",1),t._FPDFBitmap_GetHeight=X("FPDFBitmap_GetHeight",1),t._FPDFBitmap_GetStride=X("FPDFBitmap_GetStride",1),t._FPDFBitmap_Destroy=X("FPDFBitmap_Destroy",1),t._FPDF_GetPageSizeByIndexF=X("FPDF_GetPageSizeByIndexF",3),t._EPDF_GetPageRotateByIndex=X("EPDF_GetPageRotateByIndex",3),t._EPDF_GetPageTabOrderByIndex=X("EPDF_GetPageTabOrderByIndex",4),t._EPDF_GetPageBoxByIndex=X("EPDF_GetPageBoxByIndex",4),t._EPDF_GetPageUserUnitByIndex=X("EPDF_GetPageUserUnitByIndex",3),t._EPDF_LoadPageNormalized=X("EPDF_LoadPageNormalized",3),t._FPDF_GetPageSizeByIndex=X("FPDF_GetPageSizeByIndex",4),t._FPDF_VIEWERREF_GetPrintScaling=X("FPDF_VIEWERREF_GetPrintScaling",1),t._FPDF_VIEWERREF_GetNumCopies=X("FPDF_VIEWERREF_GetNumCopies",1),t._FPDF_VIEWERREF_GetPrintPageRange=X("FPDF_VIEWERREF_GetPrintPageRange",1),t._FPDF_VIEWERREF_GetPrintPageRangeCount=X("FPDF_VIEWERREF_GetPrintPageRangeCount",1),t._FPDF_VIEWERREF_GetPrintPageRangeElement=X("FPDF_VIEWERREF_GetPrintPageRangeElement",2),t._FPDF_VIEWERREF_GetDuplex=X("FPDF_VIEWERREF_GetDuplex",1),t._FPDF_VIEWERREF_GetName=X("FPDF_VIEWERREF_GetName",4),t._FPDF_CountNamedDests=X("FPDF_CountNamedDests",1),t._FPDF_GetNamedDestByName=X("FPDF_GetNamedDestByName",2),t._FPDF_GetNamedDest=X("FPDF_GetNamedDest",4),t._FPDF_GetXFAPacketCount=X("FPDF_GetXFAPacketCount",1),t._FPDF_GetXFAPacketName=X("FPDF_GetXFAPacketName",4),t._FPDF_GetXFAPacketContent=X("FPDF_GetXFAPacketContent",5),t._FPDF_GetTrailerEnds=X("FPDF_GetTrailerEnds",3);var eJ=X("fflush",1),eQ=X("strerror",1),eX=X("emscripten_builtin_memalign",2);t._malloc=X("malloc",1),t._free=X("free",1);var eY=X("setThrew",2);X("_emscripten_tempret_set",1);var e0=()=>(e0=eZ.emscripten_stack_init)(),e1=()=>(e1=eZ.emscripten_stack_get_end)(),e3=e=>(e3=eZ._emscripten_stack_restore)(e),e2=e=>(e2=eZ._emscripten_stack_alloc)(e),e6=()=>(e6=eZ.emscripten_stack_get_current)();function e5(){var e,r;if(!(U>0)){if(e0(),M((3&(e=e1()))==0),0==e&&(e+=4),f[e>>>2>>>0]=0x2135467,f[e+4>>>2>>>0]=0x89bacdfe,f[0]=0x63736d65,t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)r=t.preRun.shift(),B.unshift(r);eu(B),U>0||(t.setStatus?(t.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>t.setStatus(""),1),i()},1)):i(),T())}function i(){if(!D&&(D=!0,t.calledRun=!0,!j)){if(M(!z),z=!0,T(),t.noFSInit||eN.initialized||eN.init(),eN.ignorePermissions=!1,ev.init(),eu(L),n(t),t.onRuntimeInitialized?.(),M(!t._main,\'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]\'),T(),t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;){var e;e=t.postRun.shift(),$.unshift(e)}eu($)}}}if(t.dynCall_jiji=X("dynCall_jiji",5),t.dynCall_iiiiij=X("dynCall_iiiiij",7),t.dynCall_iiiiijj=X("dynCall_iiiiijj",9),t.dynCall_iiiiiijj=X("dynCall_iiiiiijj",10),t.dynCall_viijii=X("dynCall_viijii",7),t.dynCall_ji=X("dynCall_ji",2),t.dynCall_iiij=X("dynCall_iiij",5),t.dynCall_j=X("dynCall_j",1),t.dynCall_iji=X("dynCall_iji",4),t.dynCall_jji=X("dynCall_jji",4),t.dynCall_iiji=X("dynCall_iiji",5),t.dynCall_viijj=X("dynCall_viijj",7),t.dynCall_jij=X("dynCall_jij",4),t.dynCall_iij=X("dynCall_iij",4),t.dynCall_viji=X("dynCall_viji",5),t.wasmExports=eZ,t.ccall=eH,t.cwrap=(e,t,n,r)=>(...i)=>eH(e,t,n,i,r),t.addFunction=(e,t)=>{M(void 0!==e);var n=(e=>{if(!P){P=new WeakMap;var t=_.length;if(P)for(var n=0;n<0+t;n++){var r=ez(n);r&&P.set(r,n)}}return P.get(e)||0})(e);if(n)return n;var r=(()=>{if(eW.length)return eW.pop();try{_.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return _.length-1})();try{eq(r,e)}catch(n){if(!(n instanceof TypeError))throw n;M(void 0!==t,"Missing signature argument to addFunction: "+e),eq(r,((e,t)=>{if(M(!t.includes("j"),"i64 not permitted in function signatures when WASM_BIGINT is disabled"),"function"==typeof WebAssembly.Function)return new WebAssembly.Function((e=>{M(!e.includes("j"),"i64 not permitted in function signatures when WASM_BIGINT is disabled");for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},n={parameters:[],results:"v"==e[0]?[]:[t[e[0]]]},r=1;r{P.delete(ez(e)),eq(e,null),eW.push(e)},t.setValue=function(e,t,n="i8"){switch(n.endsWith("*")&&(n="*"),n){case"i1":case"i8":s[e>>>0]=t;break;case"i16":u[e>>>1>>>0]=t;break;case"i32":c[e>>>2>>>0]=t;break;case"i64":J("to do setValue(i64) use WASM_BIGINT");case"float":m[e>>>2>>>0]=t;break;case"double":p[e>>>3>>>0]=t;break;case"*":f[e>>>2>>>0]=t;break;default:J(`invalid type for setValue: ${n}`)}},t.getValue=function(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return s[e>>>0];case"i16":return u[e>>>1>>>0];case"i32":return c[e>>>2>>>0];case"i64":J("to do getValue(i64) use WASM_BIGINT");case"float":return m[e>>>2>>>0];case"double":return p[e>>>3>>>0];case"*":return f[e>>>2>>>0];default:J(`invalid type for getValue: ${t}`)}},t.UTF8ToString=eg,t.stringToUTF8=ej,t.UTF16ToString=(e,t)=>{M(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var n=e,r=n>>1,i=r+t/2;!(r>=i)&&d[r>>>0];)++r;if((n=r<<1)-e>32&&eU)return eU.decode(l.subarray(e>>>0,n>>>0));for(var o="",a=0;!(a>=t/2);++a){var s=u[e+2*a>>>1>>>0];if(0==s)break;o+=String.fromCharCode(s)}return o},t.stringToUTF16=(e,t,n)=>{if(M(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),M("number"==typeof n,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),n??(n=0x7fffffff),n<2)return 0;for(var r=t,i=(n-=2)<2*e.length?n/2:e.length,o=0;o>>1>>>0]=a,t+=2}return u[t>>>1>>>0]=0,t-r},["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","getTempRet0","setTempRet0","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","emscriptenLog","readEmAsmArgs","jstoi_q","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","asmjsMangle","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","getCallstack","convertPCtoSourceLocation","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","safeSetTimeout","setImmediateWrapped","safeRequestAnimationFrame","clearImmediateWrapped","polyfillSetImmediate","registerPostMainLoop","registerPreMainLoop","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","Browser_asyncPrepareDataCounter","arraySum","addDays","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","toTypedArrayIndex","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","webgl_enable_EXT_polygon_offset_clamp","webgl_enable_EXT_clip_control","webgl_enable_WEBGL_polygon_mode","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","setErrNo","demangle","stackTrace"].forEach(function(e){eo(e,()=>{var t=`\\`${e}\\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`,n=e;n.startsWith("_")||(n="$"+e),t+=` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=\'${n}\')`,ei(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),em(t)}),es(e)}),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","out","err","callMain","abort","wasmMemory","writeStackCookie","checkStackCookie","convertI32PairToI53Checked","stackSave","stackRestore","stackAlloc","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","ERRNO_CODES","strError","DNS","Protocols","Sockets","timers","warnOnce","readEmAsmArgsArray","jstoi_s","getExecutableName","keepRuntimeAlive","asyncLoad","alignMemory","mmapAlloc","wasmTable","noExitRuntime","getCFunc","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","freeTableIndexes","functionsInTableMap","getEmptyTableSlot","updateTableMap","getFunctionAddress","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","stringToUTF8Array","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","stringToUTF8OnStack","writeArrayToMemory","JSEvents","specialHTMLTargets","findCanvasEventTarget","currentFullscreenStrategy","restoreOldWindowedStyle","UNWIND_CACHE","ExitStatus","getEnvStrings","doReadv","doWritev","initRandomFill","randomFill","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","getPreloadedImageData__data","wget","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS_createPath","FS_createDevice","FS_readFile","FS","FS_createDataFile","FS_createLazyFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack","print","printErr"].forEach(es),W=function e(){D||e5(),D||(W=e)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();for(let e of(e5(),Object.keys(t)))e in t||Object.defineProperty(t,e,{configurable:!0,get(){J(`Access to module property (\'${e}\') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.`)}});return y}}},function(){if(r)throw r[0];try{return t&&(n=(0,t[E(t)[0]])(t=0)),n}catch(e){throw r=[e],e}}),G={Unknown:"Unknown",InvalidArg:"InvalidArg",DocNotOpen:"DocNotOpen",DocOpenFailed:"DocOpenFailed",DocPasswordRequired:"DocPasswordRequired",DocPasswordIncorrect:"DocPasswordIncorrect",GrantPassphraseRequired:"GrantPassphraseRequired",Aborted:"Aborted",Network:"Network",Unauthenticated:"Unauthenticated",Forbidden:"Forbidden",NotFound:"NotFound",WireFormat:"WireFormat",RuntimeUnavailable:"RuntimeUnavailable",LayerVersionConflict:"LayerVersionConflict",NotImplemented:"NotImplemented",MalformedPdf:"MalformedPdf",SigningPending:"SigningPending",SigningExpired:"SigningExpired",SigningVersionMismatch:"SigningVersionMismatch",SignatureRefused:"SignatureRefused",ProtectedDocument:"ProtectedDocument",PayloadTooLarge:"PayloadTooLarge",ObjectNumberUnavailable:"ObjectNumberUnavailable",LayerFull:"LayerFull",ChangeConflict:"ChangeConflict",UndoUnavailable:"UndoUnavailable",IdempotencyKeyReused:"IdempotencyKeyReused",LayerDeleted:"LayerDeleted",VisitorIdentityRequired:"VisitorIdentityRequired",Conflict:"Conflict",EngineBusy:"EngineBusy",EngineRestarting:"EngineRestarting",DocumentQuarantined:"DocumentQuarantined",ThumbnailNotReady:"ThumbnailNotReady",TooManyRequests:"TooManyRequests",GrantExpired:"GrantExpired",OriginRequired:"OriginRequired",OriginNotAllowed:"OriginNotAllowed",FeatureNotEnabled:"FeatureNotEnabled",FeatureStopped:"FeatureStopped",LicenseInvalid:"LicenseInvalid",LicenseUsageLimit:"LicenseUsageLimit",UpstreamError:"UpstreamError"};function O(e){return(O="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)}function I(e,t,n){var r;return(r=function(e,t){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=O(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==O(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.values(G);var N=class e extends Error{constructor(e,t,n={}){super(t??e,void 0===n.cause?void 0:{cause:n.cause}),I(this,"name","EngineError"),I(this,"code",void 0),I(this,"details",void 0),this.code=e,this.details=n.details}static is(t,n){return(t instanceof e||t?.name==="EngineError")&&(void 0===n||t.code===n)}toJSON(){return{code:this.code,message:this.message,details:this.details}}};function C(e){return N.is(e)?e.toJSON():e instanceof Error?{code:"AbortError"===e.name?G.Aborted:G.Unknown,message:e.message}:{code:G.Unknown,message:String(e??"unknown error")}}var j=e=>{let t=t=>(e&1<[[1,e.exclude],[2,e.includeNoValueFields],[3,"html"===e.format],[4,"get"===e.method],[5,e.submitCoordinates],[6,"xfdf"===e.format],[7,e.includeAppendSaves],[8,e.includeAnnotations],[9,"pdf"===e.format],[10,e.canonicalFormat],[11,e.exclNonUserAnnots],[12,e.exclFKey],[14,e.embedForm]].reduce((e,[t,n])=>n?e|1<null!=e&&!("root"in e)&&R(e))}function B(e){return e.incomplete||!e.root?null:function e(t){let n=[];for(let r of t.next){let t=e(r);if(!t)return null;n.push(t)}let r=n.length>0?{next:n}:{};switch(t.type){case"javascript":return{type:"javascript",script:t.script,...r};case"goto":return{type:"goto",destination:t.destination,...r};case"uri":return{type:"uri",uri:t.uri,...r};case"named":return{type:"named",name:t.name,...r};case"hide":return{type:"hide",targets:t.targets,hide:t.hide,...r};case"reset-form":return{type:"reset-form",fields:t.fields,exclude:t.exclude,...r};case"submit-form":return t.payload?{...function(e){let{url:t,fields:n,charSet:r,...i}=e;return i}(t.payload),type:"submit-form",url:t.payload.url,fields:t.payload.fields,...r}:null;default:return null}}(e.root)}var L={javascript:"JavaScript",goto:"GoTo",uri:"URI",named:"Named",hide:"Hide","reset-form":"ResetForm","submit-form":"SubmitForm"};function $(e){return{root:function e(t){let n={subtype:L[t.type],next:(t.next??[]).map(e)};switch(t.type){case"javascript":return{type:"javascript",script:t.script,...n};case"goto":return{type:"goto",destination:t.destination,...n};case"uri":return{type:"uri",uri:t.uri,isMap:!1,...n};case"named":return{type:"named",name:t.name,...n};case"hide":return{type:"hide",targets:t.targets,hide:t.hide,...n};case"reset-form":return{type:"reset-form",fields:t.fields,exclude:t.exclude,...n};case"submit-form":return{type:"submit-form",payload:{url:t.url,fields:t.fields,...j(M(t))},...n}}}(e),incomplete:!1,warnings:[]}}var z=["activate","cursorEnter","cursorExit","mouseDown","mouseUp","focus","blur","pageOpen","pageClose","pageVisible","pageInvisible"];function U(e){let t=B(e);return t&&V(t)?t:null}function V(e){return"javascript"===e.type&&(e.next??[]).every(V)}function W(e){return"number"==typeof e&&Number.isInteger(e)&&e>0}function q(e){return{kind:"objectNumber",objectNumber:e}}function H(e){if(!W(e.objectNumber))throw RangeError(`encodePageKey: objectNumber must be a positive integer, got ${e.objectNumber}`);return`obj:${e.objectNumber}`}function K(e){switch(e.kind){case"objectNumber":return`obj:${e.objectNumber}`;case"baseIndex":return`base:${e.page.objectNumber}:${e.baseIndex}`}}var Z=["courier","courier-bold","courier-bold-oblique","courier-oblique","helvetica","helvetica-bold","helvetica-bold-oblique","helvetica-oblique","times-roman","times-bold","times-bold-italic","times-italic","symbol","zapf-dingbats"],J={invisible:!1,hidden:!1,print:!1,noZoom:!1,noRotate:!1,noView:!1,readOnly:!1,locked:!1,toggleNoView:!1,lockedContents:!1};function Q(e){return void 0!==e.layout?e:{...e,layout:"pushbutton"===e.fieldKind?"caption":null}}function X(e){return null===e?{kind:"unassigned"}:{kind:"group",groupId:e}}function Y(e){return"group"===e.kind?e.groupId:null}function ee(e){return eo(er(e)??{kind:"unassigned"},e.kind)}function et(e,t){let n=er(e);return void 0===n?t.assignment:eo(n,t.kind)}function en(e){if(void 0!==e.assignment)return e;let t="string"==typeof e.groupId?e.groupId:null;return{...e,assignment:X(t)}}function er(e){if(void 0!==e.assignment&&void 0!==e.groupId)throw ea("assignment",\'name a field\\\'s assignment or its groupId, not both: { kind: "group", groupId } says both\');return void 0!==e.assignment?function(e){let t=null!==e&&"object"==typeof e?e.kind:void 0;if("anyone"===t||"unassigned"===t)return{kind:t};if("group"===t){let n=e.groupId;return ei(n,"assignment"),{kind:t,groupId:n}}throw ea("assignment","a field\'s assignment is { kind: \'group\', groupId }, { kind: \'anyone\' } or { kind: \'unassigned\' }")}(e.assignment):void 0!==e.groupId?(null!==e.groupId&&ei(e.groupId,"groupId"),X(e.groupId)):void 0}function ei(e,t){if("string"!=typeof e||e.length<1||e.length>256)throw ea(t,`a field\'s groupId is 1 to 256 characters${"groupId"===t?", or null for no group":""}`)}function eo(e,t){if("anyone"===e.kind&&"signature"===t)throw ea("assignment","a signature field is signed by one signer, so it is never for anyone");return e}function ea(e,t){return new N(G.InvalidArg,t,{details:{field:e}})}function es(e){return void 0===e.lockedBy?{...e,lockedBy:null}:e}function el(e){if("pushbutton"!==e.kind)return e;let t=void 0===e.hasImage,n=void 0===e.takesImage;return t||n?{...e,...t?{hasImage:!1}:{},...n?{takesImage:!1}:{}}:e}var eu=Object.freeze(["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"]),ed=Object.freeze(["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"]),ec=new Map([["yyyy",{part:"year",written:"digits"}],["yy",{part:"year",written:"digits"}],["mmmm",{part:"month",written:"letters"}],["mmm",{part:"month",written:"letters"}],["mm",{part:"month",written:"digits"}],["m",{part:"month",written:"digits"}],["dd",{part:"day",written:"digits"}],["d",{part:"day",written:"digits"}]]),ef=/(?:HH|H|hh|h):MM(?::ss)?(?: *tt)?/;function em(e){let t={written:[],groups:[]};for(let n of e.match(/([A-Za-z])\\1*|[^A-Za-z]/g)??[]){let e=ec.get(n);if(e)t.written.push(e.written),t.groups.push(e.part);else{if(!" /-.,".includes(n))return null;t.written.push("separator")}}return t}function ep(e){if("string"!=typeof e||e.length<1||e.length>64)return!1;let t=ef.exec(e),n=em(t?e.slice(0,t.index):e),r=em(t?e.slice(t.index+t[0].length):"");if(!n||!r)return!1;let i=[...n.groups,...r.groups];if(0===i.length||new Set(i).size!==i.length)return!1;let o=t?["digits",t[0].endsWith("tt")?"letters":"digits"]:[],a=[...n.written,...o,...r.written];return!a.some((e,t)=>"digits"===e&&"digits"===a[t+1]&&t!==n.written.length)}var eh=RegExp(`^${ef.source}$`);function eF(e){return"string"==typeof e&&e.length<=64&&eh.test(e)}function eg(e){return"text"===e||"combobox"===e}var e_={date:{format:"AFDate_FormatEx",numberedFormat:"AFDate_Format",keystroke:"AFDate_KeystrokeEx",numberedKeystroke:"AFDate_Keystroke",standard:eu,isPattern:ep},time:{format:"AFTime_FormatEx",numberedFormat:"AFTime_Format",keystroke:"AFTime_KeystrokeEx",numberedKeystroke:"AFTime_Keystroke",standard:ed,isPattern:eF}},eP=["date","time"];function eD(e,t,n,r){let i=e.trim();i.endsWith(";")&&(i=i.slice(0,-1).trimEnd());let o=/^([A-Za-z_]+)\\(\\s*(?:(["\'])([^"\'\\\\]*)\\2|(\\d{1,2}))\\s*\\)$/.exec(i);if(!o)return null;let[,a,,s,l]=o,{isPattern:u,standard:d}=e_[t];return a===n&&void 0!==s?u(s)?s:null:a===r&&void 0!==l?d[Number(l)]??null:null}function eb(e){let t=e?.format;if(null==t)return null;if("object"!=typeof t)return{kind:"other"};let n=ew(t);return null===n?{kind:"other"}:function(e){for(let t of eP){let n=e_[t],r=eD(e,t,n.format,n.numberedFormat);if(null!==r)return{kind:t,pattern:r}}return{kind:"other"}}(n)}function ey(e){let t=void 0===e.purpose,n=void 0===e.format&&"string"==typeof e.kind&&eg(e.kind);return t||n?{...e,...t?{purpose:null}:{},...n?{format:eb(e.actions)}:{}}:e}function ew(e){let t=e.root;return!1===e.incomplete&&t&&"javascript"===t.type&&Array.isArray(t.next)&&!(t.next.length>0)&&"string"==typeof t.script?t.script:null}function eE(e){var t;let n=e_[e.kind];return{format:`${n.format}("${e.pattern}");`,keystroke:"date"===e.kind?`${n.keystroke}("${e.pattern}");`:`${n.numberedKeystroke}(${2*!!(t=e.pattern).includes("ss")+ +!!t.includes("tt")});`}}function eA(e){if(null===e)return{keystroke:null,format:null};let t=eE(e),n=e=>({type:"javascript",script:e});return{keystroke:n(t.keystroke),format:n(t.format)}}function ev(e){return null!==e&&"other"!==e.kind}function eS(e,t){return null===e||null===t?e===t:e.kind===t.kind&&("other"===e.kind||e.pattern===t.pattern)}var ek={date:"a date format\'s pattern is 1 to 64 characters: the groups yyyy yy mmmm mmm mm m dd d, at least one of them and the year, the month and the day each once at most, with spaces and / - . , between them, and at most one time (HH, H, hh or h, then :MM, then :ss and tt when it has them); two groups written in digits never touch",time:"a time format\'s pattern is a time and nothing else, at most 64 characters: HH, H, hh or h, then :MM, then :ss when it has seconds, then tt when it has one"};function ex(e,t){if(void 0===e.format)return;if(!eg(t))throw new N(G.InvalidArg,`\'format\' does not apply to a ${t} field`,{details:{field:"format"}});let n=function(e){if(null===e)return null;let t="object"==typeof e?e:{};if("other"===t.kind)throw new N(G.InvalidArg,"a format of kind \'other\' is read, never written: write its scripts in actions",{details:{field:"format"}});if("date"!==t.kind&&"time"!==t.kind)throw new N(G.InvalidArg,"a field\'s format is a date or a time with a pattern, or null for none",{details:{field:"format"}});let{pattern:n}=t;if(!e_[t.kind].isPattern(n))throw new N(G.InvalidArg,ek[t.kind],{details:{field:"format.pattern"}});return{kind:t.kind,pattern:n}}(e.format);for(let t of["format","keystroke"])if(e.actions?.[t]!==void 0)throw new N(G.InvalidArg,`\'format\' writes the field\'s ${t} script: name it or actions.${t}, not both`,{details:{field:`actions.${t}`}});return n}function eG(e){return $({type:"javascript",script:e})}function eO(e){return"string"==typeof e&&e.length>=1&&e.length<=256&&e.trim()===e&&!e.includes("\\0")}function eI(e,t){if(null==e)return null;if(!eO(e))throw new N(G.InvalidArg,`a field\'s ${t} is 1 to 256 characters with no space at its start or end and no NUL character, or null for none`,{details:{field:t}});return e}function eN(e){return eO(e)}function eC(e){return eI(e,"placeholder")}function ej(e){return void 0!==e.placeholder?e:{...e,placeholder:null}}function eM(e){if("objectNumber"===e.kind){if(!Number.isInteger(e.objectNumber)||e.objectNumber<=0)throw RangeError(`encodeFieldRefKey: objectNumber must be a positive integer, got ${e.objectNumber}`);return`obj:${e.objectNumber}`}return`fqn:${e.name}`}function eR(e,t){return{ref:e>0&&t?{kind:"objectNumber",page:t,objectNumber:e}:null,objectNumber:e,page:t}}var eT=(e,t)=>e.replace(/\\B(?=(\\d{3})+(?!\\d))/g,()=>t),eB=(e,t)=>t?eB(t,e%t):e;function eL(e){let t=Math.fround(e.conversion??0/0);if(!Number.isFinite(t)||t<=0)return!1;let n=e.precision??("fraction"===e.fraction?16:100);return!!Number.isInteger(n)&&!(n<1)&&!(n>0x7fffffff)&&((e.fraction??"decimal")!=="decimal"||!!Number.isInteger(Math.log10(n)))}function e$(e,t){if(!Number.isFinite(e)||!t.length||!t.every(eL))throw new N(G.InvalidArg,"Measurement requires a finite value and valid number formats");let n=Math.abs(e),r=[];for(let[e,i]of t.entries()){if(!Number.isFinite(n*=Math.fround(i.conversion)))throw new N(G.InvalidArg,"Measurement overflow");let o=Math.floor(n),a=n-o,s=e===t.length-1,l=s||0===a,u=s?function(e,t){let n=t.fraction??"decimal",r=t.thousands??",";if("round"===n)return eT(String(Math.round(e)),r);if("truncate"===n)return eT(String(Math.trunc(e)),r);if("fraction"===n){let n=t.precision??16,i=Math.floor(e),o=Math.round((e-i)*n);if(o===n&&(i++,o=0),!o)return eT(String(i),r);let a=t.fixed?1:eB(o,n);return`${i?`${eT(String(i),r)} `:""}${o/a}/${n/a}`}let i=Math.log10(t.precision??100),[o,a=""]=e.toFixed(i).split(".");return eT(o,r)+(a?(t.decimal||".")+a:"")}(n,i):eT(String(o),i.thousands??","),d="prefix"===i.labelPosition,c=i.prefixSpacing??(d&&0===e?"":" "),f=i.suffixSpacing??(!d&&l?"":" "),m=c+i.unit+f;if(r.push(d?m+u:u+m),l)break;n=a}return(e<0?"-":"")+r.join("")}var ez={courier:{family:"Courier",weight:400,italic:!1},"courier-bold":{family:"Courier",weight:700,italic:!1},"courier-bold-oblique":{family:"Courier",weight:700,italic:!0},"courier-oblique":{family:"Courier",weight:400,italic:!0},helvetica:{family:"Helvetica",weight:400,italic:!1},"helvetica-bold":{family:"Helvetica",weight:700,italic:!1},"helvetica-bold-oblique":{family:"Helvetica",weight:700,italic:!0},"helvetica-oblique":{family:"Helvetica",weight:400,italic:!0},"times-roman":{family:"Times",weight:400,italic:!1},"times-bold":{family:"Times",weight:700,italic:!1},"times-bold-italic":{family:"Times",weight:700,italic:!0},"times-italic":{family:"Times",weight:400,italic:!0},symbol:{family:"Symbol",weight:400,italic:!1},"zapf-dingbats":{family:"ZapfDingbats",weight:400,italic:!1}};function eU(e,t){if(Z.includes(e)){let t=ez[e];return{family:t.family,weight:t.weight,italic:t.italic}}let n=t?.(e);return n?{family:n.familyName,weight:n.weight,italic:n.italic}:{family:e}}function eV(e){return e.toLowerCase().replace(/[\\s\\-_\'"]/g,"")}var eW={helvetica:"Helvetica",arial:"Helvetica",arialmt:"Helvetica",sansserif:"Helvetica",times:"Times",timesroman:"Times",timesnewroman:"Times",timesnewromanpsmt:"Times",serif:"Times",courier:"Courier",couriernew:"Courier",couriernewpsmt:"Courier",monospace:"Courier",symbol:"Symbol",zapfdingbats:"ZapfDingbats",dingbats:"ZapfDingbats"};function eq(e){if("object"!=typeof e||null===e)return!1;let{left:t,bottom:n,right:r,top:i}=e;return[t,n,r,i].every(e=>"number"==typeof e&&Number.isFinite(e))}function eH(e){return{left:Math.min(e.left,e.right),right:Math.max(e.left,e.right),bottom:Math.min(e.top,e.bottom),top:Math.max(e.top,e.bottom)}}var eK=e=>Number.isFinite(e.x)&&Number.isFinite(e.y);function eZ([e,t,n,r]){if(![e,t,n,r].every(eK))return!1;let i={x:t.x-e.x,y:t.y-e.y},o={x:r.x-n.x,y:r.y-n.y},a={x:n.x-e.x,y:n.y-e.y},s={x:r.x-t.x,y:r.y-t.y},l=[i,o,a,s].map(e=>Math.hypot(e.x,e.y));if(l.some(e=>e<=1e-6)||i.x*o.x+i.y*o.y<=0||a.x*s.x+a.y*s.y<=0)return!1;let u=i.x*a.y-i.y*a.x,d=o.x*s.y-o.y*s.x;return!(Math.abs(u)<=1e-6*l[0]*l[2]||Math.abs(d)<=1e-6*l[1]*l[3])&&Math.sign(u)===Math.sign(d)}function eJ(e,t){let n=eQ(t);if(null!==n)return eX(e,n);let r=t*Math.PI/180,i=Math.abs(Math.cos(r)),o=Math.abs(Math.sin(r)),a=e.right-e.left,s=e.top-e.bottom,l=(a*i+s*o)/2,u=(a*o+s*i)/2,d=(e.left+e.right)/2,c=(e.bottom+e.top)/2;return{left:d-l,bottom:c-u,right:d+l,top:c+u}}function eQ(e){let t=(e%360+360)%360;return t%90==0?t:null}function eX(e,t){if(0===t||180===t)return e;let n=(e.left+e.right)/2,r=(e.bottom+e.top)/2,i=(e.top-e.bottom)/2,o=(e.right-e.left)/2;return{left:n-i,bottom:r-o,right:n+i,top:r+o}}function eY(e,t){let n=.01+1e-4*Math.max(e.right-e.left,e.top-e.bottom,t.right-t.left,t.top-t.bottom);return Math.abs(e.left-t.left)<=n&&Math.abs(e.bottom-t.bottom)<=n&&Math.abs(e.right-t.right)<=n&&Math.abs(e.top-t.top)<=n}function e0(e){if(0===e.length)return{left:0,bottom:0,right:0,top:0};let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let{x:o,y:a}of e)t=Math.min(t,o),n=Math.min(n,a),r=Math.max(r,o),i=Math.max(i,a);return{left:t,bottom:n,right:r,top:i}}function e1(e,t){let n=t.degrees*Math.PI/180,r=Math.cos(n),i=Math.sin(n),o=e.x-t.center.x,a=e.y-t.center.y;return{x:t.center.x+o*r+a*i,y:t.center.y-o*i+a*r}}function e3(e,t){return e1(e,{degrees:-t.degrees,center:t.center})}function e2(e,t){return e.replace(/\\r\\n|\\r|\\n/g,t)}var e6={family:"Helvetica",weight:400,italic:!1,size:12,color:"#000000",decoration:[],script:"normal",letterSpacing:0,horizontalScale:1,align:"left",dir:"ltr"};function e5(e){return e2(e.paragraphs.map(e=>e.runs.map(e=>e.text).join("")).join(`\n`),`\n`)}function e4(e){return e.split(/\\r\\n|\\r|\\n/).map(e=>({runs:[{text:e}]}))}var e8=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0");function e7(e,t,n){return`#${e8(e)}${e8(t)}${e8(n)}`}function e9(e){let t=Number.parseInt(e.slice(1),16);return{r:t>>16&255,g:t>>8&255,b:255&t}}var te={highlight:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},underline:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},squiggly:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},strikeout:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data",intent:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},circle:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",box:"data",rotation:"data",cloudyIntensity:"data"},readBack:["rect","borderStyle"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{}},square:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",box:"data",rotation:"data",cloudyIntensity:"data"},readBack:["rect","borderStyle"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{}},polygon:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",vertices:"data",rotation:"data",captionEnabled:"data",captionCenter:"data",intent:"data",measure:"data",cloudyIntensity:"data"},readBack:["rect","borderStyle","vertices"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",vertices:"points",captionCenter:"point",measure:"measure"},resources:{}},polyline:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",vertices:"data",rotation:"data",captionEnabled:"data",captionCenter:"data",intent:"data",measure:"data",lineEndings:"data"},readBack:["rect","borderStyle","vertices"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",vertices:"points",captionCenter:"point",measure:"measure"},resources:{}},line:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",linePoints:"data",lineEndings:"data",rotation:"data",intent:"data",measure:"data",captionEnabled:"data",captionPosition:"data",captionOffset:"data",leader:"data"},readBack:["rect","borderStyle"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",linePoints:"linePoints",measure:"measure"},resources:{}},link:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",target:"data"},readBack:["target"],colors:[],spaces:{rect:"box",actions:"actions",target:"linkTarget"},resources:{}},ink:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",inkList:"data",intent:"data",rotation:"data"},readBack:["rect","strokeWidth","borderStyle","inkList"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",inkList:"strokes"},resources:{}},"free-text":{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",box:"data",rotation:"data",intent:"data",fontFamily:"data",fontSize:"data",textAlign:"data",verticalAlign:"data",color:"data",fontColor:"data",interiorColor:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",cloudyIntensity:"data",calloutLine:"data",lineEnding:"data"},readBack:["rect","intent","borderStyle"],colors:["color","fontColor","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box",calloutLine:"calloutLine"},resources:{}},caret:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",box:"data",rotation:"data",intent:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{}},text:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",icon:"data",open:"data",state:"data",stateModel:"data"},readBack:[],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length"},resources:{}},stamp:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",box:"data",rotation:"data",name:"data",fit:"data",opacity:"data"},readBack:["rect"],colors:[],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{appearance:"required"}},"file-attachment":{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",icon:"data",file:"data"},readBack:[],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length"},resources:{file:"required"}},widget:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"data",box:"data",rotation:"data",color:"data",interiorColor:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",fontFamily:"data",fontSize:"data",fontColor:"data",textAlign:"data",caption:"data",checkStyle:"data",layout:"data",field:"engine",fieldKind:"engine",hasMark:"engine"},readBack:["rect","actions"],colors:["color","interiorColor","fontColor"],spaces:{rect:"box",actions:"actions",box:"box"},resources:{}},redact:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data",interiorColor:"data",overlayText:"data",repeat:"data",fontFamily:"data",fontSize:"data",fontColor:"data",textAlign:"data"},readBack:[],colors:["color","interiorColor","fontColor"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},popup:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",parent:"data",open:"data"},readBack:["parent"],colors:[],spaces:{rect:"box",actions:"actions"},resources:{}},unsupported:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",rawSubtypeCode:"engine",rawSubtypeName:"engine"},readBack:[],colors:[],spaces:{rect:"box",actions:"actions"},resources:{}}};function tt(e){let t={};for(let n of Object.keys(te))t[n]=e(te[n]);return t}function tn(e){return Object.prototype.hasOwnProperty.call(te,e)?te[e]:null}var tr=tt(e=>Object.keys(e.owners)),ti=tt(e=>e.resources),to=tt(e=>e.spaces),ta=Object.assign({},...Object.values(to)),ts=[["highlight","underline","squiggly","strikeout"],["square","circle"]],tl=/^sha256-[0-9a-f]{64}$/,tu=["page","position","size"];async function td(e){let t=new Uint8Array(await crypto.subtle.digest("SHA-256",e)),n="";for(let e of t)n+=e.toString(16).padStart(2,"0");return`sha256-${n}`}async function tc(e,t){for(let[n,r]of Object.entries(t))await td(r)!==n&&tF(e,`resource ${n} doesn\'t match its id`)}function tf(e,t){let n=new Set,r=new Set;for(let o of t){var i;tg(o)&&t_(o.page)&&tg(i=o.size)&&[i.width,i.height].every(e=>"number"==typeof e&&Number.isFinite(e)&&e>=0)||tF(e,"a page needs a page ref, a position and a size"),th(e,"a page",o,tu);let{position:t}=o;(!Number.isInteger(t)||t<0)&&tF(e,`page position ${JSON.stringify(t)} is not a position`);let a=H(o.page);n.has(a)&&tF(e,`page ${a} is listed twice`),r.has(t)&&tF(e,`position ${t} is listed twice`),n.add(a),r.add(t)}return n}function tm(e,t,n,r,i,o){for(let[a,s]of(tg(n)||tF(e,`${t} has no resources`),Object.entries(n)))r.includes(a)||tF(e,`${t} names an unknown resource role \'${a}\'`),"string"==typeof s&&tl.test(s)||tF(e,`${t} names ${JSON.stringify(s)}, which is not a resource id`),i.has(s)||tF(e,`${t} names ${s}, which the bundle doesn\'t hold`),o.add(s)}function tp(e,t,n,r){for(let i of n.keys())tl.test(i)||tF(e,`${JSON.stringify(i)} is not a resource id`),r.has(i)||tF(e,`resource ${i} is named by no ${t}`)}function th(e,t,n,r){for(let i of Object.keys(n))r.includes(i)||tF(e,`${t} has an unknown field \'${i}\'`)}function tF(e,t){throw new N(G.InvalidArg,`${e} bundle: ${t}`)}function tg(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function t_(e){return tg(e)&&"objectNumber"===e.kind&&Number.isInteger(e.objectNumber)&&e.objectNumber>0}function tP(e){let t=function(e,t,n){let r=new Map(n.map(e=>[H(e.page),e.page])),i=new Map;if("same"===t)for(let t of e){let e=r.get(H(t.page));e&&i.set(H(t.page),e)}else if("by-position"===t){let t=new Map(n.map(e=>[e.position,e.page]));for(let n of e){let e=t.get(n.position);e&&i.set(H(n.page),e)}}else for(let{from:e,to:n}of t){let t=H(e);if(i.has(t))throw new N(G.InvalidArg,`import: page ${t} is mapped twice`);let o=r.get(H(n));if(!o)throw new N(G.NotFound,`import: the document has no page ${H(n)}`);i.set(t,o)}return i}(e.bundlePages,e.pages,e.target),n=new Set;for(let r of e.named)t.has(H(r))||n.add(H(r));if(n.size>0){let e=[...n];throw new N(G.InvalidArg,`import: ${1===e.length?"page":"pages"} ${e.join(", ")} map to no page of this document`,{details:{pages:e}})}return e=>t.get(H(e))}var tD=new Set(["subtype","invisible","hidden","print","noZoom","noRotate","noView","readOnly","locked","toggleNoView","lockedContents","nm","reply","popup","parent","open","groupId","subject","state","stateModel","ref","page","hasAppearance","appearanceState","author","createdAt","modifiedAt","userId","createdBy","modifiedBy","importedBy","actions","file","field","fieldKind"]),tb=new Set(["free-text","redact"]),ty=new Set(["square","circle","free-text","stamp","caret","widget","line","polyline","polygon","ink"]),tw={square:["box"],circle:["box"],"free-text":["box","calloutLine"],line:["linePoints"],polygon:["vertices"],polyline:["vertices"],ink:["inkList"],highlight:["quadPoints"],underline:["quadPoints"],squiggly:["quadPoints"],strikeout:["quadPoints"],redact:["rect","quadPoints"],caret:["box"],text:["rect"],stamp:["box"],"file-attachment":["rect"],link:["rect"],widget:["box"]},tE=(e,t)=>.001>=Math.abs(e-t),tA=e=>"number"==typeof e?(e%360+360)%360:0;function tv(e,t){if(null==e||null==t)return null==e&&null==t;if("number"==typeof e&&"number"==typeof t)return tE(e,t);if(Array.isArray(e)||Array.isArray(t))return!!Array.isArray(e)&&!!Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>tv(e,t[n]));if("object"==typeof e&&"object"==typeof t){for(let n of new Set([...Object.keys(e),...Object.keys(t)]))if(!tv(e[n],t[n]))return!1;return!0}return e===t}function tS(e){return null==e||"object"!=typeof e?void 0:Array.isArray(e)?e.length>0?tS(e[0]):void 0:"number"==typeof e.x&&"number"==typeof e.y?{x:e.x,y:e.y}:"number"==typeof e.left&&"number"==typeof e.bottom?{x:e.left,y:e.bottom}:tS(e.start??e.upperLeft)}var tk={impact:"inert"},tx={impact:"regenerate"};function tG(e,t){let n=new Map(e.map(e=>[K(e.ref),e])),r=n.get(K(t));if(!r)return[];let i=new Map,o=new Map,a=(e,t,n)=>e.set(t,[...e.get(t)??[],n]);for(let t of e){let e=t.reply?n.get(K(t.reply.to)):void 0;e&&e!==t&&a(i,e,t);let r="popup"===t.subtype&&t.parent?n.get(K(t.parent)):void 0;r&&r!==t&&a(o,r,t);let s=t.popup?n.get(K(t.popup)):void 0;s&&s!==t&&"popup"===s.subtype&&a(o,t,s)}let s=[],l=new Set,u=e=>{if(!l.has(e)){for(let t of(l.add(e),i.get(e)??[]))u(t);for(let t of o.get(e)??[])l.has(t)||(l.add(t),s.push(t));s.push(e)}};return u(r),s}var tO=new Set(["accepted","rejected","cancelled","completed","none"]),tI=new Set(["marked","unmarked"]);function tN(e){return tO.has(e)?"review":tI.has(e)?"marked":null}var tC=new Set(["highlight","underline","squiggly","strikeout","square","circle","free-text","stamp","caret","widget","line","polyline","polygon","ink"]),tj=new Set(["box","point","points","strokes","quads","linePoints","calloutLine"]);function tM(e){return[...Object.entries(to[e]).filter(([e,t])=>"rect"!==e&&tj.has(t)).map(([e])=>e),"rotation"]}function tR(e,t){return new N(G.InvalidArg,`${e} field \'rect\': ${t}`,{details:{field:"rect"}})}var tT=e=>Number.isFinite(e)&&e>0,tB=e=>({x:Math.fround(e.x),y:Math.fround(e.y)});function tL(e,t,n){let r=0,i=e.map(tB);for(let e=0;e<(t?i.length:i.length-1);e++){let t=i[e],o=i[(e+1)%i.length];r+=Math.hypot((o.x-t.x)*n.sx,(o.y-t.y)*n.sy)}return r}function t$(e,t){if(e.length<3)return 0;let n=e.map(tB),r=n[0],i=0;for(let e=1;e!Number.isFinite(Math.fround(e.x))||!Number.isFinite(Math.fround(e.y))))return{unavailable:"invalid-geometry"};let i="polygon"===e.subtype;if(i&&!function(e){let t=e.map(tB),n=(e,t)=>e.x===t.x&&e.y===t.y;if(t.length>1&&n(t[0],t[t.length-1])&&t.pop(),t.length<3||0===t$(t,{sx:1,sy:1}))return!1;let r=(e,t,n)=>(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),i=(e,t,n)=>0===r(e,t,n)&&n.x>=Math.min(e.x,t.x)&&n.x<=Math.max(e.x,t.x)&&n.y>=Math.min(e.y,t.y)&&n.y<=Math.max(e.y,t.y);for(let e=0;e=Math.fround(e.cyx)))throw new N(G.InvalidArg,"Invalid CYX")}function tW(e){if("number"!=typeof e||!Number.isFinite(Math.fround(e)))throw new N(G.InvalidArg,"Value is outside PDF float range")}var tq=["linePoints","vertices","measure","intent","contents"],tH=["captionEnabled","captionPosition","captionOffset","captionCenter"],tK=e=>tH.some(t=>void 0!==e[t]);function tZ(e,t){try{if(null!=t.measure&&"rectilinear"===t.measure.subtype&&tV(t.measure),"line"===e&&"leader"in t&&null!=t.leader&&("object"!=typeof t.leader||Array.isArray(t.leader)))throw new N(G.InvalidArg,"Invalid line leader");if(null!=t.intent&&!("line"===e?["line-dimension","line-arrow"]:"polygon"===e?["polygon-dimension","polygon-cloud"]:["polyline-dimension"]).includes(t.intent))throw new N(G.InvalidArg,"Invalid measurement intent");if(null!=t.captionEnabled&&"boolean"!=typeof t.captionEnabled)throw new N(G.InvalidArg,"Invalid caption visibility");if("captionPosition"in t&&null!=t.captionPosition&&!["inline","top"].includes(t.captionPosition))throw new N(G.InvalidArg,"Invalid caption position");if("captionOffset"in t&&t.captionOffset&&(tW(t.captionOffset.along),tW(t.captionOffset.perpendicular)),"captionCenter"in t&&t.captionCenter&&(tW(t.captionCenter.x),tW(t.captionCenter.y)),"leader"in t&&t.leader){for(let e of[t.leader.length,t.leader.extension??0,t.leader.offset??0])tW(e);if((t.leader.extension??0)<0||(t.leader.offset??0)<0)throw new N(G.InvalidArg,"Leader extension and offset must be nonnegative")}for(let e of"linePoints"in t?t.linePoints?[t.linePoints.start,t.linePoints.end]:[]:"vertices"in t?t.vertices??[]:[])tW(e.x),tW(e.y)}catch(e){throw new N(G.InvalidArg,e.message)}}function tJ(e){if(void 0!==e.richText&&null!==e.richText&&void 0!==e.contents&&null!==e.contents&&e2(e.contents,`\n`)!==e5(e.richText))throw new N(G.InvalidArg,`${e.subtype??"annotation"}: \\`contents\\` must equal the plain projection of \\`richText\\` when both are given`)}function tQ(e){return void 0!==e&&"free-text"!==e&&(tr[e]?.includes("richText")??!1)}var tX="#ff0000",tY="#000000",t0="#ffff00",t1={invisible:!1,hidden:!1,print:!0,noZoom:!1,noRotate:!1,noView:!1,readOnly:!1,locked:!1,toggleNoView:!1,lockedContents:!1,blendMode:"normal"},t3={...t1,color:tX,opacity:1,strokeWidth:1,borderStyle:"solid"},t2={start:"none",end:"none"},t6={...t1,color:tY,opacity:1},t5={square:t3,circle:t3,line:{...t3,lineEndings:t2,captionEnabled:!1,captionPosition:"inline"},polygon:t3,polyline:{...t3,lineEndings:t2},ink:t3,highlight:{...t1,blendMode:"multiply",color:t0,opacity:1},underline:t6,squiggly:t6,strikeout:t6,caret:{...t1,color:tX,opacity:1},"free-text":{...t1,contents:"",intent:"free-text",fontFamily:"helvetica",fontSize:12,textAlign:"left",verticalAlign:"top",color:tY,fontColor:tY,opacity:1,strokeWidth:1,borderStyle:"solid"},text:{...t1,icon:"note",open:!1,color:t0,opacity:1},"file-attachment":{...t1,icon:"paperclip",color:t0,opacity:1},link:t1,redact:{...t1,quadPoints:[],color:tX,opacity:1,repeat:!1,fontFamily:"helvetica",fontSize:12,fontColor:tY,textAlign:"left"},stamp:{...t1,fit:"contain",opacity:1},widget:{...t1,strokeWidth:1,borderStyle:"solid",textAlign:"left"},popup:{...t1,print:!1,open:!1}};function t4(e){return"unsupported"===e?{}:t5[e]}var t8=[3,3];function t7(e,t){return"dashed"===e&&void 0===t}var t9=e=>tn(e)?.owners.dashArray!==void 0;function ne(e,t,n){let r={...e};if(void 0!==t.fontFamily){let e=eU(t.fontFamily,n);r.family=e.family,void 0!==e.weight&&(r.weight=e.weight),void 0!==e.italic&&(r.italic=e.italic)}return void 0!==t.fontSize&&(r.size=t.fontSize),null!=t.fontColor&&(r.color=t.fontColor),void 0!==t.textAlign&&(r.align=t.textAlign),r}function nt(e,t){if(null!=t&&"free-text-callout"!==e)throw new N(G.InvalidArg,`free-text: a callout line needs intent \'free-text-callout\', not \'${e}\'`,{details:{field:"intent"}})}function nn(e,t){return Object.fromEntries(Object.entries(e).filter(([e,n])=>"subtype"===e||!t(e,n)))}function nr(e){return new N(G.InvalidArg,`text: the custom state \'${e}\' needs a stateModel`,{details:{field:"stateModel"}})}function ni(e,t){let n=tr[e],r=Object.keys(t).filter(e=>"subtype"!==e&&!n.includes(e));if(r.length>0)throw new N(G.InvalidArg,`${e} has no field ${r.map(e=>`\'${e}\'`).join(", ")}`)}var no=class extends N{constructor(e,t){super(G.InvalidArg,`invalid scope "${e}": ${t}`,{details:{scope:e,reason:t}}),this.scope=e,I(this,"name","InvalidScope")}},na=class extends N{constructor(e,t,n,r){super(G.Forbidden,`permission denied${t?` (${t})`:""}: ${n?`one of ${n.join(", ")}`:e}${r?` for ${r.length} annotation${1===r.length?"":"s"}`:""}`,{details:{required:e,...void 0===t?{}:{context:t},...void 0===n?{}:{anyOf:[...n]},...void 0===r?{}:{refs:[...r]}}}),this.required=e,this.context=t,this.anyOf=n,this.refs=r,I(this,"name","PermissionDenied")}},ns=class extends N{constructor(e){super(G.Aborted,function(e){if(null==e)return"aborted";if("string"==typeof e)return e;if(e instanceof Error)return e.message||"aborted";try{return JSON.stringify(e)}catch{return"aborted"}}(e)),I(this,"name","AbortError"),I(this,"reason",void 0),this.reason=e}};function nl(e,t){throw new N(G.InvalidArg,t,{details:{field:e}})}var nu=["normal","rollover","down"],nd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nc=Uint8Array.from(nd,e=>e.charCodeAt(0)),nf=(()=>{let e=(new Int16Array(128)).fill(-1);for(let t=0;t<64;t++)e[nd.charCodeAt(t)]=t;return e})();function nm(e){let t=e.length;for(;t>0&&61===e.charCodeAt(t-1);)t-=1;return t}var np=(e,t,n)=>Math.min(Math.max(Math.floor(e),t),n);function nh(e,t){let n=np(t,0,e.charCount),r=e.charMap;if(!r||0===r.length)return Math.min(n,e.text.length);let[i,o]=function(e,t){let n=0,r=e.length-1,i=null;for(;n<=r;){let o=n+r>>1;e[o][0]<=t?(i=e[o],n=o+1):r=o-1}return i??[0,0]}(r,n);return o+(n-i)}function nF(e,t,n){let r=np(t,0,e.text.length),i=0,o=e.charCount;if("start"===n){for(;i>1;nh(e,t)>=r?o=t:i=t+1}return i}var ng=/[\\r\\p{Noncharacter_Code_Point}]/u;function n_(e){return"start"===e||"end"===e?null:"before"in e?e.before:e.after}function nP(e,t,n){if("start"===t)return 0;if("end"===t)return e.length;let r=n_(t),i=e.findIndex(e=>n(e)===n(r));if(i<0)throw new N(G.NotFound,`no neighbour ${n(r)} in the list`,{details:{field:"position"}});return"before"in t?i:i+1}function nD(e,t,n,r){let i=new Set(t.map(r));if(i.size!==t.length)throw new N(G.InvalidArg,"a row is named twice",{details:{field:"refs"}});let o=new Set(e.map(r)),a=t.find(e=>!o.has(r(e)));if(void 0!==a)throw new N(G.NotFound,`no row ${r(a)} in the list`,{details:{field:"refs"}});let s=n_(n);if(null!==s&&i.has(r(s)))throw new N(G.InvalidArg,`the neighbour ${r(s)} is one of the rows that move`,{details:{field:"position"}});let l=e.filter(e=>!i.has(r(e))),u=nP(l,n,r);return[...l.slice(0,u),...t,...l.slice(u)]}var nb="EmbedPDF";function ny(e,t){return{x:e.x-t.left,y:t.top-e.y}}function nw(e,t){return{x:e.x+t.left,y:t.top-e.y}}function nE(e,t){return{x:e.left-t.left,y:t.top-e.top,width:e.right-e.left,height:e.top-e.bottom}}function nA(e,t){let n=e.x+t.left,r=t.top-e.y;return{left:n,right:n+e.width,bottom:r-e.height,top:r}}function nv(e,t){return{upperLeft:ny(e.upperLeft,t),upperRight:ny(e.upperRight,t),lowerLeft:ny(e.lowerLeft,t),lowerRight:ny(e.lowerRight,t)}}function nS(e){return"rotation"in e}function nk(e){return{kind:"objectNumber",objectNumber:e}}function nx(e){if(e.byteLength<4)return null;let t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?function(e){if(e.byteLength<24)return null;let t=new DataView(e),n=t.getUint32(16),r=t.getUint32(20);return 0===n||0===r?null:{mimeType:"image/png",width:n,height:r}}(e):255===t[0]&&216===t[1]&&255===t[2]?function(e){let t=new Uint8Array(e),n=2;for(;n+4=192&&r<=195){if(n+9>t.byteLength)return null;let r=new DataView(e,n+5),i=r.getUint16(0),o=r.getUint16(2);if(0===o||0===i)return null;return{mimeType:"image/jpeg",width:o,height:i}}if(216===r||217===r)n+=2;else if(255===r)n+=1;else{let e=t[n+2]<<8|t[n+3];n+=2+e}}return null}(e):37===t[0]&&80===t[1]&&68===t[2]&&70===t[3]?{mimeType:"application/pdf"}:null}var nG=["appearance","file"];function nO(e,t,n){let r=ti[e]??{};for(let i of nG){let o=t?.[i]!==void 0;if(o&&void 0===r[i])throw new N(G.InvalidArg,`a ${e} annotation takes no \'${i}\' resource`);if(!o&&"create"===n&&"required"===r[i])throw new N(G.InvalidArg,`creating a ${e} annotation needs its \'${i}\' resource`)}}var nI=Object.freeze({bundleBytes:0x3200000,manifestBytes:0x1000000,items:1e4,pages:2e3,resources:2e3,resourceBytes:0x3200000,imagePixels:4e7});function nN(e){return new TextEncoder().encode(JSON.stringify(e)).length}function nC(e,t,n,r){let i=t[n];if(!(r<=i))throw new N(G.PayloadTooLarge,`the ${e} bundle is past its ${n} limit: ${r} > ${i}`,{details:{limit:n,max:i,value:r}})}var nj={annotation:"an annotation bundle",form:"a form bundle"};function nM(e){let t=t=>new N(G.InvalidArg,`the file is not ${nj[e.kind]}`,void 0===t?void 0:{cause:t});return{stringify(t,n){let r=n?.limits??nI,i=new Map;for(let[e,n]of Object.entries(t.resources))i.set(e,n.length);e.assertManifest(t,i,r);let o={};for(let n of e.keys)o[n]=t[n];let a={};for(let[e,n]of Object.entries(t.resources))a[e]=function(e){let t=new Uint8Array(4*Math.ceil(e.length/3)),n=0,r=0;for(;r+2>18],t[n++]=nc[i>>12&63],t[n++]=nc[i>>6&63],t[n++]=nc[63&i]}let i=e.length-r;if(i>0){let o=e[r]<<16|(2===i?e[r+1]<<8:0);t[n++]=nc[o>>18],t[n++]=nc[o>>12&63],t[n++]=2===i?nc[o>>6&63]:61,t[n++]=61}return new TextDecoder().decode(t)}(n);return o.resources=a,JSON.stringify(o)},async parse(n,r){let i,o=r?.limits??nI,a=Math.ceil(4*o.bundleBytes/3)+81*o.resources+256;if(n.length>a)throw new N(G.PayloadTooLarge,`the file is ${n.length} characters, more than a bundle within ${o.bundleBytes} bytes can be`,{details:{limit:"bundleBytes",max:o.bundleBytes,fileLength:n.length}});try{i=JSON.parse(n)}catch(e){throw t(e)}let s="object"==typeof i&&null!==i?i.resources:null;if("object"!=typeof s||null===s||Array.isArray(s))throw t();let l=new Map;for(let[e,t]of Object.entries(s)){let n="string"==typeof t?function(e){let t=nm(e);return t%4==1?null:Math.floor(3*t/4)}(t):null;if(null===n)throw new N(G.InvalidArg,`resource ${e} is not base64`);l.set(e,n)}e.assertManifest(i,l,o);let u={};for(let[e,t]of Object.entries(s))try{u[e]=function(e){let t=nm(e);if(t%4==1)throw Error("malformed base64");let n=new Uint8Array(Math.floor(3*t/4)),r=0,i=0,o=0;for(let a=0;a=8&&(o-=8,n[r++]=i>>o&255)}return n}(t)}catch(t){throw new N(G.InvalidArg,`resource ${e} is not base64`,{cause:t})}await tc(e.kind,u);let d={};for(let t of e.keys)d[t]=i[t];return d.resources=u,e.complete?e.complete(d):d}}}var nR=["format","version","pages","items"],nT=[...nR,"resources"],nB=["data","resources"];function nL(e,t,n){tg(e)||tF("annotation","not an annotation bundle"),th("annotation","the bundle",e,nT),"embedpdf/annotations"!==e.format&&tF("annotation",`unknown format ${JSON.stringify(e.format)}`),1!==e.version&&tF("annotation",`unknown version ${JSON.stringify(e.version)}`);let{pages:r,items:i}=e;Array.isArray(r)||tF("annotation","pages is not a list"),Array.isArray(i)||tF("annotation","items is not a list"),nC("annotation",n,"items",i.length),nC("annotation",n,"pages",r.length),nC("annotation",n,"resources",t.size);let o=nN({pages:r,items:i});for(let e of(nC("annotation",n,"manifestBytes",o),t.values()))nC("annotation",n,"resourceBytes",e),o+=e;nC("annotation",n,"bundleBytes",o);let a=tf("annotation",r),s=new Set;i.forEach((e,n)=>{tg(e)&&tg(e.data)&&"string"==typeof e.data.subtype||tF("annotation",`item ${n} has no annotation data`),th("annotation",`item ${n}`,e,nB);let r=e.data.ref,i=tg(r)?r.page:void 0;t_(i)&&a.has(H(i))||tF("annotation",`item ${n} is on a page the bundle doesn\'t list`),tm("annotation",`item ${n}`,e.resources,nG,t,s)}),tp("annotation","item",t,s)}function n$(e){return{kind:"key",key:e}}nM({kind:"annotation",keys:nR,assertManifest:nL});var nz=new Set(["square","circle","free-text","stamp","caret"]),nU=(e,t)=>"function"==typeof t?t(e):t,nV=(e,t)=>null===e?null:t(e);function nW(e,t){let{left:n,top:r}=nU(e.page,t),i=e=>nV(e,e=>e-n),o=e=>nV(e,e=>r-e);switch(e.kind){case"xyz":{let{left:t,top:n,...r}=e;return{...r,x:i(t),y:o(n)}}case"fitH":case"fitBH":{let{top:t,...n}=e;return{...n,y:o(t)}}case"fitV":case"fitBV":{let{left:t,...n}=e;return{...n,x:i(t)}}case"fitR":{let{left:t,bottom:i,right:o,top:a,...s}=e,l=Math.min(i,a),u=Math.max(i,a);return{...s,x:Math.min(t,o)-n,y:r-u,width:Math.abs(o-t),height:u-l}}case"fit":case"fitB":return e}}function nq(e,t){let{left:n,top:r}=nU(e.page,t),i=e=>nV(e,e=>e+n),o=e=>nV(e,e=>r-e);switch(e.kind){case"xyz":{let{x:t,y:n,...r}=e;return{...r,left:i(t),top:o(n)}}case"fitH":case"fitBH":{let{y:t,...n}=e;return{...n,top:o(t)}}case"fitV":case"fitBV":{let{x:t,...n}=e;return{...n,left:i(t)}}case"fitR":{let{x:t,y:i,width:o,height:a,...s}=e,l=r-i;return{...s,left:t+n,bottom:l-a,right:t+n+o,top:l}}case"fit":case"fitB":return e}}function nH(e,t){return"goto"===e.kind?{...e,destination:t(e.destination)}:e}function nK(e,t){return{...e,root:e.root?function e(t,n){let r=t.next.map(t=>e(t,n));return"goto"===t.type?{...t,next:r,destination:n(t.destination)}:{...t,next:r}}(e.root,t):null}}function nZ(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>null==n?[e,n]:[e,"root"in n?nK(n,t):function e(t,n){let r=t.next?.map(t=>e(t,n)),i="goto"===t.type?{...t,destination:n(t.destination)}:t;return r?{...i,next:r}:i}(n,t)]))}function nJ(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>[e,n?nK(n,t):n]))}var nQ=(e,t)=>"rectilinear"===e.subtype&&e.origin?{...e,origin:t(e.origin)}:e;function nX(e,t){return nQ(e,e=>ny(e,t))}function nY(e,t){return nQ(e,e=>nw(e,t))}function n0(e,t){return e.map(e=>({...e,bbox:nE(e.bbox,t),measure:e.measure?nX(e.measure,t):null}))}var n1={length:e=>e,point:(e,{visible:t})=>ny(e,t),points:(e,{visible:t})=>e.map(e=>ny(e,t)),strokes:(e,{visible:t})=>e.map(e=>e.map(e=>ny(e,t))),box:(e,{visible:t})=>nE(e,t),quads:(e,{visible:t})=>e.map(e=>nv(e,t)),linePoints:(e,{visible:t})=>({start:ny(e.start,t),end:ny(e.end,t)}),calloutLine:(e,{visible:t})=>e.map(e=>ny(e,t)),measure:(e,{visible:t})=>nX(e,t),linkTarget:(e,{boxOf:t})=>nH(e,e=>nW(e,t)),actions:(e,{boxOf:t})=>nZ(e,e=>nW(e,t))},n3={length:e=>e,point:(e,{visible:t})=>nw(e,t),points:(e,{visible:t})=>e.map(e=>nw(e,t)),strokes:(e,{visible:t})=>e.map(e=>e.map(e=>nw(e,t))),box:(e,{visible:t})=>nA(e,t),quads:(e,{visible:t})=>e.map(e=>({upperLeft:nw(e.upperLeft,t),upperRight:nw(e.upperRight,t),lowerLeft:nw(e.lowerLeft,t),lowerRight:nw(e.lowerRight,t)})),linePoints:(e,{visible:t})=>({start:nw(e.start,t),end:nw(e.end,t)}),calloutLine:(e,{visible:t})=>e.map(e=>nw(e,t)),measure:(e,{visible:t})=>nY(e,t),linkTarget:(e,{boxOf:t})=>nH(e,e=>nq(e,t)),actions:(e,{boxOf:t})=>nZ(e,e=>nq(e,t))};function n2(e,t,n,r){let i=void 0===e?ta:to[e]??to.unsupported;return Object.fromEntries(Object.entries(t).map(([e,t])=>{let o=i[e];if(!o||null==t)return[e,t];let a=r[o](t,n);if(r===n3&&function e(t){return"number"==typeof t?Number.isNaN(t):"object"==typeof t&&null!==t&&Object.values(t).some(e)}(a)){var s,l;throw s=e,l=o,new N(G.InvalidArg,`field \'${s}\': expected page space, ${"box"===l?"{ x, y, width, height }":"points as { x, y }"} from the page\'s top-left`,{details:{field:s}})}return[e,a]}))}function n6(e,t,n){return n2(e.subtype,e,{visible:t,boxOf:n},n1)}function n5(e,t,n){return n2(e.subtype,e,{visible:t,boxOf:n},n3)}function n4(e,t,n){return n2(e.subtype,e,{visible:t,boxOf:n},n3)}var n8=e=>!!(e.space||e.empty),n7=e=>!!e.empty,n9={baseline:{x:1,y:0},ascent:{x:0,y:1}},re=(e,t)=>({x:t.x*e.baseline.x+t.y*e.baseline.y,y:t.x*e.ascent.x+t.y*e.ascent.y}),rt=(e,t)=>({x:e.baseline.x*t.x+e.ascent.x*t.y,y:e.baseline.y*t.x+e.ascent.y*t.y}),rn={left:0,bottom:0,right:0,top:0};function rr(e,t){let n=[t.upperLeft,t.upperRight,t.lowerLeft,t.lowerRight].map(t=>re(e,t)),r=n.map(e=>e.x),i=n.map(e=>e.y);return{left:Math.min(...r),bottom:Math.min(...i),right:Math.max(...r),top:Math.max(...i)}}var ri=(e,t)=>t.x>=e.left&&t.x<=e.right&&t.y>=e.bottom&&t.y<=e.top;function ro(e,t,n=1.5){let r=e.frames.map((e,n)=>0===n?t:re(e,t));for(let t of e.runs){let n=r[t.frame];if(ri(t.rect,n))for(let r=0;rs.right+i)&&!(n.ys.top+i))for(let r=0;rl.right+i||n.yl.top+i)continue;let u=Math.min(Math.abs(n.x-l.left),Math.abs(n.x-l.right)),d=Math.min(Math.abs(n.y-l.bottom),Math.abs(n.y-l.top));u+d=0?o:null}function ra(e,t,n){return 0===t?{upperLeft:{x:n.left,y:n.top},upperRight:{x:n.right,y:n.top},lowerLeft:{x:n.left,y:n.bottom},lowerRight:{x:n.right,y:n.bottom}}:{upperLeft:rt(e,{x:n.left,y:n.top}),upperRight:rt(e,{x:n.right,y:n.top}),lowerLeft:rt(e,{x:n.left,y:n.bottom}),lowerRight:rt(e,{x:n.right,y:n.bottom})}}var rs=e=>e.right===e.left&&e.top===e.bottom;function rl(e,t,n,r){let i=Math.max(t,r)-Math.min(e,n);return 0!==i&&Math.max(0,Math.min(t,r)-Math.max(e,n))/i>=.5}var ru={x:0,y:0,width:0,height:0},rd={upperLeft:{x:0,y:0},upperRight:{x:0,y:0},lowerLeft:{x:0,y:0},lowerRight:{x:0,y:0}},rc=/\\s/,rf=/\\p{M}/gu,rm=/^(?![\\t\\n\\v\\f\\r])[\\p{Cf}\\p{Cc}\\p{Noncharacter_Code_Point}]$/u;function rp(e,t={}){let n=[],r=[],i=!1,o=0;for(let a of e){let e;if(rm.test(a)){o+=a.length;continue}rc.test(a)?e=" ":(e=a.normalize("NFKD"),t.keepMarks||(e=e.replace(rf,"")),t.keepCase||(e=e.toUpperCase().toLowerCase()));for(let a=0;a=55296&&n<=56319&&t+1=56320&&n<=57343)return 2}return 1}(e.original,i)-r}}var rF=["format","version","pages","fields","widgets","calculationOrder"],rg=["image"],r_=[...rF,"resources"],rP=["data"],rD=["data","resources"];function rb(e){let t=ry(e.fields,e=>es(ej(en(el(ey(e)))))),n=e.widgets&&ry(e.widgets,Q);return t===e.fields&&n===e.widgets?e:{...e,fields:t,...n?{widgets:n}:{}}}function ry(e,t){let n=!1,r=e.map(e=>{let r=t(e.data);return r===e.data?e:(n=!0,{...e,data:r})});return n?r:e}function rw(e,t,n){tg(e)||tF("form","not a form bundle"),th("form","the bundle",e,r_),"embedpdf/form"!==e.format&&tF("form",`unknown format ${JSON.stringify(e.format)}`),1!==e.version&&tF("form",`unknown version ${JSON.stringify(e.version)}`);let{pages:r,fields:i,widgets:o,calculationOrder:a}=e;Array.isArray(r)||tF("form","pages is not a list"),Array.isArray(i)||tF("form","fields is not a list"),Array.isArray(o)||tF("form","widgets is not a list"),Array.isArray(a)||tF("form","calculationOrder is not a list"),nC("form",n,"items",i.length+o.length),nC("form",n,"pages",r.length),nC("form",n,"resources",t.size);let s=nN({pages:r,fields:i,widgets:o,calculationOrder:a});for(let e of(nC("form",n,"manifestBytes",s),t.values()))nC("form",n,"resourceBytes",e),s+=e;nC("form",n,"bundleBytes",s);let l=tf("form",r);i.forEach((e,t)=>{tg(e)&&tg(e.data)&&"string"==typeof e.data.kind&&"string"==typeof e.data.name&&tg(e.data.ref)||tF("form",`field ${t} has no field data`),th("form",`field ${t}`,e,rP)});let u=new Set;o.forEach((e,n)=>{tg(e)&&tg(e.data)&&"widget"===e.data.subtype||tF("form",`widget ${n} has no widget data`),th("form",`widget ${n}`,e,rD);let r=e.data.ref,i=tg(r)?r.page:void 0;t_(i)&&l.has(H(i))||tF("form",`widget ${n} is on a page the bundle doesn\'t list`),tm("form",`widget ${n}`,e.resources,rg,t,u)}),a.forEach((e,t)=>{tg(e)||tF("form",`calculation order entry ${t} is not a field ref`)}),tp("form","widget",t,u)}function rE(e){return{keepCase:!!e.matchCase,keepMarks:!!e.matchDiacritics,dropWhitespace:!!e.ignoreWhitespace}}nM({kind:"form",keys:rF,assertManifest:rw,complete:rb});var rA=/[\\p{L}\\p{N}_]/u,rv=/\\p{M}/u;function rS(e,t){if(t<=0)return!1;let n=e.charCodeAt(t-1);return rA.test(String.fromCodePoint(e.codePointAt(n>=56320&&n<=57343&&t>=2?t-2:t-1)))}function rk(e,t){return!(t>=e.length)&&rA.test(String.fromCodePoint(e.codePointAt(t)))}function rx(e,t){let n=rp(t.text,rE(t)).folded;if(0===n.trim().length)return[];let r=[],i=0;for(;i<=e.folded.length-n.length;){let o=e.folded.indexOf(n,i);if(o<0)break;if(t.wholeWord&&!function(e,t,n,r){if(!r.ignoreWhitespace)return!rS(e.folded,t)&&!rk(e.folded,t+n);let{start:i,count:o}=rh(e,t,n);return!rS(e.original,i)&&!rk(e.original,i+o)}(e,o,n.length,t)){i=o+1;continue}if(t.matchDiacritics&&o+n.length512)return{ok:!1,issue:"too-long",message:"Pattern exceeds 512 characters."};let t=!1;for(let n=0;n="1"&&r<="9")return{ok:!1,issue:"backreference",message:`Backreference \\\\${r} is not supported.`};if(!t&&"k"===r&&"<"===e[n+2])return{ok:!1,issue:"backreference",message:"Named backreferences (\\\\k<\\u2026>) are not supported."};n++;continue}if(t){"]"===r&&(t=!1);continue}if("["===r){t=!0;continue}if("("===r&&"?"===e[n+1]){let t=e[n+2]??"";if("="===t||"!"===t)return{ok:!1,issue:"lookaround",message:"Lookahead ((?=\\u2026), (?!\\u2026)) is not supported."};if("<"===t&&("="===e[n+3]||"!"===e[n+3]))return{ok:!1,issue:"lookaround",message:"Lookbehind ((?<=\\u2026), (?{var r;let i;return"link"!==e.subtype||"activate"!==t||o&&(r=n,i=r?.root,!r||!!r.incomplete||!i||!!(i.next.length>0)||!!("uri"===i.type&&i.isMap))})&&n.push({field:"actions",reason:"unsupported-action"}),n}var rT=new Set(["NextPage","PrevPage","FirstPage","LastPage"]);function rB(e){let t=[],n=(e,r)=>{if("object"==typeof e&&null!==e){if(Array.isArray(e))return void e.forEach(e=>n(e));if("page"===r&&r$(e))return void t.push(e);Object.entries(e).forEach(([e,t])=>n(t,e))}};return n(e),t}function rL(e,t){let n=(e,r)=>"object"!=typeof e||null===e?e:Array.isArray(e)?e.map(e=>n(e)):"page"===r&&r$(e)?t(e):Object.fromEntries(Object.entries(e).map(([e,t])=>[e,n(t,e)]));return n(e)}function r$(e){return 2===Object.keys(e).length&&"objectNumber"===e.kind&&"number"==typeof e.objectNumber}var rz=/^\\s*event\\s*\\.\\s*target\\s*\\.\\s*buttonImportIcon\\s*\\(\\s*\\)\\s*(?:;\\s*)?$/,rU=["activate","mouseUp"];function rV(e){let t,n=rU.flatMap(t=>{let n=e?.[t];return null==n?[]:[n]});return 1===n.length&&null!==(t=ew(n[0]))&&rz.test(t)}function rW(e){return e.length>0&&e.every(rV)}function rq(){return{type:"javascript",script:"event.target.buttonImportIcon();"}}function rH(e){return rU.some(t=>e?.[t]!==void 0)?e??{}:{...e,activate:rq()}}function rK(e,t){let{takesImage:n}=e;if(void 0!==n){if("pushbutton"!==t)throw new N(G.InvalidArg,`\'takesImage\' does not apply to a ${t} field`,{details:{field:"takesImage"}});if("boolean"!=typeof n)throw new N(G.InvalidArg,"\'takesImage\' is true or false",{details:{field:"takesImage"}});return n}}function rZ(e,t){if(!t)return rV(e)?{kind:"remove",event:e?.activate!=null?"activate":"mouseUp"}:{kind:"keep"};if(rV(e))return{kind:"keep"};if(rU.some(t=>e?.[t]!=null))throw new N(G.InvalidArg,"\'takesImage\' can\'t be set: a widget\'s press already runs another action, which is never overwritten. Remove it first (updateWidget, actions.activate and actions.mouseUp)",{details:{field:"takesImage"}});return{kind:"write"}}function rJ(e,t=0){if(e.length+t===0)throw rX();if(t>0)throw new N(G.InvalidArg,"\'takesImage\' can\'t be set: a widget of the button is on no page, so its press can\'t be written",{details:{field:"takesImage"}});for(let t of e)rZ(t,!0)}function rQ(e){return"write"===e.kind?{activate:rq()}:"remove"===e.kind?{[e.event]:null}:{}}function rX(){return new N(G.InvalidArg,"\'takesImage\' needs a widget: the script that makes an image field is its widgets\' press",{details:{field:"takesImage"}})}function rY(e,t,n){if(0===e.length||0===n.length)return e;let r=new Set(n),i=[0];for(let e=0;ei[Math.min(Math.max(e,0),t)],a=[];return e.forEach((n,r)=>{if(o(e[r+1]?.firstPage??t)===o(n.firstPage))return;let i=o(n.firstPage);a.push(i===n.firstPage?n:{...n,firstPage:i})}),r1(a,e)?e:a}function r0(e,t,n){if(n<=0)return e;let r=!1,i=e.map(e=>0===e.firstPage||e.firstPage{let r=t[n];return e.firstPage===r.firstPage&&e.style===r.style&&e.firstNumber===r.firstNumber&&e.prefix===r.prefix})}var r3=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]];function r2(e){let t=e%1e6,n="";for(let[e,r]of r3)for(;t>=e;)n+=r,t-=e;return n}function r6(e){if(e<=0)return"";let t=e-1;return String.fromCharCode(97+t%26).repeat((Math.floor(t/26)+1)%1e3)}var r5={text:"{ value }",checkbox:"{ checked } or { value }",radio:"{ value }",combobox:"{ value }",listbox:"{ selectedValues }"};function r4(e,t){var n;switch(e.kind){case"text":if("value"in t)return{kind:"text",value:t.value??""};break;case"checkbox":if("checked"in t){if(!t.checked)return{kind:"toggle",state:null};let n=e.widgets[0];if(!n)throw it(`\'${e.name}\' has no widget to check`);return{kind:"toggle",state:n.onState}}if("value"in t)return{kind:"toggle",state:r9(e,t.value)};break;case"radio":if("value"in t){let n=r9(e,t.value);if(null===n&&e.noToggleToOff)throw it(`\'${e.name}\' must keep a choice: it can\'t be cleared`);return{kind:"toggle",state:n}}break;case"combobox":if("value"in t)return ie(e,null===t.value?[]:[t.value]);break;case"listbox":if("selectedValues"in t)return ie(e,t.selectedValues);break;default:throw it(`${e.kind} fields hold no value you can set`)}throw it(`a ${e.kind} field takes ${r5[e.kind]}, not ${"checked"in(n=t)?"{ checked }":"selectedValues"in n?"{ selectedValues }":"{ value }"}`)}function r8(e,t){let n=e=>new N(G.InvalidArg,e,{details:{field:"defaultValue"}});if(new Set(t).size!==t.length)throw n("the default values must not repeat");if(t.length>1&&!("listbox"===e.kind&&e.multiSelect))throw n(`a ${"listbox"===e.kind?"list without multiSelect":"dropdown"} has one default`);let r="combobox"===e.kind&&!0===e.edit,i=new Set(e.options.map(e=>e.value)),o=t.find(e=>!i.has(e));if(void 0!==o&&!r)throw n(`\'${o}\' is not an option value of the ${"listbox"===e.kind?"list":"dropdown"}`)}function r7(e,t){return e.kind===t.kind&&("scalar"===e.kind&&"scalar"===t.kind?e.value===t.value:"array"!==e.kind||"array"!==t.kind||e.values.length===t.values.length&&e.values.every((e,n)=>e===t.values[n]))}function r9(e,t){if(null===t||"Off"===t)return null;let n=e.widgets.find(e=>e.exportValue===t);if(!n)throw it(`no widget of \'${e.name}\' has the export value \'${t}\'`);return n.onState}function ie(e,t){if(new Set(t).size!==t.length)throw it("the values must not repeat");if("listbox"===e.kind&&!e.multiSelect&&t.length>1)throw it(`\'${e.name}\' takes one value (it has no multiSelect)`);let n=new Set(e.options.map(e=>e.value)),r="combobox"===e.kind&&e.edit&&1===t.length,i=t.find(e=>!n.has(e));if(!r&&void 0!==i)throw it(`\'${i}\' is not an option value of \'${e.name}\'`);return{kind:"choice",values:t}}function it(e){return new N(G.InvalidArg,e,{details:{field:"value"}})}function ir(e,t){let n="checkbox"===e||"radio"===e,r="pushbutton"===e,i=ii(e,t,"caption",r,"a push button\'s");if(r&&null===t.layout)throw new N(G.InvalidArg,"a push button\'s widget always has a layout: \'caption\' shows its caption alone",{details:{field:"layout"}});return ii(e,ii(e,i,"layout",r,"a push button\'s"),"checkStyle",n,"a checkbox\'s or radio button\'s")}function ii(e,t,n,r,i){if(r||void 0===t[n])return t;if(null!==t[n]){let t="unknown"===e?"this widget":`a ${e} field\'s widget`;throw new N(G.InvalidArg,`\'${n}\' applies to ${i} widgets, not to ${t}`,{details:{field:n}})}let{[n]:o,...a}=t;return a}function io(e){if(("combobox"===e.kind||"listbox"===e.kind)&&void 0!==e.defaultValue){let t=Array.isArray(e.defaultValue)?e.defaultValue:[e.defaultValue];r8({...e,options:e.options??[]},t)}switch(e.kind){case"text":case"combobox":return void 0!==e.defaultValue?ib(e.defaultValue):iy();case"listbox":return ip(ih((e.options??[]).map(iP),e.defaultValue??[]));default:return iy()}}function ia(e,t){var n,r,i;let o,a,s,l,u,d={...e.field};if(void 0!==t.name){let e=d.name.lastIndexOf(".");d.name=e<0?t.name:`${d.name.slice(0,e+1)}${t.name}`}for(let e of is)"boolean"==typeof t[e]&&e in d&&(d[e]=t[e]);if(void 0!==t.alternateName&&(d.alternateName=t.alternateName||null),void 0!==t.mappingName&&(d.mappingName=t.mappingName||null),d.assignment=et(t,d),d.groupId=Y(d.assignment),void 0!==t.purpose&&(d.purpose=rj(t.purpose)),void 0!==t.placeholder&&(d.placeholder=eC(t.placeholder)),"text"===d.kind||"combobox"===d.kind){let e=ex(t,d.kind);if(void 0!==e&&!eS(e,d.format)){let t=function(e,t){let{keystroke:n,format:r,...i}=e??{};if(null===t)return Object.keys(i).length>0?i:void 0;let o=eE(t);return{keystroke:eG(o.keystroke),format:eG(o.format),...i}}(d.actions,e);d.format=e,t?d.actions=t:delete d.actions}}if("text"===d.kind&&("maxLength"in t&&void 0!==t.maxLength&&(d.maxLength=t.maxLength),"defaultValue"in t&&void 0!==t.defaultValue)){let e=t.defaultValue;d.defaultValue=e??"",d.defaultValueEntry=null===e?iy():ib(e)}let c=!1;if(("combobox"===d.kind||"listbox"===d.kind)&&("options"in t&&t.options&&(n=d,o=(r=t.options.map(iP)).map(e=>e.value),a="combobox"===n.kind&&n.edit,s=ig("combobox"===n.kind?""===n.value?[]:[n.value]:n.selectedValues,o,a),l=im("listbox"===n.kind?{...n,options:r,topIndex:iF(n.topIndex,r)}:{...n,options:r},s),u="scalar"===(i=n.defaultValueEntry).kind?[i.value]:"array"===i.kind?[...i.values]:[],d="none"===n.defaultValueEntry.kind?l:i_(l,ig(u,o,a),!0),c=!0),"defaultValue"in t&&void 0!==t.defaultValue)){let e=null===t.defaultValue?[]:Array.isArray(t.defaultValue)?t.defaultValue:[t.defaultValue];r8(d,e),d=i_(d,e)}let f={...e,field:d},m=rK(t,d.kind);return void 0!==m?function(e,t){if("pushbutton"!==e.field.kind)return e;let n=new Set(e.field.widgets.map(e=>e.objectNumber)),r=e=>n.has(iD(e.ref)),i=e.widgets.filter(r);t&&rJ(i.map(e=>e.actions),e.field.widgets.length-i.length);let o=e.widgets.map(e=>{if(!r(e))return e;let n=rQ(rZ(e.actions,t)),i=function(e,t){if(null===t)return null;let n={...e},r=!1;for(let e of z){let i=t[e];void 0!==i&&(null===i?(void 0!==n[e]&&(r=!0),delete n[e]):"root"in i||(n[e]=$(i),r=!0))}let i=r?n:e??{};return Object.keys(i).length>0?i:null}(e.actions,n);return i===(e.actions??null)?e:{...e,actions:i}});return{field:{...e.field,takesImage:t},widgets:o}}(f,m):c?il(f.field,f):f}var is=["readOnly","required","noExport","multiline","password","comb","radiosInUnison","noToggleToOff","edit","multiSelect"];function il(e,t){return{field:e,widgets:t.widgets.map(e=>e.hasAppearance?e:{...e,hasAppearance:!0})}}function iu(e,t){let n=e.field;if("checkbox"!==n.kind&&"radio"!==n.kind)return e;let r="checkbox"===n.kind||n.radiosInUnison,i=t>=0?n.widgets[t]:null,o=n.widgets.map((e,n)=>{let o=null!==i&&(r?e.exportValue===i.exportValue&&e.onState===i.onState:n===t);return e.checked===o?e:{...e,checked:o}}),a=ib(i?i.onState:"Off"),s="checkbox"===n.kind?{...n,widgets:o,valueEntry:a,checked:o.some(e=>e.checked)}:{...n,widgets:o,valueEntry:a,value:o.find(e=>e.checked)?.exportValue??"Off"},l=new Map(o.map(e=>[e.objectNumber,e.checked?e.onState:"Off"]));return{field:s,widgets:e.widgets.map(e=>{let t=l.get(iD(e.ref));return void 0===t||e.appearanceState===t?e:{...e,appearanceState:t}})}}function id(e,t){let n=new Set;for(let r of t){let t=e.findIndex(e=>e.value===r);t>=0&&n.add(t)}return[...n].sort((e,t)=>e-t)}var ic=(e,t)=>t.every(t=>e.options.some(e=>e.value===t));function im(e,t){let n=ic(e,t)?id(e.options,t):[],r=t.length>0&&0===n.length,i=e.options.map((e,t)=>{let r=n.includes(t);return e.selected===r?e:{...e,selected:r}}),o=r?[...t]:n.map(t=>e.options[t].value),a=ip(o);return"combobox"===e.kind?{...e,options:i,valueEntry:a,value:o[0]??""}:{...e,options:i,valueEntry:a,selectedValues:o}}function ip(e){return 0===e.length?iy():1===e.length?ib(e[0]):{kind:"array",values:[...e]}}function ih(e,t){return id(e,t).map(t=>e[t].value)}function iF(e,t){return Math.max(0,Math.min(e,t.length-1))}function ig(e,t,n){let r=e.filter(e=>t.includes(e));return 0===r.length&&n&&e.length>0?[...e]:r}function i_(e,t,n=!1){if(0===t.length){let t=n?"listbox"===e.kind&&e.multiSelect?{kind:"array",values:[]}:ib(""):iy();return"combobox"===e.kind?{...e,defaultValueEntry:t,defaultValue:""}:{...e,defaultValueEntry:t,defaultValue:[]}}let r=ic(e,t),i=r?ih(e.options,t):[...t],o=r?ip(i):ib(t[0]);return"combobox"===e.kind?{...e,defaultValueEntry:o,defaultValue:i[0]??""}:{...e,defaultValueEntry:o,defaultValue:i}}var iP=e=>({label:e.label,value:e.value,selected:!1}),iD=e=>"objectNumber"===e.kind?e.objectNumber:0,ib=e=>({kind:"scalar",value:e}),iy=()=>({kind:"none"});function iw(e){return new N(G.Unknown,`\'${e.name}\' could not be reset`)}function iE(e){var t,n;if(null===e)return null;let r=!ArrayBuffer.isView(t=e)&&(n=t,!("u">typeof Blob&&n instanceof Blob)),i=r?e.pdf:e;if(ArrayBuffer.isView(i))return{bytes:i,declaredPdf:r};throw new N(G.InvalidArg,"a signature appearance reaches a write as bytes, never as a Blob")}function iA(e){return"skipped"===e.type}function iv(e){switch(e.type){case"skipped":return!1;case"annotations.import":case"annotations.copy":return e.annotations.length>0;case"forms.import":case"forms.importValues":case"forms.copy":return e.fields.length>0;case"forms.repeat":return e.meta.changedFields.length>0;default:return!0}}function iS(e){return"undoOf"in e}function ik(e,t){return{all:()=>`${e}:${t}:all`,self:()=>`${e}:${t}:self`,createdBy:n=>`${e}:${t}:createdBy=${n}`,group:n=>`${e}:${t}:group=${n}`}}function ix(e,t){return{all:()=>`${e}:${t}:all`,group:n=>`${e}:${t}:group=${n}`}}Object.assign(()=>"doc.render",{thumbnail:()=>"doc.render.thumbnail"}),Object.assign(()=>"doc.download",{flattened:()=>"doc.download.flattened"}),Object.assign(()=>"doc.print",{high:()=>"doc.print.high"}),Object.assign(()=>"doc.sign",{certify:()=>"doc.sign.certify"}),ik("annotations","create"),ik("annotations","update"),ik("annotations","delete"),ix("annotations","set-group"),ik("annotations","*"),ix("fields","fill"),ix("fields","sign"),ix("fields","set-group"),ix("fields","*");var iG={none:0,lta:1,fill:2,annotate:3};function iO(e){return 1===e?"lta":2===e?"fill":"annotate"}function iI(e,t){return iG[e]<=iG[t]?e:t}function iN(e,t){return null===e||iG[e]>=iG[t]}function iC(e,t){return t===e||t.startsWith(`${e}.`)}function ij(e,t){switch(e.action){case"all":return!0;case"include":return e.fields.some(e=>iC(e,t));case"exclude":return!e.fields.some(e=>iC(e,t))}}function iM(e){let t=!1,n=null,r=null,i=[];for(let o of e)o.signed&&(t=!0,o.catalogCertification&&null!==o.docMdp&&null===r&&(r={signatureIndex:o.index,permission:o.docMdp},n=iI(n??"annotate",iO(o.docMdp))),o.fieldMdp&&i.push({signatureIndex:o.index,source:"fieldmdp",spec:o.fieldMdp}),o.lock&&(i.push({signatureIndex:o.index,source:"lock",spec:o.lock}),void 0!==o.lock.permission&&(n=iI(n??"annotate",iO(o.lock.permission)))));return{enforced:n,judged:t?n??"annotate":null,certification:r,fieldLocks:i,policyVersion:6}}function iR(e){let t=new Set;return e&&null!==e.judged&&(t.add("doc.download.flattened"),null===e.enforced||(t.add("doc.pages.modify"),t.add("doc.pages.assemble"),t.add("doc.redact"),t.add("doc.attachments.modify"),t.add("doc.outline.modify"),t.add("doc.forms.modify"),t.add("doc.forms.script"),iN(e.enforced,"annotate")||(t.add("doc.annotate.modify"),t.add("doc.annotate.import")),iN(e.enforced,"fill")||(t.add("doc.forms.fill"),t.add("doc.forms.import"),t.add("doc.metadata.modify"),t.add("doc.sign")))),t}var iT=new Set(["doc.open","doc.render","doc.render.thumbnail","doc.text.select","doc.text.copy","doc.text.search","doc.content.copy","doc.download","doc.download.flattened","doc.print","doc.print.high","doc.pages.modify","doc.pages.assemble","doc.forms.read","doc.forms.fill","doc.forms.modify","doc.forms.import","doc.forms.script","doc.forms.submit","doc.annotate.read","doc.annotate.modify","doc.annotate.import","doc.metadata.modify","doc.attachments.modify","doc.outline.modify","doc.redact","doc.sign","doc.sign.certify"]);function iB(e){if("*"===e)return{kind:"wildcard"};if("pdf.permissions"===e)return{kind:"virtual",name:"pdf.permissions"};if(e.includes(":"))return function(e){let t=e.indexOf(":"),n=e.indexOf(":",t+1);if(-1===t||-1===n)throw new no(e,"collab scope requires entity:action:filter");let r=e.slice(0,t),i=e.slice(t+1,n),o=e.slice(n+1);if("fields"===r){var a=e,s=i,l=o;if("fill"!==s&&"sign"!==s&&"set-group"!==s&&"*"!==s)throw new no(a,`unknown fields action: ${s}`);let t=i$(l,a);if("all"!==t.kind&&"group"!==t.kind)throw new no(a,`fields only support :all or :group= filters (got :${t.kind})`);return{kind:"collab",entity:"fields",action:s,filter:t}}if("annotations"!==r)throw new no(e,`unknown collab entity: ${r}`);if("create"!==i&&"update"!==i&&"delete"!==i&&"set-group"!==i&&"*"!==i)throw new no(e,`unknown collab action: ${i}`);let u=i$(o,e);if("set-group"===i&&("self"===u.kind||"createdBy"===u.kind))throw new no(e,`set-group only supports :all or :group= filters (got :${u.kind})`);return{kind:"collab",entity:r,action:i,filter:u}}(e);let t=function(e){if(e.includes(":"))return null;let t=e.indexOf(".");if(t<=0)return null;let n=e.slice(0,t);return iL.has(n)?null:n}(e);return null!==t?function(e,t){if(!iU.test(e))throw new no(e,"invalid plugin permission shape (expected .)");return{kind:"plugin",name:e,plugin:t}}(e,t):function(e){if(!iz.test(e))throw new no(e,"invalid capability name shape");if(!iT.has(e))throw new no(e,`unknown capability: ${e}`);return{kind:"capability",name:e}}(e)}var iL=new Set(["doc","docs","pdf","annotations","fields","tokens","grants","shares","tenants","layer","visitor","document","submission","signature"]);function i$(e,t){if("all"===e)return{kind:"all"};if("self"===e)return{kind:"self"};if(e.startsWith("createdBy=")){let n=e.slice(10);if(!n)throw new no(t,"createdBy= requires a value");return{kind:"createdBy",userId:n}}if(e.startsWith("group=")){let n=e.slice(6);if(!n)throw new no(t,"group= requires a value");return{kind:"group",groupId:n}}throw new no(t,`unknown filter: ${e}`)}var iz=/^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$/,iU=/^[a-z][a-z0-9]*(-[a-z0-9]+)*(\\.[a-z][a-z0-9]*(-[a-z0-9]+)*)+$/;function iV(e){return{...e.userId?{userId:e.userId}:{},...e.groupId?{groupId:e.groupId}:{}}}function iW(e,t,n,r=null){if(iR(r).has(e))return!1;let i=t.map(iB);return!!i.some(e=>"wildcard"===e.kind)||iH(i,n,r).has(e)}function iq(e,t,n,r,i){let o=n.map(iB);if(o.some(e=>"wildcard"===e.kind))return!0;let a=o.filter(t=>"collab"===t.kind&&"annotations"===t.entity&&(t.action===e||"*"===t.action));return a.length>0?a.some(e=>(function(e,t,n){switch(e.kind){case"all":return!0;case"self":return!!n.userId&&t.userId===n.userId;case"createdBy":return t.userId===e.userId;case"group":return t.groupId===e.groupId}})(e.filter,t,r)):iH(o,i).has("doc.annotate.modify")}function iH(e,t,n=null){let r=new Set,i=!1,o=!1;for(let n of e)"capability"===n.kind?r.add(n.name):"virtual"===n.kind&&"pdf.permissions"===n.name?function(e,t){let n;for(let r of((n=new Set).add("doc.open"),n.add("doc.render"),n.add("doc.annotate.read"),n.add("doc.forms.read"),n.add("doc.text.search"),n.add("doc.text.select"),t.copy&&(n.add("doc.text.copy"),n.add("doc.content.copy")),t.print&&n.add("doc.print"),t.printHighQuality&&t.print&&n.add("doc.print.high"),t.modifyContents&&(n.add("doc.pages.modify"),n.add("doc.redact"),n.add("doc.metadata.modify"),n.add("doc.attachments.modify")),(t.modifyContents||t.assemble)&&(n.add("doc.pages.assemble"),n.add("doc.outline.modify")),t.modifyAnnotations&&n.add("doc.annotate.modify"),(t.modifyContents||t.modifyAnnotations||t.fillForms)&&(n.add("doc.forms.fill"),n.add("doc.sign")),t.modifyAnnotations&&t.modifyContents&&n.add("doc.forms.modify"),[...n]))e.add(r)}(r,t):"collab"===n.kind&&"annotations"===n.entity?i=!0:"collab"===n.kind&&"fields"===n.entity&&(o=!0);for(let e of(r.has("doc.render")&&r.add("doc.render.thumbnail"),r.has("doc.annotate.modify")&&r.add("doc.annotate.read"),r.has("doc.forms.modify")&&(r.add("doc.forms.fill"),r.add("doc.forms.read")),r.has("doc.forms.fill")&&r.add("doc.forms.read"),i&&r.add("doc.annotate.read"),o&&r.add("doc.forms.read"),iR(n)))r.delete(e);return r}function iK(e,t,n,r){if(t===n)return!0;let i=r.map(iB);if(i.some(e=>"wildcard"===e.kind))return!0;for(let n of i)if("collab"===n.kind&&n.entity===e&&("set-group"===n.action||"*"===n.action)&&("all"===n.filter.kind||"group"===n.filter.kind&&n.filter.groupId===t))return!0;return!1}function iZ(e,t,n,r=null){let i="fill"===e?"doc.forms.fill":"doc.sign";if(iR(r).has(i))return!1;let o=t.map(iB);return!!(o.some(e=>"wildcard"===e.kind)||o.some(t=>"collab"===t.kind&&"fields"===t.entity&&(t.action===e||"*"===t.action)))||iH(o,n,r).has(i)}var iJ={left:0,bottom:0,right:612,top:792},iQ={left:0,right:0,bottom:0,top:0};function iX(){let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,i0(e)}function iY(e=Date.now()){let t=globalThis.crypto.getRandomValues(new Uint8Array(16)),n=Math.max(0,Math.floor(e));for(let e=5;e>=0;e--)t[e]=n%256,n=Math.floor(n/256);return t[6]=15&t[6]|112,t[8]=63&t[8]|128,i0(t)}function i0(e){let t=Array.from(e,e=>e.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function i1(e){let t,n=(t=new Map(e.pages.map(e=>[e.ref.objectNumber,e.boxes.crop])),e=>{let n=t.get(e.objectNumber);if(!n)throw new N(G.InvalidArg,`No page ${e.objectNumber} in this document`);return n});return{...e,pages:e.pages.map(e=>(function(e,t){var n;let r,{actions:i,viewports:o,...a}=e;return{...a,boxes:(r=(n=e.boxes).crop,{media:nE(n.media,r),crop:nE(n.crop,r),bleed:nE(n.bleed,r),trim:nE(n.trim,r),art:nE(n.art,r)}),...i?{actions:nJ(i,e=>nW(e,t))}:{},...o?{viewports:n0(o,e.boxes.crop)}:{}}})(e,n))}}function i3(e,t){return e.map(e=>({...e,rect:nE(e.rect,t)}))}function i2(e,t){let{actions:n,...r}=e,i=t(e.page);return{...r,...e.rect?{rect:nA(e.rect,i)}:{},...e.box?{box:nA(e.box,i)}:{},...n?{actions:nZ(n,e=>nq(e,t))}:{}}}function i6(e,t){return e.widgets?{...e,widgets:e.widgets.map(e=>i2(e,t))}:e}function i5(e,t){var n,r;return e.actions?{...e,actions:(n=e.actions,r=t,nJ(n,e=>nW(e,r)))}:e}function i4(e,t){return n6(e,t(e.page),t)}function i8(e,t){return{...e,fields:e.fields.map(e=>i5(e,t)),widgets:e.widgets.map(e=>i4(e,t))}}function i7(e,t){let{target:n,...r}=e;return void 0===n?r:{...r,target:n&&"goto"===n.kind?{...n,destination:t(n.destination)}:n}}function i9(e,t){var n;return n=e=>nW(e,t),{...e,target:e.target&&nH(e.target,n),action:e.action&&nK(e.action,n)}}function oe(e,t){return i7(e,e=>nq(e,t))}function ot(e){let{box:t,rect:n,rotation:r,...i}=e;if(void 0!==r&&![0,90,180,270].includes(r))throw new N(G.InvalidArg,`a widget turns by a quarter turn (0, 90, 180 or 270), not ${r}`,{details:{field:"rotation"}});let o=t?eJ(eH(t),r??0):n;if(!o)throw new N(G.InvalidArg,"a widget\'s placement needs its `rect` or its `box`",{details:{field:"rect"}});return{...i,rect:o,...void 0!==r?{rotation:r}:{},...t7(i.borderStyle,i.dashArray)?{dashArray:[...t8]}:{}}}var on=["certificates","ocspResponses","crls"];function or(e,t,n){let r=t;if(r>=n)return null;let i=e[r++];if((31&i)==31)for(;;){if(r>=n)return null;if((128&e[r++])==0)break}if(r>=n)return null;let o=e[r++],a=o;if(128&o){let t=127&o;if(0===t||t>4||r+t>n)return null;a=0;for(let n=0;nn?null:{constructed:(32&i)!=0,contents:r,end:s}}function oi(e){let t=new oo(e),n=t.value();if(t.skipSpaces(),!t.atEnd())throw Error(`trailing input at ${t.pos}: ${e.slice(t.pos,t.pos+20)}`);return n}var oo=class{constructor(e){this.text=e,I(this,"pos",0)}atEnd(){return this.pos>=this.text.length}skipSpaces(){for(;this.pos>",this.pos))return this.pos+=2,e;if("/"!==this.text[this.pos])throw Error(`expected a key at ${this.pos}`);let t=this.name();this.skipSpaces(),e[t]=this.value()}}stream(){let e=/^stream\\((\\d+),([0-9a-fA-F]*)\\)/.exec(this.text.slice(this.pos));if(!e)throw Error(`malformed stream signature at ${this.pos}`);this.pos+=e[0].length;let t=this.dictEntries();return{t:"stream",length:Number(e[1]),sha256:e[2].toLowerCase(),dict:t}}array(){this.expect("[");let e=[];for(;;){if(this.skipSpaces(),"]"===this.text[this.pos])return this.pos++,{t:"array",items:e};e.push(this.value())}}name(){this.expect("/");let e="";for(;this.pos"===t||"("===t||")"===t)break;if("#"===t&&/^[0-9A-Fa-f]{2}/.test(this.text.slice(this.pos+1,this.pos+3))){e+=String.fromCharCode(parseInt(this.text.slice(this.pos+1,this.pos+3),16)),this.pos+=3;continue}e+=t,this.pos++}return e}literalString(){this.expect("(");let e=1,t="";for(;this.pos",this.pos);if(e<0)throw Error("unterminated hex string");let t=this.text.slice(this.pos,e).replace(/\\s+/g,"");this.pos=e+1;let n="";for(let e=0;e`/${t} ${os(e.entries[t])}`).join("")}>>`;case"stream":return`stream(${e.length},${e.sha256})${os({t:"dict",entries:e.dict})}`;case"array":return`[${e.items.map(os).join(" ")}]`;case"ref":return`${e.num} 0 R`;case"name":return`/${function(e){let t="";for(let n of e){let e=n.charCodeAt(0);e<33||e>126||"#/[]<>(){}%".includes(n)?t+=`#${e.toString(16).toUpperCase().padStart(2,"0")}`:t+=n}return t}(e.v)}`;case"string":return`(${e.v.replace(/[\\\\()]/g,e=>`\\\\${e}`)})`;case"number":return String(e.v);case"bool":return e.v?"true":"false";case"null":return"null"}}function ol(e){return e?"dict"===e.t?e.entries:"stream"===e.t?e.dict:null:null}function ou(e,t){let n=ol(e)??{},r=ol(t)??{},i=new Set;for(let e of new Set([...Object.keys(n),...Object.keys(r)]))oa(n[e]??null,r[e]??null)||i.add(e);return i}function od(e){return e?"ref"===e.t?[e.num]:"array"===e.t?e.items.flatMap(od):[]:[]}function oc(e,t){return e.some(e=>"forbidden"===e.verdict)?"forbidden":e.some(e=>"incomplete"===e.verdict)?"indeterminate":t?"permitted":"unchanged"}function of(e){return e.find(e=>"forbidden"===e.verdict)??e.find(e=>"incomplete"===e.verdict)??e.find(e=>"permitted"===e.verdict)}var om=["old","new"],op=new Set(["Size","Prev","XRefStm","Info","ID","Root","Type","W","Index","Filter","DecodeParms","Length","Encrypt"]),oh=new Set(["Metadata","Extensions","Version","DSS","AcroForm","Perms"]),oF=new Set(["DR","DA","Q","SigFlags","NeedAppearances","Fields"]),og={annotate:new Set(["V","AS","AP","I","DA","Ff","RV","MK","Q","TU","F","Rect","BS","Opt","DV","MaxLen"]),fill:new Set(["V","AS","AP","I","RV","DA","Ff"])},o_={annotate:new Set(["AS","AP","DA","MK","Q","TU","F","Rect","BS"]),fill:new Set(["AS","AP","DA"])},oP={annotate:new Set(["V","AP","AS","Ff","TU","Lock"]),fill:new Set(["V","AP","AS","Ff"])},oD=new Set(["AP","AS"]);function ob(e){return"annotate"===e?oP.annotate:oP.fill}var oy=new Set(["identical-rewrite","orphan","xref-container","trailer"]);function ow(e){let t,n=e.changes.map(e=>{if(e.value.truncated||"xref"===e.kind||"objstm"===e.kind)return e;let t=e.present.old&&(null===e.value.old||e.read?.old==="failed"),n=e.present.new&&(null===e.value.new||e.read?.new==="failed");return t||n?{...e,value:{...e.value,truncated:!0}}:e}),{level:r,locks:i}=e.restrictions??{level:(t=iM(e.before.signatures)).judged??"annotate",locks:t.fieldLocks},o=e.levelOverride??r,a=new oS({...e,changes:n},o,i);(function(e){let t=e.input.health;if(!t)return;let n=t.old;if(n.sparseXref||n.bareReferences>0){let t=[n.sparseXref?"its cross-reference table has no entry for some object numbers below /Size":null,n.bareReferences>0?`${n.bareReferences} reachable indirect object(s) consist of a bare reference`:null].filter(e=>null!==e).join("; ");e.findings.push({rule:"base-unverifiable",verdict:"incomplete",objectNumber:0,detail:`the signed revision cannot be verified against later changes by Acrobat (${t}); no verdict is given rather than one Acrobat would contradict`})}for(let n of om)t[n].referrersComplete||e.findings.push({rule:"unexplained",verdict:"incomplete",objectNumber:0,detail:`the ${"old"===n?"older":"newer"} revision\'s reachability walk hit its budget; not every use of a changed object is known`})})(a),function(e){for(let t of e.changes)("xref"===t.kind||"objstm"===t.kind)&&(e.claimAll(t,"xref-container"),e.permitted(t,"xref-container","cross-reference container; members are judged on their own"))}(a),function(e){for(let t of e.changes)e.isIdentical(t)&&(e.allows("fill")?(e.claimAll(t,"identical-rewrite"),e.permitted(t,"identical-rewrite","written again with the sealed value")):(e.claimAll(t,"identical-rewrite",!1),e.forbidden(t,"identical-rewrite",`written again with the sealed value under level \'${e.level}\' (not established for this level)`)))}(a),a.allows("fill")?(function(e){if(0===e.locks.length)return;let t=e.input.before.fields.filter(t=>e.locks.some(e=>ij(e.spec,t.name))),n=new Set;for(let e of t)for(let t of(n.add(e.objectNumber),e.widgets))n.add(t);let r=new Set(n),i=!0;for(;i;)for(let t of(i=!1,e.changes))!r.has(t.objectNumber)&&t.usage.old.length>0&&t.usage.old.every(e=>r.has(e.parent))&&(r.add(t.objectNumber),i=!0);for(let n of e.changes){if(!r.has(n.objectNumber)||e.isIdentical(n))continue;let i=t.find(e=>e.objectNumber===n.objectNumber||e.widgets.includes(n.objectNumber));if(i&&i.objectNumber===n.objectNumber){let t=ou(n.value.old,n.value.new);if(1===t.size&&t.has("Ff")&&oj(n,e.before.fieldByObj.get(n.objectNumber)?.flags)){e.claimStable(n,"field-lock"),e.permitted(n,"field-lock",`ReadOnly set on locked field "${i.name}"`);continue}}e.locked.add(n.objectNumber),e.forbidden(n,"field-lock",i?`field "${i.name}" is locked by the signature`:"part of a locked field changed")}}(a),ok(a),function(e){for(let t of e.changes)!e.isIdentical(t)&&0!==t.objectNumber&&ox(t,e=>0===e.parent&&"Info"===e.label)&&(e.claimAll(t,"info"),e.permitted(t,"info","document information dictionary"))}(a),function(e){let t=new Set([e.input.before.root,e.input.after.root]);for(let n of e.changes)!e.isIdentical(n)&&ox(n,e=>t.has(e.parent)&&"Metadata"===e.label)&&(e.claimAll(n,"metadata"),e.permitted(n,"metadata","XMP metadata stream"))}(a),function(e){let t=e.input.after.root,n=e.byNum.get(t);if(!n||e.isIdentical(n))return;let r=ou(n.value.old,n.value.new),i=[...r].filter(e=>!oh.has(e));if(i.length>0)return e.forbidden(n,"catalog-housekeeping",`catalog keys changed: ${i.join(", ")}`);if(r.has("AcroForm")&&!e.input.after.acroForm&&!e.input.before.acroForm){let r=oG(e,ol(n.value.old)?.AcroForm??null,ol(n.value.new)?.AcroForm??null);if(r)return e.forbidden(n,"acroform-housekeeping",r);for(let n of om)e.claimSubtree(n,new Set([t]),e=>e.startsWith("AcroForm/DR/"),"acroform-housekeeping")}if(r.has("Perms")){let t=iM(e.input.after.signatures),r=iM(e.input.before.signatures);if(!t.certification||null!==r.judged)return e.forbidden(n,"catalog-housekeeping","/Perms may only appear with the certification signature, in the first signed revision")}e.claimAll(n,"catalog-housekeeping"),e.permitted(n,"catalog-housekeeping")}(a),function(e){let t=e.input.after.acroForm||e.input.before.acroForm;if(!t)return;let n=e.byNum.get(t);if(!n||e.isIdentical(n))return;let r=oG(e,n.value.old,n.value.new);if(r)return e.forbidden(n,"acroform-housekeeping",r);for(let r of(e.claimAll(n,"acroform-housekeeping"),e.permitted(n,"acroform-housekeeping"),om))e.claimSubtree(r,new Set([t]),e=>e.startsWith("DR/"),"acroform-housekeeping")}(a),function(e){let t=new Set([e.input.before.root,e.input.after.root]);for(let n of om)e.claimSubtree(n,t,e=>"DSS"===e||e.startsWith("DSS/"),"dss");for(let n of e.changes)n.usage.new.some(e=>t.has(e.parent)&&"DSS"===e.label)&&!e.findings.some(e=>e.objectNumber===n.objectNumber)&&e.permitted(n,"dss","document security store")}(a),function(e){let t=oC(e);if(0===t.size)return;let n="signature-field-added";if(!e.allows("fill")){for(let r of t){let t=e.byNum.get(r);t&&e.forbidden(t,n,`a signature field was added under level \'${e.level}\'`)}return}let r=new Set;for(let i of t){let t=e.after.fieldByObj.get(i),o=e.byNum.get(i);for(let a of(o&&(e.claimAll(o,n),e.permitted(o,n,`new signature field "${t.name}"`)),t.widgets)){if(r.add(a),a===i)continue;let o=e.byNum.get(a);o&&(e.claimAll(o,n),e.permitted(o,n,`widget of new signature field "${t.name}"`))}}let i=oO(e);for(let t of e.after.pages){let o=e.byNum.get(t);if(!o||e.isIdentical(o))continue;let a=ou(o.value.old,o.value.new);if(1!==a.size||!a.has("Annots"))continue;let s=oI(e,i,o,"old"),l=oI(e,i,o,"new");if(!s||!l)continue;let u=oN(s.refs,l.refs);if(!u||!u.every(e=>r.has(e))||s.object!==l.object&&0===u.length)continue;e.claimAll(o,n),e.permitted(o,n,"page /Annots gained the new signature widget");let d=0!==s.object&&0!==l.object;for(let t of new Set([s.holder,l.holder]))t&&(e.claimAll(t,n),e.permitted(t,n,d?"page /Annots moved to another list object, with the new signature widget":"page /Annots moved into an object of its own, with the new signature widget"))}for(let t of i.keys()){let i=e.byNum.get(t);if("modified"!==i.change||e.isIdentical(i))continue;let o=oN(od(i.value.old),od(i.value.new));o&&o.length>0&&o.every(e=>r.has(e))&&(e.claimAll(i,n),e.permitted(i,n,"page /Annots, an object of its own, gained the new signature widget"))}for(let i of e.changes){if("dictionary"!==i.kind||e.isIdentical(i))continue;let o=ou(i.value.old,i.value.new);if(1!==o.size||!o.has("Kids"))continue;let a=function(e,t){let n=ol(e.value.old)?.[t],r=ol(e.value.new)?.[t],i=od(n),o=od(r);if(n&&"array"!==n.t||!r||"array"!==r.t||i.length>o.length)return null;for(let e=0;e0&&a.every(e=>t.has(e)||r.has(e))&&(e.claimAll(i,n),e.permitted(i,n,"field /Kids gained the new signature field"))}}(a),function(e){let t="signature-added",n=e.newlySigned();if(0===n.length)return;let r=oC(e),i=iM(e.input.before.signatures),o=iM(e.input.after.signatures),a=new Set,s=new Set;for(let{fieldObjectNumber:o,sig:l}of n){let n="timestamp"===l.kind?"lta":"fill";if(!e.allows(n)){let n=e.byNum.get(o);n&&e.forbidden(n,t,`a ${l.kind} was added under level \'${e.level}\'`);continue}if(l.catalogCertification&&null!==i.judged){let n=e.byNum.get(o);n&&e.forbidden(n,t,"a certification signature after another signature");continue}let u=e.after.fieldByObj.get(o);for(let e of(a.add(o),u?.widgets??[]))a.add(e);let d=r.has(o),c=null===i.judged?new Set([...ob(e.level),"Lock"]):ob(e.level),f=e.byNum.get(o);if(f&&d)e.permitted(f,t,`new field "${l.fieldName}" signed`);else if(f&&!e.isIdentical(f)){let n=ou(f.value.old,f.value.new),r=[...n].filter(e=>!c.has(e));r.length>0?(e.forbidden(f,t,`signature field keys changed: ${r.join(", ")}`),e.claimStable(f,t,!1)):n.has("Ff")&&!oj(f,e.before.fieldByObj.get(o)?.flags)?(e.forbidden(f,t,"signature field flags changed beyond ReadOnly"),e.claimStable(f,t,!1)):(e.claimStable(f,t),e.permitted(f,t,`field "${l.fieldName}" signed`))}for(let n of u?.widgets??[]){if(n===o||d)continue;let r=e.byNum.get(n);if(!r||e.isIdentical(r))continue;let i=[...ou(r.value.old,r.value.new)].filter(e=>!oD.has(e));if(i.length>0){e.forbidden(r,t,`signature widget keys changed: ${i.join(", ")}`),e.claimStable(r,t,!1);continue}e.claimStable(r,t),e.permitted(r,t,"signature widget appearance")}for(let n of e.changes){if("added"!==n.change)continue;let r=n.usage.new.filter(e=>e.parent===o&&"V"===e.label),i=n.usage.new.filter(e=>e.parent===o&&"Lock"===e.label),a=ol(n.value.new)?.Type;if(r.length>0){if((a?.t!=="name"||"Sig"!==a.v&&"DocTimeStamp"!==a.v)&&void 0!==a)continue;for(let r of n.usage.new)(r.parent===o&&"V"===r.label||"DocMDP"===r.label)&&e.claimEdge(n,"new",r,t);e.permitted(n,t,"signature value"),s.add(n.objectNumber)}else if(i.length>0){if(void 0!==a&&("name"!==a.t||"SigFieldLock"!==a.v))continue;for(let r of i)e.claimEdge(n,"new",r,t);e.permitted(n,t,"field lock installed with the signature")}}}if(o.certification&&null===i.judged){let n=e.input.after.root;for(let r of e.changes)"added"===r.change&&ox(r,e=>e.parent===n&&"Perms"===e.label)&&(e.claimAll(r,t),e.permitted(r,t,"certification permissions"))}for(let n of om)e.claimSubtree(n,a,e=>"AP"===e||e.startsWith("AP/"),t);s.size>0&&e.claimSubtree("new",s,()=>!0,t)}(a),function(e){let t="signature-appearance",n=e=>"AP"===e||e.startsWith("AP/"),r=new Set;for(let[n,i]of e.before.fieldByObj){let o=e.after.fieldByObj.get(n);if("signature"!==i.kind||o?.kind!=="signature"||e.before.signedFields.has(n)||e.after.signedFields.has(n))continue;let a=new Set([n,...i.widgets]);if(o.widgets.length!==i.widgets.length||o.widgets.some(e=>!a.has(e)))continue;let s=[...a].map(t=>e.byNum.get(t)).filter(t=>void 0!==t&&!e.isIdentical(t));if(0===s.length||s.some(t=>e.locked.has(t.objectNumber)))continue;let l=e=>[...ou(e.value.old,e.value.new)].filter(e=>"AP"!==e);if(s.some(e=>l(e).length>0)){for(let n of s){let r=l(n);0!==r.length&&(e.forbidden(n,t,`signature field "${i.name}", not signed, keys changed: ${r.join(", ")}`),e.claimStable(n,t,!1))}continue}for(let n of s)e.claimStable(n,t),e.permitted(n,t,`new appearance on signature field "${i.name}", not signed`);for(let e of a)r.add(e)}0!==r.size&&(e.claimSubtree("new",r,n,t,e=>"added"===e.change),e.claimSubtree("old",r,n,t,e=>"freed"===e.change))}(a),function(e){let t="form-fill",n="annotate"===e.level?og.annotate:og.fill,r="annotate"===e.level?o_.annotate:o_.fill,i=new Set,o=new Set;for(let[a,s]of new Map([...e.before.fieldByObj,...e.after.fieldByObj])){if("signature"===s.kind)continue;let l="pushbutton"===s.kind,u=e=>l&&function(e){let t=ol(e.value.old)?.MK??null,n=ol(e.value.new)?.MK??null;if(t&&"dict"!==t.t||n&&"dict"!==n.t)return!1;let r=ou(t,n);return r.size>0&&[...r].every(e=>"I"===e)}(e),d=e.byNum.get(a),c=s.widgets.filter(e=>e!==a).map(t=>e.byNum.get(t)).filter(Boolean),f=new Set([a,...s.widgets]),m=d||0!==c.length?[]:e.changes.filter(e=>om.some(t=>e.usage[t].some(e=>f.has(e.parent)&&oR(e.label)))&&om.every(t=>e.usage[t].every(e=>!oR(e.label)||f.has(e.parent))));if(!d&&0===c.length&&0===m.length)continue;if(!e.allows("fill")){for(let n of[d,...c,...m])n&&!e.isIdentical(n)&&e.forbidden(n,t,`form fill under level \'${e.level}\'`);continue}if(m.length>0){for(let n of m)e.permitted(n,t,`appearance of field "${s.name}" regenerated`);for(let e of(i.add(a),s.widgets))i.add(e);continue}let p=!0;if(d&&!e.isIdentical(d)){let r=ou(d.value.old,d.value.new),i=r.has("MK")&&u(d),o=[...r].filter(e=>!n.has(e)&&!("MK"===e&&i));if(o.length>0)e.forbidden(d,t,`field "${s.name}" keys changed: ${o.join(", ")}`),e.claimStable(d,t,!1),p=!1;else if(r.has("Ff")&&!oj(d,e.before.fieldByObj.get(a)?.flags))e.forbidden(d,t,`field "${s.name}" flags changed beyond adding ReadOnly`),e.claimStable(d,t,!1),p=!1;else{e.claimStable(d,t);let n=[...r].filter(e=>"V"!==e&&"AP"!==e&&"AS"!==e&&"I"!==e&&"RV"!==e&&!("MK"===e&&i));e.permitted(d,t,n.length>0?`field "${s.name}" ${r.has("V")||r.has("AS")?"filled, ":""}properties changed: ${n.join(", ")}`:i?`push button "${s.name}" image changed`:`field "${s.name}" filled`)}}for(let n of c){if(e.isIdentical(n))continue;let i=ou(n.value.old,n.value.new),o=i.has("MK")&&u(n),a=[...i].filter(e=>!r.has(e)&&!("MK"===e&&o));if(a.length>0){e.forbidden(n,t,`widget of "${s.name}" keys changed: ${a.join(", ")}`),e.claimStable(n,t,!1),p=!1;continue}e.claimStable(n,t),e.permitted(n,t,`widget of "${s.name}" ${o?"image":"appearance"}`)}if(p){for(let e of(i.add(a),s.widgets))i.add(e);if(l)for(let e of(o.add(a),s.widgets))o.add(e)}}for(let n of om)e.claimSubtree(n,i,(e,t)=>oR(e)||o.has(t)&&oM(e),t)}(a),function(e){let t="annotation",n=new Set([...e.before.pages,...e.after.pages]),r=new Set([...e.before.widgetToField.keys(),...e.after.widgetToField.keys()]),i=e=>{if(r.has(e.objectNumber))return!0;let t=ol(e.value.new??e.value.old)?.Subtype;return t?.t==="name"&&"Widget"===t.v},o=oO(e),a=[];for(let t of e.changes)"dictionary"!==t.kind||e.isIdentical(t)||[...t.usage.old,...t.usage.new].some(e=>n.has(e.parent)&&e.label.startsWith("Annots/")||o.has(e.parent)&&/^\\[\\d+\\]$/.test(e.label))&&!i(t)&&a.push(t);if(a.length,!e.allows("annotate")){for(let n of a)e.forbidden(n,t,`annotation change under level \'${e.level}\'`);return}let s=new Set;for(let n of a)e.claimAll(n,t),e.permitted(n,t,`${n.change} annotation`),s.add(n.objectNumber);for(let i of n){let n=e.byNum.get(i);if(!n||e.isIdentical(n)||e.findings.some(e=>e.objectNumber===i&&"signature-field-added"===e.rule&&"permitted"===e.verdict))continue;let a=ou(n.value.old,n.value.new);if(1===a.size&&a.has("Annots")){let i=oI(e,o,n,"old"),a=oI(e,o,n,"new"),s=[i?.holder,a?.holder].filter(e=>null!=e);if(!i||!a){for(let r of(e.claimAll(n,t,!1),s))e.claimAll(r,t,!1);e.forbidden(n,t,"page /Annots points at a list object this revision did not write, and that list could not be read: what it held cannot be compared");continue}if("widget"===oT(e,r,i.refs,a.refs)){e.forbidden(n,t,"page /Annots added or removed a form widget");continue}for(let r of(e.claimAll(n,t),e.permitted(n,t,"page /Annots changed"),s))e.claimAll(r,t),e.permitted(r,t,"page /Annots, an object of its own, changed")}}for(let n of o.keys()){let i=e.byNum.get(n);if(!("modified"!==i.change||e.isIdentical(i))&&!e.findings.some(e=>e.objectNumber===n&&"permitted"===e.verdict)){if("widget"===oT(e,r,od(i.value.old),od(i.value.new))){e.forbidden(i,t,"page /Annots added or removed a form widget");continue}e.claimAll(i,t),e.permitted(i,t,"page /Annots, an object of its own, changed")}}for(let n of om)e.claimSubtree(n,s,e=>"AP"===e||e.startsWith("AP/")||"Popup"===e||"IRT"===e,t)}(a)):(ok(a),function(e){let t="no-changes-certification";for(let n of e.changes)0!==n.objectNumber&&"xref"!==n.kind&&"objstm"!==n.kind&&(e.isIdentical(n)||(e.claimAll(n,t,!1),e.forbidden(n,t,`${n.change} after a certification that allows no changes: Acrobat reports the certification as altered (ISO 32000-2 allows validation data and document timestamps here, Acrobat does not)`)))}(a)),function(e){for(let t of e.changes){if(t.value.truncated){e.findings.push({rule:"unexplained",verdict:"incomplete",objectNumber:t.objectNumber,detail:"value too large to inspect"});continue}if(t.usageIncomplete){e.findings.push({rule:"unexplained",verdict:"incomplete",objectNumber:t.objectNumber,detail:"references could not be resolved within budget (depth, fan-out or total reads)"});continue}if(!e.locked.has(t.objectNumber)){for(let n of om)for(let r of t.usage[n])e.isClaimed(t,n,r)||e.forbidden(t,"unexplained",`${"old"===n?"was":"is"} referenced from object ${r.parent} at ${r.label} and no rule explains it`,r);0!==t.usage.old.length||0!==t.usage.new.length||e.findings.some(e=>e.objectNumber===t.objectNumber)||e.permitted(t,"orphan","referenced from nowhere reachable")}}}(a);let s=oc(a.findings,a.findings.some(e=>"permitted"===e.verdict&&!oy.has(e.rule)));return{older:e.older,newer:e.newer,levelInForce:o,locks:i,verdict:s,findings:a.findings,changes:n}}function oE(e){return"modified"===e.change&&!e.value.truncated&&e.read?.old!=="failed"&&e.read?.new!=="failed"&&null!==e.raw.old&&null!==e.raw.new&&e.raw.old===e.raw.new&&!e.streamDataChanged}function oA(e){let t=new Map,n=new Map,r=new Set;for(let i of e.fields)for(let e of(t.set(i.objectNumber,i),"signature"===i.kind&&r.add(i.objectNumber),i.widgets))n.set(e,i.objectNumber);let i=new Set;for(let t of e.signatures)t.signed&&"objectNumber"===t.field.kind&&i.add(t.field.objectNumber);return{fieldByObj:t,widgetToField:n,pages:new Set(e.pages),signedFields:i,sigFields:r}}function ov(e){return`${e.parent}:${e.label}`}var oS=class{constructor(e,t,n){for(let r of(this.input=e,this.level=t,this.locks=n,I(this,"findings",[]),I(this,"byNum",new Map),I(this,"unwritten",new Map),I(this,"before",void 0),I(this,"after",void 0),I(this,"claims",new Map),I(this,"locked",new Set),e.changes))this.byNum.set(r.objectNumber,r);for(let t of e.unwritten??[])this.byNum.has(t.objectNumber)||this.unwritten.set(t.objectNumber,t);this.before=oA(e.before),this.after=oA(e.after)}get changes(){return this.input.changes}allows(e){return iN(this.level,e)}claimEdge(e,t,n,r,i=!0){if(this.locked.has(e.objectNumber))return;let o=`${e.objectNumber}:${t}:${ov(n)}`;this.claims.has(o)||this.claims.set(o,{rule:r,allow:i})}claimAll(e,t,n=!0){for(let r of om)for(let i of e.usage[r])this.claimEdge(e,r,i,t,n)}claimStable(e,t,n=!0){let r=new Set(e.usage.old.map(ov)),i=new Set(e.usage.new.map(ov));for(let r of e.usage.old)i.has(ov(r))&&this.claimEdge(e,"old",r,t,n);for(let i of e.usage.new)r.has(ov(i))&&this.claimEdge(e,"new",i,t,n)}isClaimed(e,t,n){return this.claims.has(`${e.objectNumber}:${t}:${ov(n)}`)}isAllowed(e,t,n){return this.claims.get(`${e.objectNumber}:${t}:${ov(n)}`)?.allow===!0}permitted(e,t,n){this.locked.has(e.objectNumber)||this.findings.push({rule:t,verdict:"permitted",objectNumber:e.objectNumber,detail:n})}forbidden(e,t,n,r){this.findings.push({rule:t,verdict:e.value.truncated?"incomplete":"forbidden",objectNumber:e.objectNumber,edge:r?ov(r):void 0,detail:e.value.truncated?`${n} (judged on missing evidence: not proven)`:n})}claimSubtree(e,t,n,r,i=()=>!0){let o=new Set,a=!0;for(;a;)for(let s of(a=!1,this.changes)){if(t.has(s.objectNumber)||o.has(s.objectNumber)||this.locked.has(s.objectNumber)||!i(s))continue;let l=s.usage[e];if(0===l.length)continue;let u=l.filter(e=>t.has(e.parent)&&n(e.label,e.parent)||o.has(e.parent));if(0!==u.length){for(let t of u)this.claimEdge(s,e,t,r);l.every(t=>u.includes(t)||this.isAllowed(s,e,t))&&(o.add(s.objectNumber),a=!0)}}}isIdentical(e){return oE(e)}newlySigned(){let e=[];for(let t of this.input.after.signatures)t.signed&&"objectNumber"===t.field.kind&&(this.before.signedFields.has(t.field.objectNumber)||e.push({fieldObjectNumber:t.field.objectNumber,sig:t}));return e}};function ok(e){let t=e.byNum.get(0);if(!t)return;let n=ou(t.value.old,t.value.new),r=[...n].filter(e=>!op.has(e)),i=ol(t.value.old)?.Root,o=ol(t.value.new)?.Root;r.length>0?e.forbidden(t,"trailer",`trailer keys changed: ${r.join(", ")}`):n.has("Root")&&!oa(i??null,o??null)?e.forbidden(t,"trailer","the trailer points at a different catalog"):n.has("Encrypt")&&!oa(ol(t.value.old)?.Encrypt??null,ol(t.value.new)?.Encrypt??null)?e.forbidden(t,"trailer","the trailer points at a different encryption dictionary"):(e.claimAll(t,"trailer"),e.permitted(t,"trailer"))}function ox(e,t){let n=[...e.usage.old,...e.usage.new];return n.length>0&&n.every(t)}function oG(e,t,n){let r=ou(t,n),i=[...r].filter(e=>!oF.has(e));if(i.length>0)return`AcroForm keys changed: ${i.join(", ")}`;if(r.has("Fields")){let r=od(ol(t)?.Fields),i=od(ol(n)?.Fields);if(r.length>i.length||r.some((e,t)=>i[t]!==e))return"/AcroForm /Fields is not append-only";let o=oC(e),a=i.slice(r.length).filter(e=>!o.has(e));if(a.length>0)return`/AcroForm /Fields gained non-signature fields: ${a.join(", ")}`}return null}function oO(e){let t=new Set([...e.before.pages,...e.after.pages]),n=new Map;for(let r of e.changes){if("array"!==r.kind||r.value.truncated)continue;let e=[...r.usage.old,...r.usage.new];0!==e.length&&e.every(e=>t.has(e.parent)&&"Annots"===e.label)&&1===new Set(e.map(e=>e.parent)).size&&[r.value.old,r.value.new].every(e=>null===e||"array"===e.t&&od(e).length===e.items.length)&&n.set(r.objectNumber,e[0].parent)}return n}function oI(e,t,n,r){let i=ol(n.value[r])?.Annots;if(!i)return{refs:[],object:0,holder:null};if("array"===i.t)return{refs:od(i),object:0,holder:null};if("ref"!==i.t)return null;let o=e.byNum.get(i.num);if(!o){let t=e.unwritten.get(i.num);if(!t||"ok"!==t.read||t.value?.t!=="array")return null;let n=od(t.value);return n.length!==t.value.items.length?null:{refs:n,object:i.num,holder:null}}if(t.get(o.objectNumber)!==n.objectNumber)return null;let a=o.value[r];return a?{refs:od(a),object:o.objectNumber,holder:o}:null}function oN(e,t){if(e.length>t.length)return null;for(let n=0;n"MK/I"===e||e.startsWith("MK/I/"),oR=e=>"AP"===e||e.startsWith("AP/");function oT(e,t,n,r){return[...n.filter(e=>!r.includes(e)),...r.filter(e=>!n.includes(e))].some(n=>t.has(n)&&!e.findings.some(e=>e.objectNumber===n&&"permitted"===e.verdict))?"widget":"annotations"}var oB={maxDepth:16,maxEdgesPerObject:256,maxReads:2e4},oL="incomplete",o$=class{constructor(e,t,n=oB){this.read=e,this.anchors=t,this.budget=n,I(this,"referrers",new Map),I(this,"resolved",new Map),I(this,"reads",0),I(this,"exhausted",!1)}resolve(e){if(!this.resolved.has(e)){for(let t of this.componentsAbove(e)??[])if(!this.resolveComponent(t))break}return this.resolved.get(e)??"incomplete"}readReferrers(e){let t=this.referrers.get(e);if(t)return t;if(this.exhausted||this.reads>=this.budget.maxReads)return this.exhausted=!0,null;this.reads+=1;let n=this.read(e);return this.referrers.set(e,n),n}pendingParents(e){let t=new Set;for(let n of e)this.anchors.has(n.parent)||this.resolved.has(n.parent)||t.add(n.parent);return[...t]}componentsAbove(e){let t=new Map,n=new Map,r=[],i=new Set,o=[],a=[],s=e=>{let a=this.readReferrers(e);return!!a&&(t.set(e,t.size),n.set(e,t.get(e)),r.push(e),i.add(e),o.push({node:e,parents:this.pendingParents(a),next:0}),!0)};if(!s(e))return null;for(;o.length>0;){let e=o[o.length-1];if(e.next0){let e=o[o.length-1].node;n.set(e,Math.min(n.get(e),n.get(l)))}if(n.get(l)===t.get(l)){let e,t=[];do e=r.pop(),i.delete(e),t.push(e);while(e!==l)a.push(t)}}return a}resolveComponent(e){let t=new Set(e),n=1===e.length?this.edgesOfSingle(e[0]):this.edgesOfLoop(e,t);if(!n){for(let t of e)this.resolved.set(t,null);return!1}for(let t of e)this.resolved.set(t,n.get(t));return!0}edgesOfSingle(e){let t=[];for(let n of this.referrers.get(e)){if(n.parent===e)continue;let r=this.through(n);if(!r)return null;t.push(...r)}let n=oV(t);return n.length>this.budget.maxEdgesPerObject?null:new Map([[e,n]])}edgesOfLoop(e,t){let n=new Map,r=new Map;for(let i of e){let e=[];for(let n of this.referrers.get(i)){if(t.has(n.parent))continue;let o=this.through(n);if(!o)return null;for(let t of o){e.push(t);let n=[...t.via??[],i];if(n.length>=this.budget.maxDepth)return null;let o={parent:t.parent,label:`${t.label}/\\u2026`,via:n},a=r.get(oz(o));a?1===a.length&&oU(a[0])!==i&&a.push(o):r.set(oz(o),[o])}if(e.length>this.budget.maxEdgesPerObject)return null}e.length>0&&n.set(i,oV(e))}if(r.size>this.budget.maxEdgesPerObject)return null;let i=new Map,o=[...r.values()].map(e=>e[0]);for(let t of e){let e=n.get(t);if(!e){i.set(t,o);continue}let a=[];for(let e of r.values()){let n=e.find(e=>oU(e)!==t);n&&a.push(n)}let s=[...e,...a];if(s.length>this.budget.maxEdgesPerObject)return null;i.set(t,s)}return i}through(e){if(this.anchors.has(e.parent))return[e];let t=this.resolved.get(e.parent);if(!t)return null;let n=[];for(let r of t){let t=[...r.via??[],e.parent];if(t.length>=this.budget.maxDepth)return null;n.push({parent:r.parent,label:`${r.label}/${e.label}`,via:t})}return n}};function oz(e){return`${e.parent}:${e.label}`}function oU(e){return e.via[e.via.length-1]}function oV(e){let t=new Set;return e.filter(e=>{if(!e.label.includes("\\u2026"))return!0;let n=oz(e);return!t.has(n)&&(t.add(n),!0)})}var oW=/\\s/,oq=/\\s/g,oH=(e,t)=>{let n=e.charCodeAt(t);return n>=56320&&n<=57343},oK=new Set([G.InvalidArg,G.NotFound,G.Forbidden,G.ProtectedDocument,G.MalformedPdf,G.PayloadTooLarge,G.ObjectNumberUnavailable,G.LayerFull,G.ChangeConflict,G.UndoUnavailable]);function oZ(e){let t=function e(t){if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let e=t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return JSON.stringify({$bytes:`${e.byteLength.toString(36)}-${function(e){let t=0xdeadbeef,n=0x41c6ce57;for(let r of e)t=Math.imul(t^r,0x9e3779b1),n=Math.imul(n^r,0x5f356495);return oJ(t,n)}(e)}`})}return Array.isArray(t)?`[${t.map(e).join(",")}]`:null!==t&&"object"==typeof t?`{${Object.entries(t).filter(([,e])=>void 0!==e).sort(([e],[t])=>et)).map(([t,n])=>`${JSON.stringify(t)}:${e(n)}`).join(",")}}`:JSON.stringify(t)??"null"}(e);return`${t.length.toString(36)}-${function(e){let t=0xdeadbeef,n=0x41c6ce57;for(let r=0;r>>16,0x85ebca6b)^Math.imul(t^t>>>13,0xc2b2ae35),(0x100000000*(2097151&(t=Math.imul(t^t>>>16,0x85ebca6b)^Math.imul(e^e>>>13,0xc2b2ae35)))+(e>>>0)).toString(36)}function oQ(e,t){oY(e,t);let{grants:n,protection:r}=e;if(n&&!iW(t,n.scope,n.permissionFlags,r))throw new na(t,"target")}function oX(e,t){let{grants:n,protection:r}=e;return!(r&&iR(r).has(t))&&(!n||iW(t,n.scope,n.permissionFlags,r))}function oY(e,t){let{protection:n}=e;if(n&&iR(n).has(t))throw new N(G.ProtectedDocument,`the document is signed: ${n.certification?`certification signature ${n.certification.signatureIndex} (permission ${n.certification.permission})`:`an existing signature (declared level \'${n.enforced??"none declared"}\')`} forbids \'${t}\'`)}function o0(e){return"widget"===e?"doc.forms.modify":"doc.annotate.modify"}function o1(e){return[...new Set(e.map(e=>o0(e.subtype)))]}function o3(e,t){let{identity:n,grants:r}=e;if(r&&!iW("doc.forms.modify",r.scope,r.permissionFlags))throw new na("doc.forms.modify","target");if("string"==typeof t)throw new N(G.InvalidArg,"a widget has no group of its own: a form field\'s group is the field\'s");let i={...void 0!==n.userId?{userId:n.userId}:{},...void 0!==n.displayName?{displayName:n.displayName}:{}};return i.userId||i.displayName?i:void 0}function o2(e,t,n){if("widget"===t)return o3(e,n);let{identity:r,grants:i}=e;if(null===n&&void 0!==r.groupId)throw new N(G.InvalidArg,"your annotations have a group: leave groupId out for your own, or name another",{details:{field:"groupId"}});let o=void 0===n?r.groupId:n??void 0;if(i){if(void 0!==o&&!iK("annotations",o,r.groupId,i.scope))throw new na(`annotations:set-group:group=${o}`,"target");if(!iq("create",iV({userId:r.userId,groupId:o}),i.scope,r,i.permissionFlags))throw new na("annotations:create","target")}let a={...void 0!==r.userId?{userId:r.userId}:{},...void 0!==o?{groupId:o}:{},...void 0!==r.displayName?{displayName:r.displayName}:{}};return a.userId||a.groupId||a.displayName?a:void 0}function o6(e,t,n){if("widget"===t.subtype)return o3(e,n);let{identity:r,grants:i}=e,o=iV(t);if(i&&!iq("update",o,i.scope,r,i.permissionFlags))throw new na("annotations:update","target");if(null===n&&void 0!==o.groupId)throw new N(G.InvalidArg,"an annotation\'s group can\'t be removed");let a="string"==typeof n&&n!==o.groupId;if(a&&i&&!iK("annotations",n,r.groupId,i.scope))throw new na(`annotations:set-group:group=${n}`,"target");let s={...void 0!==r.userId?{userId:r.userId}:{},...void 0!==r.displayName?{displayName:r.displayName}:{},...a?{groupId:n}:{}};return s.userId||s.groupId||s.displayName?s:void 0}function o5(e,t){let{identity:n,grants:r}=e;if(!r)return;let i=iW("doc.forms.modify",r.scope,r.permissionFlags),o=t.filter(e=>"widget"===e.subtype?!i:!iq("delete",iV(e),r.scope,n,r.permissionFlags));if(o.length>0)throw new na("annotations:delete","target",void 0,o.map(e=>e.ref))}function o4(e,t,n){if(oY(e,o9(n)),!o8(e,t,n)){let e="string"==typeof t||null===t?t:Y(t);throw new na(null===e?o9(n):`fields:${n}:group=${e}`,"target")}}function o8(e,t,n){let{grants:r,protection:i}=e;return!(i&&iR(i).has(o9(n)))&&(!r||function(e,t,n,r,i=null){let o=null!==t&&"object"==typeof t?t:X(t);if("anyone"===o.kind)return iZ(e,n,r,i);let a="group"===o.kind?o.groupId:null,s="fill"===e?"doc.forms.fill":"doc.sign";if(iR(i).has(s))return!1;let l=n.map(iB);if(l.some(e=>"wildcard"===e.kind))return!0;let u=l.filter(t=>"collab"===t.kind&&"fields"===t.entity&&(t.action===e||"*"===t.action));return u.length>0?u.some(e=>"all"===e.filter.kind||null!==a&&e.filter.groupId===a):iH(l,r,i).has(s)}(n,t,r.scope,r.permissionFlags,i))}function o7(e,t){if("group"===t.kind)return function(e,t){if(null===t)return;let{identity:n,grants:r}=e;if(r&&!iK("fields",t,n.groupId,r.scope))throw new na(`fields:set-group:group=${t}`,"target")}(e,t.groupId);if("unassigned"===t.kind)return;let{grants:n}=e;if(n&&!n.scope.map(iB).some(e=>"wildcard"===e.kind||"collab"===e.kind&&"fields"===e.entity&&("set-group"===e.action||"*"===e.action)&&"all"===e.filter.kind))throw new na("fields:set-group:all","target")}function o9(e){return"fill"===e?"doc.forms.fill":"doc.sign"}function ae(e,t){return"fqn"===t.kind?e.name===t.name:"objectNumber"===e.ref.kind&&e.ref.objectNumber===t.objectNumber}function at(e){if("signature"===e.kind)return{...e,valueEntry:{kind:"none"}};if(!e.noExport)return e;let t={...e,valueEntry:{kind:"none"},filledBy:null,filledByName:null,filledAt:null};switch(e.kind){case"text":case"combobox":return{...t,kind:e.kind,value:""};case"checkbox":return{...t,kind:"checkbox",checked:!1,widgets:e.widgets.map(e=>({...e,checked:!1}))};case"radio":return{...t,kind:"radio",value:"Off",widgets:e.widgets.map(e=>({...e,checked:!1}))};case"listbox":return{...t,kind:"listbox",selectedValues:[],options:e.options.map(e=>({...e,selected:!1}))};case"pushbutton":return{...t,kind:"pushbutton",hasImage:!1};default:return t}}Array.from({length:128},(e,t)=>({print:(1&t)!=0,modifyContents:(2&t)!=0,copy:(4&t)!=0,modifyAnnotations:(8&t)!=0,fillForms:(16&t)!=0,copyForAccessibility:!1,assemble:(32&t)!=0,printHighQuality:(64&t)!=0}));var an=["invisible","hidden","print","noZoom","noRotate","noView","readOnly","locked","toggleNoView","lockedContents"];function ar(e){return"scalar"===e.valueEntry.kind||"array"===e.valueEntry.kind}function ai(e){if(!eg(e.kind))return null;let t=eb(e.actions);return ev(t)?t:null}function ao(e,t,n){let r={},i=t?null:ai(e);for(let[o,a]of Object.entries(e.actions??{})){if(!a)continue;let s=U(a),l=`actions.${o}`;if(s)if(t)r[o]=s;else{if(i&&"format"===o||i&&"keystroke"===o&&function(e,t){let n=t?ew(t):null;if(null===n)return!1;let r=e_[e.kind];return"time"===e.kind?null!==eD(n,"time","",r.numberedKeystroke)||eD(n,"time",r.keystroke,"")===e.pattern:eD(n,"date",r.keystroke,r.numberedKeystroke)===e.pattern}(i,a))continue;n.push({ref:e.ref,field:l,reason:"script-not-allowed"})}else n.push({ref:e.ref,field:l,reason:"unsupported-action"})}return r}function aa(e,t){if("pushbutton"!==e.kind)return e;let n=rW(t.map(e=>e.actions));return e.takesImage===n?e:{...e,takesImage:n}}function as(e,t,n,r,i){let o={},a=!r&&"pushbutton"===e.kind&&e.takesImage&&rV(t.actions);for(let s of z){let l=t.actions?.[s];if(!l||a&&rU.includes(s))continue;let u=B(l),d=n=>i.push({ref:e.ref,widget:t.ref,field:`actions.${s}`,reason:n});u?!r&&R(u)?d("script-not-allowed"):o[s]=rL(u,n):d("unsupported-action")}let s="checkbox"===e.kind||"radio"===e.kind?e.widgets.find(e=>e.ref&&K(e.ref)===K(t.ref)):void 0,l={color:t.color,interiorColor:t.interiorColor,dashArray:t.dashArray,checkStyle:t.checkStyle,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,caption:"pushbutton"===e.kind?t.caption:null,layout:"pushbutton"===e.kind&&"caption"!==t.layout?t.layout:null};return{page:n(t.page),rect:t.rect,...t.rotation?{rotation:t.rotation}:{},strokeWidth:t.strokeWidth,borderStyle:t.borderStyle,textAlign:t.textAlign,...Object.fromEntries(Object.entries(l).filter(([,e])=>null!=e)),...s&&"exportValue"in s?{exportValue:s.exportValue}:{},...Object.keys(o).length>0?{actions:o}:{}}}function al(e){return Object.fromEntries(an.map(t=>[t,e[t]]))}function au(e,t,n,r,i){let o={name:t,readOnly:e.readOnly,required:e.required,noExport:e.noExport,...null!==e.alternateName?{alternateName:e.alternateName}:{},...null!==e.mappingName?{mappingName:e.mappingName}:{},assignment:e.assignment,...rC(e.purpose)?{purpose:e.purpose}:{},...eN(e.placeholder)?{placeholder:e.placeholder}:{},...Object.keys(n).length>0?{actions:n}:{},widgets:r},a=void 0===n.format?ai(e):null,s=a?{format:a}:{},l="none"!==e.defaultValueEntry.kind,u=e=>e.map(({label:e,value:t})=>({label:e,value:t}));switch(e.kind){case"text":return{...o,...s,kind:"text",...l?{defaultValue:e.defaultValue}:{},...null!==e.maxLength?{maxLength:e.maxLength}:{},multiline:e.multiline,password:e.password,comb:e.comb};case"radio":return{...o,kind:"radio",radiosInUnison:e.radiosInUnison,noToggleToOff:e.noToggleToOff};case"combobox":return{...o,...s,kind:"combobox",edit:e.edit,options:u(e.options),...l?{defaultValue:e.defaultValue}:{}};case"listbox":return{...o,kind:"listbox",multiSelect:e.multiSelect,options:u(e.options),...l?{defaultValue:e.defaultValue}:{}};case"pushbutton":{let t=r.every(e=>rU.every(t=>e.actions?.[t]===void 0)),n=e.takesImage&&r.length>0&&t;return{...o,kind:"pushbutton",...n?{takesImage:!0}:{}}}case"checkbox":case"signature":return{...o,kind:e.kind};default:throw new N(G.InvalidArg,`${i} has no family`)}}function ad(e){switch(e.kind){case"checkbox":return{checked:e.checked};case"listbox":return{selectedValues:e.selectedValues};case"radio":return{value:"Off"===e.value?null:e.value};case"text":case"combobox":return{value:e.value};default:return null}}function ac(e,t){if(e.has(t))return!0;for(let n of e)if(n.startsWith(`${t}.`)||t.startsWith(`${n}.`))return!0;return!1}function af(e,t){let n=e.lastIndexOf("."),r=e.slice(0,n+1),i=e.slice(n+1),o=/^(.*)_(\\d+)$/.exec(i),a=o?o[1]:i,s=o?Number(o[2])+1:2;for(;t(`${r}${a}_${s}`);)s+=1;return`${r}${a}_${s}`}function am(e,t){let n=new Set(t.widgets.flatMap(e=>e.ref?K(e.ref):[])),r=new Map;for(let t of e.widgets){let e=K(t.ref);n.has(e)&&r.set(e,t)}let i=t.widgets.flatMap(e=>{let t=e.ref?r.get(K(e.ref)):void 0;return t?[t]:[]}),o=i[0];return o?i.filter(e=>e.page.objectNumber===o.page.objectNumber):[]}var ap=e=>"pushbutton"===e.kind&&e.takesImage?"fields":"boxes",ah=e=>(e%360+360)%360;function aF(e,t,n){let r=e?.[t];if(void 0!==r&&!(n<=r))throw new N(G.PayloadTooLarge,`repeat: past the ${t} limit: ${n} > ${r}`,{details:{limit:t,max:r,value:n}})}var ag=e=>"truetype"===e||"opentype"===e,a_=e=>"installable"===e||"editable"===e;function aP(e){return"whole"===e.embedded&&ag(e.format)&&e.mapsUnicode&&a_(e.permission)}function aD(e){return null!==e.displaySha256&&(null===e.permission||a_(e.permission))}function ab(e){let t=[];return"none"===e.embedded?t.push("type3"===e.format?"unsupported-format":"not-embedded"):("subset"===e.embedded&&t.push("subset"),ag(e.format)?e.mapsUnicode||t.push("no-unicode-map"):t.push("unsupported-format"),null===e.permission||a_(e.permission)||t.push("preview-and-print")),t}function ay(e){let t=aD(e);return{displaySha256:t?e.displaySha256:null,sourceSha256:"none"===e.embedded?null:e.sha256,embedded:e.embedded,format:"none"===e.embedded?null:e.format,embeddingPermission:"restricted"===e.permission||"bitmap-only"===e.permission?"preview-and-print":e.permission,canDownload:t}}var aw=e=>aP(e)?0:aD(e)?1:"none"!==e.embedded?2:3,aE={100:"Thin",200:"ExtraLight",300:"Light",400:"",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"};function aA(e,t){if(t)return t;let n=`${aE[e.weight]??String(e.weight)}${e.italic?"Italic":""}`;return n?`${e.familyName},${n}`:e.familyName}function av(e){let t=new Map;for(let n of e)for(let e of n.programs){if(!e.postScriptName&&""===n.familyName)continue;let r=aA(n,e.postScriptName),i=t.get(r)??[];i.some(({program:t})=>e.objectNumber>0?t.objectNumber===e.objectNumber&&t.displaySha256===e.displaySha256:0===t.objectNumber&&t.embedded===e.embedded&&t.format===e.format&&t.sha256===e.sha256)||i.push({face:n,program:e}),t.set(r,i)}return[...t].map(([e,t])=>{let n=[...t].sort((e,t)=>aw(e.program)-aw(t.program)),{familyName:r,weight:i,italic:o}=n[0].face;return{name:e,face:{familyName:r,weight:i,italic:o},programs:n.map(({program:e})=>e)}})}function aS(e){return void 0!==eW[eV(e.face.familyName)]&&e.programs.every(e=>"none"===e.embedded)}function ak(e){let t=e.programs[0];return{name:e.name,source:"document",builtIn:!1,familyName:e.face.familyName,weight:e.face.weight,italic:e.face.italic,postScriptName:t?.postScriptName??null,canChoose:!!t&&aP(t),restrictions:t?ab(t):["not-embedded"],programs:e.programs.map(ay)}}function ax(e){let{identity:t}=e,n=[];return t.editingAuthorized||n.push("preview-and-print"),e.served||n.push("not-served"),{name:e.key,source:"engine",builtIn:e.builtIn,familyName:t.familyName,weight:t.weight,italic:t.italic,postScriptName:e.postScriptName,canChoose:t.editingAuthorized,restrictions:n,programs:[{displaySha256:e.sha256,sourceSha256:e.sha256,embedded:"none",format:e.format,embeddingPermission:t.embeddingPermission,canDownload:e.served}]}}function aG(e,t){let n=av(e.faces).find(e=>e.name===t&&!aS(e));if(!n)return;let r=n.programs[0];return r?{objectNumber:r.objectNumber,choosable:aP(r)&&r.objectNumber>0,restrictions:ab(r)}:{objectNumber:0,choosable:!1,restrictions:["not-embedded"]}}var aO={elsewhere:0,near:1,visible:2};function aI(e,t){let n=aO[e.place]-aO[t.place];return 0!==n?n>0:e.pixels>t.pixels}var aN=Object.freeze([]);function aC(e,t=aN){return{payload:e,transfer:t}}var aj=[{ts:"boolean",wasm:{kind:"bool",cwrap:"boolean"},native:{kind:"bool",cwrap:"boolean"}},{ts:"Ptr",wasm:{kind:"pointer",cwrap:"number"},native:{kind:"pointer",cwrap:"bigint"}},{ts:"string",wasm:{kind:"cstring",cwrap:"string"},native:{kind:"cstring",cwrap:"string"}},{ts:"number",wasm:{kind:"i32",cwrap:"number"},native:{kind:"i32",cwrap:"number"}},{ts:"Ptr",wasm:{kind:"cstring",cwrap:"number"},native:{kind:"cstring",cwrap:"bigint"}},{ts:"number",wasm:{kind:"f32",cwrap:"number"},native:{kind:"f32",cwrap:"number"}},{ts:"Ptr",wasm:{kind:"utf16ptr",cwrap:"number"},native:{kind:"utf16ptr",cwrap:"bigint"}},{ts:"bigint",wasm:{kind:"i64",cwrap:"bigint"},native:{kind:"i64",cwrap:"bigint"}},{ts:"number",wasm:{kind:"f64",cwrap:"number"},native:{kind:"f64",cwrap:"number"}}],aM=function(e){let t={};for(let n of e.split(`\n`)){if(!n)continue;let[e,r,...i]=n.split(" ");t[e]={params:i.map(e=>aj[Number(e)]),result:"-"===r?null:aj[Number(r)]}}return t}(`\nEPDF_CheckPasswordPermissions 0 1 2 1 1 1 1\nEPDF_DigestBuffer 0 1 3 3 4 1\nEPDF_FreeBuffer - 1\nEPDF_GetDecodedImageBytes 3\nEPDF_GetMetaKeyCount 3 1 0\nEPDF_GetMetaKeyName 3 1 3 0 1 3\nEPDF_GetMetaTrapped 3 1\nEPDF_GetPageBoxByIndex 0 1 3 3 1\nEPDF_GetPageRotateByIndex 0 1 3 1\nEPDF_GetPageTabOrderByIndex 3 1 3 1 3\nEPDF_GetPageUserUnitByIndex 0 1 3 1\nEPDF_HasMetaText 0 1 2\nEPDF_InitThread -\nEPDF_IsEncrypted 0 1\nEPDF_IsOwnerUnlocked 0 1\nEPDF_LoadBaseDocument 1 1 2\nEPDF_LoadMemBaseDocument 1 1 3 2\nEPDF_LoadMemBaseDocument64 1 1 3 2\nEPDF_LoadPageNormalized 1 1 3 1\nEPDF_PNG_EncodeRGBA 3 4 3 3 3 3 4\nEPDF_ReleaseBaseDocument - 1\nEPDF_RemoveEncryption 0 1\nEPDF_RenderAnnotBitmap 0 1 1 1 3 2 1 3\nEPDF_RenderAnnotBitmapUnrotated 0 1 1 1 3 2 5 1 1 3\nEPDF_RenderPage_Continue 3 1 3\nEPDF_RenderPageBitmapWithMatrix_Start 3 1 1 1 1 3 3\nEPDF_SaveAsCopyEx 0 1 1 3 1\nEPDF_SaveDocumentToOwnedBuffer 1 1 3 1\nEPDF_SaveDocumentToOwnedBufferEx 1 1 3 3 1 1\nEPDF_SaveDocumentToOwnedBufferWithVersion 1 1 3 1 3\nEPDF_SetBaseDocumentSha256 - 1 4\nEPDF_SetDecodedImageBudget - 3\nEPDF_SetEncryption 0 1 2 2 3\nEPDF_SetMetaText 0 1 2 1\nEPDF_SetMetaTrapped 0 1 3\nEPDF_SetRuntimeOwnerPermissions 0 1 0\nEPDF_ShutdownThread -\nEPDF_UnlockOwnerPermissions 0 1 2\nEPDFAction_CloseModel - 1\nEPDFAction_CreateGoTo 1 1 1\nEPDFAction_CreateGoToNamed 1 1 2\nEPDFAction_CreateHide 1 1 1 3 0\nEPDFAction_CreateJavaScript 1 1 1\nEPDFAction_CreateLaunch 1 1 1\nEPDFAction_CreateNamed 1 1 2\nEPDFAction_CreateRemoteGoToByName 1 1 1 1\nEPDFAction_CreateRemoteGoToDest 1 1 1 1\nEPDFAction_CreateResetForm 1 1 1 3 0\nEPDFAction_CreateSubmitForm 1 1 1 1 3 3\nEPDFAction_CreateURI 1 1 2\nEPDFAction_GetNextAt 3 1 3 3\nEPDFAction_GetNextCount 3 1 3\nEPDFAction_GetNodeCount 3 1\nEPDFAction_GetNodeDest 1 1 1 3\nEPDFAction_GetNodeFilePath 3 1 3 1 3\nEPDFAction_GetNodeHideFlag 0 1 3 1\nEPDFAction_GetNodeJavaScript 3 1 3 6 3\nEPDFAction_GetNodeName 3 1 3 1 3\nEPDFAction_GetNodeResetForm 0 1 3 1 1\nEPDFAction_GetNodeSubmitForm 0 1 3 1 1\nEPDFAction_GetNodeSubmitFormCharSet 3 1 3 1 3\nEPDFAction_GetNodeSubmitFormURL 3 1 3 1 3\nEPDFAction_GetNodeSubtype 3 1 3 4 3\nEPDFAction_GetNodeTargetCount 3 1 3\nEPDFAction_GetNodeTargetName 3 1 3 3 1 3\nEPDFAction_GetNodeTargetObjectNumber 0 1 3 3 1\nEPDFAction_GetNodeType 3 1 3\nEPDFAction_GetNodeURI 3 1 1 3 1 3\nEPDFAction_GetNodeURIIsMap 0 1 3 1\nEPDFAction_GetRootNode 3 1\nEPDFAction_GetWarningFlags 3 1\nEPDFAction_IsComplete 0 1\nEPDFAction_LoadModel 1 1\nEPDFAction_NodeHasJavaScript 0 1 3\nEPDFAction_SetNext 0 1 1 1 3\nEPDFAnnot_AddMeasure 1 1\nEPDFAnnot_ClearBorderEffect 0 1\nEPDFAnnot_ClearColor 0 1 3\nEPDFAnnot_ClearEmbedMetadata 0 1\nEPDFAnnot_ClearEmbedMetadataKey 0 1 2\nEPDFAnnot_ClearMKColor 0 1 3\nEPDFAnnot_ClearMKIcon 0 1 3\nEPDFAnnot_ClearRectangleDifferences 0 1\nEPDFAnnot_ExportAppearance 1 1 5 1\nEPDFAnnot_GenerateAppearance 0 1\nEPDFAnnot_GenerateAppearanceWithBlend 0 1 3\nEPDFAnnot_GenerateFormFieldAP 0 1\nEPDFAnnot_GetActionModel 1 1 3\nEPDFAnnot_GetAPMatrix 0 1 3 1\nEPDFAnnot_GetAppearanceState 3 1 1 3\nEPDFAnnot_GetAppearanceStateCount 3 1 3\nEPDFAnnot_GetAppearanceStateName 3 1 3 3 1 3\nEPDFAnnot_GetAppearanceTransform 0 1 1 1\nEPDFAnnot_GetAvailableAppearanceModes 3 1\nEPDFAnnot_GetBlendMode 3 1\nEPDFAnnot_GetBooleanValue 0 1 2 1\nEPDFAnnot_GetBorderDashPattern 0 1 1 3\nEPDFAnnot_GetBorderDashPatternCount 3 1\nEPDFAnnot_GetBorderEffect 0 1 1\nEPDFAnnot_GetBorderStyle 3 1 1\nEPDFAnnot_GetCalloutLine 3 1 1 3\nEPDFAnnot_GetCalloutLineCount 3 1\nEPDFAnnot_GetColor 0 1 3 1 1 1\nEPDFAnnot_GetDefaultAppearance 0 1 1 1 1 1 1\nEPDFAnnot_GetDefaultAppearanceFontFace 3 1 6 3 1 1\nEPDFAnnot_GetDefaultAppearanceFontPostScriptName 3 1 4 3\nEPDFAnnot_GetDrawing 3 1\nEPDFAnnot_GetDrawingRect 0 1 3 1\nEPDFAnnot_GetEmbedMetadataBoolean 0 1 2 1\nEPDFAnnot_GetEmbedMetadataJSON 3 1 6 3\nEPDFAnnot_GetEmbedMetadataNumber 0 1 2 1\nEPDFAnnot_GetEmbedMetadataRect 0 1 2 1\nEPDFAnnot_GetEmbedMetadataString 3 1 2 6 3\nEPDFAnnot_GetFileAttachmentForWrite 1 1\nEPDFAnnot_GetIntent 3 1 6 3\nEPDFAnnot_GetLineCaption 0 1 1 1 1\nEPDFAnnot_GetLineEndings 0 1 1 1\nEPDFAnnot_GetLineLeader 0 1 1 1 1\nEPDFAnnot_GetMeasure 1 1\nEPDFAnnot_GetMKColor 0 1 3 1 1 1\nEPDFAnnot_GetMKIcon 3 1 3\nEPDFAnnot_GetMKRotation 3 1\nEPDFAnnot_GetMKText 3 1 3 6 3\nEPDFAnnot_GetMKTextPosition 3 1\nEPDFAnnot_GetName 3 1 4 3\nEPDFAnnot_GetObjectNumber 3 1\nEPDFAnnot_GetOpacity 0 1 1\nEPDFAnnot_GetOverlayText 3 1 6 3\nEPDFAnnot_GetOverlayTextRepeat 0 1\nEPDFAnnot_GetRect 0 1 1\nEPDFAnnot_GetRectangleDifferences 0 1 1 1 1 1\nEPDFAnnot_GetReplyType 3 1\nEPDFAnnot_GetRichContent 3 1 6 3\nEPDFAnnot_GetRichTextJSON 3 1 4 3\nEPDFAnnot_GetRotate 0 1 1\nEPDFAnnot_GetShapeCaption 0 1 1 1 1\nEPDFAnnot_GetStructurePosition 3 1 1 3\nEPDFAnnot_GetTextAlignment 3 1\nEPDFAnnot_HasAppearanceStream 0 1 3\nEPDFAnnot_HasEmbedMetadata 0 1\nEPDFAnnot_HasMKIcon 0 1 3\nEPDFAnnot_IsValid 0 1\nEPDFAnnot_RemoveAction 0 1\nEPDFAnnot_RemoveDest 0 1\nEPDFAnnot_RemoveKey 0 1 2\nEPDFAnnot_RemoveMeasure 0 1\nEPDFAnnot_SetAction 0 1 1\nEPDFAnnot_SetAPMatrix 0 1 3 1\nEPDFAnnot_SetAppearanceFromPage 0 1 1 3\nEPDFAnnot_SetBooleanValue 0 1 2 0\nEPDFAnnot_SetBorderDashPattern 0 1 1 3\nEPDFAnnot_SetBorderEffect 0 1 5\nEPDFAnnot_SetBorderStyle 0 1 3 5\nEPDFAnnot_SetCalloutLine 0 1 1 3\nEPDFAnnot_SetColor 0 1 3 3 3 3\nEPDFAnnot_SetDefaultAppearance 0 1 3 5 3 3 3\nEPDFAnnot_SetDefaultAppearanceDocumentFont 0 1 3 5 3 3 3\nEPDFAnnot_SetDefaultAppearanceRegisteredFont 0 1 3 5 3 3 3\nEPDFAnnot_SetDrawing 0 1 3 3\nEPDFAnnot_SetEmbedMetadataBoolean 0 1 2 0\nEPDFAnnot_SetEmbedMetadataJSON 0 1 1\nEPDFAnnot_SetEmbedMetadataNumber 0 1 2 5\nEPDFAnnot_SetEmbedMetadataRect 0 1 2 1\nEPDFAnnot_SetEmbedMetadataString 0 1 2 1\nEPDFAnnot_SetEventAction 0 1 3 1\nEPDFAnnot_SetIntent 0 1 2\nEPDFAnnot_SetLine 0 1 1 1\nEPDFAnnot_SetLineCaption 0 1 0 3 1\nEPDFAnnot_SetLineEndings 0 1 3 3\nEPDFAnnot_SetLineLeader 0 1 5 5 5\nEPDFAnnot_SetLinkedAnnot 0 1 2 1\nEPDFAnnot_SetMKColor 0 1 3 3 3 3\nEPDFAnnot_SetMKIcon 0 1 3 3\nEPDFAnnot_SetMKRotation 0 1 3\nEPDFAnnot_SetMKText 0 1 3 1\nEPDFAnnot_SetMKTextPosition 0 1 3\nEPDFAnnot_SetName 0 1 2\nEPDFAnnot_SetNoColor 0 1 3\nEPDFAnnot_SetNumberValue 0 1 2 5\nEPDFAnnot_SetOpacity 0 1 5\nEPDFAnnot_SetOverlayText 0 1 1\nEPDFAnnot_SetOverlayTextRepeat 0 1 0\nEPDFAnnot_SetRect 0 1 1\nEPDFAnnot_SetReplyType 0 1 3\nEPDFAnnot_SetRichTextJSON 0 1 2\nEPDFAnnot_SetRichTextXHTML 0 1 1\nEPDFAnnot_SetRotate 0 1 5\nEPDFAnnot_SetShapeCaption 0 1 0 1\nEPDFAnnot_SetStampOpacity 0 1 3 5\nEPDFAnnot_SetSubtype 0 1 3\nEPDFAnnot_SetTextAlignment 0 1 3\nEPDFAnnot_SetVertices 0 1 1 3\nEPDFAnnot_UpdateAppearanceToRect 0 1 3\nEPDFAttachment_ExportCanonicalToOwnedBuffer 1 1 1 1\nEPDFAttachment_ExportRawToOwnedBuffer 1 1 1 1\nEPDFAttachment_ExtractFile 0 1 1 7 1 1\nEPDFAttachment_ExtractFileToOwnedBuffer 0 1 7 1 1 1\nEPDFAttachment_GetDescription 3 1 6 3\nEPDFAttachment_GetIntegerValue 0 1 2 1\nEPDFAttachment_ImportRaw 0 1 1 3\nEPDFAttachment_SetDescription 0 1 1\nEPDFAttachment_SetName 0 1 1\nEPDFAttachment_SetSubtype 0 1 2\nEPDFCatalog_GetLanguage 3 1 1 3\nEPDFCatalog_GetMetadata 3 1 1 3\nEPDFCatalog_SetMetadata 0 1 1 3\nEPDFDest_CreateRemoteView 1 1 3 3 1 3\nEPDFDest_CreateRemoteXYZ 1 1 3 0 5 0 5 0 5\nEPDFDest_CreateView 1 1 3 1 3\nEPDFDest_CreateViewByObjectNumber 1 1 3 3 1 3\nEPDFDest_CreateXYZ 1 1 0 5 0 5 0 5\nEPDFDest_CreateXYZByObjectNumber 1 1 3 0 5 0 5 0 5\nEPDFDest_GetPageObjectNumber 3 1 1\nEPDFDest_GetViewNullParams 3 1\nEPDFDoc_CanonicalDrawing 1 1 3\nEPDFDoc_ClearMissingCharacters - 1\nEPDFDoc_ClearPagePieceInfoEntry 0 1 3 2\nEPDFDoc_ClearPagePieceInfoKey 0 1 3 2 2 1\nEPDFDoc_ClearPieceInfoEntry 0 1 2\nEPDFDoc_ClearPieceInfoKey 0 1 2 2 1\nEPDFDoc_CompareRevisions 1 1 1\nEPDFDoc_CountMissingCharacters 3 1\nEPDFDoc_DeletePageByObjectNumber 0 1 3\nEPDFDoc_ExportDictCanonicalToOwnedBuffer 1 1 3 2 2 1\nEPDFDoc_ExportDictRawToOwnedBuffer 1 1 3 2 1\nEPDFDoc_ExportDrawing 1 1 3\nEPDFDoc_ExportPagesFlattened 1 1 1 3 3 3\nEPDFDoc_GetAdditionalActionModel 1 1 3\nEPDFDoc_GetAttachmentIndexByKey 3 1 1\nEPDFDoc_GetAttachmentKey 3 1 3 6 3\nEPDFDoc_GetBaseBytesSize 7 1\nEPDFDoc_GetDrawings 3 1 1 3\nEPDFDoc_GetFontDisplayProgramCoverage 3 1 4 1 3\nEPDFDoc_GetFontDisplayProgramData 3 1 4 1 3\nEPDFDoc_GetFontEmbeddingPolicy 3 1\nEPDFDoc_GetFontProgramData 3 1 3 1 3\nEPDFDoc_GetFontsFingerprint 0 1 4\nEPDFDoc_GetImportFieldRoots 3 1 1 3 1 3\nEPDFDoc_GetLastModified 3 1 6 3\nEPDFDoc_GetLoadedBytesSize 7 1\nEPDFDoc_GetLoadedObjectValue 3 1 3 4 3 1 1\nEPDFDoc_GetMissingCharacter 3 1 3 6 3\nEPDFDoc_GetNamedJavaScriptActionModel 1 1 3\nEPDFDoc_GetNamedPageAt 3 1 3 3 6 3 1 1\nEPDFDoc_GetNamedPageCount 3 1 3\nEPDFDoc_GetOpenActionDest 1 1\nEPDFDoc_GetOpenActionModel 1 1\nEPDFDoc_GetPageActionModel 1 1 3 3\nEPDFDoc_GetPageLabelSectionAt 3 1 3 6 3 1 1 1\nEPDFDoc_GetPageLabelSectionCount 3 1\nEPDFDoc_GetPageLastModified 3 1 3 6 3\nEPDFDoc_GetPageObjectNumberByIndex 3 1 3\nEPDFDoc_GetPagePieceInfoBoolean 0 1 3 2 2 1\nEPDFDoc_GetPagePieceInfoEntryAt 3 1 3 3 4 3\nEPDFDoc_GetPagePieceInfoEntryCount 3 1 3\nEPDFDoc_GetPagePieceInfoKeyAt 3 1 3 2 3 4 3\nEPDFDoc_GetPagePieceInfoKeyCount 3 1 3 2\nEPDFDoc_GetPagePieceInfoLastModified 3 1 3 2 6 3\nEPDFDoc_GetPagePieceInfoName 3 1 3 2 2 4 3\nEPDFDoc_GetPagePieceInfoNumber 0 1 3 2 2 1\nEPDFDoc_GetPagePieceInfoString 3 1 3 2 2 6 3\nEPDFDoc_GetPagePieceInfoStringArrayAt 3 1 3 2 2 3 6 3\nEPDFDoc_GetPagePieceInfoStringArrayCount 3 1 3 2 2\nEPDFDoc_GetPagePieceInfoValueType 3 1 3 2 2\nEPDFDoc_GetPieceInfoBoolean 0 1 2 2 1\nEPDFDoc_GetPieceInfoEntryAt 3 1 3 4 3\nEPDFDoc_GetPieceInfoEntryCount 3 1\nEPDFDoc_GetPieceInfoKeyAt 3 1 2 3 4 3\nEPDFDoc_GetPieceInfoKeyCount 3 1 2\nEPDFDoc_GetPieceInfoLastModified 3 1 2 6 3\nEPDFDoc_GetPieceInfoName 3 1 2 2 4 3\nEPDFDoc_GetPieceInfoNumber 0 1 2 2 1\nEPDFDoc_GetPieceInfoString 3 1 2 2 6 3\nEPDFDoc_GetPieceInfoStringArrayAt 3 1 2 2 3 6 3\nEPDFDoc_GetPieceInfoStringArrayCount 3 1 2 2\nEPDFDoc_GetPieceInfoValueType 3 1 2 2\nEPDFDoc_GetRevision 0 1 3 1 1\nEPDFDoc_GetRevisionCount 3 1\nEPDFDoc_GetStructureObjectNumbers 0 1 1 1 1\nEPDFDoc_GetTypographicFeatures 0 1\nEPDFDoc_HasPagePieceInfoEntry 0 1 3 2\nEPDFDoc_HasPieceInfoEntry 0 1 2\nEPDFDoc_ImportDictRaw 0 1 1 3\nEPDFDoc_ImportDrawing 3 1 1\nEPDFDoc_ImportPages 0 1 1 1 3 3 1\nEPDFDoc_LoadPageByObjectNumber 1 1 3\nEPDFDoc_LoadPageByObjectNumberNormalized 1 1 3\nEPDFDoc_OpenBaseOverlay 1 1 1 3\nEPDFDoc_OpenBaseOverlayFromPath 1 1 4\nEPDFDoc_OpenRevision 1 1 7\nEPDFDoc_ReadLoadedBytes 3 1 7 1 3\nEPDFDoc_RemoveNamedPage 0 1 1\nEPDFDoc_RemoveNamedPagesForPage 3 1 3\nEPDFDoc_ResolveFonts 1 1 1 3 6 6 1 1 1\nEPDFDoc_SetFontEmbeddingPolicy 0 1 3\nEPDFDoc_SetNamedPage 0 1 1 3\nEPDFDoc_SetPageLabelSections 0 1 1 1 1 6 3\nEPDFDoc_SetPagePieceInfoBoolean 0 1 3 2 2 0 1\nEPDFDoc_SetPagePieceInfoName 0 1 3 2 2 2 1\nEPDFDoc_SetPagePieceInfoNumber 0 1 3 2 2 5 1\nEPDFDoc_SetPagePieceInfoString 0 1 3 2 2 1 1\nEPDFDoc_SetPagePieceInfoStringArray 0 1 3 2 2 6 3 1\nEPDFDoc_SetPageRotationByObjectNumber 0 1 3 3\nEPDFDoc_SetPieceInfoBoolean 0 1 2 2 0 1\nEPDFDoc_SetPieceInfoName 0 1 2 2 2 1\nEPDFDoc_SetPieceInfoNumber 0 1 2 2 5 1\nEPDFDoc_SetPieceInfoString 0 1 2 2 1 1\nEPDFDoc_SetPieceInfoStringArray 0 1 2 2 6 3 1\nEPDFDoc_SetTypographicFeatures 0 1 0\nEPDFDoc_StartLoadPageByObjectNumber 1 1 3 0\nEPDFDocument_ClearEmbedMetadata 0 1\nEPDFDss_Add 3 1 3 1 3\nEPDFDss_GetCount 3 1 3\nEPDFDss_GetData 3 1 3 3 1 3\nEPDFFont_AddFallbackFont 0 3 3\nEPDFFont_AuthorizeEditing 0 3\nEPDFFont_ClearFallbackFonts -\nEPDFFont_ClearRegisteredFonts -\nEPDFFont_GetCoverage 3 3 1 3\nEPDFFont_GetEmbeddingPermission 3 3\nEPDFFont_GetFallbackOrder 3 3 0 1 3\nEPDFFont_GetFamilyName 3 3 4 3\nEPDFFont_GetLastResortFont 3\nEPDFFont_GetMetrics 0 3 1 1\nEPDFFont_GetPostScriptName 3 3 4 3\nEPDFFont_GetProgramData 3 3 1 3\nEPDFFont_GetProgramFormat 3 3\nEPDFFont_GetProgramHash 0 3 4\nEPDFFont_GetWeight 3 3\nEPDFFont_IsEditingAuthorized 0 3\nEPDFFont_IsInstanced 0 3\nEPDFFont_IsItalic 0 3\nEPDFFont_RegisterFont 3 2 3 3 1\nEPDFFont_RegisterMemFont 3 2 3 3 1 3\nEPDFFont_RegisterMemFont64 3 2 3 3 1 3\nEPDFFont_SetLastResortFont 0 3\nEPDFFontFaces_Close - 1\nEPDFFontFaces_Count 3 1\nEPDFFontFaces_CountPrograms 3 1 3\nEPDFFontFaces_GetFamily 3 1 3 6 3\nEPDFFontFaces_GetProgramDisplayHash 0 1 3 3 4\nEPDFFontFaces_GetProgramEmbedded 3 1 3 3\nEPDFFontFaces_GetProgramEmbeddingPermission 3 1 3 3\nEPDFFontFaces_GetProgramFormat 3 1 3 3\nEPDFFontFaces_GetProgramHash 0 1 3 3 4\nEPDFFontFaces_GetProgramMetrics 0 1 3 3 1 1\nEPDFFontFaces_GetProgramObjNum 3 1 3 3\nEPDFFontFaces_GetProgramPostScriptName 3 1 3 3 4 3\nEPDFFontFaces_GetWeight 3 1 3\nEPDFFontFaces_IsItalic 0 1 3\nEPDFFontFaces_Load 1 1\nEPDFFontFaces_ProgramMapsUnicode 0 1 3 3\nEPDFFontResolution_Close - 1\nEPDFFontResolution_CountMissingCharacters 3 1\nEPDFFontResolution_GetBaseFontName 3 1 3 4 3\nEPDFFontResolution_GetFallbacks 3 1 3 1 3\nEPDFFontResolution_GetFamily 3 1 3 6 3\nEPDFFontResolution_GetMissingCharacter 3 1 3 6 3\nEPDFFontResolution_GetProgramDisplayHash 0 1 3 4\nEPDFFontResolution_GetProgramObjNum 3 1 3\nEPDFFontResolution_GetRegisteredFont 3 1 3\nEPDFFontResolution_GetSource 3 1 3\nEPDFFontResolution_GetWeight 3 1 3\nEPDFFontResolution_IsDegraded 0 1 3\nEPDFFontResolution_IsItalic 0 1 3\nEPDFForm_AttachWidget 0 1 3 3 2 1 3\nEPDFForm_ClearFieldEmbedMetadata 0 1 3\nEPDFForm_ClearFieldEmbedMetadataKey 0 1 3 2\nEPDFForm_CloseModel - 1\nEPDFForm_CountCalculationOrder 3 1\nEPDFForm_CountFieldDefaultValues 3 1 3\nEPDFForm_CountFieldOptions 3 1 3\nEPDFForm_CountFields 3 1\nEPDFForm_CountFieldValues 3 1 3\nEPDFForm_CountFieldWidgets 3 1 3\nEPDFForm_CreateField 3 1 3 1 3\nEPDFForm_DeleteField 0 1 3 1 3 1\nEPDFForm_DetachWidget 0 1 3 3\nEPDFForm_ExportFDF 3 1 1 3 1 3\nEPDFForm_ExportFieldRawToOwnedBuffer 1 1 3 1\nEPDFForm_ExportXFDF 3 1 1 3 1 3\nEPDFForm_GetCalculationOrderFieldIndex 3 1 3\nEPDFForm_GetFieldActionModel 1 1 3 3\nEPDFForm_GetFieldAlternateName 3 1 3 6 3\nEPDFForm_GetFieldDefaultValueAt 3 1 3 3 6 3\nEPDFForm_GetFieldDefaultValueKind 3 1 3\nEPDFForm_GetFieldEmbedMetadataBoolean 0 1 3 2 1\nEPDFForm_GetFieldEmbedMetadataJSON 3 1 3 6 3\nEPDFForm_GetFieldEmbedMetadataNumber 0 1 3 2 1\nEPDFForm_GetFieldEmbedMetadataString 3 1 3 2 6 3\nEPDFForm_GetFieldFamily 3 1 3\nEPDFForm_GetFieldFlags 3 1 3\nEPDFForm_GetFieldIndexByObjNum 3 1 3\nEPDFForm_GetFieldIndexForWidget 3 1 3\nEPDFForm_GetFieldMappingName 3 1 3 6 3\nEPDFForm_GetFieldMaxLen 3 1 3\nEPDFForm_GetFieldName 3 1 3 6 3\nEPDFForm_GetFieldObjNum 3 1 3\nEPDFForm_GetFieldOptionLabel 3 1 3 3 6 3\nEPDFForm_GetFieldOptionValue 3 1 3 3 6 3\nEPDFForm_GetFieldOrigin 3 1 3\nEPDFForm_GetFieldPartialName 3 1 3 6 3\nEPDFForm_GetFieldTopIndex 3 1 3\nEPDFForm_GetFieldValueAt 3 1 3 3 6 3\nEPDFForm_GetFieldValueKind 3 1 3\nEPDFForm_GetFieldWidgetExportValue 3 1 3 3 6 3\nEPDFForm_GetFieldWidgetObjNum 3 1 3 3\nEPDFForm_GetFieldWidgetOnState 3 1 3 3 1 3\nEPDFForm_GetFieldWidgetPageObjNum 3 1 3 3\nEPDFForm_GetFieldWidgetRect 0 1 3 3 1\nEPDFForm_GetFormKind 3 1\nEPDFForm_GetNeedAppearances 0 1\nEPDFForm_HasFieldEmbedMetadata 0 1 3\nEPDFForm_HasFieldValuesList 0 1 3\nEPDFForm_ImportFieldRaw 0 1 1 3\nEPDFForm_IsFieldOptionSelected 0 1 3 3\nEPDFForm_IsFieldWidgetChecked 0 1 3 3\nEPDFForm_LoadModel 1 1\nEPDFForm_RedrawFieldWidgets 0 1 3 1 3 1\nEPDFForm_Repair 0 1 3 1\nEPDFForm_SetCalculationOrder 0 1 1 3\nEPDFForm_SetFieldAlternateName 0 1 3 1\nEPDFForm_SetFieldAppearanceText 0 1 3 1 1 3 1\nEPDFForm_SetFieldDefaultValue 0 1 3 3 6 3\nEPDFForm_SetFieldDisplay 0 1 3 3 1 3 1\nEPDFForm_SetFieldEmbedMetadataBoolean 0 1 3 2 0\nEPDFForm_SetFieldEmbedMetadataJSON 0 1 3 1\nEPDFForm_SetFieldEmbedMetadataNumber 0 1 3 2 5\nEPDFForm_SetFieldEmbedMetadataString 0 1 3 2 1\nEPDFForm_SetFieldEventAction 0 1 3 3 1\nEPDFForm_SetFieldFlags 0 1 3 3 3\nEPDFForm_SetFieldMappingName 0 1 3 1\nEPDFForm_SetFieldMaxLen 0 1 3 3\nEPDFForm_SetFieldName 0 1 3 1\nEPDFForm_SetFieldOptions 0 1 3 6 6 3\nEPDFForm_SetFieldSelectedIndices 0 1 3 1 3\nEPDFForm_SetFieldValue 0 1 3 3 6 3\nEPDFForm_SetFieldWidgetsChecked 0 1 3 1 3 1 3 1\nEPDFImageObj_SetJpeg 0 1 3 1 4 3\nEPDFImageObj_SetPng 0 1 3 1 4 3\nEPDFLayer_AbortTransaction 0 1\nEPDFLayer_BeginTransaction 0 1\nEPDFLayer_CommitTransaction 0 1\nEPDFLayer_GetBaseDocument 1 1\nEPDFLayer_GetBaseSha256 0 1 4\nEPDFLayer_GetBirthName 0 1 3 1 1\nEPDFLayer_GetBirthObjectNumber 3 1 3 3\nEPDFLayer_GetLastObjectNumber 3 1\nEPDFLayer_GetPromotedObjectCount 3 1\nEPDFLayer_IsInTransaction 0 1\nEPDFLayer_IsObjectPromoted 0 1 3\nEPDFLayer_IsPagePromoted 0 1 3\nEPDFLayer_OpenLayer 1 1 1 2 1\nEPDFLayer_OpenLayerArtifact 1 1 1 2 1\nEPDFLayer_OpenLayerArtifactFromPath 1 1 4 2 1\nEPDFLayer_RaiseLastObjectNumber 0 1 3\nEPDFLayer_SaveDelta 0 1 1 1\nEPDFLayer_SaveDeltaEx 0 1 1 1 1\nEPDFLayer_SaveDeltaToOwnedBuffer 1 1 1 1\nEPDFLayer_SaveDeltaToOwnedBufferEx 1 1 1 1 1\nEPDFLayer_SaveLayerArtifact 0 1 1 1\nEPDFLayer_SaveLayerArtifactEx 0 1 1 1 1\nEPDFLayer_SaveLayerArtifactToOwnedBuffer 1 1 1 1\nEPDFLayer_SaveLayerArtifactToOwnedBufferEx 1 1 1 1 1\nEPDFMeasure_AddFormat 1 1 3 1 5\nEPDFMeasure_CountFormats 3 1 3\nEPDFMeasure_GetCYX 0 1 1\nEPDFMeasure_GetFormat 1 1 3 3\nEPDFMeasure_GetOrigin 0 1 1\nEPDFMeasure_GetRatio 3 1 6 3\nEPDFMeasure_GetSubtype 3 1\nEPDFMeasure_RemoveFormats 0 1 3\nEPDFMeasure_SetCYX 0 1 1\nEPDFMeasure_SetOrigin 0 1 1\nEPDFMeasure_SetRatio 0 1 1\nEPDFNamedDest_Remove 0 1 2\nEPDFNamedDest_SetDest 0 1 2 1\nEPDFNumberFormat_GetConversion 0 1 1\nEPDFNumberFormat_GetFixedDenominator 0 1 1\nEPDFNumberFormat_GetFraction 0 1 1\nEPDFNumberFormat_GetLabelPosition 0 1 1\nEPDFNumberFormat_GetPrecision 0 1 1\nEPDFNumberFormat_GetText 3 1 3 6 3\nEPDFNumberFormat_GetUnit 3 1 6 3\nEPDFNumberFormat_SetConversion 0 1 5\nEPDFNumberFormat_SetFixedDenominator 0 1 0\nEPDFNumberFormat_SetFraction 0 1 3\nEPDFNumberFormat_SetLabelPosition 0 1 3\nEPDFNumberFormat_SetPrecision 0 1 3\nEPDFNumberFormat_SetText 0 1 3 1\nEPDFNumberFormat_SetUnit 0 1 1\nEPDFObjectDiff_Close - 1\nEPDFObjectDiff_GetCount 3 1\nEPDFObjectDiff_GetEntry 0 1 3 1 1 1 1 1 1\nEPDFObjectDiff_GetReadStatus 3 1 3 3\nEPDFObjectDiff_GetReferrer 3 1 3 3 3 1 4 3\nEPDFObjectDiff_GetReferrerCount 3 1 3 3\nEPDFObjectDiff_GetRevisionHealth 0 1 3 1 1 1\nEPDFObjectDiff_GetValue 3 1 3 3 4 3 1\nEPDFOutline_CreateItem 3 1 3 3 3 1\nEPDFOutline_DeleteItem 0 1 3\nEPDFOutline_ExportItemRawToOwnedBuffer 1 1 3 1\nEPDFOutline_GetItem 1 1 3\nEPDFOutline_GetObjectNumber 3 1\nEPDFOutline_ImportItemRaw 0 1 1 3\nEPDFOutline_MoveItem 0 1 3 3 3\nEPDFOutline_SetAction 0 1 3 1\nEPDFOutline_SetColor 0 1 3 0 5 5 5\nEPDFOutline_SetOpen 0 1 3 0\nEPDFOutline_SetStyle 0 1 3 3\nEPDFOutline_SetTitle 0 1 3 1\nEPDFPage_AddViewport 1 1 1\nEPDFPage_AddViewportRaw 1 1 3 1\nEPDFPage_ApplyRedactions 0 1 1 3 1\nEPDFPage_ContinueLoad 3 1 3\nEPDFPage_CountViewports 3 1\nEPDFPage_CountViewportsRaw 3 1 3\nEPDFPage_CreateAnnot 1 1 3\nEPDFPage_CreateAnnotRaw 1 1 3 3 3\nEPDFPage_ExportAnnotationsAsDocument 1 1 1 3\nEPDFPage_ExportAnnotsRawToOwnedBuffer 1 1 3 1 3 1\nEPDFPage_ExportRawToOwnedBuffer 1 1 3 1\nEPDFPage_FindViewport 3 1 1\nEPDFPage_Flatten 3 1 3\nEPDFPage_FlattenAnnotations 3 1 1 3 3 1\nEPDFPage_GetAnnotByName 1 1 1\nEPDFPage_GetAnnotByObjectNumber 1 1 3\nEPDFPage_GetAnnotCountRaw 3 1 3\nEPDFPage_GetAnnotIndexByNameRaw 3 1 3 1\nEPDFPage_GetAnnotIndexByObjectNumberRaw 3 1 3 3\nEPDFPage_GetAnnotRaw 1 1 3 3\nEPDFPage_GetObjectNumber 3 1\nEPDFPage_GetParsedSize 0 1 1\nEPDFPage_GetViewport 1 1 3\nEPDFPage_GetViewportRaw 1 1 3 3\nEPDFPage_ImportAnnotsRaw 0 1 3 1 3\nEPDFPage_ImportRaw 0 1 1 3\nEPDFPage_InsertBlankRaw 0 1 3 8 8 3\nEPDFPage_IsContentCurrent 0 1\nEPDFPage_IsValid 0 1\nEPDFPage_MoveAnnots 0 1 1 3 3\nEPDFPage_MoveAnnotsRaw 0 1 3 1 3 3\nEPDFPage_PromoteInlineAnnotsRaw 3 1 3\nEPDFPage_RemoveAnnot 0 1 3\nEPDFPage_RemoveAnnotByName 0 1 1\nEPDFPage_RemoveAnnotByObjectNumber 0 1 3\nEPDFPage_RemoveAnnotRaw 0 1 3 3\nEPDFPage_RemoveViewport 0 1 3\nEPDFPage_RemoveViewportRaw 0 1 3 3\nEPDFPage_ResetRenderCache 0 1\nEPDFSig_CloseModel - 1\nEPDFSig_Count 3 1\nEPDFSig_DigestByteRange 0 1 1 3 4 1\nEPDFSig_DigestFileRange 0 1 1 3 4 1\nEPDFSig_GetByteRange 0 1 3 1\nEPDFSig_GetContents 3 1 3 1 3\nEPDFSig_GetCoverage 3 1 3\nEPDFSig_GetDocMDPPermission 3 1 3\nEPDFSig_GetFieldMDPAction 3 1 3\nEPDFSig_GetFieldName 3 1 3 6 3\nEPDFSig_GetFieldNameAt 3 1 3 3 3 6 3\nEPDFSig_GetFieldNameCount 3 1 3 3\nEPDFSig_GetFieldObjNum 3 1 3\nEPDFSig_GetIndexByFieldObjNum 3 1 3\nEPDFSig_GetKind 3 1 3\nEPDFSig_GetLockAction 3 1 3\nEPDFSig_GetLockPermission 3 1 3\nEPDFSig_GetRevisionIndex 3 1 3\nEPDFSig_GetSeedValueFilter 3 1 3 6 3\nEPDFSig_GetSeedValueListAt 3 1 3 3 3 6 3\nEPDFSig_GetSeedValueListCount 3 1 3 3\nEPDFSig_GetSeedValueMDP 3 1 3\nEPDFSig_GetSeedValuePresentFlags 3 1 3\nEPDFSig_GetSeedValueRequiredFlags 3 1 3\nEPDFSig_GetSeedValueVersion 3 1 3\nEPDFSig_GetString 3 1 3 3 6 3\nEPDFSig_GetValueObjNum 3 1 3\nEPDFSig_GetWidgetObjNum 3 1 3\nEPDFSig_GetWidgetPageObjNum 3 1 3\nEPDFSig_HasSeedValue 0 1 3\nEPDFSig_IsCatalogCertification 0 1 3\nEPDFSig_IsRevisionChainValid 0 1\nEPDFSig_IsSigned 0 1 3\nEPDFSig_LoadModel 1 1\nEPDFSig_Prepare 3 1 3 1\nEPDFSig_SaveCandidate 0 1 3 1 1 1 1\nEPDFSig_SaveCandidateToOwnedBuffer 1 1 3 1 1 1\nEPDFSig_Seal 0 4 7 7 7 3 1 1 1 4 1\nEPDFSig_SealSpan 0 4 7 7 7 1 1 1\nEPDFSig_SetFieldLock 0 1 3 3 6 3 3\nEPDFSig_WriteContents 0 4 7 7 7 4 3\nEPDFText_GetCharGeometry 0 1 3 1\nEPDFText_GetCharToTextMap 3 1 1 3\nEPDFText_GetPageGeometry 3 1 3 3 1\nEPDFText_GetTextFull 3 1 1 3\nEPDFText_RedactInQuads 0 1 1 3 0 0\nEPDFText_RedactInRect 0 1 1 0 0\nEPDFViewport_AddMeasure 1 1\nEPDFViewport_Close - 1\nEPDFViewport_GetBBox 0 1 1\nEPDFViewport_GetMeasure 1 1\nEPDFViewport_GetName 3 1 6 3\nEPDFViewport_RemoveMeasure 0 1\nEPDFViewport_SetBBox 0 1 1\nEPDFViewport_SetName 0 1 1\nFORM_CanRedo 0 1 1\nFORM_CanUndo 0 1 1\nFORM_DoDocumentAAction - 1 3\nFORM_DoDocumentJSAction - 1\nFORM_DoDocumentOpenAction - 1\nFORM_DoPageAAction - 1 1 3\nFORM_ForceToKillFocus 0 1\nFORM_GetFocusedAnnot 0 1 1 1\nFORM_GetFocusedText 3 1 1 1 3\nFORM_GetSelectedText 3 1 1 1 3\nFORM_GetTextDirection 3 1 1\nFORM_IsIndexSelected 0 1 1 3\nFORM_OnAfterLoadPage - 1 1\nFORM_OnBeforeClosePage - 1 1\nFORM_OnChar 0 1 1 3 3\nFORM_OnFocus 0 1 1 3 8 8\nFORM_OnKeyDown 0 1 1 3 3\nFORM_OnKeyUp 0 1 1 3 3\nFORM_OnLButtonDoubleClick 0 1 1 3 8 8\nFORM_OnLButtonDown 0 1 1 3 8 8\nFORM_OnLButtonUp 0 1 1 3 8 8\nFORM_OnMouseMove 0 1 1 3 8 8\nFORM_OnMouseWheel 0 1 1 3 1 3 3\nFORM_OnRButtonDown 0 1 1 3 8 8\nFORM_OnRButtonUp 0 1 1 3 8 8\nFORM_Redo 0 1 1\nFORM_ReplaceAndKeepSelection - 1 1 1\nFORM_ReplaceSelection - 1 1 1\nFORM_SelectAllText 0 1 1\nFORM_SetFocusedAnnot 0 1 1\nFORM_SetIndexSelected 0 1 1 3 0\nFORM_SetTextDirection 0 1 1 3\nFORM_Undo 0 1 1\nFPDF_AddInstalledFont - 1 4 3\nFPDF_CloseDocument - 1\nFPDF_ClosePage - 1\nFPDF_CloseXObject - 1\nFPDF_CopyViewerPreferences 0 1 1\nFPDF_CountNamedDests 3 1\nFPDF_CreateClipPath 1 5 5 5 5\nFPDF_CreateNewDocument 1\nFPDF_DestroyClipPath - 1\nFPDF_DestroyLibrary -\nFPDF_DeviceToPage 0 1 3 3 3 3 3 3 3 1 1\nFPDF_DocumentHasValidCrossReferenceTable 0 1\nFPDF_FFLDraw - 1 1 1 3 3 3 3 3 3\nFPDF_FreeDefaultSystemFontInfo - 1\nFPDF_GetDefaultSystemFontInfo 1\nFPDF_GetDefaultTTFMap 1\nFPDF_GetDefaultTTFMapCount 3\nFPDF_GetDefaultTTFMapEntry 1 3\nFPDF_GetDocPermissions 3 1\nFPDF_GetDocUserPermissions 3 1\nFPDF_GetFileIdentifier 3 1 3 1 3\nFPDF_GetFileVersion 0 1 1\nFPDF_GetFormType 3 1\nFPDF_GetLastError 3\nFPDF_GetMetaText 3 1 2 1 3\nFPDF_GetNamedDest 1 1 3 1 1\nFPDF_GetNamedDestByName 1 1 2\nFPDF_GetPageAAction 1 1 3\nFPDF_GetPageBoundingBox 0 1 1\nFPDF_GetPageCount 3 1\nFPDF_GetPageHeight 8 1\nFPDF_GetPageHeightF 5 1\nFPDF_GetPageLabel 3 1 3 1 3\nFPDF_GetPageSizeByIndex 3 1 3 1 1\nFPDF_GetPageSizeByIndexF 0 1 3 1\nFPDF_GetPageWidth 8 1\nFPDF_GetPageWidthF 5 1\nFPDF_GetSecurityHandlerRevision 3 1\nFPDF_GetSignatureCount 3 1\nFPDF_GetSignatureObject 1 1 3\nFPDF_GetTrailerEnds 3 1 1 3\nFPDF_GetXFAPacketContent 0 1 3 1 3 1\nFPDF_GetXFAPacketCount 3 1\nFPDF_GetXFAPacketName 3 1 3 1 3\nFPDF_ImportNPagesToOne 1 1 5 5 3 3\nFPDF_ImportPages 0 1 1 2 3\nFPDF_ImportPagesByIndex 0 1 1 1 3 3\nFPDF_InitLibrary -\nFPDF_InitLibraryWithConfig - 1\nFPDF_LoadCustomDocument 1 1 2\nFPDF_LoadDocument 1 4 2\nFPDF_LoadMemDocument 1 1 3 2\nFPDF_LoadMemDocument64 1 1 3 2\nFPDF_LoadPage 1 1 3\nFPDF_LoadXFA 0 1\nFPDF_MovePages 0 1 1 3 3\nFPDF_NewFormObjectFromXObject 1 1\nFPDF_NewXObjectFromPage 1 1 1 3\nFPDF_PageToDevice 0 1 3 3 3 3 3 8 8 1 1\nFPDF_RemoveFormFieldHighlight - 1\nFPDF_RenderPage_Close - 1\nFPDF_RenderPage_Continue 3 1 1\nFPDF_RenderPageBitmap - 1 1 3 3 3 3 3 3\nFPDF_RenderPageBitmap_Start 3 1 1 3 3 3 3 3 3 1\nFPDF_RenderPageBitmapWithColorScheme_Start 3 1 1 3 3 3 3 3 3 1 1\nFPDF_RenderPageBitmapWithMatrix - 1 1 1 1 3\nFPDF_SaveAsCopy 0 1 1 3\nFPDF_SaveWithVersion 0 1 1 3 3\nFPDF_SetFormFieldHighlightAlpha - 1 3\nFPDF_SetFormFieldHighlightColor - 1 3 3\nFPDF_SetSandBoxPolicy - 3 0\nFPDF_SetSystemFontInfo - 1\nFPDF_StructElement_Attr_CountChildren 3 1\nFPDF_StructElement_Attr_GetBlobValue 0 1 1 3 1\nFPDF_StructElement_Attr_GetBooleanValue 0 1 1\nFPDF_StructElement_Attr_GetChildAtIndex 1 1 3\nFPDF_StructElement_Attr_GetCount 3 1\nFPDF_StructElement_Attr_GetName 0 1 3 1 3 1\nFPDF_StructElement_Attr_GetNumberValue 0 1 1\nFPDF_StructElement_Attr_GetStringValue 0 1 1 3 1\nFPDF_StructElement_Attr_GetType 3 1\nFPDF_StructElement_Attr_GetValue 1 1 2\nFPDF_StructElement_CountChildren 3 1\nFPDF_StructElement_GetActualText 3 1 1 3\nFPDF_StructElement_GetAltText 3 1 1 3\nFPDF_StructElement_GetAttributeAtIndex 1 1 3\nFPDF_StructElement_GetAttributeCount 3 1\nFPDF_StructElement_GetChildAtIndex 1 1 3\nFPDF_StructElement_GetChildMarkedContentID 3 1 3\nFPDF_StructElement_GetExpansion 3 1 1 3\nFPDF_StructElement_GetID 3 1 1 3\nFPDF_StructElement_GetLang 3 1 1 3\nFPDF_StructElement_GetMarkedContentID 3 1\nFPDF_StructElement_GetMarkedContentIdAtIndex 3 1 3\nFPDF_StructElement_GetMarkedContentIdCount 3 1\nFPDF_StructElement_GetObjType 3 1 1 3\nFPDF_StructElement_GetParent 1 1\nFPDF_StructElement_GetRawType 3 1 6 3\nFPDF_StructElement_GetStringAttribute 3 1 2 1 3\nFPDF_StructElement_GetTitle 3 1 1 3\nFPDF_StructElement_GetType 3 1 1 3\nFPDF_StructTree_Close - 1\nFPDF_StructTree_CountChildren 3 1\nFPDF_StructTree_GetChildAtIndex 1 1 3\nFPDF_StructTree_GetForPage 1 1\nFPDF_VIEWERREF_GetDuplex 3 1\nFPDF_VIEWERREF_GetName 3 1 2 4 3\nFPDF_VIEWERREF_GetNumCopies 3 1\nFPDF_VIEWERREF_GetPrintPageRange 1 1\nFPDF_VIEWERREF_GetPrintPageRangeCount 3 1\nFPDF_VIEWERREF_GetPrintPageRangeElement 3 1 3\nFPDF_VIEWERREF_GetPrintScaling 0 1\nFPDFAction_GetDest 1 1 1\nFPDFAction_GetFilePath 3 1 1 3\nFPDFAction_GetType 3 1\nFPDFAction_GetURIPath 3 1 1 1 3\nFPDFAnnot_AddFileAttachment 1 1 1\nFPDFAnnot_AddInkStroke 3 1 1 3\nFPDFAnnot_AppendAttachmentPoints 0 1 1\nFPDFAnnot_AppendObject 0 1 1\nFPDFAnnot_CountAttachmentPoints 3 1\nFPDFAnnot_GetAP 3 1 3 6 3\nFPDFAnnot_GetAttachmentPoints 0 1 3 1\nFPDFAnnot_GetBorder 0 1 1 1 1\nFPDFAnnot_GetColor 0 1 3 1 1 1 1\nFPDFAnnot_GetFileAttachment 1 1\nFPDFAnnot_GetFlags 3 1\nFPDFAnnot_GetFocusableSubtypes 0 1 1 3\nFPDFAnnot_GetFocusableSubtypesCount 3 1\nFPDFAnnot_GetFontColor 0 1 1 1 1 1\nFPDFAnnot_GetFontSize 0 1 1 1\nFPDFAnnot_GetFormAdditionalActionJavaScript 3 1 1 3 6 3\nFPDFAnnot_GetFormControlCount 3 1 1\nFPDFAnnot_GetFormControlIndex 3 1 1\nFPDFAnnot_GetFormFieldAlternateName 3 1 1 6 3\nFPDFAnnot_GetFormFieldAtPoint 1 1 1 1\nFPDFAnnot_GetFormFieldExportValue 3 1 1 6 3\nFPDFAnnot_GetFormFieldFlags 3 1 1\nFPDFAnnot_GetFormFieldName 3 1 1 6 3\nFPDFAnnot_GetFormFieldType 3 1 1\nFPDFAnnot_GetFormFieldValue 3 1 1 6 3\nFPDFAnnot_GetInkListCount 3 1\nFPDFAnnot_GetInkListPath 3 1 3 1 3\nFPDFAnnot_GetLine 0 1 1 1\nFPDFAnnot_GetLink 1 1\nFPDFAnnot_GetLinkedAnnot 1 1 2\nFPDFAnnot_GetNumberValue 0 1 2 1\nFPDFAnnot_GetObject 1 1 3\nFPDFAnnot_GetObjectCount 3 1\nFPDFAnnot_GetOptionCount 3 1 1\nFPDFAnnot_GetOptionLabel 3 1 1 3 6 3\nFPDFAnnot_GetRect 0 1 1\nFPDFAnnot_GetStringValue 3 1 2 6 3\nFPDFAnnot_GetSubtype 3 1\nFPDFAnnot_GetValueType 3 1 2\nFPDFAnnot_GetVertices 3 1 1 3\nFPDFAnnot_HasAttachmentPoints 0 1\nFPDFAnnot_HasKey 0 1 2\nFPDFAnnot_IsChecked 0 1 1\nFPDFAnnot_IsObjectSupportedSubtype 0 3\nFPDFAnnot_IsOptionSelected 0 1 1 3\nFPDFAnnot_IsSupportedSubtype 0 3\nFPDFAnnot_RemoveInkList 0 1\nFPDFAnnot_RemoveObject 0 1 3\nFPDFAnnot_SetAP 0 1 3 1\nFPDFAnnot_SetAttachmentPoints 0 1 3 1\nFPDFAnnot_SetBorder 0 1 5 5 5\nFPDFAnnot_SetColor 0 1 3 3 3 3 3\nFPDFAnnot_SetFlags 0 1 3\nFPDFAnnot_SetFocusableSubtypes 0 1 1 3\nFPDFAnnot_SetFontColor 0 1 1 3 3 3\nFPDFAnnot_SetFormFieldFlags 0 1 1 3\nFPDFAnnot_SetRect 0 1 1\nFPDFAnnot_SetStringValue 0 1 2 1\nFPDFAnnot_SetURI 0 1 4\nFPDFAnnot_UpdateObject 0 1 1\nFPDFAttachment_GetAFRelationship 3 1 6 3\nFPDFAttachment_GetDescription 3 1 6 3\nFPDFAttachment_GetFile 0 1 1 3 1\nFPDFAttachment_GetName 3 1 6 3\nFPDFAttachment_GetStringValue 3 1 2 6 3\nFPDFAttachment_GetSubtype 3 1 6 3\nFPDFAttachment_GetValueType 3 1 2\nFPDFAttachment_HasKey 0 1 2\nFPDFAttachment_SetDescription 0 1 1\nFPDFAttachment_SetFile 0 1 1 1 3\nFPDFAttachment_SetStringValue 0 1 2 1\nFPDFAvail_Create 1 1 1\nFPDFAvail_Destroy - 1\nFPDFAvail_GetDocument 1 1 2\nFPDFAvail_GetFirstPageNum 3 1\nFPDFAvail_IsDocAvail 3 1 1\nFPDFAvail_IsFormAvail 3 1 1\nFPDFAvail_IsLinearized 3 1\nFPDFAvail_IsPageAvail 3 1 3 1\nFPDFBitmap_Create 1 3 3 3\nFPDFBitmap_CreateEx 1 3 3 3 1 3\nFPDFBitmap_Destroy - 1\nFPDFBitmap_FillRect 0 1 3 3 3 3 3\nFPDFBitmap_GetBuffer 1 1\nFPDFBitmap_GetFormat 3 1\nFPDFBitmap_GetHeight 3 1\nFPDFBitmap_GetStride 3 1\nFPDFBitmap_GetWidth 3 1\nFPDFBookmark_Find 1 1 1\nFPDFBookmark_GetAction 1 1\nFPDFBookmark_GetColor 0 1 1 1 1\nFPDFBookmark_GetCount 3 1\nFPDFBookmark_GetDest 1 1 1\nFPDFBookmark_GetFirstChild 1 1 1\nFPDFBookmark_GetNextSibling 1 1 1\nFPDFBookmark_GetStyle 3 1\nFPDFBookmark_GetTitle 3 1 1 3\nFPDFCatalog_GetLanguage 3 1 6 3\nFPDFCatalog_IsTagged 0 1\nFPDFCatalog_SetLanguage 0 1 1\nFPDFClipPath_CountPaths 3 1\nFPDFClipPath_CountPathSegments 3 1 3\nFPDFClipPath_GetPathSegment 1 1 3 3\nFPDFDest_GetDestPageIndex 3 1 1\nFPDFDest_GetLocationInPage 0 1 1 1 1 1 1 1\nFPDFDest_GetView 3 1 1 1\nFPDFDoc_AddAttachment 1 1 1\nFPDFDoc_CloseJavaScriptAction - 1\nFPDFDoc_DeleteAttachment 0 1 3\nFPDFDOC_ExitFormFillEnvironment - 1\nFPDFDoc_GetAttachment 1 1 3\nFPDFDoc_GetAttachmentCount 3 1\nFPDFDoc_GetJavaScriptAction 1 1 3\nFPDFDoc_GetJavaScriptActionCount 3 1\nFPDFDoc_GetPageMode 3 1\nFPDFDOC_InitFormFillEnvironment 1 1 1\nFPDFFont_Close - 1\nFPDFFont_GetAscent 0 1 5 1\nFPDFFont_GetBaseFontName 3 1 4 3\nFPDFFont_GetDescent 0 1 5 1\nFPDFFont_GetFamilyName 3 1 4 3\nFPDFFont_GetFlags 3 1\nFPDFFont_GetFontData 0 1 4 3 1\nFPDFFont_GetGlyphPath 1 1 3 5\nFPDFFont_GetGlyphWidth 0 1 3 5 1\nFPDFFont_GetIsEmbedded 3 1\nFPDFFont_GetItalicAngle 0 1 1\nFPDFFont_GetWeight 3 1\nFPDFFormObj_CountObjects 3 1\nFPDFFormObj_GetObject 1 1 3\nFPDFFormObj_RemoveObject 0 1 1\nFPDFGlyphPath_CountGlyphSegments 3 1\nFPDFGlyphPath_GetGlyphPathSegment 1 1 3\nFPDFImageObj_GetBitmap 1 1\nFPDFImageObj_GetIccProfileDataDecoded 0 1 1 4 3 1\nFPDFImageObj_GetImageDataDecoded 3 1 1 3\nFPDFImageObj_GetImageDataRaw 3 1 1 3\nFPDFImageObj_GetImageFilter 3 1 3 1 3\nFPDFImageObj_GetImageFilterCount 3 1\nFPDFImageObj_GetImageMetadata 0 1 1 1\nFPDFImageObj_GetImagePixelSize 0 1 1 1\nFPDFImageObj_GetRenderedBitmap 1 1 1 1\nFPDFImageObj_LoadJpegFile 0 1 3 1 1\nFPDFImageObj_LoadJpegFileInline 0 1 3 1 1\nFPDFImageObj_SetBitmap 0 1 3 1 1\nFPDFImageObj_SetMatrix 0 1 8 8 8 8 8 8\nFPDFJavaScriptAction_GetName 3 1 6 3\nFPDFJavaScriptAction_GetScript 3 1 6 3\nFPDFLink_CloseWebLinks - 1\nFPDFLink_CountQuadPoints 3 1\nFPDFLink_CountRects 3 1 3\nFPDFLink_CountWebLinks 3 1\nFPDFLink_Enumerate 0 1 1 1\nFPDFLink_GetAction 1 1\nFPDFLink_GetAnnot 1 1 1\nFPDFLink_GetAnnotRect 0 1 1\nFPDFLink_GetDest 1 1 1\nFPDFLink_GetLinkAtPoint 1 1 8 8\nFPDFLink_GetLinkZOrderAtPoint 3 1 8 8\nFPDFLink_GetQuadPoints 0 1 3 1\nFPDFLink_GetRect 0 1 3 3 1 1 1 1\nFPDFLink_GetTextRange 0 1 3 1 1\nFPDFLink_GetURL 3 1 3 1 3\nFPDFLink_LoadWebLinks 1 1\nFPDFPage_CloseAnnot - 1\nFPDFPage_CountObjects 3 1\nFPDFPage_CreateAnnot 1 1 3\nFPDFPage_Delete - 1 3\nFPDFPage_Flatten 3 1 3\nFPDFPage_FormFieldZOrderAtPoint 3 1 1 8 8\nFPDFPage_GenerateContent 0 1\nFPDFPage_GetAnnot 1 1 3\nFPDFPage_GetAnnotCount 3 1\nFPDFPage_GetAnnotIndex 3 1 1\nFPDFPage_GetArtBox 0 1 1 1 1 1\nFPDFPage_GetBleedBox 0 1 1 1 1 1\nFPDFPage_GetCropBox 0 1 1 1 1 1\nFPDFPage_GetDecodedThumbnailData 3 1 1 3\nFPDFPage_GetMediaBox 0 1 1 1 1 1\nFPDFPage_GetObject 1 1 3\nFPDFPage_GetRawThumbnailData 3 1 1 3\nFPDFPage_GetRotation 3 1\nFPDFPage_GetThumbnailAsBitmap 1 1\nFPDFPage_GetTrimBox 0 1 1 1 1 1\nFPDFPage_HasFormFieldAtPoint 3 1 1 8 8\nFPDFPage_HasTransparency 0 1\nFPDFPage_InsertClipPath - 1 1\nFPDFPage_InsertObject 0 1 1\nFPDFPage_InsertObjectAtIndex 0 1 1 3\nFPDFPage_New 1 1 3 8 8\nFPDFPage_RemoveAnnot 0 1 3\nFPDFPage_RemoveObject 0 1 1\nFPDFPage_SetArtBox - 1 5 5 5 5\nFPDFPage_SetBleedBox - 1 5 5 5 5\nFPDFPage_SetCropBox - 1 5 5 5 5\nFPDFPage_SetMediaBox - 1 5 5 5 5\nFPDFPage_SetRotation - 1 3\nFPDFPage_SetTrimBox - 1 5 5 5 5\nFPDFPage_TransformAnnots - 1 8 8 8 8 8 8\nFPDFPage_TransFormWithClip 0 1 1 1\nFPDFPageObj_AddExistingMark 0 1 1\nFPDFPageObj_AddMark 1 1 2\nFPDFPageObj_CountMarks 3 1\nFPDFPageObj_CreateNewPath 1 5 5\nFPDFPageObj_CreateNewRect 1 5 5 5 5\nFPDFPageObj_CreateTextObj 1 1 1 5\nFPDFPageObj_Destroy - 1\nFPDFPageObj_GetBounds 0 1 1 1 1 1\nFPDFPageObj_GetClipPath 1 1\nFPDFPageObj_GetDashArray 0 1 1 3\nFPDFPageObj_GetDashCount 3 1\nFPDFPageObj_GetDashPhase 0 1 1\nFPDFPageObj_GetFillColor 0 1 1 1 1 1\nFPDFPageObj_GetIsActive 0 1 1\nFPDFPageObj_GetLineCap 3 1\nFPDFPageObj_GetLineJoin 3 1\nFPDFPageObj_GetMark 1 1 3\nFPDFPageObj_GetMarkedContentID 3 1\nFPDFPageObj_GetMatrix 0 1 1\nFPDFPageObj_GetRenderedFillPattern 1 1 1\nFPDFPageObj_GetRenderedStrokePattern 1 1 1\nFPDFPageObj_GetRotatedBounds 0 1 1\nFPDFPageObj_GetStrokeColor 0 1 1 1 1 1\nFPDFPageObj_GetStrokeWidth 0 1 1\nFPDFPageObj_GetType 3 1\nFPDFPageObj_HasTransparency 0 1\nFPDFPageObj_NewImageObj 1 1\nFPDFPageObj_NewTextObj 1 1 2 5\nFPDFPageObj_RemoveMark 0 1 1\nFPDFPageObj_SetBlendMode - 1 2\nFPDFPageObj_SetDashArray 0 1 1 3 5\nFPDFPageObj_SetDashPhase 0 1 5\nFPDFPageObj_SetFillColor 0 1 3 3 3 3\nFPDFPageObj_SetIsActive 0 1 0\nFPDFPageObj_SetLineCap 0 1 3\nFPDFPageObj_SetLineJoin 0 1 3\nFPDFPageObj_SetMatrix 0 1 1\nFPDFPageObj_SetStrokeColor 0 1 3 3 3 3\nFPDFPageObj_SetStrokeWidth 0 1 5\nFPDFPageObj_Transform - 1 8 8 8 8 8 8\nFPDFPageObj_TransformClipPath - 1 8 8 8 8 8 8\nFPDFPageObj_TransformF 0 1 1\nFPDFPageObjMark_CountParams 3 1\nFPDFPageObjMark_GetName 0 1 6 3 1\nFPDFPageObjMark_GetParamBlobValue 0 1 2 4 3 1\nFPDFPageObjMark_GetParamFloatValue 0 1 2 1\nFPDFPageObjMark_GetParamIntValue 0 1 2 1\nFPDFPageObjMark_GetParamKey 0 1 3 6 3 1\nFPDFPageObjMark_GetParamStringValue 0 1 2 6 3 1\nFPDFPageObjMark_GetParamValueType 3 1 2\nFPDFPageObjMark_RemoveParam 0 1 1 2\nFPDFPageObjMark_SetBlobParam 0 1 1 1 2 4 3\nFPDFPageObjMark_SetFloatParam 0 1 1 1 2 5\nFPDFPageObjMark_SetIntParam 0 1 1 1 2 3\nFPDFPageObjMark_SetStringParam 0 1 1 1 2 2\nFPDFPath_BezierTo 0 1 5 5 5 5 5 5\nFPDFPath_Close 0 1\nFPDFPath_CountSegments 3 1\nFPDFPath_GetBezierControlPoints 0 1 3 1 1\nFPDFPath_GetDrawMode 0 1 1 1\nFPDFPath_GetPathSegment 1 1 3\nFPDFPath_LineTo 0 1 5 5\nFPDFPath_MoveTo 0 1 5 5\nFPDFPath_SetDrawMode 0 1 3 0\nFPDFPathSegment_GetClose 0 1\nFPDFPathSegment_GetPoint 0 1 1 1\nFPDFPathSegment_GetType 3 1\nFPDFSignatureObj_GetByteRange 3 1 1 3\nFPDFSignatureObj_GetContents 3 1 1 3\nFPDFSignatureObj_GetDocMDPPermission 3 1\nFPDFSignatureObj_GetReason 3 1 1 3\nFPDFSignatureObj_GetSubFilter 3 1 4 3\nFPDFSignatureObj_GetTime 3 1 4 3\nFPDFText_ClosePage - 1\nFPDFText_CountChars 3 1\nFPDFText_CountRects 3 1 3 3\nFPDFText_FindClose - 1\nFPDFText_FindNext 0 1\nFPDFText_FindPrev 0 1\nFPDFText_FindStart 1 1 1 3 3\nFPDFText_GetBoundedText 3 1 8 8 8 8 1 3\nFPDFText_GetCharAngle 5 1 3\nFPDFText_GetCharBox 0 1 3 1 1 1 1\nFPDFText_GetCharIndexAtPos 3 1 8 8 8 8\nFPDFText_GetCharIndexFromTextIndex 3 1 3\nFPDFText_GetCharOrigin 0 1 3 1 1\nFPDFText_GetFillColor 0 1 3 1 1 1 1\nFPDFText_GetFontInfo 3 1 3 1 3 1\nFPDFText_GetFontSize 8 1 3\nFPDFText_GetFontWeight 3 1 3\nFPDFText_GetLooseCharBox 0 1 3 1\nFPDFText_GetMatrix 0 1 3 1\nFPDFText_GetRect 0 1 3 1 1 1 1\nFPDFText_GetSchCount 3 1\nFPDFText_GetSchResultIndex 3 1\nFPDFText_GetStrokeColor 0 1 3 1 1 1 1\nFPDFText_GetText 3 1 3 3 1\nFPDFText_GetTextIndexFromCharIndex 3 1 3\nFPDFText_GetTextObject 1 1 3\nFPDFText_GetUnicode 3 1 3\nFPDFText_HasUnicodeMapError 3 1 3\nFPDFText_IsGenerated 3 1 3\nFPDFText_IsHyphen 3 1 3\nFPDFText_LoadCidType2Font 1 1 4 3 2 4 3\nFPDFText_LoadFont 1 1 4 3 3 0\nFPDFText_LoadPage 1 1\nFPDFText_LoadStandardFont 1 1 2\nFPDFText_SetCharcodes 0 1 1 3\nFPDFText_SetPositions 0 1 1 3\nFPDFText_SetText 0 1 1\nFPDFTextObj_GetFont 1 1\nFPDFTextObj_GetFontSize 0 1 1\nFPDFTextObj_GetRenderedBitmap 1 1 1 1 5\nFPDFTextObj_GetText 3 1 1 6 3\nFPDFTextObj_GetTextRenderMode 3 1\nFPDFTextObj_SetFontSize 0 1 5\nFPDFTextObj_SetTextRenderMode 0 1 3\n`);function aR(e){return BigInt("number"==typeof e?e>>>0:e)}function aT(e){return Number(e)}function aB(e){switch(e){case"i8":return"i8";case"i16":return"i16";case"i32":return"i32";case"i64":return"i64";case"f32":return"float";case"f64":return"double";case"ptr":return"*"}}async function aL(e={}){let t,n,r=await Promise.resolve().then(()=>(x(),k)),i=r.default??r,o=await i((t={...e.wasm??{}},void 0!==e.wasmBinary&&void 0===t.wasmBinary&&(t.wasmBinary=e.wasmBinary instanceof Uint8Array?e.wasmBinary:new Uint8Array(e.wasmBinary)),void 0!==(n=e.wasmUrl)&&void 0===t.locateFile&&(t.locateFile=(e,t)=>e.endsWith(".wasm")?n:t+e),void 0!==t.wasmBinary&&void 0===t.locateFile&&(t.locateFile=(e,t)=>e.endsWith(".wasm")?e:t+e),t)),a=function(e){let t=e._malloc??e.wasmExports?.malloc,n=e._free??e.wasmExports?.free;if(!t||!n)throw Error("WASM runtime does not expose malloc/free");return{alloc:e=>aR(t(e)),free(e){n(aT(e))},readBytes:(t,n)=>e.HEAPU8.slice(aT(t),aT(t)+n),writeBytes(t,n){e.HEAPU8.set(n,aT(t))},readU8String:t=>e.UTF8ToString?.(aT(t))??"",writeU8String(n){let r=new TextEncoder().encode(`${n}\\0`),i=aR(t(r.length));return e.HEAPU8.set(r,aT(i)),i},readU16String:t=>e.UTF16ToString?.(aT(t))??"",writeU16String(n){let r=(n.length+1)*2,i=aR(t(r));return e.stringToUTF16?.(n,aT(i),r),i},peek(t,n,r=0){let i=e.getValue?.(aT(t)+r,aB(n))??0;return"ptr"===n?aR(i):i},poke(t,n,r,i=0){let o="ptr"===n&&"bigint"==typeof r?Number(r):r;e.setValue?.(aT(t)+i,o,aB(n))}}}(o),s={register(e,t){if(!o.addFunction)throw Error("WASM runtime does not expose addFunction");return BigInt(o.addFunction(t,e))},dispose(e){o.removeFunction?.(aT(e))}};return{kind:"wasm",platform:"wasm32",mem:a,cb:s,fileAccess:{fromMemory(e){let t=e instanceof Uint8Array?e:new Uint8Array(e);if(t.byteLength>0xffffffff)throw RangeError("FPDF_FILEACCESS on wasm supports files up to 4 GiB");let n=a.alloc(12),r=null,i=!1;try{return r=s.register("iiiii",(e,n,r,i)=>{let o=Number(n),s=Number(i);return!Number.isSafeInteger(o)||!Number.isSafeInteger(s)||o<0||s<0||o+s>t.byteLength?0:(a.writeBytes(aR(r),t.subarray(o,o+s)),1)}),a.poke(n,"i32",t.byteLength,0),a.poke(n,"i32",aT(r),4),a.poke(n,"i32",0,8),{ptr:n,close(){i||(i=!0,s.dispose(r),a.free(n))}}}catch(e){throw r&&s.dispose(r),a.free(n),e}},fromNodeFile(){throw Error("fromNodeFile() is only available on the native Node runtime")},readRange(){throw Error("readRange() is only available on the native Node runtime")},sizeOf(){throw Error("sizeOf() is only available on the native Node runtime")}},fileWrite:{toNodeFile(){throw Error("toNodeFile() is only available on the native Node runtime")},writeRange(){throw Error("writeRange() is only available on the native Node runtime")},appendBytes(){throw Error("appendBytes() is only available on the native Node runtime")},removeFile(){throw Error("removeFile() is only available on the native Node runtime")}},fn:function(e){let t={};for(let[n,r]of Object.entries(aM)){let i=r.params.some(e=>"i64"===e.wasm.kind),o=e=>(...t)=>{let n=t.map((e,t)=>{var n;return n=r.params[t],n&&"Ptr"===n.ts&&"bigint"==typeof e?Number(e):e});var o=r.result,a=e(...i?function(e,t){let n=[];return e.params.forEach((e,r)=>{if("i64"===e.wasm.kind){let e=BigInt(t[r]??0);n.push(Number(4294967295n&e),Number(e>>32n&4294967295n))}else n.push(t[r])}),n}(r,n):n);if(o)return"Ptr"===o.ts&&"number"==typeof a?aR(a):"bigint"===o.ts&&"number"==typeof a?BigInt(a):a};if(e.cwrap){let i=r.params.flatMap(e=>"i64"===e.wasm.kind?["number","number"]:[e.wasm.cwrap]);t[n]=o(e.cwrap(n,r.result?r.result.wasm.cwrap:null,i))}else"function"==typeof e[`_${n}`]&&(t[n]=o(e[`_${n}`].bind(e)))}return t}(o),async destroy(){o._free=o._free}}}async function a$(e={}){return aL(e)}var az={};function aU(e){return e}function aV(e){return e}function aW(){return e=>e}function aq(e){}function aH(e){throw Error("Unexpected value in exhaustive check")}function aK(e){}function aZ(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function aJ(e,t="|"){return e.map(e=>sy(e)).join(t)}function aQ(e,t){return"bigint"==typeof t?t.toString():t}v(az,{BIGINT_FORMAT_RANGES:()=>sA,CONSTANT_CATCH:()=>le,Class:()=>s1,NUMBER_FORMAT_RANGES:()=>sE,aborted:()=>sj,allowsEval:()=>sc,assert:()=>aK,assertEqual:()=>aU,assertIs:()=>aq,assertNever:()=>aH,assertNotEqual:()=>aV,assignProp:()=>a4,attachSchema:()=>sL,base64ToUint8Array:()=>sZ,base64urlToUint8Array:()=>sQ,cached:()=>aY,captureStackTrace:()=>su,cleanEnum:()=>sK,cleanRegex:()=>a1,clone:()=>sP,cloneDef:()=>sr,codePointLength:()=>sV,constantCatch:()=>lt,createTransparentProxy:()=>sb,defineLazy:()=>a6,defineLazyInternal:()=>s7,derived:()=>s5,esc:()=>ss,escapeRegex:()=>s_,explicitlyAborted:()=>sM,extend:()=>sx,finalizeIssue:()=>s$,floatSafeRemainder:()=>a3,getElementAtPath:()=>si,getEnumValues:()=>aZ,getLengthableOrigin:()=>sW,getParsedType:()=>sh,getSizableOrigin:()=>sz,hexToUint8Array:()=>sY,hide:()=>s6,installLazyProp:()=>s9,isObject:()=>sd,isPlainObject:()=>sf,issue:()=>sH,joinValues:()=>aJ,jsonStringifyReplacer:()=>aQ,members:()=>s3,merge:()=>sI,mergeDefs:()=>sn,normalizeParams:()=>sD,nullish:()=>a0,numKeys:()=>sp,objectClone:()=>a5,omit:()=>sk,optionalKeys:()=>sw,own:()=>s2,parsedType:()=>sq,partial:()=>sN,pick:()=>sv,prefixIssues:()=>sR,primitiveTypes:()=>sg,promiseAllObject:()=>so,propertyKeyTypes:()=>sF,randomString:()=>sa,rawShape:()=>a8,required:()=>sC,safeExtend:()=>sO,shallowClone:()=>sm,sizeCaps:()=>sB,slugify:()=>sl,stringifyPrimitive:()=>sy,toZod:()=>aW,uint8ArrayToBase64:()=>sJ,uint8ArrayToBase64url:()=>sX,uint8ArrayToHex:()=>s0,unwrapMessage:()=>sT});var aX=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}};function aY(e){return new aX(e)}function a0(e){return null==e}function a1(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function a3(e,t){let n=e/t,r=Math.round(n),i=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r){let e=t._zod.def.shape[o];return r?r(e,o):e}):se(e,o,r?r(n.value,o):n.value))}}function sn(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function sr(e){return sn(e._zod.def)}function si(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function so(e){let t=Object.keys(e);return Promise.all(t.map(t=>e[t])).then(e=>{let n={};for(let r=0;r{};function sd(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var sc=aY(()=>{if(ls.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch{return!1}});function sf(e){if(!1===sd(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==sd(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function sm(e){return sf(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function sp(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var sh=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return"promise";if("u">typeof Map&&e instanceof Map)return"map";if("u">typeof Set&&e instanceof Set)return"set";if("u">typeof Date&&e instanceof Date)return"date";if("u">typeof File&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},sF=new Set(["string","number","symbol"]),sg=new Set(["string","number","bigint","boolean","symbol","undefined"]);function s_(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function sP(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function sD(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function sb(e){let t;return new Proxy({},{get:(n,r,i)=>(t??(t=e()),Reflect.get(t,r,i)),set:(n,r,i,o)=>(t??(t=e()),Reflect.set(t,r,i,o)),has:(n,r)=>(t??(t=e()),Reflect.has(t,r)),deleteProperty:(n,r)=>(t??(t=e()),Reflect.deleteProperty(t,r)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,r)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)),defineProperty:(n,r,i)=>(t??(t=e()),Reflect.defineProperty(t,r,i))})}function sy(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function sw(e){return Object.keys(e).filter(t=>void 0!==e[t]._zod.optin&&"optional"===e[t]._zod.optout)}var sE={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},sA={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function sv(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i={};return st(i,e,sS(e,t)),sP(e,sn(n,{shape:i,checks:[]}))}function sS(e,t){let n=a7(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function sk(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(sS(e,t)),o={};return st(o,e,Reflect.ownKeys(a7(e)).filter(e=>!i.has(e))),sP(e,sn(n,{shape:o,checks:[]}))}function sx(e,t){if(!sf(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let n=a7(e);for(let e of Reflect.ownKeys(t))if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return sP(e,sn(e._zod.def,{shape:sG(e,t)}))}function sG(e,t){let n={};st(n,e,Reflect.ownKeys(a7(e)));for(let e of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,e);r.enumerable&&(r.get?a9(n,e,()=>t[e]):se(n,e,r.value))}return n}function sO(e,t){if(!sf(t))throw Error("Invalid input to safeExtend: expected a plain object");return sP(e,sn(e._zod.def,{shape:sG(e,t)}))}function sI(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n={};st(n,e,Reflect.ownKeys(a7(e))),st(n,t,Reflect.ownKeys(a7(t)));let r=sn(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return sP(e,r)}function sN(e,t,n,r="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let o=n?new Set(sS(t,n)):void 0,a={};return st(a,t,Reflect.ownKeys(a7(t)),e&&((t,n)=>o&&!o.has(n)?t:new e({type:"optional",innerType:t}))),sP(t,sn(t._zod.def,{shape:a,checks:[]}))}function sC(e,t,n){let r=n?new Set(sS(t,n)):void 0,i={};return st(i,t,Reflect.ownKeys(a7(t)),(t,n)=>r&&!r.has(n)?t:new e({type:"nonoptional",innerType:t})),sP(t,sn(t._zod.def,{shape:i}))}function sj(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n(t.path??(t.path=[]),t.path.unshift(e),t))}function sT(e){return"string"==typeof e?e:e?.message}function sB(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function sL(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function sZ(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,"0")).join("")}var s1=class{constructor(...e){}};function s3(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):function(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:s2(this,t,n.bind(this))},set(e){s2(this,t,e)}})}(e,n,r.value)}}function s2(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function s6(e,t,n){return s2(e,t,n,!1)}function s5(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return s2(this,n,r(this))},set(e){s2(this,n,e)}})}return t}var s4=!1,s8={configurable:!0,get(){s4=!0}};function s7(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&P!==e._zod){P=void 0;return}P=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,s8);let e=s4;s4=!1;try{let r=n(this);return s4?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),s4=s4||e,r}catch(n){throw delete this[t],s4=s4||e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function s9(e,t,n,r){let i,o=t in(i=Object.getPrototypeOf(e))?void 0:i;o&&Object.defineProperty(o,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var le="~constantCatch";function lt(e){let t=()=>e;return t[le]=!0,t}var ln={value:void 0,enumerable:!1},lr="captureStackTrace"in Error?Error:null;function li(e,t,n,r){function i(e){this.def=e,this.constr=u,this.traits=new Set}i.prototype={};let o=n&&new WeakSet;function a(r,a){if(r._zod){if(r._zod.traits.has(e))return}else{ln.value=new i(a);try{Object.defineProperty(r,"_zod",ln)}finally{ln.value=void 0}}if(r._zod.traits.add(e),t(r,a),o){let e=Object.getPrototypeOf(r),t=r._zod.constr.prototype,i=e;for(;i&&i!==t;)i=Object.getPrototypeOf(i);let a=i??e;o.has(a)||(o.add(a),s3(a,n))}let s=u.prototype;for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(e in r||(r[e]=s[e].bind(r)))}let s=r?.Parent??Object;class l extends s{}function u(e){let t=r?.Parent?function(e){let t=lr;if(t){let n=t.stackTraceLimit;if("number"==typeof n){try{t.stackTraceLimit=0}catch{return lr=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}(l):this;a(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(l,"name",{value:e}),Object.defineProperty(u,"init",{value:a}),Object.defineProperty(u,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}var lo=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},la=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(D=globalThis).__zod_globalConfig??(D.__zod_globalConfig={});var ls=globalThis.__zod_globalConfig;function ll(e){return e&&Object.assign(ls,e),ls}var lu={get:function(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,aQ,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},ld={value:void 0,enumerable:!1},lc=new WeakSet([Object.prototype,Error.prototype]),lf=(e,t)=>{e.name="$ZodError",ld.value=t,Object.defineProperty(e,"issues",ld),ld.value=void 0,Object.defineProperty(e,"message",lu);let n=Object.getPrototypeOf(e);lc.has(n)||(lc.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},lm=li("$ZodError",lf);function lp(e,t){return{callee:t?.callee??e,Err:t?.Err}}li("$ZodError",lf,void 0,{Parent:Error});var lh=e=>{let t=(n,r,i,o)=>{let a=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new lo;if(s.issues.length){let n=new(o?.Err??e)(s.issues.map(e=>s$(e,a,ll())));throw su(n,o?.callee??t),n}return s.value};return t},lF=e=>{let t=async(n,r,i,o)=>{let a=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new(o?.Err??e)(s.issues.map(e=>s$(e,a,ll())));throw su(n,o?.callee??t),n}return s.value};return t},lg=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new lo;return o.issues.length?l_(e,o.issues,i):{success:!0,data:o.value}};function l_(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>s$(e,n,ll()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var lP=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?l_(e,o.issues,i):{success:!0,data:o.value}},lD=Symbol.for("zod.compile.invalid"),lb=Symbol.for("zod.compile.fallback"),ly=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),0===i.issues.length},lw=/^[cC][0-9a-z]{6,}$/,lE=/^[0-9a-z]+$/,lA=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,lv=/^[0-9a-vA-V]{20}$/,lS=/^[A-Za-z0-9]{27}$/,lk=/^[a-zA-Z0-9_-]{21}$/,lx=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\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[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/,lM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lR=/^https?$/,lT=/^\\+[1-9]\\d{6,14}$/,lB="(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))",lL=RegExp(`^${lB}$`);function l$(e){let t="(?:[01]\\\\d|2[0-3]):[0-5]\\\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\\\d`:`${t}:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\\\d(?:\\\\.\\\\d+)?`:`${t}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`}var lz=/^[\\s\\S]{0,}$/,lU=/^-?\\d+(?:\\.\\d+)?$/,lV=/^(?:true|false)$/i,lW=/^[^A-Z]*$/,lq=/^[^a-z]*$/,lH=li("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),lK=e=>{let t=e.value;return!a0(t)&&void 0!==t.length},lZ={number:"number",bigint:"bigint",object:"date"},lJ=li("$ZodCheckLessThan",(e,t)=>{lH.init(e,t);let n=lZ[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value{lH.init(e,t);let n=lZ[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:lZ[typeof r.value]??n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lX=li("$ZodCheckMultipleOf",(e,t)=>{lH.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):0===a3(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),lY=li("$ZodCheckNumberFormat",(e,t)=>{lH.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[i,o]=sE[t.format];e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}so&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),l0=li("$ZodCheckMaxLength",(e,t)=>{var n;lH.init(e,t),(n=e._zod.def).when??(n.when=lK),e._zod.check=n=>{let r=n.value,i=r.length;if(("string"==typeof r&&i>t.maximum?sV(r):i)<=t.maximum)return;let o=sW(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),l1=li("$ZodCheckMinLength",(e,t)=>{var n;lH.init(e,t),(n=e._zod.def).when??(n.when=lK),e._zod.check=n=>{let r=n.value,i=r.length;if(("string"==typeof r&&i>=t.minimum&&i<2*t.minimum?sV(r):i)>=t.minimum)return;let o=sW(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),l3=li("$ZodCheckLengthEquals",(e,t)=>{var n;lH.init(e,t),(n=e._zod.def).when??(n.when=lK),e._zod.check=n=>{let r=n.value,i=r.length,o="string"==typeof r&&i>=t.length&&i<=2*t.length?sV(r):i;if(o===t.length)return;let a=sW(r),s=o>t.length;n.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),l2=li("$ZodCheckStringFormat",(e,t)=>{var n,r;lH.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),l6=li("$ZodCheckRegex",(e,t)=>{l2.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),l5=li("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=lW),l2.init(e,t)}),l4=li("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=lq),l2.init(e,t)}),l8=li("$ZodCheckIncludes",(e,t)=>{lH.init(e,t);let n=s_(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),l7=li("$ZodCheckStartsWith",(e,t)=>{lH.init(e,t);let n=RegExp(`^${s_(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),l9=li("$ZodCheckEndsWith",(e,t)=>{lH.init(e,t);let n=RegExp(`.*${s_(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),ue=li("$ZodCheckOverwrite",(e,t)=>{lH.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ut=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split(`\n`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {\n${t.join(`\n`)}\n};`)(...Object.values(this.closed))}},un={major:4,minor:6,patch:7},ur=li("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=un;let r=e._zod.def.checks,i=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{let i;if(t.memo)return t;let o=sj(t);for(let a of n){if(a._zod.def.when){if(sM(t)||!a._zod.def.when(t))continue}else if(o)continue;let n=t.issues.length,s=a._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new lo;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(sL(t.issues,n,e),o||(o=sj(t,n)))});else{if(t.issues.length===n)continue;sL(t.issues,n,e),o||(o=sj(t,n))}}return i?i.then(()=>t):t},n=(n,r,o)=>{if(sj(n))return n.aborted=!0,n;let a=t(r,i,o);if(a instanceof Promise){if(!1===o.async)throw new lo;return a.then(t=>e._zod.parse(t,o))}return e._zod.parse(a,o)};e._zod.run=(r,o)=>{if(o.skipChecks)return e._zod.parse(r,o);if("backward"===o.direction){let t=e._zod.parse({value:r.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,o)):n(t,r,o)}let a=e._zod.parse(r,o);if(a instanceof Promise){if(!1===o.async)throw new lo;return a.then(e=>t(e,i,o))}return t(a,i,o)}}},{get"~standard"(){return s6(this,"~standard",ua(this))},set"~standard"(e){s2(this,"~standard",e)}}),ui=(e,t)=>e.issues.length?{issues:e.issues.map(e=>s$(e,t,ll()))}:{value:e.value};async function uo(e,t){let n={async:!0};return ui(await e._zod.run({value:t,issues:[]},n),n)}function ua(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return ui(r,n)}catch{}return uo(e,t)},vendor:"zod",version:1}}var us=li("$ZodString",(e,t)=>{ur.init(e,t),e._zod.pattern=t.pattern??lz,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ul=li("$ZodStringFormat",(e,t)=>{l2.init(e,t),us.init(e,t)}),uu=li("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=lG),ul.init(e,t)}),ud=li("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=lO(e))}else t.pattern??(t.pattern=lO());ul.init(e,t)}),uc=li("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=lI),ul.init(e,t)});function uf(e){try{if("u">typeof URL&&"function"==typeof URL.canParse)return URL.canParse(e);return new URL(e),!0}catch{return!1}}var um=/[\\t\\n\\r]/g;function up(e){return e.replace(um,"")}var uh=li("$ZodURL",(e,t)=>{ul.init(e,t),e._zod.check=n=>{try{var r,i;let o=n.value.trim(),a="normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===lR.source&&!/^https?:\\/\\//i.test(e))return 1;try{if("u">typeof URL){let t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(o,t):uf(o)||2;if(1===a)return void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});if(2===a)return void n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});if(!0===a){n.value=up(o);return}t.hostname&&((r=t.hostname).lastIndex=0,!r.test(a.hostname))&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&((i=t.protocol).lastIndex=0,!i.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol))&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?a.href:up(o);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),uF=li("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(?=[\\\\s\\\\S]*[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\u20E3])[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$","u")),ul.init(e,t)}),ug=li("$ZodNanoID",(e,t)=>{var n;if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=void 0===t.length?lk:(n=t.length,RegExp(`^[a-zA-Z0-9_-]{${n}}$`))),ul.init(e,t)}),u_=li("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=lw),ul.init(e,t)}),uP=li("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=lE),ul.init(e,t)}),uD=li("$ZodULID",(e,t)=>{t.pattern??(t.pattern=lA),ul.init(e,t)}),ub=li("$ZodXID",(e,t)=>{t.pattern??(t.pattern=lv),ul.init(e,t)}),uy=li("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=lS),ul.init(e,t)}),uw=li("$ZodISODateTime",(e,t)=>{let n,r,i;t.pattern??(n=["Z"],t.offset&&n.push("([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)"),r=`${l$({precision:t.precision,seconds:!0})}(?:${n.join("|")})`,i=t.local?`${r}|${l$({precision:t.precision})}`:r,t.pattern=RegExp(`^${lB}T(?:${i})$`)),ul.init(e,t)}),uE=li("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=lL),ul.init(e,t)}),uA=li("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${l$(t)}$`)),ul.init(e,t)}),uv=li("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=lx),ul.init(e,t)}),uS=li("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=lN),ul.init(e,t)}),uk=/^[0-9a-fA-F:.]+$/;function ux(e){return!!uk.test(e)&&uf(`http://[${e}]`)}var uG=li("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=lC),ul.init(e,t),e._zod.check=n=>{ux(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),uO=li("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=lj),ul.init(e,t)}),uI=li("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=lM),ul.init(e,t),e._zod.check=n=>{!function(e){let t=e.split("/");if(2!==t.length)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`===r&&!(i<0)&&!(i>128)&&ux(n)}(n.value)&&n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function uN(e){if(""===e)return!0;if(/\\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var uC=/^[0-9a-zA-Z+/]*={0,2}$/,uj=li("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=uC),ul.init(e,t),e._zod.check=n=>{uN(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),uM=/^[A-Za-z0-9_-]*$/,uR=li("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=uM),ul.init(e,t),e._zod.check=n=>{!function(e){if(!uM.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return uN(t.padEnd(4*Math.ceil(t.length/4),"="))}(n.value)&&n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),uT=li("$ZodE164",(e,t)=>{t.pattern??(t.pattern=lT),ul.init(e,t)}),uB=li("$ZodJWT",(e,t)=>{ul.init(e,t),e._zod.check=n=>{!function(e,t=null){try{let n=e.split(".");if(3!==n.length)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(n.value,t.alg)&&n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),uL=li("$ZodNumber",(e,t)=>{ur.init(e,t),e._zod.pattern=lU,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return n;let o="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),u$=li("$ZodNumberFormat",(e,t)=>{lY.init(e,t),uL.init(e,t)}),uz=li("$ZodBoolean",(e,t)=>{ur.init(e,t),e._zod.pattern=lV,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return"boolean"==typeof i||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),uU=li("$ZodUnknown",(e,t)=>{ur.init(e,t),e._zod.parse=e=>e}),uV=li("$ZodNever",(e,t)=>{ur.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),uW=li("$ZodDate",(e,t)=>{ur.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),n}}),uq=e=>Array.isArray(e)?e.length:-1;function uH(e,t,n){e.issues.length&&t.issues.push(...sR(n,e.issues)),t.value[n]=e.value}var uK=li("$ZodArray",(e,t)=>{ur.init(e,t);let n=ls.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=n?n.alloc(e,r,Array(o.length),i):Array(o.length);let a=[],s=i?.abortEarly;for(let e=0;euH(t,r,e)));else if(uH(l,r,e),s&&0!==l.issues.length&&sj(l))break}return a.length?Promise.all(a).then(()=>r):r},function(e,t){let n=sB(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,o)=>{let a=t(n.value);if(a>r&&!o?.skipChecks&&o?.direction!=="backward"){for(let[t,r]of sB(e._zod.def.checks))if(a>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,sL(n.issues,t,e),n}}return i(n,o)}}(e,uq)});function uZ(e,t,n,r,i,o){let a=n in r,s="optional"===o;if(a||!s||"optional"!==i){if(e.issues.length){if(void 0!==i&&s&&!a)return;t.issues.push(...sR(n,e.issues))}if(!a&&void 0===i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}void 0===e.value?(a||"defaulted"===i&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var uJ=[];function uQ(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:uJ,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let o=sw(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function uX(e,t,n,r,i,o,a){let s=[],l=i.keySet,u=i.catchall._zod,d=u.def.type,c=u.optin,f=u.optout,m=0;for(let i in t){if(a&&n.issues.length!==m){if(sj(n,m))break;m=n.issues.length}if(l.has(i))continue;if("__proto__"===i){"never"===d&&s.push(i);continue}if("never"===d){s.push(i);continue}let o=u.run({value:t[i],issues:[]},r);o instanceof Promise?e.push(o.then(e=>uZ(e,n,i,t,c,f))):uZ(o,n,i,t,c,f)}return(s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o,continue:!0}),e.length)?Promise.all(e).then(()=>n):n}var uY=li("$ZodObject",(e,t)=>{let n;ur.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),i=r?.get?r.get.raw:t.shape??{};if(i){let e=()=>{let n={...i};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=i,Object.defineProperty(t,"shape",{get:e})}let o=aY(()=>uQ(t));s7(e,"propValues",e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){for(let t of(Object.prototype.hasOwnProperty.call(n,e)||a4(n,e,new Set),r.values))n[e].add(t);void 0!==r.optin&&n[e].add(void 0)}}return n});let a=t.catchall,s=ls.memoizer;s?.attach(e),e._zod.parse=(t,r)=>{n??(n=o.value);let i=t.value;if(!sd(i))return t.issues.push({expected:"object",code:"invalid_type",input:i,inst:e}),t;t.value=s?s.alloc(e,t,{},r):{};let l=[],u=n.shape,d=r?.abortEarly,c=t.issues.length;for(let e of n.allKeys){if(d&&t.issues.length!==c){if(sj(t,c))break;c=t.issues.length}if("__proto__"===e)continue;let n=u[e],o=n._zod.optin,a=n._zod.optout,s=n._zod.run({value:i[e],issues:[]},r);s instanceof Promise?l.push(s.then(n=>uZ(n,t,e,i,o,a))):uZ(s,t,e,i,o,a)}return a?uX(l,i,t,r,o.value,e,!0===d):l.length?Promise.all(l).then(()=>t):t}}),u0=li("$ZodObjectJIT",(e,t)=>{let n,r;uY.init(e,t);let i=e._zod.parse,o=aY(()=>uQ(t)),a=ls.memoizer,s=!ls.jitless,l=s&&sc.value,u=t.catchall;e._zod.parse=(d,c)=>{r??(r=o.value);let f=d.value;return sd(f)?s&&l&&c?.async===!1&&!0!==c.jitless?(n||(n=(t=>{let n=o.value,r=n.symbolKeys,i=new ut(["payload","ctx"],{shape:t,inst:e,memo:a,syms:r}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,l=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;i.write("const input = payload.value;");let u=Object.create(null),d=0;for(let e of n.allKeys)u[e]=`key_${d++}`;for(let e of(i.write(a?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};"),n.allKeys)){if("__proto__"===e)continue;let n=u[e],o="symbol"==typeof e?`syms[${r.indexOf(e)}]`:ss(e),a=`${o} in input`,d=t[e],c=d?._zod?.optin,f=void 0!==c,m=d?._zod?.optout==="optional";if(i.write(`const ${n} = ${s(o)};`),f&&m){let e="optional"===c?`${n}_present`:`${n}.value !== undefined || ${n}_present`;i.write(`\n const ${n}_present = ${a};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${l(n,o)}\n }\n\n if (${e}) {\n newResult[${o}] = ${n}.value;\n }\n }\n\n `)}else f?(i.write(`\n if (${n}.issues.length) {${l(n,o)}\n }\n `),"defaulted"===c?i.write(`newResult[${o}] = ${n}.value;`):i.write(`\n if (${n}.value !== undefined || ${a}) {\n newResult[${o}] = ${n}.value;\n }\n `)):i.write(`\n const ${n}_present = ${a};\n if (${n}.issues.length) {${l(n,o)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${o}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${o}] = ${n}.value;\n }\n\n `)}return i.write("payload.value = newResult;"),i.write("return payload;"),i.compile()})(t.shape)),d=n(d,c),u)?uX([],f,d,c,r,e,c?.abortEarly===!0):d:i(d,c):(d.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),d)}});function u1(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let i=e.filter(e=>!sj(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>s$(e,r,ll())))}),t)}var u3=li("$ZodUnion",(e,t)=>{ur.init(e,t),s7(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),s7(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),s7(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),s7(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>a1(e.source)).join("|")})$`)}});let n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>u1(t,r,e,i)):u1(a,r,e,i)}});function u2(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||0===r.size)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(void 0!==e)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var u6=li("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,u3.init(e,t);let n=e._zod.parse;s7(e,"propValues",e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);for(let[r,o]of(i[e.def.discriminator]?.has(void 0)&&n++,Object.entries(i)))for(let e of(Object.prototype.hasOwnProperty.call(t,r)||a4(t,r,new Set),o))t[r].add(e)}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=a8(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=aY(()=>u2(t));e._zod.parse=(i,o)=>{let a=i.value;if(!sd(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;let s=a?.[t.discriminator],l=r.value.get(s);return l&&(void 0!==s||"backward"!==o.direction)?l._zod.run(i,o):t.unionFallback||"backward"===o.direction?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>null!==r.value.get(e)),input:a,path:[t.discriminator],inst:e}),i)}}),u5=li("$ZodIntersection",(e,t)=>{ur.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([t,n])=>u4(e,t,n)):u4(e,i,o)}});function u4(e,t,n){let r,i=new Map,o=new Map,a=(e,t)=>{let n;if("unrecognized_keys"!==e.code||e.path?.length)if("invalid_key"!==e.code||"record"!==e.origin||e.path?.length!==1)return!1;else{let t=String(e.path[0]);o.has(t)||o.set(t,e),n=[t]}else r??(r=e),n=e.keys;for(let e of n)i.has(e)||i.set(e,{}),i.get(e)[t]=!0;return!0};for(let n of t.issues)a(n,"l")||e.issues.push(n);for(let t of n.issues)a(t,"r")||e.issues.push(t);let s=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=r?s.filter(e=>r.keys.includes(e)):[];for(let n of(t.length&&e.issues.push({...r,keys:t}),s))!t.includes(n)&&o.has(n)&&e.issues.push(o.get(n))}let l=function e(t,n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(sf(t)&&sf(n)){let r=Object.keys(n),i=Object.keys(t).filter(e=>-1!==r.indexOf(e)),o={...t,...n};for(let r of(Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__,i)){if("__proto__"===r)continue;let i=e(t[r],n[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};o[r]=i.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i{ur.init(e,t);let n=t.items,r=ls.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let a=i.value;if(!Array.isArray(a))return i.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=r?r.alloc(e,i,[],o):[];let s=[],l=u7(n,"optin"),u=u7(n,"optout");if(!t.rest){if(a.lengthn.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:a,inst:e,origin:"array"})}let d=Array(n.length),c=t.rest?o?.abortEarly:void 0,f=!1;for(let e=0;e{d[e]=t})):(d[e]=t,c&&!f&&t.issues.length&&(f=sj(t)))}if(t.rest&&!f){let e=n.length-1,r=a.slice(n.length),l=i.issues.length;for(let n of r){if(c&&i.issues.length!==l){if(sj(i,l))break;l=i.issues.length}e++;let r=t.rest._zod.run({value:n,issues:[]},o);r instanceof Promise?s.push(r.then(t=>u9(t,i,e))):u9(r,i,e)}}return s.length?Promise.all(s).then(()=>de(d,i,n,a,u)):de(d,i,n,a,u)}});function u7(e,t){for(let n=e.length-1;n>=0;n--)if(!("optin"===t?void 0!==e[n]._zod.optin:"optional"===e[n]._zod.optout))return n+1;return 0}function u9(e,t,n){e.issues.length&&t.issues.push(...sR(n,e.issues)),t.value[n]=e.value}function de(e,t,n,r,i){for(let o=0;o=i&&"optional"===n[o]._zod.optin){t.value.length=o;break}if(a.issues.length){if(!s&&o>=i){t.value.length=o;break}t.issues.push(...sR(o,a.issues))}t.value[o]=a.value}for(let e=t.value.length-1;e>=r.length;e--)if("optional"===n[e]._zod.optout&&void 0===t.value[e])t.value.length=e;else break;return t}var dt=li("$ZodEnum",(e,t)=>{ur.init(e,t);let n=aZ(t.entries),r=new Set(n);e._zod.values=r,s7(e,"pattern",e=>{let t=aZ(e.def.entries).filter(e=>sF.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>s_(e.toString())).join("|")})$`:"^[^\\\\s\\\\S]$")}),e._zod.parse=(t,i)=>{let o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),dn=li("$ZodLiteral",(e,t)=>{ur.init(e,t);let n=new Set(t.values);e._zod.values=n,s7(e,"pattern",e=>{let t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?s_(e):e?s_(e.toString()):String(e)).join("|")})$`:"^[^\\\\s\\\\S]$")}),e._zod.parse=(r,i)=>{let o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),dr=li("$ZodTransform",(e,t)=>{ur.init(e,t),e._zod.optin="optional",ls.memoizer?.guard(e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new la(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new lo;return n.value=i,n}});function di(e,t){return e.value=t.issues.length?void 0:t.value,e}var da=li("$ZodOptional",(e,t)=>{ur.init(e,t),s7(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",s7(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),s7(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${a1(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>di(e,t)):di(e,r)}return t.innerType._zod.run(e,n)}}),ds=li("$ZodExactOptional",(e,t)=>{da.init(e,t),s7(e,"values",e=>e.def.innerType._zod.values),s7(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),dl=li("$ZodNullable",(e,t)=>{ur.init(e,t),s7(e,"optin",e=>e.def.innerType._zod.optin),s7(e,"optout",e=>e.def.innerType._zod.optout),s7(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${a1(t.source)}|null)$`):void 0}),s7(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),du=li("$ZodDefault",(e,t)=>{ur.init(e,t),e._zod.optin="defaulted",s7(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>dd(e,t)):dd(r,t)}});function dd(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}var dc=li("$ZodPrefault",(e,t)=>{ur.init(e,t),e._zod.optin="defaulted",s7(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),df=li("$ZodNonOptional",(e,t)=>{ur.init(e,t),s7(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>dm(t,e)):dm(i,e)}});function dm(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function dp(e,t,n,r){return t.issues.length?e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>s$(e,r,ll()))},input:e.value}):(e.value=t.value,t.memo&&(e.memo=!0)),e}var dh=li("$ZodCatch",(e,t)=>{ur.init(e,t),s7(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),s7(e,"optout",e=>e.def.innerType._zod.optout),s7(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>dp(e,r,t,n)):dp(e,r,t,n)}}),dF=li("$ZodPipe",(e,t)=>{ur.init(e,t),s7(e,"values",e=>e.def.in._zod.values),s7(e,"optin",e=>e.def.in._zod.optin),s7(e,"optout",e=>e.def.out._zod.optout),s7(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>dg(e,t.in,n)):dg(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>dg(e,t.out,n)):dg(r,t.out,n)}});function dg(e,t,n){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var d_=li("$ZodPreprocess",(e,t)=>{dF.init(e,t)}),dP=li("$ZodReadonly",(e,t)=>{ur.init(e,t),s7(e,"propValues",e=>e.def.innerType._zod.propValues),s7(e,"values",e=>e.def.innerType._zod.values),s7(e,"optin",e=>e.def.innerType?._zod?.optin),s7(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(dD):dD(r)}});function dD(e){return e.memo||(e.value=Object.freeze(e.value)),e}var db=li("$ZodLazy",(e,t)=>{ur.init(e,t),a6(e._zod,"innerType",()=>(t._cachedInner||(t._cachedInner=t.getter()),t._cachedInner)),s7(e,"pattern",e=>e.innerType?._zod?.pattern),s7(e,"propValues",e=>e.innerType?._zod?.propValues),s7(e,"optin",e=>e.innerType?._zod?.optin??void 0),s7(e,"optout",e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),dy=li("$ZodCustom",(e,t)=>{lH.init(e,t),ur.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>dw(t,n,r,e));dw(i,n,r,e)}});function dw(e,t,n,r){if(!e){let e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(sH(e))}}var dE=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},dA="~memo",dv=[];function dS(e){return null!==e&&"object"==typeof e}function dk(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var dx=new WeakMap,dG=[],dO={alloc(e,t,n){let r=b;if(!r)return n;b=void 0;let i={value:n,issues:null};return r.set(t.value,i),dG.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{var r,i;let o;if("backward"!==n.direction&&(r=n,i=e.value,void 0!==(o=r[dA]?.backEdges)&&dS(i)&&o.has(i)))throw new dE;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i,o=!1;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(s,l)=>{let u;if(void 0===n){let r=function e(t,n,r){var i,o;let a=dx.get(t);if(void 0!==a)return 2*!!a;if(n.has(t))return 2;n.add(t);let s=0,l=t=>{if(2!==s&&t?._zod){let i=e(t,n,r);i>s&&(s=i)}},u=e=>{e>s&&(s=e)},d=t._zod.def;switch(d.type){case"object":{let t=a8(d);u(t?((t,i)=>{let o=0;for(let a of Reflect.ownKeys(t)){let s=Object.getOwnPropertyDescriptor(t,a);if(i&&!s.enumerable)continue;let l=s.get?1:s.value?._zod?e(s.value,n,r):0;l>o&&(o=l)}return o})(t,!0):1),l(d.catchall);break}case"array":l(d.element);break;case"tuple":for(let e of d.items)l(e);l(d.rest);break;case"record":case"map":l(d.keyType),l(d.valueType);break;case"set":l(d.valueType);break;case"union":for(let e of d.options)l(e);break;case"intersection":l(d.left),l(d.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":l(d.innerType);break;case"pipe":l(d.in),l(d.out);break;case"function":l(d.input),l(d.output);break;case"lazy":{let i=d._cachedInner??(r?t._zod.innerType:void 0);u(i?e(i,n,!1):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in d){let t=Object.getOwnPropertyDescriptor(d,e);if(!t||t.get)continue;let n=t.value;if(n&&"object"==typeof n){if(n._zod)l(n);else if(Array.isArray(n))for(let e of n)l(e)}}}return n.delete(t),i=t,1!==(o=s)&&dx.set(i,2===o),o}(e,new Set,!1);if(0===r)return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(s,l);2===r||o?n=!0:o=!0}let d=s.value;if(!dS(d))return t(s,l);let c=l[dA];if(c||(c={buckets:new WeakMap,backEdges:void 0},l[dA]=c),r===l)u=i;else{var f;let t;(t=(f=c).buckets.get(e))||(t=new WeakMap,f.buckets.set(e,t)),u=t,r=l,i=u}let m=u.get(d);if(m)return s.value=m.value,m.issues?m.issues.length&&s.issues.push(...dk(m.issues)):(s.memo=!0,c.backEdges??(c.backEdges=new WeakSet),c.backEdges.add(m.value)),s;b=u;let p=dG.length,h=t(s,l);b=void 0;let F=dG.length>p?dG.pop():void 0;return h instanceof Promise?h.then(e=>(F&&(F.issues=e.issues.length?dk(e.issues):dv),e)):(F&&(F.issues=h.issues.length?dk(h.issues):dv),h)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}},dI=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};(y=globalThis).__zod_globalRegistry??(y.__zod_globalRegistry=new dI);var dN=globalThis.__zod_globalRegistry;function dC(e){return e.checks&&(e.checks=[...e.checks]),e}function dj(e,t){return new lJ({check:"less_than",...sD(t),value:e,inclusive:!1})}function dM(e,t){return new lJ({check:"less_than",...sD(t),value:e,inclusive:!0})}function dR(e,t){return new lQ({check:"greater_than",...sD(t),value:e,inclusive:!1})}function dT(e,t){return new lQ({check:"greater_than",...sD(t),value:e,inclusive:!0})}function dB(e,t){return new lX({check:"multiple_of",...sD(t),value:e})}function dL(e,t){return new l0({check:"max_length",...sD(t),maximum:e})}function d$(e,t){return new l1({check:"min_length",...sD(t),minimum:e})}function dz(e,t){return new l3({check:"length_equals",...sD(t),length:e})}function dU(e){return new ue({check:"overwrite",tx:e})}function dV(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&a4(e,t,n[t]);return e}function dW(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??dN,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function dq(e,t,n,r,i){let o="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if("any"===o)return!1;if(void 0===o||"throw"===o)throw Error(i);return Object.assign(n,o),!0}function dH(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,r);else{let n=a.schema,o=t.processors[i.type];if(!o)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);o(e,t,n,r)}let o=e._zod.parent;o&&(a.ref||(a.ref=o),dH(o,t,r),t.seen.get(o).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&dV(a.schema,l),"input"===t.io&&function e(t,n){let r=n??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,r);if("set"===i.type)return e(i.valueType,r);if("lazy"===i.type)return e(i.getter(),r);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type||"catch"===i.type)return e(i.innerType,r);if("intersection"===i.type)return e(i.left,r)||e(i.right,r);if("record"===i.type||"map"===i.type)return e(i.keyType,r)||e(i.valueType,r);if("pipe"===i.type)return!!t._zod.traits.has("$ZodCodec")||e(i.in,r)||e(i.out,r);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],r))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,r))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,r))return!0;if(i.rest&&e(i.rest,r))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function dK(e){return e.replace(/~/g,"~0").replace(/\\//g,"~1")}function dZ(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{if(t[1].schema.$ref)return;let r=t[1],{ref:i,defId:o}=(t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${r}/${dK(o)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:"#"};let o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:i+dK(o)}})(t);r.def={...r.schema},o&&(r.defId=o);let a=r.schema;for(let e in a)delete a[e];a.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/\n\nSet the \\`cycles\\` parameter to \\`"ref"\\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){i(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){i(n);continue}}if(e.metadataRegistry.get(n[0])?.id||r.cycle){i(n);continue}r.count>1&&"ref"===e.reused&&i(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}var dJ=new Set(["type","properties","required","additionalProperties"]),dQ=["oneOf","anyOf"];function dX(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function dY(e){let t=[];for(let n of e){if("object"!=typeof n||"object"!==n.type)return null;for(let e in n)if(!dJ.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??dX(n);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}a4(n,r,1===e.length?e[0]:dY(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:"object",properties:n};if(r.size&&(i.required=[...r]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=dX(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function d0(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let i=n.def??n.schema,o={...i},a=n.ref;if(n.ref=null,a){r(a);let n=e.seen.get(a),s=n.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):dV(i,s),dV(i,o),t._zod.parent===a)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(s.$ref&&n.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==a){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let n=t.anyOf;if(!Array.isArray(n)||0===n.length||void 0!==t.type)return;let r=[];for(let t of n){if(!t||"object"!=typeof t)return;e(t);let n=Object.keys(t);if(1!==n.length||"type"!==n[0])return;let i=t.type;for(let e of Array.isArray(i)?i:[i]){if("string"!=typeof e)return;r.includes(e)||r.push(e)}}delete t.anyOf,t.type=1===r.length?r[0]:r}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of dJ)if(t in e)return;let n=t.filter(e=>dQ.some(t=>Array.isArray(e[t]))),r=null;if(n.length){let e=n[0],i=dQ.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let o=t.filter(t=>t!==e),a=e[i].map(e=>dY([...o,e]));if(a.some(e=>!e))return;r={[i]:a}}else r=dY(t);r&&(delete e.allOf,dV(e,r))}(e)}}let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}dV(i,n.defId?n.schema:n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,a4(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:d1(t,"input",e.processors),output:d1(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error("Error converting schema to JSON.")}}var d1=(e,t,n={})=>r=>{let{libraryOptions:i,target:o}=r??{},a=dW({...i??{},target:o,io:t,processors:n});return dH(e,a),dZ(a,e),d0(a,e)},d3=(e,t,n)=>{(void 0===e[t]||n>e[t])&&(e[t]=n)},d2=(e,t,n)=>{(void 0===e[t]||n{d3(e,"minimum",t),d2(e,"maximum",t)},d5=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},d4=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},d8=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},d7=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},d9=(e,t)=>d3(e,"minimum",t.minimum),ce=(e,t)=>d2(e,"maximum",t.maximum),ct=e=>(t,n)=>{d7(t,n.format);let[r,i]=e[n.format];d3(t,"minimum",r),d2(t,"maximum",i)},cn={greater_than:(e,t)=>d3(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>d2(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>d5(e,t.value),number_format:ct(sE),bigint_format:ct(sA),min_length:d9,max_length:ce,length_equals:(e,t)=>d6(e,t.length),min_size:d9,max_size:ce,size_equals:(e,t)=>d6(e,t.size),string_format:(e,t)=>{d7(e,t.format),t.pattern&&d4(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>d8(e,t.mime)};function cr(e){let t={},n=e._zod.def;for(let r of e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[])cn[r._zod.def.check]?.(t,r._zod.def);let r=e._zod.bag;for(let e of(void 0!==r.minimum&&d3(t,"minimum",r.minimum),void 0!==r.exclusiveMinimum&&d3(t,"exclusiveMinimum",r.exclusiveMinimum),void 0!==r.maximum&&d2(t,"maximum",r.maximum),void 0!==r.exclusiveMaximum&&d2(t,"exclusiveMaximum",r.exclusiveMaximum),void 0!==r.multipleOf&&d5(t,r.multipleOf),void 0!==r.format&&(t.format??(t.format=r.format),r.format.includes("int")&&(t.isInt=!0)),r.mime&&d8(t,r.mime),r.patterns??[]))d4(t,e);return t}var ci={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},co=new Map([[uC,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[uM,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),ca=e=>co.get(e)??e;function cs(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?cs(t.out):"catch"===t.type?cs(t.innerType):e._zod.optin}var cl=Symbol();function cu(e,t,n,r,i){let o=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(dq(t,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),cl):JSON.parse(a)}var cd=(e,t,n,r)=>{let i=e._zod.def;dH(i.innerType,t,r),t.seen.get(e).ref=i.innerType},cc=new WeakSet([Object.prototype,Error.prototype]);function cf(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var cm=li("ZodError",(e,t)=>{lm.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);cc.has(n)||(cc.add(n),cf(n,"format",e=>t=>(function(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)r({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(0===e.length)n._errors.push(t(o));else{let r=n,i=0;for(;it=>(function(e,t=e=>e.message){let n={},r=[];for(let a of e.issues)if(a.path.length>0){var i,o;(i=a.path[0],o=()=>[],!Object.prototype.hasOwnProperty.call(n,i)&&("__proto__"===i?Object.defineProperty(n,i,{value:o(),writable:!0,enumerable:!0,configurable:!0}):n[i]=o()),n[i]).push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}})(e,t)),cf(n,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,aQ,2)}),cf(n,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,aQ,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error}),cp=lh(cm),ch=lF(cm),cF=lg(cm),cg=lP(cm),c_=(i=lh(cm),o=(e,t,n,r)=>i(e,t,n?{...n,direction:"backward"}:{direction:"backward"},lp(o,r))),cP=(a=lh(cm),s=(e,t,n,r)=>a(e,t,n,lp(s,r))),cD=(l=lF(cm),u=async(e,t,n,r)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return await l(e,t,i,lp(u,r))}),cb=(d=lF(cm),c=async(e,t,n,r)=>await d(e,t,n,lp(c,r))),cy=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return lg(cm)(e,t,r)},cw=(e,t,n)=>lg(cm)(e,t,n),cE=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return lP(cm)(e,t,r)},cA=async(e,t,n)=>lP(cm)(e,t,n);function cv(){ls.memoizer||ll({memoizer:dO})}var cS=li("ZodType",(e,t)=>(ls.localeError||ll({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function r(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?n[e]??e:String(t)}return n=>{switch(n.code){case"invalid_type":{let e=r(n.expected),t=r(sq(n.input),n.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===n.values.length)return`Invalid input: expected ${sy(n.values[0])}`;return`Invalid option: expected one of ${aJ(n.values,"|")}`;case"too_big":{let t=n.exact?"exactly ":n.inclusive?"<=":"<",r=e[n.origin]??null;if(r)return`Too big: expected ${n.origin??"value"} to have ${t}${n.maximum.toString()} ${r.unit??"elements"}`;return`Too big: expected ${n.origin??"value"} to be ${t}${n.maximum.toString()}`}case"too_small":{let t=n.exact?"exactly ":n.inclusive?">=":">",r=e[n.origin]??null;if(r)return`Too small: expected ${n.origin} to have ${t}${n.minimum.toString()} ${r.unit}`;return`Too small: expected ${n.origin} to be ${t}${n.minimum.toString()}`}case"invalid_format":if("starts_with"===n.format)return`Invalid string: must start with "${n.prefix}"`;if("ends_with"===n.format)return`Invalid string: must end with "${n.suffix}"`;if("includes"===n.format)return`Invalid string: must include "${n.includes}"`;if("regex"===n.format)return`Invalid string: must match pattern ${n.pattern}`;return`Invalid ${t[n.format]??n.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${aJ(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0){let e=n.options.map(e=>`\'${e}\'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===n.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}})()}),ur.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(az.mergeDefs(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return sP(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new fC({type:"custom",check:"custom",fn:e,...sD(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var n;let r,i;return n=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(sH(e,t.value,r._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=r),e.continue??(e.continue=!r._zod.def.abort),t.issues.push(sH(e)))},e(t.value,t)),(i=new lH({check:"custom",...sD(t)}))._zod.check=n,r=i}(e,t))},overwrite(e){return this.check(dU(e))},optional(){return fD(this)},exactOptional(){var e;return e=this,new fb({type:"optional",innerType:e})},nullable(){return fw(this)},nullish(){return fD(fw(this))},nonoptional(e){var t,n;return t=this,n=e,new fv({type:"nonoptional",innerType:t,...az.normalizeParams(n)})},array(){return fr(this)},or(e){return fs([this,e])},and(e){var t;return t=this,new fd({type:"intersection",left:t,right:e})},transform(e){return fx(this,f_(e))},default(e){var t,n;return t=this,n=e,new fE({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():az.shallowClone(n)}})},prefault(e){var t,n;return t=this,n=e,new fA({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof n?n():az.shallowClone(n)}})},catch(e){var t,n;return t=this,new fS({type:"catch",innerType:t,catchValue:"function"==typeof(n=e)?n:az.constantCatch(n)})},pipe(e){return fx(this,e)},readonly(){var e;return e=this,new fO({type:"readonly",innerType:e})},describe(e){let t=this.clone();return dN.add(t,{description:e}),t},meta(...e){if(0===e.length)return dN.get(this);let t=this.clone();return dN.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return az.hide(this,"~standard",{...ua(this),jsonSchema:{input:d1(this,"input"),output:d1(this,"output")}})},set"~standard"(e){az.own(this,"~standard",e)},parse:function e(t,n){return cp(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ch(this,t,n,{callee:e})},safeParse(e,t){return cF(this,e,t)},async safeParseAsync(e,t){return cg(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){az.own(this,"spa",e)},validate(e,t){let n=this._zod.bag.validator;if(void 0!==n){if(n(e)!==lD)return!0;if(!0===n.definite&&void 0===t)return!1}return function(e,t,n){let r,i=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;if(o?(i[lb]=!0,r=o({value:t,issues:[]},i)):r=e._zod.run({value:t,issues:[]},i),r instanceof Promise)throw new lo;return 0===r.issues.length}(this,e,t)},validateAsync(e,t){return ly(this,e,t)},encode:function e(t,n){return c_(this,t,n,{callee:e})},decode:function e(t,n){return cP(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await cD(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await cb(this,t,n,{callee:e})},safeEncode(e,t){return cy(this,e,t)},safeDecode(e,t){return cw(this,e,t)},async safeEncodeAsync(e,t){return cE(this,e,t)},async safeDecodeAsync(e,t){return cA(this,e,t)},toJSONSchema(e){return((e,t={})=>n=>{let r=dW({...n,processors:t});return dH(e,r),dZ(r,e),d0(r,e)})(this,{})(e)},get description(){return dN.get(this)?.description},get _def(){return this._zod.def}}),ck=li("_ZodString",(e,t)=>{us.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{n.type="string";let{minimum:r,maximum:i,format:o,patterns:a,contentEncoding:s,laxFormat:l}=cr(e);if("number"==typeof r&&(n.minLength=r),"number"==typeof i&&(n.maxLength=i),o&&(n.format=ci[o]??o,""===n.format&&delete n.format,("time"===o||l)&&delete n.format),s&&(n.contentEncoding=s),a&&a.size>0){let e=[...a].map(ca);1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n)},az.derived({format:e=>cr(e).format??null,minLength:e=>cr(e).minimum??null,maxLength:e=>cr(e).maximum??null},{regex(...e){return this.check(function(e,t){return new l6({check:"string_format",format:"regex",...sD(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new l8({check:"string_format",format:"includes",...sD(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new l7({check:"string_format",format:"starts_with",...sD(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new l9({check:"string_format",format:"ends_with",...sD(t),suffix:e})}(...e))},min(...e){return this.check(d$(...e))},max(...e){return this.check(dL(...e))},length(...e){return this.check(dz(...e))},nonempty(...e){return this.check(d$(1,...e))},lowercase(e){return this.check(new l5({check:"string_format",format:"lowercase",...sD(e)}))},uppercase(e){return this.check(new l4({check:"string_format",format:"uppercase",...sD(e)}))},trim(){return this.check(dU(e=>e.trim()))},normalize(...e){return this.check(function(e){return dU(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(dU(e=>e.toLowerCase()))},toUpperCase(){return this.check(dU(e=>e.toUpperCase()))},slugify(){return this.check(dU(e=>sl(e)))}})),cx=li("ZodString",(e,t)=>{us.init(e,t),ck.init(e,t)},{email(e){return this.check(new cM({type:"string",format:"email",check:"string_format",abort:!1,...sD(e)}))},url(e){return this.check(new cB({type:"string",format:"url",check:"string_format",abort:!1,...sD(e)}))},jwt(e){return this.check(new c0({type:"string",format:"jwt",check:"string_format",abort:!1,...sD(e)}))},emoji(e){return this.check(new cL({type:"string",format:"emoji",check:"string_format",abort:!1,...sD(e)}))},guid(e){return this.check(new cR({type:"string",format:"guid",check:"string_format",abort:!1,...sD(e)}))},uuid(e){return this.check(new cT({type:"string",format:"uuid",check:"string_format",abort:!1,...sD(e)}))},uuidv4(e){return this.check(new cT({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...sD(e)}))},uuidv6(e){return this.check(new cT({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...sD(e)}))},uuidv7(e){return this.check(new cT({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...sD(e)}))},nanoid(e){return this.check(new c$({type:"string",format:"nanoid",check:"string_format",abort:!1,...sD(e)}))},cuid(e){return this.check(new cz({type:"string",format:"cuid",check:"string_format",abort:!1,...sD(e)}))},cuid2(e){return this.check(new cU({type:"string",format:"cuid2",check:"string_format",abort:!1,...sD(e)}))},ulid(e){return this.check(new cV({type:"string",format:"ulid",check:"string_format",abort:!1,...sD(e)}))},base64(e){return this.check(new cQ({type:"string",format:"base64",check:"string_format",abort:!1,...sD(e)}))},base64url(e){return this.check(new cX({type:"string",format:"base64url",check:"string_format",abort:!1,...sD(e)}))},xid(e){return this.check(new cW({type:"string",format:"xid",check:"string_format",abort:!1,...sD(e)}))},ksuid(e){return this.check(new cq({type:"string",format:"ksuid",check:"string_format",abort:!1,...sD(e)}))},ipv4(e){return this.check(new cH({type:"string",format:"ipv4",check:"string_format",abort:!1,...sD(e)}))},ipv6(e){return this.check(new cK({type:"string",format:"ipv6",check:"string_format",abort:!1,...sD(e)}))},cidrv4(e){return this.check(new cZ({type:"string",format:"cidrv4",check:"string_format",abort:!1,...sD(e)}))},cidrv6(e){return this.check(new cJ({type:"string",format:"cidrv6",check:"string_format",abort:!1,...sD(e)}))},e164(e){return this.check(new cY({type:"string",format:"e164",check:"string_format",abort:!1,...sD(e)}))},datetime(e){return this.check(new cI({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...sD(e)}))},date(e){return this.check(new cN({type:"string",format:"date",check:"string_format",...sD(e)}))},time(e){return this.check(new cC({type:"string",format:"time",check:"string_format",precision:null,...sD(e)}))},duration(e){return this.check(new cj({type:"string",format:"duration",check:"string_format",...sD(e)}))}});function cG(e){return new cx(dC({type:"string",...sD(e)}))}var cO=li("ZodStringFormat",(e,t)=>{ul.init(e,t),ck.init(e,t)}),cI=li("ZodISODateTime",(e,t)=>{uw.init(e,t),cO.init(e,t)}),cN=li("ZodISODate",(e,t)=>{uE.init(e,t),cO.init(e,t)}),cC=li("ZodISOTime",(e,t)=>{uA.init(e,t),cO.init(e,t)}),cj=li("ZodISODuration",(e,t)=>{uv.init(e,t),cO.init(e,t)}),cM=li("ZodEmail",(e,t)=>{uc.init(e,t),cO.init(e,t)}),cR=li("ZodGUID",(e,t)=>{uu.init(e,t),cO.init(e,t)}),cT=li("ZodUUID",(e,t)=>{ud.init(e,t),cO.init(e,t)}),cB=li("ZodURL",(e,t)=>{uh.init(e,t),cO.init(e,t)}),cL=li("ZodEmoji",(e,t)=>{uF.init(e,t),cO.init(e,t)}),c$=li("ZodNanoID",(e,t)=>{ug.init(e,t),cO.init(e,t)}),cz=li("ZodCUID",(e,t)=>{u_.init(e,t),cO.init(e,t)}),cU=li("ZodCUID2",(e,t)=>{uP.init(e,t),cO.init(e,t)}),cV=li("ZodULID",(e,t)=>{uD.init(e,t),cO.init(e,t)}),cW=li("ZodXID",(e,t)=>{ub.init(e,t),cO.init(e,t)}),cq=li("ZodKSUID",(e,t)=>{uy.init(e,t),cO.init(e,t)}),cH=li("ZodIPv4",(e,t)=>{uS.init(e,t),cO.init(e,t)}),cK=li("ZodIPv6",(e,t)=>{uG.init(e,t),cO.init(e,t)}),cZ=li("ZodCIDRv4",(e,t)=>{uO.init(e,t),cO.init(e,t)}),cJ=li("ZodCIDRv6",(e,t)=>{uI.init(e,t),cO.init(e,t)}),cQ=li("ZodBase64",(e,t)=>{uj.init(e,t),cO.init(e,t)}),cX=li("ZodBase64URL",(e,t)=>{uR.init(e,t),cO.init(e,t)}),cY=li("ZodE164",(e,t)=>{uT.init(e,t),cO.init(e,t)}),c0=li("ZodJWT",(e,t)=>{uB.init(e,t),cO.init(e,t)}),c1=li("ZodNumber",(e,t)=>{uL.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let{minimum:i,maximum:o,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:l,isInt:u}=cr(e);n.type=u?"integer":"number";let d="number"==typeof l&&l>=(i??-1/0),c="number"==typeof s&&s<=(o??1/0),f="draft-04"===t.target||"openapi-3.0"===t.target;if(d?f?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:"number"==typeof i&&(n.minimum=i),c?f?(n.maximum=s,n.exclusiveMaximum=!0):n.exclusiveMaximum=s:"number"==typeof o&&(n.maximum=o),a){let i=new Set;for(let o of a)Number.isFinite(o)&&0!==o?i.add(Math.abs(o)):dq(e,t,n,r,`A multipleOf divisor of ${o} cannot be represented in JSON Schema`);let[o,...s]=i;void 0!==o&&(n.multipleOf=o),s.length&&(n.allOf=[...n.allOf??[],...s.map(e=>({multipleOf:e}))])}})(e,t,n,r),e.isFinite=!0},az.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=cr(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=cr(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=cr(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>cr(e).format??null},{gt(e,t){return this.check(dR(e,t))},gte(e,t){return this.check(dT(e,t))},min(e,t){return this.check(dT(e,t))},lt(e,t){return this.check(dj(e,t))},lte(e,t){return this.check(dM(e,t))},max(e,t){return this.check(dM(e,t))},int(e){return this.check(c6(e))},safe(e){return this.check(c6(e))},positive(e){return this.check(dR(0,e))},nonnegative(e){return this.check(dT(0,e))},negative(e){return this.check(dj(0,e))},nonpositive(e){return this.check(dM(0,e))},multipleOf(e,t){return this.check(dB(e,t))},step(e,t){return this.check(dB(e,t))},finite(){return this}}));function c3(e){return new c1(dC({type:"number",checks:[],...sD(e)}))}var c2=li("ZodNumberFormat",(e,t)=>{u$.init(e,t),c1.init(e,t)});function c6(e){return new c2({type:"number",check:"number_format",abort:!1,format:"safeint",...sD(e)})}var c5=li("ZodBoolean",(e,t)=>{uz.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}});function c4(e){return new c5({type:"boolean",...sD(e)})}var c8=li("ZodUnknown",(e,t)=>{uU.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function c7(){return new c8({type:"unknown"})}var c9=li("ZodNever",(e,t)=>{uV.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}});function fe(e){return new c9({type:"never",...sD(e)})}var ft=li("ZodDate",(e,t)=>{uW.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{dq(e,t,n,r,"Date cannot be represented in JSON Schema")},e.min=(t,n)=>e.check(dT(t,n)),e.max=(t,n)=>e.check(dM(t,n))},az.derived({minDate:e=>{let{minimum:t}=cr(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=cr(e);return t?new Date(t):null}},{})),fn=li("ZodArray",(e,t)=>{cv(),uK.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,{minimum:o,maximum:a}=cr(e);"number"==typeof o&&(n.minItems=o),"number"==typeof a&&(n.maxItems=a),n.type="array",n.items=dH(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element},{min(e,t){return this.check(d$(e,t))},nonempty(e){return this.check(d$(1,e))},max(e,t){return this.check(dL(e,t))},length(e,t){return this.check(dz(e,t))},unwrap(){return this.element}});function fr(e,t){return new fn({type:"array",element:e,...sD(t)})}var fi=li("ZodObject",(e,t)=>{cv(),u0.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=i.shape;if(Object.getOwnPropertySymbols(o).length&&dq(e,t,n,r,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in n.type="object",n.properties={},o)a4(n.properties,e,dH(o[e],t,{...r,path:[...r.path,"properties",e]}));let a=[];for(let e of Object.keys(o)){let n=i.shape[e];("input"===t.io?void 0===cs(n):void 0===n._zod.optout)&&a.push(e)}a.length>0&&(n.required=a),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=dH(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),az.installLazyProp(e,"shape",e=>e._zod.def.shape,!1)},{keyof(){return fp(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(az.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(az.mergeDefs(this._zod.def,{catchall:c7()}))},loose(){return this.clone(az.mergeDefs(this._zod.def,{catchall:c7()}))},strict(){return this.clone(az.mergeDefs(this._zod.def,{catchall:fe()}))},strip(){return this.clone(az.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return az.extend(this,e)},safeExtend(e){return az.safeExtend(this,e)},merge(e){return az.merge(this,e)},pick(e){return az.pick(this,e)},omit(e){return az.omit(this,e)},partial(...e){return az.partial(fP,this,e[0])},exactPartial(...e){return az.partial(fb,this,e[0],"exactPartial")},required(...e){return az.required(fv,this,e[0])}});function fo(e,t){return new fi({type:"object",shape:e??{},...az.normalizeParams(t)})}var fa=li("ZodUnion",(e,t)=>{u3.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=!1===(i=e._zod.def).inclusive,a=i.options.map((e,n)=>dH(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]})),void(o?n.oneOf=a:n.anyOf=a)},e.options=t.options});function fs(e,t){return new fa({type:"union",options:e,...az.normalizeParams(t)})}var fl=li("ZodDiscriminatedUnion",(e,t)=>{fa.init(e,t),u6.init(e,t)});function fu(e,t,n){return new fl({type:"union",options:t,discriminator:e,...az.normalizeParams(n)})}var fd=li("ZodIntersection",(e,t)=>{u5.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a,s,l;return o=dH((i=e._zod.def).left,t,{...r,path:[...r.path,"allOf",0]}),a=dH(i.right,t,{...r,path:[...r.path,"allOf",1]}),void(n.allOf=l=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(o)?o.allOf:[o],...s(a)?a.allOf:[a]],t.intersections.push(l))}}),fc=li("ZodTuple",(e,t)=>{cv(),u8.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;n.type="array";let o="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=i.items.map((e,n)=>dH(e,t,{...r,path:[...r.path,o,n]})),l=i.rest?dH(i.rest,t,{...r,path:[...r.path,a,..."openapi-3.0"===t.target?[i.items.length]:[]]}):null,u=i.items.length;for(;u>0;){let e=i.items[u-1];if(!("input"===t.io?void 0!==cs(e):"optional"===e._zod.optout))break;u--}let d=i.items.length,c=!i.rest;"draft-2020-12"===t.target?(n.prefixItems=s,c?n.items=!1:l&&(n.items=l)):"openapi-3.0"===t.target?(n.items={anyOf:s},l&&n.items.anyOf.push(l)):(n.items=s,c?n.additionalItems=!1:l&&(n.additionalItems=l)),u>0&&(n.minItems=u),c&&(n.maxItems=d);let{minimum:f,maximum:m}=cr(e);"number"==typeof f&&(n.minItems=f),"number"==typeof m&&(n.maxItems=m)})(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(e=>new fP({type:"optional",innerType:e}))})}});function ff(e,t,n){let r=t instanceof ur,i=r?n:t;return new fc({type:"tuple",items:e,rest:r?t:null,...az.normalizeParams(i)})}var fm=li("ZodEnum",(e,t)=>{dt.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t)=>{let n=aZ(e._zod.def.entries);if(0===n.length){t.not={};return}n.every(e=>"number"==typeof e)&&(t.type="number"),n.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=n})(e,n),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new fm({...t,checks:[],...az.normalizeParams(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new fm({...t,checks:[],...az.normalizeParams(r),entries:i})}});function fp(e,t){return new fm({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...az.normalizeParams(t)})}var fh=li("ZodLiteral",(e,t)=>{dn.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(0===i.values.length){n.not={};return}let o=[];for(let a of i.values)if(void 0===a){if(dq(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(dq(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(0===o.length);else if(1===o.length){let e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o})(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function fF(e,t){return new fh({type:"literal",values:Array.isArray(e)?e:[e],...az.normalizeParams(t)})}var fg=li("ZodTransform",(e,t)=>{cv(),dr.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{dq(e,t,n,r,"Transforms cannot be represented in JSON Schema")},e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new la(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(az.issue(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),"input"in r||(r.input=n.value),r.inst??(r.inst=e),n.issues.push(az.issue(r)))};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function f_(e){return new fg({type:"transform",transform:e})}var fP=li("ZodOptional",(e,t)=>{da.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fD(e){return new fP({type:"optional",innerType:e})}var fb=li("ZodExactOptional",(e,t)=>{ds.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),fy=li("ZodNullable",(e,t)=>{dl.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=dH((i=e._zod.def).innerType,t,r),a=t.seen.get(e),void("openapi-3.0"===t.target?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}])},e.unwrap=()=>e._zod.def.innerType});function fw(e){return new fy({type:"nullable",innerType:e})}var fE=li("ZodDefault",(e,t)=>{du.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o;return dH((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,void((o=cu(i.defaultValue,e,t,n,r))!==cl&&(n.default=o))},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),fA=li("ZodPrefault",(e,t)=>{dc.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(dH(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;let o=cu(i.defaultValue,e,t,n,r);o!==cl&&(n._prefault=o)})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),fv=li("ZodNonOptional",(e,t)=>{df.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;dH((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),fS=li("ZodCatch",(e,t)=>{dh.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i,o=e._zod.def;dH(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{dq(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),fk=li("ZodPipe",(e,t)=>{dF.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),void(dH(a="input"===t.io?o?i.out:i.in:i.out,t,r),t.seen.get(e).ref=a)},e.in=t.in,e.out=t.out});function fx(e,t){return new fk({type:"pipe",in:e,out:t})}var fG=li("ZodPreprocess",(e,t)=>{fk.init(e,t),d_.init(e,t)}),fO=li("ZodReadonly",(e,t)=>{dP.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;dH((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),fI=li("ZodLazy",(e,t)=>{db.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;dH(i=e._zod.innerType,t,r),t.seen.get(e).ref=i},e.unwrap=()=>e._zod.def.getter()});function fN(e){return new fI({type:"lazy",getter:e})}var fC=li("ZodCustom",(e,t)=>{dy.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{dq(e,t,n,r,"Custom types cannot be represented in JSON Schema")}});function fj(e,t){return new fG({type:"pipe",in:f_(e),out:t})}var fM=(("document"in globalThis||"WorkerGlobalScope"in globalThis)&&ll({jitless:!0}),fo),fR=Symbol.for("@embedpdf/engine-core/reading");function fT(e,t){e._zod.def[fR]=t}function fB(e){return fT(e,{closed:!0}),e}function fL(e,t,n=e=>e,r=e=>e){let{discriminator:i}=e.def,o=fj(o=>{if("object"!=typeof o||null===o||Array.isArray(o))return o;let a=r(o),s=a[i];return"string"!=typeof s||function(e,t){let n=e._zod,r=n.bag.optionsMap;r||(r=u2(n.def),n.bag.optionsMap=r);let i=r.get(t);if(null===i)throw Error(`Ambiguous discriminator value "${String(t)}"`);return i}(e,s)?a:n({...a,[i]:t})},e);return fT(o,{unknownAs:t}),o}var f$=fM({kind:fB(fF("objectNumber")),objectNumber:c3().int().positive()}),fz=cG().regex(/^#[0-9a-fA-F]{6}$/,"expected a color as \'#rrggbb\'"),fU=fB(fp(["solid","dashed","beveled","inset"])),fV=fB(fp(["solid","dashed","beveled","inset","underline"])),fW=fB(fp(["check","cross","star","circle","square","diamond"])),fq=fB(fp(["caption","image","caption-below","caption-above","caption-right","caption-left","caption-over"])),fH=fp(["solid","dashed"]),fK=fr(c3().nonnegative()).min(1),fZ=fB(fp(["none","square","circle","diamond","open-arrow","closed-arrow","butt","r-open-arrow","r-closed-arrow","slash"])),fJ=fM({start:fZ,end:fZ});fp(Z);var fQ=fB(fp(["left","center","right"])),fX=fB(fp(["free-text","free-text-callout","free-text-typewriter"])),fY=fp(["free-text","free-text-callout"]),f0=fB(fp(["top","middle","bottom"])),f1=fB(fF("replace")),f3=fB(fF("strikeout-text-edit")),f2=fB(fF("ink-highlight")),f6=fB(fp(["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"])),f5=fB(fu("kind",[fM({kind:fF("objectNumber"),page:f$,objectNumber:c3().int().positive()}),fM({kind:fF("baseIndex"),page:f$,baseIndex:c3().int().nonnegative()})])),f4=c3().nullable(),f8=fB(fu("kind",[fM({kind:fF("xyz"),page:f$,left:f4,top:f4,zoom:f4}),fM({kind:fF("fit"),page:f$}),fM({kind:fF("fitH"),page:f$,top:f4}),fM({kind:fF("fitV"),page:f$,left:f4}),fM({kind:fF("fitR"),page:f$,left:c3(),bottom:c3(),right:c3(),top:c3()}),fM({kind:fF("fitB"),page:f$}),fM({kind:fF("fitBH"),page:f$,top:f4}),fM({kind:fF("fitBV"),page:f$,left:f4})])),f7=fB(fu("kind",[fM({kind:fF("xyz"),page:f$,x:f4,y:f4,zoom:f4}),fM({kind:fF("fit"),page:f$}),fM({kind:fF("fitH"),page:f$,y:f4}),fM({kind:fF("fitV"),page:f$,x:f4}),fM({kind:fF("fitR"),page:f$,x:c3(),y:c3(),width:c3().nonnegative(),height:c3().nonnegative()}),fM({kind:fF("fitB"),page:f$}),fM({kind:fF("fitBH"),page:f$,y:f4}),fM({kind:fF("fitBV"),page:f$,x:f4})]));function f9(e){let t=fM({kind:fF("goto"),destination:e}),n=fM({kind:fF("uri"),uri:cG()});return{read:fL(fu("kind",[t,n,fM({kind:fF("goto-remote"),file:cG()}),fM({kind:fF("launch"),path:cG()}),fM({kind:fF("javascript")}),fM({kind:fF("named"),name:cG()}),fM({kind:fF("unsupported")})]),"unsupported").describe("Where a link goes, by its `kind`. A newer server can add kinds: read one your client doesn\'t know as `unsupported`."),write:fu("kind",[t,n,fM({kind:fF("named"),name:fp(["NextPage","PrevPage","FirstPage","LastPage"])})])}}var me=f9(f7),mt=f9(f8),mn=me.read,mr=me.write,mi=mt.read,mo=mt.write,ma=fB(fu("kind",[fM({kind:fF("name"),name:cG()}),fM({kind:fF("objectNumber"),objectNumber:c3().int().positive()})])),ms={exclude:c4(),includeNoValueFields:c4(),format:fB(fp(["fdf","html","xfdf","pdf"])),method:fB(fp(["post","get"])),submitCoordinates:c4(),includeAppendSaves:c4(),includeAnnotations:c4(),canonicalFormat:c4(),exclNonUserAnnots:c4(),exclFKey:c4(),embedForm:c4()},ml=Object.fromEntries(Object.entries(ms).map(([e,t])=>[e,t.optional()]));function mu(e){let t={subtype:cG(),next:fr(fN(()=>i))},n=(e,n={})=>fM({type:fF(e),...t,...n}),r=[n("javascript",{script:cG()}),n("goto",{destination:e}),n("uri",{uri:cG(),isMap:c4()}),n("named",{name:cG()}),n("hide",{targets:fr(ma),hide:c4()}),n("reset-form",{fields:fr(ma).nullable(),exclude:c4()}),n("goto-remote",{filePath:cG()}),n("goto-embedded",{filePath:cG()}),n("launch",{filePath:cG()}),n("rendition",{script:cG().optional()}),n("submit-form",{payload:fM({url:cG(),fields:fr(ma).nullable(),...ms,charSet:cG().optional()}).optional()}),n("thread"),n("sound"),n("movie"),n("import-data"),n("set-ocg-state"),n("transition"),n("goto-3d-view"),n("unknown")],i=fN(()=>fL(fu("type",[...r]),"unknown").describe("An action, by its `type`. A newer server can add types: read one your client doesn\'t know as `unknown`, keeping its `subtype` and `next`.")),o=fM({root:i.nullable(),incomplete:c4(),warnings:fr(fB(fp(["cycle-dropped","malformed-next","incomplete","payload-dropped"])))});return{arms:r,node:i,tree:o,fieldActions:fM({keystroke:o.optional(),format:o.optional(),validate:o.optional(),calculate:o.optional()}),pageActions:fM({open:o.optional(),close:o.optional()}),annotationActions:fM({activate:o.optional(),cursorEnter:o.optional(),cursorExit:o.optional(),mouseDown:o.optional(),mouseUp:o.optional(),focus:o.optional(),blur:o.optional(),pageOpen:o.optional(),pageClose:o.optional(),pageVisible:o.optional(),pageInvisible:o.optional()}),documentActions:fM({nameTreeScripts:fr(fM({name:cG(),action:o})),openAction:o.nullable(),openDestination:e.nullable(),willClose:o.optional(),willSave:o.optional(),didSave:o.optional(),willPrint:o.optional(),didPrint:o.optional()}).superRefine((e,t)=>{null!==e.openAction&&null!==e.openDestination&&t.addIssue({code:"custom",message:"openAction and openDestination are mutually exclusive",path:["openDestination"]})})}}var md=mu(f7),mc=mu(f8);function mf(e){let t=()=>({next:fr(fN(()=>r)).optional()}),n=[fM({type:fF("javascript"),script:cG(),...t()}),fM({type:fF("goto"),destination:e,...t()}),fM({type:fF("uri"),uri:cG().min(1),...t()}),fM({type:fF("named"),name:cG().min(1),...t()}),fM({type:fF("hide"),targets:fr(ma).min(1),hide:c4(),...t()}),fM({type:fF("reset-form"),fields:fr(ma).nullable(),exclude:c4(),...t()}),fM({type:fF("submit-form"),url:cG().min(1),fields:fr(ma).nullable(),...ml,...t()})],r=fN(()=>fu("type",[...n])),i=()=>r.nullable().optional();return{node:r,widgetActions:fM({activate:i(),cursorEnter:i(),cursorExit:i(),mouseDown:i(),mouseUp:i(),focus:i(),blur:i(),pageOpen:i(),pageClose:i(),pageVisible:i(),pageInvisible:i()}).strict()}}var mm=mf(f7),mp=mf(f8);mm.node;var mh=mm.widgetActions,mF=mp.widgetActions;md.node,fp(md.arms.map(e=>e.shape.type.value)),md.tree;var mg=md.fieldActions;md.pageActions,md.documentActions;var m_=md.annotationActions,mP=mc.annotationActions,mD=fN(()=>fM({type:fF("javascript"),script:cG(),next:fr(mD).optional()})),mb=fM({keystroke:mD.nullable().optional(),format:mD.nullable().optional(),validate:mD.nullable().optional(),calculate:mD.nullable().optional()}),my=fM({x:c3(),y:c3()}),mw=fM({start:my,end:my}),mE=fs([ff([my,my]),ff([my,my,my])]),mA=fr(fr(my)),mv=fM({left:c3().finite(),bottom:c3().finite(),right:c3().finite(),top:c3().finite()});fM({width:c3().nonnegative(),height:c3().nonnegative()});var mS=fM({upperLeft:my,upperRight:my,lowerLeft:my,lowerRight:my}),mk=fB(fs([fF(0),fF(90),fF(180),fF(270)])),mx=fM({x:c3(),y:c3()}),mG=fM({x:c3().finite(),y:c3().finite(),width:c3().finite().nonnegative(),height:c3().finite().nonnegative()});function mO(e,t,n){let r=r=>mO(e,t,{...n,...r});return{read:e,write:t,traits:n,nullable:()=>r({readNullable:!0,writeNullable:!0}),nullableOnRead:()=>r({readNullable:!0}),optional:()=>r({required:!1}),readBack:()=>r({readBack:!0}),space:e=>r({space:e}),writes:t=>mO(e,t,n)}}fM({upperLeft:mx,upperRight:mx,lowerLeft:mx,lowerRight:mx});var mI=(e,t)=>({owner:e,readNullable:!1,writeNullable:!1,required:t,readBack:!1,space:"none"}),mN=e=>mO(e,e,mI("data",!0)),mC=e=>mO(e,e,mI("attribution",!1)),mj=e=>mO(e,e,mI("engine",!1)),mM={box:{read:mG,write:mG},linkTarget:{read:mn,write:mr},actions:{read:m_,write:mh}};function mR(e,t,n){let r={subtype:fB(fF(e))},i={subtype:fF(e)},o={subtype:fF(e).optional()},a={};for(let[e,s]of Object.entries(t)){let{owner:t,readNullable:l,writeNullable:u,required:d,readBack:c}=s.traits,f=n(s);if(r[e]=l?f.read.nullable():f.read,"data"===t){let t=u?f.write.nullable():f.write;i[e]=d?t:t.optional();let n=f.read===f.write?l||u?f.write.nullable():f.write:fs([t,r[e]]);o[e]=(c?n:t).optional(),c&&(a[e]=t)}else i[e]=c?r[e].optional():c7().optional(),o[e]=c?r[e].optional():c7().optional(),c&&(a[e]=null)}return{read:r,create:i,update:o,readBackWrites:a}}function mT(e,t,n={}){let r=mR(e,t,e=>e),i=mR(e,t,e=>mM[e.traits.space]??e);return{subtype:e,fields:t,resources:n,readSchema:fM(i.read),createSchema:fM(i.create).strict(),updateSchema:fM(i.update).strict(),fileSchemas:{read:fM(r.read),create:fM(r.create).strict(),update:fM(r.update).strict()},readBackWrites:r.readBackWrites,shapes:{read:i.read,create:i.create,update:i.update}}}var mB=cG().datetime({offset:!0,local:!0}),mL=fs([mB,new ft({type:"date",...sD(void 0)})]),m$=c3().finite().refine(e=>Number.isFinite(Math.fround(e)),"Outside PDF float range"),mz=fM({x:m$,y:m$}),mU=mz.strict(),mV=m$.refine(e=>Math.fround(e)>0,"Must be positive in PDF float precision"),mW=fM({unit:cG(),conversion:m$.optional(),fraction:fB(fp(["decimal","fraction","round","truncate"])).optional(),precision:c3().int().optional(),fixed:c4().optional(),thousands:cG().optional(),decimal:cG().optional(),prefixSpacing:cG().optional(),suffixSpacing:cG().optional(),labelPosition:fB(fp(["suffix","prefix"])).optional()}),mq=fM({subtype:fF("rectilinear"),ratio:cG().optional(),x:fr(mW),y:fr(mW).optional(),distance:fr(mW),area:fr(mW),angle:fr(mW).optional(),slope:fr(mW).optional(),origin:mz.optional(),cyx:m$.optional()}),mH=mW.extend({conversion:mV,precision:c3().int().min(1).max(0x7fffffff).optional()}).refine(eL,"Invalid number format precision"),mK=mq.extend({x:fr(mH),y:fr(mH).optional(),distance:fr(mH),area:fr(mH),angle:fr(mH).optional(),slope:fr(mH).optional(),cyx:mV.optional(),origin:mU.optional()}),mZ=fM({subtype:fF("geospatial")}),mJ=fM({subtype:fF("unknown")}),mQ=fs([mZ,mJ]);fM({measure:mK.nullable()});var mX=fL(fu("subtype",[mq,mZ,mJ]),"unknown").describe("A measure, by its `subtype`. A newer server can add subtypes: read one your client doesn\'t know as `unknown`."),mY=fM({bbox:mG,name:cG().nullable(),measure:mX.nullable(),owned:c4()});fM({viewports:fr(mY)});var m0=fB(fp(["line-arrow","line-dimension"])),m1=fB(fp(["polygon-cloud","polygon-dimension"])),m3=fB(fF("polyline-dimension")),m2=fM({along:m$,perpendicular:m$}).strict();fM({enabled:c4(),position:fp(["inline","top"]).optional(),offset:m2.optional()}).strict(),fM({enabled:c4(),center:mU.optional()}).strict();var m6=fM({length:m$,extension:m$.refine(e=>e>=0).optional(),offset:m$.refine(e=>e>=0).optional()}),m5=m6.strict(),m4=fB(fp(["left","center","right","justify"])),m8={family:cG().min(1),weight:c3().int().min(100).max(900),italic:c4(),size:c3().nonnegative(),color:fz,decoration:fr(fB(fp(["underline","line-through","word"]))),script:fB(fp(["normal","sub","super"])),letterSpacing:c3(),horizontalScale:c3().positive(),unknown:cG().optional()},m7={align:m4,dir:fB(fp(["ltr","rtl"])),lineHeight:c3().positive().optional(),margins:fM({top:c3(),bottom:c3(),left:c3(),right:c3()}).optional(),textIndent:c3().optional(),unknown:cG().optional()},m9=fM(m8).partial(),pe=fM({...m7,runs:fr(fM({text:cG(),style:m9.optional()}))}).partial({align:!0,dir:!0}),pt=fM({body:fM({...m8,...m7}),paragraphs:fr(pe)}),pn=fM({body:fM({...m8,...m7}).partial().optional(),paragraphs:fr(pe)}),pr=fM({to:f5,type:fB(fp(["reply","group"]))}),pi=fM({to:f5,type:fp(["reply","group"]).optional()}),po=cG().min(1),pa=()=>mN(c4()).optional(),ps={ref:mj(f5),page:mj(f$),hasAppearance:mj(c4()),appearanceState:mj(cG()).nullable(),structurePosition:mj(fr(c3().int().nonnegative())).nullable(),nm:mN(cG()).nullable().optional(),rect:mN(mv).space("box"),contents:mN(cG()).nullable().optional(),subject:mN(cG()).nullable().optional(),blendMode:mN(f6).optional(),invisible:pa(),hidden:pa(),print:pa(),noZoom:pa(),noRotate:pa(),noView:pa(),readOnly:pa(),locked:pa(),toggleNoView:pa(),lockedContents:pa(),reply:mN(pr).writes(pi).nullable().optional(),popup:mj(f5).nullable(),groupId:mN(cG().min(1)).nullable().optional(),author:mC(cG()).nullable(),createdAt:mC(mB).writes(mL).nullable(),modifiedAt:mC(mB).writes(mL).nullable(),userId:mC(cG()).nullable(),createdBy:mC(cG()).nullable(),modifiedBy:mC(cG()).nullable(),importedBy:mj(cG()).nullable(),actions:mO(p=mP,p,mI("preserved",!1)).nullable().space("actions")},pl={...ps,richText:mN(pt).writes(pn).nullable().optional().space("length")},pu={color:mN(fz).optional(),opacity:mN(c3().min(0).max(1)).optional()},pd={...pu,color:mN(fz).nullable().optional(),strokeWidth:mN(c3().nonnegative()).optional(),borderStyle:mN(fU).writes(fH).readBack().optional(),dashArray:mN(fr(c3().nonnegative())).writes(fK).nullable().optional()},pc={...pd,interiorColor:mN(fz).nullable().optional()},pf={rect:mj(mv).readBack().space("box")},pm={rotation:mN(c3()).nullable().optional()},pp={...pf,box:mN(mv).space("box").optional(),rotation:mN(c3()).nullable().optional()},ph={...pf,box:mN(mv).space("box").optional(),rotation:mN(mk).nullable().optional()},pF={...pl,...pu,...pf,quadPoints:mN(fr(mS).min(1)).space("quads")},pg={...pl,...pc,...pp,cloudyIntensity:mN(c3().positive()).nullable().optional()},p_={...pl,...pc,...pf,vertices:mN(fr(my)).space("points"),...pm},pP=mN(mX).writes(fs([mK,mQ])).nullable().optional().space("measure"),pD={captionEnabled:mN(c4()).nullable().optional(),captionCenter:mN(my).nullable().optional().space("point")},pb=mT("caret",{...pl,...pu,...pp,intent:mN(f1).nullable().optional()}),py={subtype:"caret",pdfSubtypeCode:14,dtoSchema:pb.readSchema,draftSchema:pb.createSchema,patchSchema:pb.updateSchema,readBackWrites:pb.readBackWrites},pw=mT("circle",pg),pE={subtype:"circle",pdfSubtypeCode:6,dtoSchema:pw.readSchema,draftSchema:pw.createSchema,patchSchema:pw.updateSchema,readBackWrites:pw.readBackWrites},pA=cG().min(1);fM({appearance:pA.optional(),file:pA.optional()}).strict(),fM({appearance:pA}).strict(),fM({appearance:pA.nullable()}).strict(),fM({image:pA.nullable()}).strict();var pv=fM({file:pA}).strict();fM({source:pA}).strict(),fM({image:pA}),fM({resources:pv,name:cG().min(1),mimeType:cG().optional(),description:cG().optional()}),fM({name:cG().min(1),mimeType:cG().optional(),description:cG().optional()});var pS=fM({name:cG(),mimeType:cG().nullable(),description:cG().nullable(),sizeBytes:c3().int().nonnegative().nullable(),md5:cG().nullable(),createdAt:mB.nullable(),modifiedAt:mB.nullable()});fM({kind:fB(fF("key")),key:cG().min(1)}),fM({ref:fM({kind:fB(fF("key")),key:cG()}),name:cG(),mimeType:cG().nullable(),description:cG().nullable(),sizeBytes:c3().int().nonnegative().nullable(),md5:cG().nullable(),createdAt:mB.nullable(),modifiedAt:mB.nullable(),index:c3().int().nonnegative()});var pk=fB(fp(["push-pin","paperclip","graph","tag"])),px=fM({name:cG().min(1),mimeType:cG().nullable().optional(),description:cG().nullable().optional()}),pG=mT("file-attachment",{...pl,...pu,icon:mN(pk).optional(),file:mN(pS).writes(px).nullable().optional()},{file:"required"}),pO=mT("free-text",{...pl,...pp,intent:mN(fX).writes(fY).readBack().optional(),fontFamily:mN(po).optional(),fontSize:mN(c3().positive()).optional(),textAlign:mN(m4).optional(),verticalAlign:mN(f0).optional(),richText:mN(pt).writes(pn).optional().space("length"),color:mN(fz).optional(),fontColor:mN(fz).optional(),interiorColor:mN(fz).nullable().optional(),opacity:mN(c3().min(0).max(1)).optional(),strokeWidth:mN(c3().nonnegative()).optional(),borderStyle:mN(fU).writes(fH).readBack().optional(),dashArray:mN(fr(c3().nonnegative())).writes(fK).nullable().optional(),cloudyIntensity:mN(c3().positive()).nullable().optional(),calloutLine:mN(mE).nullable().optional().space("calloutLine"),lineEnding:mN(fZ).nullable().optional()}),pI=mT("highlight",pF),pN=mT("ink",{...pl,...pd,strokeWidth:mN(c3().nonnegative()).writes(c3().positive()).readBack().optional(),...pf,inkList:mN(mA).writes(fr(fr(my).min(1)).min(1)).readBack().space("strokes"),intent:mN(f2).nullable().optional(),...pm}),pC=mT("line",{...pl,...pc,...pf,linePoints:mN(mw).space("linePoints"),lineEndings:mN(fJ).optional(),...pm,intent:mN(m0).nullable().optional(),measure:pP,captionEnabled:mN(c4()).optional(),captionPosition:mN(fB(fp(["inline","top"]))).optional(),captionOffset:mN(fM({along:c3(),perpendicular:c3()})).nullable().optional(),leader:mN(m6).writes(m5).nullable().optional()}),pj=mT("link",{...ps,target:mN(mi).writes(mo).nullable().readBack().space("linkTarget")}),pM=mT("polygon",{...p_,vertices:mN(fr(my)).writes(fr(my).min(3)).readBack().space("points"),...pD,intent:mN(m1).nullable().optional(),measure:pP,cloudyIntensity:mN(c3().positive()).nullable().optional()}),pR=mT("polyline",{...p_,vertices:mN(fr(my)).writes(fr(my).min(2)).readBack().space("points"),...pD,intent:mN(m3).nullable().optional(),measure:pP,lineEndings:mN(fJ).optional()}),pT=mT("popup",{...ps,parent:mN(f5).nullableOnRead().readBack(),open:mN(c4()).optional()}),pB=mT("redact",{...pl,...pu,rect:mN(mv).optional().space("box"),quadPoints:mN(fr(mS)).optional().space("quads"),interiorColor:mN(fz).nullable().optional(),overlayText:mN(cG()).nullable().optional(),repeat:mN(c4()).optional(),fontFamily:mN(po).optional(),fontSize:mN(c3().nonnegative()).optional(),fontColor:mN(fz).optional(),textAlign:mN(fQ).optional()}),pL=mT("square",pg),p$=mT("squiggly",pF),pz=fB(fp(["contain","cover","fill"])),pU=mT("stamp",{...pl,...pp,name:mN(cG()).nullable().optional(),fit:mN(pz).nullable().optional(),opacity:mN(c3().min(0).max(1)).optional()},{appearance:"required"}),pV=mT("strikeout",{...pF,intent:mN(f3).nullable().optional()}),pW=fB(fp(["comment","key","note","help","new-paragraph","paragraph","insert"])),pq=mT("text",{...pl,...pu,icon:mN(pW).optional(),open:mN(c4()).optional(),state:mN(cG().min(1)).nullable().optional(),stateModel:mN(cG().min(1)).nullable().optional()}),pH=mT("underline",pF),pK=mT("unsupported",{...ps,rawSubtypeCode:mj(c3().int()),rawSubtypeName:mj(cG()).nullable()}),pZ=fB(fu("kind",[fM({kind:fF("objectNumber"),objectNumber:c3().int().positive()}),fM({kind:fF("fqn"),name:cG().min(1)})])),pJ=mT("widget",{...ps,...ph,color:mN(fz).nullable().optional(),interiorColor:mN(fz).nullable().optional(),strokeWidth:mN(c3().nonnegative()).optional(),borderStyle:mN(fV).optional(),dashArray:mN(fr(c3().nonnegative())).writes(fK).nullable().optional(),fontFamily:mN(po).nullable().optional(),fontSize:mN(c3().nonnegative()).nullable().optional(),fontColor:mN(fz).nullable().optional(),textAlign:mN(fQ).optional(),caption:mN(cG()).nullable().optional(),checkStyle:mN(fW).nullable().optional(),layout:mN(fq).nullable().optional(),actions:mN(mP).writes(mF).readBack().nullable().optional().space("actions"),field:mj(pZ).nullable(),fieldKind:mj((h=fp(["text","checkbox","radio","combobox","listbox","pushbutton","signature","unknown"]),F="unknown",f=new Set(h.options),fT(m=fj(e=>"string"!=typeof e||f.has(e)?e:F,h),{unknownAs:F}),m).describe("Its field\'s family. A newer server can add families: read one your client doesn\'t know as `unknown`.")),hasMark:mj(c4())}),pQ=[pI,pH,p$,pV,pw,pL,pM,pR,pC,pj,pN,pO,pb,pq,pU,pG,pJ,pB,pT,pK];function pX(e){return pQ.find(t=>t.subtype===e)??null}var pY={subtype:"file-attachment",pdfSubtypeCode:17,dtoSchema:pG.readSchema,draftSchema:pG.createSchema,patchSchema:pG.updateSchema,readBackWrites:pG.readBackWrites},p0={subtype:"free-text",pdfSubtypeCode:3,dtoSchema:pO.readSchema,draftSchema:pO.createSchema,patchSchema:pO.updateSchema,readBackWrites:pO.readBackWrites},p1={subtype:"highlight",pdfSubtypeCode:9,dtoSchema:pI.readSchema,draftSchema:pI.createSchema,patchSchema:pI.updateSchema,readBackWrites:pI.readBackWrites},p3={subtype:"ink",pdfSubtypeCode:15,dtoSchema:pN.readSchema,draftSchema:pN.createSchema,patchSchema:pN.updateSchema,readBackWrites:pN.readBackWrites},p2={subtype:"line",pdfSubtypeCode:4,dtoSchema:pC.readSchema,draftSchema:pC.createSchema,patchSchema:pC.updateSchema,readBackWrites:pC.readBackWrites},p6={subtype:"link",pdfSubtypeCode:2,dtoSchema:pj.readSchema,draftSchema:pj.createSchema,patchSchema:pj.updateSchema,readBackWrites:pj.readBackWrites},p5={subtype:"polygon",pdfSubtypeCode:7,dtoSchema:pM.readSchema,draftSchema:pM.createSchema,patchSchema:pM.updateSchema,readBackWrites:pM.readBackWrites},p4={subtype:"polyline",pdfSubtypeCode:8,dtoSchema:pR.readSchema,draftSchema:pR.createSchema,patchSchema:pR.updateSchema,readBackWrites:pR.readBackWrites},p8={subtype:"popup",pdfSubtypeCode:16,dtoSchema:pT.readSchema,draftSchema:pT.createSchema,patchSchema:pT.updateSchema,readBackWrites:pT.readBackWrites},p7={subtype:"redact",pdfSubtypeCode:28,dtoSchema:pB.readSchema,draftSchema:pB.createSchema,patchSchema:pB.updateSchema,readBackWrites:pB.readBackWrites},p9={subtype:"square",pdfSubtypeCode:5,dtoSchema:pL.readSchema,draftSchema:pL.createSchema,patchSchema:pL.updateSchema,readBackWrites:pL.readBackWrites},he={subtype:"squiggly",pdfSubtypeCode:11,dtoSchema:p$.readSchema,draftSchema:p$.createSchema,patchSchema:p$.updateSchema,readBackWrites:p$.readBackWrites},ht={subtype:"stamp",pdfSubtypeCode:13,dtoSchema:pU.readSchema,draftSchema:pU.createSchema,patchSchema:pU.updateSchema,readBackWrites:pU.readBackWrites},hn={subtype:"strikeout",pdfSubtypeCode:12,dtoSchema:pV.readSchema,draftSchema:pV.createSchema,patchSchema:pV.updateSchema,readBackWrites:pV.readBackWrites},hr={subtype:"text",pdfSubtypeCode:1,dtoSchema:pq.readSchema,draftSchema:pq.createSchema,patchSchema:pq.updateSchema,readBackWrites:pq.readBackWrites},hi={subtype:"underline",pdfSubtypeCode:10,dtoSchema:pH.readSchema,draftSchema:pH.createSchema,patchSchema:pH.updateSchema,readBackWrites:pH.readBackWrites},ho={subtype:"unsupported",pdfSubtypeCode:0,dtoSchema:pK.readSchema,draftSchema:fe(),patchSchema:fe(),readBackWrites:pK.readBackWrites},ha=fj(e=>"object"!=typeof e||null===e||Array.isArray(e)?e:Q(e),pJ.readSchema),hs=pJ.createSchema,hl=pJ.updateSchema,hu={subtype:"widget",pdfSubtypeCode:20,dtoSchema:pJ.readSchema,draftSchema:hs,patchSchema:hl,readBackWrites:pJ.readBackWrites},hd=Object.fromEntries(rM.map(e=>[e,pJ.shapes.update[e]]));fM(hd).strict();var hc=[p1,hi,he,hn,pE,p9,p5,p4,p2,p6,p3,p0,py,hr,ht,pY,hu,p7,p8,ho],hf=Object.freeze(Object.fromEntries(hc.map(e=>[e.subtype,e])));fL(fu("subtype",[p1.dtoSchema,hi.dtoSchema,he.dtoSchema,hn.dtoSchema,pE.dtoSchema,p9.dtoSchema,p5.dtoSchema,p4.dtoSchema,p2.dtoSchema,p6.dtoSchema,p3.dtoSchema,p0.dtoSchema,py.dtoSchema,hr.dtoSchema,ht.dtoSchema,pY.dtoSchema,hu.dtoSchema,p7.dtoSchema,p8.dtoSchema,ho.dtoSchema]),"unsupported",e=>({...e,rawSubtypeCode:Number.isInteger(e.rawSubtypeCode)?e.rawSubtypeCode:0,rawSubtypeName:"string"==typeof e.rawSubtypeName?e.rawSubtypeName:null}),e=>"widget"===e.subtype?Q(e):e).describe("An annotation, by its `subtype`. A newer server can add subtypes: read one your client doesn\'t know as `unsupported`, keeping the fields every annotation has, with `rawSubtypeCode` 0 and `rawSubtypeName` null when the body has neither.");var hm=fu("subtype",[p1.draftSchema,hi.draftSchema,he.draftSchema,hn.draftSchema,pE.draftSchema,p9.draftSchema,p5.draftSchema,p4.draftSchema,p2.draftSchema,p6.draftSchema,p3.draftSchema,p0.draftSchema,py.draftSchema,hr.draftSchema,ht.draftSchema,pY.draftSchema,hu.draftSchema,p7.draftSchema,p8.draftSchema]);fs(hc.filter(e=>"unsupported"!==e.subtype).map(e=>e.patchSchema));var hp=fu("subtype",pQ.filter(e=>"unsupported"!==e.subtype).map(e=>e.fileSchemas.create)),hh={ref:f5.nullable(),objectNumber:c3().int().nonnegative(),page:f$.nullable()},hF=fM(hh),hg=fM({...hh,onState:cG(),exportValue:cG(),checked:c4()}),h_=fM({label:cG(),value:cG(),selected:c4()}),hP=fL(fu("kind",[fM({kind:fF("none")}),fM({kind:fF("scalar"),value:cG()}),fM({kind:fF("array"),values:fr(cG())}),fM({kind:fF("unsupported")})]),"unsupported").describe("A field\'s stored value, by its `kind`. A newer server can add kinds: read one your client doesn\'t know as `unsupported`."),hD=fL(fu("kind",[fM({kind:fF("date"),pattern:cG()}),fM({kind:fF("time"),pattern:cG()}),fM({kind:fF("other")})]),"other").describe("The shape a text field\'s or a dropdown\'s value has, by its `kind`: a date or a time with the pattern it is shown in, or `other` for a format script the engine does not recognise. A newer server can add kinds: read one your client doesn\'t know as `other`."),hb=cG().min(1).max(64).refine(ep,{message:"a date pattern is made of the groups yyyy yy mmmm mmm mm m dd d, at least one of them and the year, the month and the day each once at most, with spaces and / - . , between them, and at most one time such as HH:MM or h:MM:ss tt"}),hy=cG().min(1).max(64).refine(eF,{message:"a time pattern is a time and nothing else: HH, H, hh or h, then :MM, then :ss when it has seconds, then tt when it has one"}),hw=fu("kind",[fM({kind:fF("date"),pattern:hb}).strict(),fM({kind:fF("time"),pattern:hy}).strict()]),hE=cG().min(1).max(256).refine(rC,{message:"a purpose has no space at its start or its end, and no NUL character"}),hA=cG().min(1).max(256).refine(eN,{message:"a placeholder has no space at its start or its end, and no NUL character"}),hv=fB(fu("kind",[fM({kind:fF("group"),groupId:cG()}),fM({kind:fF("anyone")}),fM({kind:fF("unassigned")})])),hS=fM({signatureIndex:c3().int().nonnegative(),source:fB(fp(["fieldmdp","lock"]))}),hk={ref:pZ,name:cG(),origin:fB(fp(["acroform","recovered"])),readOnly:c4(),required:c4(),noExport:c4(),alternateName:cG().nullable(),mappingName:cG().nullable(),valueEntry:hP,defaultValueEntry:hP,actions:mg.optional(),groupId:cG().nullable(),assignment:hv,lockedBy:hS.nullable(),purpose:cG().nullable(),placeholder:cG().nullable(),createdBy:cG().nullable(),createdAt:mB.nullable(),filledBy:cG().nullable(),filledByName:cG().nullable(),filledAt:mB.nullable(),importedBy:cG().nullable(),widgets:fr(hF)},hx=fL(fu("kind",[fM({...hk,kind:fF("text"),value:cG(),defaultValue:cG(),maxLength:c3().int().positive().nullable(),multiline:c4(),password:c4(),comb:c4(),format:hD.nullable()}),fM({...hk,kind:fF("checkbox"),checked:c4(),exportValue:cG(),hasValuesList:c4().describe("Whether the field names its widgets\' values in a list (`/Opt`), as Acrobat does for values that repeat or aren\'t plain names: each widget\'s `exportValue` is then the list\'s entry at its place, and its `onState` only a key."),widgets:fr(hg)}),fM({...hk,kind:fF("radio"),value:cG(),radiosInUnison:c4(),noToggleToOff:c4(),hasValuesList:c4().describe("Whether the field names its widgets\' values in a list (`/Opt`), as Acrobat does for values that repeat or aren\'t plain names: each widget\'s `exportValue` is then the list\'s entry at its place, and its `onState` only a key."),widgets:fr(hg)}),fM({...hk,kind:fF("combobox"),value:cG(),defaultValue:cG(),edit:c4(),options:fr(h_),format:hD.nullable()}),fM({...hk,kind:fF("listbox"),selectedValues:fr(cG()),defaultValue:fr(cG()),multiSelect:c4(),options:fr(h_),topIndex:c3().int().nonnegative()}),fM({...hk,kind:fF("pushbutton"),hasImage:c4(),takesImage:c4().describe("Whether the push button is an image field, which a person fills with a picture: it has a widget, and every widget\'s press runs Acrobat\'s import-icon script (`event.target.buttonImportIcon()`) and nothing else.")}),fM({...hk,kind:fF("signature")}),fM({...hk,kind:fF("unknown"),rawValue:cG()})]),"unknown",e=>({...e,rawValue:"string"==typeof e.rawValue?e.rawValue:""}),e=>{var t;return"checkbox"!==(t=es(ej(en(el(ey(e)))))).kind&&"radio"!==t.kind||void 0!==t.hasValuesList?t:{...t,hasValuesList:!1}}).describe("A form field, by its `family`. A newer server can add families: read one your client doesn\'t know as `unknown`, keeping the fields every field has, with `rawValue` an empty string when the body has none.");fM({formKind:fB(fp(["none","acroform","xfa"])),needsAppearances:c4(),fields:fr(hx),widgets:fr(ha),calculationOrder:fr(pZ.nullable())}),fM({value:cG().nullable().optional(),checked:c4().optional(),selectedValues:fr(cG()).optional()}).strict().refine(e=>1===[e.value,e.checked,e.selectedValues].filter(e=>void 0!==e).length,{message:"exactly one of value, checked or selectedValues"});var hG=fM({page:f$,rect:mG.optional(),box:mG.optional(),rotation:mk.optional(),exportValue:cG().min(1).optional(),actions:mh.optional(),...hd}).strict(),hO=fM({label:cG(),value:cG()}),hI={name:cG().min(1),readOnly:c4().optional(),required:c4().optional(),noExport:c4().optional(),alternateName:cG().optional(),mappingName:cG().optional(),groupId:cG().min(1).max(256).nullable().optional(),assignment:hv.optional(),purpose:hE.nullable().optional(),placeholder:hA.nullable().optional(),actions:mb.optional(),widgets:fr(hG).optional()},hN=fu("kind",[fM({...hI,kind:fF("text"),defaultValue:cG().optional(),maxLength:c3().int().positive().optional(),multiline:c4().optional(),password:c4().optional(),comb:c4().optional(),format:hw.nullable().optional()}).strict(),fM({...hI,kind:fF("checkbox")}).strict(),fM({...hI,kind:fF("radio"),radiosInUnison:c4().optional(),noToggleToOff:c4().optional()}).strict(),fM({...hI,kind:fF("combobox"),edit:c4().optional(),options:fr(hO).optional(),defaultValue:cG().optional(),format:hw.nullable().optional()}).strict(),fM({...hI,kind:fF("listbox"),multiSelect:c4().optional(),options:fr(hO).optional(),defaultValue:fr(cG()).optional()}).strict(),fM({...hI,kind:fF("pushbutton"),takesImage:c4().optional().describe("Make the push button an image field: the engine writes Acrobat\'s import-icon script as each widget\'s activation action. It needs a widget, and can\'t go beside a widget\'s `actions.activate` or `actions.mouseUp`.")}).strict(),fM({...hI,kind:fF("signature")}).strict()]);function hC(e,t){let n=e.issues[0],r=n.path.join(".");return new N(G.InvalidArg,`${t}${r?` field \'${r}\'`:""}: ${n.message}`,{details:r?{field:r}:{}})}function hj(e){let{ref:t,reply:n,popup:r,...i}=e,o={...i};return"popup"===e.subtype&&delete o.parent,[t.page,...rB(o)]}function hM(e){let t=[],n=pX(e.subtype);for(let[r,i]of Object.entries(n?.fields??{})){let{owner:n,readBack:o,required:a}=i.traits;if("data"!==n||!o||"target"===r)continue;let s=e[r];if(null!=s&&!i.write.safeParse(s).success){if(a)return"item";t.push({field:r,reason:"unsupported-value"})}}return t}function hR(e,t,n,r){let i={...e};delete i.reply;let o=pX(e.subtype)?.fields??{};for(let{field:e}of t)o[e]?.traits.writeNullable?i[e]=null:delete i[e];let a=hm.safeParse(i);if("popup"===e.subtype&&delete i.parent,!a.success){let e=a.error.issues[0],t=e.path.join(".");throw new N(G.InvalidArg,`${r.label}${t?` field \'${t}\'`:""}: ${e.message}`,{details:{...r.details,...t?{field:t}:{}}})}return rL(i,n)}function hT(e,t,n){let r=hN.safeParse(e);if(!r.success){let e=r.error.issues[0],i=e.path.join(".");throw new N(G.InvalidArg,`${t}${i?` member \'${i}\'`:""}: ${e.message}`,{details:{...n,...i?{field:i}:{}}})}return e}fM({name:cG().min(1).optional(),readOnly:c4().optional(),required:c4().optional(),noExport:c4().optional(),alternateName:cG().nullable().optional(),mappingName:cG().nullable().optional(),groupId:cG().min(1).max(256).nullable().optional(),assignment:hv.optional(),purpose:hE.nullable().optional(),placeholder:hA.nullable().optional(),actions:mb.optional(),kind:fp(["text","checkbox","radio","combobox","listbox","pushbutton","signature"]).optional(),defaultValue:fs([cG(),fr(cG())]).nullable().optional(),maxLength:c3().int().positive().nullable().optional(),multiline:c4().optional(),password:c4().optional(),comb:c4().optional(),radiosInUnison:c4().optional(),noToggleToOff:c4().optional(),edit:c4().optional(),multiSelect:c4().optional(),options:fr(hO).optional(),format:hw.nullable().optional(),takesImage:c4().optional().describe("A push button\'s: `true` makes it an image field, writing Acrobat\'s import-icon script as the activation action of each widget whose press does nothing, and is refused while a widget\'s press runs another action. `false` takes the script off each widget whose press is exactly it.")}).strict();var hB=[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,8226,8364,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,381,8216,8217,8220,8221,8211,8212,732,8482,353,8250,339,382,376,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],hL={courier:{ascent:803,descent:-248,programHash:"955500bf0048e07e3046477b3874ef9e7653010a2bc780bbf27f837d7ca34d19",codePoints:hB,advances:[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]},"courier-bold":{ascent:811,descent:-248,programHash:"386d8684b075c7ff4911235ae9691d5e9e924fff13fa1f17841c6d4d4f3762e6",codePoints:hB,advances:[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]},"courier-bold-oblique":{ascent:811,descent:-248,programHash:"d1dae62980ea92bfa86f9e3961a3064e164e41a5064211f2a3a8833643a322a5",codePoints:hB,advances:[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]},"courier-oblique":{ascent:803,descent:-248,programHash:"d790f273acf84a1afada2cf96a6eb646728a1a6e7afe961a2cc846bb3a501b0b",codePoints:hB,advances:[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]},helvetica:{ascent:945,descent:-224,programHash:"93fe419ed14bac240018cf4506dbb64643eeeee379c0b51d3c52d239f4adbc58",codePoints:hB,advances:[278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,350,667,222,556,333,1e3,556,556,333,1e3,667,333,1e3,611,222,222,333,333,556,1e3,333,1e3,500,366,944,500,667,333,556,556,556,556,260,556,333,737,370,612,584,737,333,400,584,333,333,333,556,537,278,333,333,365,612,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500]},"helvetica-bold":{ascent:962,descent:-227,programHash:"f11bf41cf5d115966ee4d954d9d3eab4a7d1b63d371e5d655fc82d15350bc929",codePoints:hB,advances:[278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,1072,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,350,722,278,556,500,1e3,556,556,333,1e3,667,333,1e3,611,278,278,500,500,556,1e3,333,1e3,556,333,944,500,667,333,556,556,556,556,280,556,333,737,370,556,584,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556]},"helvetica-bold-oblique":{ascent:962,descent:-227,programHash:"9cd559e9d134dd6bb8bb75186d4302079e78ebee53a7c9b38dea1fba52a534d8",codePoints:hB,advances:[278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,528,556,556,556,556,333,333,584,584,584,611,1072,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,350,722,278,556,500,1e3,556,556,333,1e3,667,333,1e3,611,278,278,500,500,556,1e3,333,1e3,556,333,944,500,667,333,556,556,556,556,280,556,333,737,370,556,584,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,519,611,611,611,611,556,611,556]},"helvetica-oblique":{ascent:951,descent:-224,programHash:"872e4efa9cc73daff4a3fffa952663f32144db19ec91a8407afc359486eae30b",codePoints:hB,advances:[278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1116,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,350,667,222,556,333,1e3,556,556,333,1e3,667,350,1e3,611,222,222,333,333,556,1e3,333,1e3,500,333,944,500,667,333,556,556,556,556,260,556,333,737,370,556,584,737,333,400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500]},"times-roman":{ascent:878,descent:-249,programHash:"7be927a55309ca34d67972ccf041ff3d156d774017022b18131fa365e6dd922e",codePoints:hB,advances:[250,333,408,500,500,833,778,180,333,333,500,564,250,333,250,278,500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444,921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722,556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500,333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500,500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,350,722,333,500,444,1e3,500,500,333,1e3,556,333,889,611,333,333,444,444,500,1e3,333,980,389,333,722,444,722,333,500,500,500,500,200,500,333,760,276,500,564,760,333,400,564,300,300,333,500,453,250,333,300,310,500,750,750,750,444,722,722,722,722,722,722,889,667,611,611,611,611,333,333,333,333,722,722,722,722,722,722,722,564,722,722,722,722,722,722,556,500,444,444,444,444,444,444,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,564,500,500,500,500,500,500,500,500]},"times-bold":{ascent:889,descent:-249,programHash:"f23f2efbfa079f9083d967acf695b10db7c78e39862dbeb4788a4fd0533ff29c",codePoints:hB,advances:[250,333,555,500,500,1e3,833,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778,611,778,722,556,667,722,722,1e3,722,722,667,333,278,333,581,500,333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500,556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,350,722,333,500,500,1e3,500,500,333,1e3,556,333,1e3,667,333,333,500,500,500,1e3,333,1e3,389,333,722,444,722,333,500,500,500,500,220,500,333,747,300,500,570,747,333,400,570,300,300,333,556,540,250,333,300,330,500,750,750,750,500,722,722,722,722,722,722,1e3,722,667,667,667,667,389,389,389,389,722,722,778,778,778,778,778,570,778,722,722,722,722,722,611,556,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,500,556,500]},"times-bold-italic":{ascent:869,descent:-249,programHash:"cf51fab68d7d965f5755218a7f99b0376bc440e1bb4e90498aef0964aac94490",codePoints:hB,advances:[250,389,555,500,500,833,778,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722,611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500,333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500,500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,350,667,333,500,500,1e3,500,500,333,1e3,556,333,944,611,333,333,500,500,500,1e3,333,1e3,389,333,722,389,611,389,500,500,500,500,220,500,333,747,266,500,606,747,333,400,570,300,300,333,576,500,250,333,300,300,500,750,750,750,500,667,667,667,667,667,667,944,667,667,667,667,667,389,389,389,389,722,722,722,722,722,722,722,570,722,722,722,722,722,611,611,500,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,444,500,444]},"times-italic":{ascent:868,descent:-249,programHash:"f405670768d71ff8d8a4e493cbcb9c6deff9565419bf63a38abb544789aa87b4",codePoints:hB,advances:[250,333,420,500,500,833,778,214,333,333,500,675,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500,920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722,611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500,333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500,500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,350,500,333,500,556,889,500,500,333,1e3,500,333,944,556,333,333,556,556,500,889,333,980,389,333,667,389,556,389,500,500,500,500,275,500,333,760,276,500,675,760,333,400,675,300,300,333,500,523,250,333,300,310,500,750,750,750,500,611,611,611,611,611,611,889,667,611,611,611,611,333,333,333,333,722,667,722,722,722,722,722,675,722,722,722,722,722,556,611,500,500,500,500,500,500,500,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,675,500,500,500,500,500,444,500,444]},symbol:{ascent:1010,descent:-293,programHash:"1f027bd5b336f563724a2cba62295329edbb3df7ca9efbe8f296d7a1e86849a1",codePoints:[32,33,8704,35,8707,37,38,8715,40,41,8727,43,44,8722,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,8773,913,914,935,916,917,934,915,919,921,977,922,923,924,925,927,928,920,929,931,932,933,962,937,926,936,918,91,8756,93,8869,95,63717,945,946,967,948,949,966,947,951,953,981,954,955,956,957,959,960,952,961,963,964,965,982,969,958,968,950,123,124,125,8764,8364,978,8242,8804,8260,8734,402,9827,9830,9829,9824,8596,8592,8593,8594,8595,176,177,8243,8805,215,8733,8706,8226,247,8800,8801,8776,8230,63718,63719,8629,8501,8465,8476,8472,8855,8853,8709,8745,8746,8835,8839,8836,8834,8838,8712,8713,8736,8711,63194,63193,63195,8719,8730,8901,172,8743,8744,8660,8656,8657,8658,8659,9674,9001,63720,63721,63722,8721,63723,63724,63725,63726,63727,63728,63729,63730,63731,63732,9002,8747,8992,63733,8993,63734,63735,63736,63737,63738,63739,63740,63741,63742],advances:[250,333,713,500,549,833,778,439,333,333,500,549,250,549,250,278,500,500,500,500,500,500,500,500,500,500,278,278,549,549,549,444,549,722,667,722,612,611,763,603,722,333,631,722,686,889,722,722,768,741,556,592,611,690,439,768,645,795,611,333,863,333,658,500,500,631,549,549,494,439,521,411,603,329,603,549,549,576,521,549,549,521,549,603,439,576,713,686,493,686,494,480,200,480,549,750,620,247,549,167,713,500,753,753,753,753,1042,987,603,987,603,400,549,411,549,549,713,494,460,549,549,549,549,1e3,603,1e3,658,823,686,795,987,768,768,823,768,768,713,713,713,713,713,713,713,768,713,790,790,890,823,549,250,713,603,603,1042,987,603,987,603,494,329,790,790,786,713,384,384,384,384,384,384,494,494,494,494,329,274,686,686,686,384,384,384,384,384,384,494,494,494]},"zapf-dingbats":{ascent:826,descent:-163,programHash:"0439c04b1c3ba23c2fd8c2f4a5f2c65b2b0f817588c45afd5c06a41eab70bfbd",codePoints:[32,9985,9986,9987,9988,9742,9990,9991,9992,9993,9755,9758,9996,9997,9998,9999,1e4,10001,10002,10003,10004,10005,10006,10007,10008,10009,10010,10011,10012,10013,10014,10015,10016,10017,10018,10019,10020,10021,10022,10023,9733,10025,10026,10027,10028,10029,10030,10031,10032,10033,10034,10035,10036,10037,10038,10039,10040,10041,10042,10043,10044,10045,10046,10047,10048,10049,10050,10051,10052,10053,10054,10055,10056,10057,10058,10059,9679,10061,9632,10063,10064,10065,10066,9650,9660,9670,10070,9687,10072,10073,10074,10075,10076,10077,10078,10081,10082,10083,10084,10085,10086,10087,9827,9830,9829,9824,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,10102,10103,10104,10105,10106,10107,10108,10109,10110,10111,10112,10113,10114,10115,10116,10117,10118,10119,10120,10121,10122,10123,10124,10125,10126,10127,10128,10129,10130,10131,10132,8594,8596,8597,10136,10137,10138,10139,10140,10141,10142,10143,10144,10145,10146,10147,10148,10149,10150,10151,10152,10153,10154,10155,10156,10157,10158,10159,10161,10162,10163,10164,10165,10166,10167,10168,10169,10170,10171,10172,10173,10174],advances:[278,974,961,974,980,719,789,790,791,690,960,939,549,855,911,933,911,945,974,755,846,762,761,571,677,763,760,759,754,494,552,537,577,692,786,788,788,790,793,794,816,823,789,841,823,833,816,831,923,744,723,749,790,792,695,776,768,792,759,707,708,682,701,826,815,789,789,707,687,696,689,786,787,713,791,785,791,873,761,762,762,759,759,892,892,788,784,438,138,277,415,392,392,668,668,732,544,544,910,667,760,760,776,595,694,626,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,894,838,1016,458,748,924,748,918,927,928,928,834,873,828,924,924,917,930,931,463,883,836,836,867,867,696,696,874,874,760,946,771,865,771,888,967,888,831,873,927,970,918]}},h$=new Uint8Array(128);for(let e=0;e<64;e+=1)h$["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(e)]=e;var hz={standardDisplayHash:e=>hL[e].programHash,lastResortDisplayHash:"e9d14973462069b4906f8d22a9aaec2d6ec9eb02ac31d697631783316d8b8768"},hU=new WeakSet;function hV(e){hU.has(e)||(e.fn.EPDF_InitThread(),hU.add(e))}function hW(e){if(e.aborted){let t=e.reason;if(t instanceof Error)throw t;throw new ns(t)}}function hq(e){let t=/^(?:D:)?(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(?:([Zz])(?:00\'?00\'?)?|([+-])(\\d{2})(?:\'?(\\d{2})\'?)?)?$/.exec(e.trim());if(!t)return null;let[,n,r="01",i="01",o="00",a="00",s="00"]=t,[,,,,,,,l,u,d,c="00"]=t;if(!hK({year:n,month:r,day:i,hour:o,minute:a,second:s}))return null;let f="";if(l)f="Z";else if(u){if(Number(d)>23||Number(c)>59)return null;f=0===Number(d)&&0===Number(c)?"Z":`${u}${d}:${c}`}return`${n}-${r}-${i}T${o}:${a}:${s}${f}`}function hH(e=new Date){if(e instanceof Date){if(Number.isNaN(e.getTime()))throw RangeError("Cannot format an invalid Date");return hH(`${e.toISOString().slice(0,19)}Z`)}let t=/^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d+)?)?(?:([Zz])|([+-])(\\d{2}):(\\d{2}))?$/.exec(e),n=t&&{year:t[1],month:t[2],day:t[3],hour:t[4],minute:t[5],second:t[6]??"00"};if(!t||!n||!hK(n))throw new N(G.InvalidArg,`not an ISO 8601 date and time: \'${e}\'`);let[,,,,,,,r,i,o,a]=t,s=r?"+00\'00\'":i?`${i}${o}\'${a}\'`:"",{year:l,month:u,day:d,hour:c,minute:f,second:m}=n;return`D:${l}${u}${d}${c}${f}${m}${s}`}function hK({year:e,month:t,day:n,hour:r,minute:i,second:o}){let a=Number(e),s=Number(t),l=Number(n);if(s<1||s>12||l<1)return!1;let u=new Date(Date.UTC(2e3,s,0)).getUTCDate();return!(l>(2!==s||a%4==0&&(a%100!=0||a%400==0)?u:28))&&23>=Number(r)&&59>=Number(i)&&59>=Number(o)}function hZ(e){return(hZ="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)}function hJ(e,t,n){var r;return(r=function(e,t){if("object"!=hZ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=hZ(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==hZ(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hQ=class{constructor(){hJ(this,"byContent",null),hJ(this,"bySource",new Map),hJ(this,"hashes",new WeakMap)}forget(){this.byContent=null,this.bySource.clear()}};function hX(e,t,n){return 4!==e.FPDF_GetLastError()?n:t?new N(G.DocPasswordIncorrect,"incorrect document password"):new N(G.DocPasswordRequired,"document requires a password")}function hY(e,t,n){let r=e.alloc(t);try{return n(r)}finally{e.free(r)}}function h0(e,t,n){let r=t.map(t=>e.alloc(t));try{return n(r)}finally{for(let t=r.length-1;t>=0;t--)e.free(r[t])}}function h1(e,t,n){return hY(e,4*Math.max(1,t.length),r=>(t.forEach((t,n)=>e.poke(r,"i32",t,4*n)),n(r,t.length)))}function h3(e,t,n=""){let r=t(0n,0);return r<=0?null:2===r?n:hY(e,r,n=>0>=t(n,r)?null:e.readU16String(n))}function h2(e,t){let n=t(0n,0);return n<=0?null:hY(e,n,r=>0>=t(r,n)?null:e.readU8String(r))}function h6(e,t,n){let r=e.writeU16String(t);try{return n(r)}finally{e.free(r)}}function h5(e,t,n){let r=e.writeU16String(t);try{return n(r)}finally{e.free(r)}}function h4(e,t,n){let r=new TextEncoder().encode(t),i=new Uint8Array(r.byteLength+1);i.set(r);let o=e.alloc(i.byteLength);try{return e.writeBytes(o,i),n(o)}finally{e.free(o)}}var h8=class{constructor(){hJ(this,"actions",[]),hJ(this,"closed",!1)}push(e){this.closed?e():this.actions.push(e)}close(){if(this.closed)return;this.closed=!0;let e=null;for(let t=this.actions.length-1;t>=0;t--)try{this.actions[t]?.()}catch(t){e??(e=t)}if(this.actions.length=0,e)throw e}};function h7(e,t,n=null){let{mem:r,fn:i}=e,o=new h8,a=r.alloc(t.byteLength);o.push(()=>r.free(a));try{r.writeBytes(a,t);let s=i.FPDF_LoadMemDocument64(a,t.byteLength,n??"");if(!s)throw hX(i,n,new N(G.DocOpenFailed,"failed to open document"));return Fe(e,s),o.push(()=>i.FPDF_CloseDocument(s)),{kind:"fat-memory",docPtr:s,source:{base:null,layer:null,password:n},close:()=>o.close()}}catch(e){throw o.close(),e}}function h9(e,t,n={kind:"fresh"},r=null){let{mem:i,fn:o}=e,a=new h8;a.push(()=>t.release());let s=null,l=i.alloc(4);try{let u;i.poke(l,"i32",-1),"fresh"===n.kind?u=o.EPDFLayer_OpenLayer(t.basePtr,0n,r??"",l):"artifact-file"===n.kind&&"native"===e.kind?u=h4(i,n.path,e=>o.EPDFLayer_OpenLayerArtifactFromPath(t.basePtr,e,r??"",l)):(s="artifact-file"===n.kind?e.fileAccess.fromNodeFile(n.path):e.fileAccess.fromMemory(n.bytes),a.push(()=>s?.close()),u="artifact"===n.kind||"artifact-file"===n.kind?o.EPDFLayer_OpenLayerArtifact(t.basePtr,s.ptr,r??"",l):o.EPDFLayer_OpenLayer(t.basePtr,s.ptr,r??"",l));let d=Number(i.peek(l,"i32"));if(!u||0!==d)throw function(e){switch(e){case 1:return new N(G.DocPasswordRequired,"layer requires a password");case 2:return new N(G.MalformedPdf,"layer delta is malformed");case 3:return new N(G.MalformedPdf,"layer artifact does not match the supplied base document");default:return new N(G.DocOpenFailed,"failed to open layer document")}}(d);Fe(e,u),a.push(()=>o.FPDF_CloseDocument(u));let c="file"===t.kind&&void 0!==t.path?{kind:"file",key:t.key,path:t.path}:{kind:"memory",key:t.key};return{kind:"layer",docPtr:u,source:{base:c,layer:n,password:r},close:()=>a.close()}}catch(e){throw a.close(),e}finally{i.free(l)}}function Fe(e,t){let{fn:n}=e;n.EPDF_IsEncrypted&&n.EPDF_SetRuntimeOwnerPermissions&&n.EPDF_IsEncrypted(t)&&n.EPDF_SetRuntimeOwnerPermissions(t,!0)}function Ft(e,t,n,r=0){let i=BigInt(n);e.poke(t,"i32",0|Number(4294967295n&i),r),e.poke(t,"i32",0|Number(i>>32n&4294967295n),r+4)}function Fn(e,t,n=0){let r=Number(e.peek(t,"i32",n))>>>0;return(Number(e.peek(t,"i32",n+4))>>>0)*0x100000000+r}var Fr={budgetBytes:0x18000000,idleMs:3e4},Fi={place:"elsewhere",pixels:0},Fo=class{constructor(e,t=Fr,n=()=>!1){this.runtime=e,this.policy=t,this.busy=n,hJ(this,"pages",new Map),hJ(this,"closedSizes",new Map),hJ(this,"workingSets",new Map),hJ(this,"totalBytes",0),hJ(this,"clock",0),hJ(this,"timer",null)}acquire(e,t,n){let r=this.take(e,n);if(!r){this.makeRoom(this.expectedBytes(e,n));let i=this.runtime.fn.EPDFDoc_LoadPageByObjectNumberNormalized(t,n);if(!i)throw Fa(n);r=this.add(e,n,i,!0)}if(r.refs++,!r.loaded){if(1!==this.runtime.fn.EPDFPage_ContinueLoad(r.ptr,0x3fffffff))throw this.drop(r),Fs(n);r.loaded=!0}return this.measure(r),this.makeRoom(0),r.ptr}async acquireInSlices(e,t,n,r,i){hW(r);let{fn:o}=this.runtime,a=this.take(e,n);if(!a){this.makeRoom(this.expectedBytes(e,n));let r=o.EPDFDoc_StartLoadPageByObjectNumber(t,n,!0);if(!r)throw Fa(n);a=this.add(e,n,r,!1)}for(a.refs++;!a.loaded;){let t=o.EPDFPage_ContinueLoad(a.ptr,i.budgetMs);if(t<0)throw this.drop(a),Fs(n);if(a.loaded=1===t,this.measure(a),this.makeRoom(0),a.loaded)break;try{await i.between(),hW(r)}catch(t){throw this.release(e,n),t}}return a.ptr}release(e,t){let n=this.pages.get(e)?.get(t);if(n&&!(n.refs<=0)&&(n.refs--,!(n.refs>0))){if(n.lastUsed=++this.clock,n.loaded&&!this.runtime.fn.EPDFPage_ResetRenderCache(n.ptr))return void this.close(n);this.armTimer(),this.makeRoom(0)}}setWorkingSet(e,t,n){let r=new Map;for(let{pageObjectNumber:e,role:t,pixels:i}of n){let n={place:t,pixels:i},o=r.get(e);(!o||aI(n,o))&&r.set(e,n)}let i=this.workingSets.get(e);r.size>0?(i||(i=new Map,this.workingSets.set(e,i)),i.set(t,r)):(i?.delete(t),i?.size===0&&this.workingSets.delete(e)),this.totalBytes>0&&this.armTimer()}isHeld(e,t){return(this.pages.get(e)?.get(t)?.refs??0)>0}isKept(e,t){return this.pages.get(e)?.has(t)??!1}closeOwner(e){for(let t of[...this.pages.get(e)?.values()??[]])this.close(t);this.pages.delete(e),this.closedSizes.delete(e),this.workingSets.delete(e)}closeIdleOf(e){for(let t of[...this.pages.get(e)?.values()??[]])0===t.refs&&this.close(t)}closeIdle(){for(let e of[...this.pages.values()])for(let t of[...e.values()])0===t.refs&&this.close(t)}closeUnshown(){for(let e of[...this.pages.values()])for(let t of[...e.values()])0===t.refs&&"visible"!==this.placeOf(t).place&&this.close(t)}get size(){let e=0;for(let t of this.pages.values())e+=t.size;return e}get bytes(){return this.totalBytes}take(e,t){let n=this.pages.get(e)?.get(t);return n?0!==n.refs||this.runtime.fn.EPDFPage_IsContentCurrent(n.ptr)?(n.lastUsed=++this.clock,n):(this.close(n),null):null}add(e,t,n,r){let i={owner:e,pageObjectNumber:t,ptr:n,refs:0,loaded:r,bytes:65536,lastUsed:++this.clock},o=this.pages.get(e);return o||(o=new Map,this.pages.set(e,o)),o.set(t,i),this.totalBytes+=i.bytes,i}measure(e){let{fn:t,mem:n}=this.runtime,r=65536+hY(n,40,r=>t.EPDFPage_GetParsedSize(e.ptr,r)?Fn(n,r,24):0);this.totalBytes+=r-e.bytes,e.bytes=r}expectedBytes(e,t){return this.closedSizes.get(e)?.get(t)??65536}makeRoom(e){let t=this.policy.budgetBytes>0?this.lastToCloseOverBudget():null;for(;this.totalBytes-(t?.bytes??0)+e>this.policy.budgetBytes;){let e=this.firstToClose(t);if(e)this.close(e);else{if(!t||0!==t.refs)return;this.close(t),t=null}}}firstToClose(e){let t=null,n=Fi;for(let r of this.pages.values())for(let i of r.values()){if(i.refs>0||i===e)continue;let r=this.placeOf(i);(!t||aI(n,r)||!aI(r,n)&&i.lastUsede.lastUsed)&&(e=r,t=n)}return e}placeOf(e){let t=Fi;for(let n of this.workingSets.get(e.owner)?.values()??[]){let r=n.get(e.pageObjectNumber);r&&aI(r,t)&&(t=r)}return t}close(e){if(e.loaded){let t=this.closedSizes.get(e.owner);t||(t=new Map,this.closedSizes.set(e.owner,t)),t.set(e.pageObjectNumber,e.bytes)}this.drop(e)}drop(e){this.runtime.fn.FPDF_ClosePage(e.ptr);let t=this.pages.get(e.owner);t?.delete(e.pageObjectNumber),t?.size===0&&this.pages.delete(e.owner),this.totalBytes-=e.bytes,this.totalBytes<=0&&this.disarmTimer()}armTimer(){this.policy.idleMs<=0||(this.disarmTimer(),this.timer=setTimeout(()=>{this.timer=null,this.busy()?this.armTimer():this.closeUnshown()},this.policy.idleMs),this.timer.unref?.())}disarmTimer(){this.timer&&clearTimeout(this.timer),this.timer=null}};function Fa(e){return new N(G.NotFound,`no page with object number ${e}`)}function Fs(e){return new N(G.RuntimeUnavailable,`failed to load page object ${e}`)}var Fl=class{constructor(e,t,n=null){this.docPtr=t,hJ(this,"residency",void 0),this.residency=n??new Fo(e,{budgetBytes:0,idleMs:0})}acquire(e){return this.residency.acquire(this,this.docPtr,e)}acquireInSlices(e,t,n){return this.residency.acquireInSlices(this,this.docPtr,e,t,n)}isHeld(e){return this.residency.isHeld(this,e)}isKept(e){return this.residency.isKept(this,e)}release(e){this.residency.release(this,e)}setWorkingSet(e,t){this.residency.setWorkingSet(this,e,t)}closeIdle(){this.residency.closeIdleOf(this)}closeAll(){this.residency.closeOwner(this)}},Fu=class{constructor(e,t){this.runtime=e,hJ(this,"docPtr",null),hJ(this,"closeDocument",null),hJ(this,"_kind",null),hJ(this,"_source",null),hJ(this,"_sessionId",void 0),hJ(this,"recordsByObjectNumber",new Map),hJ(this,"recordsByIndex",new Map),hJ(this,"fullyEnumerated",!1),hJ(this,"cacheSeqCounter",0),hJ(this,"editsSeqCounter",0),hJ(this,"transaction",null),hJ(this,"unusableReason",null),hJ(this,"pages",null),hJ(this,"residency",null),hJ(this,"signedDocumentPolicy","protect"),hJ(this,"password",null),hJ(this,"persistLayerArtifact",!0),hJ(this,"loadedSeq",0),hJ(this,"plainSha256",null),hJ(this,"pendingSigning",null),hJ(this,"lastCompletion",null),hJ(this,"drawings",null),hJ(this,"parkedLoad",null),hJ(this,"objectNumberAuthority","session"),hJ(this,"heldObjectNumbers",new Set),hJ(this,"objectNumbersInUse",[]),hJ(this,"retained",[]),this._sessionId=t??`sess_${(++Fc).toString(36)}_${Date.now().toString(36)}`}get sessionId(){return this._sessionId}get kind(){return this._kind}get source(){if(!this._source)throw new N(G.DocNotOpen,"document is not open");return this._source}isOpen(){return null!==this.docPtr}open(e,t=null){this.openFromHandle(h7(this.runtime,e,t))}openFromHandle(e){if(this.docPtr)throw e.close(),new N(G.InvalidArg,"document already open");this.docPtr=e.docPtr,this.closeDocument=()=>e.close(),this._kind=e.kind,this._source=e.source,this.pages=new Fl(this.runtime,e.docPtr,this.residency),this.parkedLoad=null,this.drawings=null,this.loadedSeq=this.editsSeqCounter}hasUnsavedEdits(){return this.editsSeqCounter!==this.loadedSeq}cachedPlainSha256(){return this.plainSha256&&this.plainSha256.loadedSeq===this.loadedSeq?this.plainSha256.sha256:null}rememberPlainSha256(e){this.plainSha256={loadedSeq:this.loadedSeq,sha256:e}}install(e){if(!this.docPtr)throw e.close(),new N(G.DocNotOpen,"no document to replace");let t=null;try{this.pages?.closeAll()}catch(e){t=e}try{this.closeDocument?.()}catch(e){t??(t=e)}if(this.docPtr=e.docPtr,this.closeDocument=()=>e.close(),this._kind=e.kind,this._source=e.source,this.pages=new Fl(this.runtime,e.docPtr,this.residency),this.recordsByIndex.clear(),this.recordsByObjectNumber.clear(),this.fullyEnumerated=!1,this.cacheSeqCounter++,this.editsSeqCounter++,this.loadedSeq=this.editsSeqCounter,this.pendingSigning=null,this.drawings=null,this.heldObjectNumbers.clear(),this.objectNumbersInUse=[],t)throw t}versionRef(e){return{baseSha256:e,editsVersion:this.editsSeqCounter}}parkLocked(e){if(this.docPtr)throw new N(G.InvalidArg,"document already open");this.parkedLoad=e}isLocked(){return null===this.docPtr&&null!==this.parkedLoad}unlockWith(e){if(!this.parkedLoad)throw new N(G.DocNotOpen,"document session is not locked");this.parkedLoad(e),this.parkedLoad=null}pageCount(){return this.runtime.fn.FPDF_GetPageCount(this.requireDocPtr())}ensureFullPageRegistry(){if(this.fullyEnumerated)return;let{fn:e}=this.runtime,t=this.requireDocPtr(),n=e.FPDF_GetPageCount(t);for(let r=0;rthis.resolvePageRef(e).pageObjectNumber)}allRecords(){return this.ensureFullPageRegistry(),Array.from(this.recordsByIndex.entries()).sort(([e],[t])=>e-t).map(([,e])=>e)}refreshPageRegistry(){this.recordsByIndex.clear(),this.recordsByObjectNumber.clear(),this.fullyEnumerated=!1,this.ensureFullPageRegistry()}cacheSeq(){return this.cacheSeqCounter}invalidateDerived(){this.cacheSeqCounter++}editsSeq(){return this.editsSeqCounter}noteEdit(){this.editsSeqCounter++}clearMissingCharacters(){this.docPtr&&this.runtime.fn.EPDFDoc_ClearMissingCharacters(this.docPtr)}missingCharacters(){if(!this.docPtr)return[];let{fn:e,mem:t}=this.runtime,n=this.docPtr,r=[],i=e.EPDFDoc_CountMissingCharacters(n);for(let o=0;oe.EPDFDoc_GetMissingCharacter(n,o,t,r));i&&r.push(i)}return r}inTransaction(){return null!==this.transaction}beginTransaction(e){let t=this.requireDocPtr();if(this.transaction)throw new N(G.Unknown,"a transaction is already open");if(!this.runtime.fn.EPDFLayer_BeginTransaction(t))throw new N(G.Unknown,"EPDFLayer_BeginTransaction refused");this.transaction={docPtr:t,opId:e,undoable:!1}}writeStamp(){let{opId:e,undoable:t}=this.requireTransaction();return{opId:e,undoable:t}}markUndoable(){this.requireTransaction().undoable=!0}commitTransaction(){let{docPtr:e}=this.requireTransaction();if(!this.runtime.fn.EPDFLayer_IsInTransaction(e))throw new N(G.Unknown,"the layer transaction is no longer open");let t=this.runtime.fn.EPDFLayer_GetLastObjectNumber(e);if(t>8388607)throw new N(G.LayerFull,"the document would pass object number 8388607",{details:{lastObjectNumber:t}});this.transaction=null;let n=!1;try{n=this.runtime.fn.EPDFLayer_CommitTransaction(e)}finally{n||(this.unusableReason=Fd)}if(!n)throw new N(G.DocNotOpen,Fd);for(let e of this.objectNumbersInUse)this.heldObjectNumbers.delete(e);this.objectNumbersInUse=[]}abortTransaction(){let{docPtr:e}=this.requireTransaction();this.transaction=null,this.objectNumbersInUse=[];let t=!1;try{t=this.runtime.fn.EPDFLayer_AbortTransaction(e)}catch{}this.drawings?.forget(),this.recordsByIndex.clear(),this.recordsByObjectNumber.clear(),this.fullyEnumerated=!1,this.invalidateDerived(),t||(this.unusableReason="a layer transaction failed to abort")}lastObjectNumber(){return this.runtime.fn.EPDFLayer_GetLastObjectNumber(this.requireDocPtr())}raiseLastObjectNumber(e){if(!this.runtime.fn.EPDFLayer_RaiseLastObjectNumber(this.requireDocPtr(),e))throw new N(G.LayerFull,`the document would pass object number ${e}`,{details:{lastObjectNumber:this.lastObjectNumber()}})}reserveObjectNumbers(e){if("session"!==this.objectNumberAuthority)throw new N(G.InvalidArg,"object numbers are handed out by the caller, not this session");if(!Number.isInteger(e)||e<1)throw new N(G.InvalidArg,`cannot reserve ${e} object numbers`,{details:{field:"count"}});let{fn:t}=this.runtime,n=this.requireDocPtr(),r=t.EPDFLayer_GetLastObjectNumber(n);if(r+e>8e6)throw new N(G.LayerFull,"no more object numbers to hand out",{details:{lastObjectNumber:r}});if(!t.EPDFLayer_RaiseLastObjectNumber(n,r+e))throw new N(G.Unknown,"EPDFLayer_RaiseLastObjectNumber refused");let i={first:r+1,count:e};for(let t=0;t=0;t--)try{this.retained[t]()}catch(t){e??(e=t)}if(this.retained.length=0,e)throw e}},Fd="a layer transaction failed to commit",Fc=0;function Ff(e,t){return new N(G.ObjectNumberUnavailable,"not-held"===t?`object number ${e} isn\'t one this session holds`:`an object already has object number ${e}`,{details:{objectNumber:e,reason:t}})}function Fm(e,t){return hX(e.fn,t,new N(G.DocOpenFailed,"failed to open base document"))}var Fp=class{constructor(e){this.runtime=e,hJ(this,"entries",new Map)}acquireMemoryBase(e){let t=this.retain(e.key);if(t)return t;let{mem:n,fn:r}=this.runtime,i=new h8,o=n.alloc(e.bytes.byteLength);i.push(()=>n.free(o));try{n.writeBytes(o,e.bytes);let t=r.EPDF_LoadMemBaseDocument64(o,e.bytes.byteLength,e.password??"");if(!t)throw Fm(this.runtime,e.password);return Fe(this.runtime,t),i.push(()=>r.EPDF_ReleaseBaseDocument(t)),this.supplyKnownSha(t,e.knownSha256),this.insert({key:e.key,kind:"memory",basePtr:t,refs:1,close:()=>i.close()})}catch(e){throw i.close(),e}}acquireFileBase(e){let t=this.retain(e.key);if(t)return t;let{fn:n}=this.runtime,r=new h8,i=null;try{i=this.runtime.fileAccess.fromNodeFile(e.path),r.push(()=>i?.close());let t=n.EPDF_LoadBaseDocument(i.ptr,e.password??"");if(!t)throw Fm(this.runtime,e.password);return Fe(this.runtime,t),r.push(()=>n.EPDF_ReleaseBaseDocument(t)),this.supplyKnownSha(t,e.knownSha256),this.insert({key:e.key,kind:"file",path:e.path,basePtr:t,refs:1,close:()=>r.close()})}catch(e){throw r.close(),e}}retainByKey(e){return this.retain(e)}supplyKnownSha(e,t){if(!t||!/^[0-9a-fA-F]{64}$/.test(t))return;let{mem:n,fn:r}=this.runtime,i=new Uint8Array(32);for(let e=0;e<32;e++)i[e]=parseInt(t.slice(2*e,2*e+2),16);let o=n.alloc(32);try{n.writeBytes(o,i),r.EPDF_SetBaseDocumentSha256(e,o)}finally{n.free(o)}}releaseAll(){let e=Array.from(this.entries.values());this.entries.clear();let t=null;for(let n of e)try{n.close()}catch(e){t??(t=e)}if(t)throw t}getRefCountForTesting(e){return this.entries.get(e)?.refs??0}retain(e){let t=this.entries.get(e);return t?(t.refs++,this.handleFor(t)):null}insert(e){return this.entries.set(e.key,e),this.handleFor(e)}handleFor(e){let t=!1;return{key:e.key,kind:e.kind,...void 0!==e.path?{path:e.path}:{},basePtr:e.basePtr,release:()=>{if(t)return;t=!0;let n=this.entries.get(e.key);!n||(n.refs--,n.refs>0||(this.entries.delete(e.key),n.close()))}}}};function Fh(e,t,n,r){return e.EPDF_HasMetaText(n,r)?h3(t,(t,i)=>e.FPDF_GetMetaText(n,r,t,i),""):null}var FF=class{constructor(e,t){this.runtime=e,this.session=t}read(e){let t;hW(e);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=Fh(n,r,i,"Title");hW(e);let a=Fh(n,r,i,"Author");hW(e);let s=Fh(n,r,i,"Subject");hW(e);let l=Fh(n,r,i,"Keywords");hW(e);let u=Fh(n,r,i,"Producer");hW(e);let d=Fh(n,r,i,"Creator");hW(e);let c=Fh(n,r,i,"CreationDate");hW(e);let f=Fh(n,r,i,"ModDate");hW(e);let m=1===(t=Number(n.EPDF_GetMetaTrapped(i)))?"true":2===t?"false":"unknown";return{title:o,author:a,subject:s,keywords:l,producer:u,creator:d,createdAt:c?hq(c):null,modifiedAt:f?hq(f):null,trapped:m}}readCustom(e){hW(e);let{fn:t,mem:n}=this.runtime;return function(e,t,n){let r=0|Number(e.EPDF_GetMetaKeyCount(n,!0)),i={};for(let o=0;oe.EPDF_GetMetaKeyName(n,r,i,t,o))}(e,t,n,o,!0);if(!r)continue;let a=Fh(e,t,n,r);null!=a&&(i[r]=a)}return i}(t,n,this.session.requireDocPtr())}};function Fg(e,t,n,r,i){return null===i?e.EPDF_SetMetaText(n,r,0n):h6(t,i,t=>e.EPDF_SetMetaText(n,r,t))}var F_=new Set(["Title","Author","Subject","Keywords","Producer","Creator","CreationDate","ModDate","Trapped"]),FP=[["title","Title"],["author","Author"],["subject","Subject"],["keywords","Keywords"],["producer","Producer"],["creator","Creator"]],FD="http://www.w3.org/2000/xmlns/";function Fb(e){return(function(e){let t="";for(let n of e){let e=n.codePointAt(0);e<32&&9!==e&&10!==e&&13!==e||e>=55296&&e<=57343||65534===e||65535===e||(t+=n)}return t})(e).replace(/&/g,"&").replace(//g,">").replace(/\\r/g," ")}function Fy(e){return Fb(e).replace(/"/g,""").replace(/\'/g,"'").replace(/\\t/g," ").replace(/\\n/g," ")}function Fw(e,t){return e?`${e}:${t}`:t}var FE=class extends Error{},FA=/&(?:#x([0-9a-fA-F]+)|#([0-9]+)|(lt|gt|amp|quot|apos));/g,Fv={lt:"<",gt:">",amp:"&",quot:\'"\',apos:"\'"},FS=/[ \\t\\r\\n]/,Fk=/[ \\t\\r\\n/>=<"\']/;function Fx(e){if(!e.includes("&"))return e;if(e.replace(FA,"").includes("&"))throw new FE;return e.replace(FA,(e,t,n,r)=>{if(r)return Fv[r];let i=t?parseInt(t,16):Number(n);if(i>1114111)throw new FE;return String.fromCodePoint(i)})}function FG(e){let t=e.indexOf(":");return t<0?{prefix:"",local:e}:{prefix:e.slice(0,t),local:e.slice(t+1)}}var FO=class{constructor(e){this.text=e,hJ(this,"at",0),hJ(this,"open",[]),hJ(this,"root",null)}read(){let{text:e}=this;for(;this.atthis.at&&this.addText(e.slice(this.at,n)),t<0)break;e.startsWith("\\x3c!--",t)?this.at=this.after("--\\x3e",t+4):e.startsWith("",t+2):e.startsWith("0||!this.root)throw new FE;return this.root}after(e,t){let n=this.text.indexOf(e,t);if(n<0)throw new FE;return n+e.length}skipSpace(e){let t=e;for(;t",e+9);if(t<0)throw new FE;this.addText(this.text.slice(e+9,t),!0),this.at=t+3}skipDeclaration(e){let t=0;for(let n=e+2;n"===e&&t<=0){this.at=n+1;return}}throw new FE}readStartTag(e){let t,{text:n}=this,r=this.readName(e+1),i=[],o=e+1+r.length,a=!1;for(;;){let e=this.skipSpace(o);if(n.startsWith("/>",e)){t=e,a=!0;break}if(">"===n[e]){t=e;break}if(e===o||e>=n.length)throw new FE;let r=this.readName(e),s=this.skipSpace(e+r.length);if("="!==n[s])throw new FE;let l=n[s=this.skipSpace(s+1)];if(\'"\'!==l&&"\'"!==l)throw new FE;let u=n.indexOf(l,s+1);if(u<0)throw new FE;let d=n.slice(s+1,u);if(d.includes("<"))throw new FE;i.push({qname:r,...FG(r),ns:null,value:Fx(d.replace(/[\\t\\r\\n]/g," ")),start:e,end:u+1,valueStart:s+1,valueEnd:u}),o=u+1}let s=this.open[this.open.length-1]??null;if(!s&&this.root)throw new FE;let l=new Map(s?.scope??[]);for(let e of i)"xmlns"===e.qname?l.set("",e.value):"xmlns"===e.prefix&&l.set(e.local,e.value);let u=e=>"xml"===e?"http://www.w3.org/XML/1998/namespace":l.get(e)||null;for(let e of i)e.ns="xmlns"===e.qname||"xmlns"===e.prefix?FD:e.prefix?u(e.prefix):null;let d=t+(a?2:1),{prefix:c,local:f}=FG(r),m={qname:r,prefix:c,local:f,ns:u(c),attributes:i,scope:l,parent:s,children:[],text:"",start:e,startTagClose:t,startTagEnd:d,selfClosing:a,endTagStart:d,end:d};s?s.children.push(m):this.root=m,a||this.open.push(m),this.at=d}readEndTag(e){let t=this.readName(e+2),n=this.skipSpace(e+2+t.length),r=this.open.pop();if(">"!==this.text[n]||!r||r.qname!==t)throw new FE;r.endTagStart=e,r.end=n+1,this.at=n+1}};function FI(e,t){return"http://www.w3.org/1999/02/22-rdf-syntax-ns#"===e.ns&&e.local===t}function FN(e,t){return e.ns===t.ns&&e.local===t.name}var FC=class{constructor(e,t){this.packet=e,this.rdf=t,hJ(this,"splices",[]),hJ(this,"additions",new Map)}removeElement(e){this.splices.push({start:this.spaceBefore(e.start),end:e.end,text:""})}removeAttribute(e){this.splices.push({start:this.spaceBefore(e.start),end:e.end,text:""})}replaceAttributeValue(e,t){this.splices.push({start:e.valueStart,end:e.valueEnd,text:Fy(t)})}replaceElement(e,t){let n=e.attributes.filter(e=>e.ns===FD).map(e=>` ${this.packet.slice(e.start,e.end)}`).join(""),r=Fj(e.scope,"http://www.w3.org/1999/02/22-rdf-syntax-ns#")??"rdf";this.splices.push({start:e.start,end:e.end,text:FM(e.qname,n,r,t)})}addProperty(e,t,n){let r=this.additionsFor(e),i=e?.scope??this.rdf.scope,o=Fj(i,t.ns,!1)??this.declare(r,i,t),a=Fj(i,"http://www.w3.org/1999/02/22-rdf-syntax-ns#")??"rdf";r.children.push(FM(Fw(o,t.name),"",a,n))}result(){for(let[e,t]of this.additions)this.writeAdditions(e,t);let e=this.splices.map((e,t)=>({splice:e,index:t})).sort((e,t)=>e.splice.start-t.splice.start||e.splice.end-e.splice.start-(t.splice.end-t.splice.start)||e.index-t.index),t="",n=0;for(let{splice:r}of e){if(r.start` xmlns:${e}="${Fy(t)}"`).join("");if(!e){let e=this.rdf.prefix,r=Fw(e,"Description"),i=`<${r} ${Fw(e,"about")}=""${n}>${t.children.join("")}`;this.insertInto(this.rdf,i);return}n&&this.splices.push({start:e.startTagClose,end:e.startTagClose,text:n});let r=this.childIndent(e);this.insertInto(e,t.children.map(e=>r+e).join(""))}insertInto(e,t){if(e.selfClosing)return void this.splices.push({start:e.startTagClose,end:e.startTagEnd,text:`>${t}`});let n=e.children[e.children.length-1],r=n?n.end:e.startTagEnd;this.splices.push({start:r,end:r,text:t})}childIndent(e){let[t]=e.children,n=t?this.packet.slice(e.startTagEnd,t.start):this.packet.slice(e.startTagEnd,e.endTagStart);return/^\\s*$/.test(n)?t?n:n&&`${n} `:""}spaceBefore(e){let t=e;for(;t>0&&/\\s/.test(this.packet[t-1]);)t--;return t}};function Fj(e,t,n=!0){let r;for(let[i,o]of e)if(o===t){if(i)return i;n&&(r=i)}return r}function FM(e,t,n,r){let i,o=(e,t="")=>`<${Fw(n,"li")}${t}>${Fb(e)}`,a=(e,t)=>`<${Fw(n,e)}>${t}`;switch(r.kind){case"text":i=Fb(r.text);break;case"alt":i=a("Alt",o(r.text,\' xml:lang="x-default"\'));break;case"seq":i=a("Seq",r.items.map(e=>o(e)).join(""));break;case"bag":i=a("Bag",r.items.map(e=>o(e)).join(""))}return`<${e}${t}>${i}`}function FR(e,t,n,r){if(0===r.length)return;let i=function(e,t,n){let r=e.EPDFCatalog_GetMetadata(n,0n,0);if(r<=0)return null;let i=hY(t,r,i=>e.EPDFCatalog_GetMetadata(n,i,r)===r?t.readBytes(i,r):null),o=i&&function(e){let[t=1,n=1,r=1,i=1]=e;return 254===t&&255===n?"utf-16be":255===t&&254===n?0===r&&0===i?null:"utf-16le":0===t&&0===n?null:0===t?"utf-16be":0===n?0===r?null:"utf-16le":"utf-8"}(i);if(!i||!o)return null;try{return{text:new TextDecoder(o,{fatal:!0,ignoreBOM:!0}).decode(i),encoding:o}}catch{return null}}(e,t,n);if(!i)return;let o=function(e,t){let n=function(e){try{return new FO(e).read()}catch(e){if(e instanceof FE)return null;throw e}}(e),r=n&&[...function* e(t){for(let n of(yield t,t.children))yield*e(n)}(n)].find(e=>FI(e,"RDF"));if(!r)return null;let i=r.children.filter(e=>FI(e,"Description")),o=new FC(e,r);for(let{property:e,value:n,add:r}of t){let t=i.flatMap(t=>t.children.filter(t=>FN(t,e))),a=i.flatMap(t=>t.attributes.filter(t=>FN(t,e)).map(e=>({attribute:e,description:t})));if(null===n){t.forEach(e=>o.removeElement(e)),a.forEach(({attribute:e})=>o.removeAttribute(e));continue}let[s,...l]=t,[u,...d]=a;if(s)(l.length>0||a.length>0||!function(e,t){if(e.attributes.some(e=>"http://www.w3.org/1999/02/22-rdf-syntax-ns#"===e.ns))return!1;if("text"===t.kind)return 0===e.children.length&&e.text===t.text;let[n,...r]=e.children,i={alt:"Alt",seq:"Seq",bag:"Bag"}[t.kind];if(!n||r.length>0||!FI(n,i))return!1;let o=n.children;if(!o.every(e=>FI(e,"li")&&0===e.children.length))return!1;if("alt"===t.kind){let[e]=o,n=e?.attributes.find(e=>"http://www.w3.org/XML/1998/namespace"===e.ns&&"lang"===e.local);return 1===o.length&&n?.value==="x-default"&&e.text===t.text}return o.length===t.items.length&&o.every((e,n)=>e.text===t.items[n])}(s,n))&&(o.replaceElement(s,n),l.forEach(e=>o.removeElement(e)),a.forEach(({attribute:e})=>o.removeAttribute(e)));else if(u&&"text"===n.kind)(d.length>0||u.attribute.value!==n.text)&&(o.replaceAttributeValue(u.attribute,n.text),d.forEach(({attribute:e})=>o.removeAttribute(e)));else if(u)a.forEach(({attribute:e})=>o.removeAttribute(e)),o.addProperty(u.description,e,n);else if(r){let t=i.find(t=>(function(e,t){return e.attributes.some(e=>"http://www.w3.org/2000/xmlns/"===e.ns&&e.value===t)})(t,e.ns))??i[0];o.addProperty(t??null,e,n)}}return o.result()}(i.text,r);if(null!==o&&o!==i.text){let r;if(!hY(t,Math.max((r=function({text:e,encoding:t}){if("utf-8"===t)return new TextEncoder().encode(e);let n=new Uint8Array(2*e.length),r=new DataView(n.buffer);for(let n=0;n(t.writeBytes(i,r),e.EPDFCatalog_SetMetadata(n,i,r.length))))throw new N(G.Unknown,"failed to write the XMP metadata")}}var FT="http://purl.org/dc/elements/1.1/",FB="http://ns.adobe.com/xap/1.0/",FL="http://ns.adobe.com/pdf/1.3/",F$=(e,t,n)=>({ns:e,prefix:t,name:n}),Fz={title:{property:F$(FT,"dc","title"),kind:"alt"},author:{property:F$(FT,"dc","creator"),kind:"seq"},subject:{property:F$(FT,"dc","description"),kind:"alt"},keywords:{property:F$(FL,"pdf","Keywords"),kind:"text"},creator:{property:F$(FB,"xmp","CreatorTool"),kind:"text"},producer:{property:F$(FL,"pdf","Producer"),kind:"text"}},FU=F$(FB,"xmp","CreateDate"),FV=F$(FB,"xmp","ModifyDate"),FW=F$(FL,"pdf","Trapped"),Fq=F$(FT,"dc","subject"),FH={true:"True",false:"False",unknown:"Unknown"};function FK(e){if(null===e)return null;let t=hH(e);return{kind:"text",text:hq(t)??t}}var FZ=class{constructor(e,t){this.runtime=e,this.session=t}update(e,t){hW(t);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr();return!function(e,t,n,r){var i;let o=e=>{throw new N(G.Unknown,`failed to write metadata ${e}`)};for(let[i,a]of FP){let s=r[i];void 0!==s&&(Fg(e,t,n,a,s)||o(a))}void 0===r.createdAt||Fg(e,t,n,"CreationDate",null===r.createdAt?null:hH(r.createdAt))||o("CreationDate"),void 0===r.modifiedAt||Fg(e,t,n,"ModDate",null===r.modifiedAt?null:hH(r.modifiedAt))||o("ModDate"),void 0===r.trapped||(i=r.trapped,e.EPDF_SetMetaTrapped(n,"true"===i?1:"false"===i?2:3))||o("Trapped")}(n,r,i,e),FR(n,r,i,function(e){let t=[],n=(e,n,r=!0)=>t.push({property:e,value:n,add:r});for(let[t,{property:r,kind:i}]of Object.entries(Fz)){let o=e[t];void 0!==o&&n(r,null===o?null:"seq"===i?{kind:i,items:[o]}:{kind:i,text:o})}if(void 0!==e.keywords){let t=null===e.keywords?null:e.keywords.split(/[,;]/).map(e=>e.trim()).filter(e=>""!==e);n(Fq,t&&{kind:"bag",items:t},!1)}return void 0!==e.createdAt&&n(FU,FK(e.createdAt)),void 0!==e.modifiedAt&&n(FV,FK(e.modifiedAt)),void 0!==e.trapped&&n(FW,{kind:"text",text:FH[e.trapped]}),t}(e)),hW(t),{metadata:new FF(this.runtime,this.session).read(t),meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}updateCustom(e,t){hW(t);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=Object.entries(e);for(let[e]of o){let t=function(e){if(F_.has(e))return`\'${e}\' is a standard key; set it with metadata.update`;if(!e||e.length>127||"/"===e[0])return`\'${e}\' can\'t be a custom key: 1 to 127 characters, no leading slash`;for(let t=0;t126)return`\'${e}\' can\'t be a custom key: printable ASCII only`}return null}(e);if(t)throw new N(G.InvalidArg,t,{details:{field:e}})}for(let[e,t]of o)if(!Fg(n,r,i,e,t))throw new N(G.Unknown,`failed to write metadata ${e}`);return FR(n,r,i,Object.entries(e).filter(([e])=>/^[A-Za-z_][A-Za-z0-9._-]*$/.test(e)).map(([e,t])=>({property:F$("http://ns.adobe.com/pdfx/1.3/","pdfx",e),value:null===t?null:{kind:"text",text:t},add:!1}))),hW(t),{custom:new FF(this.runtime,this.session).readCustom(t),meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}},FJ={bytes:124,offsets:{looseBox:0,tightBox:16,looseQuad:32,tightQuad:64,matrix:96,flags:120},flags:{hasTightBox:1,hasLooseQuad:2,hasTightQuad:4,upright:8,space:16,empty:32,synthesized:64}},FQ={bytes:132,offsets:{geometry:0,objectRun:124,fontSize:128}};function FX(e,t,n=0){return{left:F0(e,t,n),top:F0(e,t,n+4),right:F0(e,t,n+8),bottom:F0(e,t,n+12)}}function FY(e,t,n){e.poke(t,"f32",n.left,0),e.poke(t,"f32",n.top,4),e.poke(t,"f32",n.right,8),e.poke(t,"f32",n.bottom,12)}function F0(e,t,n=0){return Number(e.peek(t,"f32",n))}function F1(e,t,n=0){return Number(e.peek(t,"i32",n))}var F3={fit:2,fitH:3,fitV:4,fitR:5,fitB:6,fitBH:7,fitBV:8};function F2(e,t,n,r){let i=e.EPDFDest_GetPageObjectNumber(n,r);if(0===i)return null;let o=q(i),a=h0(t,[8,16],([n,i])=>{let o=e.FPDFDest_GetView(r,n,i),a=Math.min(F1(t,n),4),s=[];for(let e=0;eethis.limits.maxModels||this.nodes>this.limits.maxNodes||this.scriptCodeUnits>this.limits.maxScriptCodeUnits||this.targetEntries>this.limits.maxTargetEntries||this.payloadCodeUnits>this.limits.maxPayloadCodeUnits)throw new N(G.MalformedPdf,"aggregate PDF action read budget exceeded",{details:{models:this.models,nodes:this.nodes,scriptCodeUnits:this.scriptCodeUnits,targetEntries:this.targetEntries,payloadCodeUnits:this.payloadCodeUnits,limits:this.limits}})}};function F8(e,t,n,r,i){if(0n===r)return null;try{var o,a,s,l;let u,d=e.EPDFAction_GetNodeCount(r);if(!Number.isInteger(d)||d<0)throw F9("invalid node count",{nodeCount:d});i.addModel(d);let c=e.EPDFAction_GetWarningFlags(r)>>>0,f=!e.EPDFAction_IsComplete(r),m=(o=e.EPDFAction_GetRootNode(r),a=d,-1===o||0xffffffff===o||o>>>0==0xffffffff?null:F7(o,a)),p=new Set,h=!1,F=e=>{let n=e(0n,0);return n<=0?null:(i.reservePayloadBytes(n),h2(t,e))},g=e=>h0(t,[4],([n])=>e(n)?0!==F1(t,n):null),_=(n,i)=>h0(t,[4],([o])=>{if(!e.EPDFAction_GetNodeTargetObjectNumber(r,n,i,o))return null;let a=F1(t,o)>>>0;return 0===a?null:a}),P=(t,n)=>{let i=[];for(let o=0;oe.EPDFAction_GetNodeTargetName(r,t,o,n,i));if(null!==n){i.push({kind:"name",name:n});continue}let a=_(t,o);if(null===a)return null;i.push({kind:"objectNumber",objectNumber:a})}return i},D=o=>{if(p.has(o))throw F9("native action model contains a cycle",{nodeId:o});p.add(o);try{let a=F5[e.EPDFAction_GetNodeType(r,o)]??"unknown",s=h2(t,(t,n)=>e.EPDFAction_GetNodeSubtype(r,o,t,n))??"",l=e.EPDFAction_GetNextCount(r,o);if(!Number.isInteger(l)||l<0)throw F9("invalid action child count",{nodeId:o,nextCount:l});let u=[];for(let t=0;t(h=!0,{type:"unknown",subtype:s,next:u});switch(a){case"javascript":{if(!e.EPDFAction_NodeHasJavaScript(r,o))return c();let n=h3(t,(t,n)=>e.EPDFAction_GetNodeJavaScript(r,o,t,n))??"";return i.addScript(n),{type:a,subtype:s,script:n,next:u}}case"rendition":{if(!e.EPDFAction_NodeHasJavaScript(r,o))return{type:a,subtype:s,next:u};let n=h3(t,(t,n)=>e.EPDFAction_GetNodeJavaScript(r,o,t,n))??"";return i.addScript(n),{type:a,subtype:s,script:n,next:u}}case"goto":{let i=e.EPDFAction_GetNodeDest(n,r,o),l=0n!==i?F2(e,t,n,i):null;return l?{type:a,subtype:s,destination:l,next:u}:c()}case"uri":{let t=F((t,i)=>e.EPDFAction_GetNodeURI(n,r,o,t,i));if(null===t)return c();return{type:a,subtype:s,uri:t,isMap:g(t=>e.EPDFAction_GetNodeURIIsMap(r,o,t))??!1,next:u}}case"named":{let t=F((t,n)=>e.EPDFAction_GetNodeName(r,o,t,n));return null===t?c():{type:a,subtype:s,name:t,next:u}}case"hide":{let t=e.EPDFAction_GetNodeTargetCount(r,o);if(!Number.isInteger(t)||t<0)return c();i.reserveTargets(t);let n=P(o,t);if(null===n)return c();return{type:a,subtype:s,targets:n,hide:g(t=>e.EPDFAction_GetNodeHideFlag(r,o,t))??!0,next:u}}case"reset-form":{let n=h0(t,[4,4],([n,i])=>e.EPDFAction_GetNodeResetForm(r,o,n,i)?{hasFields:0!==F1(t,n),exclude:0!==F1(t,i)}:null),l=e.EPDFAction_GetNodeTargetCount(r,o);if(null===n||!Number.isInteger(l)||l<0)return c();i.reserveTargets(l);let d=n.hasFields?P(o,l):null;if(n.hasFields&&null===d)return c();return{type:a,subtype:s,fields:d,exclude:n.exclude,next:u}}case"submit-form":{if("function"!=typeof e.EPDFAction_GetNodeSubmitForm)return{type:a,subtype:s,next:u};let n=h0(t,[4,4],([n,i])=>e.EPDFAction_GetNodeSubmitForm(r,o,n,i)?{hasFields:0!==F1(t,n),flags:F1(t,i)>>>0}:null);if(null===n)return c();let l=F((t,n)=>e.EPDFAction_GetNodeSubmitFormURL(r,o,t,n));if(null===l)return c();let d=e.EPDFAction_GetNodeTargetCount(r,o);if(!Number.isInteger(d)||d<0)return c();i.reserveTargets(d);let f=n.hasFields?P(o,d):null;if(n.hasFields&&null===f)return c();let m=F((t,n)=>e.EPDFAction_GetNodeSubmitFormCharSet(r,o,t,n));return{type:a,subtype:s,payload:{url:l,fields:f,...j(n.flags),...null===m?{}:{charSet:m}},next:u}}case"goto-remote":case"goto-embedded":case"launch":{let t=F((t,n)=>e.EPDFAction_GetNodeFilePath(r,o,t,n));return null===t?c():{type:a,subtype:s,filePath:t,next:u}}default:return{type:a,subtype:s,next:u}}}finally{p.delete(o)}},b=null===m?null:D(m),y=(s=c,l=f,u=[],(1&s)!=0&&u.push("cycle-dropped"),(2&s)!=0&&u.push("malformed-next"),((4&s)!=0||l)&&u.push("incomplete"),u);return h&&y.push("payload-dropped"),{root:b,incomplete:f,warnings:y}}finally{e.EPDFAction_CloseModel(r)}}function F7(e,t){if(!Number.isInteger(e)||e<0||e>=t)throw F9("native action model returned an invalid node id",{raw:e,nodeCount:t});return e}function F9(e,t){return new N(G.MalformedPdf,e,{details:t})}var ge={x:0,y:1,distance:2,area:3,angle:4,slope:5},gt=["decimal","fraction","round","truncate"],gn=["thousands","decimal","prefixSpacing","suffixSpacing"];function gr(e){if(!e)throw new N(G.Unknown,"Measurement native write failed after preflight")}function gi(e,t,n="f32"){return hY(e,4,r=>t(r)?Number(e.peek(r,n)):void 0)}function go(e,t,n){return t?hY(e,8,r=>(e.poke(r,"f32",t.x),e.poke(r,"f32",t.y,4),n(r))):n(0n)}function ga(e,t,n){if(!n)return;let r=e.EPDFMeasure_GetSubtype(n);if(1!==r)return{subtype:2===r?"geospatial":"unknown"};let i=r=>Array.from({length:e.EPDFMeasure_CountFormats(n,r)},(i,o)=>{let a=e.EPDFMeasure_GetFormat(n,r,o),s={unit:h3(t,(t,n)=>e.EPDFNumberFormat_GetUnit(a,t,n))??""},l=gi(t,t=>e.EPDFNumberFormat_GetConversion(a,t));void 0!==l&&(s.conversion=l);let u=gi(t,t=>e.EPDFNumberFormat_GetFraction(a,t),"i32");void 0!==u&>[u]&&(s.fraction=gt[u]);let d=gi(t,t=>e.EPDFNumberFormat_GetPrecision(a,t),"i32");void 0!==d&&(s.precision=d);let c=gi(t,t=>e.EPDFNumberFormat_GetFixedDenominator(a,t),"i32");void 0!==c&&(s.fixed=!!c);let f=gi(t,t=>e.EPDFNumberFormat_GetLabelPosition(a,t),"i32");for(let[n,r]of(void 0!==f&&(s.labelPosition=1===f?"prefix":"suffix"),gn.entries())){let i=h3(t,(t,r)=>e.EPDFNumberFormat_GetText(a,n,t,r));null!==i&&(s[r]=i)}return s}),o=h3(t,(t,r)=>e.EPDFMeasure_GetRatio(n,t,r)),a=hY(t,8,r=>e.EPDFMeasure_GetOrigin(n,r)?{x:Number(t.peek(r,"f32")),y:Number(t.peek(r,"f32",4))}:void 0),s=gi(t,t=>e.EPDFMeasure_GetCYX(n,t)),l={subtype:"rectilinear",x:i(0),distance:i(2),area:i(3),...null!==o?{ratio:o}:{},...a?{origin:a}:{},...void 0!==s?{cyx:s}:{}};for(let e of["y","angle","slope"]){let t=i(ge[e]);t.length&&(l[e]=t)}return l}function gs(e,t,n,r){for(let[i,o]of(gr(n),void 0!==r.ratio&&gr(h6(t,r.ratio,t=>e.EPDFMeasure_SetRatio(n,t))),r.origin&&gr(go(t,r.origin,t=>e.EPDFMeasure_SetOrigin(n,t))),void 0!==r.cyx&&hY(t,4,i=>{t.poke(i,"f32",r.cyx),gr(e.EPDFMeasure_SetCYX(n,i))}),Object.entries(ge)))for(let a of r[i]??[]){let r,i=t.writeU16String(a.unit);try{r=e.EPDFMeasure_AddFormat(n,o,i,a.conversion)}finally{t.free(i)}for(let[n,i]of(gr(r),void 0!==a.fraction&&gr(e.EPDFNumberFormat_SetFraction(r,gt.indexOf(a.fraction))),void 0!==a.precision&&gr(e.EPDFNumberFormat_SetPrecision(r,a.precision)),void 0!==a.fixed&&gr(e.EPDFNumberFormat_SetFixedDenominator(r,a.fixed)),void 0!==a.labelPosition&&gr(e.EPDFNumberFormat_SetLabelPosition(r,+("prefix"===a.labelPosition))),gn.entries()))void 0!==a[i]&&gr(h6(t,a[i],t=>e.EPDFNumberFormat_SetText(r,n,t)))}}function gl(e,t,n,r){let i=[],o=e.EPDFPage_CountViewportsRaw(n,r);for(let a=0;ae.EPDFViewport_GetBBox(o,n)?eH(FX(t,n)):void 0);if(!n)continue;let r=h3(t,(t,n)=>e.EPDFViewport_GetName(o,t,n)),a=ga(e,t,e.EPDFViewport_GetMeasure(o));i.push({bbox:n,owned:r===nb&&(!a||"rectilinear"===a.subtype),name:r,measure:a??null})}finally{e.EPDFViewport_Close(o)}}return i}function gu(e){return"wasm"===e.kind?4:8}function gd(e,t,n,r){"wasm"===e.kind?e.mem.poke(t,"i32",Number(r),n):e.mem.poke(t,"i64",BigInt(r),n)}function gc(e,t,n){let r=gu(e);return hY(e.mem,Math.max(1,t.length*r),i=>(t.forEach((t,n)=>gd(e,i,n*r,t)),n(i,t.length)))}function gf(e,t,n){let{mem:r}=e,i=t.map(e=>r.writeU16String(e));try{return gc(e,i,n)}finally{for(let e=i.length-1;e>=0;e--)r.free(i[e])}}var gm=[null,"decimal","upperRoman","lowerRoman","upperLetters","lowerLetters"];function gp(e,t){let{fn:n,mem:r}=e,i=n.EPDFDoc_GetPageLabelSectionCount(t),o=[];return h0(r,[4,4,4],([e,a,s])=>{for(let l=0;ln.EPDFDoc_GetPageLabelSectionAt(t,l,r,i,e,a,s));o.push({firstPage:F1(r,e),style:gm[F1(r,a)]??null,firstNumber:F1(r,s),prefix:i??""})}}),o}var gh=class{constructor(e,t){this.runtime=e,this.session=t}read(e){hW(e);let{fn:t,mem:n}=this.runtime,r=this.session.requireDocPtr(),i=this.session.allRecords(),o=new F4,a=gp(this.runtime,r);return h0(n,[16,4,4],([s,l,u])=>{var d,c,f;let m,p=i.map(i=>{var d,c,f,m,p,h,F,g,_,P;let D,b,y,w;hW(e);let E=i.pageIndex,A=(c=t,f=n,m=r,p=i.pageObjectNumber,h=o,D={},b=F8(c,f,m,c.EPDFDoc_GetPageActionModel(m,p,0),h),y=F8(c,f,m,c.EPDFDoc_GetPageActionModel(m,p,1),h),b&&(D.open=b),y&&(D.close=y),b||y?D:void 0),v=gl(t,n,r,E),S=gg(t,n,r,E,s);return{index:E,ref:q(i.pageObjectNumber),label:function(e,t){let n;for(let r of e){if(r.firstPage>t)break;n=r}if(!n)return null;let r=n.prefix+function(e,t){switch(e){case null:return"";case"decimal":return String(t);case"upperRoman":return r2(t).toUpperCase();case"lowerRoman":return r2(t);case"upperLetters":return r6(t).toUpperCase();case"lowerLetters":return r6(t)}}(n.style,n.firstNumber+t-n.firstPage);return""===r?null:r}(a,E),size:{width:(d=S.crop).right-d.left,height:d.top-d.bottom},rotation:gP(t,n,r,E,u),userUnit:function(e,t,n,r,i){if(!e.EPDF_GetPageUserUnitByIndex(n,r,i))return 1;let o=F0(t,i,0);return Number.isFinite(o)&&o>0?o:1}(t,n,r,E,l),tabOrder:(F=t,g=n,_=r,P=E,(w=h2(g,(e,t)=>F.EPDF_GetPageTabOrderByIndex(_,P,e,t)))?gD[w]??null:null),boxes:S,pdfCropBox:S.crop,...A?{actions:A}:{},...v.length?{viewports:v}:{}}});return{pageCount:p.length,pages:p,labels:a,namedPages:(d=t,c=n,f=r,m=[],h0(c,[4,4],([e,t])=>{for(let n of gb){let r=d.EPDFDoc_GetNamedPageCount(f,n);for(let i=0;id.EPDFDoc_GetNamedPageAt(f,n,i,r,o,e,t),"");if(null===r)continue;let o=Number(c.peek(e,"i32"))>>>0,a=Number(c.peek(t,"i32"));m.push({name:r,target:0===a?{kind:"page",page:q(o)}:1===a?{kind:"template",objectNumber:o}:{kind:"dangling"}})}}}),m)}})}};function gF(e,t){let n=new Map,r=null;return i=>{let o=n.get(i.objectNumber);if(o)return o;r??(r=new Map(t.allRecords().map(e=>[e.pageObjectNumber,e.pageIndex])));let a=r.get(i.objectNumber);if(void 0===a)throw new N(G.NotFound,`no page with object number ${i.objectNumber}`);let{fn:s,mem:l}=e,u=t.requireDocPtr(),d=hY(l,16,e=>gg(s,l,u,a,e).crop);return n.set(i.objectNumber,d),d}}function gg(e,t,n,r,i){var o;let a,s,l,u=o=>(function(e,t,n,r,i,o){if(e.EPDF_GetPageBoxByIndex(n,r,i,o))return eH(FX(t,o))})(e,t,n,r,o,i);return a=(o={media:u(0),crop:u(1),bleed:u(2),trim:u(3),art:u(4)}).media??iJ,l=(s=e=>{let t,n,r,i;return t=Math.max(e.left,a.left),n=Math.min(e.right,a.right),r=Math.max(e.bottom,a.bottom),i=Math.min(e.top,a.top),(tgP(e.fn,e.mem,t,n,r))}function gP(e,t,n,r,i){var o;return e.EPDF_GetPageRotateByIndex(n,r,i)?Number.isInteger(o=F1(t,i))&&o%90==0?(o%360+360)%360:0:0}var gD={R:"rows",C:"columns",S:"structure",A:"annotations",W:"widgets"},gb=[0,1];function gy(e,t,n){if("start"===t)return 0;if("end"===t)return n;let{pageIndex:r}=e.resolvePageRef(n_(t));return"before"in t?r:r+1}var gw=class{constructor(e,t){this.runtime=e,this.session=t}reorder(e,t,n){let r,i=this.session.resolvePageRefs(e);hW(n),this.requireUniquePageObjectNumbers("pages.reorder",i);let o=n_(t);if(o&&i.includes(o.objectNumber))throw new N(G.InvalidArg,`pages.reorder: the neighbour page ${o.objectNumber} is one of the pages that move`,{details:{field:"position"}});let{fn:a,mem:s}=this.runtime,l=this.session.requireDocPtr(),u=i.map(e=>(hW(n),this.session.recordByObjectNumber(e).pageIndex)),d=gy(this.session,t,a.FPDF_GetPageCount(l)),c=d-u.filter(e=>e=o)throw new N(G.InvalidArg,`pages.delete would remove every page (${n.length} of ${o}); a document must keep at least one`);let a=this.session.pagePool();for(let e of n)if(this.session.recordByObjectNumber(e),a.isHeld(e))throw new N(G.Unknown,`internal invariant violation: pagePtr for page ${e} is still held during pages.delete`);for(let e of n)if(!r.EPDFDoc_DeletePageByObjectNumber(i,e))throw new N(G.Unknown,`EPDFDoc_DeletePageByObjectNumber rejected page ${e} after validation`);return this.session.refreshPageRegistry(),{layout:new gh(this.runtime,this.session).read(t),meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}setName(e,t){if(hW(t),0===e.name.length)throw new N(G.InvalidArg,"pages.setName requires a non-empty name");let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=this.session.resolvePageRef(e.page).pageObjectNumber;if(void 0!==e.replace&&e.replace!==e.name&&e.replace.length>0&&h6(r,e.replace,e=>n.EPDFDoc_RemoveNamedPage(i,e)),!h6(r,e.name,e=>n.EPDFDoc_SetNamedPage(i,e,o)))throw new N(G.Unknown,`EPDFDoc_SetNamedPage rejected \'${e.name}\' for page ${o}`);return{layout:new gh(this.runtime,this.session).read(t),meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}removeName(e,t){if(hW(t),0===e.name.length)throw new N(G.InvalidArg,"pages.removeName requires a non-empty name");let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr();if(!h6(r,e.name,e=>n.EPDFDoc_RemoveNamedPage(i,e)))throw new N(G.NotFound,`pages.removeName: no /Names /Pages registration \'${e.name}\'`);return{layout:new gh(this.runtime,this.session).read(t),meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}requireUniquePageObjectNumbers(e,t){if(0===t.length)throw new N(G.InvalidArg,`${e} requires at least one page`);let n=new Set;for(let r of t){if(n.has(r))throw new N(G.InvalidArg,`${e} was given duplicate page object number ${r}`);n.add(r)}}},gE=class{constructor(e,t){this.runtime=e,this.session=t}extract(e,t,n){let r;if(hW(n),0===e.length)throw new N(G.InvalidArg,"pages.extract requires at least one page");let i=this.session.resolvePageRefs(e),o=new Set;for(let e of i){if(o.has(e))throw new N(G.InvalidArg,`pages.extract was given duplicate page object number ${e}`);o.add(e)}let a=i.map(e=>this.session.recordByObjectNumber(e).pageIndex),{fn:s,mem:l}=this.runtime,u=this.session.requireDocPtr(),d=l.alloc(4*a.length);for(let e=0;e(n.EPDFDoc_GetImportFieldRoots(t,0n,0,e,i),Array.from({length:i},(t,n)=>Number(r.peek(e,"i32",4*n)))))}(e,n);if(0===o.length)return;let a=o.map(e=>h3(i,(t,i)=>r.EPDFForm_GetFieldPartialName(n,e,t,i))??""),s=function(e,t){let{fn:n,mem:r}=e,i=gv(e,t),o=new Set;for(let e=0;en.EPDFForm_GetFieldName(i,e,t,r));t&&o.add(t.split(".")[0])}return o}(e,t),l=new Set([...s,...a]);o.forEach((e,t)=>{let o=a[t];if(!s.has(o))return;let u=o;for(let e=2;l.has(u);e++)u=`${o}_${e}`;if(l.add(u),!h5(i,u,t=>r.EPDFForm_SetFieldName(n,e,t)))throw new N(G.Unknown,`pages.insert could not rename the inserted field "${o}" to "${u}"`)})}function gx(e,t,n){let{pageIndex:r}=t.resolvePageRef(q(n)),i=e.fn.EPDFPage_PromoteInlineAnnotsRaw(t.requireDocPtr(),r);if(i<0)throw new N(G.Unknown,`the inline annotations of page ${n} could not be promoted`);return 0!==i&&(t.pagePool().closeIdle(),!0)}var gG=class{constructor(e,t){this.runtime=e,this.session=t}insert(e,t,n,r){if(hW(n),0===e.byteLength)throw new N(G.InvalidArg,"pages.insert requires non-empty bytes");let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr(),s=gy(this.session,t,i.FPDF_GetPageCount(a)),l=o.alloc(e.byteLength),u=null;try{if(o.writeBytes(l,new Uint8Array(e)),!(u=i.FPDF_LoadMemDocument(l,e.byteLength,"")))throw hX(i,null,new N(G.MalformedPdf,"pages.insert source PDF could not be opened"));let t=i.FPDF_GetPageCount(u);if(t<=0)throw new N(G.InvalidArg,"pages.insert source PDF has no pages");gk(this.runtime,this.session,u);let a=this.importInto(u,s,t,r,"pages.insert",n),d=u;return this.session.retainUntilClose(()=>{i.FPDF_CloseDocument(d),o.free(l)}),a}catch(e){throw u&&i.FPDF_CloseDocument(u),o.free(l),e}}copy(e,t,n,r){if(hW(n),0===e.length)throw new N(G.InvalidArg,"pages.copy requires at least one page");let i=this.session.resolvePageRefs([...e]).map(e=>this.session.recordByObjectNumber(e).pageIndex),{fn:o}=this.runtime,a=this.session.requireDocPtr(),s=gy(this.session,t,o.FPDF_GetPageCount(a)),l=o.FPDF_CreateNewDocument();if(!l)throw new N(G.Unknown,"FPDF_CreateNewDocument failed");try{if(!h1(this.runtime.mem,i,(e,t)=>o.EPDFDoc_ImportPages(l,a,e,t,0,0n)))throw new N(G.Unknown,`EPDFDoc_ImportPages rejected copying pages [${i.join(",")}] out`);gk(this.runtime,this.session,l);let e=this.importInto(l,s,i.length,r,"pages.copy",n);return this.session.retainUntilClose(()=>o.FPDF_CloseDocument(l)),e}catch(e){throw o.FPDF_CloseDocument(l),e}}importInto(e,t,n,r,i,o){let{fn:a,mem:s}=this.runtime,l=this.session.requireDocPtr();if(r&&r.length!==n)throw new N(G.InvalidArg,`${i} needs one object number per page: ${r.length} for ${n}`,{details:{field:"objectNumbers"}});for(let e of r??[])this.session.claimObjectNumber(e);if(!(r?h1(s,r,n=>a.EPDFDoc_ImportPages(l,e,0n,0,t,n)):a.EPDFDoc_ImportPages(l,e,0n,0,t,0n)))throw new N(G.Unknown,`EPDFDoc_ImportPages rejected the ${i} at index ${t}`);this.session.refreshPageRegistry();let u=new gh(this.runtime,this.session).read(o),d=u.pages.slice(t,t+n).map(e=>e.ref);for(let e of d)gx(this.runtime,this.session,e.objectNumber);return{insertedPages:d,layout:u,meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}insertBlank(e,t,n,r){hW(n);let{size:i}=e,o=e.count??1;if(!Number.isFinite(i?.width)||!Number.isFinite(i?.height)||i.width<=0||i.height<=0)throw new N(G.InvalidArg,`pages.insertBlank size must have positive finite dimensions, got ${i?.width}x${i?.height}`);if(!Number.isInteger(o)||o<1||o>100)throw new N(G.InvalidArg,`pages.insertBlank count ${o} out of range [1, 100]`);let{fn:a}=this.runtime,s=this.session.requireDocPtr(),l=gy(this.session,t,a.FPDF_GetPageCount(s));if(r&&r.length!==o)throw new N(G.InvalidArg,`pages.insertBlank needs one object number per page: ${r.length} for ${o}`,{details:{field:"objectNumbers"}});for(let e of r??[])this.session.claimObjectNumber(e);for(let e=0;ee.ref),layout:u,meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}},gO=class{constructor(e,t){this.runtime=e,this.session=t}flatten(e,t,n){hW(n);let r=this.session.resolvePageRefs(e);var i=r;if(0===i.length)throw new N(G.InvalidArg,"pages.flatten requires at least one page");let o=new Set;for(let e of i){if(o.has(e))throw new N(G.InvalidArg,`pages.flatten was given duplicate page object number ${e}`);o.add(e)}let a=[],s=new Set;for(let e of r){let r;hW(n),gx(this.runtime,this.session,e)&&s.add(e);let i=this.session.pagePool(),o=i.acquire(e);try{r=this.runtime.fn.EPDFPage_Flatten(o,+("print"===t))}finally{i.release(e)}if(2===r){a.push({page:q(e),status:"unchanged"});continue}if(1!==r)throw new N(G.Unknown,0===r?"native page flatten failed after preflight":`native page flatten returned unexpected code ${r}`);s.add(e),a.push({page:q(e),status:"applied"})}return 0===s.size?{pages:e,usage:t,results:a,meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}:(this.session.invalidateDerived(),{pages:e,usage:t,results:a,meta:{affectedPages:[...s].map(e=>q(e)),cacheDelta:null,...this.session.writeStamp()}})}};function gI(e,t,n,r,i,o){let a=e.EPDFAnnot_GetObjectNumber(i);return a<=0?{kind:"baseIndex",page:r,baseIndex:o}:gN(e,t,n,r,a)}function gN(e,t,n,r,i){var o,a,s,l;let u=(o=e,a=t,s=n,l=i,h0(a,[8,8],([e,t])=>(Ft(a,e,0),Ft(a,t,0),o.EPDFLayer_GetBirthName(s,l,e,t))?Fn(a,t):null));return null===u?{kind:"objectNumber",page:r,objectNumber:i}:{kind:"baseIndex",page:r,baseIndex:u}}function gC(e,t,n){let{fn:r}=e,i=t.requireDocPtr(),{pageIndex:o}=t.resolvePageRef(n.page),a=n.page.objectNumber;switch(n.kind){case"objectNumber":{let e=r.EPDFPage_GetAnnotIndexByObjectNumberRaw(i,o,n.objectNumber);if(e<0)throw new N(G.NotFound,`no annotation with object number ${n.objectNumber} on page ${a}`);return{pageIndex:o,index:e}}case"baseIndex":{let t=function(e,t,n,r,i){let{fn:o}=e;if(o.EPDFLayer_IsPagePromoted(t,n)){let e=o.EPDFLayer_GetBirthObjectNumber(t,n,i);return e<=0?-1:o.EPDFPage_GetAnnotIndexByObjectNumberRaw(t,r,e)}if(i<0||i>=o.EPDFPage_GetAnnotCountRaw(t,r))return -1;let a=o.EPDFPage_GetAnnotRaw(t,r,i);if(!a)return -1;try{return o.EPDFAnnot_GetObjectNumber(a)>0?-1:i}finally{o.FPDFPage_CloseAnnot(a)}}(e,i,a,o,n.baseIndex);if(t<0)throw new N(G.NotFound,`no annotation born at position ${n.baseIndex} of page ${a}`);return{pageIndex:o,index:t}}}}function gj(e,t,n){let{pageIndex:r,index:i}=gC(e,t,n);return gM(e,t,r,i)}function gM(e,t,n,r){let i=e.fn.EPDFPage_GetAnnotRaw(t.requireDocPtr(),n,r);if(!i)throw new N(G.Unknown,`annotation ${r} of page index ${n} could not be opened`);return i}function gR(e,t,n){let{pageIndex:r,index:i}=gC(e,t,n),o=gM(e,t,r,i),{fn:a,mem:s}=e;return{annotPtr:o,name:gI(a,s,t.requireDocPtr(),n.page,o,i)}}function gT(e,t,n,r){let{index:i}=gC(e,t,r),o=e.fn.FPDFPage_GetAnnot(n,i);if(!o)throw new N(G.Unknown,`annotation ${i} of page ${r.page.objectNumber} could not be opened`);return o}var gB=class{constructor(e,t){this.runtime=e,this.session=t}apply(e,t){hW(t);let n=this.buildPlan(e);for(let e of n.keys())this.session.recordByObjectNumber(e);this.preflight(n,t);let{fn:r}=this.runtime,i=[],o=new Set,a=0;for(let[e,s]of n){hW(t),gx(this.runtime,this.session,e)&&o.add(e);let n=this.session.pagePool(),l=n.acquire(e);try{let t=null===s?this.applyAllOnPage(l):this.applyRefsOnPage(l,s);"applied"===t.status&&(r.FPDFPage_GenerateContent(l),o.add(e),a+=t.removed),i.push({page:q(e),status:t.status,removedAnnotationCount:t.removed})}finally{n.release(e)}}return 0===o.size?{scope:e,results:i,removedAnnotationCount:a,meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}:(this.session.invalidateDerived(),{scope:e,results:i,removedAnnotationCount:a,meta:{affectedPages:[...o].map(e=>q(e)),cacheDelta:null,...this.session.writeStamp()}})}buildPlan(e){let t=new Map;if("pages"in e){if(0===this.session.resolvePageRefs(e.pages).length)throw new N(G.InvalidArg,"redaction.apply requires at least one page");for(let n of this.session.resolvePageRefs(e.pages)){if(t.has(n))throw new N(G.InvalidArg,`redaction.apply was given duplicate page object number ${n}`);t.set(n,null)}return t}if(0===e.annotations.length)throw new N(G.InvalidArg,"redaction.apply requires at least one annotation ref");for(let n of e.annotations){let e=t.get(n.page.objectNumber);if(null===e)throw new N(G.InvalidArg,"mixed redaction scopes on one page");e?e.push(n):t.set(n.page.objectNumber,[n])}return t}preflight(e,t){let{fn:n}=this.runtime;for(let[r,i]of e){if(null===i)continue;hW(t);let e=this.session.pagePool(),o=e.acquire(r);try{for(let e of i){let t=gT(this.runtime,this.session,o,e);try{let e=rN(n.FPDFAnnot_GetSubtype(t));if("redact"!==e)throw new N(G.InvalidArg,`redaction.apply ref on page ${r} resolves to a \'${e}\' annotation, not a redact annotation`)}finally{n.FPDFPage_CloseAnnot(t)}}}finally{e.release(r)}}}applyAllOnPage(e){let{fn:t,mem:n}=this.runtime,r=this.pageHasRedactAnnotations(e);return hY(n,4,i=>{if(!t.EPDFPage_ApplyRedactions(e,0n,0,i)){if(r)throw new N(G.Unknown,"native page redaction apply failed");return{status:"unchanged",removed:0}}return{status:"applied",removed:F1(n,i)>>>0}})}pageHasRedactAnnotations(e){let{fn:t}=this.runtime,n=t.FPDFPage_GetAnnotCount(e);for(let r=0;rhY(r,4,a=>{let s=n.EPDFPage_ApplyRedactions(e,t,i,a);return s&&(o=F1(r,a)>>>0),s})))throw new N(G.Unknown,"native redaction apply failed after preflight")}finally{for(let e of i)n.FPDFPage_CloseAnnot(e)}return{status:"applied",removed:o}}},gL=class{constructor(e,t){this.runtime=e,this.session=t}async read(e,t,n){hW(t);let{fn:r}=this.runtime,i=this.session.pagePool(),o=await i.acquireInSlices(e,t,n);try{hW(t);let n=r.FPDFText_LoadPage(o);if(!n)throw new N(G.RuntimeUnavailable,`FPDFText_LoadPage returned null for page object ${e}`);try{hW(t);let i=Math.max(r.FPDFText_CountChars(n),0),o=function(e,t,n){if(n<=0)return"";let{fn:r,mem:i}=e,o=2*n+1;return hY(i,2*o,e=>{let n=r.EPDFText_GetTextFull(t,e,o);return n<=1?"":function(e){let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength>>1),n="";for(let e=0;e{r.EPDFText_GetCharToTextMap(t,e,o);let n=i.readBytes(e,8*o),a=new Int32Array(n.buffer,n.byteOffset,2*o),s=Array(o);for(let e=0;ee)return`anchor ${t} char ${o} outside [1, ${e}]`;let s=a-(i+(o-r-1));if(0!==s&&2!==s)return`anchor ${t} implies a character contributing ${s} text units (expected 0 or 2)`;r=o,i=a}let o=i+(e-r);return o!==t?`map projects charCount to ${o}, but text length is ${t}`:null}(i,o.length,a);if(null!==s)throw new N(G.RuntimeUnavailable,`char map invariant violated for page object ${e}: ${s}`);return function(e){let{text:t,charCount:n}=e;if(!ng.test(t))return e;let r=e.charMap??[],i=[],o=[],a=0,s=0,l=0;for(let e=0;e=64976&&n<=65007||(65534&n)==65534)?"":e}(t.slice(s,n),t[n]);i.push(u),l+=u.length,1!==u.length&&o.push([e+1,l]),s=n}let u=i.join("");return o.length>0?{text:u,charCount:n,charMap:o}:{text:u,charCount:n}}(a.length>0?{text:o,charCount:i,charMap:a}:{text:o,charCount:i})}finally{r.FPDFText_ClosePage(n)}}finally{i.release(e)}}},g$=class{constructor(e,t){this.slices=e,this.signal=t,hJ(this,"started",performance.now())}get due(){return performance.now()-this.started>=this.slices.budgetMs}async pause(){await this.slices.between(),hW(this.signal),this.started=performance.now()}},gz=class{constructor(e,t){this.runtime=e,this.session=t}async read(e,t,n){hW(t);let{fn:r,mem:i}=this.runtime,o=this.session.pagePool(),a=await o.acquireInSlices(e,t,n);try{hW(t);let o=r.FPDFText_LoadPage(a);if(!o)throw new N(G.RuntimeUnavailable,`FPDFText_LoadPage returned null for page object ${e}`);try{hW(t);let a=Math.max(r.FPDFText_CountChars(o),0);if(0===a)return{runs:[]};let s=[],l=Math.min(a,4096),u=i.alloc(l*FQ.bytes);try{let d=new g$(n,t);for(let t=0;ta.getFloat32(e,!0),l=e=>eH({left:s(e),top:s(e+4),right:s(e+8),bottom:s(e+12)}),u=e=>({upperLeft:{x:s(e),y:s(e+4)},upperRight:{x:s(e+8),y:s(e+12)},lowerLeft:{x:s(e+16),y:s(e+20)},lowerRight:{x:s(e+24),y:s(e+28)}}),d=e.length>0?e[e.length-1].objectKey:null;for(let c=0;c+n<=t.byteLength;c+=n){let t=c+r.geometry,n=a.getUint32(c+r.objectRun,!0),f={objectKey:n,...function(e){let t=a.getUint32(e+i.flags,!0);if(t&o.empty)return{flags:2,looseBox:{left:0,bottom:0,right:0,top:0},upright:!0,baselineAngle:0,ascentFlip:!1};let n=!!(t&o.upright),r={flags:t&o.space?1:0,looseBox:l(e+i.looseBox),upright:n,baselineAngle:0,ascentFlip:!1};if(t&o.hasTightBox&&(r.tightBox=l(e+i.tightBox)),t&o.hasLooseQuad&&!n){r.looseQuad=u(e+i.looseQuad),t&o.hasTightQuad&&(r.tightQuad=u(e+i.tightQuad));let n=s(e+i.matrix),a=s(e+i.matrix+4),l=s(e+i.matrix+8),d=s(e+i.matrix+12);r.baselineAngle=Math.atan2(a,n),r.ascentFlip=n*d-a*l<0}return r}(t)};n!==d&&(f.fontSize=s(c+r.fontSize),d=n),e.push(f)}}(s,i.readBytes(u,c*FQ.bytes))}}finally{i.free(u)}return{runs:function(e){let t,n,r=[],i=[],o=0,a=null,s=e=>{i.length>0&&(r.push(function(e,t,n,r){if(r&&!r.upright){let i=e.map(e=>e.looseQuad?{loose:e.looseQuad,...e.tightQuad?{tight:e.tightQuad}:{},...gU(e.flags)}:{loose:{upperLeft:{x:0,y:0},upperRight:{x:0,y:0},lowerLeft:{x:0,y:0},lowerRight:{x:0,y:0}},...gU(e.flags)});return{rect:gV(e,e=>{var t;let n,r;return e.looseQuad?(n=[(t=e.looseQuad).upperLeft.x,t.upperRight.x,t.lowerLeft.x,t.lowerRight.x],r=[t.upperLeft.y,t.upperRight.y,t.lowerLeft.y,t.lowerRight.y],{left:Math.min(...n),right:Math.max(...n),bottom:Math.min(...r),top:Math.max(...r)}):gW}),start:t,glyphs:i,rotation:(-(180*r.baselineAngle)/Math.PI%360+360)%360,ascentFlip:r.ascentFlip,...void 0!==n?{fontSize:n}:{}}}let i=e.map(e=>({loose:e.looseBox,...e.tightBox?{tight:e.tightBox}:{},...gU(e.flags)}));return{rect:gV(e,e=>e.looseBox),start:t,glyphs:i,...void 0!==n?{fontSize:n}:{}}}(i,o,t,n)),i=[],n=void 0),o=e};for(let r=0;r=Math.abs(Math.atan2(Math.sin(n),Math.cos(n)))}(n,l)&&s(r),n||(n=l)),i.push(o)}return s(e.length),r}(s)}}finally{r.FPDFText_ClosePage(o)}}finally{o.release(e)}}};function gU(e){return{...1&e?{space:!0}:{},...2&e?{empty:!0}:{}}}function gV(e,t){let n=null;for(let r of e){if(2&r.flags)continue;let e=t(r);if(!n){n={left:e.left,bottom:e.bottom,right:e.right,top:e.top};continue}n.left=Math.min(n.left,e.left),n.bottom=Math.min(n.bottom,e.bottom),n.right=Math.max(n.right,e.right),n.top=Math.max(n.top,e.top)}return n??{...gW}}var gW={left:0,bottom:0,right:0,top:0};async function gq(e,t){let n=gH(e,t);if(!n)return null;try{return await t.draw(n.bitmapPtr,n.matrixPtr,n.clipPtr)?n.read():null}finally{n.free()}}function gH(e,t){var n,r,i;let{fn:o,mem:a}=e,{rect:s,page:l,rotation:u,viewport:d,background:c}=t;if(s.right<=s.left||s.top<=s.bottom)return null;let f=(n=s,r=l,{left:n.left-r.left,right:n.right-r.left,bottom:r.top-n.top,top:r.top-n.bottom}),{width:m,height:p}=function(e,t,n){var r;let i,o=90===t||270===t,a=o?e.height:e.width,s=o?e.width:e.height;if("width"===n.kind){if(!Number.isFinite(n.width)||n.width<=0)throw new N(G.InvalidArg,"render viewport width must be positive");let e=Math.max(1,Math.round(n.width));return{width:e,height:Math.max(1,Math.round(e*s/a))}}let l="dpi"===n.kind?(r=n.dpi,i=Math.max(e.width,e.height),r/72*Math.min(1,842/i,612/Math.min(e.width,e.height))):"thumbnail"===n.kind?512/Math.max(e.width,e.height):n.scale??1;if(!Number.isFinite(l)||l<=0)throw new N(G.InvalidArg,"render viewport scale must be positive");return{width:Math.max(1,Math.round(a*l)),height:Math.max(1,Math.round(s*l))}}({width:f.right-f.left,height:f.top-f.bottom},u,d);if(void 0!==t.maxOutputPixels&&m*p>t.maxOutputPixels)throw new N(G.InvalidArg,`render output ${m}x${p} exceeds the ${t.maxOutputPixels}-pixel budget \\u2014 request a smaller width (or tiles, once available)`);let h=4*m,F=h*p,g=null,_=null,P=null,D=null,b=()=>{_&&o.FPDFBitmap_Destroy(_),D&&a.free(D),P&&a.free(P),g&&a.free(g)};try{if(g=a.alloc(F),!(_=o.FPDFBitmap_CreateEx(m,p,4,g,h)))return b(),null;o.FPDFBitmap_FillRect(_,0,0,m,p,0xffffffff*("transparent"!==c)),P=a.alloc(24),function(e,t,n){for(let r=0;r<6;r++)e.poke(t,"f32",n[r],4*r)}(a,P,function(e,t,n,r){let{x:i,y:o}=e,a=e.width,s=e.height;switch(t){case 0:return[n/a,0,0,r/s,-n/a*i,-r/s*o];case 90:return[0,r/a,-n/s,0,n/s*(o+s),-r/a*i];case 180:return[-n/a,0,0,-r/s,n/a*(i+a),r/s*(o+s)];case 270:return[0,-r/a,n/s,0,-n/s*o,r/a*(i+a)]}}({x:(i=f).left,y:i.bottom,width:i.right-i.left,height:i.top-i.bottom},u,m,p)),D=a.alloc(16),a.poke(D,"f32",0,0),a.poke(D,"f32",0,4),a.poke(D,"f32",m,8),a.poke(D,"f32",p,12)}catch(e){throw b(),e}let y=g;return{bitmapPtr:_,matrixPtr:P,clipPtr:D,read:()=>{var e;let t;return{width:m,height:p,stride:h,color:"rgba8",premultipliedAlpha:!1,data:((t=new Uint8Array((e=a.readBytes(y,F)).byteLength)).set(e),t.buffer)}},free:b}}function gK(e,t){let{fn:n,mem:r}=e,i=hY(r,16,e=>n.FPDF_GetPageBoundingBox(t,e)?FX(r,e):null);return i?eH(i):{left:0,bottom:0,right:n.FPDF_GetPageWidthF(t),top:n.FPDF_GetPageHeightF(t)}}var gZ=class{constructor(e,t){this.runtime=e,this.session=t}async render(e,t,n,r){hW(n);let{fn:i}=this.runtime,o=this.session.pagePool(),a=await o.acquireInSlices(e,n,r);try{hW(n),function(e){let{usage:t,viewport:n}=e??{};if(void 0===t||"display"===t){if(n?.kind==="dpi"&&nl("viewport",\'a dpi viewport is only for a print picture (usage: "print")\'),n?.kind==="thumbnail"){e?.target!==void 0&&"page"!==e.target.kind&&nl("target","a thumbnail is the whole page: it takes no target");}return}for(let r of("print"!==t&&nl("usage",\'usage must be "display" or "print"\'),(n?.kind!=="dpi"||150!==n.dpi&&300!==n.dpi)&&nl("viewport","a print picture needs viewport: { kind: \'dpi\', dpi: 150 or 300 }"),["target","rotation","background"]))e?.[r]!==void 0&&nl(r,`a print picture takes no ${r}: it is the whole page, upright, on white`)}(t);let o="print"===t.usage,s=gK(this.runtime,a),l=function(e,t){if(!e||"page"===e.kind)return t;let n=eH(e.rect);if(!(n.right>n.left&&n.top>n.bottom))throw new N(G.InvalidArg,"render rect must have positive area");return n}(t.target,s),u=t.rotation??0,d=t.viewport??{kind:"scale",scale:1},c=function(e,t){let{includeAnnotations:n,includeFormFields:r}=e??{};if(!0===n&&!t.annotations)throw new na("doc.annotate.read","includeAnnotations");if(!0===r&&!t.formFields)throw new na("doc.forms.read","includeFormFields");return{includeAnnotations:n??t.annotations,includeFormFields:r??(!1!==n&&t.formFields)}}(t,{annotations:!0,formFields:!0}),f=16;c.includeAnnotations&&(f|=1),c.includeFormFields&&(f|=32768),o&&(f|=2048);let m=await gq(this.runtime,{rect:l,page:s,rotation:u,viewport:d,...void 0!==t.maxOutputPixels?{maxOutputPixels:t.maxOutputPixels}:{},background:"transparent"===t.background?"transparent":"white",draw:async(e,t,o)=>{hW(n);let s=i.EPDF_RenderPageBitmapWithMatrix_Start(e,a,t,o,f,r.budgetMs);try{for(;1===s;)await r.between(),hW(n),s=i.EPDF_RenderPage_Continue(a,r.budgetMs)}finally{i.FPDF_RenderPage_Close(a)}return 2===s}});if(!m)throw new N(G.RuntimeUnavailable,`failed to render page object ${e}`);return{raster:m,area:l}}finally{o.release(e)}}};function gJ(e,t){return{docPtr:e.requireDocPtr(),...t?{fonts:t}:{}}}function gQ(e,t){if(void 0===e.family)return e;let n=t.programOf?.(e.family),r=eU(e.family,t.describe),i={...e,family:r.family};return void 0!==r.weight&&void 0===e.weight&&(i.weight=r.weight),void 0!==r.italic&&void 0===e.italic&&(i.italic=r.italic),void 0!==n&&(i.program=n),i}function gX(e,t={}){let n=e.body?gQ(e.body,t):void 0;n&&void 0!==t.bodyProgram&&(n.program=t.bodyProgram);let r=e.paragraphs.map(e=>({...e,runs:e.runs.map(e=>({...e,text:e2(e.text,`\\r`),...e.style?{style:gQ(e.style,t)}:{}}))}));return JSON.stringify(n?{body:n,paragraphs:r}:{paragraphs:r})}function gY(e){let t;try{t=JSON.parse(e)}catch{return null}if(!t||"object"!=typeof t||!t.body||!Array.isArray(t.paragraphs))return null;let{source:n,...r}=t.body,i=g0(r),o=t.paragraphs.map(e=>{let{runs:t,...n}=e;return{...n,runs:(t??[]).map(e=>{let t="string"==typeof e.text?e2(e.text,`\n`):e.text;return e.style?{...e,text:t,style:g0(e.style)}:{...e,text:t}})}});return{source:t.source,document:{body:i,paragraphs:o}}}function g0(e){return"string"==typeof e.color?{...e,color:e.color.toLowerCase()}:e}function g1(e,t,n){let r=h2(t,(t,r)=>e.EPDFAnnot_GetRichTextJSON(n,t,r)),i=r?gY(r):null;if(i?.source!=="rc")return null;let{body:o,paragraphs:a}=i.document;return{body:{...o,family:o.family||e6.family},paragraphs:a}}function g3(e){let t=Math.fround(e);if(!Number.isFinite(t))return t;for(let e=1;e<9;e++){let n=Number(t.toPrecision(e));if(Math.fround(n)===t)return n}return t}var g2={invisible:1,hidden:2,print:4,noZoom:8,noRotate:16,noView:32,readOnly:64,locked:128,toggleNoView:256,lockedContents:512},g6=Object.keys(g2);function g5(e){let t={};for(let n of g6)void 0!==e[n]&&(t[n]=e[n]);return Object.keys(t).length>0?t:null}function g4(e){switch(e){case"square":return 1;case"circle":return 2;case"diamond":return 3;case"open-arrow":return 4;case"closed-arrow":return 5;case"butt":return 6;case"r-open-arrow":return 7;case"r-closed-arrow":return 8;case"slash":return 9;default:return 0}}function g8(e){switch(e){case 1:return"square";case 2:return"circle";case 3:return"diamond";case 4:return"open-arrow";case 5:return"closed-arrow";case 6:return"butt";case 7:return"r-open-arrow";case 8:return"r-closed-arrow";case 9:return"slash";default:return"none"}}function g7(e,t,n,r){return e.FPDFAnnot_HasKey(n,r)?h3(t,(t,i)=>e.FPDFAnnot_GetStringValue(n,r,t,i),""):null}function g9(e,t,n){return hY(t,16,r=>e.FPDFAnnot_GetRect(n,r)?FX(t,r):{left:0,bottom:0,right:0,top:0})}function _e(e,t,n,r=0){return h0(t,[4,4,4],([i,o,a])=>e.EPDFAnnot_GetColor(n,r,i,o,a)?e7(255&F1(t,i),255&F1(t,o),255&F1(t,a)):null)}function _t(e,t,n,r){return hY(t,4,i=>e.EPDFAnnot_GetBooleanValue(n,r,i)?0!==F1(t,i):null)}function _n(e,t,n){return hY(t,4,r=>e.EPDFAnnot_GetOpacity(n,r)?g3(F0(t,r)):null)}function _r(e,t,n){return hY(t,4,r=>({styleCode:e.EPDFAnnot_GetBorderStyle(n,r),width:F0(t,r)}))}function _i(e,t,n){return hY(t,4,r=>{if(!e.EPDFAnnot_GetBorderEffect(n,r))return null;let i=F0(t,r);return i>0?i:null})}function _o(e,t,n){let r=e.FPDFAnnot_GetVertices(n,0n,0);return r<=0?[]:hY(t,8*r,i=>{let o=e.FPDFAnnot_GetVertices(n,i,r);if(o<=0)return[];let a=[];for(let e=0;e{let a=e.FPDFAnnot_GetInkListPath(n,o,i,r);if(a<=0)return[];let s=[];for(let e=0;e0&&i.push(a)}return i}function _s(e,t,n){return h0(t,[8,8],([r,i])=>e.FPDFAnnot_GetLine(n,r,i)?{start:{x:F0(t,r,0),y:F0(t,r,4)},end:{x:F0(t,i,0),y:F0(t,i,4)}}:null)}function _l(e,t,n){return h0(t,[4,4],([r,i])=>e.EPDFAnnot_GetLineEndings(n,r,i)?{start:g8(F1(t,r)),end:g8(F1(t,i))}:{start:"none",end:"none"})}function _u(e,t,n){return h0(t,[4,4,4,4,4],([r,i,o,a,s])=>e.EPDFAnnot_GetDefaultAppearance(n,r,i,o,a,s)?{fontCode:F1(t,r),fontSize:F0(t,i),color:e7(255&F1(t,o),255&F1(t,a),255&F1(t,s))}:null)}function _d(e,t,n){return h0(t,[4,4],([r,i])=>{let o=h3(t,(t,o)=>e.EPDFAnnot_GetDefaultAppearanceFontFace(n,t,o,r,i),null);return o?{family:o,weight:F1(t,r),italic:0!==F1(t,i)}:null})}function _c(e,t){return e.EPDFAnnot_GetTextAlignment(t)}function _f(e,t,n){let r=e.EPDFAnnot_GetIntent(n,0n,0);if(r<=0)return null;let i=(r+1)*2;return hY(t,i,r=>(e.EPDFAnnot_GetIntent(n,r,i),t.readU16String(r)))}function _m(e,t,n){let r=e.FPDFAnnot_CountAttachmentPoints(n);return r<=0?[]:hY(t,32,i=>{let o=[];for(let a=0;aF0(t,i,e);o.push(function(e){let[t,n,r,i]=e;if(eZ(e))return{upperLeft:t,upperRight:n,lowerLeft:r,lowerRight:i};if(eZ([t,n,i,r]))return{upperLeft:t,upperRight:n,lowerLeft:i,lowerRight:r};let o=e.map(e=>eK(e)?e:{x:0,y:0}),a=o.reduce((e,t)=>e+t.x,0)/4,s=o.reduce((e,t)=>e+t.y,0)/4,l=[...o].sort((e,t)=>Math.atan2(e.y-s,e.x-a)-Math.atan2(t.y-s,t.x-a)),u=0;for(let e=1;e<4;e++)l[e].y+l[(e+1)%4].y>l[u].y+l[(u+1)%4].y&&(u=e);let d=[l[u],l[(u+1)%4]],c=[l[(u+3)%4],l[(u+2)%4]];return d[0].x<=d[1].x?{upperLeft:d[0],upperRight:d[1],lowerLeft:c[0],lowerRight:c[1]}:{upperLeft:d[1],upperRight:d[0],lowerLeft:c[1],lowerRight:c[0]}}([{x:r(0),y:r(4)},{x:r(8),y:r(12)},{x:r(16),y:r(20)},{x:r(24),y:r(28)}]))}return o})}function _p(e,t,n){return h2(t,(t,r)=>e.EPDFAnnot_GetName(n,t,r))}function _h(e,t,n){return h2(t,(t,r)=>e.EPDFAnnot_GetAppearanceState(n,t,r))}function _F(e){let t=g3((-g3(e)%360+360)%360+0);return 0===t||360===t?void 0:t}function _g(e){let t=(-e%360+360)%360+0;return t>180?t-360:t}var __=new Set([5,6,3,13,14]),_P=[90,180,270],_D=e=>(e%360+360)%360;function _b(e,t){let n=Math.abs(_D(e)-_D(t));return Math.min(n,360-n)}function _y(e,t,n){if(!e.EPDFAnnot_HasEmbedMetadata(n))return;let r=hY(t,4,r=>e.EPDFAnnot_GetEmbedMetadataNumber(n,"Rotation",r)?_D(F0(t,r)):void 0);if(void 0===r||.01>_b(r,0))return;let i=hY(t,16,r=>e.EPDFAnnot_GetEmbedMetadataRect(n,"UnrotatedRect",r)?eH(FX(t,r)):void 0);if(i&&!(i.right<=i.left)&&!(i.top<=i.bottom))return{degrees:r,box:i}}function _w(e,t,n){let r=eH(g9(e,t,n)),i=h0(t,[4,4,4,4],([r,i,o,a])=>e.EPDFAnnot_GetRectangleDifferences(n,r,i,o,a)?{left:F0(t,r),bottom:F0(t,i),right:F0(t,o),top:F0(t,a)}:null);if(!i)return r;let o={left:r.left+i.left,bottom:r.bottom+i.bottom,right:r.right-i.right,top:r.top-i.top};return o.left<=o.right&&o.bottom<=o.top?o:r}function _E(e,t,n){let r=function(e,t,n){let r=e.FPDFAnnot_GetSubtype(n);if(!__.has(r))return;let i=function(e,t,n){if(e.FPDFAnnot_HasKey(n,"Rotate"))return hY(t,4,r=>e.EPDFAnnot_GetRotate(n,r)?F0(t,r):void 0)}(e,t,n),o=hY(t,16,r=>hY(t,24,o=>{if(!e.EPDFAnnot_GetAppearanceTransform(n,r,o))return;let a={a:F0(t,o,0),b:F0(t,o,4),c:F0(t,o,8),d:F0(t,o,12),e:F0(t,o,16),f:F0(t,o,20)},s=function(e){let t=Math.hypot(e.a,e.b);if(!(t>0))return;let n=.002*t;if(Math.abs(e.a-e.d)>n||Math.abs(e.b+e.c)>n)return;let r=_D(180*Math.atan2(e.b,e.a)/Math.PI);return _b(r,0)>.05?r:void 0}(a);if(void 0===s)return;let l=eH(FX(t,r)),u=Math.hypot(a.a,a.b),d=(l.left+l.right)/2,c=(l.bottom+l.top)/2,f=a.a*d+a.c*c+a.e,m=a.b*d+a.d*c+a.f,p=(l.right-l.left)*u/2,h=(l.top-l.bottom)*u/2;return{degrees:void 0!==i&&.05>=_b(i,s)?_D(i):Math.round(100*s)/100,box:{left:f-p,bottom:m-h,right:f+p,top:m+h}}})),a=_w(e,t,n),s=3===r,l=s&&void 0!==i?_P.find(e=>.05>=_b(i,e)):void 0,u=_y(e,t,n);if(u&&eY(eJ(u.box,u.degrees),a)&&(o?.05>=_b(o.degrees,u.degrees):!e.EPDFAnnot_HasAppearanceStream(n,0)||s&&(e.FPDFAnnot_HasKey(n,"CL")||void 0!==l&&.05>=_b(l,u.degrees))))return u;if(o)return o;if(void 0===l)return;if(180===l)return{degrees:l,box:a};let d=(a.left+a.right)/2,c=(a.bottom+a.top)/2,f=(a.top-a.bottom)/2,m=(a.right-a.left)/2;return{degrees:l,box:{left:d-f,bottom:c-m,right:d+f,top:c+m}}}(e,t,n);if(!r)return;let i=_F(r.degrees);return void 0===i?void 0:{rotation:i,box:r.box}}function _A(e,t,n){let r=_E(e,t,n);return r?{box:r.box,rotation:r.rotation}:{box:_w(e,t,n),rotation:null}}var _v="Replace",_S="StrikeOutTextEdit";function _k(e){if("replace"===e)return _v}function _x(e){if("strikeout-text-edit"===e)return _S}function _G(e,t,n,r){let i=t.writeU16String(r.key);try{return e.EPDFDoc_GetAttachmentIndexByKey(n,i)}finally{t.free(i)}}function _O(e,t,n,r,i,o){let a=o.bytes.byteLength;if(0===a){if(!e.FPDFAttachment_SetFile(n,r,0n,0))throw new N(G.Unknown,"FPDFAttachment_SetFile returned false")}else{let i=t.alloc(a);try{if(t.writeBytes(i,new Uint8Array(o.bytes)),!e.FPDFAttachment_SetFile(n,r,i,a))throw new N(G.Unknown,"FPDFAttachment_SetFile returned false")}finally{t.free(i)}}if(h6(t,hH(new Date),t=>e.FPDFAttachment_SetStringValue(n,"CreationDate",t)),i.mimeType&&!e.EPDFAttachment_SetSubtype(n,i.mimeType))throw new N(G.Unknown,"EPDFAttachment_SetSubtype returned false");if(void 0!==i.description&&!h6(t,i.description,t=>e.EPDFAttachment_SetDescription(n,t)))throw new N(G.Unknown,"EPDFAttachment_SetDescription returned false")}function _I(e,t,n){let r=h3(t,(t,r)=>e.FPDFAttachment_GetName(n,t,r))??"",i=h3(t,(t,r)=>e.FPDFAttachment_GetSubtype(n,t,r)),o=h3(t,(t,r)=>e.EPDFAttachment_GetDescription(n,t,r)),a=_M(e,t,n,"CreationDate"),s=_M(e,t,n,"ModDate"),l=function(e){if(!e)return null;let t=e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1):e;return/^[0-9a-fA-F]+$/.test(t)?t.toLowerCase():e}(_j(e,t,n,"CheckSum"));return{name:r,mimeType:i||null,description:o||null,sizeBytes:function(e,t,n){let r=t.alloc(4);try{if(!e.EPDFAttachment_GetIntegerValue(n,"Size",r))return null;let i=Number(t.peek(r,"i32"));return i>=0?i:null}finally{t.free(r)}}(e,t,n),md5:l||null,createdAt:a||null,modifiedAt:s||null}}function _N(e,t,n){let{fn:r,mem:i}=e,o=i.alloc(8),a=i.alloc(4),s=i.alloc(4),l=null;try{if(i.poke(o,"ptr",0),i.poke(a,"i32",0),i.poke(s,"i32",-1),!r.EPDFAttachment_ExtractFileToOwnedBuffer(t,BigInt(n??0),o,a,s))throw _C(Number(i.peek(s,"i32")),n);let e=Number(i.peek(a,"i32"))>>>0;if(l=i.peek(o,"ptr"),0===e||!l)return{bytes:new ArrayBuffer(0),size:0};let u=i.readBytes(l,e),d=new ArrayBuffer(u.byteLength);return new Uint8Array(d).set(u),{bytes:d,size:e}}finally{l&&r.EPDF_FreeBuffer(l),i.free(s),i.free(a),i.free(o)}}function _C(e,t){switch(e){case 1:return new N(G.InvalidArg,"attachment has no embedded file stream (missing /EF)");case 2:return new N(G.MalformedPdf,"embedded file stream failed to decode");case 3:return new N(G.PayloadTooLarge,`the embedded file decodes to more than ${t} bytes, the limit`,{details:{limit:t}});case 4:return new N(G.Unknown,"writing the extracted attachment failed");default:return new N(G.Unknown,`attachment extraction failed (status ${e})`)}}function _j(e,t,n,r){return e.FPDFAttachment_HasKey(n,r)?h3(t,(t,i)=>e.FPDFAttachment_GetStringValue(n,r,t,i),null):null}function _M(e,t,n,r){let i=_j(e,t,n,r);return i?hq(i):null}var _R=Object.freeze({comment:"Comment",key:"Key",note:"Note",help:"Help","new-paragraph":"NewParagraph",paragraph:"Paragraph",insert:"Insert"}),_T=Object.freeze(Object.fromEntries(Object.entries(_R).map(([e,t])=>[t,e]))),_B=Object.freeze({graph:"Graph","push-pin":"PushPin",paperclip:"Paperclip",tag:"Tag"}),_L=Object.freeze(Object.fromEntries(Object.entries(_B).map(([e,t])=>[t,e]))),_$={"free-text":"FreeText","free-text-callout":"FreeTextCallout","free-text-typewriter":"FreeTextTypeWriter"};function _z(e){return Object.entries(_$).find(([,t])=>t===e)?.[0]??"free-text"}var _U={courier:0,"courier-bold":1,"courier-bold-oblique":2,"courier-oblique":3,helvetica:4,"helvetica-bold":5,"helvetica-bold-oblique":6,"helvetica-oblique":7,"times-roman":8,"times-bold":9,"times-bold-italic":10,"times-italic":11,symbol:12,"zapf-dingbats":13},_V=Object.fromEntries(Object.entries(_U).map(([e,t])=>[t,e])),_W="helvetica";function _q(e){return _V[e]??"helvetica"}function _H(e){switch(e){case"center":return 1;case"right":return 2;default:return 0}}function _K(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}}var _Z=["top","middle","bottom"];function _J(e,t,n,r,i){let o=i?.keyForFace(r.family,r.weight,r.italic);if(void 0!==o)return o;let a=function(e){let t;if(void 0!==t)return t;let n=eW[eV(e.family)];if(n){let t=Object.entries(ez),r=e.weight>=600,i=t.find(([,t])=>t.family===n&&t.weight>=600===r&&t.italic===e.italic)??t.find(([,e])=>e.family===n);if(i)return i[0]}return e.family}(r);if(Z.includes(a))return a;let s=_d(e,t,n);if(s&&eV(s.family)===eV(r.family)&&s.weight===r.weight&&s.italic===r.italic){let r=h2(t,(t,r)=>e.EPDFAnnot_GetDefaultAppearanceFontPostScriptName(n,t,r));if(r)return r}return aA({familyName:r.family,weight:r.weight,italic:r.italic},null)}function _Q(e,t,n,r){let i=e.EPDFAnnot_GetEmbedMetadataString(n,r,0n,0);if(i<=2)return;let o=t.alloc(i);try{if(0>=e.EPDFAnnot_GetEmbedMetadataString(n,r,o,i))return;return t.readU16String(o)}finally{t.free(o)}}function _X(e,t,n,r){let i=t.alloc(4);try{if(!e.EPDFAnnot_GetEmbedMetadataNumber(n,r,i))return;return Number(t.peek(i,"f32"))}finally{t.free(i)}}function _Y(e){switch(e){case"dashed":return 2;case"beveled":return 3;case"inset":return 4;default:return 1}}function _0(e){switch(e){case 2:return"dashed";case 3:return"beveled";case 4:return"inset";default:return"solid"}}function _1(e){return 5===e?"underline":_0(e)}function _3(e,t,n){let r,{styleCode:i,width:o}=_r(e,t,n),a=(r=e.EPDFAnnot_GetBorderDashPatternCount(n))<=0?[]:hY(t,4*r,i=>{if(!e.EPDFAnnot_GetBorderDashPattern(n,i,r))return[];let o=[];for(let e=0;e0?a:null}}function _2(e,t,n){let r=_e(e,t,n,0),i=_n(e,t,n);return{color:r,opacity:null==i?1:Math.max(0,Math.min(1,i)),..._3(e,t,n)}}function _6(e,t,n){let r=_e(e,t,n,1);return{..._2(e,t,n),interiorColor:r??null}}function _5(e,t,n,r){let i=r.flat();if(0===i.length)return;let o=function(e,t,n){let r=function(e,t,n){if(e.EPDFAnnot_HasEmbedMetadata(n))return hY(t,4,r=>{if(e.EPDFAnnot_GetEmbedMetadataNumber(n,"Rotation",r))return _F(F0(t,r))})}(e,t,n);if(void 0===r)return;let i=hY(t,16,r=>e.EPDFAnnot_GetEmbedMetadataRect(n,"UnrotatedRect",r)?eH(FX(t,r)):void 0);return i?{rotation:r,box:i}:void 0}(e,t,n);if(!o)return;let{box:a}=o,s={degrees:o.rotation,center:{x:(a.left+a.right)/2,y:(a.bottom+a.top)/2}};return eY(e0(i.map(e=>e3(e,s))),a)?s:void 0}var _4=(e,t)=>t?e3(e,t):e;function _8(e){if("ink-highlight"===e)return"InkHighlight"}var _7={"line-arrow":"LineArrow","line-dimension":"LineDimension","polygon-cloud":"PolygonCloud","polygon-dimension":"PolygonDimension","polyline-dimension":"PolyLineDimension"};function _9(e,t,n){return{measure:ga(e,t,e.EPDFAnnot_GetMeasure(n))??null}}function Pe(e,t,n){return h0(t,[4,4,8],([r,i,o])=>{if(!e.EPDFAnnot_GetShapeCaption(n,r,i,o))return;let a=!!t.peek(r,"i32"),s=!!t.peek(i,"i32");if(e.EPDFAnnot_GetEmbedMetadataBoolean(n,"MeasurementCaption",r)||s)return{enabled:a,...s?{center:{x:Number(t.peek(o,"f32")),y:Number(t.peek(o,"f32",4))}}:{}}})}var Pt={start:{x:0,y:0},end:{x:0,y:0}};function Pn(e,t,n,r){var i,o,a,s,l;let u,d,c=r.page.objectNumber,f="xyz"===r.kind?e.EPDFDest_CreateXYZByObjectNumber(n,c,null!=r.left,r.left??0,null!=r.top,r.top??0,null!=r.zoom,r.zoom??0):(i=e,o=t,a=n,s=c,l=r,u=(()=>{switch(l.kind){case"fitH":case"fitBH":return null!=l.top?[l.top]:[];case"fitV":case"fitBV":return null!=l.left?[l.left]:[];case"fitR":return[l.left,l.bottom,l.right,l.top];default:return[]}})(),d=F3[l.kind],u.length?hY(o,4*u.length,e=>{for(let t=0;t[t,e]))}function PS(e,t,n,r="#000000"){let i=_e(e,t,n)??r,o=_n(e,t,n);return{color:i,opacity:null==o?1:Math.max(0,Math.min(1,o)),quadPoints:_m(e,t,n),richText:g1(e,t,n)}}function Pk(e,t,n){let r=_o(e,t,n),i=_5(e,t,n,[r]),o=Pe(e,t,n);return{vertices:r.map(e=>_4(e,i)),rotation:i?.degrees??null,captionEnabled:o?.enabled??null,captionCenter:o?.center?_4(o.center,i):null}}var Px=["caption","image","caption-below","caption-above","caption-right","caption-left","caption-over"];function PG(e,t,n,r){return h0(t,[4,4,4],([i,o,a])=>e.EPDFAnnot_GetMKColor(n,r,i,o,a)?e7(255&F1(t,i),255&F1(t,o),255&F1(t,a)):null)}function PO(e,t){return eQ(-e.EPDFAnnot_GetMKRotation(t))||null}var PI={highlight:function(e,t,n,r){let i=PS(e,t,n,"#ffff00");return{...r,subtype:"highlight",...i}},underline:function(e,t,n,r){let i=PS(e,t,n);return{...r,subtype:"underline",...i}},squiggly:function(e,t,n,r){let i=PS(e,t,n);return{...r,subtype:"squiggly",...i}},strikeout:function(e,t,n,r){let i=PS(e,t,n),o=_f(e,t,n)===_S?"strikeout-text-edit":null;return{...r,subtype:"strikeout",intent:o,...i}},circle:function(e,t,n,r){return{...r,subtype:"circle",...Pu(e,t,n)}},square:function(e,t,n,r){return{...r,subtype:"square",...Pu(e,t,n)}},polygon:function(e,t,n,r){let{captionEnabled:i,captionCenter:o,...a}=Pk(e,t,n),s=_f(e,t,n);return{...r,richText:g1(e,t,n),..._9(e,t,n),captionEnabled:i,captionCenter:o,intent:"PolygonCloud"===s?"polygon-cloud":"PolygonDimension"===s?"polygon-dimension":null,subtype:"polygon",..._6(e,t,n),...a,cloudyIntensity:_i(e,t,n)}},polyline:function(e,t,n,r){let{captionEnabled:i,captionCenter:o,...a}=Pk(e,t,n),s=_f(e,t,n);return{...r,richText:g1(e,t,n),..._9(e,t,n),captionEnabled:i,captionCenter:o,intent:"PolyLineDimension"===s?"polyline-dimension":null,subtype:"polyline",..._6(e,t,n),...a,lineEndings:_l(e,t,n)}},line:function(e,t,n,r){let i=_s(e,t,n)??Pt,o=_5(e,t,n,[[i.start,i.end]]),a=_f(e,t,n),s=function(e,t,n){if(["Cap","CP","CO"].some(t=>e.FPDFAnnot_HasKey(n,t)))return h0(t,[4,4,8],([r,i,o])=>{if(e.EPDFAnnot_GetLineCaption(n,r,i,o))return{enabled:!!t.peek(r,"i32"),position:1===t.peek(i,"i32")?"top":"inline",...e.FPDFAnnot_HasKey(n,"CO")?{offset:{along:Number(t.peek(o,"f32")),perpendicular:Number(t.peek(o,"f32",4))}}:{}}})}(e,t,n),l=function(e,t,n){if(["LL","LLE","LLO"].some(t=>e.FPDFAnnot_HasKey(n,t)))return h0(t,[4,4,4],([r,i,o])=>{if(e.EPDFAnnot_GetLineLeader(n,r,i,o))return{length:Number(t.peek(r,"f32")),extension:Number(t.peek(i,"f32")),offset:Number(t.peek(o,"f32"))}})}(e,t,n);return{...r,richText:g1(e,t,n),..._9(e,t,n),intent:"LineArrow"===a?"line-arrow":"LineDimension"===a?"line-dimension":null,captionEnabled:s?.enabled??!1,captionPosition:s?.position??"inline",captionOffset:s?.offset??null,leader:l??null,subtype:"line",..._6(e,t,n),linePoints:{start:_4(i.start,o),end:_4(i.end,o)},lineEndings:_l(e,t,n),rotation:o?.degrees??null}},link:function(e,t,n,r,i,o){return{...r,subtype:"link",target:function(e,t,n,r,i){let o=r.actions?.activate;if(o)return Pr(o);let a=e.FPDFAnnot_GetLink(n);if(!a)return null;let s=e.FPDFLink_GetDest(i.docPtr,a);if(!s)return null;let l=F2(e,t,i.docPtr,s);return l?{kind:"goto",destination:l}:{kind:"unsupported"}}(e,t,n,r,o)}},ink:function(e,t,n,r){let i=_a(e,t,n),o=_5(e,t,n,i),a="InkHighlight"===_f(e,t,n)?"ink-highlight":null;return{...r,richText:g1(e,t,n),subtype:"ink",..._2(e,t,n),intent:a,inkList:i.map(e=>e.map(e=>_4(e,o))),rotation:o?.degrees??null}},"free-text":function(e,t,n,r,i,o){var a;let s,l,u=_u(e,t,n),d=u?.color??"#000000",c=(s=h2(t,(t,r)=>e.EPDFAnnot_GetRichTextJSON(n,t,r)))?gY(s)?.document??null:null,f=o?.fonts,m=c?_J(e,t,n,c.body,f):u?_q(u.fontCode):_W,p=c&&c.body.size>0?c.body.size:u&&u.fontSize>0?u.fontSize:12,h=c??{body:{family:"Helvetica",weight:400,italic:!1,size:p,color:d,decoration:[],script:"normal",letterSpacing:0,horizontalScale:1,align:"left",dir:"ltr"},paragraphs:[{runs:[{text:r.contents??""}]}]},F=h.body.color.toLowerCase(),g=_e(e,t,n,0),_=_n(e,t,n),P=null==_?1:Math.max(0,Math.min(1,_)),D=c?c.body.align:_K(_c(e,n)),b=void 0!==(a=_X(e,t,n,"VerticalAlignment"))&&_Z[a]||"top",y=_z(_f(e,t,n)),w=(l=e.EPDFAnnot_GetCalloutLineCount(n))<=0?[]:hY(t,8*l,r=>{let i=e.EPDFAnnot_GetCalloutLine(n,r,l);if(i<=0)return[];let o=[];for(let e=0;ee.EPDFAnnot_GetMKText(n,0,t,r)),checkStyle:null,layout:Px[e.EPDFAnnot_GetMKTextPosition(n)]??"caption",field:null,fieldKind:"unknown",hasMark:0!==e.EPDFAnnot_GetDrawing(n)}},redact:function(e,t,n,r,i,o){let a=_e(e,t,n,0)??"#ff0000",s=_n(e,t,n),l=null==s?1:Math.max(0,Math.min(1,s)),u=_e(e,t,n,1)??null,d=_u(e,t,n),c=d?_d(e,t,n):null,f=o?.fonts,m=c?.family?_J(e,t,n,c,f):d?_q(d.fontCode):_W,p=d?d.fontSize:12,h=d?.color??"#000000";return{...r,richText:g1(e,t,n),subtype:"redact",quadPoints:_m(e,t,n),color:a,opacity:l,interiorColor:u,overlayText:e.FPDFAnnot_HasKey(n,"OverlayText")?h3(t,(t,r)=>e.EPDFAnnot_GetOverlayText(n,t,r),""):null,repeat:e.EPDFAnnot_GetOverlayTextRepeat(n),fontFamily:m,fontSize:p,fontColor:h,textAlign:_K(_c(e,n))}},popup:function(e,t,n,r,i,o){return{...r,subtype:"popup",parent:Ps(e,t,o.docPtr,n,"Parent",r.page.objectNumber),open:_t(e,t,n,"Open")??!1}},unsupported:function(e,t,n,r,i){let o=g7(e,t,n,"Subtype");return{...r,subtype:"unsupported",rawSubtypeCode:i,rawSubtypeName:o}}};function PN(e){let t=rN(e),n=PI[t];return n?{reader:n,subtype:t}:{reader:PI.unsupported,subtype:"unsupported"}}function PC(e,t,n){let r=(n.next??[]).map(n=>PC(e,t,n)),i=function(e,t,n){let{fn:r,mem:i}=e,o=(()=>{switch(n.type){case"javascript":return h5(i,n.script,e=>r.EPDFAction_CreateJavaScript(t,e));case"goto":return r.EPDFAction_CreateGoTo(t,Pn(r,i,t,n.destination));case"uri":return r.EPDFAction_CreateURI(t,n.uri);case"named":return r.EPDFAction_CreateNamed(t,n.name);case"hide":return Pj(e,n.targets,(e,i)=>r.EPDFAction_CreateHide(t,e,i,n.hide));case"reset-form":return Pj(e,n.fields??[],(e,i)=>r.EPDFAction_CreateResetForm(t,e,n.fields?i:-1,n.exclude));case"submit-form":return h5(i,n.url,i=>Pj(e,n.fields??[],(e,o)=>r.EPDFAction_CreateSubmitForm(t,i,e,n.fields?o:-1,M(n))))}})();if(!o)throw new N(G.InvalidArg,`the ${n.type} action could not be written`);return o}(e,t,n);if(r.length>0&&!gc(e,r,(n,r)=>e.fn.EPDFAction_SetNext(t,i,n,r)))throw new N(G.Unknown,`the ${n.type} action\'s next ones could not be set`);return i}function Pj(e,t,n){let{mem:r}=e,i=8+gu(e),o=t.map(e=>"name"===e.kind?r.writeU16String(e.name):null);try{return hY(r,Math.max(1,t.length*i),a=>(t.forEach((t,n)=>{let s=n*i,l=o[n];r.poke(a,"i32",+!l,s),r.poke(a,"i32","objectNumber"===t.kind?t.objectNumber:0,s+4),gd(e,a,s+8,l??0n)}),n(a,t.length)))}finally{for(let e of o)e&&r.free(e)}}function PM(e,t,n,r){z.forEach((i,o)=>{let a=null===r?null:r[i];if(void 0===a)return;let s=null===a?0n:PC(e,t,a);if(!e.fn.EPDFAnnot_SetEventAction(n,o,s))throw new N(G.Unknown,`the widget\'s ${i} action could not be written`)})}var PR=class{constructor(e,t){this.runtime=e,this.docPtr=t,hJ(this,"indexes",null)}indexOf(e){if(!this.indexes){let{fn:e}=this.runtime,t=new Map,n=e.FPDF_GetPageCount(this.docPtr);for(let r=0;r0&&!t.has(n)&&t.set(n,r)}this.indexes=t}return this.indexes.get(e)??-1}};function PT(e,t,n,r){let{fn:i}=e;return n.some(n=>PB(e,t,n,r,e=>0!==i.EPDFAnnot_GetMKIcon(e,0))??!1)}function PB(e,t,n,r,i){let{fn:o}=e;if(!n.page||n.objectNumber<=0)return null;let a=r.indexOf(n.page.objectNumber);if(a<0)return null;let s=o.EPDFPage_GetAnnotIndexByObjectNumberRaw(t,a,n.objectNumber);if(s<0)return null;let l=o.EPDFPage_GetAnnotRaw(t,a,s);if(!l)return null;try{return i(l)}finally{o.FPDFPage_CloseAnnot(l)}}var PL=e=>z.indexOf(e),P$={root:null,incomplete:!0,warnings:["incomplete"]};function Pz(e,t,n,r){let{fn:i,mem:o}=e;return n.map(n=>PB(e,t,n,r,e=>{let n=new F4,r={};for(let a of["activate","mouseUp"]){let s=i.EPDFAnnot_GetActionModel(e,PL(a));try{let e=F8(i,o,t,s,n);e&&(r[a]=e)}catch(e){if(!N.is(e)||e.code!==G.MalformedPdf)throw e;r[a]=P$}}return r}))}function PU(e,t,n,r){let{fn:i}=e,o=gj(e,t,n);try{if(i.EPDFAnnot_GetMKIcon(o,0)===r)return;if(!(0===r?i.EPDFAnnot_ClearMKIcon(o,0):i.EPDFAnnot_SetMKIcon(o,0,r)))throw new N(G.Unknown,"the push button\'s icon (/MK /I) could not be written");if(!i.EPDFAnnot_GenerateFormFieldAP(o))throw new N(G.Unknown,"the push button\'s look could not be drawn")}finally{i.FPDFPage_CloseAnnot(o)}}function PV(e,t,n){let r=gj(e,t,n);try{return e.fn.EPDFAnnot_GetMKIcon(r,0)}finally{e.fn.FPDFPage_CloseAnnot(r)}}var PW="GroupID",Pq="ForAnyone",PH="Purpose",PK="Placeholder",PZ="CreatedBy",PJ="CreatedAt",PQ="ImportedBy",PX={createdBy:null,createdAt:null,importedBy:null};function PY(e,t,n){let{fn:r,mem:i}=e;return r.EPDFForm_HasFieldEmbedMetadata(t,n)?h3(i,(e,i)=>r.EPDFForm_GetFieldEmbedMetadataString(t,n,PW,e,i),null):null}function P0(e,t,n){let r=PY(e,t,n);return null!==r?{kind:"group",groupId:r}:7!==e.fn.EPDFForm_GetFieldFamily(t,n)&&P1(e,t,n)?{kind:"anyone"}:{kind:"unassigned"}}function P1(e,t,n){let{fn:r,mem:i}=e;return!!r.EPDFForm_HasFieldEmbedMetadata(t,n)&&hY(i,4,e=>r.EPDFForm_GetFieldEmbedMetadataBoolean(t,n,Pq,e)&&0!==i.peek(e,"i32"))}function P3(e,t,n,r){if(P2(e,t,n,[]),!r)return void P6(e,t,n,Pq);if(!e.fn.EPDFForm_SetFieldEmbedMetadataBoolean(t,n,Pq,!0))throw P5(n)}function P2(e,t,n,r){let{fn:i,mem:o}=e;if(!i.EPDFForm_SetFieldEmbedMetadataNumber(t,n,"SchemaVersion",1))throw P5(n);for(let[a,s]of r){if(null===s){P6(e,t,n,a);continue}let r=o.writeU16String(s);try{if(!i.EPDFForm_SetFieldEmbedMetadataString(t,n,a,r))throw P5(n)}finally{o.free(r)}}}function P6(e,t,n,r){if(!e.fn.EPDFForm_ClearFieldEmbedMetadataKey(t,n,r))throw P5(n)}function P5(e){return new N(G.Unknown,`the metadata of field ${e} could not be written`)}var P4={0:"unknown",1:"pushbutton",2:"checkbox",3:"radio",4:"text",5:"combobox",6:"listbox",7:"signature"},P8={0:"none",1:"acroform",2:"xfa"};function P7(e,t){return h3(e.mem,t)??""}function P9(e,t){return h3(e.mem,t,null)}function De(e,t,n,r){let{fn:i}=e;return eR(i.EPDFForm_GetFieldWidgetObjNum(t,n,r),Dl(i.EPDFForm_GetFieldWidgetPageObjNum(t,n,r)))}function Dt(e,t,n){let{fn:r}=e,i=r.EPDFForm_CountFieldWidgets(t,n),o=[];for(let a=0;ar.EPDFForm_GetFieldWidgetOnState(t,n,a,e,i))??"",exportValue:P7(e,(e,i)=>r.EPDFForm_GetFieldWidgetExportValue(t,n,a,e,i)),checked:r.EPDFForm_IsFieldWidgetChecked(t,n,a)});return o}function Dn(e,t,n){let r=e.fn.EPDFForm_CountFieldWidgets(t,n),i=[];for(let o=0;or.EPDFForm_GetFieldOptionLabel(t,n,a,e,i)),value:P7(e,(e,i)=>r.EPDFForm_GetFieldOptionValue(t,n,a,e,i)),selected:r.EPDFForm_IsFieldOptionSelected(t,n,a)});return o}function Di(e,t,n,r,i,o=new F4,a=new PR(e,r)){var s,l;let{fn:u}=e,d=u.EPDFForm_GetFieldObjNum(t,n),c=P7(e,(e,r)=>u.EPDFForm_GetFieldName(t,n,e,r)),f=u.EPDFForm_GetFieldFlags(t,n),m=P4[u.EPDFForm_GetFieldFamily(t,n)]??"unknown",p=Da(e,t,n,!1),h=Da(e,t,n,!0),F=function(e,t,n,r,i){let{fn:o,mem:a}=e,s={};for(let[e,l]of[["keystroke",0],["format",1],["validate",2],["calculate",3]]){let u=F8(o,a,r,o.EPDFForm_GetFieldActionModel(t,n,l),i);u&&(s[e]=u)}return Object.keys(s).length>0?s:void 0}(e,t,n,r,o),g=P0(e,t,n),_={ref:d>0?{kind:"objectNumber",objectNumber:d}:{kind:"fqn",name:c},name:c,kind:m,origin:1===u.EPDFForm_GetFieldOrigin(t,n)?"recovered":"acroform",readOnly:(1&f)!=0,required:(2&f)!=0,noExport:(4&f)!=0,alternateName:P9(e,(e,r)=>u.EPDFForm_GetFieldAlternateName(t,n,e,r)),mappingName:P9(e,(e,r)=>u.EPDFForm_GetFieldMappingName(t,n,e,r)),valueEntry:p,defaultValueEntry:h,...F?{actions:F}:{},groupId:Y(g),assignment:g,lockedBy:null===(s=i?.(c)??null)?null:{signatureIndex:s.signatureIndex,source:s.source},purpose:function(e,t,n){let{fn:r,mem:i}=e;if(!r.EPDFForm_HasFieldEmbedMetadata(t,n))return null;let o=h3(i,(e,i)=>r.EPDFForm_GetFieldEmbedMetadataString(t,n,PH,e,i),null);return rC(o)?o:null}(e,t,n),placeholder:function(e,t,n){let{fn:r,mem:i}=e;if(!r.EPDFForm_HasFieldEmbedMetadata(t,n))return null;let o=h3(i,(e,i)=>r.EPDFForm_GetFieldEmbedMetadataString(t,n,PK,e,i),null);return eN(o)?o:null}(e,t,n),...function(e,t,n){let r,{fn:i,mem:o}=e;if(!i.EPDFForm_HasFieldEmbedMetadata(t,n))return PX;let a=e=>h3(o,(r,o)=>i.EPDFForm_GetFieldEmbedMetadataString(t,n,e,r,o),null);return{createdBy:a(PZ),createdAt:null===(r=a(PJ))?null:hq(r),importedBy:a(PQ)}}(e,t,n),filledBy:null,filledByName:null,filledAt:null,widgets:[]},P=Ds(p),D=Ds(h);switch(m){case"text":{let r=u.EPDFForm_GetFieldMaxLen(t,n);return{..._,kind:m,value:P,defaultValue:D,maxLength:r>0?r:null,multiline:(4096&f)!=0,password:(8192&f)!=0,comb:(0x1000000&f)!=0,format:eb(F),widgets:Dn(e,t,n)}}case"checkbox":{let r=Dt(e,t,n);return{..._,kind:m,checked:r.some(e=>e.checked),exportValue:r[0]?.exportValue??"Yes",hasValuesList:e.fn.EPDFForm_HasFieldValuesList(t,n),widgets:r}}case"radio":{let r=Dt(e,t,n);return{..._,kind:m,value:r.find(e=>e.checked)?.exportValue??"Off",radiosInUnison:(0x2000000&f)!=0,noToggleToOff:(16384&f)!=0,hasValuesList:e.fn.EPDFForm_HasFieldValuesList(t,n),widgets:r}}case"combobox":return{..._,kind:m,value:P,defaultValue:D,edit:(262144&f)!=0,options:Dr(e,t,n),format:eb(F),widgets:Dn(e,t,n)};case"listbox":{let r=Dr(e,t,n);return{..._,kind:m,selectedValues:r.filter(e=>e.selected).map(e=>e.value),defaultValue:"scalar"===(l=h).kind?[l.value]:"array"===l.kind?[...l.values]:[],multiSelect:(2097152&f)!=0,options:r,topIndex:iF(u.EPDFForm_GetFieldTopIndex(t,n),r),widgets:Dn(e,t,n)}}case"pushbutton":{let i=Dn(e,t,n);return{..._,kind:"pushbutton",hasImage:PT(e,r,i,a),takesImage:rW(Pz(e,r,i,a)),widgets:i}}case"signature":return{..._,kind:m,widgets:Dn(e,t,n)};default:return{..._,kind:"unknown",rawValue:"array"===p.kind?p.values.join(","):Ds(p),widgets:Dn(e,t,n)}}}function Do(e,t,n,r){let{fn:i}=e,o=i.EPDFForm_CountFields(t),a=[],s=new F4,l=new PR(e,n);for(let i=0;i=0&&nr?i.EPDFForm_GetFieldDefaultValueAt(t,n,o,e,a):i.EPDFForm_GetFieldValueAt(t,n,o,e,a)));return 1===o?{kind:"scalar",value:s[0]??""}:{kind:"array",values:s}}function Ds(e){return"scalar"===e.kind?e.value:"array"===e.kind?e.values[0]??"":""}function Dl(e){return e>0?q(e):null}var Du={check:"4",cross:"8",star:"H",circle:"l",square:"n",diamond:"u"};function Dd(e,t,n){for(let r of n){if("widget"!==r.subtype)continue;if("objectNumber"!==r.ref.kind){r.caption=null,r.layout=null,r.hasMark=!1;continue}let n=gv(e,t),i=e.fn.EPDFForm_GetFieldIndexForWidget(n,r.ref.objectNumber),o=i<0?0:e.fn.EPDFForm_GetFieldObjNum(n,i);if(o<=0){r.field=null,r.fieldKind="unknown",r.caption=null,r.layout=null,r.hasMark=!1;continue}r.field={kind:"objectNumber",objectNumber:o},r.fieldKind=P4[e.fn.EPDFForm_GetFieldFamily(n,i)]??"unknown",("checkbox"===r.fieldKind||"radio"===r.fieldKind)&&(r.checkStyle=function(e){return Object.keys(Du).find(t=>e?.[0]===Du[t])??null}(r.caption??null)),"pushbutton"!==r.fieldKind&&(r.caption=null,r.layout=null),r.hasMark="signature"===r.fieldKind&&(r.hasMark||0!==e.fn.EPDFForm_GetFieldValueKind(n,i))}}function Dc(e){return 20===e?"widgets":"annotations"}function Df(e){switch(e){case 1:return"multiply";case 2:return"screen";case 3:return"overlay";case 4:return"darken";case 5:return"lighten";case 6:return"color-dodge";case 7:return"color-burn";case 8:return"hard-light";case 9:return"soft-light";case 10:return"difference";case 11:return"exclusion";case 12:return"hue";case 13:return"saturation";case 14:return"color";case 15:return"luminosity";default:return"normal"}}function Dm(e,t,n,r,i,o,a=new F4){let s,l=q(i),u=g9(e,t,r),d=function(e,t){var n=e.FPDFAnnot_GetFlags(t);if(0===n)return{...J};let r={...J};for(let e of g6)r[e]=(n&g2[e])!=0;return r}(e,r),c=g7(e,t,r,"Contents"),f=null===c?null:e2(c,`\n`),m=g7(e,t,r,"Subj"),p=g7(e,t,r,"T"),h=g7(e,t,r,"CreationDate"),F=g7(e,t,r,"M"),g=Df(e.EPDFAnnot_GetBlendMode(r)),_=function(e,t,n){if(!e.EPDFAnnot_HasEmbedMetadata(n))return null;let r=_X(e,t,n,"SchemaVersion"),i=_Q(e,t,n,"UserID"),o=_Q(e,t,n,"GroupID"),a=_Q(e,t,n,"CreatedBy"),s=_Q(e,t,n,"UpdatedBy"),l=_Q(e,t,n,"ImportedBy"),u={};return void 0!==r&&(u.schemaVersion=r),void 0!==i&&(u.userId=i),void 0!==o&&(u.groupId=o),void 0!==a&&(u.createdBy=a),void 0!==s&&(u.modifiedBy=s),void 0!==l&&(u.importedBy=l),u}(e,t,r),P=function(e,t,n,r,i){let o=e.FPDFAnnot_GetLinkedAnnot(r,"IRT");if(!o)return Pa;try{var a;let s=Pl(e,t,n,o,i);if(!s)return Pa;return{inReplyTo:s,replyType:(a=e.EPDFAnnot_GetReplyType(r),2===a?"group":"reply")}}finally{e.FPDFPage_CloseAnnot(o)}}(e,t,n,r,i),D=Ps(e,t,n,r,"Popup",i),b=function(e,t,n,r,i){let o={};for(let[a,s]of[["activate",0],["cursorEnter",1],["cursorExit",2],["mouseDown",3],["mouseUp",4],["focus",5],["blur",6],["pageOpen",7],["pageClose",8],["pageVisible",9],["pageInvisible",10]]){let l=F8(e,t,n,e.EPDFAnnot_GetActionModel(r,s),i);l&&(o[a]=l)}return Object.keys(o).length>0?o:void 0}(e,t,n,r,a);return{ref:gI(e,t,n,l,r,o),page:l,hasAppearance:e.EPDFAnnot_HasAppearanceStream(r,0),appearanceState:_h(e,t,r),structurePosition:(s=e.EPDFAnnot_GetStructurePosition(r,0n,0))<=0?null:hY(t,4*s,n=>(e.EPDFAnnot_GetStructurePosition(r,n,s),Array.from({length:s},(e,r)=>Number(t.peek(n,"i32",4*r))>>>0))),nm:g7(e,t,r,"NM"),...d,rect:u,contents:f,subject:m,author:p,createdAt:h?hq(h):null,modifiedAt:F?hq(F):null,blendMode:g,reply:P.inReplyTo?{to:P.inReplyTo,type:P.replyType??"reply"}:null,popup:D,groupId:_?.groupId??null,userId:_?.userId??null,createdBy:_?.createdBy??null,modifiedBy:_?.modifiedBy??null,importedBy:_?.importedBy??null,actions:b??null}}function Dp(e){let{runtime:t,session:n,pageObjectNumber:r,count:i,getAnnotPtrAt:o,signal:a,fonts:s,family:l}=e,{fn:u,mem:d}=t,c=[],f=new F4,m=gJ(n,s);for(let e=0;ee.includes(t));return t.length===nu.length?void 0:t}(n.modes))?Dh.filter(e=>o.includes(e.name)):Dh,f=this.session.requireDocPtr(),m=q(e),p=[];try{let e=gK(this.runtime,u),o=function(e,t,n){if(void 0===e||"scale"===e.kind){var r;return r=e?.scale,void 0===r||!Number.isFinite(r)||r<=0?1:r}let i=90===n||270===n?t.height:t.width;if(!Number.isFinite(e.width)||e.width<=0||!(i>0))throw new N(G.InvalidArg,"render viewport width must be positive");return e.width/i}(n.viewport,{width:e.right-e.left,height:e.top-e.bottom},d),l=a.FPDFPage_GetAnnotCount(u),h=new g$(i,r);for(let i=0;ie.EPDFAnnot_GetDrawingRect(n,Dg.modeInt,r)?eH(FX(t,r)):null)}(a,s,l);if(!h&&!F)continue;let g=gI(a,s,f,m,l,i),_=eH(g9(a,s,l)),P=_E(a,s,l),D=P&&null!==function(e){let{subtype:t,rect:n,box:r,rotation:i,intent:o}=e;return nz.has(t)&&r&&i&&("free-text"!==t||"free-text-callout"!==o)&&eY(eJ(r,i),n)?i:null}({subtype:rN(r),rect:_,box:P.box,rotation:P.rotation,intent:3===r?_z(_f(a,s,l)):null})?P:void 0,b=D?eH(D.box):_;for(let t of c){let r=!!(h&t.bit),i=r?b:t===Dg?F:null;if(i)for(let c of r?function(e,t,n,r){let i=function(e,t,n,r){let i=[],o=e.EPDFAnnot_GetAppearanceStateCount(n,r);for(let a=0;ae.EPDFAnnot_GetAppearanceStateName(n,r,a,t,i));null!==o&&i.push(o)}return i}(e,t,n,r);return 0===i.length?D_:i.length>8?[{draw:"",label:_h(e,t,n)}]:i.map(e=>({draw:e,label:e}))}(a,s,l,t.modeInt):D_){let a=this.renderOne(u,l,t.modeInt,c.draw,i,e,d,o,r?D:void 0,n.maxOutputPixels);a&&p.push({ref:g,mode:t.name,state:c.label,rect:i,raster:a})}}}finally{a.FPDFPage_CloseAnnot(l)}}return{page:m,appearances:p}}finally{l.release(e)}}renderOne(e,t,n,r,i,o,a,s,l,u){let{fn:d}=this.runtime,c=Math.min(s,Math.sqrt(16e6/Math.max(1,(i.right-i.left)*(i.top-i.bottom))));return function(e,t){let n=gH(e,t);if(!n)return null;try{return t.draw(n.bitmapPtr,n.matrixPtr,n.clipPtr)?n.read():null}finally{n.free()}}(this.runtime,{rect:i,page:o,rotation:a,viewport:{kind:"scale",scale:c},...void 0!==u?{maxOutputPixels:u}:{},background:"transparent",draw:(i,o)=>l?hY(this.runtime.mem,16,a=>(FY(this.runtime.mem,a,l.box),d.EPDF_RenderAnnotBitmapUnrotated(i,e,t,n,r,_g(l.rotation),a,o,16))):d.EPDF_RenderAnnotBitmap(i,e,t,n,r,o,16)})}},Dg=Dh[0],D_=[{draw:"",label:null}],DP=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}list(e,t,n){hW(t),void 0===e&&(this.session.ensureFullPageRegistry(),e=this.session.allRecords().map(e=>e.pageObjectNumber));let r=[];for(let i of e)hW(t),r.push(this.listOne(i,t,n));return{annotations:r.flatMap(e=>e.annotations),pages:r.flatMap(e=>e.pages)}}listOne(e,t,n){hW(t);let{fn:r}=this.runtime,i=this.session.requireDocPtr(),o=this.session.recordByObjectNumber(e),a=r.EPDFPage_GetAnnotCountRaw(i,o.pageIndex);if(a<0)throw new N(G.Unknown,`EPDFPage_GetAnnotCountRaw returned ${a} for page ${e}`);return Dp({runtime:this.runtime,session:this.session,pageObjectNumber:e,count:a,getAnnotPtrAt:e=>r.EPDFPage_GetAnnotRaw(i,o.pageIndex,e),signal:t,...this.fonts?{fonts:this.fonts}:{},...n?{family:n}:{}})}};function DD(e,t,n,r){return h0(t,[32,8],([i,o])=>{if(t.poke(o,"i32",32,0),t.poke(o,"i32",0,4),!e.EPDF_DigestBuffer(n,r,1,i,o))throw new N(G.Unknown,"EPDF_DigestBuffer returned false");let a="";for(let e of t.readBytes(i,32))a+=e.toString(16).padStart(2,"0");return a})}function Db(e,t,n){let r=t.alloc(Math.max(1,n.byteLength));try{return t.writeBytes(r,n),DD(e,t,r,n.byteLength)}finally{t.free(r)}}function Dy(e,t,n,r,i,o){let a=r.hashes.get(i),s=void 0===a?void 0:r.bySource.get(a);if(void 0!==s)return s;let l=t.alloc(i.byteLength);try{t.writeBytes(l,new Uint8Array(i));let s=a??DD(e,t,l,i.byteLength);r.hashes.set(i,s);let u=r.bySource.get(s);if(void 0!==u)return u;let d=function(e,t,n,r,i,o){if("application/pdf"===i.mimeType){let t=e.FPDF_LoadMemDocument(n,r,"");if(!t)throw new N(G.MalformedPdf,"the appearance PDF could not be opened");try{return o(t)}finally{e.FPDF_CloseDocument(t)}}return function(e,t,n,r,i,o){if(!("width"in i))throw new N(G.InvalidArg,"the appearance image has no size");let a=Math.min(1,14400/Math.max(i.width,i.height)),s=i.width*a,l=i.height*a,u=e.FPDF_CreateNewDocument();if(!u)throw new N(G.Unknown,"FPDF_CreateNewDocument returned NULL");try{let a=e.FPDFPage_New(u,0,s,l);if(!a)throw new N(G.Unknown,"FPDFPage_New returned NULL");try{let o=e.FPDFPageObj_NewImageObj(u);if(!o)throw new N(G.Unknown,"FPDFPageObj_NewImageObj returned NULL");let h=!1;try{var d,c,f,m,p;if(!("image/png"===i.mimeType?e.EPDFImageObj_SetPng(0n,0,o,n,r):e.EPDFImageObj_SetJpeg(0n,0,o,n,r)))throw new N(G.InvalidArg,`${"image/png"===i.mimeType?"EPDFImageObj_SetPng":"EPDFImageObj_SetJpeg"} rejected the image data`);d=e,c=t,f=o,m=s,p=l,hY(c,24,e=>{if(c.poke(e,"f32",m,0),c.poke(e,"f32",0,4),c.poke(e,"f32",0,8),c.poke(e,"f32",p,12),c.poke(e,"f32",0,16),c.poke(e,"f32",0,20),!d.FPDFPageObj_SetMatrix(f,e))throw new N(G.Unknown,"FPDFPageObj_SetMatrix returned false")}),e.FPDFPage_InsertObject(a,o),h=!0}finally{h||e.FPDFPageObj_Destroy(o)}if(!e.FPDFPage_GenerateContent(a))throw new N(G.Unknown,"FPDFPage_GenerateContent returned false")}finally{e.FPDF_ClosePage(a)}return o(u)}finally{e.FPDF_CloseDocument(u)}}(e,t,n,r,i,o)}(e,t,l,i.byteLength,o,t=>e.EPDFDoc_CanonicalDrawing(t,0));if(!d)throw new N(G.Unknown,"EPDFDoc_CanonicalDrawing returned NULL");try{let i=Dw(e,t,d),o=function(e,t,n,r){if(r.byContent)return r.byContent;let i=new Map,o=e.EPDFDoc_GetDrawings(n,0n,0);for(let r of o>0?hY(t,4*o,r=>(e.EPDFDoc_GetDrawings(n,r,o),Array.from({length:o},(e,n)=>Number(t.peek(r,"i32",4*n))>>>0))):[]){let o=e.EPDFDoc_ExportDrawing(n,r);if(o)try{let n=Dw(e,t,o);i.has(n)||i.set(n,r)}finally{e.FPDF_CloseDocument(o)}}return r.byContent=i,i}(e,t,n,r),a=o.get(i);if(void 0===a){if(!(a=e.EPDFDoc_ImportDrawing(n,d)))throw new N(G.Unknown,"EPDFDoc_ImportDrawing returned 0");o.set(i,a)}return r.bySource.set(s,a),a}finally{e.FPDF_CloseDocument(d)}}finally{t.free(l)}}function Dw(e,t,n){return hY(t,8,r=>{t.poke(r,"i32",0,0),t.poke(r,"i32",0,4);let i=e.EPDF_SaveDocumentToOwnedBuffer(n,2,r),o=Number(t.peek(r,"i32",0));if(!i||o<=0)throw i&&e.EPDF_FreeBuffer(i),new N(G.Unknown,"failed to save a stamp drawing");try{return DD(e,t,i,o)}finally{e.EPDF_FreeBuffer(i)}})}function DE(e,t,n){let r=t.alloc(n.byteLength);try{t.writeBytes(r,new Uint8Array(n));let i=e.FPDF_LoadMemDocument(r,n.byteLength,"");if(!i)return null;try{return e.FPDF_GetPageCount(i)}finally{e.FPDF_CloseDocument(i)}}finally{t.free(r)}}function DA(e,t,n,r=0){let{r:i,g:o,b:a}=e9(n);if(!e.EPDFAnnot_SetColor(t,r,i,o,a))throw new N(G.Unknown,"EPDFAnnot_SetColor returned false")}function Dv(e,t,n){e.EPDFAnnot_ClearColor(t,n)}function DS(e,t,n){if(!e.EPDFAnnot_SetOpacity(t,n))throw new N(G.Unknown,"EPDFAnnot_SetOpacity returned false")}function Dk(e,t,n){let r=function(e,t){let n=e;for(let e of g6){let r=t[e];void 0!==r&&(r?n|=g2[e]:n&=~g2[e])}return n}(e.FPDFAnnot_GetFlags(t),n);if(!e.FPDFAnnot_SetFlags(t,r))throw new N(G.Unknown,"FPDFAnnot_SetFlags returned false")}function Dx(e,t,n,r){let i=t.alloc(16);try{if(t.poke(i,"f32",r.left,0),t.poke(i,"f32",r.top,4),t.poke(i,"f32",r.right,8),t.poke(i,"f32",r.bottom,12),!e.EPDFAnnot_SetRect(n,i))throw new N(G.Unknown,"EPDFAnnot_SetRect returned false")}finally{t.free(i)}}function DG(e,t,n,r,i){let o=t.writeU16String(i);try{e.FPDFAnnot_SetStringValue(n,r,o)}finally{t.free(o)}}function DO(e,t,n,r,i){null===i?e.EPDFAnnot_RemoveKey(n,r):DG(e,t,n,r,i)}function DI(e,t,n,r){if(!e.EPDFAnnot_SetBorderStyle(t,n,r))throw new N(G.Unknown,"EPDFAnnot_SetBorderStyle returned false")}function DN(e,t,n,r){let i=t.alloc(4*r.length);try{for(let e=0;ee.FPDFAnnot_AddInkStroke(n,r,i.length))throw new N(G.Unknown,"FPDFAnnot_AddInkStroke returned < 0")}finally{t.free(r)}}}function DL(e,t,n){if(!e.EPDFAnnot_SetLineEndings(t,g4(n.start),g4(n.end)))throw new N(G.Unknown,"EPDFAnnot_SetLineEndings returned false")}function D$(e,t,n,r,i){let{r:o,g:a,b:s}=e9(i);if(!e.EPDFAnnot_SetDefaultAppearance(t,n,r,o,a,s))throw new N(G.Unknown,"EPDFAnnot_SetDefaultAppearance returned false")}function Dz(e,t,n){if(!e.EPDFAnnot_SetTextAlignment(t,n))throw new N(G.Unknown,"EPDFAnnot_SetTextAlignment returned false")}function DU(e,t,n){if(!e.EPDFAnnot_SetIntent(t,n))throw new N(G.Unknown,"EPDFAnnot_SetIntent returned false")}function DV(e,t,n){null===n?e.EPDFAnnot_RemoveKey(t,"IT"):DU(e,t,n)}function DW(e,t,n,r){let i=t.writeU16String(r);try{if(!e.EPDFAnnot_SetOverlayText(n,i))throw new N(G.Unknown,"EPDFAnnot_SetOverlayText returned false")}finally{t.free(i)}}function Dq(e,t,n){if(!e.EPDFAnnot_SetOverlayTextRepeat(t,n))throw new N(G.Unknown,"EPDFAnnot_SetOverlayTextRepeat returned false")}function DH(e,t,n,r){let i=t.alloc(8*r.length);try{for(let e=0;etv({x:e.x+n,y:e.y+r},{x:t[i].x,y:t[i].y}))?{dx:n,dy:r}:void 0}function D1(e,t,n,{dx:r,dy:i}){let o=eH(g9(e,t,n));Dx(e,t,n,{left:o.left+r,bottom:o.bottom+i,right:o.right+r,top:o.top+i})}var D3="Rotation",D2="UnrotatedRect";function D6(e,t){e.EPDFAnnot_HasEmbedMetadata(t)||e.EPDFAnnot_SetEmbedMetadataNumber(t,"SchemaVersion",1)}function D5(e,t,n){D6(e,t),e.EPDFAnnot_SetEmbedMetadataNumber(t,D3,_g(n))}var D4=new Set([90,180,270]);function D8(e,t,n,r){D6(e,n);let i=t.alloc(16);try{t.poke(i,"f32",r.left,0),t.poke(i,"f32",r.top,4),t.poke(i,"f32",r.right,8),t.poke(i,"f32",r.bottom,12),e.EPDFAnnot_SetEmbedMetadataRect(n,D2,i)}finally{t.free(i)}}function D7(e,t,n,r){var i;let o;r?(D5(e,n,r.rotation),D8(e,t,n,r.box)):(e.EPDFAnnot_ClearEmbedMetadataKey(n,D3),e.EPDFAnnot_ClearEmbedMetadataKey(n,D2)),i=r?.rotation??null,o=e.FPDFAnnot_GetSubtype(n),null!==i&&(13===o||3===o&&D4.has(i))?e.EPDFAnnot_SetRotate(n,_g(i)):(13===o||3===o)&&e.EPDFAnnot_SetRotate(n,0)}var D9=e=>(e%360+360)%360;function be(e,t,n,r){let i=eH(r.box),o=r.rotation||null;D7(e,t,n,null===o?null:{rotation:o,box:i}),Dx(e,t,n,null===o?i:eJ(i,o)),e.EPDFAnnot_ClearRectangleDifferences(n)}function bt(e,t,n,r){var i;if(void 0===r.box&&void 0===r.rotation)return!1;let o=_A(e,t,n),a=eH(r.box??o.box),s=void 0===r.rotation?o.rotation:r.rotation||null,l=(i=o.rotation,null===s||null===i?s===i:tv(D9(s),D9(i)));if(l&&tv(a,o.box))return!1;let u=a.right-a.left,d=a.top-a.bottom;return l&&tv(u,o.box.right-o.box.left)&&tv(d,o.box.top-o.box.bottom)?(D1(e,t,n,{dx:a.left-o.box.left,dy:a.bottom-o.box.bottom}),null!==s&&D7(e,t,n,{rotation:s,box:a})):be(e,t,n,{box:a,rotation:s}),!0}var bn=t5.caret,br=t5["file-attachment"];function bi(e){return"file-attachment"===e}function bo(e,t,n){if(!e.EPDFAnnot_SetName(t,_B[n]))throw new N(G.Unknown,"EPDFAnnot_SetName returned false")}function ba(e,t,n,r){let i,o=t.writeU16String(r);try{i=e.FPDFAnnot_AddFileAttachment(n,o)}finally{t.free(o)}if(!i)throw new N(G.Unknown,"FPDFAnnot_AddFileAttachment returned NULL");return i}function bs(e){let t=e?.resources?.file;if(void 0===t)throw new N(G.InvalidArg,"creating a file-attachment annotation needs its \'file\' resource");return t}function bl(e){if(e?.docPtr===void 0)throw new N(G.Unknown,"file-attachment writer requires docPtr on the write context");return e.docPtr}function bu(e,t,n,r,i,o){if(Object.prototype.hasOwnProperty.call(_U,n))return void D$(e,t,_U[n]??_U.helvetica,r,i);if(o?.resolveRegisteredFontId&&o.describeRegisteredFont?.(n))return void function(e,t,n,r,i){let{r:o,g:a,b:s}=e9(i);if(!e.EPDFAnnot_SetDefaultAppearanceRegisteredFont(t,n,r,o,a,s))throw new N(G.Unknown,"EPDFAnnot_SetDefaultAppearanceRegisteredFont returned false")}(e,t,o.resolveRegisteredFontId(n),r,i);let a=o?.resolveDocumentFont?.(n);if(a){if(!a.choosable)throw new N(G.InvalidArg,`\'${n}\' can\'t be chosen for new text (${a.restrictions.join(", ")})`,{details:{field:"fontFamily",restrictions:a.restrictions}});!function(e,t,n,r,i){let{r:o,g:a,b:s}=e9(i);if(!e.EPDFAnnot_SetDefaultAppearanceDocumentFont(t,n,r,o,a,s))throw new N(G.InvalidArg,"EPDFAnnot_SetDefaultAppearanceDocumentFont refused the program")}(e,t,a.objectNumber,r,i);return}throw new N(G.InvalidArg,`fontFamily \'${n}\' is not a standard font, one of the engine\'s fonts or one of the document\'s`,{details:{field:"fontFamily"}})}function bd(e,t,n,r){let i=t5[r.subtype];bc(e,n,void 0===r.color?i.color:r.color),DS(e,n,r.opacity??i.opacity),bf(e,t,n,r)}function bc(e,t,n){null===n?function(e,t,n=0){if(!e.EPDFAnnot_SetNoColor(t,n))throw new N(G.Unknown,"EPDFAnnot_SetNoColor returned false")}(e,t):DA(e,t,n)}function bf(e,t,n,r){let i=t5[r.subtype];DI(e,n,_Y(r.borderStyle??i.borderStyle),r.strokeWidth??i.strokeWidth),null!=r.dashArray&&r.dashArray.length>0&&DN(e,t,n,r.dashArray)}function bm(e,t,n,r){void 0!==r.color&&bc(e,n,r.color),void 0!==r.opacity&&DS(e,n,r.opacity),bp(e,t,n,r)}function bp(e,t,n,r){if(void 0!==r.borderStyle||void 0!==r.strokeWidth){let i=_r(e,t,n),o=r.borderStyle??_0(i.styleCode),a=r.strokeWidth??i.width;DI(e,n,_Y(o),a)}null===r.dashArray||r.dashArray?.length===0?DC(e,n):void 0!==r.dashArray&&DN(e,t,n,r.dashArray)}function bh(e,t,n,r){let i=r.interiorColor??null;null===i?Dv(e,n,1):DA(e,n,i,1),bd(e,t,n,r)}function bF(e,t,n,r){void 0!==r.interiorColor&&(null===r.interiorColor?Dv(e,n,1):DA(e,n,r.interiorColor,1)),bm(e,t,n,r)}var bg=t5["free-text"];function b_(e,t,n,r,i){let o=gX(n,{describe:r?.describeFont,programOf:r?.documentProgramOf,bodyProgram:void 0===i?void 0:r?.documentProgramOf?.(i)});if(!e.EPDFAnnot_SetRichTextJSON(t,o))throw new N(G.InvalidArg,"rich text could not be written (empty rect, or a font resource could not be built)")}function bP(e,t,n){if(!e.EPDFAnnot_SetEmbedMetadataNumber(t,"VerticalAlignment",_Z.indexOf(n)))throw new N(G.Unknown,"EPDFAnnot_SetEmbedMetadataNumber returned false")}function bD(e){return"free-text"===e}var bb=e=>(e%360+360)%360;function by(e,t,n,r,i){let o,a=r.flat(),s=null===i||0===a.length?null:{degrees:i,center:{x:((o=e0(a)).left+o.right)/2,y:(o.bottom+o.top)/2}};return D7(e,t,n,s?{rotation:s.degrees,box:e0(a)}:null),{drawn:r.map(e=>e.map(e=>s?e1(e,s):e)),turn:s}}function bw(e,t,n,r,i){let o=by(e,t,n,r,i||null);return Dx(e,t,n,e0(o.drawn.flat())),o}function bE(e,t,n){let r=function(e,t,n){switch(e.FPDFAnnot_GetSubtype(n)){case 4:{let r=_s(e,t,n);return r?[[r.start,r.end]]:[]}case 7:case 8:return[_o(e,t,n)];case 15:return _a(e,t,n).map(e=>[...e]);default:return[]}}(e,t,n),i=_5(e,t,n,r);return{drawn:r,turn:i,upright:r.map(e=>e.map(e=>_4(e,i)))}}function bA(e,t,n,r,i,o){if(void 0===i&&void 0===o)return;let a=r.turn?.degrees??null,s=void 0===o?a:o||null,l=tv(bb(s??0),bb(a??0));if(void 0===i&&l)return;let u=by(e,t,n,i??r.upright,s),d=D0(r.drawn.flat(),u.drawn.flat());return d&&D1(e,t,n,d),u}function bv(e,t,n,r){if(void 0!==r.intent&&(null===r.intent?e.EPDFAnnot_RemoveKey(n,"IT"):gr(e.EPDFAnnot_SetIntent(n,_7[r.intent]))),void 0!==r.measure)if(null===r.measure)gr(e.EPDFAnnot_RemoveMeasure(n));else{let i=e.EPDFAnnot_GetMeasure(n);i&&1!==e.EPDFMeasure_GetSubtype(i)&&gr(e.EPDFAnnot_RemoveMeasure(n)),gs(e,t,e.EPDFAnnot_AddMeasure(n),r.measure)}if("line"===r.subtype){if(void 0!==r.leader&&gr(e.EPDFAnnot_SetLineLeader(n,r.leader?.length??0,r.leader?.extension??0,r.leader?.offset??0)),void 0!==r.captionEnabled){let i=r.captionOffset??null;gr(go(t,i?{x:i.along,y:i.perpendicular}:void 0,t=>e.EPDFAnnot_SetLineCaption(n,r.captionEnabled??!1,+("top"===r.captionPosition),t)))}}else if(void 0!==r.captionEnabled)if(null===r.captionEnabled)e.EPDFAnnot_ClearEmbedMetadataKey(n,"MeasurementCaption"),e.EPDFAnnot_ClearEmbedMetadataKey(n,"MeasurementCaptionCenter");else{let i=r.captionEnabled;gr(go(t,("captionCenter"in r?r.captionCenter:null)??void 0,t=>e.EPDFAnnot_SetShapeCaption(n,i,t)))}}function bS(e,t,n,r,i){let o=i?.docPtr;if(!o)throw new N(G.InvalidArg,"writing a link target requires a document pointer on the write context");let a=Pi(e,t,o,r);if(!e.EPDFAnnot_SetAction(n,a))throw new N(G.Unknown,"EPDFAnnot_SetAction failed for link")}function bk(e,t,n){if(!e.EPDFAnnot_SetBooleanValue(t,"Open",n))throw new N(G.Unknown,"EPDFAnnot_SetBooleanValue returned false")}var bx=e=>[e.upperLeft,e.upperRight,e.lowerLeft,e.lowerRight];function bG(e){return"highlight"===e||"underline"===e||"squiggly"===e||"strikeout"===e}function bO(e,t,n,r){let i=t.alloc(32);try{for(let l of r){var o,a,s;if(o=t,a=i,s=l,o.poke(a,"f32",s.upperLeft.x,0),o.poke(a,"f32",s.upperLeft.y,4),o.poke(a,"f32",s.upperRight.x,8),o.poke(a,"f32",s.upperRight.y,12),o.poke(a,"f32",s.lowerLeft.x,16),o.poke(a,"f32",s.lowerLeft.y,20),o.poke(a,"f32",s.lowerRight.x,24),o.poke(a,"f32",s.lowerRight.y,28),!e.FPDFAnnot_AppendAttachmentPoints(n,i))throw new N(G.Unknown,"FPDFAnnot_AppendAttachmentPoints returned false")}}finally{t.free(i)}}function bI(e,t,n,r){e.EPDFAnnot_RemoveKey(n,"QuadPoints"),bO(e,t,n,r)}function bN(e,t,n,r){let i=1/0,o=1/0,a=-1/0,s=-1/0;for(let e of r)for(let t of[e.upperLeft,e.upperRight,e.lowerLeft,e.lowerRight])t.xa&&(a=t.x),t.ys&&(s=t.y);Dx(e,t,n,{left:i,top:s,right:a,bottom:o})}var bC=t5.redact;function bj(e){return void 0!==e.overlayText&&null!==e.overlayText||void 0!==e.fontFamily||void 0!==e.fontSize||void 0!==e.fontColor}function bM(e){return"redact"===e}function bR(e){return"circle"===e||"square"===e}function bT(e){return"stamp"===e}function bB(e,t,n){if(!e.EPDFAnnot_SetName(t,n))throw new N(G.Unknown,"EPDFAnnot_SetName returned false")}function bL(e){if(0===e.length)throw new N(G.InvalidArg,"stamp name must be non-empty")}function b$(e){if(void 0===Pg[e])throw new N(G.InvalidArg,`unknown stamp fit \'${String(e)}\'; expected contain, cover, or fill`)}function bz(e){let t=e?.resources?.appearance;if(!t)throw new N(G.InvalidArg,"creating a stamp annotation needs its \'appearance\' resource");return t}function bU(e,t){e||bz(t);let n=e instanceof ArrayBuffer?nx(e):null;if(!n)throw new N(G.InvalidArg,"the appearance resource must be PNG, JPEG or one-page PDF bytes");if("application/pdf"===n.mimeType){let n=t?.pdfPageCount?.(e);if(null===n)throw new N(G.MalformedPdf,"the stamp\'s appearance PDF could not be opened");if(void 0!==n&&1!==n)throw new N(G.InvalidArg,`the appearance PDF has ${n} pages; a stamp takes a one-page PDF`)}bV(t)}function bV(e){if(e?.docPtr===void 0||!e.drawings)throw new N(G.Unknown,"stamp writer requires docPtr/drawings on the write context");return{docPtr:e.docPtr,drawings:e.drawings}}function bW(e,t,n,r,i,o,a){be(e,t,n,{box:a.box,rotation:null}),function(e,t,n,r,i,o){let a=nx(r);if(!a)throw new N(G.Unknown,"stamp content preflight invariant broken");let s=Dy(e,t,i.docPtr,i.drawings,r,a);if(!e.EPDFAnnot_SetDrawing(n,s,Pg[o]))throw new N(G.Unknown,"EPDFAnnot_SetDrawing returned false")}(e,t,n,r,i,o),a.rotation&&(be(e,t,n,a),Pb(e,n,o))}var bq=t5.text;function bH(e,t,n){if(!e.EPDFAnnot_SetBooleanValue(t,"Open",n))throw new N(G.Unknown,"EPDFAnnot_SetBooleanValue returned false")}function bK(e,t,n){if(!e.EPDFAnnot_SetName(t,_R[n]))throw new N(G.Unknown,"EPDFAnnot_SetName returned false")}var bZ=(e,t)=>t?e1(e,t):e;function bJ(e,t){return e.captionCenter?{...e,captionCenter:bZ(e.captionCenter,t.turn)}:e}function bQ(e,t,n,r){let i=bE(e,t,n),o=bA(e,t,n,i,r.vertices&&[r.vertices],r.rotation);bv(e,t,n,function(e,t,n,r,i,o){let a=o?o.turn:i.turn;if(r.captionCenter)return{...r,captionCenter:bZ(r.captionCenter,a)};if(!o||void 0!==r.captionEnabled)return r;let s=Pe(e,t,n);return s?.center?{...r,captionEnabled:s.enabled,captionCenter:bZ(_4(s.center,i.turn),a)}:r}(e,t,n,r,i,o)),o&&DR(e,t,n,o.drawn[0])}function bX(e){return"polygon"===e||"polyline"===e}function bY(e){return"widget"===e}function b0(e,t,n,r,i){var o,a;if(null===r.color)e.EPDFAnnot_ClearMKColor(n,0);else if(r.color){let{r:t,g:i,b:o}=e9(r.color);e.EPDFAnnot_SetMKColor(n,0,t,i,o)}if(null===r.interiorColor)e.EPDFAnnot_ClearMKColor(n,1);else if(r.interiorColor){let{r:t,g:i,b:o}=e9(r.interiorColor);e.EPDFAnnot_SetMKColor(n,1,t,i,o)}if(void 0!==r.strokeWidth||void 0!==r.borderStyle){let i=_r(e,t,n);e.EPDFAnnot_SetBorderStyle(n,"underline"===(o=r.borderStyle??_1(i.styleCode))?5:_Y(o),r.strokeWidth??i.width)}null===r.dashArray?DC(e,n):void 0!==r.dashArray&&DN(e,t,n,r.dashArray),(void 0!==r.fontFamily||void 0!==r.fontSize||void 0!==r.fontColor)&&function(e,t,n,r,i){let o=_u(e,t,n);if([r.fontFamily,r.fontSize,r.fontColor].includes(null)&&null!==o)throw new N(G.InvalidArg,"a widget\'s font can\'t be removed: send a font, or leave the font fields out",{details:{field:"fontFamily"}});let a=r.fontFamily??void 0,s=r.fontSize??void 0,l=r.fontColor??void 0;if(void 0===a&&void 0===s&&void 0===l)return;let u=s??o?.fontSize??12,d=l??o?.color??"#000000";null!==o&&(void 0===a||function(e,t,n,r,i){let o=_d(e,t,n);if(!o)return!1;if(_J(e,t,n,o)===r)return!0;let a=eU(r,i?.describeFont);return eV(a.family)===eV(o.family)&&(void 0===a.weight||a.weight===o.weight)&&(void 0===a.italic||a.italic===o.italic)}(e,t,n,a,i))?D$(e,n,-1,u,d):bu(e,n,a??"helvetica",u,d,i)}(e,t,n,r,i),void 0!==r.textAlign&&e.EPDFAnnot_SetTextAlignment(n,_H(r.textAlign));let s=void 0!==r.checkStyle?r.checkStyle&&Du[r.checkStyle]:r.caption;if(null===s?e.EPDFAnnot_SetMKText(n,0,0n):void 0!==s&&h5(t,s,t=>e.EPDFAnnot_SetMKText(n,0,t)),r.layout&&!e.EPDFAnnot_SetMKTextPosition(n,(a=r.layout,Px.indexOf(a))))throw new N(G.Unknown,"the widget\'s layout (/MK /TP) could not be written")}function b1(e,t,n){if(!e.EPDFAnnot_SetMKRotation(t,(360-(n??0))%360))throw new N(G.Unknown,"the widget\'s turn (/MK /R) could not be written")}function b3(e,t,n,r,i){let o=eH(r.box),a=r.rotation?eJ(o,r.rotation):o;i&&r.rotation===i.rotation||b1(e,n,r.rotation),i&&tv(a,i.rect)||Dx(e,t,n,a)}function b2(e,t,n,r){if("free-text"===n.subtype||void 0===n.richText)return;if(null===n.richText)return void e.EPDFAnnot_RemoveKey(t,"RC");let i=gX(function(e){if(e.body?.family!==e6.family)return e;let{family:t,...n}=e.body;return{...e,body:n}}(n.richText),{describe:r?.describeFont});if(!e.EPDFAnnot_SetRichTextJSON(t,i))throw new N(G.InvalidArg,`${n.subtype}: the comment\'s rich text could not be written`)}function b6(e){if(void 0===e.subtype)throw new N(G.InvalidArg,"a patch reached the writer without its subtype");return e.subtype}function b5(e,t,n,r){let{fn:i,mem:o}=e,a=o.writeU16String(r);try{return i.EPDFPage_GetAnnotIndexByNameRaw(t,n,a)}finally{o.free(a)}}function b4(e,t){return new N(G.InvalidArg,`nm \'${e}\' is already used on page ${t}`,{details:{field:"nm"}})}function b8(e,t,n,r,i,o){let a=Dm(e,t,o.docPtr,n,r,i),s=e.FPDFAnnot_GetSubtype(n),{reader:l}=PN(s);return l(e,t,n,a,s,o)}function b7(e,t,n){return void 0===n?e.EPDFAnnot_GenerateAppearance(t):e.EPDFAnnot_GenerateAppearanceWithBlend(t,function(e){switch(e){case"normal":return 0;case"multiply":return 1;case"screen":return 2;case"overlay":return 3;case"darken":return 4;case"lighten":return 5;case"color-dodge":return 6;case"color-burn":return 7;case"hard-light":return 8;case"soft-light":return 9;case"difference":return 10;case"exclusion":return 11;case"hue":return 12;case"saturation":return 13;case"color":return 14;case"luminosity":return 15}}(n))}function b9(e,t,n,r){let{fn:i}=e;if(!i.EPDFAnnot_SetLinkedAnnot(t,"IRT",n))throw new N(G.Unknown,"failed to set /IRT linked annotation");i.EPDFAnnot_SetReplyType(t,Po(r))}function ye(e,t,n){let{fn:r}=e;if(function(e,t,n){let{fn:r}=e,i=r.FPDFAnnot_GetLinkedAnnot(n,"Popup");if(!i)return;let o=r.EPDFAnnot_GetObjectNumber(i);if(r.FPDFPage_CloseAnnot(i),o!==r.EPDFAnnot_GetObjectNumber(t))throw new N(G.InvalidArg,`the annotation already has a popup (object ${o}); delete it first`,{details:{field:"parent",popupObjectNumber:o}})}(e,t,n),!r.EPDFAnnot_SetLinkedAnnot(t,"Parent",n)||!r.EPDFAnnot_SetLinkedAnnot(n,"Popup",t))throw new N(G.Unknown,"failed to link a popup to its parent");!function(e,t,n){let{fn:r,mem:i}=e;if(1!==r.FPDFAnnot_GetSubtype(n))return;let o=_t(r,i,t,"Open");if(null!==o)return yt(e,n,o);let a=_t(r,i,n,"Open");null!==a&&yt(e,t,a)}(e,t,n)}function yt(e,t,n){if(!e.fn.EPDFAnnot_SetBooleanValue(t,"Open",n))throw new N(G.Unknown,"EPDFAnnot_SetBooleanValue returned false")}function yn(e,t){let{mem:n}=e,r=t(0n,0);return r<=0?[]:hY(n,8*r,e=>(t(e,r),Array.from({length:r},(t,r)=>({start:Number(n.peek(e,"i32",8*r))>>>0,count:Number(n.peek(e,"i32",8*r+4))>>>0}))))}var yr={0:null,1:"truetype",2:"opentype",3:"cff",4:"type1",5:"type3"},yi={0:"none",1:"whole",2:"subset"},yo={0:"installable",1:"editable",2:"preview-and-print",3:"restricted",4:"bitmap-only"},ya={0:"standard",1:"engine",2:"document-program",3:"document-font"},ys=e=>Array.from(e,e=>e.toString(16).padStart(2,"0")).join(""),yl=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}facts(){return{faces:this.faces(),engineFonts:this.fonts.engineFontFacts(),fallbacks:this.fonts.fallbackKeys()}}faces(){return yu(this.runtime,this.session)}resolve(e,t,n){let{fn:r,mem:i}=this.runtime,o=t.map(e=>this.faceOfRun(e,n)),a=t.map(e=>i.writeU16String(e.text)),s=o.map(e=>i.writeU16String(e.family)),l=e?this.openAnnotation(e):0n;try{let e=gc(this.runtime,a,e=>gc(this.runtime,s,n=>h1(i,o.map(e=>e.weight),a=>h1(i,o.map(e=>+!!e.italic),s=>h1(i,o.map(e=>e.program),i=>r.EPDFDoc_ResolveFonts(this.session.requireDocPtr(),l,t.length,e,n,a,s,i))))));if(!e)throw new N(G.Unknown,"EPDFDoc_ResolveFonts failed");try{return this.readResolution(e,t.length)}finally{r.EPDFFontResolution_Close(e)}}finally{for(let e of(l&&r.FPDFPage_CloseAnnot(l),[...a,...s]))i.free(e)}}readResolution(e,t){let{fn:n,mem:r}=this.runtime,i=[];for(let o=0;o(n.EPDFFontResolution_GetFallbacks(e,o,t,a),Array.from({length:a},(e,n)=>Number(r.peek(t,"i32",4*n))>>>0)));i.push({source:ya[n.EPDFFontResolution_GetSource(e,o)]??"standard",engineFont:t?this.fonts.keyForId(t)??null:null,objectNumber:n.EPDFFontResolution_GetProgramObjNum(e,o),displaySha256:hY(r,32,t=>n.EPDFFontResolution_GetProgramDisplayHash(e,o,t)?ys(r.readBytes(t,32)):null),baseFontName:h2(r,(t,r)=>n.EPDFFontResolution_GetBaseFontName(e,o,t,r))||null,familyName:h3(r,(t,r)=>n.EPDFFontResolution_GetFamily(e,o,t,r))??"",weight:n.EPDFFontResolution_GetWeight(e,o),italic:n.EPDFFontResolution_IsItalic(e,o),degraded:n.EPDFFontResolution_IsDegraded(e,o),fallbacks:s.flatMap(e=>{let t=this.fonts.keyForId(e);return t?[t]:[]})})}let o=[],a=n.EPDFFontResolution_CountMissingCharacters(e);for(let t=0;tn.EPDFFontResolution_GetMissingCharacter(e,t,r,i));i&&o.push(i)}return{runs:i,missingCharacters:o}}faceOfRun(e,t){if(!("fontFamily"in e))return{family:e.family,weight:e.weight,italic:e.italic,program:0};let n=e.fontFamily;if(Z.includes(n)){let e=ez[n];return{family:e.family,weight:e.weight,italic:e.italic,program:0}}let r=this.fonts.describeOrUndefined(n);if(r){let{familyName:e,weight:t,italic:n}=r;return{family:e,weight:t,italic:n,program:0}}let i=av(t.faces).find(e=>e.name===n);if(i){let{familyName:e,weight:r,italic:o}=i.face,a=aG(t,n);return{family:e,weight:r,italic:o,program:a?.choosable?a.objectNumber:0}}let o=eU(n);return{family:o.family,weight:o.weight??400,italic:o.italic??!1,program:0}}openAnnotation(e){let{pageIndex:t,index:n}=gC(this.runtime,this.session,e),r=this.runtime.fn.EPDFPage_GetAnnotRaw(this.session.requireDocPtr(),t,n);if(!r)throw new N(G.NotFound,"annotation not found");return r}program(e,t){let n=this.fonts.programFor(e);if(n)return{...n.info(),bytes:t?n.bytes():null};let r=this.faces().flatMap(e=>e.programs).find(t=>t.displaySha256===e&&t.objectNumber>0);if(!r)throw new N(G.NotFound,`no font program ${e}`);let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr();return hY(o,32,n=>{var s;o.writeBytes(n,(s=e,Uint8Array.from({length:s.length/2},(e,t)=>parseInt(s.slice(2*t,2*t+2),16))));let l=yn(this.runtime,(e,t)=>i.EPDFDoc_GetFontDisplayProgramCoverage(a,n,e,t)),u=null;if(t){let e=i.EPDFDoc_GetFontDisplayProgramData(a,n,0n,0);u=hY(o,Math.max(1,e),t=>(i.EPDFDoc_GetFontDisplayProgramData(a,n,t,e),o.readBytes(t,e)))}return{covers:l,ascent:r.ascent,descent:r.descent,bytes:u}})}};function yu(e,t){let{fn:n,mem:r}=e,i=n.EPDFFontFaces_Load(t.requireDocPtr());if(!i)throw new N(G.Unknown,"EPDFFontFaces_Load failed");try{let t=[],o=n.EPDFFontFaces_Count(i);for(let a=0;ahY(o,32,t=>e(t)?ys(o.readBytes(t,32)):null),s=a(e=>i.EPDFFontFaces_GetProgramHash(t,n,r,e)),l=a(e=>i.EPDFFontFaces_GetProgramDisplayHash(t,n,r,e)),u=h0(o,[4,4],([e,a])=>i.EPDFFontFaces_GetProgramMetrics(t,n,r,e,a)?{ascent:Number(o.peek(e,"f32")),descent:Number(o.peek(a,"f32"))}:{ascent:0,descent:0});return{objectNumber:i.EPDFFontFaces_GetProgramObjNum(t,n,r),format:yr[i.EPDFFontFaces_GetProgramFormat(t,n,r)]??null,embedded:yi[i.EPDFFontFaces_GetProgramEmbedded(t,n,r)]??"none",postScriptName:h2(o,(e,o)=>i.EPDFFontFaces_GetProgramPostScriptName(t,n,r,e,o))||null,permission:yo[i.EPDFFontFaces_GetProgramEmbeddingPermission(t,n,r)]??null,mapsUnicode:i.EPDFFontFaces_ProgramMapsUnicode(t,n,r),sha256:s,displaySha256:l,ascent:Math.round(1e3*u.ascent),descent:-Math.round(1e3*u.descent)}}(e,i,a,t));t.push({familyName:h3(r,(e,t)=>n.EPDFFontFaces_GetFamily(i,a,e,t))??"",weight:n.EPDFFontFaces_GetWeight(i,a),italic:n.EPDFFontFaces_IsItalic(i,a),programs:o})}return t}finally{n.EPDFFontFaces_Close(i)}}var yd=new WeakMap;function yc(e,t){let{fn:n,mem:r}=e;return hY(r,32,e=>{if(!n.EPDFDoc_GetFontsFingerprint(t.requireDocPtr(),e))throw new N(G.Unknown,"EPDFDoc_GetFontsFingerprint failed");return ys(r.readBytes(e,32))})}function yf(e,t){var n;let r;return JSON.stringify((n={faces:yu(e,t),engineFonts:[],fallbacks:[]},r=av(n.faces).filter(e=>!aS(e)&&!e.programs.some(e=>e.sha256===hz.lastResortDisplayHash)).map(ak),{fonts:[...Z.map(e=>{let t;return t=ez[e],{name:e,source:"standard",builtIn:!0,familyName:t.family,weight:t.weight,italic:t.italic,postScriptName:null,canChoose:!0,restrictions:[],programs:[{displaySha256:hz.standardDisplayHash(e),sourceSha256:null,embedded:"none",format:null,embeddingPermission:null,canDownload:!0}]}}),...n.engineFonts.map(ax),...r],fallbacks:[...n.fallbacks],lastResort:{displaySha256:hz.lastResortDisplayHash,sourceSha256:null,embedded:"none",format:"truetype",embeddingPermission:"installable",canDownload:!0}}).fonts.filter(e=>"document"===e.source))}function ym(e,t){yd.has(t)||yd.set(t,{fingerprint:yc(e,t),documentFonts:yf(e,t)})}function yp(e,t,n){let r,i=n=>(r??(r=av(yu(e,t)))).find(e=>e.name===n);return{...n?{resolveRegisteredFontId:e=>n.idFor(e),describeRegisteredFont:e=>n.describeOrUndefined(e)}:{},describeFont:e=>{let t=n?.describeOrUndefined(e);if(t)return t;let r=i(e)?.face;return r&&{familyName:r.familyName,weight:r.weight,italic:r.italic}},documentProgramOf:e=>{if(Z.includes(e)||n?.describeOrUndefined(e))return;let t=i(e)?.programs[0];return t&&aP(t)&&t.objectNumber>0?t.objectNumber:void 0},resolveDocumentFont:n=>aG({faces:yu(e,t),engineFonts:[],fallbacks:[]},n)}}var yh=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}create(e,t){hW(t);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=new Set,a=e.map(t=>{let n=this.session.resolvePageRef(t.page),r=this.writeContext(t.resources),i=yg(t.label,()=>{var e,n;let i;return e=t.draft,n=t.resources,nO((i=function(e,t={}){let n=(ni(e.subtype,e),function(e){if(to[e.subtype]?.box!=="box"||void 0!==e.box)return e;if(void 0===e.rect)throw new N(G.InvalidArg,`${e.subtype} create: give its \\`box\\`, or its \\`rect\\` with a quarter turn`,{details:{field:"box"}});if(!eq(e.rect))throw new N(G.InvalidArg,`${e.subtype} create field \'rect\': not a rect of finite numbers`,{details:{field:"rect"}});let t=e.rotation??0,n=eQ(t);if(null===n)throw new N(G.InvalidArg,`${e.subtype} create field \'rect\': a rect places a box at a quarter turn; at ${t}\\xb0 give its \\`box\\``,{details:{field:"rect"}});let{rect:r,...i}=e;return{...i,box:eX(eH(e.rect),n)}}(e));return!function(e,t={}){var n;let r,i=pX(String(e.subtype)),o=t.linked??[],a=(i&&o.length>0?(n=i.fileSchemas.create,r=o.filter(e=>e in n.shape),n.omit(Object.fromEntries(r.map(e=>[e,!0])))):hp).safeParse(e);if(!a.success)throw hC(a.error,`${String(e.subtype)} create`)}(n,{linked:t.linked??[]}),function(e,t={}){var n;return tJ(e),function(e){let t;if("line"!==(t=e.subtype)&&"polygon"!==t&&"polyline"!==t)return e;if(tZ(e.subtype,e),null!=e.measure&&"rectilinear"!==e.measure.subtype)throw new N(G.InvalidArg,`A ${"geospatial"===e.measure.subtype?"geospatial":"foreign"} measure can\'t be written; leave measure out`);let n=e;tK(e)&&("line"===e.subtype?n={...e,captionEnabled:e.captionEnabled??!1,captionPosition:e.captionPosition??"inline",captionOffset:e.captionOffset??null}:("polygon"===e.subtype||"polyline"===e.subtype)&&(n={...e,captionEnabled:e.captionEnabled??(null==e.captionCenter&&null),captionCenter:e.captionCenter??null}));var r=n;let i=tU(r);return"unavailable"in i||r.contents===i.label?r:{...r,contents:i.label}}(function(e){if("redact"!==e.subtype||null!=e.rect)return e;let t=e.quadPoints??[];if(0===t.length)return e;let n=e0(t.flatMap(e=>[e.upperLeft,e.upperRight,e.lowerLeft,e.lowerRight]));return{...e,rect:n}}(function(e){if(!tQ(e.subtype))return e;let{richText:t}=e;return t?{...e,contents:e5(t)}:e}(function(e,t){if("free-text"!==e.subtype)return e;let n=e.intent??(null!=e.calloutLine?"free-text-callout":"free-text");nt(n,e.calloutLine);let r={body:ne(e.richText?.body??{},e,t),paragraphs:e.richText?.paragraphs??e4(e.contents??"")};return{...e,intent:n,richText:r,contents:e5(r)}}(t9((n=function(e){if("text"!==e.subtype||null==e.state||null!=e.stateModel)return e;let t=tN(e.state);if(!t)throw nr(e.state);return{...e,stateModel:t}}(e)).subtype)&&t7(n.borderStyle??t4(n.subtype).borderStyle,n.dashArray)?{...n,dashArray:[...t8]}:n,t.describeFont))))}(n,t)}(e,{linked:["reply","parent"],describeFont:r.describeFont})).subtype,n,"create"),bT(i.subtype)&&(null!=i.name&&bL(i.name),null!=i.fit&&b$(i.fit),bU(r?.resources?.appearance,r)),bi(i.subtype)&&function(e,t){if(bs(t),bl(t),!e.file?.name)throw new N(G.InvalidArg,"a file attachment needs the file\'s name: give file.name, or the bytes as a File",{details:{field:"file.name"}})}(i,r),bM(i.subtype)&&function(e){if(void 0===e.rect&&0===(e.quadPoints??[]).length)throw new N(G.InvalidArg,"redact create needs a rect or at least one of quadPoints",{details:{field:"rect"}})}(i),i});yg(t.label,()=>this.claimName(i.nm,n,o));let a=void 0!==i.nm||"stamp"!==t.attribution.kind?i:{...i,nm:iY()};void 0!==t.objectNumber&&yg(t.label,()=>this.session.claimObjectNumber(t.objectNumber));let s=t.replyTo&&{type:t.replyTo.type,to:yg(t.label,()=>this.linkTarget(t.replyTo.to,t.page,e.length,"reply"))};if("popup"===a.subtype&&!t.parent)throw new N(G.InvalidArg,`${t.label??"create"}: a popup needs the annotation it shows (parent)`,{details:{field:"parent"}});return{create:t,record:n,ctx:r,draft:a,replyTo:s,parent:t.parent&&yg(t.label,()=>this.linkTarget(t.parent,t.page,e.length,"popup"))}});if(hW(t),0===a.length)return{created:[],meta:yF(this.session.writeStamp(),[],[])};let s=a.map(({create:e,record:o,ctx:a,draft:s})=>{let l;hW(t);let u=n.EPDFPage_CreateAnnotRaw(i,o.pageIndex,rI[s.subtype],e.objectNumber??0);if(!u&&void 0!==e.objectNumber)throw Ff(e.objectNumber,"taken");if(!u)throw new N(G.Unknown,`${e.label??"create"}: EPDFPage_CreateAnnotRaw returned NULL`);try{if(yg(e.label,()=>{(function(e,t,n,r,i){if(bG(r.subtype)){let i,o;return DZ(e,t,n,r),i=r.quadPoints,bO(e,t,n,i),bN(e,t,n,i),o=t5[r.subtype],DA(e,n,r.color??o.color),DS(e,n,r.opacity??o.opacity),"strikeout"===r.subtype&&null!=r.intent&&DU(e,n,_x(r.intent))}if(bR(r.subtype))return DZ(e,t,n,r),be(e,t,n,{box:r.box,rotation:r.rotation??null}),bh(e,t,n,r),null!=r.cloudyIntensity&&r.cloudyIntensity>0&&Dj(e,n,r.cloudyIntensity);if(bX(r.subtype)){if("polygon"===r.subtype){let i;DZ(e,t,n,r),i=bw(e,t,n,[r.vertices],r.rotation),bv(e,t,n,bJ(r,i)),bh(e,t,n,r),DR(e,t,n,i.drawn[0]),null!=r.cloudyIntensity&&r.cloudyIntensity>0&&Dj(e,n,r.cloudyIntensity)}else{let i;DZ(e,t,n,r),i=bw(e,t,n,[r.vertices],r.rotation),bv(e,t,n,bJ(r,i)),bh(e,t,n,r),DR(e,t,n,i.drawn[0]),DL(e,n,r.lineEndings??t5.polyline.lineEndings)}return}if("line"===r.subtype)return function(e,t,n,r){DZ(e,t,n,r),bv(e,t,n,r),bh(e,t,n,r);let{start:i,end:o}=r.linePoints,[a]=bw(e,t,n,[[i,o]],r.rotation).drawn;DT(e,t,n,{start:a[0],end:a[1]}),DL(e,n,r.lineEndings??t5.line.lineEndings)}(e,t,n,r);if("link"===r.subtype){var o,a,s,l,u,d,c,f,m=e,p=t,h=n,F=r,g=i;if(DZ(m,p,h,F),Dx(m,p,h,F.rect),!m.FPDFAnnot_SetBorder(h,0,0,0))throw new N(G.Unknown,"FPDFAnnot_SetBorder returned false");F.target&&bS(m,p,h,F.target,g);return}if("ink"===r.subtype)return DZ(e,t,n,r),null!=r.intent&&DU(e,n,_8(r.intent)),bd(e,t,n,r),DB(e,t,n,bw(e,t,n,r.inkList,r.rotation).drawn);if(bD(r.subtype)){let o,a;return s=e,l=t,u=n,d=r,c=i,DZ(s,l,u,d),be(s,l,u,{box:d.box,rotation:d.rotation??null}),o=d.interiorColor??null,null===o?Dv(s,u,0):DA(s,u,o,0),DS(s,u,d.opacity??bg.opacity),bf(s,l,u,d),null!=d.cloudyIntensity&&Dj(s,u,d.cloudyIntensity),bu(s,u,d.fontFamily??bg.fontFamily,d.fontSize??bg.fontSize,d.color??bg.color,c),a=d.richText,Dz(s,u,_H(a.body?.align??bg.textAlign)),DU(s,u,_$[d.intent??bg.intent]),void 0!==d.verticalAlign&&d.verticalAlign!==bg.verticalAlign&&bP(s,u,d.verticalAlign),null!=d.calloutLine&&DH(s,l,u,d.calloutLine),null!=d.lineEnding&&DL(s,u,{start:"none",end:d.lineEnding}),b_(s,u,a,c,d.fontFamily??bg.fontFamily)}if("caret"===r.subtype)return DZ(e,t,n,r),be(e,t,n,{box:r.box,rotation:r.rotation??null}),DA(e,n,r.color??bn.color),DS(e,n,r.opacity??bn.opacity),null!=r.intent&&DU(e,n,_k(r.intent));if("text"===r.subtype)return DZ(e,t,n,r),Dx(e,t,n,r.rect),DA(e,n,r.color??bq.color),DS(e,n,r.opacity??bq.opacity),bK(e,n,r.icon??bq.icon),void 0!==r.open&&bH(e,n,r.open),null!=r.stateModel&&DG(e,t,n,"StateModel",Py[o=r.stateModel]??o),null!=r.state&&DG(e,t,n,"State",Pw[a=r.state]??a);if(bT(r.subtype)){let o;return DZ(e,t,n,r),null!=r.name&&bB(e,n,r.name),void 0!==r.opacity&&DS(e,n,r.opacity),o=null===r.fit?"fill":r.fit??t5.stamp.fit,bW(e,t,n,bz(i),bV(i),o,{box:r.box,rotation:r.rotation??null}),null!==r.fit&&PD(e,t,n,o)}if(bi(r.subtype)){let o;return DZ(e,t,n,r),Dx(e,t,n,r.rect),DA(e,n,r.color??br.color),DS(e,n,r.opacity??br.opacity),bo(e,n,r.icon??br.icon),o=r.file,_O(e,t,ba(e,t,n,o.name),bl(i),(f=o,{...null!=f.mimeType?{mimeType:f.mimeType}:{},...null!=f.description?{description:f.description}:{}}),{bytes:bs(i)})}if(bY(r.subtype))return function(e,t,n,r,i){let{actions:o,...a}=r;DZ(e,t,n,a),b3(e,t,n,{box:r.box,rotation:r.rotation??null},null),b0(e,t,n,r,i)}(e,t,n,r,i);if("popup"===r.subtype)return DZ(e,t,n,r),Dx(e,t,n,r.rect),void 0!==r.open&&bk(e,n,r.open);if(bM(r.subtype)){let o,a;return DZ(e,t,n,r),(o=r.quadPoints??[]).length>0&&bO(e,t,n,o),r.rect?Dx(e,t,n,r.rect):bN(e,t,n,o),DA(e,n,r.color??bC.color,0),DS(e,n,r.opacity??bC.opacity),a=r.interiorColor??null,null!==a&&DA(e,n,a,1),null!=r.overlayText&&r.overlayText.length>0&&DW(e,t,n,r.overlayText),r.repeat&&Dq(e,n,!0),bj(r)&&bu(e,n,r.fontFamily??bC.fontFamily,r.fontSize??bC.fontSize,r.fontColor??bC.fontColor,i),void 0!==r.textAlign&&Dz(e,n,_H(r.textAlign))}throw new N(G.NotImplemented,`no writer registered for draft.subtype=\'${r.subtype}\'`)})(n,r,u,s,a),b2(n,u,s,a)}),b7(n,u,s.blendMode),(l=n.EPDFAnnot_GetObjectNumber(u))<=0)throw new N(G.Unknown,`${e.label??"create"}: EPDFPage_CreateAnnotRaw made a direct object`)}finally{n.FPDFPage_CloseAnnot(u)}return{pageIndex:o.pageIndex,pageObjectNumber:o.pageObjectNumber,index:n.EPDFPage_GetAnnotCountRaw(i,o.pageIndex)-1,objectNumber:l}}),l=[],u=(e,t)=>"number"==typeof e?this.withOpen(s[e],t):this.withOpenExisting(e,t);a.forEach(({replyTo:e,parent:t},o)=>{e&&this.withOpen(s[o],t=>u(e.to,n=>b9(this.runtime,t,n,e.type))),void 0!==t&&this.withOpen(s[o],e=>u(t,o=>{ye(this.runtime,e,o),"number"!=typeof t&&l.push(gI(n,r,i,t.page,o,t.index))}))});let d=new Date;a.forEach(({create:{attribution:e,fileDates:t,label:i}},o)=>{this.withOpen(s[o],o=>yg(i,()=>{if("stamp"===e.kind){var i;i=e.actor,i?.displayName&&DQ(n,r,o,i.displayName),DX(n,r,o,d),DY(n,r,o,d),i&&(i.userId||i.groupId)&&(n.EPDFAnnot_SetEmbedMetadataNumber(o,Pd,1),i.userId&&(Ph(n,r,o,Pc,i.userId),Ph(n,r,o,Pm,i.userId),Ph(n,r,o,Pp,i.userId)),i.groupId&&Ph(n,r,o,Pf,i.groupId))}else!function(e,t,n,r,i){null===r.author?e.EPDFAnnot_RemoveKey(n,"T"):DQ(e,t,n,r.author),null===r.createdAt?e.EPDFAnnot_RemoveKey(n,"CreationDate"):DX(e,t,n,r.createdAt),null===r.modifiedAt?e.EPDFAnnot_RemoveKey(n,"M"):DY(e,t,n,r.modifiedAt);let o=[[Pc,r.userId],[Pm,r.createdBy],[Pp,r.modifiedBy],[Pf,r.groupId],["ImportedBy",i]];if(!o.every(([,e])=>!e))for(let[r,i]of(e.EPDFAnnot_SetEmbedMetadataNumber(n,Pd,1),o))i&&Ph(e,t,n,r,i)}(n,r,o,e.from,e.importedBy);t&&function(e,t,n,r){let i=e.EPDFAnnot_GetFileAttachmentForWrite(n);if(i)for(let[n,o]of[["CreationDate",r.createdAt],["ModDate",r.modifiedAt]]){if(!o)continue;let r=t.writeU16String(hH(o));try{e.FPDFAttachment_SetStringValue(i,n,r)}finally{t.free(r)}}}(n,r,o,t)}))});let c=gJ(this.session,this.fonts),f=s.map(e=>this.withOpen(e,t=>b8(n,r,t,e.pageObjectNumber,e.index,c)));return Dd(this.runtime,this.session,f),{created:f,meta:yF(this.session.writeStamp(),s,l)}}claimName(e,t,n){if(!e)return;let r=`${t.pageIndex}\\0${e}`,i=this.session.requireDocPtr();if(n.has(r)||b5(this.runtime,i,t.pageIndex,e)>=0)throw b4(e,t.pageObjectNumber);n.add(r)}linkTarget(e,t,n,r){if("planned"in e){if(e.planned<0||e.planned>=n)throw new N(G.InvalidArg,`no create ${e.planned} to link to`);return e.planned}let{existing:i}=e;if(i.page.objectNumber!==t.objectNumber)throw new N(G.InvalidArg,"reply"===r?`/IRT parent must be on the same page as the reply (parent page ${i.page.objectNumber}, reply page ${t.objectNumber})`:`a popup\'s parent must be on the same page (parent page ${i.page.objectNumber}, popup page ${t.objectNumber})`);return{page:i.page,...gC(this.runtime,this.session,i)}}writeContext(e){return{...yp(this.runtime,this.session,this.fonts),docPtr:this.session.requireDocPtr(),drawings:this.session.drawingIndex(),pdfPageCount:e=>DE(this.runtime.fn,this.runtime.mem,e),...e?{resources:e}:{}}}withOpen(e,t){let{fn:n}=this.runtime,r=n.EPDFPage_GetAnnotRaw(this.session.requireDocPtr(),e.pageIndex,e.index);if(!r)throw new N(G.Unknown,"a created annotation is not where it was");try{if(n.EPDFAnnot_GetObjectNumber(r)!==e.objectNumber)throw new N(G.Unknown,"a created annotation is not where it was");return t(r)}finally{n.FPDFPage_CloseAnnot(r)}}withOpenExisting(e,t){let{fn:n}=this.runtime,r=n.EPDFPage_GetAnnotRaw(this.session.requireDocPtr(),e.pageIndex,e.index);if(!r)throw new N(G.Unknown,"an annotation to link to is not where it was");try{return t(r)}finally{n.FPDFPage_CloseAnnot(r)}}};function yF(e,t,n){return{affectedPages:[...new Set(t.map(e=>e.pageObjectNumber))].map(e=>q(e)),cacheDelta:null,...e,changedRefs:[...t.map(e=>({kind:"objectNumber",page:q(e.pageObjectNumber),objectNumber:e.objectNumber})),...n]}}function yg(e,t){try{return t()}catch(t){if(!e||!N.is(t))throw t;throw new N(t.code,`${e}: ${t.message}`,{...t.details?{details:t.details}:{},cause:t})}}var y_=class{constructor(e,t){this.runtime=e,this.ids=t,hJ(this,"fileHandles",[]),hJ(this,"identities",new Map),hJ(this,"programs",new Map),hJ(this,"fallbacks",[]),hJ(this,"builtIn",new Set),this.registerLastResort()}registerLastResort(){let e=function(e){let t=e.endsWith("==")?2:+!!e.endsWith("="),n=new Uint8Array(e.length/4*3-t),r=0;for(let t=0;t>16),r>8&255),r{try{return e()}catch{return t}};return{familyName:i(()=>h2(r,(t,r)=>n.EPDFFont_GetFamilyName(e,t,r))??t.familyName,t.familyName),weight:i(()=>n.EPDFFont_GetWeight(e),t.weight||400),italic:i(()=>n.EPDFFont_IsItalic(e),1===t.italic),embeddingPermission:i(()=>(function(e){switch(e){case 1:return"editable";case 2:return"preview-and-print";default:return"installable"}})(n.EPDFFont_GetEmbeddingPermission(e)),"installable"),editingAuthorized:i(()=>n.EPDFFont_IsEditingAuthorized(e),!0),instanced:i(()=>n.EPDFFont_IsInstanced(e),!1)}}registerStartup(e){for(let t of e){let e=void 0===t.italic?-1:+!!t.italic;this.registerFromNodeFile(t.key,t.familyName??"",t.weight??0,e,t.path,t.serve??!1,t.builtIn??!1),t.fallback&&this.addFallback(t.key,t.tier)}}addFallback(e,t=0){let n=this.requireId(e);if(!this.runtime.fn.EPDFFont_AddFallbackFont(n,t))throw new N(G.InvalidArg,`addFallback failed: ${e}`);let r=this.fallbacks.find(t=>t.key===e);r?r.tier=t:this.fallbacks.push({key:e,tier:t})}clearFallbacks(){this.runtime.fn.EPDFFont_ClearFallbackFonts(),this.fallbacks=[]}fallbackKeys(){return[...this.fallbacks].sort((e,t)=>e.tier-t.tier).map(e=>e.key)}engineFontFacts(){let e=[];for(let[t,n]of this.identities){let r=this.programs.get(t);r&&e.push({key:t,identity:n,postScriptName:r.postScriptName,format:r.format,sha256:r.sha256,served:r.served,builtIn:this.builtIn.has(t)})}return e}keyForId(e){for(let[t,n]of this.ids)if(n===e)return t}programFor(e){let t=[...this.programs].find(([,t])=>t.sha256===e)?.[0];if(void 0===t)return;let n=this.requireId(t),{fn:r,mem:i}=this.runtime;return{info:()=>{let e=yn(this.runtime,(e,t)=>r.EPDFFont_GetCoverage(n,e,t)),t=h0(i,[4,4],([e,t])=>r.EPDFFont_GetMetrics(n,e,t)?{ascent:Number(i.peek(e,"f32")),descent:Number(i.peek(t,"f32"))}:{ascent:0,descent:0});return{covers:e,ascent:Math.round(1e3*t.ascent),descent:-Math.round(1e3*t.descent)}},bytes:()=>{let e=r.EPDFFont_GetProgramData(n,0n,0);return hY(i,Math.max(1,e),t=>(r.EPDFFont_GetProgramData(n,t,e),i.readBytes(t,e)))}}}readProgram(e){let{fn:t,mem:n}=this.runtime;return{sha256:hY(n,32,r=>t.EPDFFont_GetProgramHash(e,r)?Array.from(n.readBytes(r,32),e=>e.toString(16).padStart(2,"0")).join(""):""),format:2===t.EPDFFont_GetProgramFormat(e)?"opentype":"truetype",postScriptName:h2(n,(n,r)=>t.EPDFFont_GetPostScriptName(e,n,r))||null}}clear(){for(let e of(this.runtime.fn.EPDFFont_ClearRegisteredFonts(),this.registerLastResort(),this.ids.clear(),this.identities.clear(),this.programs.clear(),this.fallbacks=[],this.builtIn.clear(),this.fileHandles))e.close();this.fileHandles.length=0}idFor(e){return this.requireId(e)}requireId(e){let t=this.ids.get(e);if(void 0===t)throw new N(G.InvalidArg,`font not registered on this thread: ${e}`);return t}};function yP(e,t,n){return{affectedPages:[q(t)],cacheDelta:null,...e,changedRefs:[...n]}}var yD=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}writeContext(e){return{...yp(this.runtime,this.session,this.fonts),runtime:this.runtime,docPtr:this.session.requireDocPtr(),drawings:this.session.drawingIndex(),pdfPageCount:e=>DE(this.runtime.fn,this.runtime.mem,e),...e?{resources:e}:{}}}create(e,t,n,r={}){let{actor:i,resources:o,objectNumber:a}=r,{reply:s,...l}=t,u="popup"===t.subtype?t.parent:null;"popup"===t.subtype&&delete l.parent;let{created:d,meta:c}=new yh(this.runtime,this.session,this.fonts).create([{page:q(e),draft:l,...s?{replyTo:{to:{existing:s.to},type:s.type??"reply"}}:{},...u?{parent:{existing:u}}:{},...o?{resources:o}:{},...void 0!==a?{objectNumber:a}:{},attribution:{kind:"stamp",...i?{actor:i}:{}}}],n);return{annotation:d[0],meta:c}}update(e,t,n,r,i){hW(r);let{fn:o,mem:a}=this.runtime,{pageIndex:s,index:l}=gC(this.runtime,this.session,e),u=gM(this.runtime,this.session,s,l);try{let b,y,w;hW(r);let E=this.writeContext(i),A=Df(o.EPDFAnnot_GetBlendMode(u)),v=b8(o,a,u,e.page.objectNumber,l,gJ(this.session,this.fonts));Dd(this.runtime,this.session,[v]);let S=o6(n,v,t.groupId);var d,c,f,m,p,h,F,g,_,P=u,D=t;if(("polygon"===v.subtype||"polyline"===v.subtype)&&tK(D)&&o.FPDFAnnot_HasKey(P,"EMBD_Metadata")&&6!==o.FPDFAnnot_GetValueType(P,"EMBD_Metadata"))throw new N(G.InvalidArg,"Malformed annotation metadata cannot store a caption");t=function(e,t,n={}){var r,i;let o,a=(r=function(e,t){let{rect:n,...r}=t;if(void 0===n||!tC.has(e.subtype))return t;if(!eq(n))throw new N(G.InvalidArg,`${e.subtype} update field \'rect\': not a rect of finite numbers`,{details:{field:"rect"}});if(tv(eH(n),e.rect))return r;let i=tM(e.subtype).find(n=>{let r=t[n];return void 0!==r&&!tv(r,e[n])});if(i)throw new N(G.InvalidArg,`${e.subtype} update field \'rect\': a new rect moves the shape, so it can\'t come with a new \'${i}\'`,{details:{field:"rect"}});let{left:o,bottom:a,right:s,top:l}=n;return{...r,...function(e,t){let n=e.subtype;if(!tC.has(n))return{rect:t};let r=eH(t),i=eH(e.rect),o=r.right-r.left,a=r.top-r.bottom,s=i.right-i.left,l=i.top-i.bottom,u=tv(o,s),d=tv(a,l);if(!u&&o<=0||!d&&a<=0)throw tR(n,"a rect needs a width and a height");let c=e.rotation??0,f=to[n],m="box"===f.box?eQ(c):null;if(!tv((c%360+360)%360,0)&&null===m&&(!u||!d))throw tR(n,"a turned drawing\'s rect can only move; resize its shape instead");if(!u&&s<=0||!d&&l<=0)throw tR(n,"its rect has no width or height to stretch; it can only move");let p=u?1:o/s,h=d?1:a/l,F=e=>({x:r.left+(e.x-i.left)*p,y:r.bottom+(e.y-i.bottom)*h}),g=e=>{let t=F({x:e.left,y:e.bottom}),n=F({x:e.right,y:e.top});return eH({left:t.x,bottom:t.y,right:n.x,top:n.y})},_={box:e=>null===m||0===m||180===m?g(e):eX(g(eJ(e,m)),m),point:F,points:e=>e.map(F),strokes:e=>e.map(e=>e.map(F)),quads:e=>e.map(e=>({upperLeft:F(e.upperLeft),upperRight:F(e.upperRight),lowerLeft:F(e.lowerLeft),lowerRight:F(e.lowerRight)})),linePoints:e=>({start:F(e.start),end:F(e.end)}),calloutLine:e=>e.map(F)},P={};for(let t of tM(n)){let n=e[t],r=f[t];null!=n&&r&&(P[t]=_[r](n))}return P}(e,{left:o,bottom:a,right:s,top:l})}}(e,function(e,t){let n=function(e,t){var n;let r;if(void 0===t||t===e.subtype)return e.subtype;let i=(n=e.subtype,(r=ts.find(e=>e.includes(n)))?r.filter(e=>e!==n):[]);if(!i.includes(t))throw new N(G.InvalidArg,0===i.length?`${e.subtype} has no other kind it can become`:`${e.subtype} can become ${i.length<2?i.join(""):`${i.slice(0,-1).join(", ")} or ${i.at(-1)}`}, not ${t}`,{details:{field:"subtype"}});let o=function(e,t){let n=tn(t)?.owners??{};for(let t of Object.keys(tn(e.subtype)?.owners??{})){let r=e[t];if(!(t in n)&&null!=r)return t}return null}(e,t);if(null!==o){let n=e[o];throw new N(G.InvalidArg,`${e.subtype} field \'${o}\' holds ${"string"==typeof n?`\'${n}\'`:JSON.stringify(n)}, and ${t} has no such field: clear it first, in the same change`,{details:{field:o}})}return t}(e,t.subtype);if("unsupported"===e.subtype)throw new N(G.InvalidArg,"an annotation of a type the engine doesn\'t model can\'t be updated");return ni(n,t),{...t,subtype:n}}(e,t)),o=tn(e.subtype)?.colors??[],i=nn(r,(t,n)=>{let r=e[t];return o.includes(t)&&"string"==typeof n&&"string"==typeof r&&n.toLowerCase()===r.toLowerCase()}),nn(i,(t,n)=>void 0!==n&&tv(n,e[t])));return!function(e,t){let n=t.subtype??e.subtype;if("unsupported"===n)return;for(let[e,r]of Object.entries(hf[n].readBackWrites)){let i=t[e];if(!(void 0===i||r?.safeParse(i).success))throw new N(G.InvalidArg,r?`${n} update field \'${e}\': this value can be read but not written; send it back unchanged or replace it`:`${n} update field \'${e}\': the engine works this out; send it back unchanged or leave it out`,{details:{field:e}})}let r=pX(n).fileSchemas.update.safeParse(t);if(!r.success)throw hC(r.error,`${n} update`)}(e,a),function(e,t,n={}){var r;let i=(r=function(e,t){if("text"!==e.subtype||"text"!==t.subtype||null==t.state||void 0!==t.stateModel)return t;let n=tN(t.state);if(n)return{...t,stateModel:n};if(!e.stateModel)throw nr(t.state);return t}(e,t),t9(e.subtype)&&t7(r.borderStyle,r.dashArray)&&null==e.dashArray?{...r,dashArray:[...t8]}:r);return tJ(i),function(e,t){if("line"!==e.subtype&&"polygon"!==e.subtype&&"polyline"!==e.subtype)return t;let n=e.subtype,r={...t,subtype:n};if(tZ(n,r),null!=r.measure&&"rectilinear"!==r.measure.subtype){if(e.measure?.subtype!==r.measure.subtype)throw new N(G.InvalidArg,`A ${"geospatial"===r.measure.subtype?"geospatial":"foreign"} measure can\'t be written; leave measure out`);r={...r,measure:void 0}}if("line"===e.subtype&&"line"===r.subtype)tK(r)&&(r={...r,captionEnabled:void 0===r.captionEnabled?e.captionEnabled:r.captionEnabled,captionPosition:r.captionPosition??e.captionPosition,captionOffset:void 0===r.captionOffset?e.captionOffset:r.captionOffset});else if("line"!==e.subtype&&"line"!==r.subtype){if(r.vertices&&null!==r.captionEnabled&&void 0===r.captionCenter&&e.captionCenter){let t=function(e,t,n){if(e.length!==t.length||e.length<2)return;let r=e[0],i=t[0],o=e.findIndex(e=>Math.hypot(e.x-r.x,e.y-r.y)>1e-6);if(o<0)return;let a={x:e[o].x-r.x,y:e[o].y-r.y},s={x:t[o].x-i.x,y:t[o].y-i.y},l=a.x*a.x+a.y*a.y,u=(a.x*s.x+a.y*s.y)/l,d=(a.x*s.y-a.y*s.x)/l;if(Math.abs(u*u+d*d-1)>1e-5)return;let c=e=>({x:i.x+u*(e.x-r.x)-d*(e.y-r.y),y:i.y+d*(e.x-r.x)+u*(e.y-r.y)});if(e.every((e,n)=>{let r=c(e);return .001>=Math.hypot(r.x-t[n].x,r.y-t[n].y)}))return c(n)}(e.vertices,r.vertices,e.captionCenter);t&&(r={...r,captionCenter:t})}tK(r)&&(r=null===r.captionEnabled?{...r,captionEnabled:null,captionCenter:null}:{...r,captionEnabled:r.captionEnabled??e.captionEnabled??!1,captionCenter:void 0===r.captionCenter?e.captionCenter:r.captionCenter})}if(tq.some(e=>void 0!==r[e])){let t=tU({...e,...r});"unavailable"in t||(r={...r,contents:t.label})}return tZ(n,r),r}(e,function(e,t){var n;let r,i,o,a,s,l;if("free-text"!==e.subtype||"free-text"!==t.subtype)return t;let u=e.calloutLine;if(!u||void 0!==t.calloutLine||void 0===t.box&&void 0===t.rotation)return t;let d=t.box??e.box,c=(void 0===t.rotation?e.rotation:t.rotation)??0,f=3===u.length?u[1]:void 0,m=(n=f??u[0],r={x:(d.left+d.right)/2,y:(d.bottom+d.top)/2},i={degrees:c,center:r},a=(o=c?e3(n,i):n).x-r.x,s=o.y-r.y,l=Math.abs(a)>=Math.abs(s)?{x:a>=0?d.right:d.left,y:r.y}:{x:r.x,y:s>0?d.top:d.bottom},c?e1(l,i):l);return{...t,calloutLine:f?[u[0],f,m]:[u[0],m]}}(e,function(e,t){if(!tQ(t.subtype??e.subtype))return t;let{richText:n}=t;if(n)return{...t,contents:e5(n)};if(null===n||void 0===t.contents||!e.richText)return t;if(null===t.contents)return{...t,richText:null};let r={paragraphs:e4(t.contents)};return{...t,richText:r,contents:e5(r)}}(e,function(e,t,n){let r;if("free-text"!==e.subtype||"free-text"!==t.subtype)return t;(void 0!==t.intent||void 0!==t.calloutLine)&&nt(t.intent??e.intent,void 0!==t.calloutLine?t.calloutLine:e.calloutLine);let i=ne({},t,n),o=void 0!==t.richText||void 0!==t.contents;if(!o&&0===Object.keys(i).length)return t;let a={...t.richText?.body?{...e6,...t.richText.body}:e.richText.body,...i},s={body:a,paragraphs:t.richText?.paragraphs??(void 0!==t.contents?e4(t.contents??""):e.richText.paragraphs)};return{...t,...(r={},void 0===t.fontSize&&void 0!==a.size&&a.size!==e.fontSize&&(r.fontSize=a.size),void 0===t.fontColor&&void 0!==a.color&&a.color.toLowerCase()!==e.fontColor?.toLowerCase()&&(r.fontColor=a.color.toLowerCase()),void 0===t.textAlign&&void 0!==a.align&&a.align!==e.textAlign&&(r.textAlign=a.align),r),richText:s,...o?{contents:e5(s)}:{}}}(e,i,n.describeFont))))}(e,a,n)}(v,t,{describeFont:E.describeFont}),function(e,t){if("widget"!==e.subtype||!e.hasMark)return;let n=rM.filter(n=>void 0!==t[n]&&!tv(t[n],e[n]));if(n.length>0)throw new N(G.InvalidArg,`the widget has a mark in it, which its style doesn\'t draw: ${n.join(", ")} can\'t change`)}(v,t),nO(v.subtype,i,"update"),m=t,bT(b6(m))&&(void 0!==m.name&&null!==m.name&&bL(m.name),null!=m.fit&&b$(m.fit),y=E?.resources?.appearance,void 0!==y&&bU(y,E)),hW(r);let k=i?.appearance?"regenerate":(p=t,function(e,t){if(void 0!==t.subtype&&t.subtype!==e.subtype)return tx;let n=e.subtype,r=void 0===t.captionEnabled?e.captionEnabled:t.captionEnabled,i=tb.has(n)||["line","polygon","polyline"].includes(n)&&!0===r,o=[];for(let[n,r]of Object.entries(t))!(void 0===r||tD.has(n))&&("contents"!==n||i)&&(tv(r,e[n])||o.push(n));if(0===o.length)return tk;let a=tw[n],s=a&&("polygon"===n||"polyline"===n)&&e.captionCenter?[...a,"captionCenter"]:a;if(!s||!o.every(e=>s.includes(e)))return tx;let l=function(e,t,n,r){let[i]=r,o=tS(e[i]),a=tS(t[i]);if(!o||!a)return null;let s=a.x-o.x,l=a.y-o.y;if(ty.has(n)){let n=void 0===t.rotation?e.rotation:t.rotation;if(!tE(tA(e.rotation),tA(n)))return null}for(let n of r){let r=e[n],i=t[n];if((null!=r||null!=i)&&(null==r||null==i||!function e(t,n,r,i){if(null==t||null==n)return null==t&&null==n;if(Array.isArray(t)||Array.isArray(n))return!!Array.isArray(t)&&!!Array.isArray(n)&&t.length===n.length&&t.every((t,o)=>e(t,n[o],r,i));if("object"==typeof t&&"object"==typeof n){for(let o of new Set([...Object.keys(t),...Object.keys(n)])){let a=t[o],s=n[o];if("number"==typeof a&&"number"==typeof s){if(!tE(a+("left"===o||"right"===o||"x"===o?r:"bottom"===o||"top"===o||"y"===o?i:0),s))return!1}else if(!e(a,s,r,i))return!1}return!0}return t===n}(r,i,s,l)))return null}return{x:s,y:l}}(e,t,n,s);return l?{impact:"translation",by:l}:tx}(v,p).impact);if("inert"!==k&&function(e,t,n){var r,i;let o;if(!__.has(e.FPDFAnnot_GetSubtype(n)))return;let a=_E(e,t,n);r=a,i=function(e,t,n){let r=_y(e,t,n);if(!r)return;let i=_F(r.degrees);return void 0===i?void 0:{rotation:i,box:r.box}}(e,t,n),(r&&i?(o=r.rotation,.05>=_b(o,i.rotation)&&eY(r.box,i.box)):!r&&!i)||(a?(D5(e,n,a.rotation),D8(e,t,n,a.box)):(e.EPDFAnnot_ClearEmbedMetadataKey(n,D3),e.EPDFAnnot_ClearEmbedMetadataKey(n,D2)))}(o,a,u),void 0!==t.subtype&&t.subtype!==v.subtype&&!o.EPDFAnnot_SetSubtype(u,rI[t.subtype]))throw new N(G.Unknown,"EPDFAnnot_SetSubtype returned false");h=u,F=t,function(e,t,n,r,i){var o,a;let s=b6(r);if(bG(s)){var l=e,u=t,d=n,c=r;if(DJ(l,u,d,c),void 0!==c.color&&DA(l,d,c.color),void 0!==c.opacity&&DS(l,d,c.opacity),"strikeout"===c.subtype&&void 0!==c.intent&&DV(l,d,null===c.intent?null:_x(c.intent)),void 0!==c.quadPoints){let e=D0(_m(l,u,d).flatMap(bx),c.quadPoints.flatMap(bx));bI(l,u,d,c.quadPoints),e?D1(l,u,d,e):bN(l,u,d,c.quadPoints)}return}if(bR(s))return DJ(e,t,n,r),bt(e,t,n,r),bF(e,t,n,r),void 0!==r.cloudyIntensity&&(null!==r.cloudyIntensity&&r.cloudyIntensity>0?Dj(e,n,r.cloudyIntensity):DM(e,n));if(bX(s))return"polygon"===s?(DJ(e,t,n,r),bQ(e,t,n,r),bF(e,t,n,r),void 0!==r.cloudyIntensity&&(null!==r.cloudyIntensity&&r.cloudyIntensity>0?Dj(e,n,r.cloudyIntensity):DM(e,n))):(DJ(e,t,n,r),bQ(e,t,n,r),bF(e,t,n,r),void 0!==r.lineEndings&&DL(e,n,r.lineEndings));if("line"===s)return function(e,t,n,r){DJ(e,t,n,r),bv(e,t,n,r),bF(e,t,n,r);let i=r.linePoints&&[[r.linePoints.start,r.linePoints.end]],o=bA(e,t,n,bE(e,t,n),i,r.rotation);if(o){let[r]=o.drawn;DT(e,t,n,{start:r[0],end:r[1]})}void 0!==r.lineEndings&&DL(e,n,r.lineEndings)}(e,t,n,r);if("link"===s){var f=e,m=t,p=n,h=r,F=i;if(DJ(f,m,p,h),void 0!==h.rect&&Dx(f,m,p,h.rect),null===h.target){var g=f,_=p;if(!g.EPDFAnnot_RemoveAction(_)||!g.EPDFAnnot_RemoveDest(_))throw new N(G.Unknown,"failed to clear link target")}else if(void 0!==h.target){if("goto"!==h.target.kind&&"uri"!==h.target.kind&&"named"!==h.target.kind)throw new N(G.InvalidArg,`a \'${h.target.kind}\' link target can\'t be written`,{details:{field:"target"}});bS(f,m,p,h.target,F)}return}if("ink"===s){let i;return DJ(e,t,n,r),void 0!==r.intent&&DV(e,n,null===r.intent?null:_8(r.intent)),bm(e,t,n,r),(i=bA(e,t,n,bE(e,t,n),r.inkList,r.rotation))&&DB(e,t,n,i.drawn)}if(bD(s)){var P=e,D=t,b=n,y=r,w=i;if(DJ(P,D,b,y),bt(P,D,b,y),void 0!==y.interiorColor&&(null===y.interiorColor?Dv(P,b,0):DA(P,b,y.interiorColor,0)),void 0!==y.opacity&&DS(P,b,y.opacity),bp(P,D,b,y),void 0!==y.cloudyIntensity&&(null===y.cloudyIntensity?DM(P,b):Dj(P,b,y.cloudyIntensity)),void 0!==y.color){let e=_u(P,D,b);e?D$(P,b,-1,e.fontSize>0?e.fontSize:bg.fontSize,y.color):bu(P,b,bg.fontFamily,bg.fontSize,y.color,w)}void 0!==y.richText&&b_(P,b,y.richText,w,y.fontFamily),void 0!==y.textAlign&&Dz(P,b,_H(y.textAlign)),void 0!==y.intent&&DU(P,b,_$[y.intent]),void 0!==y.verticalAlign&&bP(P,b,y.verticalAlign),null===y.calloutLine?P.EPDFAnnot_RemoveKey(b,"CL"):void 0!==y.calloutLine&&DH(P,D,b,y.calloutLine),null===y.lineEnding?P.EPDFAnnot_RemoveKey(b,"LE"):void 0!==y.lineEnding&&DL(P,b,{start:"none",end:y.lineEnding});return}if("caret"===s)return DJ(e,t,n,r),bt(e,t,n,r),void 0!==r.color&&DA(e,n,r.color),void 0!==r.opacity&&DS(e,n,r.opacity),void 0!==r.intent&&DV(e,n,null===r.intent?null:_k(r.intent));if("text"===s)return DJ(e,t,n,r),void 0!==r.rect&&Dx(e,t,n,r.rect),void 0!==r.color&&DA(e,n,r.color),void 0!==r.opacity&&DS(e,n,r.opacity),void 0!==r.icon&&bK(e,n,r.icon),void 0!==r.open&&bH(e,n,r.open),void 0!==r.stateModel&&DO(e,t,n,"StateModel",null===r.stateModel?null:Py[o=r.stateModel]??o),void 0!==r.state&&DO(e,t,n,"State",null===r.state?null:Pw[a=r.state]??a);if(bT(s))return function(e,t,n,r,i){DJ(e,t,n,r),null===r.name?e.EPDFAnnot_RemoveKey(n,"Name"):void 0!==r.name&&bB(e,n,r.name);let o=PP(e,t,n)??"fill",a=void 0!==r.fit?r.fit??"fill":o;void 0!==r.fit&&PD(e,t,n,r.fit);let s=i?.resources?.appearance;if(void 0!==s){void 0!==r.opacity&&DS(e,n,r.opacity);let o=_A(e,t,n);bW(e,t,n,s,bV(i),a,{box:r.box??o.box,rotation:void 0===r.rotation?o.rotation:r.rotation});return}let l=bt(e,t,n,r);void 0!==r.opacity?function(e,t,n,r){if(!e.EPDFAnnot_SetStampOpacity(t,Pg[n],r))throw new N(G.Unknown,"EPDFAnnot_SetStampOpacity returned false")}(e,n,a,r.opacity):(l||void 0!==r.fit)&&Pb(e,n,a)}(e,t,n,r,i);if(bi(s))return DJ(e,t,n,r),void 0!==r.rect&&Dx(e,t,n,r.rect),void 0!==r.color&&DA(e,n,r.color),void 0!==r.opacity&&DS(e,n,r.opacity),void 0!==r.icon&&bo(e,n,r.icon),function(e,t,n,r,i){let o=i?.resources?.file;if(void 0===r&&void 0===o)return;let a=e.EPDFAnnot_GetFileAttachmentForWrite(n);if(null===r){if(a)throw new N(G.InvalidArg,"a file attachment\'s file can\'t be removed");if(void 0===o)return}let s=a?_I(e,t,a):null;if(!a){if(!r||void 0===o)throw new N(G.InvalidArg,"the file attachment has no file: send the file\'s name as `file` and its bytes as the `file` resource");a=ba(e,t,n,r.name)}let l=r?r.mimeType??null:s?.mimeType??null;if(void 0!==o?_O(e,t,a,bl(i),{mimeType:l},{bytes:o}):l!==(s?.mimeType??null)&&function(e,t,n){if(!e.EPDFAttachment_SetSubtype(t,n??""))throw new N(G.InvalidArg,"the file attachment\'s file has no embedded data to give a MIME type")}(e,a,l),r){if(null!==s&&r.name!==s.name&&!h6(t,r.name,t=>e.EPDFAttachment_SetName(a,t)))throw new N(G.Unknown,"EPDFAttachment_SetName returned false");if((r.description??null)!==(s?.description??null)&&!h6(t,r.description??"",t=>e.EPDFAttachment_SetDescription(a,t)))throw new N(G.Unknown,"EPDFAttachment_SetDescription returned false")}}(e,t,n,r.file,i);if(bY(s))return function(e,t,n,r,i){let{actions:o,...a}=r;if(DJ(e,t,n,a),!function(e,t,n,r){if(void 0===r.box&&void 0===r.rotation)return;let i=eH(g9(e,t,n)),o=PO(e,n);b3(e,t,n,{box:r.box??eX(i,o??0),rotation:void 0===r.rotation?o:r.rotation||null},{rect:i,rotation:o})}(e,t,n,r),b0(e,t,n,r,i),void 0!==r.actions){if(!i?.runtime||!i.docPtr)throw new N(G.InvalidArg,"writing a widget\'s actions requires the runtime and the document on the write context");PM(i.runtime,i.docPtr,n,r.actions)}}(e,t,n,r,i);if("popup"===s)return DJ(e,t,n,r),void 0!==r.rect&&Dx(e,t,n,r.rect),void 0!==r.open&&bk(e,n,r.open);if(bM(s)){var E=e,A=t,v=n,S=r,k=i;if(DJ(E,A,v,S),void 0!==S.rect&&Dx(E,A,v,S.rect),void 0!==S.quadPoints&&(bI(E,A,v,S.quadPoints),void 0===S.rect&&bN(E,A,v,S.quadPoints)),void 0!==S.color&&DA(E,v,S.color,0),void 0!==S.opacity&&DS(E,v,S.opacity),void 0!==S.interiorColor&&(null===S.interiorColor?Dv(E,v,1):DA(E,v,S.interiorColor,1)),void 0!==S.overlayText&&DW(E,A,v,S.overlayText??""),void 0!==S.repeat&&Dq(E,v,S.repeat),bj(S)){let e=_u(E,A,v);bu(E,v,S.fontFamily??(e?_q(e.fontCode):bC.fontFamily),S.fontSize??e?.fontSize??bC.fontSize,S.fontColor??e?.color??bC.fontColor,k)}void 0!==S.textAlign&&Dz(E,v,_H(S.textAlign));return}throw new N(G.NotImplemented,`no writer registered for subtype=\'${s}\'`)}(o,a,h,F,E),b2(o,h,{...F,subtype:b6(F)},E),void 0!==t.contents&&t.contents!==v.contents&&tz({...v,...t})&&o.EPDFAnnot_RemoveKey(u,"RC");let x=null;void 0===t.reply||(d=t.reply,c=v.reply,null===d||null===c?d===c:yb(d.to,c.to)&&(d.type??"reply")===c.type)||function(e,t,n,r,i){let{fn:o}=e;if(null===i.inReplyTo){o.EPDFAnnot_SetLinkedAnnot(n,"IRT",0n),o.EPDFAnnot_SetReplyType(n,0);return}if(i.inReplyTo){if(i.inReplyTo.page.objectNumber!==r)throw new N(G.InvalidArg,`/IRT parent must be on the same page as the reply (parent page ${i.inReplyTo.page.objectNumber}, reply page ${r})`);let a=gj(e,t,i.inReplyTo);try{b9(e,n,a,i.replyType??"reply")}finally{o.FPDFPage_CloseAnnot(a)}return}if(void 0!==i.replyType){let e=o.FPDFAnnot_GetLinkedAnnot(n,"IRT");if(e)try{o.EPDFAnnot_SetReplyType(n,Po(i.replyType))}finally{o.FPDFPage_CloseAnnot(e)}}}(this.runtime,this.session,u,e.page.objectNumber,null===t.reply?{inReplyTo:null}:{inReplyTo:t.reply.to,replyType:t.reply.type??"reply"});let O=!1;"popup"!==t.subtype||"popup"!==v.subtype||void 0===t.parent||yb(t.parent,v.parent)||(O=!0,x=function(e,t,n,r,i,o){let{fn:a}=e;if(o){let r=gj(e,t,o);try{let e=a.FPDFAnnot_GetLinkedAnnot(r,"Popup");if(e){let t=a.EPDFAnnot_GetObjectNumber(e)===a.EPDFAnnot_GetObjectNumber(n);a.FPDFPage_CloseAnnot(e),t&&a.EPDFAnnot_SetLinkedAnnot(r,"Popup",0n)}}finally{a.FPDFPage_CloseAnnot(r)}}if(null===i)return a.EPDFAnnot_SetLinkedAnnot(n,"Parent",0n),null;if(i.page.objectNumber!==r)throw new N(G.InvalidArg,`a popup\'s parent must be on the same page (parent page ${i.page.objectNumber}, popup page ${r})`);let{annotPtr:s,name:l}=gR(e,t,i);try{return ye(e,n,s),l}finally{a.FPDFPage_CloseAnnot(s)}}(this.runtime,this.session,u,e.page.objectNumber,t.parent,v.parent));let I=null,C=t.open;if(void 0!==C&&!O){let e="text"===v.subtype?v.popup:"popup"===v.subtype?v.parent:null;e&&(I=function(e,t,n,r,i){let{fn:o}=e,{annotPtr:a,name:s}=gR(e,t,n);try{if(i&&1!==o.FPDFAnnot_GetSubtype(a))return null;return yt(e,a,r),s}finally{o.FPDFPage_CloseAnnot(a)}}(this.runtime,this.session,e,C,"popup"===v.subtype))}if(DY(o,a,u),g=u,S&&(S.userId||S.groupId)&&(o.EPDFAnnot_HasEmbedMetadata(g)||o.EPDFAnnot_SetEmbedMetadataNumber(g,Pd,1),S.userId&&Ph(o,a,g,Pp,S.userId),S.groupId&&Ph(o,a,g,Pf,S.groupId)),"inert"===k||"translation"===k)b={action:"preserved",changed:!1};else{let e;"widget"!==v.subtype?e=b7(o,u,t.blendMode??A):v.hasMark?(_=u,Pb(o,_,"contain"),e=!1):e=o.EPDFAnnot_GenerateFormFieldAP(u),b=e?{action:"regenerated",changed:!0}:{action:"generation-unavailable",changed:"regenerate"===k}}o.FPDFPage_CloseAnnot(u),u=null,u=gM(this.runtime,this.session,s,l);let j=b8(o,a,u,e.page.objectNumber,l,gJ(this.session,this.fonts));Dd(this.runtime,this.session,[j]);let M=yP(this.session.writeStamp(),e.page.objectNumber,(f=[j.ref,x,I],w=new Set,f.filter(e=>!(null===e||w.has(K(e)))&&(w.add(K(e)),!0))));return{annotation:j,appearance:b,meta:M}}finally{null!==u&&o.FPDFPage_CloseAnnot(u)}}assertNotAttachedWidget(e,t){let{fn:n}=this.runtime;if(20!==n.FPDFAnnot_GetSubtype(e))return;let r=n.EPDFAnnot_GetObjectNumber(e);if(t>0&&r===t)return;let i=function(e,t,n){if(n<=0)return 0;let r=gv(e,t),i=e.fn.EPDFForm_GetFieldIndexForWidget(r,n);return i<0?0:e.fn.EPDFForm_GetFieldObjNum(r,i)}(this.runtime,this.session,r);if(0!==i)throw new N(G.InvalidArg,i===r?"widget is its form field\'s own dictionary (a merged field/widget) - delete the field with doc.forms.delete":"widget is attached to a form field - use doc.forms.removeWidget or doc.forms.delete")}delete(e,t,n){hW(n);let{fn:r}=this.runtime,i=this.session.requireDocPtr(),o=e.page.objectNumber,{pageIndex:a}=this.session.resolvePageRef(e.page),{annotations:s}=new DP(this.runtime,this.session,this.fonts).listOne(o,n),l=tG(s,e);if(0===l.length){var u;throw u=e,new N(G.NotFound,`no annotation ${K(u)} on page ${u.page.objectNumber}`)}o5(t,l);let d=e=>gC(this.runtime,this.session,e).index,c=l.map(e=>d(e.ref));for(let e of c)this.withAnnotAt(a,e,e=>this.assertNotAttachedWidget(e,0));let f=new Set(l.map(e=>K(e.ref))),m=l.flatMap(e=>{if("popup"!==e.subtype||!e.parent)return[];let t=K(e.parent),n=s.find(e=>K(e.ref)===t);return n&&!f.has(t)?[d(n.ref)]:[]});for(let e of(hW(n),gx(this.runtime,this.session,o),[...c].sort((e,t)=>t-e)))if(!r.EPDFPage_RemoveAnnotRaw(i,a,e))throw new N(G.Unknown,`failed to remove annotation ${e} on page ${o}`);for(let e of m){let t=c.filter(t=>tr.EPDFAnnot_RemoveKey(e,"Popup"))}let p=[...l].reverse().map(e=>e.ref);return{meta:yP(this.session.writeStamp(),o,p)}}deleteReleasedWidget(e,t){let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=e.page.objectNumber,{pageIndex:a,index:s}=gC(this.runtime,this.session,e),l=this.withAnnotAt(a,s,o=>(this.assertNotAttachedWidget(o,t),gI(n,r,i,e.page,o,s)));if(gx(this.runtime,this.session,o),!n.EPDFPage_RemoveAnnotRaw(i,a,s))throw new N(G.Unknown,`failed to remove annotation: ${e.kind}`);return{meta:yP(this.session.writeStamp(),o,[l])}}withAnnotAt(e,t,n){let r=gM(this.runtime,this.session,e,t);try{return n(r)}finally{this.runtime.fn.FPDFPage_CloseAnnot(r)}}},yb=(e,t)=>null===e||null===t?e===t:K(e)===K(t);function yy(e,t,n){let r=_E(e,t,n);return r?hY(t,16,i=>(FY(t,i,r.box),e.EPDFAnnot_ExportAppearance(n,_g(r.rotation),i))):e.EPDFAnnot_ExportAppearance(n,0,0n)}function yw(e,t,n,r){let i=null;try{return hY(t,8,o=>{Ft(t,o,0),i=e.EPDF_SaveDocumentToOwnedBuffer(n,2,o);let a=Number(t.peek(o,"i32"));if(!i||a<=0)throw new N(G.DocOpenFailed,`failed to save ${r}`);let s=t.readBytes(i,a),l=new ArrayBuffer(s.byteLength);return new Uint8Array(l).set(s),{bytes:l,size:a}})}finally{i&&e.EPDF_FreeBuffer(i)}}var yE=class{constructor(e,t){this.runtime=e,this.session=t}flatten(e,t,n,r){hW(r),this.requireRefs("annotations.flatten",e,t);let{fn:i,mem:o}=this.runtime,a=gx(this.runtime,this.session,e),s=this.session.pagePool(),l=s.acquire(e);try{let r,s,u=this.resolveAll(l,t);try{[r,s]=this.withHandleArray(u,e=>hY(o,4*t.length,r=>{let a=i.EPDFPage_FlattenAnnotations(l,e,t.length,+("print"===n),r),s=[];for(let e=0;e2===e);throw new N(t>=0?G.InvalidArg:G.Unknown,t>=0?`annotations.flatten: ref ${t} is not an annotation of page ${e}`:"native annotation flatten failed after preflight")}let d=t.map((e,t)=>({ref:e,status:0===s[t]?"applied":"unchanged"}));if(1!==r&&!a){let t={affectedPages:[],cacheDelta:null,...this.session.writeStamp()};return{page:q(e),usage:n,results:d,meta:t}}this.session.invalidateDerived();let c={affectedPages:[q(e)],cacheDelta:null,...this.session.writeStamp()};return{page:q(e),usage:n,results:d,meta:c}}finally{s.release(e)}}exportAppearance(e,t,n){hW(n),this.requireRefs("annotations.exportAppearance",e,t);let{fn:r}=this.runtime,i=this.session.pagePool(),o=i.acquire(e),a=null;try{let e=this.resolveAll(o,t);try{a=this.withHandleArray(e,e=>r.EPDFPage_ExportAnnotationsAsDocument(o,e,t.length))}finally{for(let t of e)r.FPDFPage_CloseAnnot(t)}if(!a)throw new N(G.InvalidArg,"annotations.exportAppearance: every ref must be a visible annotation of this page with a normal appearance");return yw(this.runtime.fn,this.runtime.mem,a,"exported appearances")}finally{a&&r.FPDF_CloseDocument(a),i.release(e)}}readAppearance(e,t,n){hW(n);let{fn:r}=this.runtime,i=this.session.pagePool(),o=i.acquire(e),a=null;try{let e=gT(this.runtime,this.session,o,t);try{let t=rN(r.FPDFAnnot_GetSubtype(e));if(ti[t]?.appearance===void 0)throw new N(G.InvalidArg,`a ${t} annotation has no \'appearance\' resource`);a=yy(r,this.runtime.mem,e)}finally{r.FPDFPage_CloseAnnot(e)}if(!a)throw new N(G.InvalidArg,"the annotation has no normal appearance to read");return yw(this.runtime.fn,this.runtime.mem,a,"the appearance")}finally{a&&r.FPDF_CloseDocument(a),i.release(e)}}resolveAll(e,t){let{fn:n}=this.runtime,r=[];try{for(let n of t)r.push(gT(this.runtime,this.session,e,n));return r}catch(e){for(let e of r)n.FPDFPage_CloseAnnot(e);throw e}}withHandleArray(e,t){let{mem:n}=this.runtime,r="wasm"===this.runtime.kind;return hY(n,Math.max(1,e.length*(r?4:8)),i=>(e.forEach((e,t)=>r?n.poke(i,"i32",Number(e),4*t):n.poke(i,"i64",e,8*t)),t(i)))}requireRefs(e,t,n){if(0===n.length)throw new N(G.InvalidArg,`${e} requires at least one ref`);for(let r of n)if(r.page.objectNumber!==t)throw new N(G.InvalidArg,`${e} refs must all target page ${t}; got ref on page ${r.page.objectNumber}`)}};function yA(e,t,n,r){let{fn:i,mem:o}=e,a=r?i.EPDFDoc_ExportDrawing(t,r):yy(i,o,n);if(!a)return null;try{return yw(i,o,a,"a drawing").bytes}finally{i.FPDF_CloseDocument(a)}}function yv(e,t,n){let r=e.fn.FPDFAnnot_GetFileAttachment(t);return r?_N(e,r,n).bytes:null}function yS(e){return N.is(e,G.PayloadTooLarge)}function yk(e,t,n){let{fn:r,mem:i}=e,o=new Set(n.flatMap(e=>rB(e).map(H))),a=t.requireDocPtr();return hY(i,16,e=>t.allRecords().filter(e=>o.has(H(q(e.pageObjectNumber)))).map(t=>{let n=gg(r,i,a,t.pageIndex,e).crop;return{page:q(t.pageObjectNumber),position:t.pageIndex,size:{width:n.right-n.left,height:n.top-n.bottom}}}))}var yx=class{constructor(e,t,n){this.runtime=e,this.kind=t,this.limits=n,hJ(this,"byId",{}),hJ(this,"totalBytes",0)}keep(e){nC(this.kind,this.limits,"resourceBytes",e.byteLength);let{fn:t,mem:n}=this.runtime,r=`sha256-${Db(t,n,new Uint8Array(e))}`;return r in this.byId||(this.byId[r]=e,this.totalBytes+=e.byteLength,nC(this.kind,this.limits,"resources",Object.keys(this.byId).length),nC(this.kind,this.limits,"bundleBytes",this.totalBytes)),r}},yG=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}export(e,t,n){hW(n);let r=this.session.allRecords(),i=new DP(this.runtime,this.session,this.fonts),o=function(e,t,n){let r=new Set(t.map(H)),i=new Map,o=new Map,a=e=>{let t=H(e);if(i.has(t)||!r.has(t))return;let a=n(e);for(let e of(i.set(t,a),a))o.set(K(e.ref),e)},s=e=>(a(e.page),o.get(K(e)));for(let t of e.pages??[])if(!r.has(H(t)))throw new N(G.NotFound,`export: the document has no page ${H(t)}`);let l=!e.refs&&!e.pages,u=(e.include??"threads")==="threads";for(let n of l?t:e.pages??[])a(n);let d=new Set,c=[],f=e=>{if(!e)return;let t=K(e.ref);d.has(t)||(d.add(t),c.push(e))};if(l)for(let e of i.values())e.forEach(f);else{for(let t of e.pages??[])i.get(H(t))?.forEach(f);for(let t of e.refs??[]){let e=s(t);if(!e)throw new N(G.NotFound,`export: the document has no annotation ${K(t)}`);f(e)}}if(u){for(let e of[...c])"popup"===e.subtype&&e.parent&&f(s(e.parent));let e=new Map;for(let t of i.values())for(let n of t){let t=n.reply?s(n.reply.to):void 0;if(!t)continue;let r=K(t.ref);e.set(r,[...e.get(r)??[],n])}for(let t=0;tq(e.pageObjectNumber)),e=>i.listOne(e.objectNumber,n,"annotations").annotations);nC("annotation",t,"items",o.length);let a=new yO(this.runtime,this.session,t),s=gF(this.runtime,this.session),l=o.map(e=>(hW(n),{data:n6(e,s(e.ref.page),s),resources:a.of(e)})),u=yk(this.runtime,this.session,l.map(e=>e.data));nC("annotation",t,"pages",u.length);let d=nN({pages:u,items:l});return nC("annotation",t,"manifestBytes",d),nC("annotation",t,"bundleBytes",d+a.totalBytes),{format:"embedpdf/annotations",version:1,pages:u,items:l,resources:a.byId}}},yO=class extends yx{constructor(e,t,n){super(e,"annotation",n),this.session=t,hJ(this,"drawings",new Map)}of(e){let t=ti[e.subtype];if(!t)return{};let{fn:n}=this.runtime,r=this.rawHandleOf(e);try{let e={};if(t.appearance){let t=this.appearanceOf(r);t&&(e.appearance=t)}if(t.file){let t=this.fileOf(r);t&&(e.file=t)}return e}finally{n.FPDFPage_CloseAnnot(r)}}rawHandleOf(e){return gj(this.runtime,this.session,e.ref)}appearanceOf(e){let t=this.runtime.fn.EPDFAnnot_GetDrawing(e),n=t?this.drawings.get(t):void 0;if(n)return n;let r=yA(this.runtime,this.session.requireDocPtr(),e,t);if(!r)return null;let i=this.keep(r);return t&&this.drawings.set(t,i),i}fileOf(e){let t;try{t=yv(this.runtime,e,this.limits.resourceBytes)}catch(e){if(!yS(e))throw e;throw new N(G.PayloadTooLarge,`the annotation bundle is past its resourceBytes limit: an attached file is larger than ${this.limits.resourceBytes}`,{details:{limit:"resourceBytes",max:this.limits.resourceBytes}})}return t?this.keep(t):null}};function yI(e,t,n,r,i){let o=new Map;for(let[e,r]of Object.entries(n.resources??{})){if(!(r instanceof ArrayBuffer))throw new N(G.InvalidArg,`${t} bundle: resource ${e} is not bytes`);o.set(e,r.byteLength)}i(n,o,r);let{fn:a,mem:s}=e,l=new Map;for(let[e,r]of Object.entries(n.resources??{})){let n=Db(a,s,new Uint8Array(r));if(`sha256-${n}`!==e)throw new N(G.InvalidArg,`${t} bundle: resource ${e} doesn\'t match its id`);l.set(r,n)}return l}var yN=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}import(e,t){var n;hW(t);let{bundle:r,limits:i}=e;this.assertBundle(r,i);let o=function(e){let{bundle:t,target:n,nameTaken:r}=e,i=t.items.map(e=>e.data),o=tP({bundlePages:t.pages,pages:e.pages??"same",target:n,named:i.flatMap(hj)}),a=new Map,s=new Map,l=new Map;i.forEach((e,t)=>{if("unsupported"===e.subtype)return void a.set(t,"unsupported-kind");if("widget"===e.subtype)return void a.set(t,"widget");if("popup"===e.subtype&&null===e.parent)return void a.set(t,"parent-missing");let n=hM(e);if("item"===n)return void a.set(t,"unsupported-value");let r=[...rR(e),...n];r.length>0&&s.set(t,r),l.set(t,hR(e,r,o,{label:`import: item ${t}`,details:{item:t}}))});let u=new Map;i.forEach((e,t)=>{let n=K(e.ref);u.has(n)||u.set(n,t)});let d=e=>H(o(i[e].ref.page)),c=(e,t)=>{let n=u.get(K(e));return void 0!==n&&d(n)===d(t)?n:void 0},f=e=>[e.reply?.to,"popup"===e.subtype?e.parent:null].filter(e=>null!=e);i.forEach((e,t)=>{!a.has(t)&&f(e).some(e=>void 0===c(e,t))&&a.set(t,"parent-missing")});let m=new Map;i.forEach((e,t)=>{if(a.has(t)||"popup"!==e.subtype||!e.parent)return;let n=c(e.parent,t);m.has(n)?a.set(t,"popup-taken"):m.set(n,t)});let p=new Set;i.forEach((e,t)=>{if(a.has(t)||!e.nm)return;let n=o(e.ref.page),i=`${H(n)}\\0${e.nm}`;p.has(i)||r(n,e.nm)?a.set(t,"name-conflict"):p.add(i)});for(let e=!0;e;)e=!1,i.forEach((t,n)=>{!a.has(n)&&f(t).some(e=>a.has(c(e,n)))&&(a.set(n,"parent-dropped"),e=!0)});let h=new Map;i.forEach((e,t)=>{a.has(t)||h.set(t,h.size)});let F=[...h.keys()].map(e=>{let t=i[e],n=t.reply?h.get(c(t.reply.to,e)):void 0,r="popup"===t.subtype&&t.parent?h.get(c(t.parent,e)):void 0;return{item:e,page:o(t.ref.page),draft:l.get(e),...void 0!==n?{replyTo:{planned:n,type:t.reply.type}}:{},...void 0!==r?{parent:r}:{}}}),g=[];return i.forEach((e,t)=>{let n=a.get(t);if(n)g.push({ref:e.ref,reason:n});else for(let n of s.get(t)??[])g.push({ref:e.ref,...n})}),{creates:F,dropped:g}}({bundle:"stamp"===e.attribution?{...n=r,items:n.items.map(({data:{nm:e,...t},...n})=>({...n,data:t}))}:r,...void 0!==e.pages?{pages:e.pages}:{},target:this.session.allRecords().map(e=>({page:q(e.pageObjectNumber),position:e.pageIndex})),nameTaken:(e,t)=>b5(this.runtime,this.session.requireDocPtr(),this.session.resolvePageRef(e).pageIndex,t)>=0}),a=gF(this.runtime,this.session),s=o.creates.map(t=>{let n=r.items[t.item],i={};for(let[e,t]of Object.entries(n.resources))i[e]=r.resources[t];return{page:t.page,draft:n5(t.draft,a(t.page),a),...t.replyTo?{replyTo:{to:{planned:t.replyTo.planned},type:t.replyTo.type}}:{},...void 0!==t.parent?{parent:{planned:t.parent}}:{},resources:i,attribution:function(e,t,n){let{actor:r}=e;if("stamp"===e.attribution){let{groupId:e}=t,n="string"==typeof e?{...r,groupId:e}:r;return{kind:"stamp",...n?{actor:n}:{}}}return{kind:"restore",from:{author:n.author,createdAt:n.createdAt,modifiedAt:n.modifiedAt,userId:n.userId,createdBy:n.createdBy,modifiedBy:n.modifiedBy,groupId:n.groupId??null},...r?.userId?{importedBy:r.userId}:{}}}(e,t.draft,n.data),..."file-attachment"===n.data.subtype&&n.data.file?{fileDates:{createdAt:n.data.file.createdAt,modifiedAt:n.data.file.modifiedAt}}:{},label:`import: item ${t.item}`}});for(let t of s)e.authorizeCreate?.(t.draft);let{created:l,meta:u}=new yh(this.runtime,this.session,this.fonts).create(s,t);return{annotations:l,refMap:o.creates.map((e,t)=>({from:r.items[e.item].data.ref,to:l[t].ref})),dropped:[...o.dropped],meta:u}}assertBundle(e,t){let n=yI(this.runtime,"annotation",e,t,nL),r=this.session.drawingIndex();for(let[e,t]of n)r.hashes.set(e,t);for(let n of e.items){let r=n.resources.appearance;r&&function(e,t,n){let r=nx(n);r&&"width"in r&&nC(e,t,"imagePixels",r.width*r.height)}("annotation",t,e.resources[r])}}};function yC(e,t,n,r){let{fn:i,mem:o}=e;return hY(o,Math.max(4,4*r.length),a=>(r.forEach((e,t)=>o.poke(a,"i32",e,4*t)),yz(e,"annotations",e=>i.EPDFPage_ExportAnnotsRawToOwnedBuffer(t,n,a,r.length,e))))}function yj(e,t,n,r){yU(e,r,i=>{if(!e.fn.EPDFPage_ImportAnnotsRaw(t,n,i,r.byteLength))throw new N(G.Unknown,"EPDFPage_ImportAnnotsRaw refused a capture")})}function yM(e,t,n,r){return yz(e,`object ${n}`,i=>e.fn.EPDFDoc_ExportDictRawToOwnedBuffer(t,n,r.join(" "),i))}function yR(e,t,n,r,i=[]){return yz(e,`object ${n}`,o=>e.fn.EPDFDoc_ExportDictCanonicalToOwnedBuffer(t,n,r.join(" "),i.join(" "),o))}function yT(e,t,n){yU(e,n,r=>{if(!e.fn.EPDFDoc_ImportDictRaw(t,r,n.byteLength))throw new N(G.Unknown,"EPDFDoc_ImportDictRaw refused a capture")})}function yB(e,t,n){return yz(e,`field ${n}`,r=>e.fn.EPDFForm_ExportFieldRawToOwnedBuffer(t,n,r))}function yL(e,t,n){yU(e,n,r=>{if(!e.fn.EPDFForm_ImportFieldRaw(t,r,n.byteLength))throw new N(G.Unknown,"EPDFForm_ImportFieldRaw refused a capture")})}function y$(e,t,n){try{return yz(e,`attachment \'${n}\'`,r=>h5(e.mem,n,n=>e.fn.EPDFAttachment_ExportCanonicalToOwnedBuffer(t,n,r)))}catch(e){if(N.is(e))return null;throw e}}function yz(e,t,n){let{fn:r,mem:i}=e;return hY(i,8,e=>{Ft(i,e,0);let o=n(e);if(!o)throw new N(G.Unknown,`the capture of ${t} failed`);try{return i.readBytes(o,Number(i.peek(e,"i32"))).slice()}finally{r.EPDF_FreeBuffer(o)}})}function yU(e,t,n){let{mem:r}=e;return hY(r,Math.max(1,t.byteLength),e=>(r.writeBytes(e,t),n(e)))}function yV(e,t,n=yW){if(Object.is(e,t))return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;if(Array.isArray(e)||Array.isArray(t))return!!Array.isArray(e)&&!!Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>yV(e,t[n]));let r=yq(e,n),i=yq(t,n);return r.length===i.length&&r.every(n=>i.includes(n)&&yV(e[n],t[n]))}var yW=new Set;function yq(e,t){return Object.entries(e).filter(([e,n])=>void 0!==n&&!t.has(e)).map(([e])=>e)}function yH(e,t){return{item:{type:"skipped",op:t,meta:{affectedPages:[],cacheDelta:null,...e.session.writeStamp()}},reverse:[]}}function yK(e,t,n){if(!n)return;let r=Object.entries(n).filter(([e,n])=>void 0!==n&&!yV(t[e],n)).map(([e])=>e);if(r.length>0)throw new N(G.ChangeConflict,`op ${e} expected other values in ${r.join(", ")}`,{details:{opIndex:e,fields:r}})}function yZ(e,t){if(e.byteLength!==t.byteLength)return!1;for(let n=0;n({...n,after:yR(e,t.requireDocPtr(),n.objectNumber,[])}))}function yX(e,t,n){return n.every(n=>{let r=function(e,t,n){try{return yR(e,t.requireDocPtr(),n,[])}catch(e){if(N.is(e))return null;throw e}}(e,t,n.objectNumber);return null!==r&&yZ(r,n.after)})}function yY(e,t,n){let r=yJ(e,t,n),i=t.requireDocPtr();for(let t of n)t.before&&yT(e,i,t.before);return t.invalidateDerived(),yQ(e,t,r)}function y0(e,t,n){let r=e[t];if(!(n<=r))throw new N(G.PayloadTooLarge,`copy: past the ${t} limit: ${n} > ${r}`,{details:{limit:t,max:r,value:n}})}var y1=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}copy(e,t){var n,r;let i,o,a,s,l,u,d;hW(t);let{refs:c,objectNumbers:f,limits:m}=e;if(f&&f.length!==c.length)throw new N(G.InvalidArg,`copy: objectNumbers names ${f.length} copies of ${c.length}`,{details:{field:"objectNumbers"}});y0(m,"items",c.length),e.page&&this.session.resolvePageRef(e.page);let p=c.map(t=>e.read(t)),h=gF(this.runtime,this.session),F=(n=p.map(e=>n6(e,h(e.ref.page),h)),r={...e.page?{page:e.page}:{},...e.offset?{offset:e.offset}:{}},i=new Map,n.forEach((e,t)=>{if("unsupported"===e.subtype||"widget"===e.subtype)return;let n=hM(e);i.set(t,"item"===n?"item":[...rR(e),...n])}),o=e=>{let t=i.get(e);return void 0===t||"item"===t?[]:t},l=new Set((s=(a=function(e,t,n=()=>!1){let r=new Map;e.forEach((e,t)=>{"unsupported"===e.subtype?r.set(t,"unsupported-kind"):"widget"===e.subtype?r.set(t,"widget"):n(t)&&r.set(t,"unsupported-value")});let i=new Map;e.forEach((e,t)=>{let n=K(e.ref);i.has(n)||i.set(n,t)});let o=n=>t.page??e[n].ref.page,a=(e,t)=>{let n=i.get(K(e));if(!(void 0===n||r.has(n)))return H(o(n))===H(o(t))?n:void 0},s=new Set;e.forEach((e,t)=>{if(r.has(t)||"popup"!==e.subtype)return;let n=e.parent?i.get(K(e.parent)):void 0,o=e.parent?a(e.parent,t):void 0;void 0===o?r.set(t,void 0!==n&&r.has(n)?"parent-dropped":"parent-missing"):s.has(o)?r.set(t,"popup-taken"):s.add(o)});let l=new Map;e.forEach((e,t)=>{r.has(t)||l.set(t,l.size)});let u=t.offset??{x:0,y:0},d=[...l.keys()].map(t=>{let n=e[t],r=n.reply?a(n.reply.to,t):void 0,i="popup"===n.subtype&&n.parent?a(n.parent,t):void 0,{nm:s,groupId:d,reply:c,popup:f,...m}=n;for(let{field:e}of rR(n))delete m[e];return{source:t,page:o(t),data:function(e,t){if(0===t.x&&0===t.y)return e;let n=new Set(["rect","captionCenter",...tw[e.subtype]??[]]),r={...e};for(let i of n)null!=e[i]&&(r[i]=function e(t,n,r){return Array.isArray(t)?t.map(t=>e(t,n,r)):null===t||"object"!=typeof t?t:Object.fromEntries(Object.entries(t).map(([t,i])=>"number"!=typeof i?[t,e(i,n,r)]:[t,i+("left"===t||"right"===t||"x"===t?n:"bottom"===t||"top"===t||"y"===t?r:0)]))}(e[i],t.x,t.y));return r}(m,u),...void 0!==r?{replyTo:{copy:l.get(r),type:n.reply.type}}:{},...void 0!==i?{parent:l.get(i)}:{}}}),c=[];return e.forEach((e,t)=>{let n=r.get(t);n&&c.push({ref:e.ref,reason:n})}),{copies:d,dropped:c}}(n,r,e=>"item"===i.get(e))).copies.map(({data:e,...t})=>({...t,draft:hR(e,o(t.source),e=>e,{label:`copy: annotation ${t.source}`,details:{annotation:t.source}})}))).map(e=>e.source)),u=a.dropped[Symbol.iterator](),d=[],n.forEach((e,t)=>{if(l.has(t))for(let n of o(t))d.push({ref:e.ref,...n});else d.push(u.next().value)}),{creates:s,dropped:d}),g=this.resourceReader(m),_=F.creates.map(n=>{hW(t);let r=p[n.source],i=n5(n.draft,h(n.page),h),o=e.authorizeCreate(i);return{page:n.page,draft:i,...n.replyTo?{replyTo:{to:{planned:n.replyTo.copy},type:n.replyTo.type}}:{},...void 0!==n.parent?{parent:{planned:n.parent}}:{},resources:g(r),...f?{objectNumber:f[n.source]}:{},attribution:{kind:"stamp",...o?{actor:o}:{}},..."file-attachment"===r.subtype&&r.file?{fileDates:{createdAt:r.file.createdAt,modifiedAt:r.file.modifiedAt}}:{},label:`copy: annotation ${n.source}`}}),{created:P,meta:D}=new yh(this.runtime,this.session,this.fonts).create(_,t);return{annotations:P,refMap:F.creates.map((e,t)=>({from:p[e.source].ref,to:P[t].ref})),dropped:[...F.dropped],meta:D}}resourceReader(e){let{fn:t}=this.runtime,n=new Map,r=0,i=0,o=t=>(y0(e,"resourceBytes",t.byteLength),y0(e,"resources",r+=1),y0(e,"bundleBytes",i+=t.byteLength),t);return r=>{let i=ti[r.subtype];if(!i)return{};let a=gj(this.runtime,this.session,r.ref);try{let r={};if(i.appearance){let e=t.EPDFAnnot_GetDrawing(a),i=n.get(e),s=i??yA(this.runtime,this.session.requireDocPtr(),a,e);s&&(r.appearance=i??o(s)),s&&e&&n.set(e,s)}if(i.file){let t=this.fileOf(a,e.resourceBytes);t&&(r.file=o(t))}return r}finally{t.FPDFPage_CloseAnnot(a)}}}fileOf(e,t){try{return yv(this.runtime,e,t)}catch(e){if(!yS(e))throw e;throw new N(G.PayloadTooLarge,`copy: an attached file is larger than ${t} bytes`,{details:{limit:"resourceBytes",max:t}})}}};function y3(e,t,n){let{fn:r,mem:i}=e,o=t.requireDocPtr(),{pageIndex:a}=t.resolvePageRef(n),s=r.EPDFPage_GetAnnotCountRaw(o,a),l=[];for(let e=0;ee?.family===t?[e.ref]:[])}function y6(e,t,n,r){let i;if(0===n.length)throw new N(G.InvalidArg,"a reorder names at least one row",{details:{field:"refs"}});let o=new Map;e.entries.forEach((e,t)=>{e&&o.set(K(e.ref),t)});let a=n_(r);(a?[...n,a]:n).forEach((r,i)=>{let s=a&&i===n.length?"position":"refs";if(r.page.objectNumber!==e.page.objectNumber)throw new N(G.InvalidArg,`${K(r)} is on page ${r.page.objectNumber}; a reorder stays on page ${e.page.objectNumber}`,{details:{field:s}});let l=o.get(K(r)),u=void 0===l?null:e.entries[l];if(u&&u.family!==t)throw new N(G.InvalidArg,"widgets"===u.family?"widgets paint above every annotation and have an order of their own: reorder them with doc.forms.reorderWidgets":"annotations paint below every widget and have an order of their own: reorder them with page.annotations.reorder",{details:{field:s}})});let s=y2(e,t),l=nD(s,n,r,K),u=n.map(e=>o.get(K(e))),d=new Set(u),c=e=>e-u.filter(t=>to.get(K(e))).filter(e=>!d.has(e)),m=Math.min(...u);if("start"===r)i=f.length>0?c(f[0]):m;else if("end"===r)i=f.length>0?c(f.at(-1))+1:m;else{let e=c(o.get(K(a)));i="before"in r?e:e+1}return{stack:e,family:t,before:s,after:l,from:u,to:i}}function y5(e,t,n){let{fn:r,mem:i}=e;if(gx(e,t,n.stack.page.objectNumber),!hY(i,4*n.from.length,e=>(n.from.forEach((t,n)=>i.poke(e,"i32",t,4*n)),r.EPDFPage_MoveAnnotsRaw(t.requireDocPtr(),n.stack.pageIndex,e,n.from.length,n.to))))throw new N(G.Unknown,`the annotations of page ${n.stack.page.objectNumber} could not be reordered`)}function y4(e,t,n,r=n){let i=new Set;for(let e of n)e.page&&i.add(e.page.objectNumber);return{affectedPages:[...i].map(e=>q(e)),cacheDelta:null,...e,changedFields:t,changedWidgets:n,redrawnWidgets:r}}function y8(e,t){return"checkbox"===e||"radio"===e?[]:[...t]}var y7=["AP","FS"];function y9(e,t,n){let r=new Map,i=t.map(t=>{var n;let i;return{ref:t.ref,left:(n=t.ref,(i=r.get(n.page.objectNumber))||(i=wc(e,n.page.objectNumber),r.set(n.page.objectNumber,i)),tG(i,n))}}),o=new Set(i.flatMap(e=>e.left.map(e=>K(e.ref)).filter(t=>t!==K(e.ref))));return i.filter(e=>!o.has(K(e.ref))).reverse().map(e=>({kind:"annotation.remove",ref:e.ref,left:e.left,...n?{rights:n}:{}}))}function we(e){oQ(e,"doc.annotate.modify"),oQ(e,"doc.annotate.import")}function wt(e,t,n){if(!n||n===t.nm)return;let r=e.session.resolvePageRef(t.ref.page);if(b5(e.runtime,e.session.requireDocPtr(),r.pageIndex,n)>=0)throw b4(n,r.pageObjectNumber)}function wn(e,t,n){let{page:r}=t.stack;return{item:wo(e,t.family,r,t.after,n),reverse:[{kind:"annotation.reorder",page:r,family:t.family,refs:n,before:t.before,after:t.after}]}}function wr(e,t){let n=e.findIndex(e=>K(e)===K(t));if(!(n<0))return 0===n?null:K(e[n-1])}function wi(e,t,n){if("widgets"===t)return void oQ(e.authority,"doc.forms.modify");for(let t of o1(n.map(t=>wd(e,t))))oQ(e.authority,t)}function wo(e,t,n,r,i){let o=e.session.writeStamp();return"annotations"===t?{type:"annotations.reorder",page:n,order:r,meta:yP(o,n.objectNumber,i)}:{type:"forms.reorderWidgets",page:n,order:r,meta:y4(o,[],i.map(t=>({ref:t,objectNumber:wm(e,t),page:n})))}}function wa(e,t,n,r,i){var o,a;let s;gx(e.runtime,e.session,t.page.objectNumber);let l=wd(e,t),u="widget"===l.subtype?ir(l.fieldKind,n):n,d=(function(e,t){let n=[];if("open"in t&&("text"===e.subtype&&e.popup&&n.push(e.popup),"popup"===e.subtype&&e.parent&&n.push(e.parent)),"popup"===e.subtype&&"parent"in t){e.parent&&n.push(e.parent);let r=t.parent;r&&n.push(r)}return n})(l,u).map(t=>({objectNumber:wm(e,t),deep:[]})),c=yJ(e.runtime,e.session,[{objectNumber:wm(e,t),deep:y7},...d]),f=wu(e).update(t,u,e.authority,e.signal,i),m=yQ(e.runtime,e.session,c);return{item:ws(e,r,t,f),reverse:[{kind:"objects.revert",reports:r,objects:m,subject:{annotation:t},appearanceChanged:f.appearance.changed,fallback:(o=l,a=f.annotation,{kind:"annotation",restore:Object.fromEntries((s=Object.keys(u).filter(e=>!yV(o[e],a[e]))).map(e=>[e,o[e]])),left:Object.fromEntries(s.map(e=>[e,a[e]]))})}]}}function ws(e,t,n,r){if("annotations.update"===t)return{type:"annotations.update",page:n.page,...r};let i=r.annotation;if("widget"!==i.subtype)throw Error("a widget update read back no widget");let o=eR(wm(e,n),n.page);return{type:"forms.updateWidget",widget:i,appearance:r.appearance,meta:y4(e.session.writeStamp(),i.field?[i.field]:[],[o],r.appearance.changed?[o]:[])}}function wl(e,t,n){let r=t.page.objectNumber;gx(e.runtime,e.session,r);let i=tG(wc(e,r),t),o=new Set(i.map(e=>K(e.ref))),a=i.flatMap(t=>"popup"===t.subtype&&t.parent&&!o.has(K(t.parent))?[{objectNumber:wm(e,t.parent),deep:[]}]:[]),s=yJ(e.runtime,e.session,a),{pageIndex:l}=e.session.resolvePageRef(t.page),u=i.length>0?yC(e.runtime,e.session.requireDocPtr(),l,i.map(t=>gC(e.runtime,e.session,t.ref).index)):new Uint8Array,d=n?{...e.authority,grants:null}:e.authority,c=wu(e).delete(t,d,e.signal);return{item:{type:"annotations.delete",page:t.page,...c},reverse:[{kind:"annotation.restore",page:t.page,members:c.meta.changedRefs,capture:u,unlinked:yQ(e.runtime,e.session,s),...n?{rights:n}:{}}]}}function wu(e){return new yD(e.runtime,e.session,e.fonts)}function wd(e,t){gC(e.runtime,e.session,t);let n=K(t),r=wc(e,t.page.objectNumber).find(e=>K(e.ref)===n);if(!r)throw Error(`annotation ${n} is on its page but reads as none`);return r}function wc(e,t){return new DP(e.runtime,e.session,e.fonts).listOne(t,e.signal).annotations}function wf(e,t){try{return wc(e,e.session.resolvePageRef(t).pageObjectNumber)}catch{return null}}function wm(e,t){if("objectNumber"===t.kind)return t.objectNumber;let{pageIndex:n,index:r}=gC(e.runtime,e.session,t),i=gM(e.runtime,e.session,n,r);try{return e.runtime.fn.EPDFAnnot_GetObjectNumber(i)}finally{e.runtime.fn.FPDFPage_CloseAnnot(i)}}var wp=class{constructor(e,t){this.runtime=e,this.session=t}list(e){hW(e);let{fn:t,mem:n}=this.runtime,r=this.session.requireDocPtr(),i=t.FPDFDoc_GetAttachmentCount(r),o=[];for(let e=0;ee.EPDFDoc_GetAttachmentKey(n,r,t,i))}(t,n,r,e)??"";o.push({..._I(t,n,i),ref:n$(a),index:e})}return o}readFile(e,t,n,r){hW(r);let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr(),s=_G(i,o,a,e);if(s<0)throw new N(G.NotFound,`no embedded file with key \'${e.key}\' in the document`);let l=i.FPDFDoc_GetAttachment(a,s);if(!l)throw new N(G.Unknown,`embedded file with key \'${e.key}\' resolved to index ${s} but could not be opened`);let u=_I(i,o,l);return this.extract(l,u.name,u.mimeType??void 0,t,n)}async readAnnotationFile(e,t,n,r,i,o){hW(i);let{fn:a,mem:s}=this.runtime,l=this.session.pagePool(),u=await l.acquireInSlices(e,i,o),d=null;try{d=gT(this.runtime,this.session,u,t);let e=a.FPDFAnnot_GetFileAttachment(d);if(!e)throw new N(G.InvalidArg,"annotation is not a file attachment or carries no embedded file (/FS)");let i=_I(a,s,e);return this.extract(e,i.name,i.mimeType??void 0,n,r)}finally{null!==d&&a.FPDFPage_CloseAnnot(d),l.release(e)}}extract(e,t,n,r,i){if(void 0!==r){let{size:o}=function(e,t,n,r){let{fn:i,mem:o}=e,a=o.alloc(4),s=o.alloc(4),l=e.fileWrite.toNodeFile(n);try{if(o.poke(a,"i32",0),o.poke(s,"i32",-1),!i.EPDFAttachment_ExtractFile(t,l.ptr,BigInt(r??0),a,s))throw _C(Number(o.peek(s,"i32")),r);return{size:Number(o.peek(a,"i32"))>>>0}}finally{l.close(),o.free(s),o.free(a)}}(this.runtime,e,r,i);return{name:t,...n?{mimeType:n}:{},size:o,path:r}}let{bytes:o,size:a}=_N(this.runtime,e,i);return{name:t,...n?{mimeType:n}:{},size:a,bytes:o}}},wh=class{constructor(e,t){this.runtime=e,this.session=t}create(e,t,n){let r;hW(n);let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr();if(!t)throw new N(G.InvalidArg,"an attachments.create op needs its bytes as its file resource",{details:{field:"resources.file"}});if(0===e.name.length)throw new N(G.InvalidArg,"attachment file requires a name");if(-1!==_G(i,o,a,{kind:"key",key:e.name}))throw new N(G.InvalidArg,`an embedded file with key \'${e.name}\' already exists \\u2014 keys are unique; rename and retry`);hW(n);let s=o.writeU16String(e.name);try{r=i.FPDFDoc_AddAttachment(a,s)}finally{o.free(s)}if(!r)throw new N(G.Unknown,"FPDFDoc_AddAttachment returned NULL");_O(i,o,r,a,e,{bytes:t,...void 0!==e.mimeType?{mimeType:e.mimeType}:{},name:e.name});let l=n$(e.name),u=this.find(l);if(!u)throw new N(G.Unknown,"created attachment did not resolve by key after the write");return{attachment:u,meta:this.meta(l)}}find(e){let{fn:t,mem:n}=this.runtime,r=this.session.requireDocPtr(),i=_G(t,n,r,e),o=i<0?null:t.FPDFDoc_GetAttachment(r,i);return o?{..._I(t,n,o),ref:e,index:i}:null}meta(e){return{affectedPages:[],cacheDelta:null,...this.session.writeStamp(),changedRefs:[e]}}delete(e,t){hW(t);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=_G(n,r,i,e);if(o<0)throw new N(G.NotFound,`no embedded file with key \'${e.key}\' in the document`);if(!n.FPDFDoc_DeleteAttachment(i,o))throw new N(G.Unknown,"FPDFDoc_DeleteAttachment returned false");return{meta:this.meta(e)}}},wF=e=>new wh(e.runtime,e.session);function wg(e,t){var n,r,i;let o=wF(e);if(!o.find(t))throw new N(G.NotFound,`no embedded file with key \'${t.key}\' in the document`,{details:{field:"ref"}});let a=(n=e.runtime,r=e.session.requireDocPtr(),i=t.key,yz(n,`attachment \'${i}\'`,e=>h5(n.mem,i,t=>n.fn.EPDFAttachment_ExportRawToOwnedBuffer(r,t,e))));return{item:{type:"attachments.delete",...o.delete(t,e.signal)},reverse:[{kind:"attachments.restore",ref:t,capture:a}]}}function w_(e,t){let n=y$(e.runtime,e.session.requireDocPtr(),t.key);if(!n)throw new N(G.Unknown,`attachment \'${t.key}\' is not there to guard`);return{kind:"attachments.remove",ref:t,left:n}}function wP(e,t,n){let{fn:r}=e;if("objectNumber"===n.kind){let e=r.EPDFForm_GetFieldIndexByObjNum(t,n.objectNumber);if(e<0)throw new N(G.NotFound,`form field not found: object ${n.objectNumber}`);return{fieldIndex:e,fieldObjectNumber:n.objectNumber}}let i=r.EPDFForm_CountFields(t);for(let o=0;or.EPDFForm_GetFieldName(t,o,e,n))??"")===n.name)return{fieldIndex:o,fieldObjectNumber:r.EPDFForm_GetFieldObjNum(t,o)};throw new N(G.NotFound,`form field not found: "${n.name}"`)}function wD(e){return"objectNumber"===e.ref.kind?e.ref.objectNumber:0}var wb={0:"whole-revision",1:"partial",2:"malformed"},wy={1:"all",2:"include",3:"exclude"};function ww(e,t){return h3(e.mem,t,"")}function wE(e){return 1===e||2===e||3===e}function wA(e,t,n){let{fn:r,mem:i}=e;return hY(i,32,e=>{for(let t=0;t<4;t++)Ft(i,e,0,8*t);return r.EPDFSig_GetByteRange(t,n,e)?[Fn(i,e,0),Fn(i,e,8),Fn(i,e,16),Fn(i,e,24)]:null})}function wv(e,t,n,r){let{fn:i}=e,o=wy[1===r?i.EPDFSig_GetLockAction(t,n):i.EPDFSig_GetFieldMDPAction(t,n)];if(!o)return null;let a=[],s=i.EPDFSig_GetFieldNameCount(t,n,r);for(let o=0;oi.EPDFSig_GetFieldNameAt(t,n,r,o,e,a))??"");let l={action:o,fields:a};if(1===r){let e=i.EPDFSig_GetLockPermission(t,n);wE(e)&&(l.permission=e)}return l}function wS(e,t){let{fn:n}=e,r=n.EPDFSig_Count(t),i=[],o=(r,i)=>ww(e,(e,o)=>n.EPDFSig_GetString(t,r,i,e,o));for(let s=0;sn.EPDFSig_GetFieldName(t,s,e,r))??"",widget:l>0?eR(l,Dl(n.EPDFSig_GetWidgetPageObjNum(t,s))):null,signed:r,kind:1===n.EPDFSig_GetKind(t,s)?"timestamp":"signature",filter:o(s,0),subFilter:o(s,1),byteRange:r?wA(e,t,s):null,contentsSizeBytes:r?Math.max(0,n.EPDFSig_GetContents(t,s,0n,0)):0,coverage:r?wb[n.EPDFSig_GetCoverage(t,s)]??"malformed":null,revisionIndex:r&&u>=0?u:null,signer:{name:o(s,2),reason:o(s,3),location:o(s,4),contactInfo:o(s,5),signedAt:(a=o(s,6))?hq(a):null},docMdp:wE(d)?d:null,catalogCertification:n.EPDFSig_IsCatalogCertification(t,s),fieldMdp:wv(e,t,s,0),lock:wv(e,t,s,1),seedValue:function(e,t,n){let{fn:r}=e;if(!r.EPDFSig_HasSeedValue(t,n))return null;let i=r.EPDFSig_GetSeedValueRequiredFlags(t,n)>>>0,o=r.EPDFSig_GetSeedValuePresentFlags(t,n)>>>0,a=r.EPDFSig_GetSeedValueVersion(t,n),s=r.EPDFSig_GetSeedValueMDP(t,n),l=i=>{let o=r.EPDFSig_GetSeedValueListCount(t,n,i),a=[];for(let s=0;sr.EPDFSig_GetSeedValueListAt(t,n,i,s,e,o))??"");return a};return{parserVersion:a>0?a:null,parserVersionRequired:(4&i)!=0,mdp:(131072&o)!=0&&s>=0&&s<=3?s:null,filter:ww(e,(e,i)=>r.EPDFSig_GetSeedValueFilter(t,n,e,i)),filterRequired:(1&i)!=0,subFilters:l(0),subFiltersRequired:(2&i)!=0,digestMethods:l(1),digestMethodsRequired:(64&i)!=0,reasons:l(2),reasonsRequired:(8&i)!=0,unsupportedRequired:(432&i)!=0||(4&i)!=0&&a>2}}(e,t,s)})}return i}function wk(e,t,n){let{fn:r,mem:i}=e,o=r.EPDFSig_GetContents(t,n,0n,0);if(o<=0)throw new N(G.NotFound,"signature has no usable /Contents (malformed encoding)");return hY(i,o,e=>{if(r.EPDFSig_GetContents(t,n,e,o)!==o)throw new N(G.Unknown,"failed to read signature contents");let a=new Uint8Array(o);return a.set(i.readBytes(e,o)),a})}function wx(e,t,n){let{fn:r,mem:i}=e,o=r.EPDFDoc_GetRevisionCount(t),a=[];return o<=0||h0(i,[8,8],([e,s])=>{for(let l=0;le.revisionIndex===l);a.push({index:l,end:Fn(i,e),xrefOffset:Fn(i,s),signatureIndex:o?o.index:null})}}),a}function wG(e,t,n){let r=e.fn.EPDFSig_LoadModel(t);if(0n===r)throw new N(G.Unknown,"failed to build signature model");try{return n(r)}finally{e.fn.EPDFSig_CloseModel(r)}}function wO(e,t){let{fn:n,mem:r}=e,[i,o,a]=h0(r,[4,4,4],([e,i,o])=>(r.poke(e,"i32",0),r.poke(i,"i32",0),r.poke(o,"i32",0),n.EPDFDoc_GetStructureObjectNumbers(t,e,i,o),[Number(r.peek(e,"i32"))>>>0,Number(r.peek(i,"i32"))>>>0,Number(r.peek(o,"i32"))>>>0])),s=[],l=n.FPDF_GetPageCount(t);for(let e=0;e{u.push({objectNumber:wD(e),name:e.name,kind:e.kind,widgets:e.widgets.map(e=>e.objectNumber),flags:n.EPDFForm_GetFieldFlags(d,t)})})}finally{n.EPDFForm_CloseModel(d)}return{root:i,acroForm:o,pagesRoot:a,pages:s,fields:u,signatures:wG(e,t,t=>wS(e,t))}}var wI=new WeakMap;function wN(e,t){let n=t.cacheSeq(),r=wI.get(t);if(r&&r.seq===n)return r.ptr;r&&(e.fn.EPDFSig_CloseModel(r.ptr),wI.delete(t));let i=e.fn.EPDFSig_LoadModel(t.requireDocPtr());if(0n===i)throw new N(G.Unknown,"failed to build signature model");return wI.set(t,{seq:n,ptr:i}),i}function wC(e,t){let n=wI.get(t);n&&(e.fn.EPDFSig_CloseModel(n.ptr),wI.delete(t))}var wj={sha1:0,sha256:1,sha384:2,sha512:3},wM={sha1:20,sha256:32,sha384:48,sha512:64},wR=class{constructor(e,t){this.runtime=e,this.session=t}readSnapshot(){let e=wN(this.runtime,this.session),t=this.runtime.fn.EPDFSig_IsRevisionChainValid(e),n=wS(this.runtime,e);return{chainValid:t,revisions:t?wx(this.runtime,this.session.requireDocPtr(),n):[],signatures:n,protection:iM(n)}}readProtection(){let e=wN(this.runtime,this.session);return iM(wS(this.runtime,e))}readContents(e){let t=wN(this.runtime,this.session),n=this.requireSignedIndex(t,e);return wk(this.runtime,t,n).buffer}digest(e,t){let n=wN(this.runtime,this.session),r=this.requireSignedIndex(n,e),i=wA(this.runtime,n,r);if(!i)throw new N(G.NotFound,"signature has no usable /ByteRange");return this.digestRange(i,t)}revisionBytes(e){let t=this.readSnapshot();if(!t.chainValid)throw new N(G.MalformedPdf,"revision chain is not valid");let n=t.revisions[e];if(!n)throw new N(G.NotFound,`no revision ${e}`);return this.readLoadedBytes(0,n.end)}resolveField(e){let{fn:t}=this.runtime,n=wN(this.runtime,this.session),r=this.indexOf(n,e);if(r<0)throw new N(G.NotFound,"objectNumber"===e.kind?`signature field not found: object ${e.objectNumber}`:`signature field not found: "${e.name}"`);let i=t.EPDFSig_GetWidgetObjNum(n,r);return{index:r,fieldObjectNumber:t.EPDFSig_GetFieldObjNum(n,r),signed:t.EPDFSig_IsSigned(n,r),widget:i>0?eR(i,Dl(t.EPDFSig_GetWidgetPageObjNum(n,r))):null,lock:wv(this.runtime,n,r,1)}}readSignatureByObjectNumber(e){let t=this.readSnapshot().signatures.find(t=>"objectNumber"===t.field.kind&&t.field.objectNumber===e);if(!t)throw new N(G.NotFound,`signature field not found: object ${e}`);return t}loadedBytes(){let e=Number(this.runtime.fn.EPDFDoc_GetLoadedBytesSize(this.session.requireDocPtr()));return this.readLoadedBytes(0,e)}version(){let{fn:e,mem:t}=this.runtime,n=this.session.requireDocPtr(),r=Number(e.EPDFDoc_GetBaseBytesSize(n));if(r<=0)throw new N(G.DocNotOpen,"document has no loaded bytes");if("layer"===this.session.kind)return{sha256:hY(t,32,r=>{if(!e.EPDFLayer_GetBaseSha256(n,r))throw new N(G.Unknown,"failed to read the base hash");return wB(t.readBytes(r,32))}),sizeBytes:r};let i=this.session.cachedPlainSha256();if(i)return{sha256:i,sizeBytes:r};let o=wB(new Uint8Array(this.digestRange([0,r,r,0],"sha256")));return this.session.rememberPlainSha256(o),{sha256:o,sizeBytes:r}}digestRange(e,t){let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=wM[t];return h0(r,[32,o,8],([a,s,l])=>{for(let t=0;t<4;t++)Ft(r,a,e[t],8*t);if(Ft(r,l,o),!n.EPDFSig_DigestByteRange(i,a,wj[t],s,l))throw new N(G.InvalidArg,"byte range is not within the loaded bytes");let u=Number(r.peek(l,"i32"));return wT(r.readBytes(s,u))})}readLoadedBytes(e,t){let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr();return 0===t?new ArrayBuffer(0):hY(r,t,o=>{if(n.EPDFDoc_ReadLoadedBytes(i,BigInt(e),o,t)!==t)throw new N(G.Unknown,"failed to read the loaded bytes");return wT(r.readBytes(o,t))})}indexOf(e,t){let{fn:n}=this.runtime;if("objectNumber"===t.kind)return n.EPDFSig_GetIndexByFieldObjNum(e,t.objectNumber);let r=n.EPDFSig_Count(e);for(let i=0;in.EPDFSig_GetFieldName(e,i,t,r))===t.name)return i;return -1}requireSignedIndex(e,t){let{fn:n}=this.runtime,r=this.indexOf(e,t);if(r<0)throw new N(G.NotFound,"objectNumber"===t.kind?`signature field not found: object ${t.objectNumber}`:`signature field not found: "${t.name}"`);if(!n.EPDFSig_IsSigned(e,r))throw new N(G.NotFound,"signature field is not signed");return r}readString(e,t,n){return this.readWide((r,i)=>this.runtime.fn.EPDFSig_GetString(e,t,n,r,i))}readWide(e){return h3(this.runtime.mem,e,"")}};function wT(e){let t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(e),t}function wB(e){let t="";for(let n of e)t+=n.toString(16).padStart(2,"0");return t}var wL=new WeakMap;function w$(e,t){let n=t.cacheSeq(),r=wL.get(t);if(r&&r.seq===n)return r.locks;let i=null;try{let n=new wR(e,t).readProtection();n.fieldLocks.length>0&&(i=e=>(function(e,t){for(let n of e.fieldLocks)if(ij(n.spec,t))return n;return null})(n,e))}catch{i=null}return wL.set(t,{seq:n,locks:i}),i}function wz(e,t){return"protect"!==t.signedDocumentPolicy?null:w$(e,t)}function wU(e,t,n,r){let{fn:i,mem:o}=e,a=[],s=new Set;for(let l of n){if(!l.ref||s.has(l.objectNumber))continue;s.add(l.objectNumber);let n=function(e,t,n){try{return gC(e,t,n.ref)}catch(e){if(N.is(e)&&e.code===G.NotFound)return null;throw e}}(e,t,l);if(!n)continue;let u=gM(e,t,n.pageIndex,n.index);try{let e=b8(i,o,u,l.ref.page.objectNumber,n.index,gJ(t,r));"widget"===e.subtype&&a.push(e)}finally{i.FPDFPage_CloseAnnot(u)}}return Dd(e,t,a),a}function wV(e,t,n,r){return{...n,widgets:wU(e,t,n.meta.changedWidgets,r)}}var wW=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}snapshot(e){return hW(e),function(e,t,n,r){let{formKind:i,needsAppearances:o,fields:a,calculationOrder:s}=Do(e,gv(e,t),t.requireDocPtr(),w$(e,t));return{formKind:i,needsAppearances:o,fields:a,widgets:function(e,t,n,r){let{fn:i}=e,o=t.requireDocPtr(),a=[],s=i.FPDF_GetPageCount(o);for(let l=0;li.EPDFPage_GetAnnotRaw(o,l,e),signal:n,family:"widgets",...r?{fonts:r}:{}});a.push(...d)}return a}(e,t,n,r),calculationOrder:s}}(this.runtime,this.session,e,this.fonts)}field(e,t){hW(t);let n=gv(this.runtime,this.session),{fieldIndex:r}=wP(this.runtime,n,e);return Di(this.runtime,n,r,this.session.requireDocPtr(),w$(this.runtime,this.session))}};function wq(e,t,n,r,i,o){let{fn:a,mem:s}=e,l=a.EPDFPage_CreateAnnotRaw(t,n,20,i??0);if(0n===l&&void 0!==i)throw Ff(i,"taken");if(0n===l)throw new N(G.Unknown,"failed to create widget annotation");try{DG(a,s,l,"NM",iY());let{page:n,rect:i,rotation:u,exportValue:d,actions:c,...f}=r;Dx(a,s,l,i),u&&b1(a,l,u),Object.keys(f).length>0&&b0(a,s,l,f,o),c&&PM(e,t,l,c);let m=a.EPDFAnnot_GetObjectNumber(l);if(m<=0)throw new N(G.Unknown,"widget annotation has no object number");return m}finally{a.FPDFPage_CloseAnnot(l)}}function wH(e,t,n,r){if(!n.ref)return;let i=gj(e,t,n.ref);try{Dk(e.fn,i,r)}finally{e.fn.FPDFPage_CloseAnnot(i)}}function wK(e,t){let{fn:n}=e,r=[],i=n.EPDFForm_CountCalculationOrder(t);for(let e=0;e0&&!r.includes(o)&&r.push(o)}return r}function wZ(e,t,n){let{fn:r,mem:i}=e;if(!h1(i,n,(e,n)=>r.EPDFForm_SetCalculationOrder(t,e,n)))throw new N(G.InvalidArg,"the calculation order could not be written")}function wJ(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function wQ(e,t){let n=e.indexOf(t);if(!(n<0))return 0===n?null:e[n-1]}function wX(e,t,n,r,i=!1,o="appearance"){let a=i?{mimeType:"application/pdf"}:nx(n);if(!a)throw new N(G.InvalidArg,`the ${o} resource must be PNG, JPEG or one-page PDF bytes`);if("application/pdf"!==a.mimeType)return a;let s=DE(e,t,n);if(null===s)throw new N(G.MalformedPdf,`the ${o} PDF could not be opened`);if(1!==s)throw new N(G.InvalidArg,`the ${o} PDF has ${s} pages; ${r} takes a one-page PDF`);return a}function wY(e){return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.slice().buffer}var w0={readOnly:1,required:2,noExport:4,multiline:4096,password:8192,noToggleToOff:16384,edit:262144,multiSelect:2097152,comb:0x1000000,radiosInUnison:0x2000000};function w1(e){let t=0,n=0;for(let[r,i]of Object.entries(w0)){let o=e[r];!0===o?t|=i:!1===o&&(n|=i)}return{setBits:t,clearBits:n}}function w3(e,t,n,r,i){let{mem:o,fn:a}=e,s=wY(i.bytes),l=wX(a,o,s,"a signature appearance",i.declaredPdf);w2(e,t,r,e=>{let r=Dy(a,o,t,n,s,l);if(!a.EPDFAnnot_SetDrawing(e,r,0))throw new N(G.InvalidArg,"the appearance page could not be drawn into the widget")})}function w2(e,t,n,r){let{fn:i}=e,o=new h8;try{let e=n.page?i.EPDFDoc_LoadPageByObjectNumber(t,n.page.objectNumber):0n;if(!e)throw new N(G.NotFound,"the widget page could not be loaded");o.push(()=>i.FPDF_ClosePage(e));let a=i.EPDFPage_GetAnnotByObjectNumber(e,n.objectNumber);if(!a)throw new N(G.NotFound,"the signature widget could not be loaded");o.push(()=>i.FPDFPage_CloseAnnot(a)),r(a)}finally{o.close()}}var w6={keystroke:0,format:1,validate:2,calculate:3};function w5(e,t,n,r,i){for(let o of Object.keys(w6)){let a=i[o];if(void 0===a)continue;if(null!==a&&!V(a))throw new N(G.InvalidArg,`a field\'s ${o} event takes JavaScript only`,{details:{field:`actions.${o}`}});let s=r?.[o];if(null===a?!s:void 0!==s&&function(e,t){if(e.incomplete||!e.root)return!1;let n=(e,t)=>{if(!e||"javascript"!==e.type||e.script!==t.script)return!1;let r=t.next??[];return e.next.length===r.length&&e.next.every((e,t)=>n(e,r[t]))};return n(e.root,t)}(s,a))continue;let l=null===a?0n:PC(e,t,a);if(!e.fn.EPDFForm_SetFieldEventAction(t,n,w6[o],l))throw new N(G.Unknown,`the field\'s ${o} script could not be written`)}}var w4={none:0,scalar:1,array:2};function w8(e,t,n,r,i){let{fn:o}=e;if("unsupported"===r.kind)return!1;let a="scalar"===r.kind?[r.value]:"array"===r.kind?r.values:[],s="value"===i?o.EPDFForm_SetFieldValue:o.EPDFForm_SetFieldDefaultValue;return gf(e,a,(e,i)=>s(t,n,w4[r.kind],e,i))}var w7={pushbutton:1,checkbox:2,radio:3,text:4,combobox:5,listbox:6,signature:7},w9={visible:0,hidden:1,noPrint:2,noView:3},Ee=new Set(["text","checkbox","radio","combobox","listbox"]),Et=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}setValue(e,t,n){hW(n);let r=gv(this.runtime,this.session),i=wP(this.runtime,r,e);this.assertWritable(i);let o=this.session.requireDocPtr(),a=Di(this.runtime,r,i.fieldIndex,o,w$(this.runtime,this.session)),s=function(e,t){let{field:n}=e,r=r4(n,t);switch(r.kind){case"text":{if("text"!==n.kind)return e;let t=function(e,t){if(!t)return e;let n=Array.from(e);return n.length>t?n.slice(0,t).join(""):e}(r.value,n.maxLength);if(t===n.value)return e;return il({...n,value:t,valueEntry:{kind:"scalar",value:t}},e)}case"toggle":{if("checkbox"!==n.kind&&"radio"!==n.kind)return e;let t=n.widgets.findIndex(e=>e.onState===r.state);return iu(e,null===r.state?-1:t)}case"choice":if("combobox"!==n.kind&&"listbox"!==n.kind)return e;return il(im(n,r.values),e)}}({field:a,widgets:[]},t).field,l=this.writeFieldAfter(i.fieldObjectNumber,a,s);return this.readBack(i.fieldObjectNumber,l??[])}setDisplay(e,t,n){hW(n);let r=wP(this.runtime,gv(this.runtime,this.session),e);this.assertWritable(r);let i=this.session.requireDocPtr(),o=this.withChangedWidgets((e,n,o)=>this.runtime.fn.EPDFForm_SetFieldDisplay(i,r.fieldObjectNumber,w9[t],e,n,o));if(null===o)throw new N(G.Unknown,"the field could not be shown or hidden");return this.readBack(r.fieldObjectNumber,o,!1)}setAppearanceText(e,t,n){hW(n);let r=gv(this.runtime,this.session),i=wP(this.runtime,r,e);this.assertWritable(i);let o=this.session.requireDocPtr(),a=Di(this.runtime,r,i.fieldIndex,o,w$(this.runtime,this.session));if("text"!==a.kind&&"combobox"!==a.kind)throw new N(G.InvalidArg,`appearance text does not apply to a ${a.kind} field`);let s=h5(this.runtime.mem,t,e=>this.withChangedWidgets((t,n,r)=>this.runtime.fn.EPDFForm_SetFieldAppearanceText(o,i.fieldObjectNumber,e,t,n,r)));if(null===s)throw new N(G.Unknown,"the appearance text could not be drawn");return this.readBack(i.fieldObjectNumber,s,!0)}emptyMeta(){return{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}reset(e,t){hW(t);let n=gv(this.runtime,this.session),r=void 0===e?this.wholeFormTargets(n):this.namedTargets(n,e);hW(t);let i=r.filter(e=>!function(e){if("unsupported"===e.valueEntry.kind||!r7(e.valueEntry,e.defaultValueEntry))return!1;if("checkbox"!==e.kind&&"radio"!==e.kind)return!0;let t=e.defaultValueEntry,n="scalar"===t.kind?t.value:null;return e.widgets.every(e=>e.checked===(e.onState===n))}(e)).flatMap(e=>{let t=function(e){let{field:t}=e,n=t.defaultValueEntry;switch(t.kind){case"text":{if("array"===n.kind||"unsupported"===n.kind)throw iw(t);let r="scalar"===n.kind?n.value:"",i="scalar"===n.kind?n:{kind:"none"};return il({...t,value:r,valueEntry:i},e)}case"checkbox":case"radio":{var r,i;let o;if("array"===n.kind||"unsupported"===n.kind)throw iw(t);let a="scalar"===n.kind?n.value:null;if(null===a||"Off"===a)return iu(e,-1);let s=(r=t.widgets,i=a,(o=r.findIndex(e=>e.onState===i))>=0||!/^\\d+$/.test(i)?o:Number(i)0&&this.session.invalidateDerived();let o=[],a=[],s=[];for(let{before:e,changed:t}of i){let n=this.readBackField(wD(e));if(0===t.length&&r7(e.valueEntry,n.valueEntry))continue;o.push(n);let r=new Set(t),i=n.widgets.filter(e=>r.has(e.objectNumber)).map(e=>eR(e.objectNumber,e.page));a.push(...i),s.push(...y8(n.kind,i))}return{fields:o,meta:y4(this.session.writeStamp(),o.map(e=>e.ref),a,s)}}wholeFormTargets(e){let t=this.session.requireDocPtr(),n=wz(this.runtime,this.session),r=[],i=this.runtime.fn.EPDFForm_CountFields(e);for(let o=0;o{if(!n.EPDFForm_Repair(this.session.requireDocPtr(),i,e))throw new N(G.Unknown,"form repair failed");return{acroformCreated:0!==Number(r.peek(e,"i32",0)),fieldsLinked:Number(r.peek(e,"i32",4)),widgetsLinked:Number(r.peek(e,"i32",8)),fieldsUnrepairable:Number(r.peek(e,"i32",12)),appearancesBaked:Number(r.peek(e,"i32",16)),needsAppearancesCleared:0!==Number(r.peek(e,"i32",20))}});return this.session.invalidateDerived(),{...o,meta:this.emptyMeta()}}createField(e,t,n,r={}){let{objectNumber:i,calculationOrder:o}=this.writeField(e,t,n,r);return{field:this.readBackField(i),calculationOrder:o}}writeField(e,t,n,r={}){hW(t);let{fn:i}=this.runtime,o=this.session.requireDocPtr(),a=(e.widgets??[]).map(t=>ot(ir(e.kind,t))),s=a.map(e=>this.preflightPlacement(e)),l=a.map(t=>Ei(e.kind,t));io(e);let u=ee(e),d=rj(e.purpose),c=eC(e.placeholder),f=ex(e,e.kind)??null,m=rK(e,e.kind);if(void 0!==m){for(let e of a)for(let t of rU)if(e.actions?.[t]!==void 0)throw new N(G.InvalidArg,`\'takesImage\' writes each widget\'s press: name it or a widget\'s actions.${t}, not both`,{details:{field:"takesImage"}});if(m&&0===a.length)throw rX()}if("maxLength"in e&&void 0!==e.maxLength&&(!Number.isInteger(e.maxLength)||e.maxLength<=0))throw new N(G.InvalidArg,`maxLength must be a positive integer, got ${e.maxLength}`,{details:{field:"maxLength"}});let{objectNumber:p,widgetObjectNumbers:h}=r;if(h&&h.length!==a.length)throw new N(G.InvalidArg,`forms.create needs one widget object number per widget: ${h.length} for ${a.length}`,{details:{field:"widgetObjectNumbers"}});for(let e of(void 0!==p&&this.session.claimObjectNumber(p),h??[]))this.session.claimObjectNumber(e);hW(t);let F=this.createFieldNode(e,p);this.configureNewField(e,F),f&&w5(this.runtime,o,F,void 0,eA(f)),function(e,t,n,r,i=new Date){r.userId&&P2(e,t,n,[[PZ,r.userId],[PJ,hH(i)]])}(this.runtime,o,F,n),"group"===u.kind&&P2(this.runtime,o,F,[[PW,u.groupId]]),"anyone"===u.kind&&P3(this.runtime,o,F,!0),null!==d&&P2(this.runtime,o,F,[[PH,d]]),null!==c&&P2(this.runtime,o,F,[[PK,c]]);let g=a.map((e,t)=>{let n=wq(this.runtime,o,s[t],m?{...e,actions:rH(e.actions)}:e,h?.[t],yp(this.runtime,this.session,this.fonts));if(!i.EPDFForm_AttachWidget(o,F,n,l[t],0n,0))throw new N(G.Unknown,"widget adoption failed");return eR(n,e.page)}),_=this.followCalculateScript(F,e.actions?.calculate);return this.session.invalidateDerived(),{objectNumber:F,widgets:g,calculationOrder:_}}nativeDeleteField(e){let{fn:t,mem:n}=this.runtime;return h0(n,[1024,8],([r,i])=>(Ft(n,i,0),t.EPDFForm_DeleteField(this.session.requireDocPtr(),e,r,256,i)))}preflightPlacement(e){let t=this.session.resolvePageRef(e.page),{left:n,bottom:r,right:i,top:o}=e.rect;if(![n,r,i,o].every(Number.isFinite))throw new N(G.InvalidArg,"widget rect must be finite numbers",{details:{field:"rect"}});return t.pageIndex}createFieldNode(e,t){let n,{fn:r,mem:i}=this.runtime,o=i.writeU16String(e.name);try{n=r.EPDFForm_CreateField(this.session.requireDocPtr(),w7[e.kind],o,t??0)}finally{i.free(o)}if(n<=0)throw new N(G.InvalidArg,`cannot create field "${e.name}" (name conflict or invalid)`);return n}configureNewField(e,t){let{fn:n}=this.runtime,r=this.session.requireDocPtr(),{setBits:i,clearBits:o}=w1(e);if((0!==i||0!==o)&&n.EPDFForm_SetFieldFlags(r,t,i,o),"options"in e&&e.options&&this.applyOptions(t,e.options),this.writeDefault(t,{kind:"none"},io(e)),"maxLength"in e&&void 0!==e.maxLength&&!n.EPDFForm_SetFieldMaxLen(r,t,e.maxLength))throw new N(G.InvalidArg,"maxLength rejected");void 0!==e.alternateName&&this.applyWideSetter(n.EPDFForm_SetFieldAlternateName,t,e.alternateName,"alternate name rejected"),void 0!==e.mappingName&&this.applyWideSetter(n.EPDFForm_SetFieldMappingName,t,e.mappingName,"mapping name rejected"),e.actions&&w5(this.runtime,r,t,void 0,e.actions)}setSignatureAppearance(e,t,n){hW(n);let r=this.session.requireDocPtr(),i=gv(this.runtime,this.session),o=wP(this.runtime,i,e);this.assertWritable(o);let a=Di(this.runtime,i,o.fieldIndex,r,w$(this.runtime,this.session));if("signature"!==a.kind)throw new N(G.InvalidArg,`\'${a.name}\' is a ${a.kind} field, not a signature field`);if(wG(this.runtime,r,e=>wS(this.runtime,e).some(e=>e.signed&&"objectNumber"===e.field.kind&&e.field.objectNumber===o.fieldObjectNumber)))throw new N(G.ProtectedDocument,`\'${a.name}\' is signed; its appearance is sealed with the signature`);if(0===a.widgets.length)throw new N(G.InvalidArg,`\'${a.name}\' has no widget to draw into`);let s=this.session.drawingIndex();for(let e of a.widgets)null===t?function(e,t,n){let{fn:r}=e;w2(e,t,n,e=>{if(0!==r.EPDFAnnot_GetDrawing(e)&&!r.EPDFAnnot_GenerateFormFieldAP(e))throw new N(G.Unknown,"the signature field\'s box could not be drawn into the widget")})}(this.runtime,r,e):w3(this.runtime,r,s,e,t);return this.session.invalidateDerived(),{field:this.readBackField(o.fieldObjectNumber)}}setButtonImage(e,t,n){hW(n);let{fn:r,mem:i}=this.runtime,o=this.session.requireDocPtr(),a=gv(this.runtime,this.session),s=wP(this.runtime,a,e);this.assertWritable(s);let l=Di(this.runtime,a,s.fieldIndex,o,w$(this.runtime,this.session));if("pushbutton"!==l.kind)throw new N(G.InvalidArg,`\'${l.name}\' is a ${l.kind} field, not a push button`);let u=l.widgets.filter(e=>null!==e.ref);if(null!==t&&0===u.length)throw new N(G.InvalidArg,`\'${l.name}\' has no widget to show an image in`);let d=0;if(null!==t){let e=wY(t),n=wX(r,i,e,"a push button\'s image",!1,"image");d=Dy(r,i,o,this.session.drawingIndex(),e,n)}for(let e of(hW(n),u))PU(this.runtime,this.session,e.ref,d);return this.session.invalidateDerived(),{field:this.readBackField(s.fieldObjectNumber)}}updateField(e,t,n){hW(n);let{fn:r}=this.runtime,i=this.session.requireDocPtr(),o=gv(this.runtime,this.session),a=wP(this.runtime,o,e);this.assertWritable(a);let s=Di(this.runtime,o,a.fieldIndex,this.session.requireDocPtr(),w$(this.runtime,this.session));var l=t,u=s.kind;if(void 0!==l.kind&&l.kind!==u)throw new N(G.InvalidArg,`patch family \'${l.kind}\' does not match field family \'${u}\'`,{details:{field:"kind"}});let d=new Set([...En,...Er[u]??[]]);for(let[e,t]of Object.entries(l))if(void 0!==t&&!d.has(e))throw new N(G.InvalidArg,`\'${e}\' does not apply to a ${u} field`,{details:{field:e}});let c="defaultValue"in l?l.defaultValue:void 0;if(null!=c&&Array.isArray(c)!==("listbox"===u))throw new N(G.InvalidArg,"listbox"===u?"a list\'s defaultValue is a list of option values":`a ${u} field\'s defaultValue is one string`,{details:{field:"defaultValue"}});let f=et(t,s),m=Y(f),p="anyone"===f.kind,h=P1(this.runtime,o,a.fieldIndex),F=void 0===t.purpose?void 0:rj(t.purpose),g=void 0===t.placeholder?void 0:eC(t.placeholder),_=ex(t,s.kind),P=rK(t,s.kind),D=void 0===P?[]:this.pressesOf(s);if(P){let e=D.filter(e=>null!==e);rJ(e,D.length-e.length)}"defaultValue"in t&&void 0!==t.defaultValue&&ia({field:s,widgets:[]},t);let b=a.fieldObjectNumber;void 0!==t.name&&this.applyWideSetter(r.EPDFForm_SetFieldName,b,t.name,`cannot rename to "${t.name}" (sibling conflict or invalid)`);let{setBits:y,clearBits:w}=w1(t);if((0!==y||0!==w)&&!r.EPDFForm_SetFieldFlags(i,b,y,w))throw new N(G.InvalidArg,"flag update rejected");if("maxLength"in t&&void 0!==t.maxLength&&!r.EPDFForm_SetFieldMaxLen(i,b,t.maxLength??0))throw new N(G.InvalidArg,"maxLength rejected (current value exceeds it)");void 0!==t.alternateName&&this.applyWideSetter(r.EPDFForm_SetFieldAlternateName,b,t.alternateName??"","alternate name rejected"),void 0!==t.mappingName&&this.applyWideSetter(r.EPDFForm_SetFieldMappingName,b,t.mappingName??"","mapping name rejected"),m!==s.groupId&&P2(this.runtime,i,b,[[PW,m]]),p!==h&&P3(this.runtime,i,b,p),void 0!==F&&F!==s.purpose&&P2(this.runtime,i,b,[[PH,F]]),void 0!==g&&g!==s.placeholder&&P2(this.runtime,i,b,[[PK,g]]),void 0===_||eS(_,"format"in s?s.format:null)||w5(this.runtime,i,b,s.actions,eA(_));let E="options"in t&&void 0!==t.options,A="defaultValue"in t&&void 0!==t.defaultValue;if(E||A){let e=ia({field:s,widgets:[]},t).field;"options"in t&&t.options&&this.applyOptions(b,t.options),this.writeDefault(b,s.defaultValueEntry,e.defaultValueEntry),E&&this.writeFieldAfter(b,s,e,!0)}t.actions&&w5(this.runtime,i,b,s.actions,t.actions),void 0!==P&&s.widgets.forEach((e,t)=>{let n=D[t];if(!n||!e.ref)return;let r=rZ(n,P);"keep"!==r.kind&&function(e,t,n,r){let i=gj(e,t,n);try{PM(e,t.requireDocPtr(),i,rQ(r))}finally{e.fn.FPDFPage_CloseAnnot(i)}}(this.runtime,this.session,e.ref,r)});let v=this.followCalculateScript(b,t.actions?.calculate);return this.session.invalidateDerived(),{field:this.readBackField(b),calculationOrder:v}}pressesOf(e){let t=this.session.requireDocPtr();return Pz(this.runtime,t,e.widgets,new PR(this.runtime,t))}reorderCalculations(e,t,n){hW(n);let r=gv(this.runtime,this.session),i=e=>wP(this.runtime,r,e).fieldObjectNumber,o=wK(this.runtime,r),a=e.map(i),s=nD(o,a,"start"===t||"end"===t?t:"before"in t?{before:i(t.before)}:{after:i(t.after)},String);return hW(n),wJ(o,s)||(wZ(this.runtime,this.session.requireDocPtr(),s),this.session.invalidateDerived()),{before:o,after:s,moved:a}}followCalculateScript(e,t){if(void 0===t)return null;let n=wK(this.runtime,gv(this.runtime,this.session)),r=n.includes(e),i=null===t?n.filter(t=>t!==e):r?n:[...n,e];return wJ(n,i)?null:(wZ(this.runtime,this.session.requireDocPtr(),i),{before:n,after:i})}deleteField(e,t){hW(t);let n=gv(this.runtime,this.session),r=wP(this.runtime,n,e);this.assertWritable(r);let i=Di(this.runtime,n,r.fieldIndex,this.session.requireDocPtr(),w$(this.runtime,this.session)),o=i.widgets.map(e=>eR(e.objectNumber,e.page));hW(t);let a=this.followCalculateScript(r.fieldObjectNumber,null);if(!this.nativeDeleteField(r.fieldObjectNumber))throw new N(G.InvalidArg,"field cannot be deleted");this.session.invalidateDerived();let s=new yD(this.runtime,this.session);for(let e of o)e.ref&&s.deleteReleasedWidget(e.ref,r.fieldObjectNumber);return this.session.invalidateDerived(),{deleted:i.ref,removedWidgets:o,calculationOrder:a}}deleteFields(e,t){hW(t);let{fn:n}=this.runtime,r=this.session.requireDocPtr(),i=gv(this.runtime,this.session),o=w$(this.runtime,this.session),a=e.map(e=>{let t=wP(this.runtime,i,e);this.assertWritable(t);let n=Di(this.runtime,i,t.fieldIndex,r,o);return{objectNumber:t.fieldObjectNumber,widgets:n.widgets.map(e=>eR(e.objectNumber,e.page))}}),s=new Set(a.map(e=>e.objectNumber)),l=wK(this.runtime,i),u=l.filter(e=>!s.has(e)),d=wJ(l,u)?null:{before:l,after:u};for(let{objectNumber:e}of(hW(t),d&&wZ(this.runtime,r,u),a))if(!this.nativeDeleteField(e))throw new N(G.InvalidArg,"field cannot be deleted");let c=a.flatMap(e=>e.widgets),f=new Map;for(let e of c){if(!e.ref||!e.page)continue;let t=f.get(e.page.objectNumber)??[];t.push(e.objectNumber),f.set(e.page.objectNumber,t)}for(let[e,t]of f){gx(this.runtime,this.session,e);let{pageIndex:i}=this.session.resolvePageRef(q(e));for(let o of t.map(e=>n.EPDFPage_GetAnnotIndexByObjectNumberRaw(r,i,e)).filter(e=>e>=0).sort((e,t)=>t-e))if(!n.EPDFPage_RemoveAnnotRaw(r,i,o))throw new N(G.Unknown,`a widget could not leave page ${e}`)}return this.session.invalidateDerived(),{removedWidgets:c,calculationOrder:d}}addWidget(e,t,n,r={}){let{objectNumber:i,splitObjectNumber:o}=r,{field:a,widgets:s}=this.addWidgets(e,[{placement:t}],n,{...void 0!==i?{objectNumbers:[i]}:{},...void 0!==o?{splitObjectNumber:o}:{}});return{field:a,widget:s[0]}}addWidgets(e,t,n,r={}){hW(n);let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr(),s=gv(this.runtime,this.session),l=wP(this.runtime,s,e);this.assertWritable(l);let u=Di(this.runtime,s,l.fieldIndex,a,w$(this.runtime,this.session)),d="pushbutton"===u.kind&&u.takesImage,c=t.map(({placement:e})=>{let t=ot(ir(u.kind,e));return d?{...t,actions:rH(t.actions)}:t}),f=c.map(e=>this.preflightPlacement(e)),m=c.map(e=>Ei(u.kind,e)),p="checkbox"===u.kind||"radio"===u.kind,h=p?function(e,t,n=[]){let r="checkbox"===e.kind||"radio"===e.kind,i=r?e.widgets:[],o=new Map;for(let e of i)""===e.onState||o.has(e.exportValue)||o.set(e.exportValue,e.onState);let a=new Set(i.map(e=>e.onState)),s=r&&e.hasValuesList;return t.map((e,t)=>{let r=n[t]??o.get(e)??(s?(()=>{let e=0;for(;a.has(String(e));)e+=1;return String(e)})():e);return a.add(r),o.has(e)||o.set(e,r),r})}(u,m,t.map(e=>e.onState)):m,{objectNumbers:F}=r;if(F&&F.length!==t.length)throw new N(G.InvalidArg,`one widget object number per widget: ${F.length} for ${t.length}`,{details:{field:"objectNumbers"}});let g="pushbutton"===u.kind&&u.hasImage?this.imageOf(u):0,_=u.widgets.find(e=>e.objectNumber===l.fieldObjectNumber)?.page??null;for(let e of F??[])this.session.claimObjectNumber(e);let P=_?r.splitObjectNumber:void 0;if(void 0!==P&&this.session.claimObjectNumber(P),hW(n),_&&gx(this.runtime,this.session,_.objectNumber),r.radiosInUnison){let{setBits:e,clearBits:t}=w1({radiosInUnison:!0});i.EPDFForm_SetFieldFlags(a,l.fieldObjectNumber,e,t)}let D=yp(this.runtime,this.session,this.fonts),b=c.map((e,n)=>{let r,s=wq(this.runtime,a,f[n],e,F?.[n],D),u=p?o.writeU16String(m[n]):0n;try{r=i.EPDFForm_AttachWidget(a,l.fieldObjectNumber,s,h[n],u,(0===n?P:void 0)??0)}finally{0n!==u&&o.free(u)}if(!r)throw new N(G.InvalidArg,"the widget could not join the field");let d=eR(s,e.page);0!==g&&PU(this.runtime,this.session,d.ref,g);let c=t[n].flags;return c&&wH(this.runtime,this.session,d,c),d}),y=m.map(e=>(function(e,t,n=!1){return("checkbox"===e.kind||"radio"===e.kind)&&("radio"!==e.kind||!!e.radiosInUnison||!!n)&&e.widgets.some(e=>e.checked&&e.exportValue===t)})(u,e,r.radiosInUnison));if(y.some(Boolean)){let e=[...u.widgets.map(e=>e.checked),...y];if(null===this.withChangedWidgets((t,n,r)=>h1(this.runtime.mem,e.map(e=>+!!e),(e,o)=>i.EPDFForm_SetFieldWidgetsChecked(a,l.fieldObjectNumber,e,o,t,n,r))))throw new N(G.Unknown,"the new widgets could not take the field\'s value")}this.session.invalidateDerived();let w=this.readBackField(l.fieldObjectNumber);if(p){let e=new Map(w.widgets.map(e=>[e.objectNumber,"exportValue"in e?e.exportValue:null]));for(let[t,n]of b.entries()){let r=e.get(n.objectNumber);if(null!=r&&r!==m[t])throw new N(G.Unknown,`a new widget of \'${u.name}\' reads \'${r}\', not \'${m[t]}\'`)}}return{field:w,widgets:b}}imageOf(e){for(let t of e.widgets){if(null===t.ref)continue;let e=PV(this.runtime,this.session,t.ref);if(0!==e)return e}return 0}detachWidget(e,t,n){hW(n);let{fn:r}=this.runtime,i=gv(this.runtime,this.session),o=wP(this.runtime,i,e);this.assertWritable(o);let a=Eo(t);if(a===o.fieldObjectNumber)throw new N(G.InvalidArg,`widget ${a} is the field\'s own dictionary (a merged field/widget) and cannot be removed from it - delete the field with doc.forms.delete`);if(!r.EPDFForm_DetachWidget(this.session.requireDocPtr(),o.fieldObjectNumber,a))throw new N(G.InvalidArg,"widget is not attached to this field");return this.session.invalidateDerived(),{field:this.readBackField(o.fieldObjectNumber),widget:eR(Eo(t),t.page)}}applyOptions(e,t){let{fn:n}=this.runtime,r=this.session.requireDocPtr();if(!gf(this.runtime,t.map(e=>e.label),i=>gf(this.runtime,t.map(e=>e.value),(t,o)=>n.EPDFForm_SetFieldOptions(r,e,i,t,o))))throw new N(G.InvalidArg,"options rejected")}applyWideSetter(e,t,n,r){let{mem:i}=this.runtime,o=this.session.requireDocPtr(),a=i.writeU16String(n);try{if(!e(o,t,a))throw new N(G.InvalidArg,r)}finally{i.free(a)}}writeDefault(e,t,n){if(r7(t,n))return;let r=this.session.requireDocPtr();if(!w8(this.runtime,r,e,n,"default"))throw new N(G.InvalidArg,"default value rejected")}readBackField(e){let t=gv(this.runtime,this.session),n=this.runtime.fn.EPDFForm_GetFieldIndexByObjNum(t,e);if(n<0)throw new N(G.Unknown,"form field vanished after write");return Di(this.runtime,t,n,this.session.requireDocPtr(),w$(this.runtime,this.session))}assertWritable(e){if(0===e.fieldObjectNumber)throw new N(G.InvalidArg,"form field is stored as a direct object and cannot be written");this.assertNotLockedBySignature(e)}assertNotLockedBySignature(e){let t=wz(this.runtime,this.session);if(!t)return;let n=gv(this.runtime,this.session);var r=h3(this.runtime.mem,(t,r)=>this.runtime.fn.EPDFForm_GetFieldName(n,e.fieldIndex,t,r))??"";let i=t?.(r);if(i)throw new N(G.ProtectedDocument,`form field "${r}" is locked by signature ${i.signatureIndex} (${"fieldmdp"===i.source?"FieldMDP":"/Lock"})`)}writeFieldAfter(e,t,n,r=!1){let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr(),s="checkbox"===n.kind||"radio"===n.kind?n.widgets:null,l=!r7(t.valueEntry,n.valueEntry),u=s?.some((e,n)=>e.checked!==t.widgets[n]?.checked)??!1;if(!l&&!u&&!r)return null;let d=()=>new N(G.InvalidArg,`\'${n.name}\' could not take the value`);if(l&&!w8(this.runtime,a,e,n.valueEntry,"value"))throw d();if("combobox"===n.kind||"listbox"===n.kind){var c;let t=n.options.flatMap((e,t)=>e.selected?[t]:[]);if(c=this.runtime,!h1(c.mem,t,(t,n)=>c.fn.EPDFForm_SetFieldSelectedIndices(a,e,t,n)))throw d()}if(s?.length===0)return[];let f=this.withChangedWidgets((t,n,r)=>s?h1(o,s.map(e=>+!!e.checked),(o,s)=>i.EPDFForm_SetFieldWidgetsChecked(a,e,o,s,t,n,r)):i.EPDFForm_RedrawFieldWidgets(a,e,t,n,r));if(null===f)throw d();return f}withChangedWidgets(e){let{mem:t}=this.runtime;return h0(t,[1024,8],([n,r])=>{if(Ft(t,r,0),!e(n,256,r))return null;let i=Math.min(Number(t.peek(r,"i32")),256),o=[];for(let e=0;ea.has(e.objectNumber)).map(e=>eR(e.objectNumber,e.page));return{field:o,meta:y4(this.session.writeStamp(),[o.ref],s,void 0===n?y8(o.kind,s):n?s:[])}}},En=["kind","name","readOnly","required","noExport","alternateName","mappingName","groupId","assignment","purpose","placeholder","actions"],Er={text:["defaultValue","maxLength","multiline","password","comb","format"],radio:["radiosInUnison","noToggleToOff"],combobox:["edit","defaultValue","options","format"],listbox:["multiSelect","options","defaultValue"],pushbutton:["takesImage"]};function Ei(e,t){let{exportValue:n}=t;if("checkbox"!==e&&"radio"!==e){if(void 0!==n)throw new N(G.InvalidArg,`\'exportValue\' applies to checkbox and radio widgets, not a ${e} field\'s`,{details:{field:"exportValue"}});return""}let r=n??("checkbox"===e?"Yes":void 0);if(!r||"Off"===r)throw new N(G.InvalidArg,"radio"===e?\'every radio button needs an exportValue other than "Off"\':"a checkbox\'s exportValue can\'t be \\"Off\\"",{details:{field:"exportValue"}});return r}function Eo(e){if("objectNumber"!==e.kind)throw new N(G.InvalidArg,"widget must be addressed by object number");return e.objectNumber}function Ea(e,t,n,r,i,o){let a=()=>wK(e,gv(e,t)),s=a(),l=gF(e,t),u=new Et(e,t,n),d=r.map((n,r)=>{let{groupId:i,assignment:a,...s}=i6(n.draft,l),d=o.assignmentOf(a??X(i??null)),[c,...f]=n.objectNumbers??[],{objectNumber:m,widgets:p}=u.writeField({...s,assignment:d},o.signal,o.actor,void 0===c?{}:{objectNumber:c,widgetObjectNumbers:f});return p.forEach((r,i)=>wH(e,t,r,n.flags[i])),n.images?.forEach((n,r)=>{let i=p[r];n&&i?.ref&&PU(e,t,i.ref,function(e,t,n){if("drawing"in n)return n.drawing;let{fn:r,mem:i}=e,o=wX(r,i,n.bytes,"a push button\'s image",!1,"image");return Dy(r,i,t.requireDocPtr(),t.drawingIndex(),n.bytes,o)}(e,t,n))}),t.invalidateDerived(),n.value&&u.setValue(Es(m),n.value,o.signal),o.made?.(m,r),m}),c=i.map(e=>Es(d[e]));c.length>0&&u.reorderCalculations(c,"end",o.signal),t.invalidateDerived();let f=a(),m=d.map(n=>{let r=gv(e,t);return Di(e,r,e.fn.EPDFForm_GetFieldIndexByObjNum(r,n),t.requireDocPtr(),w$(e,t))});return wV(e,t,{fields:m,...wJ(s,f)?{}:{calculationOrder:f.map(Es)},meta:y4(t.writeStamp(),m.map(e=>e.ref),m.flatMap(e=>e.widgets))},n)}function Es(e){return{kind:"objectNumber",objectNumber:e}}function El(e){let{groupOf:t,assignmentOf:n}=e;return n||(t?e=>"anyone"===e.kind?e:X(t(Y(e))):e=>e)}var Eu=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}copy(e,t){hW(t),y0(e.limits,"items",e.fields.length),e.page&&this.session.resolvePageRef(e.page);let n=i8(new wW(this.runtime,this.session,this.fonts).snapshot(t),gF(this.runtime,this.session)),r=function(e){let t=function(e){let{form:t,mayScript:n,placement:r}=e,i=new Map(t.widgets.map(e=>[K(e.ref),e])),o=e.widgets?new Set(e.widgets.map(K)):null,a=new Set(t.fields.map(e=>e.name)),s=r.offset??{x:0,y:0},l=[],u=[],d=[],c=new Set;for(let f of(e.fields.forEach((f,m)=>{let p=t.fields.find(e=>ae(e,f));if(!p)throw new N(G.NotFound,`copy: no form field ${eM(f)}`,{details:{item:m}});let h=p.widgets.flatMap(e=>{let t=e.ref?i.get(K(e.ref)):void 0;return t&&(!o||o.has(K(t.ref)))?[t]:[]}),F=aa(p,h);for(let e of h)c.add(K(e.ref));if(o&&0===h.length)throw new N(G.InvalidArg,`copy: \'widgets\' names no widget of field ${m}`,{details:{item:m,field:"widgets"}});if("unknown"===F.kind)return void l.push({ref:F.ref,reason:"unsupported-kind"});let g=af(F.name,e=>ac(a,e));a.add(g);let _=ao(F,n,l),P=h.map(e=>{let t;return{...t=as(F,e,e=>e,n,l),...r.page?{page:r.page}:{},...t.rect?{rect:{...t.rect,x:t.rect.x+s.x,y:t.rect.y+s.y}}:{}}}),D=e.values&&"signature"!==F.kind&&ar(F)?ad(F):null;d.push(p),u.push({source:m,draft:au(F,g,_,P,`copy: field ${m}`),widgets:h.map(e=>e.ref),flags:h.map(al),...D?{value:D}:{}})}),o??[]))if(!c.has(f))throw new N(G.InvalidArg,`copy: widget ${f} is a widget of none of the fields`,{details:{field:"widgets"}});return{creates:u,calculationOrder:t.calculationOrder.flatMap(e=>e?u.flatMap((t,n)=>ae(d[n],e)&&t.draft.actions?.calculate?[n]:[]):[]),dropped:l}}(e);for(let e of t.creates)hT(e.draft,`copy: field ${e.source}`,{item:e.source});return t}({form:n,fields:e.fields,...e.widgets?{widgets:e.widgets}:{},placement:{...e.page?{page:e.page}:{},...e.offset?{offset:e.offset}:{}},values:e.values,mayScript:e.mayScript}),{objectNumbers:i}=e,o=r.creates.reduce((e,t)=>e+1+t.widgets.length,0);if(i&&i.length!==o)throw new N(G.InvalidArg,`copy: objectNumbers names ${i.length} objects of ${o}`,{details:{field:"objectNumbers"}});let a=0,s=Ea(this.runtime,this.session,this.fonts,r.creates.map(t=>{let n=1+t.widgets.length,r=i?.slice(a,a+n);a+=n;let o=e.values&&"pushbutton"===t.draft.kind?t.widgets.map(e=>{let t=PV(this.runtime,this.session,e);return 0===t?null:{drawing:t}}):void 0;return{...t,...r?{objectNumbers:r}:{},...o?{images:o}:{}}}),r.calculationOrder,{actor:e.actor,assignmentOf:El(e),signal:t});return{...s,refMap:r.creates.map((t,r)=>({from:n.fields.find(n=>ae(n,e.fields[t.source])).ref,to:s.fields[r].ref})),dropped:[...r.dropped]}}},Ed=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}import(e,t){hW(t),yI(this.runtime,"form",e.bundle,e.limits,rw);let n=rb(e.bundle),r=this.fieldNames(),i=function(e){let{bundle:t,mayScript:n}=e,r=tP({bundlePages:t.pages,pages:e.pages??"same",target:e.target,named:t.widgets.flatMap(e=>rB(e.data))}),i=new Map(t.widgets.map((e,t)=>[K(e.data.ref),t])),o=new Set,a=[],s=new Set,l=[];return t.fields.forEach(({data:u},d)=>{var c,f,m,p;let h,F=u.widgets.flatMap(e=>{let t=e.ref?i.get(K(e.ref)):void 0;return void 0===t?[]:[t]});for(let e of F)o.add(e);let g=aa(u,F.map(e=>t.widgets[e].data));if("unknown"===g.kind)return void a.push({ref:g.ref,reason:"unsupported-kind"});if(s.has(g.name)||e.nameTaken(g.name))return void a.push({ref:g.ref,reason:"name-conflict"});s.add(g.name);let _=(c=g,f=ao(g,n,a),m=F.map(e=>as(g,t.widgets[e].data,r,n,a)),p=d,h=`import: field ${p}`,hT(au(c,c.name,f,m,h),h,{item:p})),P=e.values&&ar(g)?ad(g):null;l.push({field:d,draft:_,widgets:F,flags:F.map(e=>al(t.widgets[e].data)),...P?{value:P}:{}})}),t.widgets.forEach((e,t)=>{o.has(t)||a.push({ref:e.data.field,widget:e.data.ref,reason:"no-field"})}),{creates:l,calculationOrder:t.calculationOrder.flatMap(e=>{let n=l.findIndex(n=>eM(t.fields[n.field].data.ref)===eM(e)&&n.draft.actions?.calculate);return n<0?[]:[n]}),dropped:a}}({bundle:n,...void 0!==e.pages?{pages:e.pages}:{},target:this.session.allRecords().map(e=>({page:q(e.pageObjectNumber),position:e.pageIndex})),nameTaken:e=>ac(r,e),mayScript:e.mayScript,values:e.values}),o=this.session.requireDocPtr(),a=e.actor.userId??null,s="restore"===e.attribution,l=i.creates.map(t=>{if(!e.values||"pushbutton"!==t.draft.kind)return t;let r=t.widgets.map(e=>{let t=n.widgets[e]?.resources.image,r=void 0===t?void 0:n.resources[t];return r?{bytes:r}:null});return r.some(Boolean)?{...t,images:r}:t}),u=Ea(this.runtime,this.session,this.fonts,l,i.calculationOrder,{actor:e.actor,assignmentOf:El(e),signal:t,made:(e,t)=>{var r;if(!s)return;let l=n.fields[i.creates[t].field].data;r=this.runtime,P2(r,o,e,[[PZ,l.createdBy],[PJ,l.createdAt?hH(l.createdAt):null],[PQ,a]])}});return{...u,refMap:i.creates.map((e,t)=>({from:n.fields[e.field].data.ref,to:u.fields[t].ref})),dropped:[...i.dropped]}}planValues(e,t,n,r){var i;let o,a;hW(n),yI(this.runtime,"form",e,t,rw);let s=wz(this.runtime,this.session),l=(i={bundle:e,target:this.readFields(),refusal:(e,t)=>{if("objectNumber"!==e.ref.kind)return"value-not-allowed";try{r4(e,t)}catch(e){if(N.is(e))return"value-not-allowed";throw e}return s?.(e.name)?"locked":r(e)?null:"fill-not-allowed"}},o=[],a=[],i.bundle.fields.forEach(({data:e},t)=>{let n=ar(e)?ad(e):null;if(!n)return;let r=i.target.find(t=>ae(t,{kind:"fqn",name:e.name}));if(r)if(r.kind!==e.kind)a.push({ref:e.ref,reason:"wrong-kind"});else{let s=i.refusal?.(r,n);s?a.push({ref:e.ref,reason:s}):o.push({field:t,target:r,value:n})}else a.push({ref:e.ref,reason:"no-field"})}),{writes:o,dropped:a});return{writes:l.writes.filter(({target:e,value:t})=>!function(e,t){switch(t.kind){case"text":return"text"===e.kind&&e.value===t.value;case"toggle":return("checkbox"===e.kind||"radio"===e.kind)&&e.widgets.every(e=>e.checked===(e.onState===t.state));case"choice":if("combobox"===e.kind)return 0===t.values.length?""===e.value:e.value===t.values[0];return"listbox"===e.kind&&e.selectedValues.length===t.values.length&&e.selectedValues.every((e,n)=>e===t.values[n])}}(e,r4(e,t))),dropped:l.dropped}}writeValue(e,t){return new Et(this.runtime,this.session,this.fonts).setValue(e.target.ref,e.value,t),this.readField(function(e){if("objectNumber"!==e.kind)throw Error("a written field has an object number");return e.objectNumber}(e.target.ref))}fieldNames(){let{fn:e,mem:t}=this.runtime,n=gv(this.runtime,this.session),r=new Set;for(let i=0;ie.EPDFForm_GetFieldName(n,i,t,r));o&&r.add(o)}return r}readFields(){let e=gv(this.runtime,this.session),t=this.session.requireDocPtr();return Array.from({length:this.runtime.fn.EPDFForm_CountFields(e)},(n,r)=>Di(this.runtime,e,r,t,w$(this.runtime,this.session)))}readField(e){let t=gv(this.runtime,this.session),n=this.runtime.fn.EPDFForm_GetFieldIndexByObjNum(t,e);return Di(this.runtime,t,n,this.session.requireDocPtr(),w$(this.runtime,this.session))}},Ec=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}plan(e,t){hW(t);let n=this.session.requireDocPtr(),r=gF(this.runtime,this.session),i=e=>{let t=this.session.resolvePageRef(e),i=q(t.pageObjectNumber),o=r(i);return{ref:i,size:{width:o.right-o.left,height:o.top-o.bottom},rotation:g_(this.runtime,n,t.pageIndex)}},o=("all"===e.pages?this.session.allRecords().sort((e,t)=>e.pageIndex-t.pageIndex).map(e=>q(e.pageObjectNumber)):e.pages).map(i),a=function(e){let t=function(e){let{form:t,mayScript:n}=e,{as:r,field:i,template:o,from:a,targets:s}=function(e){let{form:t,limits:n}=e,r=t.fields.find(t=>ae(t,e.field));if(!r)throw new N(G.NotFound,`repeat: no form field ${eM(e.field)}`);let i=e.as??ap(r),o=function(e,t,n=ap(t)){return"signature"===t.kind?"a signature field shows in one place: a signer signs once":"unknown"===t.kind?"a field of a kind the engine does not model":am(e,t).length>0?null:"the field shows on no page"}(t,r,i);if(o)throw new N(G.InvalidArg,`repeat: ${o}`,{details:{field:"field"}});let a=am(t,r),s=a[0].page,l=e.pageOf(s);if(!l)throw new N(G.NotFound,`repeat: no page ${s.objectNumber}`);let u=new Set("boxes"===i?r.widgets.flatMap(e=>e.page?.objectNumber??[]):[s.objectNumber]),d=[];for(let t of e.pages)u.has(t.ref.objectNumber)||(u.add(t.ref.objectNumber),d.push(t));let c=d.length*("boxes"===i?a.length:1+a.length);return aF(n,"pages",d.length),aF(n,"items",c),{as:i,field:r,template:a,from:l,targets:d,count:c}}(e),l={as:r,field:i,pages:s.map(e=>e.ref)},u={widgets:[],unison:!1,splits:!1,creates:[],calculationOrder:[]};if(0===s.length)return{...l,...u,dropped:[],needs:0};let d=[],c="fields"===r?aa(i,o):i,f=o.map(e=>{let{rect:t,box:r,rotation:i,...o}=as(c,e,e=>e,n,d);return{row:e,look:o,place:{rect:e.rect,rotation:e.rotation??0}}}),m=e=>f.map(({look:t,place:n})=>{let r,i,o,{rect:s,rotation:l}=(i=Math.min((r=ah(a.rotation)===ah(e.rotation)&&a.size.width===e.size.width&&a.size.height===e.size.height?n.rect:function(e,t){let{x:n,y:r,width:i,height:o}=t,{width:a,height:s}=e.size;switch(ah(e.rotation)){case 90:return{x:r,y:s-n-i,width:o,height:i};case 180:return{x:a-n-i,y:s-r-o,width:i,height:o};case 270:return{x:a-r-o,y:n,width:o,height:i};default:return{x:n,y:r,width:i,height:o}}}(e,function(e,t){let{x:n,y:r,width:i,height:o}=t,{width:a,height:s}=e.size;switch(ah(e.rotation)){case 90:return{x:s-r-o,y:n,width:o,height:i};case 180:return{x:a-n-i,y:s-r-o,width:i,height:o};case 270:return{x:r,y:a-n-i,width:o,height:i};default:return{x:n,y:r,width:i,height:o}}}(a,n.rect))).width,e.size.width),o=Math.min(r.height,e.size.height),{rect:{x:Math.min(Math.max(r.x,0),Math.max(e.size.width-i,0)),y:Math.min(Math.max(r.y,0),Math.max(e.size.height-o,0)),width:i,height:o},rotation:ah(n.rotation+a.rotation-e.rotation)});return{...t,page:e.ref,rect:s,...l?{rotation:l}:{}}});if("boxes"===r){let e=new Map("checkbox"===i.kind||"radio"===i.kind?i.widgets.flatMap(e=>e.ref?[[K(e.ref),e.onState]]:[]):[]),t=s.flatMap(t=>m(t).map((t,n)=>{let r=f[n].row.ref,i=e.get(K(r));return{source:r,placement:t,flags:al(f[n].row),...i?{onState:i}:{}}})),n="objectNumber"===i.ref.kind&&i.widgets.some(e=>e.objectNumber===i.ref.objectNumber);return{...l,...u,widgets:t,unison:"radio"===i.kind&&!i.radiosInUnison,splits:n,dropped:d,needs:t.length+ +!!n}}let p=new Set(t.fields.map(e=>e.name)),h=ao(c,n,d),F=f.map(({row:e})=>al(e)),g=f.map(({row:e})=>e.ref),_=c.name,P=s.map(e=>(_=af(_,e=>ac(p,e)),p.add(_),{source:0,draft:au(c,_,h,m(e),"repeat: the field"),widgets:g,flags:F})),D=t.calculationOrder.some(e=>null!==e&&ae(i,e));return{...l,...u,creates:P,calculationOrder:D?P.flatMap((e,t)=>e.draft.actions?.calculate?[t]:[]):[],dropped:d,needs:P.length*(1+o.length)}}(e);for(let e of t.creates)hT(e.draft,"repeat: the field",{});return t}({form:i8(this.read(e.field),r),field:e.field,pages:o,pageOf:i,...e.as?{as:e.as}:{},mayScript:e.mayScript,limits:e.limits}),{objectNumbers:s}=e;if(s&&s.length!==a.needs)throw new N(G.InvalidArg,`repeat: objectNumbers names ${s.length} objects of ${a.needs}`,{details:{field:"objectNumbers"}});return a}read(e){let t=Do(this.runtime,gv(this.runtime,this.session),this.session.requireDocPtr(),w$(this.runtime,this.session)),n=t.fields.find(t=>ae(t,e));return{...t,widgets:n?wU(this.runtime,this.session,n.widgets,this.fonts):[]}}addBoxes(e,t,n){let r=gF(this.runtime,this.session),i=e.widgets.length,o=e.splits?t?.[i]:void 0,a=new Set(e.field.widgets.map(e=>e.objectNumber)),{field:s,widgets:l}=new Et(this.runtime,this.session,this.fonts).addWidgets(e.field.ref,e.widgets.map(({placement:e,flags:t,onState:n})=>({placement:i2(e,r),flags:t,...void 0!==n?{onState:n}:{}})),n,{...t?{objectNumbers:t.slice(0,i)}:{},...void 0!==o?{splitObjectNumber:o}:{},radiosInUnison:e.unison});for(let e of l)a.add(e.objectNumber);return{field:s,added:l,split:s.widgets.filter(e=>!a.has(e.objectNumber))}}createFields(e,t,n){let r=0;return Ea(this.runtime,this.session,this.fonts,e.creates.map(e=>{let n=1+e.widgets.length,i=t.objectNumbers?.slice(r,r+n);return r+=n,{...e,...i?{objectNumbers:i}:{}}}),e.calculationOrder,{actor:t.actor,assignmentOf:t.assignmentOf,signal:n})}},Ef=["AP","MK"],Em=new Set(["text","checkbox","radio","combobox","listbox"]),Ep=new Set(["forms.setValue","forms.setDisplay","forms.setAppearanceText","forms.reset","forms.setSignatureAppearance","forms.setButtonImage"]);function Eh(e,t){let n=t.field.widgets.find(e=>e.objectNumber===t.objectNumber&&e.page);if(!n?.page)return{split:null,mergedEntry:null};let{pageIndex:r}=e.session.resolvePageRef(n.page),i=e.session.requireDocPtr(),o=e.runtime.fn.EPDFPage_GetAnnotIndexByObjectNumberRaw(i,r,n.objectNumber);return o<0?{split:null,mergedEntry:null}:{split:n,mergedEntry:yC(e.runtime,i,r,[o])}}function EF(e,t,n,r,i,o){let a={kind:"widgets.added",reports:t,direction:"remove",fieldObjectNumber:n,added:i,split:o.merged&&o.mergedEntry&&o.widget?{merged:o.merged,mergedEntry:o.mergedEntry,widget:o.widget}:null,objects:yQ(e.runtime,e.session,r),guards:[],kids:[],states:[],values:[],widgets:[],captures:[]},{field:s}=EU(e,n),l=new Map(s.widgets.map(e=>[e.objectNumber,"onState"in e?{state:e.onState,value:e.exportValue}:null])),u=E_(a);return{...a,guards:EP(e,u),kids:s.widgets.map(e=>e.objectNumber),states:u.map(e=>l.get(e.objectNumber)?.state??""),values:u.map(e=>l.get(e.objectNumber)?.value??"")}}var Eg=e=>e.split?[e.split.merged,e.split.widget]:[],E_=e=>e.split?[e.split.widget,...e.added]:[...e.added];function EP(e,t){return yQ(e.runtime,e.session,t.map(e=>({objectNumber:e.objectNumber,deep:[],before:null})))}function ED(e,t){return EW(e,t)?.field.widgets.map(e=>e.objectNumber)??null}function Eb(e){let{fn:t,mem:n}=e.runtime,r=gv(e.runtime,e.session),i=new Set,o=t.EPDFForm_CountFields(r);for(let e=0;et.EPDFForm_GetFieldName(r,e,n,i));o&&i.add(o)}return i}function Ey(e,t,n,r=[],i=!1){let{field:o}=EU(e,t);return{type:"forms.repeat",as:"boxes",...E0(e,{fields:[o],meta:y4(e.session.writeStamp(),[o.ref],[...n])}),dropped:r,...i?{undone:!0}:{}}}function Ew(e,t,n){return{type:"forms.reorderCalculations",calculationOrder:t.map(EM),meta:y4(e.session.writeStamp(),n.map(EM),[])}}function EE(e,t){if(!o8(e.authority,t.field.assignment,"fill")){var n,r;if(n=e,r=t,r.field.actions?.calculate&&wK(n.runtime,gv(n.runtime,n.session)).includes(r.objectNumber)&&e.fillsOwnField())return void oY(e.authority,"doc.forms.fill");o4(e.authority,t.field.assignment,"fill")}}function EA(e){!function(e,t){let{grants:n,protection:r}=e;return!(r&&iR(r).has(o9(t)))&&(!n||iZ(t,n.scope,n.permissionFlags,r))}(e.authority,"fill")&&oQ(e.authority,"doc.forms.fill")}function Ev(e,t){return o7(e.authority,t),t}function ES(e,t,n){return{kind:"field.remove",objectNumber:EK(t.ref),left:t,widgets:EP(e,t.widgets),...n?{rights:n}:{}}}function Ek(e,t){let n=t.ref;gx(e.runtime,e.session,n.page.objectNumber);let r=wm(e,n),i=t.field?E$(e,t.field):null;if(i&&i.objectNumber===r)throw new N(G.InvalidArg,`widget ${r} is its field\'s own dictionary (a merged field/widget) - delete the field with doc.forms.delete`,{details:{field:"widget"}});let o=[];if(i){let t=yJ(e.runtime,e.session,[{objectNumber:i.objectNumber,deep:[]},{objectNumber:r,deep:[]}]);new Et(e.runtime,e.session,e.fonts).detachWidget({kind:"objectNumber",objectNumber:i.objectNumber},n,e.signal),o=yQ(e.runtime,e.session,t)}let{pageIndex:a,index:s}=gC(e.runtime,e.session,n),l=yC(e.runtime,e.session.requireDocPtr(),a,[s]);new yD(e.runtime,e.session,e.fonts).deleteReleasedWidget(n,0),e.session.invalidateDerived();let u=i?EU(e,i.objectNumber).field:null;return{item:{type:"forms.deleteWidget",widget:n,page:n.page,field:u,meta:y4(e.session.writeStamp(),u?[u.ref]:[],[{ref:n,objectNumber:r,page:n.page}])},reverse:[{kind:"widget.restore",page:n.page,widget:n,capture:l,fieldObjectNumber:i?.objectNumber??null,detached:o}]}}function Ex(e,t,n){let r={kind:"objectNumber",objectNumber:t.objectNumber},i=yJ(e.runtime,e.session,EH(t)),o=new Et(e.runtime,e.session,e.fonts).setValue(r,n,e.signal),a=yQ(e.runtime,e.session,i),s={type:"forms.setValue",...E0(e,o)};return 0===o.meta.changedWidgets.length&&yV(EQ(t.field),EQ(o.field))?{item:s,reverse:[]}:{item:s,reverse:[{...EL("forms.setValue",a,[t.objectNumber]),fallback:{kind:"value",fields:[{objectNumber:t.objectNumber,before:EQ(t.field),left:EQ(o.field)}]}}]}}function EG(e,t,n,r){let i=!1,o=ER(e,r,t,()=>(i=n(new Et(e.runtime,e.session,e.fonts)).meta.changedWidgets.length>0,{field:EU(e,r.objectNumber).field}));return i?o:{item:o.item,reverse:[]}}function EO(e,t,n){let r={kind:"objectNumber",objectNumber:t.objectNumber},i=null;return EN(e,ER(e,t,"forms.update",()=>{let t=new Et(e.runtime,e.session,e.fonts).updateField(r,n,e.signal);return i=t.calculationOrder,t},e=>{let r=EZ(t.field),i=EZ(e),o=[...new Set(Object.keys(n).map(EI))].filter(e=>"kind"!==e&&!yV(r[e],i[e]));return{kind:"properties",objectNumber:t.objectNumber,restore:EJ(r,o),left:EJ(i,o)}}),i)}function EI(e){return"format"===e?"actions":"groupId"===e?"assignment":e}function EN(e,t,n){return!n||iA(t.item)?t:{item:{...t.item,...EC(n)},reverse:[...t.reverse,Ej(n)]}}function EC(e){return e?{calculationOrder:e.after.map(EM)}:{}}function Ej({before:e,after:t}){return{kind:"calculations.restore",before:e,after:t}}function EM(e){return{kind:"objectNumber",objectNumber:e}}function ER(e,t,n,r,i){let o=yJ(e.runtime,e.session,EH(t)),{field:a}=r(),s=EL(n,yQ(e.runtime,e.session,o),[t.objectNumber]);return{item:E3(e,n,[a]),reverse:[i?{...s,fallback:i(a)}:s]}}function ET(e,t,n){let r=yB(e.runtime,e.session.requireDocPtr(),t.objectNumber),i={kind:"objectNumber",objectNumber:t.objectNumber},{deleted:o,removedWidgets:a,calculationOrder:s}=new Et(e.runtime,e.session).deleteField(i,e.signal);return EN(e,{item:{type:"forms.delete",meta:y4(e.session.writeStamp(),[o],a)},reverse:[{kind:"field.restore",objectNumber:t.objectNumber,name:t.field.name,pages:t.field.widgets.flatMap(e=>e.page?[e.page]:[]),capture:r,...n?{rights:n}:{}}]},s)}function EB(e){return new Set(Eq(e).map(({objectNumber:e})=>e))}function EL(e,t,n){return{kind:"objects.revert",reports:e,objects:t,subject:{fields:n}}}function E$(e,t){let n=gv(e.runtime,e.session),r=wP(e.runtime,n,t),i=Di(e.runtime,n,r.fieldIndex,e.session.requireDocPtr(),w$(e.runtime,e.session));return{objectNumber:r.fieldObjectNumber,field:i}}function Ez(e,t){try{let n=wd(e,t);return"widget"===n.subtype?n:null}catch(e){if(N.is(e))return null;throw e}}function EU(e,t){return E$(e,{kind:"objectNumber",objectNumber:t})}function EV(e,t){try{return E$(e,t)}catch{return null}}function EW(e,t){return EV(e,{kind:"objectNumber",objectNumber:t})}function Eq(e){let t=gv(e.runtime,e.session),n=e.runtime.fn.EPDFForm_CountFields(t),r=[];for(let i=0;i({objectNumber:e.objectNumber,deep:Ef}))]}function EK(e){return"objectNumber"===e.kind?e.objectNumber:0}function EZ(e){let t={name:e.name.slice(e.name.lastIndexOf(".")+1),readOnly:e.readOnly,required:e.required,noExport:e.noExport,alternateName:e.alternateName,mappingName:e.mappingName,groupId:e.groupId,assignment:e.assignment,purpose:e.purpose,placeholder:e.placeholder,actions:function(e){let t={};for(let n of["keystroke","format","validate","calculate"]){let r=e.actions?.[n];if(!r){t[n]=null;continue}let i=U(r);i&&(t[n]=i)}return t}(e)},n=e=>null===e||ev(e)?{format:e}:{},r="none"!==e.defaultValueEntry.kind,i=e=>e.map(({label:e,value:t})=>({label:e,value:t}));switch(e.kind){case"text":return{...t,defaultValue:r?e.defaultValue:null,maxLength:e.maxLength,multiline:e.multiline,password:e.password,comb:e.comb,...n(e.format)};case"radio":return{...t,radiosInUnison:e.radiosInUnison,noToggleToOff:e.noToggleToOff};case"combobox":return{...t,edit:e.edit,defaultValue:r?e.defaultValue:null,options:i(e.options),...n(e.format)};case"listbox":return{...t,multiSelect:e.multiSelect,defaultValue:r?e.defaultValue:null,options:i(e.options)};case"pushbutton":return{...t,takesImage:e.takesImage};default:return t}}function EJ(e,t){return Object.fromEntries(t.map(t=>[t,e[t]]))}function EQ(e){return ad(e)??{value:null}}function EX(e,t,n=t.widgets){return E0(e,{field:t,meta:y4(e.session.writeStamp(),[t.ref],t.widgets,n)})}function EY(e,t){let n=t.widgets;return"forms.setDisplay"===e?[]:"forms.setValue"===e||"forms.reset"===e?y8(t.kind,n):n}function E0(e,t){return wV(e.runtime,e.session,t,e.fonts)}function E1(e,t){return{type:"forms.reset",...E0(e,{fields:[...t],meta:y4(e.session.writeStamp(),t.map(e=>e.ref),t.flatMap(e=>e.widgets),t.flatMap(e=>EY("forms.reset",e)))})}}function E3(e,t,n){if("forms.reset"===t)return E1(e,n);let r=n[0];return{type:t,...EX(e,r,EY(t,r))}}function E2(e,t,n,r){let i=t.filter(e=>!yV(E6(n,e),E6(r,e)));return{kind:"metadata.revert",op:e,restore:Object.fromEntries(i.map(e=>[e,E6(n,e)])),left:Object.fromEntries(i.map(e=>[e,E6(r,e)]))}}function E6(e,t){return e[t]??null}function E5(e,t){return Object.fromEntries(t.map(t=>[t,E6(e,t)]))}var E4=class{constructor(e,t){hJ(this,"childrenByParent",new Map),hJ(this,"parentByItem",new Map);let n=(r,i,o)=>{if(o>=128)return;let a=[];this.childrenByParent.set(i,a);for(let s=e.FPDFBookmark_GetFirstChild(t,r);s;s=e.FPDFBookmark_GetNextSibling(t,s)){let t=e.EPDFOutline_GetObjectNumber(s);if(t){if(this.parentByItem.has(t))break;this.parentByItem.set(t,i),a.push(t),n(s,t,o+1)}}};n(0n,0,0)}has(e){return this.parentByItem.has(e)}parentOf(e){return this.parentByItem.get(e)}childrenOf(e){return this.childrenByParent.get(e)??[]}subtreeOf(e){let t=[e];for(let n of this.childrenOf(e))t.push(...this.subtreeOf(n));return t}levelOf(e){let t=-1;for(let n=e;n;n=this.parentOf(n))t+=1;return this.has(e)?t:void 0}isAtOrUnder(e,t){for(let n=e;n;n=this.parentOf(n))if(n===t)return!0;return!1}items(){return this.childrenOf(0).flatMap(e=>this.subtreeOf(e))}},E8={maxModels:5e4,maxNodes:2e5,maxScriptCodeUnits:16e6,maxTargetEntries:65536,maxPayloadCodeUnits:16e6};function E7(e,t,n,r,i,o){let{fn:a,mem:s}=e,l=h3(s,(e,t)=>a.FPDFBookmark_GetTitle(n,e,t))??"",u=0n!==a.FPDFBookmark_GetFirstChild(t,n),d=a.FPDFBookmark_GetStyle(n),{action:c,target:f,complete:m}=function(e,t,n,r){let{fn:i,mem:o}=e,a=i.FPDFBookmark_GetAction(n);if(a)try{let e=F8(i,o,t,i.EPDFAction_LoadModel(a),r);return{action:e,target:e?Pr(e):{kind:"unsupported"},complete:null!==e&&!e.incomplete}}catch(e){if(!N.is(e))throw e;return{action:null,target:{kind:"unsupported"},complete:!1}}let s=i.FPDFBookmark_GetDest(t,n);if(!s)return{action:null,target:null,complete:!0};let l=F2(i,o,t,s);return{action:null,target:l?{kind:"goto",destination:l}:{kind:"unsupported"},complete:!0}}(e,t,n,o);return{item:{ref:nk(r),parent:0===i?null:nk(i),title:l,target:f,action:c,open:u&&a.FPDFBookmark_GetCount(n)>0,color:function(e,t){let{fn:n,mem:r}=e;return h0(r,[4,4,4],([e,i,o])=>{if(!n.FPDFBookmark_GetColor(t,e,i,o))return null;let a=e=>Math.min(255,Math.max(0,Math.round(255*F0(r,e))));return e7(a(e),a(i),a(o))})}(e,n),bold:(2&d)!=0,italic:(1&d)!=0},complete:m}}var E9=class{constructor(e,t){this.runtime=e,this.session=t}read(e){let{fn:t}=this.runtime,n=this.session.requireDocPtr(),r=new F4(E8),i=[],o=new Set,a=!1,s=(l,u,d)=>{for(let c=t.FPDFBookmark_GetFirstChild(n,l);c;c=t.FPDFBookmark_GetNextSibling(n,c)){hW(e);let l=t.EPDFOutline_GetObjectNumber(c);if(!l){a=!0;continue}if(o.has(l)){a=!0;break}if(i.length>=5e4)return a=!0,!1;o.add(l);let f=E7(this.runtime,n,c,l,u,r);if(i.push(f.item),f.complete||(a=!0),0n!==t.FPDFBookmark_GetFirstChild(n,c)){if(d+1>=128){a=!0;continue}if(!s(c,l,d+1))return!1}}return!0};return s(0n,0,0),{items:i,incomplete:a}}readItem(e,t){let n=this.session.requireDocPtr(),r=this.runtime.fn.EPDFOutline_GetItem(n,e);if(!r)throw new N(G.NotFound,`no outline item ${e}`,{details:{field:"ref"}});return E7(this.runtime,n,r,e,t,new F4(E8)).item}},Ae=/^#[0-9a-fA-F]{6}$/;function At(e){let t=(e,t)=>{throw new N(G.InvalidArg,t,{details:{field:e}})};void 0!==e.title&&("string"!=typeof e.title&&t("title","a title is a string"),e.title.length>32767&&t("title","a title holds at most 32767 characters")),null==e.color||Ae.test(e.color)||t("color","expected a color as \'#rrggbb\'");let n=e.target;null==n||"goto"===n.kind||"uri"===n.kind||"named"===n.kind&&["NextPage","PrevPage","FirstPage","LastPage"].includes(n.name??"")||t("target",`a \'${n.kind}\' target can\'t be written`)}function An(e,t,n,r){let{fn:i,mem:o}=e,a=(e,t)=>{if(!e)throw new N(G.Unknown,`the ${t} of outline item ${n} could not be written`)};if(void 0!==r.title&&a(h5(o,r.title,e=>i.EPDFOutline_SetTitle(t,n,e)),"title"),void 0!==r.target){let e=null===r.target?0n:Pi(i,o,t,r.target);a(i.EPDFOutline_SetAction(t,n,e),"target")}if(void 0!==r.color)if(null===r.color)a(i.EPDFOutline_SetColor(t,n,!1,0,0,0),"colour");else{let{r:e,g:o,b:s}=e9(r.color);a(i.EPDFOutline_SetColor(t,n,!0,e/255,o/255,s/255),"colour")}if(void 0!==r.bold||void 0!==r.italic){let e=i.FPDFBookmark_GetStyle(i.EPDFOutline_GetItem(t,n));void 0!==r.bold&&(e=r.bold?2|e:-3&e),void 0!==r.italic&&(e=r.italic?1|e:-2&e),a(i.EPDFOutline_SetStyle(t,n,e),"style")}void 0!==r.open&&a(i.EPDFOutline_SetOpen(t,n,r.open),"open state")}var Ar=class{constructor(e,t){this.runtime=e,this.session=t,hJ(this,"reader",void 0),this.reader=new E9(e,t)}tree(){return new E4(this.runtime.fn,this.session.requireDocPtr())}create(e,t,n,r){At(n);let i=this.tree(),o=this.parentNumberOf(i,e),a=i.childrenOf(o),s=nP(a.map(nk),t,Ai),l=0===s?0:a[s-1];void 0!==r&&this.session.claimObjectNumber(r);let{fn:u,mem:d}=this.runtime,c=this.session.requireDocPtr(),f=h5(d,n.title,e=>u.EPDFOutline_CreateItem(c,r??0,o,l,e));if(!f)throw Aa("create the item");let{title:m,...p}=n;An(this.runtime,c,f,p);let h=this.reader.readItem(f,o);return{item:h,order:this.orderOf(this.tree(),o),meta:this.meta([h.ref])}}update(e,t){At(t);let n=this.tree(),r=this.requireItem(n,e,"ref");return An(this.runtime,this.session.requireDocPtr(),e.objectNumber,t),{item:this.reader.readItem(e.objectNumber,r),meta:this.meta([e])}}move(e,t,n){let r=this.tree(),i=e.map(e=>(this.requireItem(r,e,"refs"),e.objectNumber)),o=new Set(i);for(let e of(o.size!==i.length&&Ao("refs","an item is named twice"),i))i.some(t=>t!==e&&r.isAtOrUnder(e,t))&&Ao("refs",`item ${e} is under another item that moves`);let a=this.parentNumberOf(r,t);i.some(e=>r.isAtOrUnder(a,e))&&Ao("parent","an item would go under itself");let s=r.childrenOf(a).filter(e=>!o.has(e)),l="start"===n||"end"===n?null:"before"in n?n.before:n.after;l&&o.has(l.objectNumber)&&Ao("position",`the neighbour ${l.objectNumber} is one of the items that move`);let u=nP(s.map(nk),n,Ai),d=0===u?0:s[u-1];return this.place(i.map(e=>{let t={item:e,parent:a,after:d};return d=e,t}),r)}place(e,t=this.tree()){let{fn:n}=this.runtime,r=this.session.requireDocPtr(),i=new Set;for(let{item:o,parent:a,after:s}of e){i.add(t.parentOf(o)??0),i.add(a);let e=this.tree(),l=s&&e.parentOf(s)===a?s:0;if(!n.EPDFOutline_MoveItem(r,o,a,l))throw Aa(`move item ${o}`)}let o=this.tree();return{orders:[...i].map(e=>this.orderOf(o,e)),meta:this.meta(e.map(({item:e})=>nk(e)))}}placementsOf(e,t=this.tree()){let n=new Set(e);return t.items().filter(e=>n.has(e)).map(e=>{let n=t.parentOf(e),r=t.childrenOf(n),i=r.indexOf(e);return{item:e,parent:n,after:i>0?r[i-1]:0}})}delete(e){let t=this.tree();this.requireItem(t,e,"ref");let n=t.subtreeOf(e.objectNumber);if(!this.runtime.fn.EPDFOutline_DeleteItem(this.session.requireDocPtr(),e.objectNumber))throw Aa(`delete item ${e.objectNumber}`);return{meta:this.meta(n.map(nk))}}restored(e){let t=this.tree(),n=t.parentOf(e);if(void 0===n)throw Aa(`restore item ${e}`);let r=this.subtree(e,t);return{items:r,order:this.orderOf(t,n),meta:this.meta(r.map(e=>e.ref))}}find(e,t=this.tree()){let n=t.parentOf(e.objectNumber);return void 0===n?null:this.reader.readItem(e.objectNumber,n)}subtree(e,t=this.tree()){return t.subtreeOf(e).map(e=>this.reader.readItem(e,t.parentOf(e)))}updated(e){let t=this.find(e);if(!t)throw Aa(`read item ${e.objectNumber}`);return{item:t,meta:this.meta([e])}}countAgain(e){let t=this.find(e);t&&An(this.runtime,this.session.requireDocPtr(),e.objectNumber,{open:t.open})}parentNumberOf(e,t){return null===t?0:(this.requireItem(e,t,"parent"),(e.levelOf(t.objectNumber)??0)>=127&&Ao("parent",`an item under ${t.objectNumber} would be deeper than reads go`),t.objectNumber)}requireItem(e,t,n){let r=e.parentOf(t.objectNumber);if(void 0===r)throw new N(G.NotFound,`no outline item ${t.objectNumber}`,{details:{field:n}});return r}orderOf(e,t){return{parent:0===t?null:nk(t),children:e.childrenOf(t).map(nk)}}meta(e){return{affectedPages:[],cacheDelta:null,...this.session.writeStamp(),changedRefs:e}}},Ai=e=>String(e.objectNumber);function Ao(e,t){throw new N(G.InvalidArg,t,{details:{field:e}})}function Aa(e){return new N(G.MalformedPdf,`could not ${e}: the outline holds an item that isn\'t an indirect object`)}var As=["title","target","color","bold","italic","open"],Al=["A","Dest"],Au=e=>new Ar(e.runtime,e.session);function Ad(e,t,n,r){var i,o,a;let s,l=yJ(e.runtime,e.session,[{objectNumber:t.objectNumber,deep:Al}]),u=Au(e).update(t,n),d=yQ(e.runtime,e.session,l);return{item:{type:"outline.update",...u},reverse:[{kind:"objects.revert",reports:"outline.update",objects:d,subject:{outlineItem:t},fallback:(i=r,o=u.item,a=n,{kind:"outline",restore:Object.fromEntries((s=As.filter(e=>void 0!==a[e]&&!yV(i[e],o[e]))).map(e=>[e,i[e]])),left:Object.fromEntries(s.map(e=>[e,o[e]]))})}]}}function Ac(e,t){var n,r,i;let o=Au(e),a=o.tree(),s=a.parentOf(t.objectNumber),l=Af(e,a,[t.objectNumber]),u=(n=e.runtime,r=e.session.requireDocPtr(),i=t.objectNumber,yz(n,`outline item ${i}`,e=>n.fn.EPDFOutline_ExportItemRawToOwnedBuffer(r,i,e)));return{item:{type:"outline.delete",...o.delete(t)},reverse:[{kind:"outline.restore",ref:t,parent:void 0===s||0===s?null:nk(s),capture:u},...l]}}function Af(e,t,n){let r=new Set(n),i=new Set(n.map(e=>t.parentOf(e)??0));return i.delete(0),[...i].flatMap(n=>{let i=t.childrenOf(n);return i.every(e=>r.has(e))&&Au(e).find(nk(n),t)?.open?[{kind:"outline.reopen",ref:nk(n),children:i}]:[]})}function Am(e,t){return yQ(e.runtime,e.session,t.map(e=>({objectNumber:e.objectNumber,deep:[],before:null})))}function Ap(e,t){let n=Au(e).find(t);if(!n)throw new N(G.NotFound,`no outline item ${t.objectNumber}`,{details:{field:"ref"}});return n}var Ah=["Annots","Contents","Resources"],AF=["Parent","Rotate"];function Ag(e,t){let n=e.session.pagePool();n.closeIdle();try{return t()}finally{n.closeIdle()}}var A_=e=>new gw(e.runtime,e.session),AP=e=>new gG(e.runtime,e.session);function AD(e,t,n){let r="pages.insertBlank"!==t,i=Aw(e),o=r?EB(e):new Set,a=n();r&&e.session.invalidateDerived();let s=r?[...EB(e)].filter(e=>!o.has(e)):[],l=a.insertedPages.map(e=>e.objectNumber),u=AA(e,i,r0(i,AO(e).indexOf(l[0]),l.length));return{item:{type:t,...a,...AS(e,u)},reverse:[Ay(e,l,u,s)]}}function Ab(e,t,n){let r=e.session.requireDocPtr(),i=AO(e),o=Aw(e),a=t.map(t=>{var n;return{page:t,capture:(n=e.runtime,yz(n,`page ${t}`,e=>n.fn.EPDFPage_ExportRawToOwnedBuffer(r,t,e)))}}),s=t.map(q),l=A_(e).delete(s,e.signal);e.session.invalidateDerived();let u=AA(e,o,AE(o,rY(o,i.length,t.map(e=>i.indexOf(e))),n));return{item:{type:"pages.delete",pages:s,...l,...AS(e,u)},reverse:[{kind:"pages.restore",pages:a,...u?{labels:u}:{}}]}}function Ay(e,t,n,r=[]){return{kind:"pages.remove",pages:t.map(t=>({page:t,left:Ak(e,t)})),...n?{labels:n}:{},...r.length>0?{fields:r}:{}}}function Aw(e){return gp(e.runtime,e.session.requireDocPtr())}function AE(e,t,n){return n&&r1(e,n.left)?n.sections:t}function AA(e,t,n){if(!r1(t,n))return!function(e,t,n){let{fn:r,mem:i}=e;if(!h1(i,n.map(e=>e.firstPage),o=>h1(i,n.map(e=>gm.indexOf(e.style)),a=>h1(i,n.map(e=>e.firstNumber),i=>gf(e,n.map(e=>e.prefix),(e,n)=>r.EPDFDoc_SetPageLabelSections(t,o,a,i,e,n))))))throw new N(G.Unknown,"EPDFDoc_SetPageLabelSections refused",{details:{sections:n.length}})}(e.runtime,e.session.requireDocPtr(),n),{sections:t,left:n}}function Av(e,t,n,r){var i,o,a;return t.every((e,t)=>n[t]===e)?e:(i=t.length,o=r.map(e=>t.indexOf(e)),a=n.indexOf(r[0]),r0(rY(e,i,o),a,o.length))}function AS(e,t){return t?{layout:AI(e)}:{}}function Ak(e,t){let{fn:n,mem:r}=e.runtime,i=e.session.requireDocPtr(),o=yR(e.runtime,i,t,Ah,AF),a=e.session.allRecords().find(e=>e.pageObjectNumber===t),s=a?g_(e.runtime,i,a.pageIndex):0,l=new TextEncoder().encode(`\nturn ${s}`),u=new Uint8Array(o.byteLength+l.byteLength);return u.set(o),u.set(l,o.byteLength),Db(n,r,u)}function Ax(e,t){return AG(e,t).map(t=>({page:t,after:e[e.indexOf(t)-1]??0}))}function AG(e,t){return[...t].sort((t,n)=>e.indexOf(t)-e.indexOf(n))}function AO(e){return e.session.allRecords().map(e=>e.pageObjectNumber)}function AI(e){return new gh(e.runtime,e.session).read(e.signal)}function AN(e){return new Map(e.pages.map(e=>[e.ref.objectNumber,e.rotation]))}function AC(e){return{affectedPages:[],cacheDelta:null,...e.session.writeStamp()}}var Aj=class{constructor(e,t){this.runtime=e,this.session=t}setScale(e,t,n){if(hW(n),null!==t)try{tV(t)}catch(e){throw new N(G.InvalidArg,e.message)}let{fn:r,mem:i}=this.runtime,o=this.session.requireDocPtr(),a=this.session.recordByObjectNumber(e).pageIndex,s=[];for(let e=0;er.EPDFViewport_GetName(t,e,n))!==nb)continue;let n=r.EPDFViewport_GetMeasure(t);n&&1!==r.EPDFMeasure_GetSubtype(n)||s.push(e)}finally{r.EPDFViewport_Close(t)}}let l=hY(i,16,e=>gg(r,i,o,a,e).crop);if(![l.left,l.right,l.bottom,l.top].every(Number.isFinite))throw new N(G.InvalidArg,"Invalid calibration box");if(hW(n),null===t){for(let e of s.reverse())gr(r.EPDFPage_RemoveViewportRaw(o,a,e));return}hY(i,16,e=>{i.poke(e,"f32",l.left),i.poke(e,"f32",l.top,4),i.poke(e,"f32",l.right,8),i.poke(e,"f32",l.bottom,12);let n=s.length?r.EPDFPage_GetViewportRaw(o,a,s[s.length-1]):r.EPDFPage_AddViewportRaw(o,a,e);gr(n);try{gr(r.EPDFViewport_SetBBox(n,e)),gr(h6(i,nb,e=>r.EPDFViewport_SetName(n,e))),gs(r,i,r.EPDFViewport_AddMeasure(n),t)}finally{r.EPDFViewport_Close(n)}})}};function AM(e,t,n){new Aj(e.runtime,e.session).setScale(t,n,e.signal)}function AR(e,t){return{page:t,layout:new gh(e.runtime,e.session).read(e.signal),meta:{affectedPages:[],cacheDelta:null,...e.session.writeStamp()}}}function AT(e,t){let{fn:n,mem:r}=e.runtime,i=e.session.recordByObjectNumber(t).pageIndex,o=gl(n,r,e.session.requireDocPtr(),i).filter(e=>e.owned).pop();return o?.measure?.subtype==="rectilinear"?o.measure:null}function AB(e,t){let{fn:n,mem:r}=e.runtime,i=e.session.recordByObjectNumber(t).pageIndex;return hY(r,16,t=>gg(n,r,e.session.requireDocPtr(),i,t).crop)}var AL={opInFileSpace:e=>e,itemOut:e=>e},A$=class{constructor(e,t,n,r=nI){this.runtime=e,this.session=t,this.fonts=n,this.limits=r}apply(e,t,n,r){let i=this.context(t,n,t=>e.some(e=>{if("forms.setValue"!==e.type&&"forms.setAppearanceText"!==e.type)return!1;let n=EV(t,e.field);return null!==n&&o8(t.authority,n.field.assignment,"fill")}));return Az(this.session,t,e.map((e,t)=>()=>(function(e,t,n){var r,i,o,a;switch(t.type){case"annotations.create":if("widget"===t.data.subtype)throw new N(G.InvalidArg,"a widget is the form\'s: create one with doc.forms.create or doc.forms.addWidget",{details:{field:"subtype"}});oY(e.authority,o0(t.data.subtype));let s=o2(e.authority,t.data.subtype,t.data.groupId),l=e.session.resolvePageRef(t.page).pageObjectNumber,u=wu(e).create(l,t.data,e.signal,{...s?{actor:s}:{},...t.resources?{resources:t.resources}:{},...void 0!==t.objectNumber?{objectNumber:t.objectNumber}:{}});return{item:{type:"annotations.create",page:t.page,...u},reverse:[{kind:"annotation.remove",ref:u.annotation.ref,left:[u.annotation]}]};case"annotations.import":let d,c;return(d="restore"===t.attribution?"import":void 0)&&we(e.authority),{item:{type:"annotations.import",...c=new yN(e.runtime,e.session,e.fonts).import({bundle:t.bundle,...void 0!==t.pages?{pages:t.pages}:{},attribution:t.attribution,...t.actor?{actor:t.actor}:{},limits:t.limits,authorizeCreate:t=>{oY(e.authority,o0(t.subtype)),d||o2(e.authority,t.subtype,t.groupId??void 0)}},e.signal)},reverse:y9(e,c.annotations,d)};case"annotations.update":let f=wd(e,t.ref);if("widget"===f.subtype)throw new N(G.InvalidArg,"a widget is the form\'s: change its place and look with doc.forms.updateWidget");return oY(e.authority,o0(f.subtype)),yK(n,f,t.expect),wt(e,f,t.patch.nm),wa(e,t.ref,t.patch,"annotations.update",t.resources);case"annotations.delete":let m=wd(e,t.ref);if("widget"===m.subtype){let e;throw i=m,e=i.field?.kind==="objectNumber"&&"objectNumber"===i.ref.kind&&i.field.objectNumber===i.ref.objectNumber,new N(G.InvalidArg,e?"widget is its form field\'s own dictionary (a merged field/widget) - delete the field with doc.forms.delete":i.field?"widget is attached to a form field - use doc.forms.removeWidget or doc.forms.delete":"a widget is the form\'s: it isn\'t deleted as an annotation")}return oY(e.authority,o0(m.subtype)),yK(n,m,t.expect),wl(e,t.ref);case"annotations.reorder":let p;return p=y6(y3(e.runtime,e.session,t.page),"annotations",t.refs,t.position),wi(e,"annotations",t.refs),y5(e.runtime,e.session,p),wn(e,p,t.refs);case"annotations.copy":let h;return oQ(e.authority,"doc.annotate.read"),{item:{type:"annotations.copy",...h=new y1(e.runtime,e.session,e.fonts).copy({refs:t.refs,...t.page?{page:t.page}:{},...t.offset?{offset:t.offset}:{},...t.objectNumbers?{objectNumbers:t.objectNumbers}:{},read:t=>wd(e,t),authorizeCreate:t=>(oY(e.authority,o0(t.subtype)),o2(e.authority,t.subtype,void 0)),limits:e.limits},e.signal)},reverse:y9(e,h.annotations,void 0)};case"forms.setValue":let F;return F=E$(e,t.field),EE(e,F),yK(n,EQ(F.field),t.expect),Ex(e,F,t.value);case"forms.setDisplay":let g;return g=E$(e,t.field),function(e,t){if(!o8(e.authority,t.field.assignment,"fill")){if(e.fillsOwnField())return oY(e.authority,"doc.forms.fill");o4(e.authority,t.field.assignment,"fill")}}(e,g),EG(e,"forms.setDisplay",n=>n.setDisplay(t.field,t.display,e.signal),g);case"forms.setAppearanceText":let _;return _=E$(e,t.field),EE(e,_),EG(e,"forms.setAppearanceText",n=>n.setAppearanceText(t.field,t.text,e.signal),_);case"forms.reset":return function(e,t){EA(e);let n=t.fields?t.fields.map(t=>E$(e,t)):Eq(e).filter(({field:e})=>Em.has(e.kind));for(let t of n)o4(e.authority,t.field.assignment,"fill");let r=yJ(e.runtime,e.session,n.flatMap(EH)),i=new Et(e.runtime,e.session,e.fonts).reset(t.fields?[...t.fields]:void 0,e.signal),o=yQ(e.runtime,e.session,r),a=new Set(i.fields.map(e=>EK(e.ref))),s={type:"forms.reset",...E0(e,i)};return 0===a.size?{item:s,reverse:[]}:{item:s,reverse:[{kind:"objects.revert",reports:"forms.reset",objects:o,subject:{fields:[...a]},fallback:{kind:"value",fields:n.filter(({objectNumber:e})=>a.has(e)).map(({objectNumber:e,field:t})=>({objectNumber:e,before:EQ(t),left:EQ(i.fields.find(t=>EK(t.ref)===e))}))}}]}}(e,t);case"forms.create":return function(e,t){var n;oQ(e.authority,"doc.forms.modify"),(T((n=t.draft).actions)||(n.widgets??[]).some(e=>T(e.actions)))&&oQ(e.authority,"doc.forms.script"),o7(e.authority,ee(t.draft));let{field:r,calculationOrder:i}=new Et(e.runtime,e.session,e.fonts).createField(t.draft,e.signal,e.authority.identity,{...void 0!==t.objectNumber?{objectNumber:t.objectNumber}:{},...t.widgetObjectNumbers?{widgetObjectNumbers:t.widgetObjectNumbers}:{}});return{item:{type:"forms.create",...EX(e,r),...EC(i)},reverse:[ES(e,r)]}}(e,t);case"forms.copy":let P,D;return oQ(e.authority,"doc.forms.modify"),D=(P=new Eu(e.runtime,e.session,e.fonts).copy({fields:t.fields,...t.widgets?{widgets:t.widgets}:{},...t.page?{page:t.page}:{},...t.offset?{offset:t.offset}:{},values:t.values??!0,...t.objectNumbers?{objectNumbers:t.objectNumbers}:{},actor:e.authority.identity,mayScript:oX(e.authority,"doc.forms.script"),assignmentOf:t=>Ev(e,t),limits:e.limits},e.signal)).fields.map(t=>ES(e,t)),{item:{type:"forms.copy",...P},reverse:D.reverse()};case"forms.repeat":return function(e,t){oQ(e.authority,"doc.forms.modify");let n=new Ec(e.runtime,e.session,e.fonts),r=n.plan({field:t.field,pages:t.pages,...t.as?{as:t.as}:{},...t.objectNumbers?{objectNumbers:t.objectNumbers}:{},mayScript:oX(e.authority,"doc.forms.script"),limits:e.limits},e.signal),i=[...r.dropped];if(0===r.pages.length){let t=y4(e.session.writeStamp(),[],[]);return{item:{type:"forms.repeat",as:r.as,fields:[],widgets:[],dropped:i,meta:t},reverse:[]}}if("fields"===r.as){let o=n.createFields(r,{...t.objectNumbers?{objectNumbers:t.objectNumbers}:{},actor:e.authority.identity,assignmentOf:t=>Ev(e,t)},e.signal);return{item:{type:"forms.repeat",as:"fields",...o,dropped:i},reverse:[{kind:"fields.repeat",direction:"remove",left:o.fields,guards:o.fields.map(t=>EP(e,t.widgets)),captures:[]}]}}let o=E$(e,t.field),{split:a,mergedEntry:s}=Eh(e,o),l=yJ(e.runtime,e.session,[{objectNumber:o.objectNumber,deep:Ef}]),{added:u,split:d}=n.addBoxes(r,t.objectNumbers,e.signal),c=EF(e,"forms.repeat",o.objectNumber,l,u,{merged:a,mergedEntry:s,widget:d[0]??null});return{item:Ey(e,o.objectNumber,[...Eg(c),...u],i),reverse:[c]}}(e,t);case"forms.update":let b,y;return oQ(e.authority,"doc.forms.modify"),T(t.patch.actions)&&oQ(e.authority,"doc.forms.script"),b=E$(e,t.field),y=et(t.patch,b.field),r=b.field.assignment,(Y(y)!==Y(r)||y.kind!==r.kind)&&o7(e.authority,y),yK(n,EZ(b.field),t.expect),EO(e,b,t.patch);case"forms.delete":let w;return oQ(e.authority,"doc.forms.modify"),yK(n,(w=E$(e,t.field)).field,t.expect),ET(e,w);case"forms.addWidget":return function(e,t){oQ(e.authority,"doc.forms.modify"),T(t.placement.actions)&&oQ(e.authority,"doc.forms.script");let n=E$(e,t.field),{split:r,mergedEntry:i}=Eh(e,n),o=yJ(e.runtime,e.session,[{objectNumber:n.objectNumber,deep:Ef}]),{field:a,widget:s}=new Et(e.runtime,e.session,e.fonts).addWidget(t.field,t.placement,e.signal,{...void 0!==t.objectNumber?{objectNumber:t.objectNumber}:{},...void 0!==t.splitObjectNumber?{splitObjectNumber:t.splitObjectNumber}:{}}),l=new Set(n.field.widgets.map(e=>e.objectNumber)),u=a.widgets.filter(e=>!l.has(e.objectNumber)),d=u.find(e=>e.objectNumber!==s.objectNumber)??null,c=EF(e,"forms.addWidget",n.objectNumber,o,u.filter(e=>e.objectNumber===s.objectNumber),{merged:r,mergedEntry:i,widget:d});return{item:{type:"forms.addWidget",...E0(e,{field:a,meta:y4(e.session.writeStamp(),[a.ref],u)})},reverse:[c]}}(e,t);case"forms.removeWidget":let E,A,v,S,k;return oQ(e.authority,"doc.forms.modify"),E=E$(e,t.field),A="objectNumber"===t.widget.kind?t.widget.objectNumber:0,v=yJ(e.runtime,e.session,[{objectNumber:E.objectNumber,deep:[]},{objectNumber:A,deep:[]}]),S=new Et(e.runtime,e.session,e.fonts).detachWidget(t.field,t.widget,e.signal),k=yQ(e.runtime,e.session,v),{item:{type:"forms.removeWidget",...E0(e,{field:S.field,meta:y4(e.session.writeStamp(),[S.field.ref],[S.widget])})},reverse:[EL("forms.addWidget",k,[E.objectNumber])]};case"forms.deleteWidget":oQ(e.authority,"doc.forms.modify");let x=wd(e,t.widget);if("widget"!==x.subtype)throw new N(G.InvalidArg,`${x.subtype} is not a widget: delete it with page.annotations.delete`,{details:{field:"widget"}});return yK(n,x,t.expect),Ek(e,x);case"forms.updateWidget":oQ(e.authority,"doc.forms.modify"),T(t.patch.actions)&&oQ(e.authority,"doc.forms.script");let O=wd(e,t.widget);if("widget"!==O.subtype)throw new N(G.InvalidArg,`${O.subtype} is not a widget: change it with doc.annotations.update`,{details:{field:"widget"}});return yK(n,O,t.expect),wt(e,O,t.patch.nm),wa(e,t.widget,{...t.patch,subtype:"widget"},"forms.updateWidget");case"forms.reorderWidgets":let I;return oQ(e.authority,"doc.forms.modify"),I=y6(y3(e.runtime,e.session,t.page),"widgets",t.widgets,t.position),y5(e.runtime,e.session,I),wn(e,I,t.widgets);case"forms.reorderCalculations":return function(e,t){oQ(e.authority,"doc.forms.modify");let{before:n,after:r,moved:i}=new Et(e.runtime,e.session,e.fonts).reorderCalculations(t.fields,t.position,e.signal);return{item:Ew(e,r,i),reverse:[Ej({before:n,after:r})]}}(e,t);case"forms.setSignatureAppearance":let C;return C=E$(e,t.field),o4(e.authority,C.field.assignment,"sign"),ER(e,C,"forms.setSignatureAppearance",()=>new Et(e.runtime,e.session,e.fonts).setSignatureAppearance(t.field,iE(t.appearance),e.signal));case"forms.setButtonImage":let j;return j=E$(e,t.field),o4(e.authority,j.field.assignment,"fill"),ER(e,j,"forms.setButtonImage",()=>new Et(e.runtime,e.session,e.fonts).setButtonImage(t.field,function(e){if(null===e)return null;if(ArrayBuffer.isView(e))return e;throw new N(G.InvalidArg,"a push button\'s image reaches a write as bytes, never as a Blob")}(t.image),e.signal));case"forms.import":let M,R,B;return oQ(e.authority,"doc.forms.modify"),M=function(e,t){if("restore"===t.attribution)return oQ(e.authority,"doc.forms.import"),"import"}(e,t),B=(R=new Ed(e.runtime,e.session,e.fonts).import({bundle:t.bundle,...void 0!==t.pages?{pages:t.pages}:{},attribution:t.attribution,values:t.values??!0,actor:t.actor??{},limits:t.limits,mayScript:(t.mayScript??!1)&&oX(e.authority,"doc.forms.script"),assignmentOf:t=>M?t:Ev(e,t)},e.signal)).fields.map(t=>ES(e,t,M)),{item:{type:"forms.import",...R},reverse:B.reverse()};case"forms.importValues":return function(e,t){EA(e);let n=new Ed(e.runtime,e.session,e.fonts),r=n.planValues(t.bundle,t.limits,e.signal,t=>o8(e.authority,t.assignment,"fill")),i=[],o=[];for(let t of r.writes){let r={objectNumber:EK(t.target.ref),field:t.target},a=yJ(e.runtime,e.session,EH(r)),s=n.writeValue(t,e.signal),l=yQ(e.runtime,e.session,a);i.push(s),o.push({...EL("forms.setValue",l,[r.objectNumber]),fallback:{kind:"value",fields:[{objectNumber:r.objectNumber,before:EQ(t.target),left:EQ(s)}]}})}return{item:{type:"forms.importValues",...E0(e,{fields:i,dropped:[...r.dropped],meta:y4(e.session.writeStamp(),i.map(e=>e.ref),i.flatMap(e=>e.widgets))})},reverse:o.reverse()}}(e,t);case"metadata.update":let L,$;return oQ(e.authority,"doc.metadata.modify"),yK(n,L=new FF(e.runtime,e.session).read(e.signal),t.expect),{item:{type:"metadata.update",...$=new FZ(e.runtime,e.session).update(t.patch,e.signal)},reverse:[E2("metadata.update",Object.keys(t.patch),L,$.metadata)]};case"metadata.updateCustom":let z,U;return oQ(e.authority,"doc.metadata.modify"),z=new FF(e.runtime,e.session).readCustom(e.signal),{item:{type:"metadata.updateCustom",...U=new FZ(e.runtime,e.session).updateCustom(t.patch,e.signal)},reverse:[E2("metadata.updateCustom",Object.keys(t.patch),z,U.custom)]};case"outline.create":oQ(e.authority,"doc.outline.modify");let V=Au(e).create(t.parent,t.position??"end",t.data,t.objectNumber);return{item:{type:"outline.create",...V},reverse:[{kind:"outline.remove",ref:V.item.ref,left:Am(e,[V.item.ref])}]};case"outline.update":oQ(e.authority,"doc.outline.modify");let W=Ap(e,t.ref);return yK(n,W,t.expect),Ad(e,t.ref,t.patch,W);case"outline.move":let q,H,K,Z,J,Q,X;return o=e,a=t,oQ(o.authority,"doc.outline.modify"),H=(q=Au(o)).tree(),K=a.refs.map(e=>e.objectNumber),Z=q.placementsOf(K,H),J=Af(o,H,K),Q=q.move(a.refs,a.parent,a.position),X=a.parent?.objectNumber??0,{item:{type:"outline.move",...Q},reverse:[{kind:"outline.move",placements:Z,left:K.map(e=>({item:e,parent:X}))},...J]};case"outline.delete":return oQ(e.authority,"doc.outline.modify"),yK(n,Ap(e,t.ref),t.expect),Ac(e,t.ref);case"pages.rotate":return Ag(e,()=>{var n,r;let i,o,a;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),i=AN(AI(n)),o=A_(n).rotate([...r.pages],r.rotation,n.signal),a=r.pages.map(e=>e.objectNumber),{item:{type:"pages.rotate",pages:[...r.pages],rotation:r.rotation,...o},reverse:function(e,t,n){let r=new Map;for(let n of e){let e=t.get(n);r.set(e,[...r.get(e)??[],n])}return[...r].map(([e,t])=>({kind:"pages.rotate",pages:t,rotation:e,left:n}))}(a,i,r.rotation)}});case"pages.setScale":return function(e,t){oQ(e.authority,"doc.annotate.modify");let n=t.pages.map(e=>e.objectNumber);if(new Set(n).size!==n.length)throw new N(G.InvalidArg,"pages.setScale names a page twice",{details:{field:"pages"}});let r=n.map(n=>{let r=AB(e,n),i=AT(e,n);return AM(e,n,t.measure&&nY(t.measure,r)),{page:n,box:r,before:i,left:AT(e,n)}}),i=new Map;for(let{page:e,box:t,before:n,left:o}of r){let r=JSON.stringify([n,o,t]),a=i.get(r)??{pages:[],measure:n,left:o};a.pages.push(e),i.set(r,a)}return{item:{type:"pages.setScale",pages:[...t.pages],measure:t.measure,...AR(e,t.pages[0])},reverse:[...i.values()].map(e=>({kind:"pages.setScale",...e}))}}(e,t);case"pages.reorder":return Ag(e,()=>{var n,r;let i,o,a,s,l,u,d;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),i=r.pages.map(e=>e.objectNumber),o=AO(n),a=Aw(n),s=Ax(o,i),l=A_(n).reorder([...r.pages],r.position,n.signal),u=AO(n),d=AA(n,a,Av(a,o,u,i)),{item:{type:"pages.reorder",...l,...AS(n,d)},reverse:[{kind:"pages.reorder",placements:s,left:Ax(u,i),...d?{labels:d}:{}}]}});case"pages.delete":return Ag(e,()=>{var n,r;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),Ab(n,AG(AO(n),n.session.resolvePageRefs(r.pages)))});case"pages.insertBlank":return Ag(e,()=>{var n,r;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),AD(n,"pages.insertBlank",()=>AP(n).insertBlank(r.spec,r.position??"end",n.signal,r.objectNumbers))});case"pages.insert":return Ag(e,()=>{var n,r;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),AD(n,"pages.insert",()=>{var e;return AP(n).insert(0===(e=r.source).byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.slice().buffer,r.position??"end",n.signal,r.objectNumbers)})});case"pages.copy":return Ag(e,()=>{var n,r;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),AD(n,"pages.copy",()=>AP(n).copy(r.pages,r.position??"end",n.signal,r.objectNumbers))});case"attachments.create":oQ(e.authority,"doc.attachments.modify");let en=wF(e).create(t.file,t.resources.file,e.signal);return{item:{type:"attachments.create",...en},reverse:[w_(e,en.attachment.ref)]};case"attachments.delete":return oQ(e.authority,"doc.attachments.modify"),wg(e,t.ref)}})(i,r.opInFileSpace(e),t)),r,n)}undo(e,t,n,r){let i=this.context(t,n,t=>e.steps.some(e=>"objects.revert"===e.kind&&("forms.setValue"===e.reports||"forms.setAppearanceText"===e.reports)&&"fields"in e.subject&&e.subject.fields.some(e=>{let n=EW(t,e);return null!==n&&o8(t.authority,n.field.assignment,"fill")})));return Az(this.session,t,e.steps.map(e=>()=>(function(e,t){var n,r,i,o;switch(t.kind){case"objects.revert":if("annotation"in t.subject)return function(e,t){var n,r,i;let o=t.subject.annotation,a=t.reports,s=(n=e,r=o,wf(n,r.page)?.find(e=>K(e.ref)===K(r))??null);if(!s)return yH(e,a);if(oY(e.authority,o0(s.subtype)),yX(e.runtime,e.session,t.objects)){o6(e.authority,s,void 0);let n=yY(e.runtime,e.session,t.objects);return{item:ws(e,a,o,{annotation:wd(e,o),appearance:{action:"restored",changed:t.appearanceChanged??!0},meta:yP(e.session.writeStamp(),o.page.objectNumber,[o])}),reverse:[{...t,objects:n,...(i=t.fallback,i?.kind!=="annotation"?i?{fallback:i}:{}:{fallback:{kind:"annotation",restore:i.left,left:i.restore}})}]}}let l=t.fallback;if(l?.kind!=="annotation")return yH(e,a);let u=l.left,d=l.restore,c=Object.keys(u),f=c.filter(e=>yV(s[e],u[e]));if(0===f.length)return yH(e,a);let m=wa(e,o,Object.fromEntries(f.map(e=>{let t;return[e,(t=d[e],"actions"===e&&"widget"===s.subtype?function(e){let t={};for(let n of z){let r=e?.[n];if(!r){t[n]=null;continue}let i=B(r);i&&(t[n]=i)}return t}(t):t)]})),a),p=c.filter(e=>!f.includes(e)),h=m.item;return 0===p.length||iA(h)||h.type!==a?m:{...m,item:{...h,skipped:p}}}(e,{...t,subject:t.subject});if("outlineItem"in t.subject)return function(e,t){let n=t.subject.outlineItem,r=Au(e),i=r.find(n);if(!i)return yH(e,"outline.update");if(oQ(e.authority,"doc.outline.modify"),yX(e.runtime,e.session,t.objects)){var o;let i=yY(e.runtime,e.session,t.objects);r.countAgain(n);let a=yQ(e.runtime,e.session,i);return{item:{type:"outline.update",...r.updated(n)},reverse:[{...t,objects:a,...(o=t.fallback,o?.kind!=="outline"?o?{fallback:o}:{}:{fallback:{kind:"outline",restore:o.left,left:o.restore}})}]}}let a=t.fallback;if(a?.kind!=="outline")return yH(e,"outline.update");let s=a.left,l=a.restore,u=Object.keys(s),d=u.filter(t=>yV(i[t],s[t])&&function(e,t,n){if("target"!==t||null===n)return!0;if("goto"===n.kind){let t=n.destination?.page.objectNumber;return e.session.allRecords().some(e=>e.pageObjectNumber===t)}return"uri"===n.kind||"named"===n.kind&&["NextPage","PrevPage","FirstPage","LastPage"].includes(n.name??"")}(e,t,l[t]));if(0===d.length)return yH(e,"outline.update");let c=Ad(e,n,Object.fromEntries(d.map(e=>[e,l[e]])),i),f=u.filter(e=>!d.includes(e));return 0===f.length||"outline.update"!==c.item.type?c:{...c,item:{...c.item,skipped:f}}}(e,{...t,subject:t.subject});return function(e,t){if(Ep.has(t.reports)){let n="forms.setSignatureAppearance"===t.reports?"sign":"fill";for(let r of(oY(e.authority,"sign"===n?"doc.sign":"doc.forms.fill"),t.subject.fields)){let t=EW(e,r);t&&("sign"===n?o4(e.authority,t.field.assignment,"sign"):EE(e,t))}}else oQ(e.authority,"doc.forms.modify");if(t.rights&&oQ(e.authority,"doc.forms.import"),yX(e.runtime,e.session,t.objects)){let n=yY(e.runtime,e.session,t.objects),r=t.subject.fields.map(t=>EU(e,t).field);return{item:E3(e,t.reports,r),reverse:[{...t,objects:n,...function(e){switch(e?.kind){case"value":return{fallback:{kind:"value",fields:e.fields.map(({objectNumber:e,before:t,left:n})=>({objectNumber:e,before:n,left:t}))}};case"properties":return{fallback:{...e,restore:e.left,left:e.restore}};default:return{}}}(t.fallback)}]}}if(t.fallback?.kind==="properties")return function(e,t){let n=EW(e,t.objectNumber);if(!n)return yH(e,"forms.update");let r=EZ(n.field),i=t.left,o=t.restore,a=Object.keys(i),s=a.filter(t=>{var a,s,l,u;let d;return yV(r[t],i[t])&&("name"!==t||(a=e,s=n.field.name,l=String(o.name),null===EV(a,{kind:"fqn",name:s.slice(0,s.lastIndexOf(".")+1)+l})))&&("actions"!==t||(u=i.actions,d=o.actions??{},Object.keys(u??{}).every(e=>void 0!==d[e])))&&("takesImage"!==t||!0!==o.takesImage||function(e,t){let n=e.session.requireDocPtr(),r=Pz(e.runtime,n,t.field.widgets,new PR(e.runtime,n)),i=r.filter(e=>null!==e);try{return rJ(i,r.length-i.length),!0}catch(e){if(N.is(e)&&e.code===G.InvalidArg)return!1;throw e}}(e,n))});if(0===s.length)return yH(e,"forms.update");let l=EO(e,n,EJ(o,s)),u=a.filter(e=>!s.includes(e)),d=l.item;return 0===u.length||iA(d)||"forms.update"!==d.type?l:{...l,item:{...d,skipped:u}}}(e,t.fallback);if(t.fallback?.kind!=="value")return yH(e,t.reports);let n=[],r=[];for(let{objectNumber:i,before:o,left:a}of t.fallback.fields){let t=EW(e,i);t&&yV(EQ(t.field),a)?n.push(Ex(e,t,o)):t&&r.push(t.field.name)}return 0===n.length?yH(e,t.reports):"forms.setValue"===t.reports&&1===n.length?n[0]:{item:{...E1(e,n.map(({item:e})=>e.field)),...r.length>0?{skipped:r}:{}},reverse:n.flatMap(e=>e.reverse)}}(e,{...t,subject:t.subject});case"annotation.remove":let a=wf(e,t.ref.page);if(!a)return yH(e,"annotations.delete");let s=tG(a,t.ref),l=new Map(t.left.map(e=>[K(e.ref),e]));if(!(s.length>0&&s.length===l.size&&s.every(e=>{let t=l.get(K(e.ref));return void 0!==t&&yV(e,t)})))return yH(e,"annotations.delete");for(let t of o1(s))oY(e.authority,t);return t.rights&&we(e.authority),wl(e,t.ref,t.rights);case"annotation.restore":return function(e,t){let n=wf(e,t.page),r=t.members[0];if(!n||!r||n.some(e=>K(e.ref)===K(r)))return yH(e,"annotations.restore");let{pageIndex:i,pageObjectNumber:o}=e.session.resolvePageRef(t.page);yj(e.runtime,e.session.requireDocPtr(),i,t.capture),e.session.invalidateDerived(),t.unlinked.length>0&&yX(e.runtime,e.session,t.unlinked)&&yY(e.runtime,e.session,t.unlinked);let a=wc(e,o),s=t.members.map(e=>{let t=a.find(t=>K(t.ref)===K(e));if(!t)throw Error(`a restored annotation is missing: ${K(e)}`);return t});for(let t of o1(s))oY(e.authority,t);return t.rights?we(e.authority):o5(e.authority,s),{item:{type:"annotations.restore",page:t.page,annotations:s,meta:yP(e.session.writeStamp(),o,t.members)},reverse:[{kind:"annotation.remove",ref:r,left:s,...t.rights?{rights:t.rights}:{}}]}}(e,t);case"annotation.reorder":return function(e,t){let n="annotations"===t.family?"annotations.reorder":"forms.reorderWidgets",r=function(e,t){try{return y3(e.runtime,e.session,t)}catch{return null}}(e,t.page);if(!r)return yH(e,n);let i=y2(r,t.family),o=t.refs.filter(e=>{let n=wr(i,e);return void 0!==n&&n===wr(t.after,e)});if(0===o.length)return yH(e,n);wi(e,t.family,o);let a=new Set(o.map(K)),s=new Set(i.map(K).filter(e=>!a.has(e))),l=r;for(let n of t.before.filter(e=>a.has(K(e)))){let r=t.before.findIndex(e=>K(e)===K(n)),i=t.before.slice(0,r).reverse().find(e=>s.has(K(e))),o=y6(l,t.family,[n],i?{after:i}:"start");y5(e.runtime,e.session,o),s.add(K(n)),l=y3(e.runtime,e.session,t.page)}let u=y2(l,t.family);return{item:wo(e,t.family,t.page,u,o),reverse:[{...t,refs:o,before:i,after:u}]}}(e,t);case"field.remove":let u;return oQ(e.authority,"doc.forms.modify"),t.rights&&oQ(e.authority,"doc.forms.import"),(u=EW(e,t.objectNumber))&&yV(u.field,t.left)&&yX(e.runtime,e.session,t.widgets??[])?ET(e,u,t.rights):yH(e,"forms.delete");case"field.restore":return function(e,t){if(oQ(e.authority,"doc.forms.modify"),t.rights&&oQ(e.authority,"doc.forms.import"),ac(Eb(e),t.name))return yH(e,"forms.restore");for(let n of t.pages)try{e.session.resolvePageRef(n)}catch{return yH(e,"forms.restore")}yL(e.runtime,e.session.requireDocPtr(),t.capture),e.session.invalidateDerived();let{field:n}=EU(e,t.objectNumber);return{item:{type:"forms.restore",...EX(e,n)},reverse:[ES(e,n,t.rights)]}}(e,t);case"widget.restore":let d;oQ(e.authority,"doc.forms.modify");try{d=e.session.resolvePageRef(t.page).pageIndex}catch{return yH(e,"forms.restoreWidget")}if(Ez(e,t.widget))return yH(e,"forms.restoreWidget");let c=t.detached.filter(e=>e.objectNumber===t.fieldObjectNumber);if(!yX(e.runtime,e.session,c))return yH(e,"forms.restoreWidget");yj(e.runtime,e.session.requireDocPtr(),d,t.capture),e.session.invalidateDerived(),t.detached.length>0&&yY(e.runtime,e.session,t.detached);let f=function(e,t){let n=wd(e,t);if("widget"!==n.subtype)throw Error(`${K(t)} reads as no widget`);return n}(e,t.widget),m=null===t.fieldObjectNumber?null:EU(e,t.fieldObjectNumber).field;return{item:{type:"forms.restoreWidget",field:m,widgets:[f],meta:y4(e.session.writeStamp(),m?[m.ref]:[],[(n=e,{ref:r=t.widget,objectNumber:wm(n,r),page:r.page})])},reverse:[{kind:"widget.delete",widget:t.widget,left:f}]};case"widget.delete":let p;return oQ(e.authority,"doc.forms.modify"),(p=Ez(e,t.widget))&&yV(p,t.left)?Ek(e,p):yH(e,"forms.deleteWidget");case"widgets.added":return function(e,t){let n,r,i,o;oQ(e.authority,"doc.forms.modify");let a="remove"===t.direction,s="forms.addWidget"===t.reports?"forms.removeWidget":"forms.repeat",l=a?s:t.reports;if(!yX(e.runtime,e.session,t.objects)||!yX(e.runtime,e.session,t.guards)||(i=ED(e,t.fieldObjectNumber),o=t.kids,!(null!==i&&i.length===o.length&&i.every((e,t)=>e===o[t]))))return yH(e,l);let{fn:u,mem:d}=e.runtime,c=e.session.requireDocPtr(),f=t=>{try{return e.session.resolvePageRef(t).pageIndex}catch{return null}},m=(e,t)=>u.EPDFPage_GetAnnotIndexByObjectNumberRaw(c,e,t),p=(e,t,n)=>{if(!u.EPDFPage_RemoveAnnotRaw(c,e,t))throw new N(G.Unknown,`${n} could not leave its page`)},h=(e,t,n)=>{let r=m(e,t);if(!(r<0)&&!(n<0)&&r!==n&&!hY(d,4,t=>(d.poke(t,"i32",r,0),u.EPDFPage_MoveAnnotsRaw(c,e,t,1,n))))throw new N(G.Unknown,"an annotation could not move")},F=t.fieldObjectNumber,{split:g}=t,_=E_(t),P=g?.merged.page?f(g.merged.page):null,D=[],b=[];if(a){for(let t of(b=_.map(t=>({objectNumber:t.objectNumber,capture:yM(e.runtime,c,t.objectNumber,Ef)})),_))if(!u.EPDFForm_DetachWidget(c,F,t.objectNumber))throw new N(G.Unknown,"a widget could not leave its field");let i=new Map;for(let e of t.added){if(!e.page)continue;let t=i.get(e.page.objectNumber)??[];t.push(e),i.set(e.page.objectNumber,t)}for(let[t,n]of i){let r=n[0].page;if(null===f(r))continue;gx(e.runtime,e.session,t);let i=f(r),o=n.map(e=>m(i,e.objectNumber)).filter(e=>e>=0).sort((e,t)=>e-t);if(0!==o.length)for(let t of(D.push({page:r,capture:yC(e.runtime,c,i,o)}),[...o].reverse()))p(i,t,"a widget")}if(g&&null!==P){let t=m(P,g.widget.objectNumber);t>=0&&(n=yC(e.runtime,c,P,[t]),p(P,t,"the split widget")),yj(e.runtime,c,P,g.mergedEntry),h(P,g.merged.objectNumber,t)}e.session.invalidateDerived(),r=yY(e.runtime,e.session,t.objects)}else{let n=t.captures.map(({page:e,capture:t})=>({pageIndex:f(e),capture:t}));if(n.some(({pageIndex:e})=>null===e)||g&&(null===P||!g.widgetEntry))return yH(e,l);if(g&&null!==P&&g.widgetEntry){let t=m(P,g.merged.objectNumber);t>=0&&(p(P,t,"the field"),function(e,t){try{yR(e.runtime,e.session.requireDocPtr(),t,[])}catch{throw new N(G.Unknown,`object ${t} went with its entry on the page`)}}(e,g.merged.objectNumber)),yj(e.runtime,c,P,g.widgetEntry),h(P,g.widget.objectNumber,t)}for(let{pageIndex:t,capture:r}of n)yj(e.runtime,c,t,r);e.session.invalidateDerived();let i=yY(e.runtime,e.session,t.objects);for(let{capture:n}of(_.forEach((e,n)=>{let r,i=t.values[n]??"",o=""!==i?d.writeU16String(i):0n;try{r=u.EPDFForm_AttachWidget(c,F,e.objectNumber,t.states[n]??"",o,0)}finally{0n!==o&&d.free(o)}if(!r)throw new N(G.Unknown,"a widget could not join its field again")}),t.widgets))yT(e.runtime,c,n);e.session.invalidateDerived(),r=i.map(t=>({...t,after:yR(e.runtime,c,t.objectNumber,[])}))}let y=[...Eg(t),...t.added];return{item:"forms.repeat"===t.reports?Ey(e,F,y,[],a):function(e,t,n,r){let{field:i}=EU(e,n);return{type:t,...E0(e,{field:i,meta:y4(e.session.writeStamp(),[i.ref],[...r])})}}(e,l,F,y),reverse:[{...t,direction:a?"restore":"remove",objects:r,guards:a?[]:EP(e,_),kids:ED(e,F)??[],widgets:a?b:[],captures:a?D:[],split:g?{merged:g.merged,mergedEntry:g.mergedEntry,widget:g.widget,...a&&n?{widgetEntry:n}:{}}:null}]}}(e,t);case"fields.repeat":return function(e,t){oQ(e.authority,"doc.forms.modify");let n=e.session.requireDocPtr();if("remove"===t.direction){let r=t.left.flatMap((n,r)=>{let i=EW(e,EK(n.ref));return i&&yV(i.field,n)&&yX(e.runtime,e.session,t.guards[r]??[])?[i]:[]});if(0===r.length)return yH(e,"forms.repeat");let i=r.map(({objectNumber:t,field:r})=>({objectNumber:t,name:r.name,pages:r.widgets.flatMap(e=>e.page?[e.page]:[]),capture:yB(e.runtime,n,t)})),{removedWidgets:o,calculationOrder:a}=new Et(e.runtime,e.session).deleteFields(r.map(({objectNumber:e})=>EM(e)),e.signal),s=r.map(({field:e})=>e);return{item:{type:"forms.repeat",as:"fields",undone:!0,fields:s,widgets:[],dropped:[],...EC(a),meta:y4(e.session.writeStamp(),s.map(e=>e.ref),o,[])},reverse:[{kind:"fields.repeat",direction:"restore",left:[],guards:[],captures:i},...a?[Ej(a)]:[]]}}let r=Eb(e),i=t.captures.filter(({name:t,pages:n})=>{if(ac(r,t))return!1;try{for(let t of n)e.session.resolvePageRef(t)}catch{return!1}return r.add(t),!0});if(0===i.length)return yH(e,"forms.repeat");for(let{capture:t}of i)yL(e.runtime,n,t);e.session.invalidateDerived();let o=i.map(({objectNumber:t})=>EU(e,t).field);return{item:{type:"forms.repeat",as:"fields",...E0(e,{fields:o,meta:y4(e.session.writeStamp(),o.map(e=>e.ref),o.flatMap(e=>e.widgets))}),dropped:[]},reverse:[{kind:"fields.repeat",direction:"remove",left:o,guards:o.map(t=>EP(e,t.widgets)),captures:[]}]}}(e,t);case"calculations.restore":let h,F;return oQ(e.authority,"doc.forms.modify"),F=function(e,{before:t,after:n},r){let i=n.filter(e=>!t.includes(e)),o=e.filter(e=>!i.includes(e));for(let i of t){if(n.includes(i)){if(wQ(t,i)===wQ(n,i)||wQ(e,i)!==wQ(n,i))continue;o=o.filter(e=>e!==i)}else if(o.includes(i)||!r(i))continue;let a=t.indexOf(i),s=t.slice(0,a).reverse().find(e=>o.includes(e)),l=void 0===s?0:o.indexOf(s)+1;o=[...o.slice(0,l),i,...o.slice(l)]}return o}(h=wK(e.runtime,gv(e.runtime,e.session)),t,t=>null!==EW(e,t)),wJ(h,F)?yH(e,"forms.reorderCalculations"):(wZ(e.runtime,e.session.requireDocPtr(),F),e.session.invalidateDerived(),{item:Ew(e,F,[...new Set([...h,...F])].filter(e=>h.indexOf(e)!==F.indexOf(e))),reverse:[Ej({before:h,after:F})]});case"metadata.revert":return function(e,t){oQ(e.authority,"doc.metadata.modify");let n=new FF(e.runtime,e.session),r="metadata.update"===t.op?n.read(e.signal):n.readCustom(e.signal),i=t.left,o=Object.keys(i),a=o.filter(e=>yV(E6(r,e),i[e]));if(0===a.length)return yH(e,t.op);let s=E5(t.restore,a),l=new FZ(e.runtime,e.session),u=o.filter(e=>!a.includes(e)),d={kind:"metadata.revert",op:t.op,restore:E5(t.left,a),left:s};return"metadata.update"===t.op?{item:{type:"metadata.update",...l.update(s,e.signal),...u.length>0?{skipped:u}:{}},reverse:[d]}:{item:{type:"metadata.updateCustom",...l.updateCustom(s,e.signal),...u.length>0?{skipped:u}:{}},reverse:[d]}}(e,t);case"outline.remove":let g=Au(e).tree();if(!g.has(t.ref.objectNumber))return yH(e,"outline.delete");return(oQ(e.authority,"doc.outline.modify"),yV(g.subtreeOf(t.ref.objectNumber),t.left.map(e=>e.objectNumber))&&yX(e.runtime,e.session,t.left))?Ac(e,t.ref):yH(e,"outline.delete");case"outline.restore":return function(e,t){var n,r,i;let o=Au(e),a=o.tree();if(a.has(t.ref.objectNumber)||t.parent&&!a.has(t.parent.objectNumber))return yH(e,"outline.restore");oQ(e.authority,"doc.outline.modify"),n=e.runtime,r=e.session.requireDocPtr(),yU(n,i=t.capture,e=>{if(!n.fn.EPDFOutline_ImportItemRaw(r,e,i.byteLength))throw new N(G.Unknown,"EPDFOutline_ImportItemRaw refused a capture")});let s=o.restored(t.ref.objectNumber);return{item:{type:"outline.restore",...s},reverse:[{kind:"outline.remove",ref:t.ref,left:Am(e,s.items.map(e=>e.ref))}]}}(e,t);case"outline.move":return function(e,t){let n=Au(e),r=n.tree(),i=new Map(t.left.map(({item:e,parent:t})=>[e,t])),o=t.placements.filter(({item:e,parent:t})=>r.parentOf(e)===i.get(e)&&(0===t||r.has(t))&&!r.isAtOrUnder(t,e));if(0===o.length)return yH(e,"outline.move");oQ(e.authority,"doc.outline.modify");let a=o.map(({item:e})=>e),s=n.placementsOf(a,r),l=Af(e,r,a);return{item:{type:"outline.move",...n.place(o,r)},reverse:[{kind:"outline.move",placements:s,left:o.map(({item:e,parent:t})=>({item:e,parent:t}))},...l]}}(e,t);case"outline.reopen":let _,P,D,b,y;return i=e,o=t,P=(_=Au(i)).tree(),D=_.find(o.ref,P),y=(b=P.childrenOf(o.ref.objectNumber)).length===o.children.length&&b.every(e=>o.children.includes(e)),D&&!D.open&&y?(oQ(i.authority,"doc.outline.modify"),{item:{type:"outline.update",..._.update(o.ref,{open:!0})},reverse:[]}):yH(i,"outline.update");case"pages.rotate":return Ag(e,()=>(function(e,t){let n=AN(AI(e)),r=t.pages.filter(e=>n.get(e)===t.left);if(0===r.length)return yH(e,"pages.rotate");oQ(e.authority,"doc.pages.assemble");let i=r.map(q),o=A_(e).rotate(i,t.rotation,e.signal);return{item:{type:"pages.rotate",pages:i,rotation:t.rotation,...o},reverse:[{kind:"pages.rotate",pages:r,rotation:t.left,left:t.rotation}]}})(e,t));case"pages.setScale":let w=t.pages.filter(n=>{let r,i;return r=AT(e,n),i=t.left,JSON.stringify(r)===JSON.stringify(i)});if(0===w.length)return yH(e,"pages.setScale");for(let n of(oQ(e.authority,"doc.annotate.modify"),w))AM(e,n,t.measure);let E=w.map(q);return{item:{type:"pages.setScale",pages:E,measure:t.measure&&nX(t.measure,AB(e,w[0])),...AR(e,E[0])},reverse:[{kind:"pages.setScale",pages:w,measure:t.left,left:t.measure}]};case"pages.reorder":return Ag(e,()=>(function(e,t){let n=AO(e),r=new Map(t.left.map(({page:e,after:t})=>[e,t])),i=t.placements.filter(({page:e,after:t})=>{let i=n.indexOf(e);return i>=0&&(n[i-1]??0)===r.get(e)&&(0===t||n.includes(t))});if(0===i.length)return yH(e,"pages.reorder");oQ(e.authority,"doc.pages.assemble");let o=i.map(({page:e})=>e),a=Ax(n,o),s=Aw(e),l=A_(e),u=null,d=s,c=n;for(let{page:t,after:n}of i){let r=0===n?"start":{after:q(n)};({layout:u}=l.reorder([q(t)],r,e.signal));let i=AO(e);d=Av(d,c,i,[t]),c=i}let f=AA(e,s,AE(s,d,t.labels));return{item:{type:"pages.reorder",pages:o.map(q),layout:f?AI(e):u,meta:AC(e)},reverse:[{kind:"pages.reorder",placements:a,left:Ax(AO(e),o),...f?{labels:f}:{}}]}})(e,t));case"pages.restore":return Ag(e,()=>(function(e,t){let n=AO(e),r=t.pages.filter(({page:e})=>!n.includes(e));if(0===r.length)return yH(e,"pages.restore");oQ(e.authority,"doc.pages.assemble");let i=Aw(e),o=e.session.requireDocPtr();for(let{capture:t}of r)!function(e,t,n){yU(e,n,r=>{if(!e.fn.EPDFPage_ImportRaw(t,r,n.byteLength))throw new N(G.Unknown,"EPDFPage_ImportRaw refused a capture")})}(e.runtime,o,t);e.session.refreshPageRegistry(),e.session.invalidateDerived();let a=AO(e),s=AG(a,r.map(({page:e})=>e)),l=AA(e,i,AE(i,s.reduce((e,t)=>r0(e,a.indexOf(t),1),i),t.labels));return{item:{type:"pages.restore",pages:s.map(q),layout:AI(e),meta:AC(e)},reverse:[Ay(e,s,l)]}})(e,t));case"pages.remove":return Ag(e,()=>(function(e,t){let n=AO(e),r=t.pages.filter(({page:t,left:r})=>n.includes(t)&&Ak(e,t)===r).map(({page:e})=>e);if(0===r.length||r.length>=n.length)return yH(e,"pages.delete");oQ(e.authority,"doc.pages.assemble");let i=function(e,t,n){let r=[];for(let i of t){let t=EW(e,i);t&&t.field.widgets.every(e=>e.page&&n.has(e.page.objectNumber))&&r.push(...ET(e,t).reverse)}return r}(e,t.fields??[],new Set(r)),o=Ab(e,AG(n,r),t.labels);return{item:o.item,reverse:[...o.reverse,...i]}})(e,t));case"attachments.remove":let A=y$(e.runtime,e.session.requireDocPtr(),t.ref.key);if(!A||!yZ(A,t.left))return yH(e,"attachments.delete");return oQ(e.authority,"doc.attachments.modify"),wg(e,t.ref);case"attachments.restore":return function(e,t){var n,r,i;let o=wF(e);if(o.find(t.ref))return yH(e,"attachments.restore");oQ(e.authority,"doc.attachments.modify"),n=e.runtime,r=e.session.requireDocPtr(),yU(n,i=t.capture,e=>{if(!n.fn.EPDFAttachment_ImportRaw(r,e,i.byteLength))throw new N(G.Unknown,"EPDFAttachment_ImportRaw refused a capture")});let a=o.find(t.ref);if(!a)throw new N(G.Unknown,`attachment \'${t.ref.key}\' did not come back`);return{item:{type:"attachments.restore",attachment:a,meta:o.meta(t.ref)},reverse:[w_(e,t.ref)]}}(e,t)}})(i,e)),r,n)}context(e,t,n){let r,i={runtime:this.runtime,session:this.session,...this.fonts?{fonts:this.fonts}:{},authority:e,signal:t,limits:this.limits,fillsOwnField:()=>r??(r=n(i))};return i}};function Az(e,t,n,r,i){let o=[],a=[];for(let t of n){hW(i),e.clearMissingCharacters();let n=t(),s=e.missingCharacters(),l=0===s.length?n.item:{...n.item,meta:{...n.item.meta,missingCharacters:s}};o.push(r.itemOut(l)),a.push(n.reverse)}return{items:o,record:{userId:t.identity.userId??null,steps:a.reverse().flat()}}}var AU=class{constructor(){hJ(this,"entries",new Map),hJ(this,"bytes",0)}outcome(e){return this.entries.get(e)?.outcome}record(e){let t=this.entries.get(e);if(t)return t.unavailable?{unavailable:t.unavailable}:{record:t.record}}keepApplied(e,t,n,r){let i=r?function(e){let t=0,n=e=>{for(let n of e)t+=(n.before?.byteLength??0)+n.after.byteLength};for(let r of e.steps)switch(r.kind){case"objects.revert":n(r.objects);break;case"annotation.restore":t+=r.capture.byteLength,n(r.unlinked);break;case"field.restore":case"outline.restore":case"attachments.restore":t+=r.capture.byteLength;break;case"widgets.added":for(let{capture:e}of(n(r.objects),n(r.guards),r.widgets))t+=e.byteLength;for(let{capture:e}of r.captures)t+=e.byteLength;t+=(r.split?.mergedEntry.byteLength??0)+(r.split?.widgetEntry?.byteLength??0);break;case"fields.repeat":for(let e of r.guards)n(e);for(let{capture:e}of r.captures)t+=e.byteLength;break;case"field.remove":n(r.widgets??[]);break;case"outline.remove":n(r.left);break;case"pages.restore":for(let{capture:e}of r.pages)t+=e.byteLength;break;case"attachments.remove":t+=r.left.byteLength}return t}(r):0;this.add(e,{outcome:{kind:"applied",fingerprint:t,result:n},record:r,bytes:i}),this.bytes+=i,this.trimCaptures()}keepRefused(e,t,n){this.add(e,{outcome:{kind:"refused",fingerprint:t,error:n},record:null,bytes:0})}endUndo(){for(let e of this.entries.values())"applied"!==e.outcome.kind||e.unavailable||this.drop(e,"final-change")}add(e,t){for(let[n,r]of(this.entries.set(e,t),this.entries)){if(this.entries.size<=4096)break;this.drop(r,"expired"),this.entries.delete(n)}}trimCaptures(){for(let e of this.entries.values()){if(this.bytes<=0x4000000)break;e.bytes>0&&this.drop(e,"expired")}}drop(e,t){this.bytes-=e.bytes,e.record=null,e.bytes=0,e.unavailable=t}},AV=new WeakMap;function AW(e){let t=AV.get(e);return t||(t=new AU,AV.set(e,t)),t}function Aq(e){let t="none"!==e.openedAs;return{encryptionState:t?"encrypted":"none",encryptionRequiresPassword:!1,securityHandlerRevision:t?e.securityHandlerRevision:null,pdfPermissionsBits:e.permissionsBits,pdfPermissionsAllAllowed:(0xfffffffc&e.permissionsBits>>>0)>>>0==0xfffffffc,pdfOpenedAs:e.openedAs,securityProbedAt:e.probedAt}}var AH=class{constructor(e){this.runtime=e,hV(this.runtime)}probeFile(e,t=null){let n=Date.now(),r=null,i=null;try{if(r=this.runtime.fileAccess.fromNodeFile(e),!(i=this.runtime.fn.FPDF_LoadCustomDocument(r.ptr,t??""))){var o;let e=this.runtime.fn.FPDF_GetLastError();if(4===e)return{encryptionState:"encrypted",encryptionRequiresPassword:!0,securityHandlerRevision:null,pdfPermissionsBits:null,pdfPermissionsAllAllowed:null,pdfOpenedAs:null,securityProbedAt:n};if(5===e)return{encryptionState:"unsupported",encryptionRequiresPassword:null,securityHandlerRevision:null,pdfPermissionsBits:null,pdfPermissionsAllAllowed:null,pdfOpenedAs:null,securityProbedAt:n};return o=n,{encryptionState:"unknown",encryptionRequiresPassword:null,securityHandlerRevision:null,pdfPermissionsBits:null,pdfPermissionsAllAllowed:null,pdfOpenedAs:null,securityProbedAt:o}}let a=this.runtime.fn.EPDF_IsEncrypted(i),s=this.runtime.fn.FPDF_GetDocPermissions(i)>>>0;return Aq({openedAs:a?this.runtime.fn.EPDF_IsOwnerUnlocked(i)?"owner":"user":"none",permissionsBits:s,securityHandlerRevision:a?this.runtime.fn.FPDF_GetSecurityHandlerRevision(i):null,probedAt:n})}finally{i&&this.runtime.fn.FPDF_CloseDocument(i),r?.close()}}readLiveSecurityInfo(e){let{fn:t}=this.runtime,n=e.requireDocPtr(),r=t.EPDF_IsEncrypted(n),i=t.FPDF_GetDocUserPermissions(n)>>>0;return Aq({openedAs:r?t.EPDF_IsOwnerUnlocked(n)?"owner":"user":"none",permissionsBits:i,securityHandlerRevision:r?t.FPDF_GetSecurityHandlerRevision(n):null,probedAt:Date.now()})}checkPasswordPermissions(e,t,n="any"){let r=e.requireDocPtr(),{mem:i,fn:o}=this.runtime,a=i.alloc(4),s=i.alloc(4),l=i.alloc(4),u=i.alloc(4);try{var d;if(i.poke(a,"i32",0),i.poke(s,"i32",0),i.poke(l,"i32",0),i.poke(u,"i32",0),!o.EPDF_CheckPasswordPermissions(r,t,a,s,l,u))throw new N(G.DocPasswordIncorrect,"incorrect document password");let e=(d=Number(i.peek(a,"i32")),3===d?"owner":2===d?"user":"none");if("owner"===n&&"owner"!==e)throw new N(G.DocPasswordIncorrect,"owner password required");return Aq({openedAs:e,permissionsBits:Number(i.peek(l,"i32"))>>>0,securityHandlerRevision:Number(i.peek(u,"i32")),probedAt:Date.now()})}finally{i.free(u),i.free(l),i.free(s),i.free(a)}}};function AK(e){return"incremental"===e?1:2}function AZ(e){return 1===e?new N(G.DocOpenFailed,"layer artifact cannot be saved because append-only offsets exceed the supported range"):new N(G.DocOpenFailed,"failed to save layer artifact")}function AJ(e,t,n){let r=e.readBytes(t,n);return r.buffer instanceof ArrayBuffer&&0===r.byteOffset&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer}var AQ=class{constructor(e,t){this.runtime=e,this.session=t}snapshot(){if(!this.session.hasUnsavedEdits())return{bytes:this.loadedBytes(),source:"loaded"};let e=this.saveStandaloneToBufferEx("incremental");return e.unchangedSinceLoad?{bytes:this.loadedBytes(),source:"loaded"}:{bytes:e.bytes,source:"working-copy"}}loadedBytes(){return new wR(this.runtime,this.session).loadedBytes()}copyLoadedBytesToFile(e){let t=new wR(this.runtime,this.session),n=Number(this.runtime.fn.EPDFDoc_GetLoadedBytesSize(this.session.requireDocPtr()));this.runtime.fileWrite.removeFile(e);for(let r=0;r{Ft(n,i,0),Ft(n,o,0),Ft(n,a,0);let s=r.EPDFSig_SaveCandidateToOwnedBuffer(e,t,i,o,a);if(!s)throw new N(G.Unknown,"failed to save the signing candidate");try{let e=Fn(n,i);return{kind:"memory",bytes:AX(n.readBytes(s,e)),size:e,objectOffset:Fn(n,o),objectLength:Fn(n,a)}}finally{r.EPDF_FreeBuffer(s)}})}seal(e,t){if("memory"!==e.kind)throw new N(G.InvalidArg,"not a memory candidate");let{mem:n,fn:r}=this.runtime,i=n.alloc(e.bytes.byteLength);try{return n.writeBytes(i,e.bytes),h0(n,[32,8,8,64,8],([o,a,s,l,u])=>{for(let e=0;e<4;e++)Ft(n,o,0,8*e);if(Ft(n,a,0),Ft(n,s,0),Ft(n,u,64),!r.EPDFSig_Seal(i,BigInt(e.bytes.byteLength),BigInt(e.objectOffset),BigInt(e.objectLength),wj[t],o,a,s,l,u))throw new N(G.Unknown,"failed to seal the signing candidate");e.bytes=AX(n.readBytes(i,e.bytes.byteLength));let d=Number(n.peek(u,"i32"));return{byteRange:[Fn(n,o,0),Fn(n,o,8),Fn(n,o,16),Fn(n,o,24)],contentsOffset:Fn(n,a),contentsHexLength:Fn(n,s),digest:AX(n.readBytes(l,d))}})}finally{n.free(i)}}writeContents(e,t,n){if("memory"!==e.kind)throw new N(G.InvalidArg,"not a memory candidate");let{mem:r}=this.runtime,i=r.alloc(e.bytes.byteLength);try{r.writeBytes(i,e.bytes),AY(this.runtime,i,e.bytes.byteLength,0,t,n),e.bytes=AX(r.readBytes(i,e.bytes.byteLength))}finally{r.free(i)}}openSealed(e,t){if("memory"!==e.kind)throw new N(G.InvalidArg,"not a memory candidate");let n=this.baseDocuments.acquireMemoryBase({key:`signed:${iX()}`,bytes:e.bytes,password:t});return h9(this.runtime,n,{kind:"fresh"},t)}discard(){}},A1=class{constructor(e,t,n,r=A3){this.runtime=e,this.baseDocuments=t,this.basePath=n,this.candidatePath=r}save(e,t,n){let{mem:r,fn:i}=this.runtime,o=this.candidatePath(this.basePath,n);this.runtime.fileWrite.removeFile(o);let a=this.runtime.fileWrite.toNodeFile(o);try{return h0(r,[8,8,8],([n,s,l])=>{if(Ft(r,n,0),Ft(r,s,0),Ft(r,l,0),!i.EPDFSig_SaveCandidate(e,t,a.ptr,n,s,l))throw new N(G.Unknown,"failed to save the signing candidate");return{kind:"file",path:o,size:Fn(r,n),objectOffset:Fn(r,s),objectLength:Fn(r,l)}})}catch(e){throw a.close(),this.runtime.fileWrite.removeFile(o),e}finally{a.close()}}seal(e,t){let n;if("file"!==e.kind)throw new N(G.InvalidArg,"not a file candidate");let{mem:r,fn:i}=this.runtime,o=this.runtime.fileAccess.readRange(e.path,e.objectOffset,e.objectLength);if(o.byteLength!==e.objectLength)throw new N(G.Unknown,"the signing candidate file is shorter than its object span");let a=r.alloc(o.byteLength);try{r.writeBytes(a,o),n=function(e,t,n,r,i){let{fn:o,mem:a}=e;return h0(a,[32,8,8],([e,s,l])=>{for(let t=0;t<4;t++)Ft(a,e,0,8*t);if(Ft(a,s,0),Ft(a,l,0),!o.EPDFSig_SealSpan(t,BigInt(n),BigInt(r),BigInt(i),e,s,l))throw new N(G.Unknown,"failed to seal the signing candidate");return{byteRange:[Fn(a,e,0),Fn(a,e,8),Fn(a,e,16),Fn(a,e,24)],contentsOffset:Fn(a,s),contentsHexLength:Fn(a,l)}})}(this.runtime,a,o.byteLength,e.objectOffset,e.size),this.runtime.fileWrite.writeRange(e.path,e.objectOffset,r.readBytes(a,o.byteLength))}finally{r.free(a)}let s=this.runtime.fileAccess.fromNodeFile(e.path);try{let e=h0(r,[32,64,8],([e,o,a])=>{for(let t=0;t<4;t++)Ft(r,e,n.byteRange[t],8*t);if(Ft(r,a,64),!i.EPDFSig_DigestFileRange(s.ptr,e,wj[t],o,a))throw new N(G.Unknown,"failed to digest the signing candidate file");return AX(r.readBytes(o,Number(r.peek(a,"i32"))))});return{...n,digest:e}}finally{s.close()}}writeContents(e,t,n){if("file"!==e.kind)throw new N(G.InvalidArg,"not a file candidate");let{mem:r}=this.runtime,i=this.runtime.fileAccess.readRange(e.path,e.objectOffset,e.objectLength),o=r.alloc(i.byteLength);try{r.writeBytes(o,i),AY(this.runtime,o,i.byteLength,e.objectOffset,t,n),this.runtime.fileWrite.writeRange(e.path,e.objectOffset,r.readBytes(o,i.byteLength))}finally{r.free(o)}}openSealed(e,t){if("file"!==e.kind)throw new N(G.InvalidArg,"not a file candidate");let n=this.baseDocuments.acquireFileBase({key:`signed:${e.path}`,path:e.path,password:t});return h9(this.runtime,n,{kind:"fresh"},t)}discard(e){"file"===e.kind&&this.runtime.fileWrite.removeFile(e.path)}};function A3(e,t){return`${e}.signing-${t}.pdf`}function A2(e,t,n,r){return`${e}.${t}-${n}.${r}`}function A6(e,t,n,r){var i,o;let a=e=>new N(G.SignatureRefused,`the sealed bytes ${e}`),s=wS(e,n),l=s.find(e=>"objectNumber"===e.field.kind&&e.field.objectNumber===r.fieldObjectNumber);if(!l)throw a("lost the signature field");if(!l.signed||"whole-revision"!==l.coverage||!l.byteRange)throw a("do not carry a whole-revision signature on the field");if(i=l.byteRange,o=r.byteRange,i[0]!==o[0]||i[1]!==o[1]||i[2]!==o[2]||i[3]!==o[3])throw a(`carry /ByteRange [${l.byteRange.join(" ")}] where [${r.byteRange.join(" ")}] was sealed`);if(!e.fn.EPDFSig_IsRevisionChainValid(n))throw a("have a broken cross-reference chain");let u=wx(e,t,s);if(l.revisionIndex!==u.length-1)throw a("seal an earlier revision than the candidate");if(!yZ(wk(e,n,l.index),r.cms))throw a("carry /Contents that are not the CMS installed");return l}function A5(e,t,n){let r=gv(e,t),i=e.fn.EPDFForm_GetFieldIndexByObjNum(r,n);return i<0?null:PY(e,r,i)}var A4={"adbe.pkcs7.detached":0,"ETSI.CAdES.detached":1,"ETSI.RFC3161":2},A8={all:1,include:2,exclude:3},A7={bytes:52,ptrBytes:4,subfilter:0,digest:4,contentsSize:8,name:12,reason:16,location:20,contactInfo:24,signingTime:28,docmdpPermission:32,fieldmdpAction:36,fieldmdpFields:40,fieldmdpFieldCount:44,lockPermission:48},A9={bytes:80,ptrBytes:8,subfilter:0,digest:4,contentsSize:8,name:16,reason:24,location:32,contactInfo:40,signingTime:48,docmdpPermission:56,fieldmdpAction:60,fieldmdpFields:64,fieldmdpFieldCount:72,lockPermission:76},ve=class{constructor(e,t,n,r){this.runtime=e,this.session=t,this.baseDocuments=n,this.candidatePath=r}prepare(e,t){if(this.session.pendingSigning)throw new N(G.SigningPending,`a signing is pending (${this.session.pendingSigning.prepared.signingId}); complete or cancel it first`);if(!e.field&&(e.kind??"signature")!=="timestamp")throw new N(G.InvalidArg,"a signature needs a `field`: only a document timestamp (`kind: \'timestamp\'`) can be given one by the engine",{details:{field:"field"}});let n=new wR(this.runtime,this.session),r=e.field?n.resolveField(e.field):null,i=r?A5(this.runtime,this.session,r.fieldObjectNumber):null;r?o4(t,i,"sign"):oQ(t,"doc.sign");let o=e.lock??this.defaultLock(i,(e.kind??"signature")==="signature",r?.lock??null);if(r?.signed)throw new N(G.SignatureRefused,"the signature field is already signed");if(e.appearance&&!r?.widget)throw new N(G.SignatureRefused,r?"the signature field has no widget to carry an appearance":"a timestamp with a field of its own shows nowhere, so it carries no appearance");let a=e.digest??"sha256";if(!(a in wj)||"sha1"===a)throw new N(G.SignatureRefused,`unsupported digest \'${a}\'`);let s=(e.kind??"signature")==="timestamp"?"ETSI.RFC3161":e.subFilter??"ETSI.CAdES.detached";if(!(s in A4))throw new N(G.SignatureRefused,`unsupported subFilter \'${s}\'`);let l=e.contentsSizeBytes??8192;if(!Number.isInteger(l)||l<256||l>4194304)throw new N(G.SignatureRefused,"contentsSize must be an integer in [256, 4194304]");let u=this.session.versionRef(n.version().sha256),d=iX(),c=new h8;try{let t,n=this.openCandidate(d,c);c.push(()=>n.close());let i=r?null:function(e,t){let{fn:n,mem:r}=e;for(let i=1;i<=64;i++){let o,a,s=`Timestamp${i}`,l=r.writeU16String(s);try{o=n.EPDFForm_CreateField(t,7,l,0)}finally{r.free(l)}if(o<=0)continue;let u=n.EPDFPage_CreateAnnotRaw(t,0,20,0);if(0n===u)throw new N(G.SignatureRefused,"the document has no first page to put the timestamp field on");try{Dx(n,r,u,{left:0,top:0,right:0,bottom:0}),Dk(n,u,{print:!0,locked:!0}),a=n.EPDFAnnot_GetObjectNumber(u)}finally{n.FPDFPage_CloseAnnot(u)}if(a<=0||!n.EPDFForm_AttachWidget(t,o,a,"",0n,0))throw new N(G.Unknown,"the timestamp field could not be given its widget");return function(e,t,n){let{fn:r}=e,i=r.EPDFPage_GetAnnotIndexByObjectNumberRaw(t,0,n),o=i<0?0n:r.EPDFPage_GetAnnotRaw(t,0,i);if(0n===o)throw new N(G.Unknown,"the timestamp widget is not on its page");try{if(!r.FPDFAnnot_SetAP(o,0,0n))throw new N(G.Unknown,"the timestamp widget kept its appearance")}finally{r.FPDFPage_CloseAnnot(o)}}(e,t,a),{fieldObjectNumber:o,name:s}}throw new N(G.SignatureRefused,"the engine could not make a field for the timestamp: no name from Timestamp1 to Timestamp64 could be used")}(this.runtime,n.docPtr),f=r?r.fieldObjectNumber:i.fieldObjectNumber,m=e.signer,p=this.callPrepare(n.docPtr,f,{subfilter:A4[s],digest:wj[a],contentsSize:l,name:m?.name??null,reason:m?.reason??null,location:m?.location??null,contactInfo:m?.contactInfo??null,signingTime:m?.signedAt!==void 0?hH(m.signedAt):null,docmdpPermission:e.certify?.permission??0,fieldmdpAction:o?A8[o.action]:0,fieldmdpFields:o?.action==="all"?[]:o?.fields??[],lockPermission:o?.permission??0});if(0===p)throw new N(G.SignatureRefused,"the engine refused to author the signature (the field is signed, read-only or locked, a certification is not allowed here, the seed value requires what is not implemented, or the request is inconsistent)");let h=iE(e.appearance??null);h&&r?.widget&&w3(this.runtime,n.docPtr,new hQ,r.widget,h);let F=this.storeFor(),g=F.save(n.docPtr,p,d);try{t=F.seal(g,a)}catch(e){throw F.discard(g),e}let _={signingId:d,digest:t.digest,algorithm:a,byteRange:t.byteRange,contentsSizeBytes:l,subFilter:s,expectedVersion:u,expiresAt:null,...i?{field:{kind:"fqn",name:i.name}}:{}};return this.session.pendingSigning={prepared:_,fieldObjectNumber:f,madeField:null!==i,saved:g,contentsOffset:t.contentsOffset,contentsHexLength:t.contentsHexLength},_}finally{c.close()}}complete(e,t,n){var r,i;let o=this.session.pendingSigning;if(!o||o.prepared.signingId!==e.signingId){let t=this.session.lastCompletion;if(t&&t.signingId===e.signingId){if(!yZ(t.cms,e.cms))throw new N(G.SignatureRefused,"this signing already completed with a different CMS");return{...t.result,status:"already-completed"}}throw new N(G.NotFound,`no pending signing \'${e.signingId}\'`)}if(o.madeField?oQ(n,"doc.sign"):o4(n,A5(this.runtime,this.session,o.fieldObjectNumber),"sign"),r=o.prepared.expectedVersion,i=e.expectedVersion,r.baseSha256!==i.baseSha256||r.editsVersion!==i.editsVersion)throw new N(G.SigningVersionMismatch,"expectedVersion is not the version the candidate was prepared on");if(0===e.cms.byteLength||48!==e.cms[0])throw new N(G.SignatureRefused,"the CMS is not a DER SEQUENCE");if(e.cms.byteLength>o.prepared.contentsSizeBytes)throw new N(G.SignatureRefused,`the CMS (${e.cms.byteLength} bytes) does not fit the reserved ${o.prepared.contentsSizeBytes} bytes`);let a=this.storeFor(),s={byteRange:o.prepared.byteRange,contentsOffset:o.contentsOffset,contentsHexLength:o.contentsHexLength,digest:o.prepared.digest};a.writeContents(o.saved,s,e.cms);let l=a.openSealed(o.saved,this.session.password);this.verifySealed(l,{fieldObjectNumber:o.fieldObjectNumber,byteRange:o.prepared.byteRange,cms:e.cms}),this.session.install(l),gS(this.runtime,this.session),wC(this.runtime,this.session);let u=new wR(this.runtime,this.session),d=u.readSnapshot(),c=d.signatures.find(e=>"objectNumber"===e.field.kind&&e.field.objectNumber===o.fieldObjectNumber);if(!c)throw new N(G.Unknown,"the installed document lost the signature field");let f={status:"completed",signature:c,version:u.version(),previous:o.prepared.expectedVersion,protection:d.protection,meta:{affectedPages:this.session.allRecords().map(e=>q(e.pageObjectNumber)),cacheDelta:null,opId:t,undoable:!1}};return this.session.lastCompletion={signingId:e.signingId,cms:e.cms.slice(),result:f},f}cancel(e){let t=this.session.pendingSigning;return t&&t.prepared.signingId===e?(this.session.pendingSigning=null,this.storeFor().discard(t.saved),{status:"cancelled"}):this.session.lastCompletion?.signingId===e?{status:"already-completed"}:{status:"unknown"}}defaultLock(e,t,n){if(n)return;let r=t?function(e,t){let{fn:n,mem:r}=e,i=gv(e,t),o=t.requireDocPtr(),a=new PR(e,o),s=[],l=n.EPDFForm_CountFields(i);for(let t=0;tn.EPDFForm_GetFieldName(i,t,e,r));l&&s.push(l)}return s}(this.runtime,this.session):[];if(null!==e||0!==r.length)return{action:"include",fields:[...null===e?[]:function(e,t,n){let{fn:r,mem:i}=e,o=gv(e,t),a=[],s=r.EPDFForm_CountFields(o);for(let t=0;tr.EPDFForm_GetFieldName(o,t,e,n));s&&a.push(s)}return a}(this.runtime,this.session,e),...r]}}callPrepare(e,t,n){let{mem:r,fn:i}=this.runtime,o="wasm"===this.runtime.kind?A7:A9,a=[],s=e=>{if(null===e)return 0n;let t=r.writeU16String(e);return a.push(t),t};try{return gf(this.runtime,n.fieldmdpFields,(l,u)=>hY(r,o.bytes,d=>{for(let e=0;e{4===o.ptrBytes?r.poke(d,"i32",Number(t),e):r.poke(d,"i64",t,e)};return r.poke(d,"i32",n.subfilter,o.subfilter),r.poke(d,"i32",n.digest,o.digest),r.poke(d,"i32",n.contentsSize,o.contentsSize),c(o.name,s(n.name)),c(o.reason,s(n.reason)),c(o.location,s(n.location)),c(o.contactInfo,s(n.contactInfo)),c(o.signingTime,(e=>{if(null===e)return 0n;let t=r.writeU8String(e);return a.push(t),t})(n.signingTime)),r.poke(d,"i32",n.docmdpPermission,o.docmdpPermission),r.poke(d,"i32",n.fieldmdpAction,o.fieldmdpAction),c(o.fieldmdpFields,u>0?l:0n),r.poke(d,"i32",u,o.fieldmdpFieldCount),r.poke(d,"i32",n.lockPermission,o.lockPermission),i.EPDFSig_Prepare(e,t,d)}))}finally{for(let e=a.length-1;e>=0;e--)r.free(a[e])}}storeFor(){let e=this.session.source.base;return e?.kind==="file"?new A1(this.runtime,this.baseDocuments,e.path,this.candidatePath):new A0(this.runtime,this.baseDocuments)}verifySealed(e,t){let{fn:n}=this.runtime;try{let r=n.EPDFSig_LoadModel(e.docPtr);if(!r)throw new N(G.Unknown,"the sealed bytes have no signature model");try{A6(this.runtime,e.docPtr,r,t)}finally{n.EPDFSig_CloseModel(r)}"layer"!==this.session.kind&&(this.session.persistLayerArtifact=!1)}catch(t){throw e.close(),t}}openCandidate(e,t){let n=this.session.password,r=this.session.source,i=new AQ(this.runtime,this.session),o=i.canWriteScratchFiles()&&r.base?.kind==="file"?r.base.path:null;if("layer"===this.session.kind&&r.base&&!this.loadedDeltaHoldsSignedBytes()){let a=this.baseDocuments.retainByKey(r.base.key);if(a){let s=r.layer??{kind:"fresh"};if(this.session.hasUnsavedEdits())if(o){let n=A2(o,"signing",e,"layer");t.push(()=>this.runtime.fileWrite.removeFile(n)),i.saveLayerArtifactToFileEx(n).changedSinceLoad&&(s={kind:"artifact-file",path:n})}else{let e=i.saveLayerArtifactEx();e.changedSinceLoad&&(s={kind:"artifact",bytes:e.bytes})}return h9(this.runtime,a,s,n)}}if(o){let r=A2(o,"signing",e,"base.pdf");t.push(()=>this.runtime.fileWrite.removeFile(r)),i.snapshotToFile(r);let a=this.baseDocuments.acquireFileBase({key:`candidate:${e}`,path:r,password:n});return h9(this.runtime,a,{kind:"fresh"},n)}let a=i.snapshot().bytes,s=this.baseDocuments.acquireMemoryBase({key:`candidate:${e}`,bytes:new Uint8Array(a),password:n});return h9(this.runtime,s,{kind:"fresh"},n)}loadedDeltaHoldsSignedBytes(){let e=this.session.source.layer;if(!e||"fresh"===e.kind)return!1;let t=Number(this.runtime.fn.EPDFDoc_GetBaseBytesSize(this.session.requireDocPtr()));return new wR(this.runtime,this.session).readSnapshot().signatures.some(e=>e.signed&&null!==e.byteRange&&e.byteRange[2]+e.byteRange[3]>t)}},vt={0:"added",1:"modified",2:"freed"},vn={0:"dictionary",1:"stream",2:"array",3:"scalar",4:"xref",5:"objstm",6:"trailer"},vr={0:"ok",1:"failed",2:"absent"};function vi(e,t){let n=new Set([0,e.root,e.pagesRoot,...e.pages,...t]);for(let t of(e.acroForm&&n.add(e.acroForm),e.fields))for(let e of(n.add(t.objectNumber),t.widgets))n.add(e);return n}var vo=class{constructor(e,t){this.runtime=e,this.session=t}readWorkingCopySnapshot(){let e=new h8;try{let t=this.openWorkingCopy(e);if("loaded"===t.source)return new wR(this.runtime,this.session).readSnapshot();let n=t.target;return wG(this.runtime,n,e=>{let t=this.runtime.fn.EPDFSig_IsRevisionChainValid(e),r=wS(this.runtime,e);return{chainValid:t,revisions:t?wx(this.runtime,n,r):[],signatures:r,protection:iM(r)}})}finally{e.close()}}analyze(e){let t,n=new wR(this.runtime,this.session),r=n.readSnapshot(),i=n.version(),o=e.exploratoryLevel?"exploratory":"authoritative",a=e.detail??"summary",s="persisted",l=this.session.editsSeq(),u=null;if("signatureIndex"in e.since){let n=r.signatures[e.since.signatureIndex];if(!n)throw new N(G.NotFound,`no signature ${e.since.signatureIndex}`);if(!n.signed||null===n.revisionIndex)throw new N(G.InvalidArg,`signature ${e.since.signatureIndex} seals no whole revision; nothing to analyze from`);t=n.revisionIndex,u=n.index}else t=e.since.revisionIndex;if(!r.chainValid){let e={verdict:"indeterminate",complete:!1,findings:[{rule:"revision-chain",verdict:"incomplete",objectNumber:0,detail:"the cross-reference chain is broken or was rebuilt: no revision can be told from another"}],method:"net-state"};return{mode:o,policyVersion:6,basis:{version:i,editsVersion:l,source:"persisted"},since:{revisionIndex:t,signatureIndex:u},until:{revisionIndex:t},restrictions:[],current:{...e,primary:e.findings[0]},later:{revisionCount:0,undoneObjectNumbers:[]},verdict:"indeterminate",steps:[]}}if(!Number.isInteger(t)||t<0||t>=r.revisions.length)throw new N(G.InvalidArg,`no revision ${t}`);let d=new h8;try{let n,c,f,m,p,h=this.session.requireDocPtr(),F=r.revisions,g="working-copy"===e.until?this.openWorkingCopy(d):null;if(g&&"working-copy"===g.source){s="working-copy",h=g.target;let e=wG(this.runtime,h,e=>wS(this.runtime,e));if(F=wx(this.runtime,h,e),0===F.length)throw new N(G.MalformedPdf,"the working copy has no valid revision chain")}let _=F.length-1;if("object"==typeof e.until&&(_=e.until.revisionIndex,!Number.isInteger(_)||_=F.length))throw new N(G.InvalidArg,`no revision ${_} at or after ${t}`);let P=new h8,D=[],b=[];try{let e=this.openPrefix(h,F,t,P),n=_===F.length-1?h:this.openPrefix(h,F,_,P);c=wO(this.runtime,e),f=_===t?c:wO(this.runtime,n),_>t&&({changes:D,unwritten:b,health:m}=this.compare(e,n,c,f))}finally{P.close()}let y=null===u?null:c.signatures[u]??null,w=function(e,t){let n=[],r=[],i=null,o=!1;for(let a of e.signatures){if(!a.signed||null===a.revisionIndex)continue;o=!0;let e=null!==t&&a.index===t.index,s=null!==t&&!e&&"timestamp"===t.kind&&1===a.docMdp;a.catalogCertification&&null!==a.docMdp&&!s&&(n.push({signatureIndex:a.index,revisionIndex:a.revisionIndex,source:"docmdp",own:e,permission:a.docMdp}),i=iI(i??"annotate",iO(a.docMdp))),a.lock?.permission!==void 0&&(i=iI(i??"annotate",iO(a.lock.permission))),(null===t||e)&&(a.fieldMdp&&(n.push({signatureIndex:a.index,revisionIndex:a.revisionIndex,source:"fieldmdp",own:e,fields:a.fieldMdp}),r.push({signatureIndex:a.index,source:"fieldmdp",spec:a.fieldMdp})),a.lock&&(n.push({signatureIndex:a.index,revisionIndex:a.revisionIndex,source:"lock",own:e,fields:a.lock}),r.push({signatureIndex:a.index,source:"lock",spec:a.lock})))}return{anchors:n,level:o?i??"annotate":"annotate",locks:r}}(c,y),E=e.exploratoryLevel,A=ow({older:t,newer:_,changes:D,unwritten:b,before:c,after:f,health:m,restrictions:{level:w.level,locks:w.locks},levelOverride:E}),v=w.anchors.some(e=>"docmdp"===e.source&&e.own),S=_-t;p=S<=1?1===S?[A]:[]:v||"full"===a?this.walkSteps(h,F,t,_,c,{level:w.level,locks:w.locks,levelOverride:E}):[];let k=v?{...function(e,t){let n=[...e.findings];for(let r of t)if(r!==e)for(let e of r.findings)"permitted"!==e.verdict&&n.push({...e,detail:`revision ${r.newer}: ${e.detail??e.rule}`});let r=oc(n,"unchanged"!==e.verdict||t.some(e=>"unchanged"!==e.verdict)),i=of(n);return{verdict:r,complete:!n.some(e=>"incomplete"===e.verdict),...i?{primary:i}:{},findings:n}}(A,p),method:"net-state+replay"}:{...(n=of(A.findings),{verdict:A.verdict,complete:!A.findings.some(e=>"incomplete"===e.verdict),...n?{primary:n}:{},findings:A.findings}),method:"net-state"};return{mode:o,policyVersion:6,basis:{version:i,editsVersion:l,source:s},since:{revisionIndex:t,signatureIndex:u},until:{revisionIndex:_},restrictions:w.anchors,current:k,later:{revisionCount:S,undoneObjectNumbers:D.filter(oE).map(e=>e.objectNumber)},verdict:k.verdict,steps:p}}finally{d.close()}}openPrefix(e,t,n,r){let i=this.runtime.fn.EPDFDoc_OpenRevision(e,BigInt(t[n].end));if(0n===i)throw new N(G.MalformedPdf,`revision ${n} does not open as a document`);return r.push(()=>this.runtime.fn.FPDF_CloseDocument(i)),i}walkSteps(e,t,n,r,i,o){let{fn:a}=this.runtime,s=[],l=this.openPrefix(e,t,n,new h8),u=i;try{for(let i=n+1;i<=r;i++){let n=i===t.length-1?e:this.openPrefix(e,t,i,new h8);try{let e=wO(this.runtime,n),{changes:t,unwritten:r,health:a}=this.compare(l,n,u,e);s.push(ow({older:i-1,newer:i,changes:t,unwritten:r,before:u,after:e,health:a,restrictions:{level:o.level,locks:o.locks},levelOverride:o.levelOverride})),u=e}finally{a.FPDF_CloseDocument(l),l=n}}}finally{l!==e&&a.FPDF_CloseDocument(l)}return s}openWorkingCopy(e){let{fn:t,mem:n}=this.runtime,r=this.session.requireDocPtr();if(!this.session.hasUnsavedEdits())return{target:r,source:"loaded"};let i=new AQ(this.runtime,this.session);if("layer"===this.session.kind){let o=this.session.source.base;if(i.canWriteScratchFiles()&&o?.kind==="file"){let a=A2(o.path,"working-copy",iX(),"delta");if(e.push(()=>this.runtime.fileWrite.removeFile(a)),!i.saveLayerDeltaToFileEx(a).changedSinceLoad)return{target:r,source:"loaded"};if(0===this.runtime.fileAccess.sizeOf(a))return this.freshLayerOverBase(e);let s=h4(n,a,e=>t.EPDFDoc_OpenBaseOverlayFromPath(r,e));if(0n===s)throw new N(G.MalformedPdf,"the working copy does not compose with its base");return e.push(()=>t.FPDF_CloseDocument(s)),{target:s,source:"working-copy"}}let a=i.saveLayerDeltaEx();if(!a.changedSinceLoad)return{target:r,source:"loaded"};if(0===a.size)return this.freshLayerOverBase(e);let s=new Uint8Array(a.bytes),l=n.alloc(s.byteLength);try{n.writeBytes(l,s);let i=t.EPDFDoc_OpenBaseOverlay(r,l,s.byteLength);if(0n===i)throw new N(G.MalformedPdf,"the working copy does not compose with its base");return e.push(()=>t.FPDF_CloseDocument(i)),{target:i,source:"working-copy"}}finally{n.free(l)}}let o=i.saveStandaloneToBufferEx("incremental");if(o.unchangedSinceLoad)return{target:r,source:"loaded"};let a=h7(this.runtime,new Uint8Array(o.bytes),this.session.password);return e.push(()=>a.close()),{target:a.docPtr,source:"working-copy"}}freshLayerOverBase(e){let{fn:t,mem:n}=this.runtime,r=t.EPDFLayer_GetBaseDocument(this.session.requireDocPtr()),i=n.alloc(4);try{n.poke(i,"i32",-1);let o=t.EPDFLayer_OpenLayer(r,0n,this.session.password??"",i);if(0n===o||0!==Number(n.peek(i,"i32")))throw new N(G.MalformedPdf,"the working copy could not be opened over its base");return e.push(()=>t.FPDF_CloseDocument(o)),{target:o,source:"working-copy"}}finally{n.free(i)}}compare(e,t,n,r){let{fn:i,mem:o}=this.runtime,a=i.EPDFDoc_CompareRevisions(e,t);if(0n===a)throw new N(G.MalformedPdf,"the revisions do not share a byte history");try{let t=i.EPDFObjectDiff_GetCount(a),s=[];return h0(o,[4,4,4,4,4,4],([e,n,r,l,u,d])=>{for(let c=0;c>>0,f=Number(o.peek(l,"i32")),m=Number(o.peek(u,"i32")),p=this.readValue(a,c,0),h=this.readValue(a,c,1),F=p.truncated||h.truncated,g=null,_=null;try{g=null===p.text||p.truncated?null:oi(p.text),_=null===h.text||h.truncated?null:oi(h.text)}catch{F=!0}let P=vt[Number(o.peek(n,"i32"))]??"modified";s.push({objectNumber:t,change:P,kind:vn[Number(o.peek(r,"i32"))]??"scalar",present:{old:"added"!==P,new:"freed"!==P},generation:{old:f<0?null:f,new:m<0?null:m},value:{old:g,new:_,truncated:F},raw:{old:p.text,new:h.text},read:{old:vr[i.EPDFObjectDiff_GetReadStatus(a,c,0)]??"failed",new:vr[i.EPDFObjectDiff_GetReadStatus(a,c,1)]??"failed"},streamDataChanged:0!==Number(o.peek(d,"i32")),usage:{old:[],new:[]}})}}),{changes:this.withAnchoredUsage(a,s,n,r),unwritten:(function(e){let t=new Set([...e.before.pages,...e.after.pages]),n=new Set(e.changes.map(e=>e.objectNumber)),r=new Set;for(let i of e.changes)if(t.has(i.objectNumber))for(let e of om){let t=ol(i.value[e])?.Annots;t?.t!=="ref"||n.has(t.num)||r.add(t.num)}return[...r].sort((e,t)=>e-t)})({changes:s,before:n,after:r}).map(t=>this.readUnwritten(e,t)),health:{old:this.readHealth(a,0),new:this.readHealth(a,1)}}}finally{i.EPDFObjectDiff_Close(a)}}readHealth(e,t){let{fn:n,mem:r}=this.runtime;return h0(r,[4,4,4],([i,o,a])=>{for(let e of[i,o,a])r.poke(e,"i32",0);if(!n.EPDFObjectDiff_GetRevisionHealth(e,t,i,o,a))throw new N(G.Unknown,"failed to read revision health");return{sparseXref:0!==Number(r.peek(i,"i32")),bareReferences:Number(r.peek(o,"i32"))>>>0,referrersComplete:0!==Number(r.peek(a,"i32"))}})}withAnchoredUsage(e,t,n,r){let i=new Set(t.map(e=>e.objectNumber)),o={old:new o$(t=>this.readReferrers(e,0,t),vi(n,i)),new:new o$(t=>this.readReferrers(e,1,t),vi(r,i))};return t.map(e=>{let t=e.present.old?o.old.resolve(e.objectNumber):[],n=e.present.new?o.new.resolve(e.objectNumber):[];return{...e,usage:{old:t===oL?[]:t,new:n===oL?[]:n},...t===oL||n===oL?{usageIncomplete:!0}:{}}})}readUnwritten(e,t){let{fn:n,mem:r}=this.runtime;return h0(r,[4,4],([i,o])=>{let a=(a,s)=>(r.poke(i,"i32",-1),r.poke(o,"i32",0),n.EPDFDoc_GetLoadedObjectValue(e,t,a,s,i,o)),s=e=>({objectNumber:t,value:null,read:e}),l=a(0n,0),u=vr[Number(r.peek(i,"i32"))]??"failed",d=0!==Number(r.peek(o,"i32"));return"ok"!==u||d||l<=0?s(u):hY(r,l,e=>{let n=a(e,l);if(n<=0||0!==Number(r.peek(o,"i32")))return s(u);let i=r.readBytes(e,n-1),d="";for(let e of i)d+=String.fromCharCode(e);try{return{objectNumber:t,value:oi(d),read:u}}catch{return s(u)}})})}readValue(e,t,n){let{fn:r,mem:i}=this.runtime;return hY(i,4,o=>{i.poke(o,"i32",0);let a=r.EPDFObjectDiff_GetValue(e,t,n,0n,0,o),s=0!==Number(i.peek(o,"i32"));return a<=0?{text:null,truncated:s}:hY(i,a,s=>{i.poke(o,"i32",0);let l=r.EPDFObjectDiff_GetValue(e,t,n,s,a,o),u=0!==Number(i.peek(o,"i32"));if(l<=0)return{text:null,truncated:u};let d=i.readBytes(s,l-1),c="";for(let e of d)c+=String.fromCharCode(e);return{text:c,truncated:u}})})}readReferrers(e,t,n){let{fn:r,mem:i}=this.runtime,o=r.EPDFObjectDiff_GetReferrerCount(e,t,n),a=[];return o<=0||hY(i,4,s=>{for(let l=0;l{let u=r.EPDFObjectDiff_GetReferrer(e,t,n,l,s,a,o);if(u<=0)return"";let d=i.readBytes(a,u-1),c="";for(let e of d)c+=String.fromCharCode(e);return c});a.push({parent:Number(i.peek(s,"i32"))>>>0,label:u})}}),a}},va={certificates:0,ocspResponses:1,crls:2};function vs(e,t){let n={certificates:[],ocspResponses:[],crls:[]};for(let r of on)n[r]=function(e,t,n){let{fn:r,mem:i}=e,o=r.EPDFDss_GetCount(t,va[n]),a=[];for(let e=0;e{if(r.EPDFDss_GetData(t,va[n],e,a,o)!==o)throw new N(G.Unknown,`failed to read entry ${e} of the document\'s ${n}`);return new Uint8Array(i.readBytes(a,o))}))}return a}(e,t,r);return n}var vl=class{constructor(e,t){this.runtime=e,this.session=t}read(){return vs(this.runtime,this.session.requireDocPtr())}},vu=class{constructor(e,t){this.runtime=e,this.session=t}add(e,t){for(let n of(hW(t),on))(e[n]??[]).forEach((e,t)=>{let r=function(e){if(0===e.length)return"it is empty";if(e.length>0x1000000)return"it is larger than 16777216 bytes";if(48!==e[0])return"it is not a DER SEQUENCE";let t=or(e,0,e.length);return t?t.end!==e.length?"bytes follow the object":!function e(t,n,r,i){if(i>64)return!1;let o=n;for(;oyZ(e,n))}(r,o,a)&&(!function(e,t,n,r){let{fn:i,mem:o}=e;if(0===hY(o,r.byteLength,e=>(o.writeBytes(e,r),i.EPDFDss_Add(t,va[n],e,r.byteLength))))throw new N(G.MalformedPdf,`the document\'s security store can\'t be extended: its /DSS or its list of ${n} is not what the PDF standard says it is`)}(this.runtime,n,o,a),r[o].push(a),i[o]+=1);return{added:i,meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}},vd=class{constructor(e,t){this.runtime=e,this.baseDocuments=t}finalize(e){let[t,n,r,i]=e.byteRange,o=this.runtime.fileAccess.sizeOf(e.path);if(!e.byteRange.every(e=>Number.isSafeInteger(e)&&e>=0)||0!==t||n>=r||r+i!==o)throw new N(G.InvalidArg,`byteRange [${e.byteRange.join(" ")}] does not span a ${o}-byte candidate`);let a=r-n-2;if(!Number.isSafeInteger(e.contentsSizeBytes)||a!==2*e.contentsSizeBytes)throw new N(G.InvalidArg,`the /Contents hole holds ${a} hex digits, not the ${2*e.contentsSizeBytes} of contentsSize`);if(0===e.cms.byteLength||48!==e.cms[0])throw new N(G.SignatureRefused,"the CMS is not a DER SEQUENCE");if(e.cms.byteLength>e.contentsSizeBytes)throw new N(G.SignatureRefused,`the CMS (${e.cms.byteLength} bytes) does not fit the reserved ${e.contentsSizeBytes} bytes`);!function(e,t,n,r){let{mem:i}=e,o=e.fileAccess.readRange(t,n.holeOffset,n.hexLength+2);if(o.byteLength!==n.hexLength+2||60!==o[0]||62!==o[o.byteLength-1])throw new N(G.InvalidArg,"the byteRange gap is not a <\\u2026> /Contents hole of the candidate");let a=i.alloc(o.byteLength);try{i.writeBytes(a,o),AY(e,a,o.byteLength,n.holeOffset,{byteRange:[0,0,0,0],contentsOffset:n.holeOffset+1,contentsHexLength:n.hexLength,digest:new Uint8Array},r),e.fileWrite.writeRange(t,n.holeOffset,i.readBytes(a,o.byteLength))}finally{i.free(a)}}(this.runtime,e.path,{holeOffset:n,hexLength:a},e.cms);let s=new Fu(this.runtime),l=this.baseDocuments.acquireFileBase({key:`finalize:${iX()}`,path:e.path,password:e.password});try{s.openFromHandle(h9(this.runtime,l,{kind:"fresh"},e.password));let t=wN(this.runtime,s);A6(this.runtime,s.requireDocPtr(),t,{fieldObjectNumber:e.fieldObjectNumber,byteRange:e.byteRange,cms:e.cms});let n=new wR(this.runtime,s),r=n.readSnapshot();return{signature:r.signatures.find(t=>"objectNumber"===t.field.kind&&t.field.objectNumber===e.fieldObjectNumber),protection:r.protection,version:n.version(),lastObjectNumber:s.lastObjectNumber()}}finally{s.close()}}},vc=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}export(e,t,n){hW(n);let{fields:r,widgets:i,calculationOrder:o}=function(e,t,n){let r=new Set;for(let n of t.fields??[]){let t=e.fields.find(e=>ae(e,n));if(!t)throw new N(G.NotFound,`export: the form has no field ${"fqn"===n.kind?n.name:eM(n)}`);r.add(t)}let i=new Set(n.map(H)),o=new Set;for(let e of t.pages??[]){if(!i.has(H(e)))throw new N(G.NotFound,`export: the document has no page ${H(e)}`);o.add(H(e))}for(let t of e.fields)t.widgets.some(e=>e.page&&o.has(H(e.page)))&&r.add(t);let a=!t.fields&&!t.pages,s=e.fields.filter(e=>a||r.has(e)),l=new Map(e.widgets.map(e=>[K(e.ref),e])),u=s.flatMap(e=>e.widgets.flatMap(e=>{let t=e.ref?l.get(K(e.ref)):void 0;return t?[t]:[]})),d=new Set(s.map(e=>eM(e.ref))),c=e.calculationOrder.filter(e=>null!==e&&d.has(eM(e)));return{fields:s.map(at),widgets:u,calculationOrder:c}}(i8(new wW(this.runtime,this.session,this.fonts).snapshot(n),gF(this.runtime,this.session)),e,this.session.allRecords().map(e=>q(e.pageObjectNumber)));nC("form",t,"items",r.length+i.length);let a=new vf(this.runtime,this.session,t),s=new Set(r.flatMap(e=>"pushbutton"!==e.kind||e.hasImage?[]:e.widgets.flatMap(e=>e.ref?[K(e.ref)]:[]))),l={pages:yk(this.runtime,this.session,i),fields:r.map(e=>({data:e})),widgets:i.map(e=>({data:e,resources:s.has(K(e.ref))?{}:a.of(e)})),calculationOrder:o};nC("form",t,"pages",l.pages.length);let u=nN(l);return nC("form",t,"manifestBytes",u),nC("form",t,"bundleBytes",u+a.totalBytes),{format:"embedpdf/form",version:1,...l,resources:a.byId}}},vf=class extends yx{constructor(e,t,n){super(e,"form",n),this.session=t,hJ(this,"drawings",new Map)}of(e){let t;if("pushbutton"!==e.fieldKind)return{};let n=PV(this.runtime,this.session,e.ref);if(0===n)return{};let r=this.drawings.get(n);if(r)return{image:r};let i=gj(this.runtime,this.session,e.ref);try{t=yA(this.runtime,this.session.requireDocPtr(),i,n)}finally{this.runtime.fn.FPDFPage_CloseAnnot(i)}if(!t)return{};let o=this.keep(t);return this.drawings.set(n,o),{image:o}}},vm=new WeakMap;async function vp(e,t,n,r,i){let o=t.cacheSeq(),a=vm.get(t);a||(a=new Map,vm.set(t,a));let s=a.get(n);if(s&&s.seq===o)return s;let l=await new gL(e,t).read(n,r,i),u={seq:o,folded:rp(l.text),snapshot:l};if(a.delete(n),a.set(n,u),a.size>512){let e=a.keys().next().value;void 0!==e&&a.delete(e)}return u}var vh=class{constructor(e,t){this.runtime=e,this.session=t}async query(e,t,n){hW(t);let r={text:e.text,...e.regex?{regex:!0}:{},...e.matchCase?{matchCase:!0}:{},...e.wholeWord?{wholeWord:!0}:{},...e.matchDiacritics?{matchDiacritics:!0}:{},...e.ignoreWhitespace?{ignoreWhitespace:!0}:{}},i=e.snippets??!1,o=rG(r);if(!o.ok)throw new N(G.InvalidArg,`invalid search query (${o.issue}): ${o.message}`);let a=this.session.allRecords(),s=a.length;if(!r.regex&&0===rp(r.text).folded.trim().length)return{matches:[],nextCursor:null,pagesSearched:0,pageCount:s};let l=this.session.cacheSeq(),u=JSON.stringify([r.regex?"r":"l",r.text,+!!r.matchCase,+!!r.matchDiacritics,+!!r.wholeWord,+!!r.ignoreWhitespace,i?"snippets":"matches"]),d=0,c=0;if(void 0!==e.cursor){let t=function(e,t,n,r){let i;try{i=JSON.parse(t)}catch{throw new N(G.InvalidArg,"malformed search cursor")}if(i?.v!==1||"number"!=typeof i.scanned||"string"!=typeof i.key)throw new N(G.InvalidArg,"malformed search cursor");if(i.key!==r)throw new N(G.InvalidArg,"search cursor belongs to a different query \\u2014 restart the search");if(i.seq!==n)throw new N(G.InvalidArg,"document changed since this search cursor was issued \\u2014 restart the search",{details:{cursorSeq:i.seq,currentSeq:n}});if(void 0!==e.from&&e.from.objectNumber!==i.start)throw new N(G.InvalidArg,"`from` conflicts with the cursor \\u2014 omit it when resuming");return i}(e,e.cursor,l,u);d=t.start,c=t.scanned}else void 0!==e.from&&(d=this.session.resolvePageRef(e.from).pageObjectNumber),void 0!==e.skip&&(c=Math.min(Math.max(0,Math.floor(e.skip)),s));let f=a;if(0!==d){let e=a.findIndex(e=>e.pageObjectNumber===d);f=a.slice(e).concat(a.slice(0,e))}let m=vF(e.limit?.pages,64,256),p=vF(e.limit?.matches,256,1024),h=[],F=0,g=new g$(n,t);for(;c=55296&&t<=56319?2:1;continue}t.wholeWord&&(rS(e,n.index)||rk(e,n.index+n[0].length))||o.push({start:n.index,count:n[0].length})}return o}(s,r):r.matchCase||r.matchDiacritics||r.ignoreWhitespace?rx(rp(s,rE(r)),r):rx(a.folded,r)).length>0){let r=function(e){let t=function(e){let t=[],n=[],r=[n9];for(let i of e.runs){if(!nS(i)){for(let e of i.glyphs)t.push({loose:e.loose,tight:e.tight,space:e.space,empty:e.empty});n.push({start:i.start,count:i.glyphs.length,rect:i.rect,fontSize:i.fontSize,frame:0});continue}let e=function(e,t){let n=t.glyphs.find(e=>!n7(e));if(!n)return 0;let r=n.loose,i=r.upperRight.x-r.upperLeft.x,o=r.upperRight.y-r.upperLeft.y,a=Math.hypot(i,o);if(a<=1e-6)return 0;let s={x:i/a,y:o/a},l=r.upperLeft.x-r.lowerLeft.x,u=r.upperLeft.y-r.lowerLeft.y,d=s.x*u-s.y*l>=0?1:-1,c={x:-s.y*d,y:s.x*d};for(let t=0;t0;if(r>=.9999621552387067&&i)return t}return e.push({baseline:s,ascent:c}),e.length-1}(r,i),o=r[e],a=null;for(let e of i.glyphs){if(n7(e)){t.push({loose:rn,space:e.space,empty:!0});continue}let n=rr(o,e.loose),r=e.tight?rr(o,e.tight):void 0;t.push({loose:n,tight:r,space:e.space}),a=a?{left:Math.min(a.left,n.left),bottom:Math.min(a.bottom,n.bottom),right:Math.max(a.right,n.right),top:Math.max(a.top,n.top)}:n}n.push({start:i.start,count:i.glyphs.length,rect:a??rn,fontSize:i.fontSize,frame:e})}return{glyphs:t,runs:n,frames:r}}(e),n=t.glyphs.length,r=e=>"number"!=typeof e?ro(t,e):Number.isInteger(e)&&e>=0&&e({start:e,count:t-e+1});return{charCount:n,runs:e.runs,charAt:e=>ro(t,e),wordAt:e=>{let n=r(e);return null===n?null:i(function(e,t){let n=e.glyphs.length;if(t<0||t>=n)return[t,t];let r=t;for(;r>0&&!n8(e.glyphs[r-1]);)r--;let i=t;for(;i{let n=r(e);return null===n?null:i(function(e,t){let n=e.runs.findIndex(e=>t>=e.start&&t=0;t--){let n=e.runs[t];if(!rs(n.rect)){if(n.frame!==r.frame||!rl(n.rect.bottom,n.rect.top,i,o))break;a=n.start}}for(let t=n+1;t(function(e,t,n){if(n<=0||0===e.glyphs.length)return[];let r=Math.max(0,t),i=Math.min(e.glyphs.length-1,t+n-1);if(ii)continue;let a=Math.max(r,t.start),s=Math.min(i,n),l=1/0,u=-1/0,d=1/0,c=-1/0,f=0,m=0,p=-1/0,h=0,F=0,g=()=>{f>0&&1/0!==l&&o.push({rect:{left:l,bottom:d,right:u,top:c},charCount:f,fontSize:t.fontSize,frame:t.frame,firstX:h,lastX:F}),l=1/0,u=-1/0,d=1/0,c=-1/0,f=0,m=0,p=-1/0};for(let t=a;t<=s;t++){let n=e.glyphs[t];if(n7(n))continue;let r=n.loose;if(f>0&&p>-1/0){let e=m/f;e>0&&Math.abs(r.left-p)>2.5*e&&g()}let i=(r.left+r.right)/2;0===f&&(h=i),F=i,l=Math.min(l,r.left),u=Math.max(u,r.right),d=Math.min(d,r.bottom),c=Math.max(c,r.top),f++,m+=r.right-r.left,p=r.right}g()}return(function(e){let t=[],n=null,r=null;for(let i of e)n&&r&&n.frame===i.frame&&function(e,t){if(null!=e.fontSize&&null!=t.fontSize&&e.fontSize>0&&t.fontSize>0&&Math.max(e.fontSize,t.fontSize)/Math.min(e.fontSize,t.fontSize)>1.5||.8>function(e,t){let n=e.top-e.bottom,r=t.top-t.bottom;if(n<=0||r<=0)return 0;let i=Math.max(e.top,t.top)-Math.min(e.bottom,t.bottom);return i===n||i===r?1:Math.max(0,Math.min(e.top,t.top)-Math.max(e.bottom,t.bottom))/i}(e.rect,t.rect))return!1;let n=(e.rect.right-e.rect.left)/e.charCount,r=(t.rect.right-t.rect.left)/t.charCount,i=e.rect.left-n,o=e.rect.right+n,a=t.rect.left-r;return ia}(n,i)?r={rect:{left:Math.min(r.rect.left,i.rect.left),bottom:Math.min(r.rect.bottom,i.rect.bottom),right:Math.max(r.rect.right,i.rect.right),top:Math.max(r.rect.top,i.rect.top)},frame:r.frame,firstX:r.firstX,lastX:i.lastX}:(r&&t.push(r),r={rect:i.rect,frame:i.frame,firstX:i.firstX,lastX:i.lastX}),n=i;return r&&r.rect.right>r.rect.left&&r.rect.top>r.rect.bottom&&t.push(r),t})(o).map(t=>(function(e,t){let n=ra(e.frames[t.frame],t.frame,t.rect);return{quad:n,rect:0===t.frame?t.rect:{left:Math.min(n.upperLeft.x,n.upperRight.x,n.lowerLeft.x,n.lowerRight.x),bottom:Math.min(n.upperLeft.y,n.upperRight.y,n.lowerLeft.y,n.lowerRight.y),right:Math.max(n.upperLeft.x,n.upperRight.x,n.lowerLeft.x,n.lowerRight.x),top:Math.max(n.upperLeft.y,n.upperRight.y,n.lowerLeft.y,n.lowerRight.y)},advance:t.lastX>=t.firstX?1:-1}})(e,t))})(t,e.start,e.count),charQuad:e=>(function(e,t){let n=e.glyphs[t];if(!n||n7(n))return null;let r=n.loose;if(r.right<=r.left||r.top<=r.bottom)return null;let i=e.runs.find(e=>t>=e.start&&t0){for(let n=i;n=r;t--)if(oW.test(e[t])){o=t;break}oH(e,o)&&o--}let a=(t,n)=>e.slice(t,n).replace(oq," ");return{before:a(i,t.start),match:a(t.start,r),after:a(r,o)}}(s,t)}:{}})}}c++,F++}return{matches:h,nextCursor:ct.FPDFJavaScriptAction_GetName(l,e,n))??""}finally{t.FPDFDoc_CloseJavaScriptAction(l)}i.reservePayloadBytes(o.length);let u=function(e,t,n){if(e)return e;throw new N(G.MalformedPdf,`failed to read ${t}`,{details:{index:n}})}(F8(t,n,r,t.EPDFDoc_GetNamedJavaScriptActionModel(r,s),i),"name-tree script",s);a.push({name:o,action:u})}let s=F8(t,n,r,t.EPDFDoc_GetOpenActionModel(r),i),l=s?0n:t.EPDFDoc_GetOpenActionDest(r),u=0n!==l?F2(t,n,r,l):null,d={};for(let[o,a]of vg){hW(e);let s=F8(t,n,r,t.EPDFDoc_GetAdditionalActionModel(r,a),i);s&&(d[o]=s)}return{nameTreeScripts:a,openAction:s,openDestination:u,...d}}};function vP(e,t){var n;let{target:r,...i}=e;return r?{...i,target:"rect"===r.kind?(n=t(),"rect"===r.kind?{...r,rect:nA(r.rect,n)}:r):r}:i}function vD(e,t,n){return n4({...e,subtype:"widget"},t,n)}var vb=class{constructor(e,t=0x8000000){this.runtime=e,this.budgetBytes=t,hJ(this,"enabled",void 0),hJ(this,"on",!1),this.enabled=t>0&&"function"==typeof e.fn.EPDF_SetDecodedImageBudget}beginJob(e){this.enabled&&e!==this.on&&(this.runtime.fn.EPDF_SetDecodedImageBudget(e?this.budgetBytes:0),this.on=e)}},vy=class{constructor(e,t){this.runtime=e,this.session=t}viewports(e,t){hW(t);let n=this.session.recordByObjectNumber(e).pageIndex;return gl(this.runtime.fn,this.runtime.mem,this.session.requireDocPtr(),n)}},vw=class{constructor(e,t,n){this.runtime=e,this.session=t,this.pageObjectNumber=n,void 0!==n&&t.recordByObjectNumber(n)}read(e,t){hW(t),vE(e);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=this.pageObjectNumber;if(!(void 0===o?n.EPDFDoc_HasPieceInfoEntry(i,e):n.EPDFDoc_HasPagePieceInfoEntry(i,o,e)))return null;let a=void 0===o?n.EPDFDoc_GetPieceInfoKeyCount(i,e):n.EPDFDoc_GetPagePieceInfoKeyCount(i,o,e),s={};for(let l=0;lvoid 0===o?n.EPDFDoc_GetPieceInfoKeyAt(i,e,l,t,r):n.EPDFDoc_GetPagePieceInfoKeyAt(i,o,e,l,t,r));null!==a&&(s[a]=this.readEntry(e,a))}let l=h3(r,(t,r)=>void 0===o?n.EPDFDoc_GetPieceInfoLastModified(i,e,t,r):n.EPDFDoc_GetPagePieceInfoLastModified(i,o,e,t,r),null);return{entries:s,modifiedAt:l?hq(l):null}}update(e,t,n){hW(n),vE(e),function(e){if("object"!=typeof e||null===e||Array.isArray(e))throw new N(G.InvalidArg,"pieceInfo patch must be an object")}(t);let r=Object.keys(t);if(0===r.length)return;(function(e,t){for(let n of t){if(0===n.length)throw new N(G.InvalidArg,"pieceInfo keys must be non-empty");!function(e,t){if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t){if("number"==typeof t){if(!Number.isFinite(t))throw new N(G.InvalidArg,`pieceInfo number for \'${e}\' must be finite`);return}if(Array.isArray(t)){if(!t.every(e=>"string"==typeof e))throw new N(G.InvalidArg,`pieceInfo string array for \'${e}\' must contain only strings`);return}if("object"==typeof t&&null!==t&&"name"in t){if("string"!=typeof t.name||0===t.name.length)throw new N(G.InvalidArg,`pieceInfo PDF name for \'${e}\' must be a non-empty string`);return}throw new N(G.InvalidArg,`unsupported pieceInfo value for \'${e}\': string | number | boolean | string[] | { name } | null`)}}(n,e[n])}})(t,r),hW(n);let{mem:i}=this.runtime,o=hH(new Date),a=i.writeU16String(o);try{for(let n of r){let r=t[n];if(!this.writeEntry(e,n,r,a))throw new N(G.Unknown,`pieceInfo write rejected for key \'${n}\' after validation`)}}finally{i.free(a)}}applications(e){hW(e);let{fn:t,mem:n}=this.runtime,r=this.session.requireDocPtr(),i=this.pageObjectNumber,o=void 0===i?t.EPDFDoc_GetPieceInfoEntryCount(r):t.EPDFDoc_GetPagePieceInfoEntryCount(r,i),a=[];for(let e=0;evoid 0===i?t.EPDFDoc_GetPieceInfoEntryAt(r,e,n,o):t.EPDFDoc_GetPagePieceInfoEntryAt(r,i,e,n,o));null!==o&&a.push(o)}return a}delete(e,t){hW(t),vE(e);let{fn:n}=this.runtime,r=this.session.requireDocPtr(),i=this.pageObjectNumber;if(!(void 0===i?n.EPDFDoc_ClearPieceInfoEntry(r,e):n.EPDFDoc_ClearPagePieceInfoEntry(r,i,e)))throw new N(G.Unknown,`pieceInfo delete rejected for application \'${e}\'`)}readEntry(e,t){let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=this.pageObjectNumber;switch(void 0===o?n.EPDFDoc_GetPieceInfoValueType(i,e,t):n.EPDFDoc_GetPagePieceInfoValueType(i,o,e,t)){case 3:{let a=h3(r,(r,a)=>void 0===o?n.EPDFDoc_GetPieceInfoString(i,e,t,r,a):n.EPDFDoc_GetPagePieceInfoString(i,o,e,t,r,a),"");return null===a?{type:"unknown"}:{type:"string",value:a}}case 4:{let a=h2(r,(r,a)=>void 0===o?n.EPDFDoc_GetPieceInfoName(i,e,t,r,a):n.EPDFDoc_GetPagePieceInfoName(i,o,e,t,r,a));return null===a?{type:"unknown"}:{type:"name",value:a}}case 2:{let a=r.alloc(4);try{if(!(void 0===o?n.EPDFDoc_GetPieceInfoNumber(i,e,t,a):n.EPDFDoc_GetPagePieceInfoNumber(i,o,e,t,a)))return{type:"unknown"};return{type:"number",value:Number(r.peek(a,"f32"))}}finally{r.free(a)}}case 1:{let a=r.alloc(4);try{if(!(void 0===o?n.EPDFDoc_GetPieceInfoBoolean(i,e,t,a):n.EPDFDoc_GetPagePieceInfoBoolean(i,o,e,t,a)))return{type:"unknown"};return{type:"boolean",value:0!==Number(r.peek(a,"i32"))}}finally{r.free(a)}}case 5:{let a=void 0===o?n.EPDFDoc_GetPieceInfoStringArrayCount(i,e,t):n.EPDFDoc_GetPagePieceInfoStringArrayCount(i,o,e,t);if(a<0)return{type:"unknown"};let s=[];for(let l=0;lvoid 0===o?n.EPDFDoc_GetPieceInfoStringArrayAt(i,e,t,l,r,a):n.EPDFDoc_GetPagePieceInfoStringArrayAt(i,o,e,t,l,r,a),"");if(null===a)return{type:"unknown"};s.push(a)}return{type:"string-array",value:s}}default:return{type:"unknown"}}}writeEntry(e,t,n,r){let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr(),s=this.pageObjectNumber;if(null===n)return void 0===s?i.EPDFDoc_ClearPieceInfoKey(a,e,t,r):i.EPDFDoc_ClearPagePieceInfoKey(a,s,e,t,r);if("string"==typeof n)return h6(o,n,n=>void 0===s?i.EPDFDoc_SetPieceInfoString(a,e,t,n,r):i.EPDFDoc_SetPagePieceInfoString(a,s,e,t,n,r));if("number"==typeof n)return void 0===s?i.EPDFDoc_SetPieceInfoNumber(a,e,t,n,r):i.EPDFDoc_SetPagePieceInfoNumber(a,s,e,t,n,r);if("boolean"==typeof n)return void 0===s?i.EPDFDoc_SetPieceInfoBoolean(a,e,t,n,r):i.EPDFDoc_SetPagePieceInfoBoolean(a,s,e,t,n,r);if(Array.isArray(n))return gf(this.runtime,n,(n,o)=>void 0===s?i.EPDFDoc_SetPieceInfoStringArray(a,e,t,n,o,r):i.EPDFDoc_SetPagePieceInfoStringArray(a,s,e,t,n,o,r));if("object"==typeof n&&null!==n&&"name"in n)return void 0===s?i.EPDFDoc_SetPieceInfoName(a,e,t,n.name,r):i.EPDFDoc_SetPagePieceInfoName(a,s,e,t,n.name,r);throw new N(G.Unknown,`unvalidated pieceInfo value for \'${t}\'`)}};function vE(e){if("string"!=typeof e||0===e.length)throw new N(G.InvalidArg,"pieceInfo application must be non-empty")}function vA(e){return"pages.render"===e.kind||"pages.renderEncoded"===e.kind||"document.renderPageFile"===e.kind||"document.renderPageFileEncoded"===e.kind}var vv=class{constructor(e,t,n={}){this.runtime=e,this.post=t,this.options=n,hJ(this,"sessions",new Map),hJ(this,"baseDocuments",void 0),hJ(this,"aborts",new Map),hJ(this,"fontIds",new Map),hJ(this,"fonts",void 0),hJ(this,"residency",void 0),hJ(this,"decodedImages",void 0),hJ(this,"slices",void 0),hJ(this,"busy",!1),hJ(this,"held",[]),hJ(this,"destroyed",!1),hV(this.runtime),this.baseDocuments=new Fp(this.runtime),this.fonts=new y_(this.runtime,this.fontIds),this.residency=new Fo(this.runtime,{...Fr,budgetBytes:this.options.parsedPageBudgetBytes??Fr.budgetBytes},()=>this.busy),this.decodedImages=new vb(this.runtime,this.options.decodedImageBudgetBytes),this.slices={budgetMs:this.options.sliceMs??8,between:function(){if("function"==typeof setImmediate)return()=>new Promise(e=>setImmediate(e));if("function"==typeof MessageChannel){let e=new MessageChannel,t=[];return e.port1.onmessage=()=>t.shift()?.(),()=>new Promise(n=>{t.push(n),e.port2.postMessage(null)})}return()=>new Promise(e=>setTimeout(e,0))}()}}registerStartupFonts(e){this.fonts.registerStartup(e)}receive(e){"abort"===e.kind?this.abort(e.jobId):"pages.workingSet"===e.kind?this.setWorkingSet(e):this.busy||this.held.length>0?this.held.push(e):this.run(e)}setWorkingSet(e){let t=this.sessions.get(vN(e.docId,e.layerName));t?.isOpen()&&t.pagePool().setWorkingSet(e.view,e.pages.map(({page:e,role:t,pixels:n})=>({pageObjectNumber:e.objectNumber,role:t,pixels:n})))}abort(e){let t=this.held.findIndex(t=>t.jobId===e);if(t<0)return void this.aborts.get(e)?.abort();this.held.splice(t,1);let n=C(new ns("aborted before it ran"));this.post(aC({kind:"reject",jobId:e,error:n},aN))}drain(){for(;!this.busy;){let e=this.takeHeld();if(!e)return;this.run(e)}}takeHeld(){let e=this.held[0];if(!e||!vA(e))return this.held.shift();let t=0,n=e;for(let e=1;et(e.page))}:r}(e,t)}}(e,this.visibleBoxesFor(e))}catch(t){this.post(aC({kind:"reject",jobId:e.jobId,error:C(t)},aN));return}let o=this.slicedWork(n);if(o)return void this.runSliced(e,n,i,o);let a=new AbortController;this.aborts.set(n.jobId,a);let s=this.transactedSession(n);try{if(this.assertNoPendingSigning(n),this.options.reportEveryFontChange){let e=this.sessionWrittenBy(n);e&&ym(this.runtime,e)}switch(s&&vO(n)&&s.beginTransaction(n.opId),this.writingSession(n)?.clearMissingCharacters(),s&&"objectNumberFloor"in n&&void 0!==n.objectNumberFloor&&s.raiseLastObjectNumber(n.objectNumberFloor-1),n.kind){case"open.fatMem":case"open.layerMemBase":case"open.layerFileBase":r=this.handleOpen(n);break;case"metadata.read":r=this.handleMetadataRead(n,a.signal);break;case"metadata.update":r=this.handleMetadataUpdate(n,a.signal);break;case"metadata.readCustom":r=this.handleMetadataReadCustom(n,a.signal);break;case"metadata.updateCustom":r=this.handleMetadataUpdateCustom(n,a.signal);break;case"actions.read":r=this.handleActionsRead(n,a.signal);break;case"outline.read":r=this.handleOutlineRead(n,a.signal);break;case"annotations.list":r=this.handleAnnotationsList(n,a.signal);break;case"annotations.create":r=this.handleAnnotationsCreate(n,a.signal);break;case"annotations.update":r=this.handleAnnotationsUpdate(n,a.signal);break;case"annotations.delete":r=this.handleAnnotationsDelete(n,a.signal);break;case"annotations.reorder":r=this.handleAnnotationsReorder(n,a.signal);break;case"document.apply":r=this.handleDocumentApply(n,a.signal);break;case"document.applyChanges":r=this.handleDocumentApplyChanges(n,a.signal);break;case"signatures.list":r=this.handleSignaturesList(n);break;case"signatures.contents":r=this.handleSignaturesContents(n);break;case"signatures.digest":r=this.handleSignaturesDigest(n);break;case"signatures.revisionBytes":r=this.handleSignaturesRevisionBytes(n);break;case"document.version":r=this.handleDocumentVersion(n);break;case"signatures.prepare":r=this.handleSignaturesPrepare(n);break;case"signatures.complete":r=this.handleSignaturesComplete(n);break;case"signatures.cancel":r=this.handleSignaturesCancel(n);break;case"signatures.validationInfo":r=this.handleSignaturesValidationInfo(n);break;case"signatures.addValidationInfo":r=this.handleSignaturesAddValidationInfo(n,a.signal);break;case"signatures.analyze":r=this.handleSignaturesAnalyze(n);break;case"signatures.finalizeCandidate":r=this.handleSignaturesFinalizeCandidate(n);break;case"forms.list":r=this.handleFormsList(n,a.signal);break;case"forms.setValue":r=this.handleFormsSetValue(n,a.signal);break;case"forms.reset":r=this.handleFormsReset(n,a.signal);break;case"forms.export":r=this.handleFormsExport(n,a.signal);break;case"forms.import":r=this.handleFormsImport(n,a.signal);break;case"forms.importValues":r=this.handleFormsImportValues(n,a.signal);break;case"forms.repair":r=this.handleFormsRepair(n,a.signal);break;case"forms.createField":r=this.handleFormsCreateField(n,a.signal);break;case"forms.updateField":r=this.handleFormsUpdateField(n,a.signal);break;case"forms.setSignatureAppearance":r=this.handleFormsSetSignatureAppearance(n,a.signal);break;case"forms.deleteField":r=this.handleFormsDeleteField(n,a.signal);break;case"forms.addWidget":r=this.handleFormsAddWidget(n,a.signal);break;case"forms.detachWidget":r=this.handleFormsDetachWidget(n,a.signal);break;case"forms.updateWidget":r=this.handleFormsUpdateWidget(n,a.signal);break;case"forms.deleteWidget":r=this.handleFormsDeleteWidget(n,a.signal);break;case"forms.reorderWidgets":r=this.handleFormsReorderWidgets(n,a.signal);break;case"forms.reorderCalculations":r=this.handleFormsReorderCalculations(n,a.signal);break;case"pages.list":r=this.handlePagesList(n,a.signal);break;case"pages.setName":r=this.handlePagesSetName(n,a.signal);break;case"annotations.flatten":r=this.handleAnnotationsFlatten(n,a.signal);break;case"annotations.exportAppearance":r=this.handleAnnotationsExportAppearance(n,a.signal);break;case"annotations.readAppearance":r=this.handleAnnotationsReadAppearance(n,a.signal);break;case"annotations.export":r=this.handleAnnotationsExport(n,a.signal);break;case"annotations.import":r=this.handleAnnotationsImport(n,a.signal);break;case"pages.removeName":r=this.handlePagesRemoveName(n,a.signal);break;case"pages.flatten":r=this.handlePagesFlatten(n,a.signal);break;case"redaction.apply":r=this.handleRedactionApply(n,a.signal);break;case"pages.extract":r=this.handlePagesExtract(n,a.signal);break;case"attachments.list":r=this.handleAttachmentsList(n,a.signal);break;case"attachments.readFile":r=this.handleAttachmentsReadFile(n,a.signal);break;case"measure.setScale":r=this.handleMeasureSetScale(n,a.signal);break;case"pieceInfo.read":r=this.handlePieceInfoRead(n,a.signal);break;case"pieceInfo.update":r=this.handlePieceInfoUpdate(n,a.signal);break;case"pieceInfo.applications":r=this.handlePieceInfoApplications(n,a.signal);break;case"pieceInfo.delete":r=this.handlePieceInfoDelete(n,a.signal);break;case"document.saveBuffer":r=this.handleDocumentSaveBuffer(n);break;case"document.saveLayerBuffer":r=this.handleDocumentSaveLayerBuffer(n);break;case"document.saveFile":r=this.handleDocumentSaveFile(n);break;case"document.probeSecurityFile":r=this.handleDocumentProbeSecurityFile(n);break;case"document.checkPasswordPermissions":r=this.handleDocumentCheckPasswordPermissions(n);break;case"fonts.register":r=this.handleFontsRegister(n);break;case"fonts.addFallback":r=this.handleFontsAddFallback(n);break;case"fonts.clearFallbacks":r=this.handleFontsClearFallbacks(n);break;case"fonts.clear":r=this.handleFontsClear(n);break;case"fonts.authorizeEditing":r=this.handleFontsAuthorizeEditing(n);break;case"fonts.list":r=aC({tag:"fonts.list",engineFonts:this.fonts.engineFontFacts(),fallbacks:this.fonts.fallbackKeys()});break;case"fonts.program":r=this.handleFontsProgram(n);break;case"document.setFontSettings":r=this.handleDocumentSetFontSettings(n);break;case"document.fonts.list":r=this.handleDocumentFontsList(n);break;case"document.fonts.resolve":r=this.handleDocumentFontsResolve(n);break;case"document.fonts.program":r=this.handleDocumentFontsProgram(n);break;case"objectNumbers.reserve":r=aC({tag:"objectNumbers.reserve",range:this.requireSession(n).reserveObjectNumbers(n.count)});break;case"layer.close":r=this.handleLayerClose(n);break;case"close":r=this.handleClose(n);break;case"shutdown":r=this.handleShutdown(n);break;default:throw new N(G.InvalidArg,`unknown request kind: ${n.kind}`)}s?.inTransaction()&&s.commitTransaction(),this.resolve(n,r)}catch(t){s?.inTransaction()&&s.abortTransaction();let e=C(t);this.post(aC({kind:"reject",jobId:n.jobId,error:e},aN))}finally{this.aborts.delete(n.jobId),this.closePagesChangedBy(e,i)}}writingSession(e){if(!vO(e)||!("docId"in e))return;let t="layerName"in e?e.layerName:void 0,n=this.sessions.get(vN(e.docId,t));return n?.isOpen()?n:void 0}sessionWrittenBy(e){if(!("docId"in e)||"write"!==e.effect&&"contentWrite"!==e.effect)return;let t="layerName"in e?e.layerName:void 0,n=this.sessions.get(vN(e.docId,t));return n?.isOpen()?n:void 0}transactedSession(e){if(!vO(e))return;let t="layerName"in e?e.layerName:void 0,n=this.sessions.get(vN(e.docId,t));if(n?.isOpen()&&"layer"===n.kind)return n.assertUsable(),n}closePagesChangedBy(e,t){if("runtime"===t)return void this.residency.closeIdle();if("document"!==t||!("docId"in e))return;let n="layerName"in e?e.layerName:void 0;this.sessions.get(vN(e.docId,n))?.pagePool().closeIdle()}resolve(e,t){let n=function(e,t){var n,r,i,o;let a=e=>n6(e,t(e.page),t),s=e=>e.map(e=>i4(e,t));switch(e.tag){case"pages.list":return{...e,snapshot:i1(e.snapshot)};case"pages.setName":case"pages.removeName":case"measure.setScale":return{...e,result:{...e.result,layout:i1(e.result.layout)}};case"pages.geometry":return{...e,snapshot:(n=e.snapshot,r=t(e.page),{...n,runs:n.runs.map(e=>{let t=e.glyphs.some(e=>!e.empty)?nE(e.rect,r):ru;return nS(e)?{...e,rect:t,glyphs:e.glyphs.map(({loose:e,tight:t,...n})=>({...n,loose:n.empty?rd:nv(e,r),...t?{tight:nv(t,r)}:{}}))}:{...e,rect:t,glyphs:e.glyphs.map(({loose:e,tight:t,...n})=>({...n,loose:n.empty?ru:nE(e,r),...t?{tight:nE(t,r)}:{}}))}})})};case"pages.render":return{...e,area:nE(e.area,t(e.page))};case"search.query":return{...e,slice:(i=e.slice,{...i,matches:i.matches.map(e=>{let n=t(e.page);return{...e,segments:e.segments.map(e=>({...e,quad:nv(e.quad,n),rect:nE(e.rect,n)}))}})})};case"annotations.renderAppearances":{let n=i3(e.result.appearances,t(e.page));return{...e,result:{...e.result,appearances:n}}}case"annotations.renderAppearancesEncoded":{let n=i3(e.result.appearances,t(e.page));return{...e,result:{...e.result,appearances:n}}}case"actions.read":return{...e,snapshot:function(e,t){let{nameTreeScripts:n,openAction:r,openDestination:i,...o}=e;return{...nJ(o,t),nameTreeScripts:n.map(e=>({...e,action:nK(e.action,t)})),openAction:r?nK(r,t):null,..."openDestination"in e?{openDestination:i?t(i):i}:{}}}(e.snapshot,e=>nW(e,t))};case"outline.read":return{...e,outline:(o=e.outline,{...o,items:o.items.map(e=>i9(e,t))})};case"annotations.list":return{...e,list:{...e.list,annotations:e.list.annotations.map(a)}};case"annotations.create":case"annotations.update":return{...e,result:{...e.result,annotation:a(e.result.annotation)}};case"document.apply":case"document.applyChanges":default:return e;case"annotations.import":return{...e,result:{...e.result,annotations:e.result.annotations.map(a)}};case"measure.viewports":return{...e,viewports:n0(e.viewports,t(e.page))};case"forms.list":return{...e,snapshot:i8(e.snapshot,t)};case"forms.import":return{...e,result:{...e.result,fields:e.result.fields.map(e=>i5(e,t)),widgets:s(e.result.widgets)}};case"forms.importValues":return{...e,result:{...e.result,fields:e.result.fields.map(e=>i5(e,t)),widgets:s(e.result.widgets)}};case"forms.setValue":case"forms.createField":case"forms.updateField":case"forms.setSignatureAppearance":case"forms.addWidget":case"forms.detachWidget":return{...e,result:{...e.result,field:i5(e.result.field,t),widgets:s(e.result.widgets)}};case"forms.reset":return{...e,result:{...e.result,fields:e.result.fields.map(e=>i5(e,t)),widgets:s(e.result.widgets)}};case"forms.updateWidget":return{...e,result:{...e.result,widget:i4(e.result.widget,t)}};case"forms.deleteWidget":return{...e,result:{...e.result,field:e.result.field&&i5(e.result.field,t)}}}}(t.payload,this.visibleBoxesFor(e));this.post(aC({kind:"resolve",jobId:e.jobId,result:n},t.transfer))}visibleBoxesFor(e){let t=null;return n=>{if(!("docId"in e))throw new N(G.InvalidArg,`${e.kind} has no document`);return t??(t=gF(this.runtime,this.requireSession(e))),t(n)}}handleOpen(e){let t,n=vN(e.docId,"open.fatMem"===e.kind?void 0:e.layerName);if(this.sessions.has(n))throw new N(G.InvalidArg,`document session already open: ${n}`);let r=new Fu(this.runtime);if(r.residency=this.residency,r.signedDocumentPolicy=e.signedDocumentPolicy??"protect",r.password=e.password,r.objectNumberAuthority=e.objectNumbers??"session","open.fatMem"===e.kind){let n=new Uint8Array(e.bytes);t=e=>this.openBytesAsLayer(r,n,e)}else if("open.layerMemBase"===e.kind){let n=new Uint8Array(e.baseBytes);t=t=>{let i=this.baseDocuments.acquireMemoryBase({key:e.baseKey,bytes:n,password:t,knownSha256:e.baseSha256});r.openFromHandle(h9(this.runtime,i,e.layer,t))}}else{if("native"!==this.runtime.kind)throw new N(G.NotImplemented,"\'layerFile\' needs the native Node runtime; open the file\'s bytes instead");t=t=>{let n=this.baseDocuments.acquireFileBase({key:e.baseKey,path:e.basePath,password:t,knownSha256:e.baseSha256});r.openFromHandle(h9(this.runtime,n,e.layer,t))}}try{t(e.password)}catch(o){var i;if(!((i=o)instanceof N&&(i.code===G.DocPasswordRequired||i.code===G.DocPasswordIncorrect)))throw o;return r.parkLocked(t),this.sessions.set(n,r),aC({tag:"open",docId:e.docId,security:{encryptionState:"encrypted",encryptionRequiresPassword:!0,securityHandlerRevision:null,pdfPermissionsBits:null,pdfPermissionsAllAllowed:null,pdfOpenedAs:null,securityProbedAt:Date.now()},...e.password?{passwordRejected:!0}:{}})}return this.sessions.set(n,r),aC({tag:"open",docId:e.docId,security:new AH(this.runtime).checkPasswordPermissions(r,e.password??""),protection:this.probeProtection(r),...e.reserveObjectNumbers?{objectNumbers:r.reserveObjectNumbers(e.reserveObjectNumbers)}:{},lastObjectNumber:r.lastObjectNumber()})}openBytesAsLayer(e,t,n){let r=this.baseDocuments.acquireMemoryBase({key:`bytes-open:${iX()}`,bytes:t,password:n});e.openFromHandle(h9(this.runtime,r,{kind:"fresh"},n)),e.persistLayerArtifact=!1}probeProtection(e){try{return new wR(this.runtime,e).readProtection()}catch{return null}}handleSignaturesList(e){let t=this.requireSession(e);return aC({tag:"signatures.list",snapshot:e.workingCopy?new vo(this.runtime,t).readWorkingCopySnapshot():new wR(this.runtime,t).readSnapshot()})}handleSignaturesContents(e){let t=this.requireSession(e),n=new wR(this.runtime,t).readContents(e.ref);return aC({tag:"signatures.contents",bytes:n},[n])}handleSignaturesDigest(e){let t=this.requireSession(e),n=new wR(this.runtime,t).digest(e.ref,e.algorithm);return aC({tag:"signatures.digest",digest:n},[n])}handleSignaturesRevisionBytes(e){let t=this.requireSession(e),n=new wR(this.runtime,t).revisionBytes(e.revisionIndex);return aC({tag:"signatures.revisionBytes",bytes:n,size:n.byteLength},[n])}handleDocumentVersion(e){let t=this.requireSession(e);return aC({tag:"document.version",version:new wR(this.runtime,t).version()})}handleSignaturesPrepare(e){let t=this.requireSession(e);return aC({tag:"signatures.prepare",result:new ve(this.runtime,t,this.baseDocuments,this.options.signingCandidatePath).prepare(e.input,e.authority),fieldObjectNumber:t.pendingSigning.fieldObjectNumber})}handleSignaturesComplete(e){let t=this.requireSession(e),n=new ve(this.runtime,t,this.baseDocuments,this.options.signingCandidatePath).complete(e.input,e.opId,e.authority);return"already-completed"===n.status?aC({tag:"signatures.complete",result:n}):this.finishMutation(t,{tag:"signatures.complete",result:n},e.artifactPath)}handleSignaturesValidationInfo(e){let t=this.requireSession(e),n=new vl(this.runtime,t).read(),r=e=>e.buffer,i=n.certificates.map(r),o=n.ocspResponses.map(r),a=n.crls.map(r);return aC({tag:"signatures.validationInfo",certificates:i,ocspResponses:o,crls:a},[...i,...o,...a])}handleSignaturesAddValidationInfo(e,t){let n=this.requireSession(e),r=new vu(this.runtime,n).add({certificates:e.certificates.map(e=>new Uint8Array(e)),ocspResponses:e.ocspResponses.map(e=>new Uint8Array(e)),crls:e.crls.map(e=>new Uint8Array(e))},t),i={tag:"signatures.addValidationInfo",result:r};return Object.values(r.added).some(e=>e>0)?this.finishMutation(n,i,e.artifactPath):aC(i)}handleSignaturesAnalyze(e){let t=this.requireSession(e);return aC({tag:"signatures.analyze",analysis:new vo(this.runtime,t).analyze(e.input)})}handleSignaturesFinalizeCandidate(e){return aC({tag:"signatures.finalizeCandidate",...new vd(this.runtime,this.baseDocuments).finalize({path:e.path,byteRange:e.byteRange,contentsSizeBytes:e.contentsSizeBytes,fieldObjectNumber:e.fieldObjectNumber,cms:new Uint8Array(e.cms),password:e.password??null})})}handleSignaturesCancel(e){let t=this.requireSession(e);return aC({tag:"signatures.cancel",result:new ve(this.runtime,t,this.baseDocuments,this.options.signingCandidatePath).cancel(e.signingId)})}assertNoPendingSigning(e){if(!vO(e))return;let t="layerName"in e?e.layerName:void 0,n=this.sessions.get(vN(e.docId,t));if(n?.pendingSigning)throw new N(G.SigningPending,`a signing is pending (${n.pendingSigning.prepared.signingId}); complete or cancel it before mutating the document`)}handleMetadataRead(e,t){let n=this.requireSession(e);return aC({tag:"metadata.read",metadata:new FF(this.runtime,n).read(t)})}handleMetadataUpdate(e,t){let n=this.requireSession(e),{type:r,skipped:i,...o}=this.applyOne(n,e.opId,{type:"metadata.update",patch:e.patch},vk(),t);return this.finishMutation(n,{tag:"metadata.update",result:o},e.artifactPath)}handleMetadataReadCustom(e,t){let n=this.requireSession(e);return aC({tag:"metadata.readCustom",custom:new FF(this.runtime,n).readCustom(t)})}handleMetadataUpdateCustom(e,t){let n=this.requireSession(e),{type:r,skipped:i,...o}=this.applyOne(n,e.opId,{type:"metadata.updateCustom",patch:e.patch},vk(),t);return this.finishMutation(n,{tag:"metadata.updateCustom",result:o},e.artifactPath)}handleActionsRead(e,t){let n=this.requireSession(e);return aC({tag:"actions.read",snapshot:new v_(this.runtime,n).read(t)})}handleOutlineRead(e,t){let n=this.requireSession(e);return aC({tag:"outline.read",outline:new E9(this.runtime,n).read(t)})}handleAnnotationsList(e,t){let n=this.requireSession(e),r=e.pages?.map(e=>n.resolvePageRef(e).pageObjectNumber);return aC({tag:"annotations.list",list:new DP(this.runtime,n,this.fonts).list(r,t,"annotations")})}async handleAnnotationsRenderAppearances(e,t){let n=this.requireSession(e),r=n.resolvePageRef(e.page).pageObjectNumber,i=await new DF(this.runtime,n).render(r,e.family,e.options??{},t,this.slices),o=i.appearances.map(e=>e.raster.data);return aC({tag:"annotations.renderAppearances",page:e.page,result:i},o)}handleAnnotationsCreate(e,t){let n=this.requireSession(e),{type:r,page:i,...o}=this.applyOne(n,e.opId,{type:"annotations.create",page:e.page,data:e.draft,...e.resources?{resources:e.resources}:{},...void 0!==e.objectNumber?{objectNumber:e.objectNumber}:{}},vk(e.actor),t);return this.finishMutation(n,{tag:"annotations.create",result:o},e.artifactPath)}handleAnnotationsUpdate(e,t){let n=this.requireSession(e),{type:r,page:i,skipped:o,...a}=this.applyOne(n,e.opId,{type:"annotations.update",ref:e.ref,patch:e.patch,...e.resources?{resources:e.resources}:{}},{...e.authority,protection:null},t);return this.finishMutation(n,{tag:"annotations.update",result:a},e.artifactPath)}handleAnnotationsDelete(e,t){let n=this.requireSession(e),{type:r,page:i,...o}=this.applyOne(n,e.opId,{type:"annotations.delete",ref:e.ref},{...e.authority,protection:null},t);return this.finishMutation(n,{tag:"annotations.delete",result:o},e.artifactPath)}handleAnnotationsFlatten(e,t){let n=this.requireSession(e),r=n.resolvePageRef(e.page).pageObjectNumber,i=new yE(this.runtime,n).flatten(r,e.refs,e.usage,t),o=i.meta.affectedPages.length>0;return o?this.finishMutation(n,{tag:"annotations.flatten",result:i,wrote:o},e.artifactPath):aC({tag:"annotations.flatten",result:i,wrote:o})}handleAnnotationsExportAppearance(e,t){let n=this.requireSession(e),r=n.resolvePageRef(e.page).pageObjectNumber,i=new yE(this.runtime,n).exportAppearance(r,e.refs,t);return aC({tag:"annotations.exportAppearance",bytes:i.bytes,size:i.size},[i.bytes])}handleAnnotationsExport(e,t){let n=this.requireSession(e),r=new yG(this.runtime,n,this.fonts).export(e.selection,e.limits??nI,t);return aC({tag:"annotations.export",bundle:r},Object.values(r.resources))}handleAnnotationsImport(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"annotations.import",bundle:e.bundle,...void 0!==e.pages?{pages:e.pages}:{},attribution:e.attribution,...e.actor?{actor:e.actor}:{},limits:e.limits??nI},vk(e.actor),t);return 0===i.annotations.length?aC({tag:"annotations.import",result:i}):this.finishMutation(n,{tag:"annotations.import",result:i},e.artifactPath)}handleAnnotationsReadAppearance(e,t){let n=this.requireSession(e),r=n.resolvePageRef(e.page).pageObjectNumber,i=new yE(this.runtime,n).readAppearance(r,e.ref,t);return aC({tag:"annotations.readAppearance",bytes:i.bytes,size:i.size},[i.bytes])}handleAnnotationsReorder(e,t){let n=this.requireSession(e),{type:r,page:i,...o}=this.applyOne(n,e.opId,{type:"annotations.reorder",page:e.page,refs:e.refs,position:e.position},{...e.authority,protection:null},t);return this.finishMutation(n,{tag:"annotations.reorder",result:o},e.artifactPath)}handleDocumentApply(e,t){let n=this.requireSession(e);!function(e){if(iS(e))return;let t={"annotations.import":"doc.annotations.import","forms.import":"doc.forms.import","forms.importValues":"doc.forms.importValues"},n=e.ops.find(({type:e})=>e in t);if(n)throw new N(G.InvalidArg,`doc.apply takes no import: import a bundle with ${t[n.type]}`)}(e.change);let r=oZ(e.change),i=AW(n).outcome(e.opId);if(i)return aC({tag:"document.apply",result:this.replayed(i,r,e.opId),replayed:!0});let o=this.recorded(n,e.opId,r,()=>this.runChange(n,e,t)),a={tag:"document.apply",result:o,replayed:!1};return o.items.some(iv)?this.finishMutation(n,a,e.artifactPath):aC(a)}applyOne(e,t,n,r,i){let o={ops:[n]},a=AW(e),s=oZ(o),l=a.outcome(t),u=(l?this.replayed(l,s,t):this.recorded(e,t,s,()=>new A$(this.runtime,e,this.fonts).apply(o.ops,r,i,AL))).items[0];if(!u||iA(u))throw new N(G.Unknown,`${n.type} wrote nothing`);return u}replayed(e,t,n){if(e.fingerprint!==t)throw new N(G.IdempotencyKeyReused,`opId ${n} already answered a different change`);if("refused"===e.kind){var r;throw new N((r=e.error).code,r.message,{details:r.details})}return e.result}recorded(e,t,n,r){let i=AW(e);try{let o=r(),a=vG(e,o);return i.keepApplied(t,n,a,a.meta.undoable?o.record:null),a}catch(e){var o;throw N.is(e)&&(o=e.code,oK.has(o))&&i.keepRefused(t,n,C(e)),e}}handleDocumentApplyChanges(e,t){let n=this.requireSession(e);n.assertUsable(),void 0!==e.objectNumberFloor&&n.raiseLastObjectNumber(e.objectNumberFloor-1);let r=new A$(this.runtime,n,this.fonts,e.limits),i=this.pageSpaceOf(n),o=new Map,a=[];for(let l of e.changes){n.beginTransaction(l.opId);try{let e=function(e,t,n,r,i){let{change:o,authority:a}=t;if(!iS(o))return e.apply(o.ops,a,r,i);let s=a.identity.userId??null,l=n.has(o.undoOf)?n.get(o.undoOf):t.record;if(void 0===l)throw new N(G.UndoUnavailable,`change ${o.undoOf} can no longer be undone`,{details:{reason:"expired"}});return l?e.undo(l,a,r,i):{items:[],record:{userId:s,steps:[]}}}(r,l,o,t,i),s=vG(n,e);n.commitTransaction();let u=s.meta.undoable?e.record:null;o.set(l.opId,u),a.push({opId:l.opId,status:"applied",result:s,record:u})}catch(e){var s;if(n.inTransaction()&&n.abortTransaction(),!N.is(e)||(s=e.code,!oK.has(s)))throw e;o.set(l.opId,null),a.push({opId:l.opId,status:"refused",error:C(e)})}}let l={tag:"document.applyChanges",outcomes:a};return a.some(e=>"applied"===e.status&&e.result.items.some(iv))?this.finishMutation(n,l,e.artifactPath):aC(l)}pageSpaceOf(e){return{opInFileSpace:t=>(function(e,t){switch(e.type){case"annotations.import":case"forms.import":case"forms.importValues":case"annotations.copy":case"forms.copy":case"forms.repeat":case"pages.setScale":default:return e;case"annotations.create":return{...e,data:n5(e.data,t(e.page),t)};case"annotations.update":{let n=t(e.ref.page),{expect:r,...i}=e;return{...i,patch:n4(e.patch,n,t),...r?{expect:n4(r,n,t)}:{}}}case"annotations.delete":{let{expect:n,...r}=e;return n?{...r,expect:n4(n,t(e.ref.page),t)}:r}case"forms.create":return{...e,draft:i6(e.draft,t)};case"forms.addWidget":return{...e,placement:i2(e.placement,t)};case"forms.updateWidget":{let n=t(e.widget.page),{expect:r,...i}=e;return{...i,patch:vD(e.patch,n,t),...r?{expect:vD(r,n,t)}:{}}}case"forms.deleteWidget":{let{expect:n,...r}=e;return n?{...r,expect:vD(n,t(e.widget.page),t)}:r}case"outline.create":var n;return{...e,data:(n=e.data,i7(n,e=>nq(e,t)))};case"outline.update":{let{expect:n,...r}=e;return{...r,patch:oe(e.patch,t),...n?{expect:oe(n,t)}:{}}}case"outline.delete":{let{expect:n,...r}=e;return n?{...r,expect:oe(n,t)}:r}}})(t,gF(this.runtime,e)),itemOut:t=>(function(e,t){if(iA(e))return e;let n=e=>n6(e,t(e.page),t),r=e=>e.map(e=>i4(e,t));switch(e.type){case"annotations.create":case"annotations.update":return{...e,annotation:n(e.annotation)};case"annotations.restore":case"annotations.import":case"annotations.copy":return{...e,annotations:e.annotations.map(n)};case"forms.setValue":case"forms.setDisplay":case"forms.setAppearanceText":case"forms.setSignatureAppearance":case"forms.setButtonImage":case"forms.create":case"forms.update":case"forms.restore":case"forms.addWidget":case"forms.removeWidget":return{...e,field:i5(e.field,t),widgets:r(e.widgets)};case"forms.reset":case"forms.import":case"forms.importValues":case"forms.copy":case"forms.repeat":return{...e,fields:e.fields.map(e=>i5(e,t)),widgets:r(e.widgets)};case"forms.updateWidget":return{...e,widget:i4(e.widget,t)};case"forms.deleteWidget":return{...e,field:e.field&&i5(e.field,t)};case"forms.restoreWidget":return{...e,field:e.field&&i5(e.field,t),widgets:r(e.widgets)};case"outline.create":case"outline.update":return{...e,item:i9(e.item,t)};case"outline.restore":return{...e,items:e.items.map(e=>i9(e,t))};case"pages.rotate":case"pages.setScale":case"pages.reorder":case"pages.delete":case"pages.insertBlank":case"pages.insert":case"pages.copy":case"pages.restore":return{...e,layout:i1(e.layout)};default:return e}})(t,gF(this.runtime,e))}}runChange(e,t,n){let r=new A$(this.runtime,e,this.fonts),i=this.pageSpaceOf(e),o=t.authority.identity.userId??null;if(!iS(t.change))return r.apply(t.change.ops,t.authority,n,i);let a=AW(e).record(t.change.undoOf);if(!a||"unavailable"in a)throw new N(G.UndoUnavailable,`change ${t.change.undoOf} can no longer be undone`,{details:{reason:a?a.unavailable:"expired"}});if(!a.record)return{items:[],record:{userId:o,steps:[]}};if(null!==a.record.userId&&a.record.userId!==o)throw new na("changes:undo","target");return r.undo(a.record,t.authority,n,i)}handlePagesList(e,t){let n=this.requireSession(e);return aC({tag:"pages.list",snapshot:new gh(this.runtime,n).read(t)})}handlePagesSetName(e,t){let n=this.requireSession(e),r=new gw(this.runtime,n).setName({name:e.name,page:e.page,...void 0!==e.replace?{replace:e.replace}:{}},t);return this.finishMutation(n,{tag:"pages.setName",result:r},e.artifactPath)}handlePagesRemoveName(e,t){let n=this.requireSession(e),r=new gw(this.runtime,n).removeName({name:e.name},t);return this.finishMutation(n,{tag:"pages.removeName",result:r},e.artifactPath)}handlePagesFlatten(e,t){let n=this.requireSession(e),r=new gO(this.runtime,n).flatten(e.pages,e.usage,t),i=r.meta.affectedPages.length>0;return i?this.finishMutation(n,{tag:"pages.flatten",result:r,wrote:i},e.artifactPath):aC({tag:"pages.flatten",result:r,wrote:i})}handleRedactionApply(e,t){let n=this.requireSession(e),r=new gB(this.runtime,n).apply(e.scope,t),i=r.meta.affectedPages.length>0;return i?this.finishMutation(n,{tag:"redaction.apply",result:r,wrote:i},e.artifactPath):aC({tag:"redaction.apply",result:r,wrote:i})}handlePagesExtract(e,t){let n=this.requireSession(e),r=new gE(this.runtime,n).extract(e.pages,e.flatten,t);return aC({tag:"pages.extract",bytes:r.bytes,size:r.size},[r.bytes])}handleDocumentFontsList(e){let t=this.requireSession(e);return ym(this.runtime,t),aC({tag:"document.fonts.list",facts:new yl(this.runtime,t,this.fonts).facts()})}handleDocumentFontsResolve(e){let t=new yl(this.runtime,this.requireSession(e),this.fonts),n=t.facts(),{runs:r,missingCharacters:i}=t.resolve(e.annotation,e.runs,n);return aC({tag:"document.fonts.resolve",runs:r,missingCharacters:i,facts:n})}handleDocumentFontsProgram(e){let t=new yl(this.runtime,this.requireSession(e),this.fonts).program(e.displaySha256,"data"===e.part),n=t.bytes?t.bytes.buffer.slice(t.bytes.byteOffset,t.bytes.byteOffset+t.bytes.byteLength):null;return aC({tag:"document.fonts.program",covers:t.covers,ascent:t.ascent,descent:t.descent,bytes:n},n?[n]:[])}handleAttachmentsList(e,t){let n=this.requireSession(e);return aC({tag:"attachments.list",attachments:new wp(this.runtime,n).list(t)})}handleAttachmentsReadFile(e,t){let n=this.requireSession(e),r=new wp(this.runtime,n).readFile(e.ref,e.path,e.maxDecodedBytes,t);return aC({tag:"attachments.readFile",content:r},void 0!==r.bytes?[r.bytes]:[])}async handleAnnotationsReadFile(e,t){let n=this.requireSession(e),r=await new wp(this.runtime,n).readAnnotationFile(n.resolvePageRef(e.page).pageObjectNumber,e.ref,e.path,e.maxDecodedBytes,t,this.slices);return aC({tag:"annotations.readFile",content:r},void 0!==r.bytes?[r.bytes]:[])}async handleMeasureViewports(e,t){let n=this.requireSession(e),r=new vy(this.runtime,n).viewports(n.resolvePageRef(e.page).pageObjectNumber,t);return aC({tag:"measure.viewports",page:e.page,viewports:r})}handleMeasureSetScale(e,t){let n=this.requireSession(e);return new Aj(this.runtime,n).setScale(n.resolvePageRef(e.page).pageObjectNumber,e.measure,t),this.finishMutation(n,{tag:"measure.setScale",result:{page:e.page,layout:new gh(this.runtime,n).read(t),meta:{affectedPages:[],cacheDelta:null,...n.writeStamp()}}},e.artifactPath)}handlePieceInfoRead(e,t){let n=this.requireSession(e);return aC({tag:"pieceInfo.read",snapshot:new vw(this.runtime,n,e.page?n.resolvePageRef(e.page).pageObjectNumber:void 0).read(e.application,t)})}handlePieceInfoUpdate(e,t){let n=this.requireSession(e),r=new vw(this.runtime,n,e.page?n.resolvePageRef(e.page).pageObjectNumber:void 0);r.update(e.application,e.patch,t);let i={pieceInfo:r.read(e.application,t),meta:{affectedPages:[],cacheDelta:null,...n.writeStamp()}};return this.finishMutation(n,{tag:"pieceInfo.update",result:i},e.artifactPath)}handlePieceInfoApplications(e,t){let n=this.requireSession(e);return aC({tag:"pieceInfo.applications",applications:new vw(this.runtime,n,e.page?n.resolvePageRef(e.page).pageObjectNumber:void 0).applications(t)})}handlePieceInfoDelete(e,t){let n=this.requireSession(e);new vw(this.runtime,n,e.page?n.resolvePageRef(e.page).pageObjectNumber:void 0).delete(e.application,t);let r={meta:{affectedPages:[],cacheDelta:null,...n.writeStamp()}};return this.finishMutation(n,{tag:"pieceInfo.delete",result:r},e.artifactPath)}async handlePagesText(e,t){let n=this.requireSession(e),r=new gL(this.runtime,n),i=n.resolvePageRef(e.page).pageObjectNumber;return aC({tag:"pages.text",snapshot:await r.read(i,t,this.slices)})}async handlePagesGeometry(e,t){let n=this.requireSession(e),r=new gz(this.runtime,n),i=n.resolvePageRef(e.page).pageObjectNumber,o=await r.read(i,t,this.slices);return aC({tag:"pages.geometry",page:e.page,snapshot:o})}async handleSearchQuery(e,t){let n=this.requireSession(e);return aC({tag:"search.query",slice:await new vh(this.runtime,n).query(e.request,t,this.slices)})}async handlePagesRender(e,t){let n=this.requireSession(e),{raster:r,area:i}=await new gZ(this.runtime,n).render(n.resolvePageRef(e.page).pageObjectNumber,e.options??{},t,this.slices);return aC({tag:"pages.render",page:e.page,area:i,raster:r},[r.data])}slicedWork(e){switch(e.kind){case"pages.render":return{pdfium:t=>this.handlePagesRender(e,t)};case"pages.renderEncoded":return{pdfium:t=>this.handlePagesRender({...e,kind:"pages.render"},t),encode:(t,n)=>this.encodeRendered(t,e.encode,n)};case"document.renderPageFile":return{pdfium:t=>this.handleDocumentRenderPageFile(e,t)};case"document.renderPageFileEncoded":return{pdfium:t=>this.handleDocumentRenderPageFile({...e,kind:"document.renderPageFile"},t),encode:(t,n)=>this.encodeRendered(t,e.encode,n)};case"annotations.renderAppearances":return{pdfium:t=>this.handleAnnotationsRenderAppearances(e,t)};case"annotations.renderAppearancesEncoded":return{pdfium:t=>this.handleAnnotationsRenderAppearances({...e,kind:"annotations.renderAppearances"},t),encode:(t,n)=>this.encodeAppearances(t,e.page,e.encode,n)};case"pages.text":return{pdfium:t=>this.handlePagesText(e,t)};case"pages.geometry":return{pdfium:t=>this.handlePagesGeometry(e,t)};case"measure.viewports":return{pdfium:t=>this.handleMeasureViewports(e,t)};case"annotations.readFile":return{pdfium:t=>this.handleAnnotationsReadFile(e,t)};case"search.query":return{pdfium:t=>this.handleSearchQuery(e,t)};default:return null}}async runSliced(e,t,n,r){if(r.encode&&!this.options.imageEncoder)return void this.post(aC({kind:"reject",jobId:t.jobId,error:C(new N(G.NotImplemented,vC))},aN));let i=new AbortController;this.aborts.set(t.jobId,i),this.busy=!0;try{let e;try{e=await r.pdfium(i.signal)}finally{this.busy=!1,queueMicrotask(()=>this.drain())}this.resolve(t,r.encode?await r.encode(e,i.signal):e)}catch(e){this.post(aC({kind:"reject",jobId:t.jobId,error:C(e)},aN))}finally{this.aborts.delete(t.jobId),this.closePagesChangedBy(e,n)}}async encodeRaster(e,t,n){let r=this.options.imageEncoder;if(!r)throw new N(G.NotImplemented,vC);let{bytes:i,mimeType:o}=await r.encode(e,t);if(n.aborted)throw new N(G.Aborted,"aborted during image encode");return{mimeType:o,width:e.width,height:e.height,bytes:i}}async encodeRendered(e,t,n){let{payload:r}=e;if("pages.render"===r.tag){let e=await this.encodeRaster(r.raster,t,n);return aC({tag:"pages.renderEncoded",image:e},[e.bytes.buffer])}if("document.renderPageFile"===r.tag){let e=await this.encodeRaster(r.raster,t,n);return aC({tag:"document.renderPageFileEncoded",page:r.page,pageCount:r.pageCount,image:e},[e.bytes.buffer])}throw new N(G.WireFormat,`unexpected ${r.tag}`)}async encodeAppearances(e,t,n,r){if("annotations.renderAppearances"!==e.payload.tag)throw new N(G.WireFormat,`unexpected ${e.payload.tag}`);let{appearances:i}=e.payload.result,o=[];for(let e of i)o.push({ref:e.ref,mode:e.mode,state:e.state,rect:e.rect,image:await this.encodeRaster(e.raster,n,r)});return aC({tag:"annotations.renderAppearancesEncoded",page:t,result:{page:e.payload.result.page,appearances:o}},o.map(e=>e.image.bytes.buffer))}assertRewriteKeepsSignatures(e,t){if("rewrite"!==t||"protect"!==e.signedDocumentPolicy)return;let n=this.probeProtection(e);if(n&&null!==n.judged)throw new N(G.ProtectedDocument,"the document is signed: a rewrite save would void every signature (use an incremental save)")}handleDocumentSaveBuffer(e){let t=this.requireSession(e);if(this.assertRewriteKeepsSignatures(t,e.mode),"incremental"===e.mode){let e=new AQ(this.runtime,t).snapshot();return aC({tag:"document.saveBuffer",bytes:e.bytes,size:e.bytes.byteLength},[e.bytes])}let n=new AQ(this.runtime,t).saveStandaloneToBuffer(e.mode);return aC({tag:"document.saveBuffer",bytes:n.bytes,size:n.size},[n.bytes])}handleDocumentSaveFile(e){let t=this.requireSession(e);return(this.assertRewriteKeepsSignatures(t,e.mode),"incremental"===e.mode&&(!t.hasUnsavedEdits()||new AQ(this.runtime,t).saveStandaloneToFileEx(e.path,e.mode).unchangedSinceLoad))?(new AQ(this.runtime,t).copyLoadedBytesToFile(e.path),aC({tag:"document.saveFile",path:e.path})):"incremental"===e.mode?aC({tag:"document.saveFile",path:e.path}):aC({tag:"document.saveFile",path:new AQ(this.runtime,t).saveStandaloneToFile(e.path,e.mode).path})}handleDocumentSaveLayerBuffer(e){let t=this.requireSession(e);if("layer"!==t.kind)throw new N(G.InvalidArg,"document has no layer to export (opened without a layer)");let n=new AQ(this.runtime,t).saveLayerArtifact();return aC({tag:"document.saveLayerBuffer",bytes:n.bytes,size:n.size},[n.bytes])}handleDocumentProbeSecurityFile(e){return aC({tag:"document.probeSecurityFile",security:new AH(this.runtime).probeFile(e.path,e.password)})}async handleDocumentRenderPageFile(e,t){let n=new Fu(this.runtime),r=this.baseDocuments.acquireFileBase({key:`adhoc-file:${e.path}`,path:e.path,password:e.password});try{n.openFromHandle(h9(this.runtime,r,{kind:"fresh"},e.password));let i=new gh(this.runtime,n).read(t),o=i.pages[e.pageIndex];if(!o)throw new N(G.NotFound,`renderPageFile: no page at index ${e.pageIndex} (pageCount=${i.pageCount})`);let{raster:a}=await new gZ(this.runtime,n).render(o.ref.objectNumber,vP(e.options??{},()=>o.pdfCropBox),t,this.slices);return aC({tag:"document.renderPageFile",page:o.ref,pageCount:i.pageCount,raster:a},[a.data])}finally{n.close()}}handleDocumentCheckPasswordPermissions(e){let t,n=this.sessions.get(vN(e.docId));return n?.isLocked()?(n.unlockWith(e.password),n.password=e.password,t=n):t=this.requireSession(e),aC({tag:"document.checkPasswordPermissions",security:new AH(this.runtime).checkPasswordPermissions(t,e.password,e.mode??"any"),protection:this.probeProtection(t)})}handleFontsRegister(e){return this.fonts.register(e.fontKey,e.familyName,e.weight,e.italic,new Uint8Array(e.data),e.builtIn??!1),aC({tag:"fonts.register",fontKey:e.fontKey,identity:this.fonts.describe(e.fontKey)})}handleFontsAuthorizeEditing(e){return aC({tag:"fonts.authorizeEditing",identity:this.fonts.authorizeEditing(e.fontKey)})}handleDocumentSetFontSettings(e){let t=this.requireSession(e).requireDocPtr(),{fn:n}=this.runtime;if(void 0!==e.embeddingPolicy){let r={default:0,subset:1,full:2}[e.embeddingPolicy];if(!n.EPDFDoc_SetFontEmbeddingPolicy(t,r))throw new N(G.InvalidArg,"EPDFDoc_SetFontEmbeddingPolicy failed")}if(void 0!==e.typographicFeatures&&!n.EPDFDoc_SetTypographicFeatures(t,e.typographicFeatures))throw new N(G.InvalidArg,"EPDFDoc_SetTypographicFeatures failed");return aC({tag:"document.setFontSettings"})}handleFontsAddFallback(e){return this.fonts.addFallback(e.fontKey,e.tier),aC({tag:"fonts.addFallback"})}handleFontsClearFallbacks(e){return this.fonts.clearFallbacks(),aC({tag:"fonts.clearFallbacks"})}handleFontsProgram(e){let t=this.fonts.engineFontFacts().some(t=>t.sha256===e.sha256&&t.served)?this.fonts.programFor(e.sha256):void 0;if(!t)throw new N(G.NotFound,`no served font has the program ${e.sha256}`);let n=t.bytes(),r=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength);return aC({tag:"fonts.program",bytes:r},[r])}handleFontsClear(e){return this.fonts.clear(),aC({tag:"fonts.clear"})}handleLayerClose(e){let t=vN(e.docId,e.layerName),n=this.sessions.get(t);return n&&(gS(this.runtime,n),wC(this.runtime,n),n.close(),this.sessions.delete(t)),aC({tag:"close"})}handleClose(e){for(let[r,i]of Array.from(this.sessions.entries())){var t,n;((t=r)===vN(n=e.docId)||t.startsWith(`${n}::layer:`))&&(gS(this.runtime,i),wC(this.runtime,i),i.close(),this.sessions.delete(r))}return aC({tag:"close"})}handleShutdown(e){if(!this.destroyed){var t;for(let e of(this.destroyed=!0,this.sessions.values()))gS(this.runtime,e),wC(this.runtime,e),e.close();this.sessions.clear(),this.residency.closeIdle(),this.baseDocuments.releaseAll(),t=this.runtime,hU.has(t)&&(t.fn.EPDF_ShutdownThread(),hU.delete(t))}return aC({tag:"shutdown"})}requireSession(e){let t=vN(e.docId,e.layerName),n=this.sessions.get(t);if(n?.isLocked())throw new N(G.DocPasswordRequired,`document session is password-locked: ${t}`);if(!n||!n.isOpen())throw new N(G.DocNotOpen,`document session not open: ${t}`);return n.assertUsable(),n}handleFormsList(e,t){let n=this.requireSession(e);return aC({tag:"forms.list",snapshot:new wW(this.runtime,n,this.fonts).snapshot(t)})}handleFormsSetValue(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.setValue",field:e.ref,value:e.value},e.authority,t);return this.finishMutation(n,{tag:"forms.setValue",result:i},e.artifactPath)}handleFormsReset(e,t){let n=this.requireSession(e),{type:r,skipped:i,...o}=this.applyOne(n,e.opId,{type:"forms.reset",...e.refs?{fields:e.refs}:{}},e.authority,t);return this.finishMutation(n,{tag:"forms.reset",result:o},e.artifactPath)}handleFormsExport(e,t){let n=this.requireSession(e),r=new vc(this.runtime,n,this.fonts).export(e.selection,e.limits??nI,t);return aC({tag:"forms.export",bundle:r},Object.values(r.resources))}handleFormsImport(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.import",bundle:e.bundle,...void 0!==e.pages?{pages:e.pages}:{},attribution:e.attribution,values:e.values,actor:vx(e.authority),limits:e.limits??nI,mayScript:e.mayScript},e.authority,t);return 0===i.fields.length?aC({tag:"forms.import",result:i}):this.finishMutation(n,{tag:"forms.import",result:i},e.artifactPath)}handleFormsImportValues(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.importValues",bundle:e.bundle,attribution:e.attribution,actor:vx(e.authority),limits:e.limits??nI},e.authority,t);return 0===i.fields.length?aC({tag:"forms.importValues",result:i}):this.finishMutation(n,{tag:"forms.importValues",result:i},e.artifactPath)}handleFormsRepair(e,t){let n=this.requireSession(e),r=new Et(this.runtime,n,this.fonts).repair(e.bakeAppearances??!1,t);return this.finishMutation(n,{tag:"forms.repair",result:r},e.artifactPath)}handleFormsCreateField(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.create",draft:e.draft,...void 0!==e.objectNumber?{objectNumber:e.objectNumber}:{},...e.widgetObjectNumbers?{widgetObjectNumbers:e.widgetObjectNumbers}:{}},e.authority,t);return this.finishMutation(n,{tag:"forms.createField",result:i},e.artifactPath)}handleFormsUpdateField(e,t){let n=this.requireSession(e),{type:r,skipped:i,...o}=this.applyOne(n,e.opId,{type:"forms.update",field:e.ref,patch:e.patch},e.authority,t);return this.finishMutation(n,{tag:"forms.updateField",result:o},e.artifactPath)}handleFormsSetSignatureAppearance(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.setSignatureAppearance",field:e.ref,appearance:function(e){if(void 0!==e.appearance)return e.appearance&&new Uint8Array(e.appearance);if(void 0!==e.pdf)return{pdf:new Uint8Array(e.pdf)};throw new N(G.InvalidArg,"a signature appearance request carries \'appearance\' (the mark\'s bytes, or null for no mark) or \'pdf\'")}(e)},e.authority,t);return this.finishMutation(n,{tag:"forms.setSignatureAppearance",result:i},e.artifactPath)}handleFormsDeleteField(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.delete",field:e.ref},vk(),t);return this.finishMutation(n,{tag:"forms.deleteField",result:i},e.artifactPath)}handleFormsAddWidget(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.addWidget",field:e.ref,placement:e.placement,...void 0!==e.objectNumber?{objectNumber:e.objectNumber}:{},...void 0!==e.splitObjectNumber?{splitObjectNumber:e.splitObjectNumber}:{}},vk(),t);return this.finishMutation(n,{tag:"forms.addWidget",result:i},e.artifactPath)}handleFormsDetachWidget(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.removeWidget",field:e.ref,widget:e.widget},vk(),t);return this.finishMutation(n,{tag:"forms.detachWidget",result:i},e.artifactPath)}handleFormsUpdateWidget(e,t){let n=this.requireSession(e),{type:r,skipped:i,...o}=this.applyOne(n,e.opId,{type:"forms.updateWidget",widget:e.widget,patch:e.patch},vk(),t);return this.finishMutation(n,{tag:"forms.updateWidget",result:o},e.artifactPath)}handleFormsDeleteWidget(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.deleteWidget",widget:e.widget},vk(),t);return this.finishMutation(n,{tag:"forms.deleteWidget",result:i},e.artifactPath)}handleFormsReorderCalculations(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.reorderCalculations",fields:e.fields,position:e.position},vk(),t);return this.finishMutation(n,{tag:"forms.reorderCalculations",result:i},e.artifactPath)}handleFormsReorderWidgets(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.reorderWidgets",page:e.page,widgets:e.widgets,position:e.position},vk(),t);return this.finishMutation(n,{tag:"forms.reorderWidgets",result:i},e.artifactPath)}finishMutation(e,t,n){e.inTransaction()&&e.commitTransaction(),vI.has(t.tag)&&AW(e).endUndo(),t.tag.startsWith("forms.")||"pages.flatten"===t.tag||"redaction.apply"===t.tag||"signatures.complete"===t.tag||e.invalidateDerived(),"signatures.complete"!==t.tag&&e.noteEdit();let r=function(e,t){if(0===t.length||!("result"in e))return e;let n=e.result;if("object"!=typeof n||null===n||!("meta"in n))return e;let{meta:r}=n;return"object"!=typeof r||null===r||"missingCharacters"in r?e:{...e,result:{...n,meta:{...r,missingCharacters:t}}}}(t,e.missingCharacters()),i=!function(e,t){let n=yd.get(t);if(!n)return!1;let r=yc(e,t);if(r===n.fingerprint)return!1;let i=yf(e,t);return yd.set(t,{fingerprint:r,documentFonts:i}),i!==n.documentFonts}(this.runtime,e)?r:{...r,fontsChanged:!0};if("layer"!==e.kind||!e.persistLayerArtifact)return aC(i);let o=this.saveLayerArtifact(e,n);return aC({...i,...o.payload},o.transfer)}saveLayerArtifact(e,t){let n=new AQ(this.runtime,e),r=e.lastObjectNumber();if(t)return{payload:{artifactFile:{...n.saveLayerArtifactToFile(t),lastObjectNumber:r}},transfer:[]};let i={...n.saveLayerArtifact(),lastObjectNumber:r};return{payload:{artifact:i},transfer:[i.bytes]}}},vS={read:"none",snapshot:"none",session:"none",open:"none",close:"none",write:"keepsPages",contentWrite:"document",runtimeWrite:"runtime"};function vk(e){return{identity:e??{},grants:null,protection:null}}function vx({identity:e}){return{...void 0!==e.userId?{userId:e.userId}:{},...void 0!==e.groupId?{groupId:e.groupId}:{},...void 0!==e.displayName?{displayName:e.displayName}:{}}}function vG(e,t){let n=t.record.steps.length>0;n&&e.markUndoable();let r=t.items.map(e=>({...e,meta:{...e.meta,undoable:n}})),i=[...new Set(r.flatMap(e=>e.meta.missingCharacters??[]))];return{items:r,meta:{affectedPages:function(e){let t=new Map;for(let n of e)for(let e of n.meta.affectedPages)t.set(e.objectNumber,e);return[...t.values()]}(r),cacheDelta:null,...e.writeStamp(),...i.length>0?{missingCharacters:i}:{}}}}function vO(e){return"shutdown"!==e.kind&&"signatures.complete"!==e.kind&&"document.applyChanges"!==e.kind&&("write"===e.effect||"contentWrite"===e.effect)&&"docId"in e}var vI=new Set(["redaction.apply","pages.flatten","annotations.flatten","forms.repair","signatures.complete"]);function vN(e,t){return`${e}::${t?`layer:${t}`:"__base__"}`}var vC="this engine has no image encoder (the *.renderEncoded kinds are cloud-server surface)";(g=self).onmessage=e=>{var t,n;let r=e.data;r&&"object"==typeof r&&"init"===r.kind&&(t=g,n=r,(async()=>{var e;let r={wasmUrl:(e=n).wasmUrl,wasmBinary:e.wasmBinary},i=new vv(await a$({prefer:"wasm",wasmUrl:r.wasmUrl,wasmBinary:r.wasmBinary}),e=>{t.postMessage(e.payload,e.transfer)});t.onmessage=e=>{i.receive(e.data)},t.postMessage({kind:"ready"})})().catch(e=>{t.postMessage({kind:"init-error",error:function(e,t){let n=String(e?.stack??e);if(t.wasmBinary)return n;let r=t.wasmUrl?`failed to load embedpdf.wasm from ${t.wasmUrl}`:"failed to load embedpdf.wasm (resolved relative to the worker script)";return`${r}. Your build did not ship the wasm at that location \\u2014 either import \\`localEngine\\` from \\`@embedpdf/engine/portable\\` (the wasm travels inside your build), or self-host the file and pass \\`assetsUrl\\`/\\`wasmUrl\\` to localEngine(), or provide the bytes via \\`wasmBinary\\`. See https://www.embedpdf.com/docs/viewer/self-hosting \\u2014 ${n}`}(e,n)})}))}})();'; -export { - e as default -}; -//# sourceMappingURL=embedpdf-worker.source-CCHXFWYh-CTEHza5m.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/embedpdf-worker.source-Z0o39l7i-qFIWKZ_I.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/embedpdf-worker.source-Z0o39l7i-qFIWKZ_I.js new file mode 100644 index 00000000..6d68e732 --- /dev/null +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/embedpdf-worker.source-Z0o39l7i-qFIWKZ_I.js @@ -0,0 +1,5 @@ +var e = '"use strict";(()=>{let e,t,n,r,i,o,a,s,l,u,d,c,f,m,p;var h,F,g,_,P,D,b,y,w=Object.defineProperty,E=Object.getOwnPropertyNames,A=(e=function(e){if("u">typeof require)return require.apply(this,arguments);throw Error(\'Dynamic require of "\'+e+\'" is not supported\')},"u">typeof require?require:"u">typeof Proxy?new Proxy(e,{get:(e,t)=>("u">typeof require?require:e)[t]}):e),v=(e,t)=>{for(var n in t)w(e,n,{get:t[n],enumerable:!0})},S=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?w(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n},k={};v(k,{default:()=>_});var x=(t={"../runtime/npm/wasm32/lib/embedpdf.browser.js"(){var e;e=self.location.href,_=function(t={}){var n,r,i,o,a,s,l,u,d,c,f,m,p,h,F,g,_,P,D,b,y=new Promise((e,t)=>{n=e,r=t});["_EPDF_CheckPasswordPermissions","_EPDF_DigestBuffer","_EPDF_FreeBuffer","_EPDF_GetDecodedImageBytes","_EPDF_GetMetaKeyCount","_EPDF_GetMetaKeyName","_EPDF_GetMetaTrapped","_EPDF_GetPageBoxByIndex","_EPDF_GetPageRotateByIndex","_EPDF_GetPageTabOrderByIndex","_EPDF_GetPageUserUnitByIndex","_EPDF_HasMetaText","_EPDF_InitThread","_EPDF_IsEncrypted","_EPDF_IsOwnerUnlocked","_EPDF_LoadBaseDocument","_EPDF_LoadMemBaseDocument","_EPDF_LoadMemBaseDocument64","_EPDF_LoadPageNormalized","_EPDF_PNG_EncodeRGBA","_EPDF_ReleaseBaseDocument","_EPDF_RemoveEncryption","_EPDF_RenderAnnotBitmap","_EPDF_RenderAnnotBitmapUnrotated","_EPDF_RenderPage_Continue","_EPDF_RenderPageBitmapWithMatrix_Start","_EPDF_SaveAsCopyEx","_EPDF_SaveDocumentToOwnedBuffer","_EPDF_SaveDocumentToOwnedBufferEx","_EPDF_SaveDocumentToOwnedBufferWithVersion","_EPDF_SetBaseDocumentSha256","_EPDF_SetDecodedImageBudget","_EPDF_SetEncryption","_EPDF_SetMetaText","_EPDF_SetMetaTrapped","_EPDF_SetRuntimeOwnerPermissions","_EPDF_ShutdownThread","_EPDF_UnlockOwnerPermissions","_EPDFAction_CloseModel","_EPDFAction_CreateGoTo","_EPDFAction_CreateGoToNamed","_EPDFAction_CreateHide","_EPDFAction_CreateJavaScript","_EPDFAction_CreateLaunch","_EPDFAction_CreateNamed","_EPDFAction_CreateRemoteGoToByName","_EPDFAction_CreateRemoteGoToDest","_EPDFAction_CreateResetForm","_EPDFAction_CreateSubmitForm","_EPDFAction_CreateURI","_EPDFAction_GetNextAt","_EPDFAction_GetNextCount","_EPDFAction_GetNodeCount","_EPDFAction_GetNodeDest","_EPDFAction_GetNodeFilePath","_EPDFAction_GetNodeHideFlag","_EPDFAction_GetNodeJavaScript","_EPDFAction_GetNodeName","_EPDFAction_GetNodeResetForm","_EPDFAction_GetNodeSubmitForm","_EPDFAction_GetNodeSubmitFormCharSet","_EPDFAction_GetNodeSubmitFormURL","_EPDFAction_GetNodeSubtype","_EPDFAction_GetNodeTargetCount","_EPDFAction_GetNodeTargetName","_EPDFAction_GetNodeTargetObjectNumber","_EPDFAction_GetNodeType","_EPDFAction_GetNodeURI","_EPDFAction_GetNodeURIIsMap","_EPDFAction_GetRootNode","_EPDFAction_GetWarningFlags","_EPDFAction_IsComplete","_EPDFAction_LoadModel","_EPDFAction_NodeHasJavaScript","_EPDFAction_SetNext","_EPDFAnnot_AddMeasure","_EPDFAnnot_ClearBorderEffect","_EPDFAnnot_ClearColor","_EPDFAnnot_ClearEmbedMetadata","_EPDFAnnot_ClearEmbedMetadataKey","_EPDFAnnot_ClearMKColor","_EPDFAnnot_ClearMKIcon","_EPDFAnnot_ClearRectangleDifferences","_EPDFAnnot_ExportAppearance","_EPDFAnnot_GenerateAppearance","_EPDFAnnot_GenerateAppearanceWithBlend","_EPDFAnnot_GenerateFormFieldAP","_EPDFAnnot_GetActionModel","_EPDFAnnot_GetAPMatrix","_EPDFAnnot_GetAppearanceState","_EPDFAnnot_GetAppearanceStateCount","_EPDFAnnot_GetAppearanceStateName","_EPDFAnnot_GetAppearanceTransform","_EPDFAnnot_GetAvailableAppearanceModes","_EPDFAnnot_GetBlendMode","_EPDFAnnot_GetBooleanValue","_EPDFAnnot_GetBorderDashPattern","_EPDFAnnot_GetBorderDashPatternCount","_EPDFAnnot_GetBorderEffect","_EPDFAnnot_GetBorderStyle","_EPDFAnnot_GetCalloutLine","_EPDFAnnot_GetCalloutLineCount","_EPDFAnnot_GetColor","_EPDFAnnot_GetDefaultAppearance","_EPDFAnnot_GetDefaultAppearanceFontFace","_EPDFAnnot_GetDefaultAppearanceFontPostScriptName","_EPDFAnnot_GetDrawing","_EPDFAnnot_GetDrawingRect","_EPDFAnnot_GetEmbedMetadataBoolean","_EPDFAnnot_GetEmbedMetadataJSON","_EPDFAnnot_GetEmbedMetadataNumber","_EPDFAnnot_GetEmbedMetadataRect","_EPDFAnnot_GetEmbedMetadataString","_EPDFAnnot_GetFileAttachmentForWrite","_EPDFAnnot_GetIntent","_EPDFAnnot_GetLineCaption","_EPDFAnnot_GetLineEndings","_EPDFAnnot_GetLineLeader","_EPDFAnnot_GetMeasure","_EPDFAnnot_GetMKColor","_EPDFAnnot_GetMKIcon","_EPDFAnnot_GetMKRotation","_EPDFAnnot_GetMKText","_EPDFAnnot_GetMKTextPosition","_EPDFAnnot_GetName","_EPDFAnnot_GetObjectNumber","_EPDFAnnot_GetOpacity","_EPDFAnnot_GetOverlayText","_EPDFAnnot_GetOverlayTextRepeat","_EPDFAnnot_GetRect","_EPDFAnnot_GetRectangleDifferences","_EPDFAnnot_GetReplyType","_EPDFAnnot_GetRichContent","_EPDFAnnot_GetRichTextJSON","_EPDFAnnot_GetRotate","_EPDFAnnot_GetShapeCaption","_EPDFAnnot_GetStructurePosition","_EPDFAnnot_GetTextAlignment","_EPDFAnnot_HasAppearanceStream","_EPDFAnnot_HasEmbedMetadata","_EPDFAnnot_HasMKIcon","_EPDFAnnot_IsValid","_EPDFAnnot_RemoveAction","_EPDFAnnot_RemoveDest","_EPDFAnnot_RemoveKey","_EPDFAnnot_RemoveMeasure","_EPDFAnnot_SetAction","_EPDFAnnot_SetAPMatrix","_EPDFAnnot_SetAppearanceFromPage","_EPDFAnnot_SetBooleanValue","_EPDFAnnot_SetBorderDashPattern","_EPDFAnnot_SetBorderEffect","_EPDFAnnot_SetBorderStyle","_EPDFAnnot_SetCalloutLine","_EPDFAnnot_SetColor","_EPDFAnnot_SetDefaultAppearance","_EPDFAnnot_SetDefaultAppearanceDocumentFont","_EPDFAnnot_SetDefaultAppearanceRegisteredFont","_EPDFAnnot_SetDrawing","_EPDFAnnot_SetEmbedMetadataBoolean","_EPDFAnnot_SetEmbedMetadataJSON","_EPDFAnnot_SetEmbedMetadataNumber","_EPDFAnnot_SetEmbedMetadataRect","_EPDFAnnot_SetEmbedMetadataString","_EPDFAnnot_SetEventAction","_EPDFAnnot_SetIntent","_EPDFAnnot_SetLine","_EPDFAnnot_SetLineCaption","_EPDFAnnot_SetLineEndings","_EPDFAnnot_SetLineLeader","_EPDFAnnot_SetLinkedAnnot","_EPDFAnnot_SetMKColor","_EPDFAnnot_SetMKIcon","_EPDFAnnot_SetMKRotation","_EPDFAnnot_SetMKText","_EPDFAnnot_SetMKTextPosition","_EPDFAnnot_SetName","_EPDFAnnot_SetNoColor","_EPDFAnnot_SetNumberValue","_EPDFAnnot_SetOpacity","_EPDFAnnot_SetOverlayText","_EPDFAnnot_SetOverlayTextRepeat","_EPDFAnnot_SetRect","_EPDFAnnot_SetReplyType","_EPDFAnnot_SetRichTextJSON","_EPDFAnnot_SetRichTextXHTML","_EPDFAnnot_SetRotate","_EPDFAnnot_SetShapeCaption","_EPDFAnnot_SetStampOpacity","_EPDFAnnot_SetSubtype","_EPDFAnnot_SetTextAlignment","_EPDFAnnot_SetVertices","_EPDFAnnot_UpdateAppearanceToRect","_EPDFAttachment_ExportCanonicalToOwnedBuffer","_EPDFAttachment_ExportRawToOwnedBuffer","_EPDFAttachment_ExtractFile","_EPDFAttachment_ExtractFileToOwnedBuffer","_EPDFAttachment_GetDescription","_EPDFAttachment_GetIntegerValue","_EPDFAttachment_ImportRaw","_EPDFAttachment_SetDescription","_EPDFAttachment_SetName","_EPDFAttachment_SetSubtype","_EPDFCatalog_GetLanguage","_EPDFCatalog_GetMetadata","_EPDFCatalog_SetMetadata","_EPDFDest_CreateRemoteView","_EPDFDest_CreateRemoteXYZ","_EPDFDest_CreateView","_EPDFDest_CreateViewByObjectNumber","_EPDFDest_CreateXYZ","_EPDFDest_CreateXYZByObjectNumber","_EPDFDest_GetPageObjectNumber","_EPDFDest_GetViewNullParams","_EPDFDoc_CanonicalDrawing","_EPDFDoc_ClearMissingCharacters","_EPDFDoc_ClearPagePieceInfoEntry","_EPDFDoc_ClearPagePieceInfoKey","_EPDFDoc_ClearPieceInfoEntry","_EPDFDoc_ClearPieceInfoKey","_EPDFDoc_CompareRevisions","_EPDFDoc_CountMissingCharacters","_EPDFDoc_DeletePageByObjectNumber","_EPDFDoc_ExportDictCanonicalToOwnedBuffer","_EPDFDoc_ExportDictRawToOwnedBuffer","_EPDFDoc_ExportDrawing","_EPDFDoc_ExportPagesFlattened","_EPDFDoc_GetAdditionalActionModel","_EPDFDoc_GetAttachmentIndexByKey","_EPDFDoc_GetAttachmentKey","_EPDFDoc_GetBaseBytesSize","_EPDFDoc_GetDrawings","_EPDFDoc_GetFontDisplayProgramCoverage","_EPDFDoc_GetFontDisplayProgramData","_EPDFDoc_GetFontEmbeddingPolicy","_EPDFDoc_GetFontProgramData","_EPDFDoc_GetFontsFingerprint","_EPDFDoc_GetImportFieldRoots","_EPDFDoc_GetLastModified","_EPDFDoc_GetLoadedBytesSize","_EPDFDoc_GetLoadedObjectValue","_EPDFDoc_GetMissingCharacter","_EPDFDoc_GetNamedJavaScriptActionModel","_EPDFDoc_GetNamedPageAt","_EPDFDoc_GetNamedPageCount","_EPDFDoc_GetOpenActionDest","_EPDFDoc_GetOpenActionModel","_EPDFDoc_GetPageActionModel","_EPDFDoc_GetPageLabelSectionAt","_EPDFDoc_GetPageLabelSectionCount","_EPDFDoc_GetPageLastModified","_EPDFDoc_GetPageObjectNumberByIndex","_EPDFDoc_GetPagePieceInfoBoolean","_EPDFDoc_GetPagePieceInfoEntryAt","_EPDFDoc_GetPagePieceInfoEntryCount","_EPDFDoc_GetPagePieceInfoKeyAt","_EPDFDoc_GetPagePieceInfoKeyCount","_EPDFDoc_GetPagePieceInfoLastModified","_EPDFDoc_GetPagePieceInfoName","_EPDFDoc_GetPagePieceInfoNumber","_EPDFDoc_GetPagePieceInfoString","_EPDFDoc_GetPagePieceInfoStringArrayAt","_EPDFDoc_GetPagePieceInfoStringArrayCount","_EPDFDoc_GetPagePieceInfoValueType","_EPDFDoc_GetPieceInfoBoolean","_EPDFDoc_GetPieceInfoEntryAt","_EPDFDoc_GetPieceInfoEntryCount","_EPDFDoc_GetPieceInfoKeyAt","_EPDFDoc_GetPieceInfoKeyCount","_EPDFDoc_GetPieceInfoLastModified","_EPDFDoc_GetPieceInfoName","_EPDFDoc_GetPieceInfoNumber","_EPDFDoc_GetPieceInfoString","_EPDFDoc_GetPieceInfoStringArrayAt","_EPDFDoc_GetPieceInfoStringArrayCount","_EPDFDoc_GetPieceInfoValueType","_EPDFDoc_GetRevision","_EPDFDoc_GetRevisionCount","_EPDFDoc_GetStructureObjectNumbers","_EPDFDoc_GetTypographicFeatures","_EPDFDoc_HasPagePieceInfoEntry","_EPDFDoc_HasPieceInfoEntry","_EPDFDoc_ImportDictRaw","_EPDFDoc_ImportDrawing","_EPDFDoc_ImportPages","_EPDFDoc_LoadPageByObjectNumber","_EPDFDoc_LoadPageByObjectNumberNormalized","_EPDFDoc_OpenBaseOverlay","_EPDFDoc_OpenBaseOverlayFromPath","_EPDFDoc_OpenRevision","_EPDFDoc_ReadLoadedBytes","_EPDFDoc_RemoveNamedPage","_EPDFDoc_RemoveNamedPagesForPage","_EPDFDoc_ResolveFonts","_EPDFDoc_SetFontEmbeddingPolicy","_EPDFDoc_SetNamedPage","_EPDFDoc_SetPageLabelSections","_EPDFDoc_SetPagePieceInfoBoolean","_EPDFDoc_SetPagePieceInfoName","_EPDFDoc_SetPagePieceInfoNumber","_EPDFDoc_SetPagePieceInfoString","_EPDFDoc_SetPagePieceInfoStringArray","_EPDFDoc_SetPageRotationByObjectNumber","_EPDFDoc_SetPieceInfoBoolean","_EPDFDoc_SetPieceInfoName","_EPDFDoc_SetPieceInfoNumber","_EPDFDoc_SetPieceInfoString","_EPDFDoc_SetPieceInfoStringArray","_EPDFDoc_SetTypographicFeatures","_EPDFDoc_StartLoadPageByObjectNumber","_EPDFDocument_ClearEmbedMetadata","_EPDFDss_Add","_EPDFDss_GetCount","_EPDFDss_GetData","_EPDFFont_AddFallbackFont","_EPDFFont_AuthorizeEditing","_EPDFFont_ClearFallbackFonts","_EPDFFont_ClearRegisteredFonts","_EPDFFont_GetCoverage","_EPDFFont_GetEmbeddingPermission","_EPDFFont_GetFallbackOrder","_EPDFFont_GetFamilyName","_EPDFFont_GetLastResortFont","_EPDFFont_GetMetrics","_EPDFFont_GetPostScriptName","_EPDFFont_GetProgramData","_EPDFFont_GetProgramFormat","_EPDFFont_GetProgramHash","_EPDFFont_GetWeight","_EPDFFont_IsEditingAuthorized","_EPDFFont_IsInstanced","_EPDFFont_IsItalic","_EPDFFont_RegisterFont","_EPDFFont_RegisterMemFont","_EPDFFont_RegisterMemFont64","_EPDFFont_SetLastResortFont","_EPDFFontFaces_Close","_EPDFFontFaces_Count","_EPDFFontFaces_CountPrograms","_EPDFFontFaces_GetFamily","_EPDFFontFaces_GetProgramDisplayHash","_EPDFFontFaces_GetProgramEmbedded","_EPDFFontFaces_GetProgramEmbeddingPermission","_EPDFFontFaces_GetProgramFormat","_EPDFFontFaces_GetProgramHash","_EPDFFontFaces_GetProgramMetrics","_EPDFFontFaces_GetProgramObjNum","_EPDFFontFaces_GetProgramPostScriptName","_EPDFFontFaces_GetWeight","_EPDFFontFaces_IsItalic","_EPDFFontFaces_Load","_EPDFFontFaces_ProgramMapsUnicode","_EPDFFontResolution_Close","_EPDFFontResolution_CountMissingCharacters","_EPDFFontResolution_GetBaseFontName","_EPDFFontResolution_GetFallbacks","_EPDFFontResolution_GetFamily","_EPDFFontResolution_GetMissingCharacter","_EPDFFontResolution_GetProgramDisplayHash","_EPDFFontResolution_GetProgramObjNum","_EPDFFontResolution_GetRegisteredFont","_EPDFFontResolution_GetSource","_EPDFFontResolution_GetWeight","_EPDFFontResolution_IsDegraded","_EPDFFontResolution_IsItalic","_EPDFForm_AttachWidget","_EPDFForm_ClearFieldEmbedMetadata","_EPDFForm_ClearFieldEmbedMetadataKey","_EPDFForm_CloseModel","_EPDFForm_CountCalculationOrder","_EPDFForm_CountFieldDefaultValues","_EPDFForm_CountFieldOptions","_EPDFForm_CountFields","_EPDFForm_CountFieldValues","_EPDFForm_CountFieldWidgets","_EPDFForm_CreateField","_EPDFForm_DeleteField","_EPDFForm_DetachWidget","_EPDFForm_ExportFDF","_EPDFForm_ExportFieldRawToOwnedBuffer","_EPDFForm_ExportXFDF","_EPDFForm_GetCalculationOrderFieldIndex","_EPDFForm_GetFieldActionModel","_EPDFForm_GetFieldAlternateName","_EPDFForm_GetFieldDefaultValueAt","_EPDFForm_GetFieldDefaultValueKind","_EPDFForm_GetFieldEmbedMetadataBoolean","_EPDFForm_GetFieldEmbedMetadataJSON","_EPDFForm_GetFieldEmbedMetadataNumber","_EPDFForm_GetFieldEmbedMetadataString","_EPDFForm_GetFieldFamily","_EPDFForm_GetFieldFlags","_EPDFForm_GetFieldIndexByObjNum","_EPDFForm_GetFieldIndexForWidget","_EPDFForm_GetFieldMappingName","_EPDFForm_GetFieldMaxLen","_EPDFForm_GetFieldName","_EPDFForm_GetFieldObjNum","_EPDFForm_GetFieldOptionLabel","_EPDFForm_GetFieldOptionValue","_EPDFForm_GetFieldOrigin","_EPDFForm_GetFieldPartialName","_EPDFForm_GetFieldTopIndex","_EPDFForm_GetFieldValueAt","_EPDFForm_GetFieldValueKind","_EPDFForm_GetFieldWidgetExportValue","_EPDFForm_GetFieldWidgetObjNum","_EPDFForm_GetFieldWidgetOnState","_EPDFForm_GetFieldWidgetPageObjNum","_EPDFForm_GetFieldWidgetRect","_EPDFForm_GetFormKind","_EPDFForm_GetNeedAppearances","_EPDFForm_HasFieldEmbedMetadata","_EPDFForm_HasFieldValuesList","_EPDFForm_ImportFieldRaw","_EPDFForm_IsFieldOptionSelected","_EPDFForm_IsFieldWidgetChecked","_EPDFForm_LoadModel","_EPDFForm_RedrawFieldWidgets","_EPDFForm_Repair","_EPDFForm_SetCalculationOrder","_EPDFForm_SetFieldAlternateName","_EPDFForm_SetFieldAppearanceText","_EPDFForm_SetFieldDefaultValue","_EPDFForm_SetFieldDisplay","_EPDFForm_SetFieldEmbedMetadataBoolean","_EPDFForm_SetFieldEmbedMetadataJSON","_EPDFForm_SetFieldEmbedMetadataNumber","_EPDFForm_SetFieldEmbedMetadataString","_EPDFForm_SetFieldEventAction","_EPDFForm_SetFieldFlags","_EPDFForm_SetFieldMappingName","_EPDFForm_SetFieldMaxLen","_EPDFForm_SetFieldName","_EPDFForm_SetFieldOptions","_EPDFForm_SetFieldSelectedIndices","_EPDFForm_SetFieldValue","_EPDFForm_SetFieldWidgetsChecked","_EPDFImageObj_SetJpeg","_EPDFImageObj_SetPng","_EPDFLayer_AbortTransaction","_EPDFLayer_BeginTransaction","_EPDFLayer_CommitTransaction","_EPDFLayer_GetBaseDocument","_EPDFLayer_GetBaseSha256","_EPDFLayer_GetBirthName","_EPDFLayer_GetBirthObjectNumber","_EPDFLayer_GetLastObjectNumber","_EPDFLayer_GetPromotedObjectCount","_EPDFLayer_IsInTransaction","_EPDFLayer_IsObjectPromoted","_EPDFLayer_IsPagePromoted","_EPDFLayer_OpenLayer","_EPDFLayer_OpenLayerArtifact","_EPDFLayer_OpenLayerArtifactFromPath","_EPDFLayer_RaiseLastObjectNumber","_EPDFLayer_SaveDelta","_EPDFLayer_SaveDeltaEx","_EPDFLayer_SaveDeltaToOwnedBuffer","_EPDFLayer_SaveDeltaToOwnedBufferEx","_EPDFLayer_SaveLayerArtifact","_EPDFLayer_SaveLayerArtifactEx","_EPDFLayer_SaveLayerArtifactToOwnedBuffer","_EPDFLayer_SaveLayerArtifactToOwnedBufferEx","_EPDFMeasure_AddFormat","_EPDFMeasure_CountFormats","_EPDFMeasure_GetCYX","_EPDFMeasure_GetFormat","_EPDFMeasure_GetOrigin","_EPDFMeasure_GetRatio","_EPDFMeasure_GetSubtype","_EPDFMeasure_RemoveFormats","_EPDFMeasure_SetCYX","_EPDFMeasure_SetOrigin","_EPDFMeasure_SetRatio","_EPDFNamedDest_Remove","_EPDFNamedDest_SetDest","_EPDFNumberFormat_GetConversion","_EPDFNumberFormat_GetFixedDenominator","_EPDFNumberFormat_GetFraction","_EPDFNumberFormat_GetLabelPosition","_EPDFNumberFormat_GetPrecision","_EPDFNumberFormat_GetText","_EPDFNumberFormat_GetUnit","_EPDFNumberFormat_SetConversion","_EPDFNumberFormat_SetFixedDenominator","_EPDFNumberFormat_SetFraction","_EPDFNumberFormat_SetLabelPosition","_EPDFNumberFormat_SetPrecision","_EPDFNumberFormat_SetText","_EPDFNumberFormat_SetUnit","_EPDFObjectDiff_Close","_EPDFObjectDiff_GetCount","_EPDFObjectDiff_GetEntry","_EPDFObjectDiff_GetReadStatus","_EPDFObjectDiff_GetReferrer","_EPDFObjectDiff_GetReferrerCount","_EPDFObjectDiff_GetRevisionHealth","_EPDFObjectDiff_GetValue","_EPDFOutline_CreateItem","_EPDFOutline_DeleteItem","_EPDFOutline_ExportItemRawToOwnedBuffer","_EPDFOutline_GetItem","_EPDFOutline_GetObjectNumber","_EPDFOutline_ImportItemRaw","_EPDFOutline_MoveItem","_EPDFOutline_SetAction","_EPDFOutline_SetColor","_EPDFOutline_SetOpen","_EPDFOutline_SetStyle","_EPDFOutline_SetTitle","_EPDFPage_AddViewport","_EPDFPage_AddViewportRaw","_EPDFPage_ApplyRedactions","_EPDFPage_ContinueLoad","_EPDFPage_CountViewports","_EPDFPage_CountViewportsRaw","_EPDFPage_CreateAnnot","_EPDFPage_CreateAnnotRaw","_EPDFPage_ExportAnnotationsAsDocument","_EPDFPage_ExportAnnotsRawToOwnedBuffer","_EPDFPage_ExportRawToOwnedBuffer","_EPDFPage_FindViewport","_EPDFPage_Flatten","_EPDFPage_FlattenAnnotations","_EPDFPage_GetAnnotByName","_EPDFPage_GetAnnotByObjectNumber","_EPDFPage_GetAnnotCountRaw","_EPDFPage_GetAnnotIndexByNameRaw","_EPDFPage_GetAnnotIndexByObjectNumberRaw","_EPDFPage_GetAnnotRaw","_EPDFPage_GetObjectNumber","_EPDFPage_GetParsedSize","_EPDFPage_GetViewport","_EPDFPage_GetViewportRaw","_EPDFPage_ImportAnnotsRaw","_EPDFPage_ImportRaw","_EPDFPage_InsertBlankRaw","_EPDFPage_IsContentCurrent","_EPDFPage_IsValid","_EPDFPage_MoveAnnots","_EPDFPage_MoveAnnotsRaw","_EPDFPage_PromoteInlineAnnotsRaw","_EPDFPage_RemoveAnnot","_EPDFPage_RemoveAnnotByName","_EPDFPage_RemoveAnnotByObjectNumber","_EPDFPage_RemoveAnnotRaw","_EPDFPage_RemoveViewport","_EPDFPage_RemoveViewportRaw","_EPDFPage_ResetRenderCache","_EPDFSig_CloseModel","_EPDFSig_Count","_EPDFSig_DigestByteRange","_EPDFSig_DigestFileRange","_EPDFSig_GetByteRange","_EPDFSig_GetContents","_EPDFSig_GetCoverage","_EPDFSig_GetDocMDPPermission","_EPDFSig_GetFieldMDPAction","_EPDFSig_GetFieldName","_EPDFSig_GetFieldNameAt","_EPDFSig_GetFieldNameCount","_EPDFSig_GetFieldObjNum","_EPDFSig_GetIndexByFieldObjNum","_EPDFSig_GetKind","_EPDFSig_GetLockAction","_EPDFSig_GetLockPermission","_EPDFSig_GetRevisionIndex","_EPDFSig_GetSeedValueFilter","_EPDFSig_GetSeedValueListAt","_EPDFSig_GetSeedValueListCount","_EPDFSig_GetSeedValueMDP","_EPDFSig_GetSeedValuePresentFlags","_EPDFSig_GetSeedValueRequiredFlags","_EPDFSig_GetSeedValueVersion","_EPDFSig_GetString","_EPDFSig_GetValueObjNum","_EPDFSig_GetWidgetObjNum","_EPDFSig_GetWidgetPageObjNum","_EPDFSig_HasSeedValue","_EPDFSig_IsCatalogCertification","_EPDFSig_IsRevisionChainValid","_EPDFSig_IsSigned","_EPDFSig_LoadModel","_EPDFSig_Prepare","_EPDFSig_SaveCandidate","_EPDFSig_SaveCandidateToOwnedBuffer","_EPDFSig_Seal","_EPDFSig_SealSpan","_EPDFSig_SetFieldLock","_EPDFSig_WriteContents","_EPDFText_GetCharGeometry","_EPDFText_GetCharToTextMap","_EPDFText_GetPageGeometry","_EPDFText_GetTextFull","_EPDFText_RedactInQuads","_EPDFText_RedactInRect","_EPDFViewport_AddMeasure","_EPDFViewport_Close","_EPDFViewport_GetBBox","_EPDFViewport_GetMeasure","_EPDFViewport_GetName","_EPDFViewport_RemoveMeasure","_EPDFViewport_SetBBox","_EPDFViewport_SetName","_FORM_CanRedo","_FORM_CanUndo","_FORM_DoDocumentAAction","_FORM_DoDocumentJSAction","_FORM_DoDocumentOpenAction","_FORM_DoPageAAction","_FORM_ForceToKillFocus","_FORM_GetFocusedAnnot","_FORM_GetFocusedText","_FORM_GetSelectedText","_FORM_GetTextDirection","_FORM_IsIndexSelected","_FORM_OnAfterLoadPage","_FORM_OnBeforeClosePage","_FORM_OnChar","_FORM_OnFocus","_FORM_OnKeyDown","_FORM_OnKeyUp","_FORM_OnLButtonDoubleClick","_FORM_OnLButtonDown","_FORM_OnLButtonUp","_FORM_OnMouseMove","_FORM_OnMouseWheel","_FORM_OnRButtonDown","_FORM_OnRButtonUp","_FORM_Redo","_FORM_ReplaceAndKeepSelection","_FORM_ReplaceSelection","_FORM_SelectAllText","_FORM_SetFocusedAnnot","_FORM_SetIndexSelected","_FORM_SetTextDirection","_FORM_Undo","_FPDF_AddInstalledFont","_FPDF_CloseDocument","_FPDF_ClosePage","_FPDF_CloseXObject","_FPDF_CopyViewerPreferences","_FPDF_CountNamedDests","_FPDF_CreateClipPath","_FPDF_CreateNewDocument","_FPDF_DestroyClipPath","_FPDF_DestroyLibrary","_FPDF_DeviceToPage","_FPDF_DocumentHasValidCrossReferenceTable","_FPDF_FFLDraw","_FPDF_FreeDefaultSystemFontInfo","_FPDF_GetDefaultSystemFontInfo","_FPDF_GetDefaultTTFMap","_FPDF_GetDefaultTTFMapCount","_FPDF_GetDefaultTTFMapEntry","_FPDF_GetDocPermissions","_FPDF_GetDocUserPermissions","_FPDF_GetFileIdentifier","_FPDF_GetFileVersion","_FPDF_GetFormType","_FPDF_GetLastError","_FPDF_GetMetaText","_FPDF_GetNamedDest","_FPDF_GetNamedDestByName","_FPDF_GetPageAAction","_FPDF_GetPageBoundingBox","_FPDF_GetPageCount","_FPDF_GetPageHeight","_FPDF_GetPageHeightF","_FPDF_GetPageLabel","_FPDF_GetPageSizeByIndex","_FPDF_GetPageSizeByIndexF","_FPDF_GetPageWidth","_FPDF_GetPageWidthF","_FPDF_GetSecurityHandlerRevision","_FPDF_GetSignatureCount","_FPDF_GetSignatureObject","_FPDF_GetTrailerEnds","_FPDF_GetXFAPacketContent","_FPDF_GetXFAPacketCount","_FPDF_GetXFAPacketName","_FPDF_ImportNPagesToOne","_FPDF_ImportPages","_FPDF_ImportPagesByIndex","_FPDF_InitLibrary","_FPDF_InitLibraryWithConfig","_FPDF_LoadCustomDocument","_FPDF_LoadDocument","_FPDF_LoadMemDocument","_FPDF_LoadMemDocument64","_FPDF_LoadPage","_FPDF_LoadXFA","_FPDF_MovePages","_FPDF_NewFormObjectFromXObject","_FPDF_NewXObjectFromPage","_FPDF_PageToDevice","_FPDF_RemoveFormFieldHighlight","_FPDF_RenderPage_Close","_FPDF_RenderPage_Continue","_FPDF_RenderPageBitmap","_FPDF_RenderPageBitmap_Start","_FPDF_RenderPageBitmapWithColorScheme_Start","_FPDF_RenderPageBitmapWithMatrix","_FPDF_SaveAsCopy","_FPDF_SaveWithVersion","_FPDF_SetFormFieldHighlightAlpha","_FPDF_SetFormFieldHighlightColor","_FPDF_SetSandBoxPolicy","_FPDF_SetSystemFontInfo","_FPDF_StructElement_Attr_CountChildren","_FPDF_StructElement_Attr_GetBlobValue","_FPDF_StructElement_Attr_GetBooleanValue","_FPDF_StructElement_Attr_GetChildAtIndex","_FPDF_StructElement_Attr_GetCount","_FPDF_StructElement_Attr_GetName","_FPDF_StructElement_Attr_GetNumberValue","_FPDF_StructElement_Attr_GetStringValue","_FPDF_StructElement_Attr_GetType","_FPDF_StructElement_Attr_GetValue","_FPDF_StructElement_CountChildren","_FPDF_StructElement_GetActualText","_FPDF_StructElement_GetAltText","_FPDF_StructElement_GetAttributeAtIndex","_FPDF_StructElement_GetAttributeCount","_FPDF_StructElement_GetChildAtIndex","_FPDF_StructElement_GetChildMarkedContentID","_FPDF_StructElement_GetExpansion","_FPDF_StructElement_GetID","_FPDF_StructElement_GetLang","_FPDF_StructElement_GetMarkedContentID","_FPDF_StructElement_GetMarkedContentIdAtIndex","_FPDF_StructElement_GetMarkedContentIdCount","_FPDF_StructElement_GetObjType","_FPDF_StructElement_GetParent","_FPDF_StructElement_GetRawType","_FPDF_StructElement_GetStringAttribute","_FPDF_StructElement_GetTitle","_FPDF_StructElement_GetType","_FPDF_StructTree_Close","_FPDF_StructTree_CountChildren","_FPDF_StructTree_GetChildAtIndex","_FPDF_StructTree_GetForPage","_FPDF_VIEWERREF_GetDuplex","_FPDF_VIEWERREF_GetName","_FPDF_VIEWERREF_GetNumCopies","_FPDF_VIEWERREF_GetPrintPageRange","_FPDF_VIEWERREF_GetPrintPageRangeCount","_FPDF_VIEWERREF_GetPrintPageRangeElement","_FPDF_VIEWERREF_GetPrintScaling","_FPDFAction_GetDest","_FPDFAction_GetFilePath","_FPDFAction_GetType","_FPDFAction_GetURIPath","_FPDFAnnot_AddFileAttachment","_FPDFAnnot_AddInkStroke","_FPDFAnnot_AppendAttachmentPoints","_FPDFAnnot_AppendObject","_FPDFAnnot_CountAttachmentPoints","_FPDFAnnot_GetAP","_FPDFAnnot_GetAttachmentPoints","_FPDFAnnot_GetBorder","_FPDFAnnot_GetColor","_FPDFAnnot_GetFileAttachment","_FPDFAnnot_GetFlags","_FPDFAnnot_GetFocusableSubtypes","_FPDFAnnot_GetFocusableSubtypesCount","_FPDFAnnot_GetFontColor","_FPDFAnnot_GetFontSize","_FPDFAnnot_GetFormAdditionalActionJavaScript","_FPDFAnnot_GetFormControlCount","_FPDFAnnot_GetFormControlIndex","_FPDFAnnot_GetFormFieldAlternateName","_FPDFAnnot_GetFormFieldAtPoint","_FPDFAnnot_GetFormFieldExportValue","_FPDFAnnot_GetFormFieldFlags","_FPDFAnnot_GetFormFieldName","_FPDFAnnot_GetFormFieldType","_FPDFAnnot_GetFormFieldValue","_FPDFAnnot_GetInkListCount","_FPDFAnnot_GetInkListPath","_FPDFAnnot_GetLine","_FPDFAnnot_GetLink","_FPDFAnnot_GetLinkedAnnot","_FPDFAnnot_GetNumberValue","_FPDFAnnot_GetObject","_FPDFAnnot_GetObjectCount","_FPDFAnnot_GetOptionCount","_FPDFAnnot_GetOptionLabel","_FPDFAnnot_GetRect","_FPDFAnnot_GetStringValue","_FPDFAnnot_GetSubtype","_FPDFAnnot_GetValueType","_FPDFAnnot_GetVertices","_FPDFAnnot_HasAttachmentPoints","_FPDFAnnot_HasKey","_FPDFAnnot_IsChecked","_FPDFAnnot_IsObjectSupportedSubtype","_FPDFAnnot_IsOptionSelected","_FPDFAnnot_IsSupportedSubtype","_FPDFAnnot_RemoveInkList","_FPDFAnnot_RemoveObject","_FPDFAnnot_SetAP","_FPDFAnnot_SetAttachmentPoints","_FPDFAnnot_SetBorder","_FPDFAnnot_SetColor","_FPDFAnnot_SetFlags","_FPDFAnnot_SetFocusableSubtypes","_FPDFAnnot_SetFontColor","_FPDFAnnot_SetFormFieldFlags","_FPDFAnnot_SetRect","_FPDFAnnot_SetStringValue","_FPDFAnnot_SetURI","_FPDFAnnot_UpdateObject","_FPDFAttachment_GetAFRelationship","_FPDFAttachment_GetDescription","_FPDFAttachment_GetFile","_FPDFAttachment_GetName","_FPDFAttachment_GetStringValue","_FPDFAttachment_GetSubtype","_FPDFAttachment_GetValueType","_FPDFAttachment_HasKey","_FPDFAttachment_SetDescription","_FPDFAttachment_SetFile","_FPDFAttachment_SetStringValue","_FPDFAvail_Create","_FPDFAvail_Destroy","_FPDFAvail_GetDocument","_FPDFAvail_GetFirstPageNum","_FPDFAvail_IsDocAvail","_FPDFAvail_IsFormAvail","_FPDFAvail_IsLinearized","_FPDFAvail_IsPageAvail","_FPDFBitmap_Create","_FPDFBitmap_CreateEx","_FPDFBitmap_Destroy","_FPDFBitmap_FillRect","_FPDFBitmap_GetBuffer","_FPDFBitmap_GetFormat","_FPDFBitmap_GetHeight","_FPDFBitmap_GetStride","_FPDFBitmap_GetWidth","_FPDFBookmark_Find","_FPDFBookmark_GetAction","_FPDFBookmark_GetColor","_FPDFBookmark_GetCount","_FPDFBookmark_GetDest","_FPDFBookmark_GetFirstChild","_FPDFBookmark_GetNextSibling","_FPDFBookmark_GetStyle","_FPDFBookmark_GetTitle","_FPDFCatalog_GetLanguage","_FPDFCatalog_IsTagged","_FPDFCatalog_SetLanguage","_FPDFClipPath_CountPaths","_FPDFClipPath_CountPathSegments","_FPDFClipPath_GetPathSegment","_FPDFDest_GetDestPageIndex","_FPDFDest_GetLocationInPage","_FPDFDest_GetView","_FPDFDoc_AddAttachment","_FPDFDoc_CloseJavaScriptAction","_FPDFDoc_DeleteAttachment","_FPDFDOC_ExitFormFillEnvironment","_FPDFDoc_GetAttachment","_FPDFDoc_GetAttachmentCount","_FPDFDoc_GetJavaScriptAction","_FPDFDoc_GetJavaScriptActionCount","_FPDFDoc_GetPageMode","_FPDFDOC_InitFormFillEnvironment","_FPDFFont_Close","_FPDFFont_GetAscent","_FPDFFont_GetBaseFontName","_FPDFFont_GetDescent","_FPDFFont_GetFamilyName","_FPDFFont_GetFlags","_FPDFFont_GetFontData","_FPDFFont_GetGlyphPath","_FPDFFont_GetGlyphWidth","_FPDFFont_GetIsEmbedded","_FPDFFont_GetItalicAngle","_FPDFFont_GetWeight","_FPDFFormObj_CountObjects","_FPDFFormObj_GetObject","_FPDFFormObj_RemoveObject","_FPDFGlyphPath_CountGlyphSegments","_FPDFGlyphPath_GetGlyphPathSegment","_FPDFImageObj_GetBitmap","_FPDFImageObj_GetIccProfileDataDecoded","_FPDFImageObj_GetImageDataDecoded","_FPDFImageObj_GetImageDataRaw","_FPDFImageObj_GetImageFilter","_FPDFImageObj_GetImageFilterCount","_FPDFImageObj_GetImageMetadata","_FPDFImageObj_GetImagePixelSize","_FPDFImageObj_GetRenderedBitmap","_FPDFImageObj_LoadJpegFile","_FPDFImageObj_LoadJpegFileInline","_FPDFImageObj_SetBitmap","_FPDFImageObj_SetMatrix","_FPDFJavaScriptAction_GetName","_FPDFJavaScriptAction_GetScript","_FPDFLink_CloseWebLinks","_FPDFLink_CountQuadPoints","_FPDFLink_CountRects","_FPDFLink_CountWebLinks","_FPDFLink_Enumerate","_FPDFLink_GetAction","_FPDFLink_GetAnnot","_FPDFLink_GetAnnotRect","_FPDFLink_GetDest","_FPDFLink_GetLinkAtPoint","_FPDFLink_GetLinkZOrderAtPoint","_FPDFLink_GetQuadPoints","_FPDFLink_GetRect","_FPDFLink_GetTextRange","_FPDFLink_GetURL","_FPDFLink_LoadWebLinks","_FPDFPage_CloseAnnot","_FPDFPage_CountObjects","_FPDFPage_CreateAnnot","_FPDFPage_Delete","_FPDFPage_Flatten","_FPDFPage_FormFieldZOrderAtPoint","_FPDFPage_GenerateContent","_FPDFPage_GetAnnot","_FPDFPage_GetAnnotCount","_FPDFPage_GetAnnotIndex","_FPDFPage_GetArtBox","_FPDFPage_GetBleedBox","_FPDFPage_GetCropBox","_FPDFPage_GetDecodedThumbnailData","_FPDFPage_GetMediaBox","_FPDFPage_GetObject","_FPDFPage_GetRawThumbnailData","_FPDFPage_GetRotation","_FPDFPage_GetThumbnailAsBitmap","_FPDFPage_GetTrimBox","_FPDFPage_HasFormFieldAtPoint","_FPDFPage_HasTransparency","_FPDFPage_InsertClipPath","_FPDFPage_InsertObject","_FPDFPage_InsertObjectAtIndex","_FPDFPage_New","_FPDFPage_RemoveAnnot","_FPDFPage_RemoveObject","_FPDFPage_SetArtBox","_FPDFPage_SetBleedBox","_FPDFPage_SetCropBox","_FPDFPage_SetMediaBox","_FPDFPage_SetRotation","_FPDFPage_SetTrimBox","_FPDFPage_TransformAnnots","_FPDFPage_TransFormWithClip","_FPDFPageObj_AddExistingMark","_FPDFPageObj_AddMark","_FPDFPageObj_CountMarks","_FPDFPageObj_CreateNewPath","_FPDFPageObj_CreateNewRect","_FPDFPageObj_CreateTextObj","_FPDFPageObj_Destroy","_FPDFPageObj_GetBounds","_FPDFPageObj_GetClipPath","_FPDFPageObj_GetDashArray","_FPDFPageObj_GetDashCount","_FPDFPageObj_GetDashPhase","_FPDFPageObj_GetFillColor","_FPDFPageObj_GetIsActive","_FPDFPageObj_GetLineCap","_FPDFPageObj_GetLineJoin","_FPDFPageObj_GetMark","_FPDFPageObj_GetMarkedContentID","_FPDFPageObj_GetMatrix","_FPDFPageObj_GetRenderedFillPattern","_FPDFPageObj_GetRenderedStrokePattern","_FPDFPageObj_GetRotatedBounds","_FPDFPageObj_GetStrokeColor","_FPDFPageObj_GetStrokeWidth","_FPDFPageObj_GetType","_FPDFPageObj_HasTransparency","_FPDFPageObj_NewImageObj","_FPDFPageObj_NewTextObj","_FPDFPageObj_RemoveMark","_FPDFPageObj_SetBlendMode","_FPDFPageObj_SetDashArray","_FPDFPageObj_SetDashPhase","_FPDFPageObj_SetFillColor","_FPDFPageObj_SetIsActive","_FPDFPageObj_SetLineCap","_FPDFPageObj_SetLineJoin","_FPDFPageObj_SetMatrix","_FPDFPageObj_SetStrokeColor","_FPDFPageObj_SetStrokeWidth","_FPDFPageObj_Transform","_FPDFPageObj_TransformClipPath","_FPDFPageObj_TransformF","_FPDFPageObjMark_CountParams","_FPDFPageObjMark_GetName","_FPDFPageObjMark_GetParamBlobValue","_FPDFPageObjMark_GetParamFloatValue","_FPDFPageObjMark_GetParamIntValue","_FPDFPageObjMark_GetParamKey","_FPDFPageObjMark_GetParamStringValue","_FPDFPageObjMark_GetParamValueType","_FPDFPageObjMark_RemoveParam","_FPDFPageObjMark_SetBlobParam","_FPDFPageObjMark_SetFloatParam","_FPDFPageObjMark_SetIntParam","_FPDFPageObjMark_SetStringParam","_FPDFPath_BezierTo","_FPDFPath_Close","_FPDFPath_CountSegments","_FPDFPath_GetBezierControlPoints","_FPDFPath_GetDrawMode","_FPDFPath_GetPathSegment","_FPDFPath_LineTo","_FPDFPath_MoveTo","_FPDFPath_SetDrawMode","_FPDFPathSegment_GetClose","_FPDFPathSegment_GetPoint","_FPDFPathSegment_GetType","_FPDFSignatureObj_GetByteRange","_FPDFSignatureObj_GetContents","_FPDFSignatureObj_GetDocMDPPermission","_FPDFSignatureObj_GetReason","_FPDFSignatureObj_GetSubFilter","_FPDFSignatureObj_GetTime","_FPDFText_ClosePage","_FPDFText_CountChars","_FPDFText_CountRects","_FPDFText_FindClose","_FPDFText_FindNext","_FPDFText_FindPrev","_FPDFText_FindStart","_FPDFText_GetBoundedText","_FPDFText_GetCharAngle","_FPDFText_GetCharBox","_FPDFText_GetCharIndexAtPos","_FPDFText_GetCharIndexFromTextIndex","_FPDFText_GetCharOrigin","_FPDFText_GetFillColor","_FPDFText_GetFontInfo","_FPDFText_GetFontSize","_FPDFText_GetFontWeight","_FPDFText_GetLooseCharBox","_FPDFText_GetMatrix","_FPDFText_GetRect","_FPDFText_GetSchCount","_FPDFText_GetSchResultIndex","_FPDFText_GetStrokeColor","_FPDFText_GetText","_FPDFText_GetTextIndexFromCharIndex","_FPDFText_GetTextObject","_FPDFText_GetUnicode","_FPDFText_HasUnicodeMapError","_FPDFText_IsGenerated","_FPDFText_IsHyphen","_FPDFText_LoadCidType2Font","_FPDFText_LoadFont","_FPDFText_LoadPage","_FPDFText_LoadStandardFont","_FPDFText_SetCharcodes","_FPDFText_SetPositions","_FPDFText_SetText","_FPDFTextObj_GetFont","_FPDFTextObj_GetFontSize","_FPDFTextObj_GetRenderedBitmap","_FPDFTextObj_GetText","_FPDFTextObj_GetTextRenderMode","_FPDFTextObj_SetFontSize","_FPDFTextObj_SetTextRenderMode","_malloc","_free","_memory","_EPDF_FillFromHostCrypto","___indirect_function_table","onRuntimeInitialized"].forEach(e=>{Object.getOwnPropertyDescriptor(y,e)||Object.defineProperty(y,e,{get:()=>J("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>J("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})});var w="object"==typeof window,E="u">typeof WorkerGlobalScope,v="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&"renderer"!=process.type,k=!w&&!v&&!E,x=Object.assign({},t),G="./this.program",O="";if(k){if("object"==typeof process&&"function"==typeof A||"object"==typeof window||"u">typeof WorkerGlobalScope)throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)")}else if(w||E){if(E?O=self.location.href:"u">typeof document&&document.currentScript&&(O=document.currentScript.src),e&&(O=e),O=O.startsWith("blob:")?"":O.substr(0,O.replace(/[?#].*/,"").lastIndexOf("/")+1),"object"!=typeof window&&"u"{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),i=e=>(M(!Q(e),"readAsync does not work with file:// URLs"),fetch(e,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+" : "+e.url))))}else throw Error("environment detection error");var I=t.print||console.log.bind(console),N=t.printErr||console.error.bind(console);Object.assign(t,x),x=null,Object.getOwnPropertyDescriptor(t,b="fetchSettings")&&J(`\\`Module.${b}\\` was supplied but \\`${b}\\` not included in INCOMING_MODULE_JS_API`),t.arguments&&t.arguments,er("arguments","arguments_"),t.thisProgram&&(G=t.thisProgram),er("thisProgram","thisProgram"),M(void 0===t.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.read,"Module.read option was removed"),M(void 0===t.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),M(void 0===t.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),M(void 0===t.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),M(void 0===t.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),er("asm","wasmExports"),er("readAsync","readAsync"),er("readBinary","readBinary"),er("setWindowTitle","setWindowTitle"),M(!v,"node environment detected but not enabled at build time. Add `node` to `-sENVIRONMENT` to enable."),M(!k,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable.");var C=t.wasmBinary;er("wasmBinary","wasmBinary"),"object"!=typeof WebAssembly&&N("no native wasm support detected");var j=!1;function M(e,t){e||J("Assertion failed"+(t?": "+t:""))}function R(){var e=a.buffer;t.HEAP8=s=new Int8Array(e),t.HEAP16=u=new Int16Array(e),t.HEAPU8=l=new Uint8Array(e),t.HEAPU16=d=new Uint16Array(e),t.HEAP32=c=new Int32Array(e),t.HEAPU32=f=new Uint32Array(e),t.HEAPF32=m=new Float32Array(e),t.HEAPF64=p=new Float64Array(e)}function T(){if(!j){var e=e1();0==e&&(e+=4);var t=f[e>>>2>>>0],n=f[e+4>>>2>>>0];(0x2135467!=t||0x89bacdfe!=n)&&J(`Stack overflow! Stack cookie has been overwritten at ${ec(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ec(n)} ${ec(t)}`),0x63736d65!=f[0]&&J("Runtime error: The application has corrupted its heap memory area (address zero)!")}}M(!t.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),M("u">typeof Int32Array&&"u">typeof Float64Array&&void 0!=Int32Array.prototype.subarray&&void 0!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),M(!t.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),M(!t.INITIAL_MEMORY,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically");var B=[],L=[],$=[],z=!1;M(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var U=0,V=null,W=null,q={};function H(e){for(var t=e;;){if(!q[e])return e;e=t+Math.random()}}function K(e){U++,t.monitorRunDependencies?.(U),e?(M(!q[e]),q[e]=1,null===V&&"u">typeof setInterval&&(V=setInterval(()=>{if(j){clearInterval(V),V=null;return}var e=!1;for(var t in q)e||(e=!0,N("still waiting on run dependencies:")),N(`dependency: ${t}`);e&&N("(end of list)")},1e4))):N("warning: run dependency added without ID")}function Z(e){if(U--,t.monitorRunDependencies?.(U),e?(M(q[e]),delete q[e]):N("warning: run dependency removed without ID"),0==U&&(null!==V&&(clearInterval(V),V=null),W)){var n=W;W=null,n()}}function J(e){t.onAbort?.(e),N(e="Aborted("+e+")"),j=!0;var n=new WebAssembly.RuntimeError(e);throw r(n),n}var Q=e=>e.startsWith("file://");function X(e,t){return(...n)=>{M(z,`native function \\`${e}\\` called before runtime initialization`);var r=eZ[e];return M(r,`exported native function \\`${e}\\` not found`),M(n.length<=t,`native function \\`${e}\\` called with ${n.length} args but expects ${t}`),r(...n)}}function Y(e){if(e==h&&C)return new Uint8Array(C);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function ee(e,t,n){return(!C?i(e).then(e=>new Uint8Array(e),()=>Y(e)):Promise.resolve().then(()=>Y(e))).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{N(`failed to asynchronously prepare wasm: ${e}`),Q(h)&&N(`warning: Loading from a file URI (${h}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),J(e)})}var et=new Int16Array(1),en=new Int8Array(et.buffer);if(et[0]=25459,115!==en[0]||99!==en[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)";if(t.ENVIRONMENT)throw Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");function er(e,n,r=!0){Object.getOwnPropertyDescriptor(t,e)||Object.defineProperty(t,e,{configurable:!0,get(){J(`\\`Module.${e}\\` has been replaced by \\`${n}\\``+(r?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function ei(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function eo(e,t){"u">typeof globalThis&&!Object.getOwnPropertyDescriptor(globalThis,e)&&Object.defineProperty(globalThis,e,{configurable:!0,get(){t()}})}function ea(e,t){eo(e,()=>{em(`\\`${e}\\` is not longer defined by emscripten. ${t}`)})}function es(e){Object.getOwnPropertyDescriptor(t,e)||Object.defineProperty(t,e,{configurable:!0,get(){var t=`\'${e}\' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;ei(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),J(t)}})}ea("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),ea("asm","Please use wasmExports instead");class el{constructor(e){S(this,"name","ExitStatus"),this.message=`Program terminated with exit(${e})`,this.status=e}}var eu=e=>{for(;e.length>0;)e.shift()(t)},ed=t.noExitRuntime||!0,ec=e=>(M("number"==typeof e),"0x"+e.toString(16).padStart(8,"0")),ef=()=>e6(),em=e=>{em.shown||(em.shown={}),em.shown[e]||(em.shown[e]=1,N(e))},ep=(e,t)=>(M(e==e>>>0||e==(0|e)),M(t===(0|t)),t+2097152>>>0<4194305-!!e?(e>>>0)+0x100000000*t:0/0),eh="u">typeof TextDecoder?new TextDecoder:void 0,eF=(e,t=0,n=0/0)=>{for(var r=(t>>>=0)+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&eh)return eh.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&u)}}return o},eg=(e,t)=>(M("number"==typeof e,`UTF8ToString expects a number (got ${typeof e})`),(e>>>=0)?eF(l,e,t):""),e_=()=>{M(void 0!=eC.varargs);var e=c[eC.varargs>>>2>>>0];return eC.varargs+=4,e},eP={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:e=>{var t=eP.isAbs(e),n="/"===e.substr(-1);return(e=eP.normalizeArray(e.split("/").filter(e=>!!e),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=eP.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=eP.normalize(e)).replace(/\\/$/,"")).lastIndexOf("/");return -1===t?e:e.substr(t+1)},join:(...e)=>eP.normalize(e.join("/")),join2:(e,t)=>eP.normalize(e+"/"+t)},eD=e=>(eD=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);J("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),eb={resolve:(...e)=>{for(var t="",n=!1,r=e.length-1;r>=-1&&!n;r--){var i=r>=0?e[r]:eN.cwd();if("string"!=typeof i)throw TypeError("Arguments to path.resolve must be strings");if(!i)return"";t=i+"/"+t,n=eP.isAbs(i)}return t=eP.normalizeArray(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."},relative:(e,t)=>{function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=eb.resolve(e).substr(1),t=eb.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),o=Math.min(r.length,i.length),a=o,s=0;s{for(var t=0,n=0;n=55296&&r<=57343?(t+=4,++n):t+=3}return t},eE=(e,t,n,r)=>{if(n>>>=0,M("string"==typeof e,`stringToUTF8Array expects a string (got ${typeof e})`),!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(n>=o)break;t[n++>>>0]=s}else if(s<=2047){if(n+1>=o)break;t[n++>>>0]=192|s>>6,t[n++>>>0]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++>>>0]=224|s>>12,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|63&s}else{if(n+3>=o)break;s>1114111&&em("Invalid Unicode code point "+ec(s)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[n++>>>0]=240|s>>18,t[n++>>>0]=128|s>>12&63,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|63&s}}return t[n>>>0]=0,n-i};function eA(e,t,n){var r=Array(n>0?n:ew(e)+1),i=eE(e,r,0,r.length);return t&&(r.length=i),r}var ev={ttys:[],init(){},shutdown(){},register(e,t){ev.ttys[e]={input:[],output:[],ops:t},eN.registerDevice(e,ev.stream_ops)},stream_ops:{open(e){var t=ev.ttys[e.node.rdev];if(!t)throw new eN.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,i){if(!e.tty||!e.tty.ops.get_char)throw new eN.ErrnoError(60);for(var o,a=0,s=0;s(()=>{if(!ey.length){var e=null;if("u">typeof window&&"function"==typeof window.prompt&&null!==(e=window.prompt("Input: "))&&(e+=`\n`),!e)return null;ey=eA(e,!0)}return ey.shift()})(),put_char(e,t){null===t||10===t?(I(eF(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(I(eF(e.output)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,n)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(N(eF(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(N(eF(e.output)),e.output=[])}}},eS=(e,t)=>(M(t,"alignment argument is required"),Math.ceil(e/t)*t),ek=e=>{var t,n=eX(65536,e=eS(e,65536));return n&&(t=e,l.fill(0,n,n+t)),n},ex={ops_table:null,mount:e=>ex.createNode(null,"/",16895,0),createNode(e,t,n,r){if(eN.isBlkdev(n)||eN.isFIFO(n))throw new eN.ErrnoError(63);ex.ops_table||(ex.ops_table={dir:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr,lookup:ex.node_ops.lookup,mknod:ex.node_ops.mknod,rename:ex.node_ops.rename,unlink:ex.node_ops.unlink,rmdir:ex.node_ops.rmdir,readdir:ex.node_ops.readdir,symlink:ex.node_ops.symlink},stream:{llseek:ex.stream_ops.llseek}},file:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr},stream:{llseek:ex.stream_ops.llseek,read:ex.stream_ops.read,write:ex.stream_ops.write,allocate:ex.stream_ops.allocate,mmap:ex.stream_ops.mmap,msync:ex.stream_ops.msync}},link:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr,readlink:ex.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr},stream:eN.chrdev_stream_ops}});var i=eN.createNode(e,t,n,r);return eN.isDir(i.mode)?(i.node_ops=ex.ops_table.dir.node,i.stream_ops=ex.ops_table.dir.stream,i.contents={}):eN.isFile(i.mode)?(i.node_ops=ex.ops_table.file.node,i.stream_ops=ex.ops_table.file.stream,i.usedBytes=0,i.contents=null):eN.isLink(i.mode)?(i.node_ops=ex.ops_table.link.node,i.stream_ops=ex.ops_table.link.stream):eN.isChrdev(i.mode)&&(i.node_ops=ex.ops_table.chrdev.node,i.stream_ops=ex.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var n=e.contents?e.contents.length:0;if(!(n>=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var n=e.contents;e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=eN.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,eN.isDir(e.mode)?t.size=4096:eN.isFile(e.mode)?t.size=e.usedBytes:eN.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&ex.resizeFileStorage(e,t.size)},lookup(e,t){throw new eN.ErrnoError(44)},mknod:(e,t,n,r)=>ex.createNode(e,t,n,r),rename(e,t,n){if(eN.isDir(e.mode)){var r;try{r=eN.lookupNode(t,n)}catch{}if(r)for(var i in r.contents)throw new eN.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=n,t.contents[n]=e,t.timestamp=e.parent.timestamp},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var n=eN.lookupNode(e,t);for(var r in n.contents)throw new eN.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var n of Object.keys(e.contents))t.push(n);return t},symlink(e,t,n){var r=ex.createNode(e,t,41471,0);return r.link=n,r},readlink(e){if(!eN.isLink(e.mode))throw new eN.ErrnoError(28);return e.link}},stream_ops:{read(e,t,n,r,i){var o=e.node.contents;if(i>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,r);if(M(a>=0),a>8&&o.subarray)t.set(o.subarray(i,i+a),n);else for(var s=0;s0||n+t>>0))}return{ptr:o,allocated:a}},msync:(e,t,n,r,i)=>(ex.stream_ops.write(e,t,0,r,n,!1),0)}},eG=t.preloadPlugins||[],eO=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},eI={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},eN={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class extends Error{constructor(e){for(var t in super(z?eg(eQ(e)):""),S(this,"name","ErrnoError"),this.errno=e,eI)if(eI[t]===e){this.code=t;break}}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{constructor(){S(this,"shared",{})}get object(){return this.node}set object(e){this.node=e}get isRead(){return(2097155&this.flags)!=1}get isWrite(){return(2097155&this.flags)!=0}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{constructor(e,t,n,r){S(this,"node_ops",{}),S(this,"stream_ops",{}),S(this,"readMode",365),S(this,"writeMode",146),S(this,"mounted",null),e||(e=this),this.parent=e,this.mount=e.mount,this.id=eN.nextInode++,this.name=t,this.mode=n,this.rdev=r}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return eN.isDir(this.mode)}get isDevice(){return eN.isChrdev(this.mode)}},lookupPath(e,t={}){if(!(e=eb.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new eN.ErrnoError(32);for(var n=e.split("/").filter(e=>!!e),r=eN.root,i="/",o=0;o40)throw new eN.ErrnoError(32)}}return{path:i,node:r}},getPath(e){for(var t;;){if(eN.isRoot(e)){var n=e.mount.mountpoint;if(!t)return n;return"/"!==n[n.length-1]?`${n}/${t}`:n+t}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var n=0,r=0;r>>0)%eN.nameTable.length},hashAddNode(e){var t=eN.hashName(e.parent.id,e.name);e.name_next=eN.nameTable[t],eN.nameTable[t]=e},hashRemoveNode(e){var t=eN.hashName(e.parent.id,e.name);if(eN.nameTable[t]===e)eN.nameTable[t]=e.name_next;else for(var n=eN.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode(e,t){var n=eN.mayLookup(e);if(n)throw new eN.ErrnoError(n);for(var r=eN.hashName(e.id,t),i=eN.nameTable[r];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return eN.lookup(e,t)},createNode(e,t,n,r){M("object"==typeof e);var i=new eN.FSNode(e,t,n,r);return eN.hashAddNode(i),i},destroyNode(e){eN.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>(61440&e)==32768,isDir:e=>(61440&e)==16384,isLink:e=>(61440&e)==40960,isChrdev:e=>(61440&e)==8192,isBlkdev:e=>(61440&e)==24576,isFIFO:e=>(61440&e)==4096,isSocket:e=>(49152&e)==49152,flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>eN.ignorePermissions?0:t.includes("r")&&!(292&e.mode)||t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0,mayLookup:e=>eN.isDir(e.mode)?eN.nodePermissions(e,"x")||2*!e.node_ops.lookup:54,mayCreate(e,t){try{return eN.lookupNode(e,t),20}catch(e){}return eN.nodePermissions(e,"wx")},mayDelete(e,t,n){try{r=eN.lookupNode(e,t)}catch(e){return e.errno}var r,i=eN.nodePermissions(e,"wx");if(i)return i;if(n){if(!eN.isDir(r.mode))return 54;if(eN.isRoot(r)||eN.getPath(r)===eN.cwd())return 10}else if(eN.isDir(r.mode))return 31;return 0},mayOpen:(e,t)=>e?eN.isLink(e.mode)?32:eN.isDir(e.mode)&&("r"!==eN.flagsToPermissionString(t)||512&t)?31:eN.nodePermissions(e,eN.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=eN.MAX_OPEN_FDS;e++)if(!eN.streams[e])return e;throw new eN.ErrnoError(33)},getStreamChecked(e){var t=eN.getStream(e);if(!t)throw new eN.ErrnoError(8);return t},getStream:e=>eN.streams[e],createStream:(e,t=-1)=>(M(t>=-1),e=Object.assign(new eN.FSStream,e),-1==t&&(t=eN.nextfd()),e.fd=t,eN.streams[t]=e,e),closeStream(e){eN.streams[e]=null},dupStream(e,t=-1){var n=eN.createStream(e,t);return n.stream_ops?.dup?.(n),n},chrdev_stream_ops:{open(e){var t=eN.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new eN.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){eN.devices[e]={stream_ops:t}},getDevice:e=>eN.devices[e],getMounts(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push(...r.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),eN.syncFSRequests++,eN.syncFSRequests>1&&N(`warning: ${eN.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=eN.getMounts(eN.root.mount),r=0;function i(e){return M(eN.syncFSRequests>0),eN.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++r>=n.length&&i(null)}n.forEach(t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)})},mount(e,t,n){if("string"==typeof e)throw e;var r,i="/"===n,o=!n;if(i&&eN.root)throw new eN.ErrnoError(10);if(!i&&!o){var a=eN.lookupPath(n,{follow_mount:!1});if(n=a.path,r=a.node,eN.isMountpoint(r))throw new eN.ErrnoError(10);if(!eN.isDir(r.mode))throw new eN.ErrnoError(54)}var s={type:e,opts:t,mountpoint:n,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,i?eN.root=l:r&&(r.mounted=s,r.mount&&r.mount.mounts.push(s)),l},unmount(e){var t=eN.lookupPath(e,{follow_mount:!1});if(!eN.isMountpoint(t.node))throw new eN.ErrnoError(28);var n=t.node,r=n.mounted,i=eN.getMounts(r);Object.keys(eN.nameTable).forEach(e=>{for(var t=eN.nameTable[e];t;){var n=t.name_next;i.includes(t.mount)&&eN.destroyNode(t),t=n}}),n.mounted=null;var o=n.mount.mounts.indexOf(r);M(-1!==o),n.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,n){var r=eN.lookupPath(e,{parent:!0}).node,i=eP.basename(e);if(!i||"."===i||".."===i)throw new eN.ErrnoError(28);var o=eN.mayCreate(r,i);if(o)throw new eN.ErrnoError(o);if(!r.node_ops.mknod)throw new eN.ErrnoError(63);return r.node_ops.mknod(r,i,t,n)},create:(e,t)=>(t=(void 0!==t?t:438)&4095|32768,eN.mknod(e,t,0)),mkdir:(e,t)=>(t=(void 0!==t?t:511)&1023|16384,eN.mknod(e,t,0)),mkdirTree(e,t){for(var n=e.split("/"),r="",i=0;i(void 0===n&&(n=t,t=438),t|=8192,eN.mknod(e,t,n)),symlink(e,t){if(!eb.resolve(e))throw new eN.ErrnoError(44);var n=eN.lookupPath(t,{parent:!0}).node;if(!n)throw new eN.ErrnoError(44);var r=eP.basename(t),i=eN.mayCreate(n,r);if(i)throw new eN.ErrnoError(i);if(!n.node_ops.symlink)throw new eN.ErrnoError(63);return n.node_ops.symlink(n,r,e)},rename(e,t){var n,r,i,o=eP.dirname(e),a=eP.dirname(t),s=eP.basename(e),l=eP.basename(t);if(n=eN.lookupPath(e,{parent:!0}).node,r=eN.lookupPath(t,{parent:!0}).node,!n||!r)throw new eN.ErrnoError(44);if(n.mount!==r.mount)throw new eN.ErrnoError(75);var u=eN.lookupNode(n,s),d=eb.relative(e,a);if("."!==d.charAt(0))throw new eN.ErrnoError(28);if("."!==(d=eb.relative(t,o)).charAt(0))throw new eN.ErrnoError(55);try{i=eN.lookupNode(r,l)}catch(e){}if(u!==i){var c=eN.isDir(u.mode),f=eN.mayDelete(n,s,c);if(f||(f=i?eN.mayDelete(r,l,c):eN.mayCreate(r,l)))throw new eN.ErrnoError(f);if(!n.node_ops.rename)throw new eN.ErrnoError(63);if(eN.isMountpoint(u)||i&&eN.isMountpoint(i))throw new eN.ErrnoError(10);if(r!==n&&(f=eN.nodePermissions(n,"w")))throw new eN.ErrnoError(f);eN.hashRemoveNode(u);try{n.node_ops.rename(u,r,l),u.parent=r}catch(e){throw e}finally{eN.hashAddNode(u)}}},rmdir(e){var t=eN.lookupPath(e,{parent:!0}).node,n=eP.basename(e),r=eN.lookupNode(t,n),i=eN.mayDelete(t,n,!0);if(i)throw new eN.ErrnoError(i);if(!t.node_ops.rmdir)throw new eN.ErrnoError(63);if(eN.isMountpoint(r))throw new eN.ErrnoError(10);t.node_ops.rmdir(t,n),eN.destroyNode(r)},readdir(e){var t=eN.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new eN.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=eN.lookupPath(e,{parent:!0}).node;if(!t)throw new eN.ErrnoError(44);var n=eP.basename(e),r=eN.lookupNode(t,n),i=eN.mayDelete(t,n,!1);if(i)throw new eN.ErrnoError(i);if(!t.node_ops.unlink)throw new eN.ErrnoError(63);if(eN.isMountpoint(r))throw new eN.ErrnoError(10);t.node_ops.unlink(t,n),eN.destroyNode(r)},readlink(e){var t=eN.lookupPath(e).node;if(!t)throw new eN.ErrnoError(44);if(!t.node_ops.readlink)throw new eN.ErrnoError(28);return eb.resolve(eN.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var n=eN.lookupPath(e,{follow:!t}).node;if(!n)throw new eN.ErrnoError(44);if(!n.node_ops.getattr)throw new eN.ErrnoError(63);return n.node_ops.getattr(n)},lstat:e=>eN.stat(e,!0),chmod(e,t,n){var r;if(!(r="string"==typeof e?eN.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new eN.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})},lchmod(e,t){eN.chmod(e,t,!0)},fchmod(e,t){var n=eN.getStreamChecked(e);eN.chmod(n.node,t)},chown(e,t,n,r){var i;if(!(i="string"==typeof e?eN.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new eN.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,n){eN.chown(e,t,n,!0)},fchown(e,t,n){var r=eN.getStreamChecked(e);eN.chown(r.node,t,n)},truncate(e,t){if(t<0)throw new eN.ErrnoError(28);if("string"==typeof e){var n;n=eN.lookupPath(e,{follow:!0}).node}else n=e;if(!n.node_ops.setattr)throw new eN.ErrnoError(63);if(eN.isDir(n.mode))throw new eN.ErrnoError(31);if(!eN.isFile(n.mode))throw new eN.ErrnoError(28);var r=eN.nodePermissions(n,"w");if(r)throw new eN.ErrnoError(r);n.node_ops.setattr(n,{size:t,timestamp:Date.now()})},ftruncate(e,t){var n=eN.getStreamChecked(e);if((2097155&n.flags)==0)throw new eN.ErrnoError(28);eN.truncate(n.node,t)},utime(e,t,n){var r=eN.lookupPath(e,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(t,n)})},open(e,n,r){if(""===e)throw new eN.ErrnoError(44);if(r=64&(n="string"==typeof n?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw Error(`Unknown file open mode: ${e}`);return t})(n):n)?4095&(r=void 0===r?438:r)|32768:0,"object"==typeof e)i=e;else{e=eP.normalize(e);try{var i;i=eN.lookupPath(e,{follow:!(131072&n)}).node}catch(e){}}var o=!1;if(64&n)if(i){if(128&n)throw new eN.ErrnoError(20)}else i=eN.mknod(e,r,0),o=!0;if(!i)throw new eN.ErrnoError(44);if(eN.isChrdev(i.mode)&&(n&=-513),65536&n&&!eN.isDir(i.mode))throw new eN.ErrnoError(54);if(!o){var a=eN.mayOpen(i,n);if(a)throw new eN.ErrnoError(a)}512&n&&!o&&eN.truncate(i,0),n&=-131713;var s=eN.createStream({node:i,path:eN.getPath(i),flags:n,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!t.logReadFiles||1&n||e in eN.readFiles||(eN.readFiles[e]=1),s},close(e){if(eN.isClosed(e))throw new eN.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{eN.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,n){if(eN.isClosed(e))throw new eN.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new eN.ErrnoError(70);if(0!=n&&1!=n&&2!=n)throw new eN.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,n),e.ungotten=[],e.position},read(e,t,n,r,i){if(M(n>=0),r<0||i<0)throw new eN.ErrnoError(28);if(eN.isClosed(e)||(2097155&e.flags)==1)throw new eN.ErrnoError(8);if(eN.isDir(e.node.mode))throw new eN.ErrnoError(31);if(!e.stream_ops.read)throw new eN.ErrnoError(28);var o=void 0!==i;if(o){if(!e.seekable)throw new eN.ErrnoError(70)}else i=e.position;var a=e.stream_ops.read(e,t,n,r,i);return o||(e.position+=a),a},write(e,t,n,r,i,o){if(M(n>=0),r<0||i<0)throw new eN.ErrnoError(28);if(eN.isClosed(e)||(2097155&e.flags)==0)throw new eN.ErrnoError(8);if(eN.isDir(e.node.mode))throw new eN.ErrnoError(31);if(!e.stream_ops.write)throw new eN.ErrnoError(28);e.seekable&&1024&e.flags&&eN.llseek(e,0,2);var a=void 0!==i;if(a){if(!e.seekable)throw new eN.ErrnoError(70)}else i=e.position;var s=e.stream_ops.write(e,t,n,r,i,o);return a||(e.position+=s),s},allocate(e,t,n){if(eN.isClosed(e))throw new eN.ErrnoError(8);if(t<0||n<=0)throw new eN.ErrnoError(28);if((2097155&e.flags)==0)throw new eN.ErrnoError(8);if(!eN.isFile(e.node.mode)&&!eN.isDir(e.node.mode))throw new eN.ErrnoError(43);if(!e.stream_ops.allocate)throw new eN.ErrnoError(138);e.stream_ops.allocate(e,t,n)},mmap(e,t,n,r,i){if((2&r)!=0&&(2&i)==0&&(2097155&e.flags)!=2||(2097155&e.flags)==1)throw new eN.ErrnoError(2);if(!e.stream_ops.mmap)throw new eN.ErrnoError(43);if(!t)throw new eN.ErrnoError(28);return e.stream_ops.mmap(e,t,n,r,i)},msync:(e,t,n,r,i)=>(M(n>=0),e.stream_ops.msync)?e.stream_ops.msync(e,t,n,r,i):0,ioctl(e,t,n){if(!e.stream_ops.ioctl)throw new eN.ErrnoError(59);return e.stream_ops.ioctl(e,t,n)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw Error(`Invalid encoding type "${t.encoding}"`);var n,r=eN.open(e,t.flags),i=eN.stat(e).size,o=new Uint8Array(i);return eN.read(r,o,0,i,0),"utf8"===t.encoding?n=eF(o):"binary"===t.encoding&&(n=o),eN.close(r),n},writeFile(e,t,n={}){n.flags=n.flags||577;var r=eN.open(e,n.flags,n.mode);if("string"==typeof t){var i=new Uint8Array(ew(t)+1),o=eE(t,i,0,i.length);eN.write(r,i,0,o,void 0,n.canOwn)}else if(ArrayBuffer.isView(t))eN.write(r,t,0,t.byteLength,void 0,n.canOwn);else throw Error("Unsupported data type");eN.close(r)},cwd:()=>eN.currentPath,chdir(e){var t=eN.lookupPath(e,{follow:!0});if(null===t.node)throw new eN.ErrnoError(44);if(!eN.isDir(t.node.mode))throw new eN.ErrnoError(54);var n=eN.nodePermissions(t.node,"x");if(n)throw new eN.ErrnoError(n);eN.currentPath=t.path},createDefaultDirectories(){eN.mkdir("/tmp"),eN.mkdir("/home"),eN.mkdir("/home/web_user")},createDefaultDevices(){eN.mkdir("/dev"),eN.registerDevice(eN.makedev(1,3),{read:()=>0,write:(e,t,n,r,i)=>r,llseek:()=>0}),eN.mkdev("/dev/null",eN.makedev(1,3)),ev.register(eN.makedev(5,0),ev.default_tty_ops),ev.register(eN.makedev(6,0),ev.default_tty1_ops),eN.mkdev("/dev/tty",eN.makedev(5,0)),eN.mkdev("/dev/tty1",eN.makedev(6,0));var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=eD(e).byteLength),e[--t]);eN.createDevice("/dev","random",n),eN.createDevice("/dev","urandom",n),eN.mkdir("/dev/shm"),eN.mkdir("/dev/shm/tmp")},createSpecialDirectories(){eN.mkdir("/proc");var e=eN.mkdir("/proc/self");eN.mkdir("/proc/self/fd"),eN.mount({mount(){var t=eN.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var n=eN.getStreamChecked(+t),r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams(e,t,n){e?eN.createDevice("/dev","stdin",e):eN.symlink("/dev/tty","/dev/stdin"),t?eN.createDevice("/dev","stdout",null,t):eN.symlink("/dev/tty","/dev/stdout"),n?eN.createDevice("/dev","stderr",null,n):eN.symlink("/dev/tty1","/dev/stderr");var r=eN.open("/dev/stdin",0),i=eN.open("/dev/stdout",1),o=eN.open("/dev/stderr",1);M(0===r.fd,`invalid handle for stdin (${r.fd})`),M(1===i.fd,`invalid handle for stdout (${i.fd})`),M(2===o.fd,`invalid handle for stderr (${o.fd})`)},staticInit(){eN.nameTable=Array(4096),eN.mount(ex,{},"/"),eN.createDefaultDirectories(),eN.createDefaultDevices(),eN.createSpecialDirectories(),eN.filesystems={MEMFS:ex}},init(e,n,r){M(!eN.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),eN.initialized=!0,e??(e=t.stdin),n??(n=t.stdout),r??(r=t.stderr),eN.createStandardStreams(e,n,r)},quit(){eN.initialized=!1,eJ(0);for(var e=0;etypeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{e.contents=o(e.url),e.usedBytes=e.contents.length}catch(e){throw new eN.ErrnoError(29)}},createLazyFile(e,t,n,r,i){if("u">typeof XMLHttpRequest){if(!E)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o={isDevice:!1,contents:new class{constructor(){S(this,"lengthKnown",!1),S(this,"chunks",[])}get(e){if(!(e>this.length-1)&&!(e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}}setDataGetter(e){this.getter=e}cacheLength(){var e,t=new XMLHttpRequest;if(t.open("HEAD",n,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw Error("Couldn\'t load "+n+". Status: "+t.status);var r=Number(t.getResponseHeader("Content-length")),i=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,o=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;i||(a=r);var s=this;s.setDataGetter(e=>{var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw Error("Couldn\'t load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):eA(i.responseText||"",!0)})(t,i)),void 0===s.chunks[e])throw Error("doXHR failed!");return s.chunks[e]}),(o||!r)&&(a=r=1,a=r=this.getter(0).length,I("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}}}else var o={isDevice:!1,url:n};var a=eN.createFile(e,t,o,r,i);o.contents?a.contents=o.contents:o.url&&(a.contents=null,a.url=o.url),Object.defineProperties(a,{usedBytes:{get:function(){return this.contents.length}}});var l={};function u(e,t,n,r,i){var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,r);if(M(a>=0),o.slice)for(var s=0;s{var t=a.stream_ops[e];l[e]=(...e)=>(eN.forceLoadFile(a),t(...e))}),l.read=(e,t,n,r,i)=>(eN.forceLoadFile(a),u(e,t,n,r,i)),l.mmap=(e,t,n,r,i)=>{eN.forceLoadFile(a);var o=ek(t);if(!o)throw new eN.ErrnoError(48);return u(e,s,o,t,n),{ptr:o,allocated:!0}},a.stream_ops=l,a},absolutePath(){J("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){J("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){J("FS.createLink has been removed; use FS.symlink instead")},joinPath(){J("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){J("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){J("FS.standardizePath has been removed; use PATH.normalize instead")}},eC={DEFAULT_POLLMASK:5,calculateAt(e,t,n){if(eP.isAbs(t))return t;if(-100===e)r=eN.cwd();else{var r;r=eC.getStreamFromFD(e).path}if(0==t.length){if(!n)throw new eN.ErrnoError(44);return r}return eP.join2(r,t)},doStat(e,t,n){var r=e(t);c[n>>>2>>>0]=r.dev,c[n+4>>>2>>>0]=r.mode,f[n+8>>>2>>>0]=r.nlink,c[n+12>>>2>>>0]=r.uid,c[n+16>>>2>>>0]=r.gid,c[n+20>>>2>>>0]=r.rdev,g=[r.size>>>0,+Math.abs(F=r.size)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+24>>>2>>>0]=g[0],c[n+28>>>2>>>0]=g[1],c[n+32>>>2>>>0]=4096,c[n+36>>>2>>>0]=r.blocks;var i=r.atime.getTime(),o=r.mtime.getTime(),a=r.ctime.getTime();return g=[Math.floor(i/1e3)>>>0,+Math.abs(F=Math.floor(i/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+40>>>2>>>0]=g[0],c[n+44>>>2>>>0]=g[1],f[n+48>>>2>>>0]=i%1e3*1e6,g=[Math.floor(o/1e3)>>>0,+Math.abs(F=Math.floor(o/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+56>>>2>>>0]=g[0],c[n+60>>>2>>>0]=g[1],f[n+64>>>2>>>0]=o%1e3*1e6,g=[Math.floor(a/1e3)>>>0,+Math.abs(F=Math.floor(a/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+72>>>2>>>0]=g[0],c[n+76>>>2>>>0]=g[1],f[n+80>>>2>>>0]=a%1e3*1e6,g=[r.ino>>>0,+Math.abs(F=r.ino)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+88>>>2>>>0]=g[0],c[n+92>>>2>>>0]=g[1],0},doMsync(e,t,n,r,i){if(!eN.isFile(t.node.mode))throw new eN.ErrnoError(43);if(2&r)return 0;var o=l.slice(e,e+n);eN.msync(t,o,i,n,r)},getStreamFromFD:e=>eN.getStreamChecked(e),varargs:void 0,getStr:e=>eg(e)},ej=(e,t,n)=>(M("number"==typeof n,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),eE(e,l,t,n)),eM=[0,31,60,91,121,152,182,213,244,274,305,335],eR=[0,31,59,90,120,151,181,212,243,273,304,334],eT=e=>{var t=a.buffer,n=(e-t.byteLength+65535)/65536|0;try{return a.grow(n),R(),1}catch(n){N(`growMemory: Attempted to grow heap from ${t.byteLength} bytes to ${e} bytes, but got error: ${n}`)}},eB={},eL=()=>{if(!eL.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:G||"./this.program"};for(var t in eB)void 0===eB[t]?delete e[t]:e[t]=eB[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);eL.strings=n}return eL.strings},e$=[],ez=e=>{var t=e$[e];return t||(e>=e$.length&&(e$.length=e+1),e$[e]=t=_.get(e)),M(_.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t},eU="u">typeof TextDecoder?new TextDecoder("utf-16le"):void 0,eV=(e,t)=>{M(e<16384),e<128?t.push(e):t.push(e%128|128,e>>7)},eW=[],eq=(e,t)=>{_.set(e,t),e$[e]=_.get(e)},eH=(e,n,r,i,o)=>{var a,l,u={string:e=>{var t,n,r=0;return null!=e&&0!==e&&(t=ew(e)+1,ej(e,n=e2(t),t),r=n),r},array:e=>{let t;var n=(t=e.length,e2(t));return M(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),s.set(e,n>>>0),n}},d=(M(a=t["_"+e],"Cannot call unknown function "+e+", make sure it is exported"),a),c=[],f=0;if(M("array"!==n,\'Return type should not be "array".\'),i)for(var m=0;m{var c,f=t?eb.resolve(eP.join2(e,t)):e,m=H(`cp ${f}`);function p(n){var i,c;function p(n){d?.(),l||eN.createDataFile(e,t,n,r,o,u),a?.(),Z(m)}i=()=>{s?.(),Z(m)},"u">typeof Browser&&Browser.init(),c=!1,eG.forEach(e=>{!c&&e.canHandle(f)&&(e.handle(n,f,p,i),c=!0)}),c||p(n)}(K(m),"string"==typeof n)?(c=H(`al ${n}`),i(n).then(e=>{M(e,`Loading data file "${n}" failed (no arrayBuffer).`),p(new Uint8Array(e)),c&&Z(c)},e=>{if(s)s();else throw`Loading data file "${n}" failed.`}),c&&K(c)):p(n)},eN.staticInit();var eK={EPDF_FillFromHostCrypto:function(e,t){var n=globalThis.crypto;if(!n||"function"!=typeof n.getRandomValues)return 0;e>>>=0,t>>>=0;try{n.getRandomValues(l.subarray(e>>>0,e+t>>>0))}catch{return 0}return 1},__assert_fail:function(e,t,n,r){e>>>=0,t>>>=0,r>>>=0,J(`Assertion failed: ${eg(e)}, at: `+[t?eg(t):"unknown filename",n,r?eg(r):"unknown function"])},__syscall_fcntl64:function(e,t,n){eC.varargs=n>>>=0;try{var r=eC.getStreamFromFD(e);switch(t){case 0:var i=e_();if(i<0)break;for(;eN.streams[i];)i++;return eN.dupStream(r,i).fd;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:var i=e_();return r.flags|=i,0;case 12:var i=e_();return u[i+0>>>1>>>0]=2,0}return -28}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fstat64:function(e,t){t>>>=0;try{var n=eC.getStreamFromFD(e);return eC.doStat(eN.stat,n.path,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ftruncate64:function(e,t,n){var r=ep(t,n);try{if(isNaN(r))return 61;return eN.ftruncate(e,r),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_getdents64:function(e,t,n){t>>>=0,n>>>=0;try{var r=eC.getStreamFromFD(e);r.getdents||(r.getdents=eN.readdir(r.path));for(var i=0,o=eN.llseek(r,0,1),a=Math.floor(o/280);a>>0,(F=l,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[t+i>>>2>>>0]=g[0],c[t+i+4>>>2>>>0]=g[1],g=[(a+1)*280>>>0,(F=(a+1)*280,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[t+i+8>>>2>>>0]=g[0],c[t+i+12>>>2>>>0]=g[1],u[t+i+16>>>1>>>0]=280,s[t+i+18>>>0]=d,ej(f,t+i+19,256),i+=280,a+=1}return eN.llseek(r,280*a,0),i}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ioctl:function(e,t,n){eC.varargs=n>>>=0;try{var r=eC.getStreamFromFD(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:if(!r.tty)return -59;return 0;case 21505:if(!r.tty)return -59;if(r.tty.ops.ioctl_tcgets){var i=r.tty.ops.ioctl_tcgets(r),o=e_();c[o>>>2>>>0]=i.c_iflag||0,c[o+4>>>2>>>0]=i.c_oflag||0,c[o+8>>>2>>>0]=i.c_cflag||0,c[o+12>>>2>>>0]=i.c_lflag||0;for(var a=0;a<32;a++)s[o+a+17>>>0]=i.c_cc[a]||0}return 0;case 21506:case 21507:case 21508:if(!r.tty)return -59;if(r.tty.ops.ioctl_tcsets){for(var o=e_(),l=c[o>>>2>>>0],d=c[o+4>>>2>>>0],f=c[o+8>>>2>>>0],m=c[o+12>>>2>>>0],p=[],a=0;a<32;a++)p.push(s[o+a+17>>>0]);return r.tty.ops.ioctl_tcsets(r.tty,t,{c_iflag:l,c_oflag:d,c_cflag:f,c_lflag:m,c_cc:p})}return 0;case 21519:if(!r.tty)return -59;var o=e_();return c[o>>>2>>>0]=0,0;case 21520:if(!r.tty)return -59;return -28;case 21531:var o=e_();return eN.ioctl(r,t,o);case 21523:if(!r.tty)return -59;if(r.tty.ops.ioctl_tiocgwinsz){var h=r.tty.ops.ioctl_tiocgwinsz(r.tty),o=e_();u[o>>>1>>>0]=h[0],u[o+2>>>1>>>0]=h[1]}return 0;default:return -28}}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_lstat64:function(e,t){e>>>=0,t>>>=0;try{return e=eC.getStr(e),eC.doStat(eN.lstat,e,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_newfstatat:function(e,t,n,r){t>>>=0,n>>>=0;try{t=eC.getStr(t);var i=256&r,o=4096&r;return r&=-6401,M(!r,`unknown flags in __syscall_newfstatat: ${r}`),t=eC.calculateAt(e,t,o),eC.doStat(i?eN.lstat:eN.stat,t,n)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,t,n,r){t>>>=0,eC.varargs=r>>>=0;try{t=eC.getStr(t),t=eC.calculateAt(e,t);var i=r?e_():0;return eN.open(t,n,i).fd}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_rmdir:function(e){e>>>=0;try{return e=eC.getStr(e),eN.rmdir(e),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_stat64:function(e,t){e>>>=0,t>>>=0;try{return e=eC.getStr(e),eC.doStat(eN.stat,e,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_unlinkat:function(e,t,n){t>>>=0;try{return t=eC.getStr(t),t=eC.calculateAt(e,t),0===n?eN.unlink(t):512===n?eN.rmdir(t):J("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_abort_js:()=>{J("native code called abort()")},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:function(e,t,n){return e>>>=0,t>>>=0,n>>>=0,l.copyWithin(e>>>0,t>>>0,t+n>>>0)},_emscripten_throw_longjmp:()=>{throw 1/0},_gmtime_js:function(e,t,n){var r=ep(e,t);n>>>=0;var i=new Date(1e3*r);c[n>>>2>>>0]=i.getUTCSeconds(),c[n+4>>>2>>>0]=i.getUTCMinutes(),c[n+8>>>2>>>0]=i.getUTCHours(),c[n+12>>>2>>>0]=i.getUTCDate(),c[n+16>>>2>>>0]=i.getUTCMonth(),c[n+20>>>2>>>0]=i.getUTCFullYear()-1900,c[n+24>>>2>>>0]=i.getUTCDay();var o=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),a=(i.getTime()-o)/864e5|0;c[n+28>>>2>>>0]=a},_localtime_js:function(e,t,n){let r;var i=ep(e,t);n>>>=0;var o=new Date(1e3*i);c[n>>>2>>>0]=o.getSeconds(),c[n+4>>>2>>>0]=o.getMinutes(),c[n+8>>>2>>>0]=o.getHours(),c[n+12>>>2>>>0]=o.getDate(),c[n+16>>>2>>>0]=o.getMonth(),c[n+20>>>2>>>0]=o.getFullYear()-1900,c[n+24>>>2>>>0]=o.getDay();var a=0|((r=o.getFullYear())%4==0&&(r%100!=0||r%400==0)?eM:eR)[o.getMonth()]+o.getDate()-1;c[n+28>>>2>>>0]=a,c[n+36>>>2>>>0]=-(60*o.getTimezoneOffset());var s=new Date(o.getFullYear(),0,1),l=new Date(o.getFullYear(),6,1).getTimezoneOffset(),u=s.getTimezoneOffset(),d=0|(l!=u&&o.getTimezoneOffset()==Math.min(u,l));c[n+32>>>2>>>0]=d},_mmap_js:function(e,t,n,r,i,o,a,s){e>>>=0;var l=ep(i,o);a>>>=0,s>>>=0;try{if(isNaN(l))return 61;var u=eC.getStreamFromFD(r),d=eN.mmap(u,e,l,t,n),m=d.ptr;return c[a>>>2>>>0]=d.allocated,f[s>>>2>>>0]=m,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_munmap_js:function(e,t,n,r,i,o,a){e>>>=0,t>>>=0;var s=ep(o,a);try{var l=eC.getStreamFromFD(i);2&n&&eC.doMsync(e,l,t,r,s)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_tzset_js:function(e,t,n,r){e>>>=0,t>>>=0,n>>>=0,r>>>=0;var i=(new Date).getFullYear(),o=new Date(i,0,1),a=new Date(i,6,1),s=o.getTimezoneOffset(),l=a.getTimezoneOffset(),u=Math.max(s,l);f[e>>>2>>>0]=60*u,c[t>>>2>>>0]=Number(s!=l);var d=e=>{var t=Math.abs(e),n=String(Math.floor(t/60)).padStart(2,"0"),r=String(t%60).padStart(2,"0");return`UTC${e>=0?"-":"+"}${n}${r}`},m=d(s),p=d(l);M(m),M(p),M(16>=ew(m),`timezone name truncated to fit in TZNAME_MAX (${m})`),M(16>=ew(p),`timezone name truncated to fit in TZNAME_MAX (${p})`),lDate.now(),emscripten_err:function(e){return e>>>=0,N(eg(e))},emscripten_get_now:()=>performance.now(),emscripten_resize_heap:function(e){e>>>=0;var t=l.length;M(e>t);if(e>0xffff0000)return N(`Cannot enlarge memory, requested ${e} bytes, but the limit is 4294901760 bytes!`),!1;for(var n=1;n<=4;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+0x6000000);var i=Math.min(0xffff0000,eS(Math.max(e,r),65536));if(eT(i))return!0}return N(`Failed to grow the heap from ${t} bytes to ${i} bytes, not enough memory!`),!1},environ_get:function(e,t){e>>>=0,t>>>=0;var n=0;return eL().forEach((r,i)=>{var o=t+n;f[e+4*i>>>2>>>0]=o;for(var a=o,l=0;l>>0]=r.charCodeAt(l);s[a>>>0]=0,n+=r.length+1}),0},environ_sizes_get:function(e,t){e>>>=0,t>>>=0;var n=eL();f[e>>>2>>>0]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),f[t>>>2>>>0]=r,0},exit:(e,n)=>{if(function(){var e=I,t=N,n=!1;I=N=e=>{n=!0};try{eJ(0),["stdout","stderr"].forEach(e=>{var t=eN.analyzePath("/dev/"+e);if(t){var r=t.object.rdev,i=ev.ttys[r];i?.output?.length&&(n=!0)}})}catch{}I=e,N=t,n&&em("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}(),(ed||0)&&!n){var i=`program exited (with status: ${e}), but keepRuntimeAlive() is set (counter=0) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;r(i),N(i)}throw ed||(t.onExit?.(e),j=!0),new el(e)},fd_close:function(e){try{var t=eC.getStreamFromFD(e);return eN.close(t),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,t,n,r){t>>>=0,n>>>=0,r>>>=0;try{var i=eC.getStreamFromFD(e),o=((e,t,n,r)=>{for(var i=0,o=0;o>>2>>>0],l=f[t+4>>>2>>>0];t+=8;var u=eN.read(e,s,a,l,r);if(u<0)return -1;if(i+=u,u>>2>>>0]=o,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,t,n,r,i){var o=ep(t,n);i>>>=0;try{if(isNaN(o))return 61;var a=eC.getStreamFromFD(e);return eN.llseek(a,o,r),g=[a.position>>>0,(F=a.position,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[i>>>2>>>0]=g[0],c[i+4>>>2>>>0]=g[1],a.getdents&&0===o&&0===r&&(a.getdents=null),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_sync:function(e){try{var t=eC.getStreamFromFD(e);if(t.stream_ops?.fsync)return t.stream_ops.fsync(t);return 0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_write:function(e,t,n,r){t>>>=0,n>>>=0,r>>>=0;try{var i=eC.getStreamFromFD(e),o=((e,t,n,r)=>{for(var i=0,o=0;o>>2>>>0],l=f[t+4>>>2>>>0];t+=8;var u=eN.write(e,s,a,l,r);if(u<0)return -1;if(i+=u,u>>2>>>0]=o,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},invoke_ii:function(e,t){var n=ef();try{return ez(e)(t)}catch(e){if(e3(n),e!==e+0)throw e;eY(1,0)}},invoke_iii:function(e,t,n){var r=ef();try{return ez(e)(t,n)}catch(e){if(e3(r),e!==e+0)throw e;eY(1,0)}},invoke_iiii:function(e,t,n,r){var i=ef();try{return ez(e)(t,n,r)}catch(e){if(e3(i),e!==e+0)throw e;eY(1,0)}},invoke_iiiii:function(e,t,n,r,i){var o=ef();try{return ez(e)(t,n,r,i)}catch(e){if(e3(o),e!==e+0)throw e;eY(1,0)}},invoke_iiiiii:function(e,t,n,r,i,o){var a=ef();try{return ez(e)(t,n,r,i,o)}catch(e){if(e3(a),e!==e+0)throw e;eY(1,0)}},invoke_iiiiiii:function(e,t,n,r,i,o,a){var s=ef();try{return ez(e)(t,n,r,i,o,a)}catch(e){if(e3(s),e!==e+0)throw e;eY(1,0)}},invoke_v:function(e){var t=ef();try{ez(e)()}catch(e){if(e3(t),e!==e+0)throw e;eY(1,0)}},invoke_vi:function(e,t){var n=ef();try{ez(e)(t)}catch(e){if(e3(n),e!==e+0)throw e;eY(1,0)}},invoke_vii:function(e,t,n){var r=ef();try{ez(e)(t,n)}catch(e){if(e3(r),e!==e+0)throw e;eY(1,0)}},invoke_viii:function(e,t,n,r){var i=ef();try{ez(e)(t,n,r)}catch(e){if(e3(i),e!==e+0)throw e;eY(1,0)}},invoke_viiii:function(e,t,n,r,i){var o=ef();try{ez(e)(t,n,r,i)}catch(e){if(e3(o),e!==e+0)throw e;eY(1,0)}},invoke_viiiiiiiii:function(e,t,n,r,i,o,a,s,l,u){var d=ef();try{ez(e)(t,n,r,i,o,a,s,l,u)}catch(e){if(e3(d),e!==e+0)throw e;eY(1,0)}}},eZ=function(){function e(e,n){var r,i,o,s;let l,u;return i=Object.assign({},i=eZ=e.exports),o=e=>t=>e(t)>>>0,s=e=>()=>e()>>>0,i.strerror=(l=i.strerror,e=>l(e)>>>0),i.emscripten_builtin_memalign=(u=i.emscripten_builtin_memalign,(e,t)=>u(e,t)>>>0),i.malloc=o(i.malloc),i.emscripten_stack_get_base=s(i.emscripten_stack_get_base),i.emscripten_stack_get_end=s(i.emscripten_stack_get_end),i._emscripten_stack_alloc=o(i._emscripten_stack_alloc),i.emscripten_stack_get_current=s(i.emscripten_stack_get_current),t.wasmExports=eZ=i,M(a=eZ.memory,"memory not found in wasm exports"),R(),M(_=eZ.__indirect_function_table,"table not found in wasm exports"),r=eZ.__wasm_call_ctors,L.unshift(r),Z("wasm-instantiate"),eZ}K("wasm-instantiate");var n,i,o=t,s={env:eK,wasi_snapshot_preview1:eK};if(t.instantiateWasm)try{return t.instantiateWasm(s,e)}catch(e){N(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}return h??(h=function(){if(t.locateFile){var e="embedpdf.wasm";return e.startsWith("data:application/octet-stream;base64,")?e:t.locateFile?t.locateFile(e,O):O+e}return new URL("embedpdf.wasm",self.location.href).href}()),(n=h,i=function(n){M(t===o,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),o=null,e(n.instance)},!C&&"function"==typeof WebAssembly.instantiateStreaming&&!n.startsWith("data:application/octet-stream;base64,")&&"function"==typeof fetch?fetch(n,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,s).then(i,function(e){return N(`wasm streaming compile failed: ${e}`),N("falling back to ArrayBuffer instantiation"),ee(n,s,i)})):ee(n,s,i)).catch(r),{}}();X("__wasm_call_ctors",0),t._EPDFAction_CloseModel=X("EPDFAction_CloseModel",1),t._EPDFAction_LoadModel=X("EPDFAction_LoadModel",1),t._EPDFAction_GetRootNode=X("EPDFAction_GetRootNode",1),t._EPDFAction_GetNodeCount=X("EPDFAction_GetNodeCount",1),t._EPDFAction_GetNodeType=X("EPDFAction_GetNodeType",2),t._EPDFAction_GetNodeSubtype=X("EPDFAction_GetNodeSubtype",4),t._EPDFAction_NodeHasJavaScript=X("EPDFAction_NodeHasJavaScript",2),t._EPDFAction_GetNodeJavaScript=X("EPDFAction_GetNodeJavaScript",4),t._EPDFAction_GetNodeDest=X("EPDFAction_GetNodeDest",3),t._EPDFAction_GetNodeURI=X("EPDFAction_GetNodeURI",5),t._EPDFAction_GetNodeFilePath=X("EPDFAction_GetNodeFilePath",4),t._EPDFAction_GetNodeName=X("EPDFAction_GetNodeName",4),t._EPDFAction_GetNodeTargetCount=X("EPDFAction_GetNodeTargetCount",2),t._EPDFAction_GetNodeTargetName=X("EPDFAction_GetNodeTargetName",5),t._EPDFAction_GetNodeTargetObjectNumber=X("EPDFAction_GetNodeTargetObjectNumber",4),t._EPDFAction_GetNodeHideFlag=X("EPDFAction_GetNodeHideFlag",3),t._EPDFAction_GetNodeResetForm=X("EPDFAction_GetNodeResetForm",4),t._EPDFAction_GetNodeSubmitForm=X("EPDFAction_GetNodeSubmitForm",4),t._EPDFAction_GetNodeSubmitFormURL=X("EPDFAction_GetNodeSubmitFormURL",4),t._EPDFAction_GetNodeSubmitFormCharSet=X("EPDFAction_GetNodeSubmitFormCharSet",4),t._EPDFAction_GetNodeURIIsMap=X("EPDFAction_GetNodeURIIsMap",3),t._EPDFAction_GetNextCount=X("EPDFAction_GetNextCount",2),t._EPDFAction_GetNextAt=X("EPDFAction_GetNextAt",3),t._EPDFAction_GetWarningFlags=X("EPDFAction_GetWarningFlags",1),t._EPDFAction_IsComplete=X("EPDFAction_IsComplete",1),t._EPDFDoc_GetOpenActionModel=X("EPDFDoc_GetOpenActionModel",1),t._EPDFDoc_GetOpenActionDest=X("EPDFDoc_GetOpenActionDest",1),t._EPDFDoc_GetAdditionalActionModel=X("EPDFDoc_GetAdditionalActionModel",2),t._EPDFDoc_GetPageActionModel=X("EPDFDoc_GetPageActionModel",3),t._EPDFAnnot_GetActionModel=X("EPDFAnnot_GetActionModel",2),t._EPDFAction_CreateJavaScript=X("EPDFAction_CreateJavaScript",2),t._EPDFAction_CreateHide=X("EPDFAction_CreateHide",4),t._EPDFAction_CreateResetForm=X("EPDFAction_CreateResetForm",4),t._EPDFAction_CreateSubmitForm=X("EPDFAction_CreateSubmitForm",5),t._EPDFAction_SetNext=X("EPDFAction_SetNext",4),t._EPDFAnnot_SetEventAction=X("EPDFAnnot_SetEventAction",3),t._EPDFAnnot_SetNumberValue=X("EPDFAnnot_SetNumberValue",3),t._EPDFAnnot_HasEmbedMetadata=X("EPDFAnnot_HasEmbedMetadata",1),t._EPDFAnnot_ClearEmbedMetadata=X("EPDFAnnot_ClearEmbedMetadata",1),t._EPDFAnnot_ClearEmbedMetadataKey=X("EPDFAnnot_ClearEmbedMetadataKey",2),t._EPDFAnnot_SetEmbedMetadataString=X("EPDFAnnot_SetEmbedMetadataString",3),t._EPDFAnnot_GetEmbedMetadataString=X("EPDFAnnot_GetEmbedMetadataString",4),t._EPDFAnnot_SetEmbedMetadataNumber=X("EPDFAnnot_SetEmbedMetadataNumber",3),t._EPDFAnnot_GetEmbedMetadataNumber=X("EPDFAnnot_GetEmbedMetadataNumber",3),t._EPDFAnnot_SetEmbedMetadataBoolean=X("EPDFAnnot_SetEmbedMetadataBoolean",3),t._EPDFAnnot_GetEmbedMetadataBoolean=X("EPDFAnnot_GetEmbedMetadataBoolean",3),t._EPDFAnnot_SetEmbedMetadataRect=X("EPDFAnnot_SetEmbedMetadataRect",3),t._EPDFAnnot_GetEmbedMetadataRect=X("EPDFAnnot_GetEmbedMetadataRect",3),t._EPDFAnnot_SetEmbedMetadataJSON=X("EPDFAnnot_SetEmbedMetadataJSON",2),t._EPDFAnnot_GetEmbedMetadataJSON=X("EPDFAnnot_GetEmbedMetadataJSON",3),t._EPDFDocument_ClearEmbedMetadata=X("EPDFDocument_ClearEmbedMetadata",1),t._EPDFAnnot_SetAction=X("EPDFAnnot_SetAction",2),t._EPDFAnnot_RemoveAction=X("EPDFAnnot_RemoveAction",1),t._EPDFAnnot_RemoveDest=X("EPDFAnnot_RemoveDest",1),t._EPDFAnnot_RemoveKey=X("EPDFAnnot_RemoveKey",2),t._EPDFAnnot_GetFileAttachmentForWrite=X("EPDFAnnot_GetFileAttachmentForWrite",1),t._EPDFAnnot_SetColor=X("EPDFAnnot_SetColor",5),t._EPDFAnnot_GetColor=X("EPDFAnnot_GetColor",5),t._EPDFAnnot_ClearColor=X("EPDFAnnot_ClearColor",2),t._EPDFAnnot_SetNoColor=X("EPDFAnnot_SetNoColor",2),t._EPDFAnnot_SetOpacity=X("EPDFAnnot_SetOpacity",2),t._EPDFAnnot_GetOpacity=X("EPDFAnnot_GetOpacity",2),t._EPDFAnnot_GetBorderEffect=X("EPDFAnnot_GetBorderEffect",2),t._EPDFAnnot_SetBorderEffect=X("EPDFAnnot_SetBorderEffect",2),t._EPDFAnnot_ClearBorderEffect=X("EPDFAnnot_ClearBorderEffect",1),t._EPDFAnnot_GetRectangleDifferences=X("EPDFAnnot_GetRectangleDifferences",5),t._EPDFAnnot_ClearRectangleDifferences=X("EPDFAnnot_ClearRectangleDifferences",1),t._EPDFAnnot_GetBorderDashPatternCount=X("EPDFAnnot_GetBorderDashPatternCount",1),t._EPDFAnnot_GetBorderDashPattern=X("EPDFAnnot_GetBorderDashPattern",3),t._EPDFAnnot_SetBorderDashPattern=X("EPDFAnnot_SetBorderDashPattern",3),t._EPDFAnnot_GetBorderStyle=X("EPDFAnnot_GetBorderStyle",2),t._EPDFAnnot_SetBorderStyle=X("EPDFAnnot_SetBorderStyle",3),t._EPDFAnnot_GenerateAppearance=X("EPDFAnnot_GenerateAppearance",1),t._EPDFAnnot_GenerateAppearanceWithBlend=X("EPDFAnnot_GenerateAppearanceWithBlend",2),t._EPDFAnnot_GetBlendMode=X("EPDFAnnot_GetBlendMode",1),t._EPDFAnnot_SetIntent=X("EPDFAnnot_SetIntent",2),t._EPDFAnnot_GetIntent=X("EPDFAnnot_GetIntent",3),t._EPDFAnnot_GetRichContent=X("EPDFAnnot_GetRichContent",3),t._EPDFAnnot_GetRichTextJSON=X("EPDFAnnot_GetRichTextJSON",3),t._EPDFAnnot_SetRichTextJSON=X("EPDFAnnot_SetRichTextJSON",2),t._EPDFAnnot_SetRichTextXHTML=X("EPDFAnnot_SetRichTextXHTML",2),t._EPDFDoc_SetTypographicFeatures=X("EPDFDoc_SetTypographicFeatures",2),t._EPDFDoc_GetTypographicFeatures=X("EPDFDoc_GetTypographicFeatures",1),t._EPDFAnnot_SetLineEndings=X("EPDFAnnot_SetLineEndings",3),t._EPDFAnnot_GetLineEndings=X("EPDFAnnot_GetLineEndings",3),t._EPDFAnnot_SetVertices=X("EPDFAnnot_SetVertices",3),t._EPDFAnnot_SetLine=X("EPDFAnnot_SetLine",3),t._EPDFAnnot_SetDefaultAppearance=X("EPDFAnnot_SetDefaultAppearance",6),t._EPDFAnnot_SetDefaultAppearanceRegisteredFont=X("EPDFAnnot_SetDefaultAppearanceRegisteredFont",6),t._EPDFAnnot_GetDefaultAppearance=X("EPDFAnnot_GetDefaultAppearance",6),t._EPDFAnnot_GetDefaultAppearanceFontFace=X("EPDFAnnot_GetDefaultAppearanceFontFace",5),t._EPDFAnnot_GetDefaultAppearanceFontPostScriptName=X("EPDFAnnot_GetDefaultAppearanceFontPostScriptName",3),t._EPDFAnnot_SetDefaultAppearanceDocumentFont=X("EPDFAnnot_SetDefaultAppearanceDocumentFont",6),t._EPDFAnnot_SetTextAlignment=X("EPDFAnnot_SetTextAlignment",2),t._EPDFAnnot_GetTextAlignment=X("EPDFAnnot_GetTextAlignment",1),t._EPDFPage_GetAnnotByName=X("EPDFPage_GetAnnotByName",2),t._EPDFPage_RemoveAnnotByName=X("EPDFPage_RemoveAnnotByName",2),t._EPDFAnnot_SetLinkedAnnot=X("EPDFAnnot_SetLinkedAnnot",3),t._EPDFPage_GetAnnotIndexByNameRaw=X("EPDFPage_GetAnnotIndexByNameRaw",3),t._EPDFPage_GetAnnotIndexByObjectNumberRaw=X("EPDFPage_GetAnnotIndexByObjectNumberRaw",3),t._EPDFPage_GetAnnotCountRaw=X("EPDFPage_GetAnnotCountRaw",2),t._EPDFPage_GetAnnotRaw=X("EPDFPage_GetAnnotRaw",3),t._EPDFPage_CreateAnnotRaw=X("EPDFPage_CreateAnnotRaw",4),t._EPDFPage_RemoveAnnotRaw=X("EPDFPage_RemoveAnnotRaw",3),t._EPDFPage_PromoteInlineAnnotsRaw=X("EPDFPage_PromoteInlineAnnotsRaw",2),t._EPDFAnnot_IsValid=X("EPDFAnnot_IsValid",1),t._EPDFAnnot_SetSubtype=X("EPDFAnnot_SetSubtype",2),t._EPDFAnnot_SetName=X("EPDFAnnot_SetName",2),t._EPDFAnnot_GetName=X("EPDFAnnot_GetName",3),t._EPDFAnnot_UpdateAppearanceToRect=X("EPDFAnnot_UpdateAppearanceToRect",2),t._EPDFAnnot_SetStampOpacity=X("EPDFAnnot_SetStampOpacity",3),t._EPDFPage_CreateAnnot=X("EPDFPage_CreateAnnot",2),t._EPDFAnnot_SetRotate=X("EPDFAnnot_SetRotate",2),t._EPDFAnnot_GetRotate=X("EPDFAnnot_GetRotate",2),t._EPDFAnnot_GetAppearanceTransform=X("EPDFAnnot_GetAppearanceTransform",3),t._EPDFAnnot_GetReplyType=X("EPDFAnnot_GetReplyType",1),t._EPDFAnnot_SetReplyType=X("EPDFAnnot_SetReplyType",2),t._EPDFAnnot_GetBooleanValue=X("EPDFAnnot_GetBooleanValue",3),t._EPDFAnnot_SetBooleanValue=X("EPDFAnnot_SetBooleanValue",3),t._EPDFAnnot_SetOverlayText=X("EPDFAnnot_SetOverlayText",2),t._EPDFAnnot_GetOverlayText=X("EPDFAnnot_GetOverlayText",3),t._EPDFAnnot_SetOverlayTextRepeat=X("EPDFAnnot_SetOverlayTextRepeat",2),t._EPDFAnnot_GetOverlayTextRepeat=X("EPDFAnnot_GetOverlayTextRepeat",1),t._EPDFAnnot_SetAppearanceFromPage=X("EPDFAnnot_SetAppearanceFromPage",3),t._EPDFAnnot_ExportAppearance=X("EPDFAnnot_ExportAppearance",3),t._EPDFDoc_CanonicalDrawing=X("EPDFDoc_CanonicalDrawing",2),t._EPDFDoc_ImportDrawing=X("EPDFDoc_ImportDrawing",2),t._EPDFDoc_ExportDrawing=X("EPDFDoc_ExportDrawing",2),t._EPDFDoc_GetDrawings=X("EPDFDoc_GetDrawings",3),t._EPDFAnnot_SetDrawing=X("EPDFAnnot_SetDrawing",3),t._EPDFAnnot_GetDrawing=X("EPDFAnnot_GetDrawing",1),t._EPDFAnnot_GetRect=X("EPDFAnnot_GetRect",2),t._EPDFAnnot_SetRect=X("EPDFAnnot_SetRect",2),t._EPDFAnnot_SetAPMatrix=X("EPDFAnnot_SetAPMatrix",3),t._EPDFAnnot_GetAPMatrix=X("EPDFAnnot_GetAPMatrix",3),t._EPDFAnnot_GetAvailableAppearanceModes=X("EPDFAnnot_GetAvailableAppearanceModes",1),t._EPDFAnnot_GetAppearanceStateCount=X("EPDFAnnot_GetAppearanceStateCount",2),t._EPDFAnnot_GetAppearanceStateName=X("EPDFAnnot_GetAppearanceStateName",5),t._EPDFAnnot_GetAppearanceState=X("EPDFAnnot_GetAppearanceState",3),t._EPDFAnnot_HasAppearanceStream=X("EPDFAnnot_HasAppearanceStream",2),t._EPDFAnnot_GetDrawingRect=X("EPDFAnnot_GetDrawingRect",3),t._EPDFAnnot_SetMKColor=X("EPDFAnnot_SetMKColor",5),t._EPDFAnnot_GetMKColor=X("EPDFAnnot_GetMKColor",5),t._EPDFAnnot_ClearMKColor=X("EPDFAnnot_ClearMKColor",2),t._EPDFAnnot_SetMKText=X("EPDFAnnot_SetMKText",3),t._EPDFAnnot_GetMKText=X("EPDFAnnot_GetMKText",4),t._EPDFAnnot_SetMKTextPosition=X("EPDFAnnot_SetMKTextPosition",2),t._EPDFAnnot_GetMKTextPosition=X("EPDFAnnot_GetMKTextPosition",1),t._EPDFAnnot_SetMKIcon=X("EPDFAnnot_SetMKIcon",3),t._EPDFAnnot_GetMKIcon=X("EPDFAnnot_GetMKIcon",2),t._EPDFAnnot_ClearMKIcon=X("EPDFAnnot_ClearMKIcon",2),t._EPDFAnnot_HasMKIcon=X("EPDFAnnot_HasMKIcon",2),t._EPDFAnnot_SetMKRotation=X("EPDFAnnot_SetMKRotation",2),t._EPDFAnnot_GetMKRotation=X("EPDFAnnot_GetMKRotation",1),t._EPDFAnnot_GenerateFormFieldAP=X("EPDFAnnot_GenerateFormFieldAP",1),t._EPDFAnnot_GetCalloutLineCount=X("EPDFAnnot_GetCalloutLineCount",1),t._EPDFAnnot_GetCalloutLine=X("EPDFAnnot_GetCalloutLine",3),t._EPDFAnnot_SetCalloutLine=X("EPDFAnnot_SetCalloutLine",3),t._EPDFAnnot_GetObjectNumber=X("EPDFAnnot_GetObjectNumber",1),t._EPDFAnnot_GetStructurePosition=X("EPDFAnnot_GetStructurePosition",3),t._EPDFPage_GetAnnotByObjectNumber=X("EPDFPage_GetAnnotByObjectNumber",2),t._EPDFPage_RemoveAnnot=X("EPDFPage_RemoveAnnot",2),t._EPDFPage_RemoveAnnotByObjectNumber=X("EPDFPage_RemoveAnnotByObjectNumber",2),t._EPDFPage_MoveAnnots=X("EPDFPage_MoveAnnots",4),t._EPDFPage_MoveAnnotsRaw=X("EPDFPage_MoveAnnotsRaw",5),t._EPDF_LoadBaseDocument=X("EPDF_LoadBaseDocument",2),t._EPDF_LoadMemBaseDocument=X("EPDF_LoadMemBaseDocument",3),t._EPDF_LoadMemBaseDocument64=X("EPDF_LoadMemBaseDocument64",3),t._EPDF_ReleaseBaseDocument=X("EPDF_ReleaseBaseDocument",1),t._EPDFPage_ExportAnnotsRawToOwnedBuffer=X("EPDFPage_ExportAnnotsRawToOwnedBuffer",5),t._EPDFPage_ImportAnnotsRaw=X("EPDFPage_ImportAnnotsRaw",4),t._EPDFDoc_ExportDictRawToOwnedBuffer=X("EPDFDoc_ExportDictRawToOwnedBuffer",4),t._EPDFDoc_ExportDictCanonicalToOwnedBuffer=X("EPDFDoc_ExportDictCanonicalToOwnedBuffer",5),t._EPDFDoc_ImportDictRaw=X("EPDFDoc_ImportDictRaw",3),t._EPDFForm_ExportFieldRawToOwnedBuffer=X("EPDFForm_ExportFieldRawToOwnedBuffer",3),t._EPDFForm_ImportFieldRaw=X("EPDFForm_ImportFieldRaw",3),t._EPDFOutline_ExportItemRawToOwnedBuffer=X("EPDFOutline_ExportItemRawToOwnedBuffer",3),t._EPDFOutline_ImportItemRaw=X("EPDFOutline_ImportItemRaw",3),t._EPDFPage_ExportRawToOwnedBuffer=X("EPDFPage_ExportRawToOwnedBuffer",3),t._EPDFPage_ImportRaw=X("EPDFPage_ImportRaw",3),t._EPDFAttachment_ExportRawToOwnedBuffer=X("EPDFAttachment_ExportRawToOwnedBuffer",3),t._EPDFAttachment_ExportCanonicalToOwnedBuffer=X("EPDFAttachment_ExportCanonicalToOwnedBuffer",3),t._EPDFAttachment_ImportRaw=X("EPDFAttachment_ImportRaw",3),t._EPDFCatalog_GetMetadata=X("EPDFCatalog_GetMetadata",3),t._EPDFCatalog_SetMetadata=X("EPDFCatalog_SetMetadata",3),t._EPDFFont_RegisterFont=X("EPDFFont_RegisterFont",4),t._EPDFFont_RegisterMemFont=X("EPDFFont_RegisterMemFont",5),t._EPDFFont_RegisterMemFont64=X("EPDFFont_RegisterMemFont64",5),t._EPDFFont_ClearRegisteredFonts=X("EPDFFont_ClearRegisteredFonts",0),t._EPDFFont_GetEmbeddingPermission=X("EPDFFont_GetEmbeddingPermission",1),t._EPDFFont_IsEditingAuthorized=X("EPDFFont_IsEditingAuthorized",1),t._EPDFFont_AuthorizeEditing=X("EPDFFont_AuthorizeEditing",1),t._EPDFFont_IsInstanced=X("EPDFFont_IsInstanced",1),t._EPDFFont_GetFamilyName=X("EPDFFont_GetFamilyName",3),t._EPDFFont_GetWeight=X("EPDFFont_GetWeight",1),t._EPDFFont_IsItalic=X("EPDFFont_IsItalic",1),t._EPDFDoc_SetFontEmbeddingPolicy=X("EPDFDoc_SetFontEmbeddingPolicy",2),t._EPDFDoc_GetFontEmbeddingPolicy=X("EPDFDoc_GetFontEmbeddingPolicy",1),t._EPDFFont_AddFallbackFont=X("EPDFFont_AddFallbackFont",2),t._EPDFFont_ClearFallbackFonts=X("EPDFFont_ClearFallbackFonts",0),t._EPDFFont_SetLastResortFont=X("EPDFFont_SetLastResortFont",1),t._EPDFFont_GetLastResortFont=X("EPDFFont_GetLastResortFont",0),t._EPDFFont_GetFallbackOrder=X("EPDFFont_GetFallbackOrder",4),t._EPDFFont_GetProgramData=X("EPDFFont_GetProgramData",3),t._EPDFFont_GetProgramFormat=X("EPDFFont_GetProgramFormat",1),t._EPDFFont_GetProgramHash=X("EPDFFont_GetProgramHash",2),t._EPDFFont_GetCoverage=X("EPDFFont_GetCoverage",3),t._EPDFFont_GetMetrics=X("EPDFFont_GetMetrics",3),t._EPDFFont_GetPostScriptName=X("EPDFFont_GetPostScriptName",3),t._EPDFFontFaces_Load=X("EPDFFontFaces_Load",1),t._EPDFFontFaces_Close=X("EPDFFontFaces_Close",1),t._EPDFDoc_GetFontsFingerprint=X("EPDFDoc_GetFontsFingerprint",2),t._EPDFFontFaces_Count=X("EPDFFontFaces_Count",1),t._EPDFFontFaces_GetFamily=X("EPDFFontFaces_GetFamily",4),t._EPDFFontFaces_GetWeight=X("EPDFFontFaces_GetWeight",2),t._EPDFFontFaces_IsItalic=X("EPDFFontFaces_IsItalic",2),t._EPDFFontFaces_CountPrograms=X("EPDFFontFaces_CountPrograms",2),t._EPDFFontFaces_GetProgramObjNum=X("EPDFFontFaces_GetProgramObjNum",3),t._EPDFFontFaces_GetProgramFormat=X("EPDFFontFaces_GetProgramFormat",3),t._EPDFFontFaces_GetProgramEmbedded=X("EPDFFontFaces_GetProgramEmbedded",3),t._EPDFFontFaces_GetProgramPostScriptName=X("EPDFFontFaces_GetProgramPostScriptName",5),t._EPDFFontFaces_GetProgramEmbeddingPermission=X("EPDFFontFaces_GetProgramEmbeddingPermission",3),t._EPDFFontFaces_ProgramMapsUnicode=X("EPDFFontFaces_ProgramMapsUnicode",3),t._EPDFFontFaces_GetProgramHash=X("EPDFFontFaces_GetProgramHash",4),t._EPDFFontFaces_GetProgramDisplayHash=X("EPDFFontFaces_GetProgramDisplayHash",4),t._EPDFFontFaces_GetProgramMetrics=X("EPDFFontFaces_GetProgramMetrics",5),t._EPDFDoc_GetFontProgramData=X("EPDFDoc_GetFontProgramData",4),t._EPDFDoc_GetFontDisplayProgramData=X("EPDFDoc_GetFontDisplayProgramData",4),t._EPDFDoc_GetFontDisplayProgramCoverage=X("EPDFDoc_GetFontDisplayProgramCoverage",4),t._EPDFDoc_ResolveFonts=X("EPDFDoc_ResolveFonts",8),t._EPDFFontResolution_Close=X("EPDFFontResolution_Close",1),t._EPDFFontResolution_GetSource=X("EPDFFontResolution_GetSource",2),t._EPDFFontResolution_GetRegisteredFont=X("EPDFFontResolution_GetRegisteredFont",2),t._EPDFFontResolution_GetProgramObjNum=X("EPDFFontResolution_GetProgramObjNum",2),t._EPDFFontResolution_GetProgramDisplayHash=X("EPDFFontResolution_GetProgramDisplayHash",3),t._EPDFFontResolution_GetBaseFontName=X("EPDFFontResolution_GetBaseFontName",4),t._EPDFFontResolution_GetFamily=X("EPDFFontResolution_GetFamily",4),t._EPDFFontResolution_GetWeight=X("EPDFFontResolution_GetWeight",2),t._EPDFFontResolution_IsItalic=X("EPDFFontResolution_IsItalic",2),t._EPDFFontResolution_IsDegraded=X("EPDFFontResolution_IsDegraded",2),t._EPDFFontResolution_GetFallbacks=X("EPDFFontResolution_GetFallbacks",4),t._EPDFFontResolution_CountMissingCharacters=X("EPDFFontResolution_CountMissingCharacters",1),t._EPDFFontResolution_GetMissingCharacter=X("EPDFFontResolution_GetMissingCharacter",4),t._EPDFDoc_ClearMissingCharacters=X("EPDFDoc_ClearMissingCharacters",1),t._EPDFDoc_CountMissingCharacters=X("EPDFDoc_CountMissingCharacters",1),t._EPDFDoc_GetMissingCharacter=X("EPDFDoc_GetMissingCharacter",4),t._EPDFForm_LoadModel=X("EPDFForm_LoadModel",1),t._EPDFForm_CloseModel=X("EPDFForm_CloseModel",1),t._EPDFForm_GetFormKind=X("EPDFForm_GetFormKind",1),t._EPDFForm_GetNeedAppearances=X("EPDFForm_GetNeedAppearances",1),t._EPDFForm_CountFields=X("EPDFForm_CountFields",1),t._EPDFForm_GetFieldActionModel=X("EPDFForm_GetFieldActionModel",3),t._EPDFForm_CountCalculationOrder=X("EPDFForm_CountCalculationOrder",1),t._EPDFForm_GetCalculationOrderFieldIndex=X("EPDFForm_GetCalculationOrderFieldIndex",2),t._EPDFForm_GetFieldObjNum=X("EPDFForm_GetFieldObjNum",2),t._EPDFForm_GetFieldFamily=X("EPDFForm_GetFieldFamily",2),t._EPDFForm_GetFieldFlags=X("EPDFForm_GetFieldFlags",2),t._EPDFForm_GetFieldOrigin=X("EPDFForm_GetFieldOrigin",2),t._EPDFForm_GetFieldName=X("EPDFForm_GetFieldName",4),t._EPDFForm_GetFieldAlternateName=X("EPDFForm_GetFieldAlternateName",4),t._EPDFForm_GetFieldMappingName=X("EPDFForm_GetFieldMappingName",4),t._EPDFForm_HasFieldEmbedMetadata=X("EPDFForm_HasFieldEmbedMetadata",2),t._EPDFForm_HasFieldValuesList=X("EPDFForm_HasFieldValuesList",2),t._EPDFForm_GetFieldEmbedMetadataString=X("EPDFForm_GetFieldEmbedMetadataString",5),t._EPDFForm_GetFieldEmbedMetadataNumber=X("EPDFForm_GetFieldEmbedMetadataNumber",4),t._EPDFForm_GetFieldEmbedMetadataBoolean=X("EPDFForm_GetFieldEmbedMetadataBoolean",4),t._EPDFForm_GetFieldEmbedMetadataJSON=X("EPDFForm_GetFieldEmbedMetadataJSON",4),t._EPDFForm_GetFieldValueKind=X("EPDFForm_GetFieldValueKind",2),t._EPDFForm_CountFieldValues=X("EPDFForm_CountFieldValues",2),t._EPDFForm_GetFieldValueAt=X("EPDFForm_GetFieldValueAt",5),t._EPDFForm_GetFieldDefaultValueKind=X("EPDFForm_GetFieldDefaultValueKind",2),t._EPDFForm_CountFieldDefaultValues=X("EPDFForm_CountFieldDefaultValues",2),t._EPDFForm_GetFieldDefaultValueAt=X("EPDFForm_GetFieldDefaultValueAt",5),t._EPDFForm_GetFieldMaxLen=X("EPDFForm_GetFieldMaxLen",2),t._EPDFForm_GetFieldTopIndex=X("EPDFForm_GetFieldTopIndex",2),t._EPDFForm_CountFieldOptions=X("EPDFForm_CountFieldOptions",2),t._EPDFForm_GetFieldOptionLabel=X("EPDFForm_GetFieldOptionLabel",5),t._EPDFForm_GetFieldOptionValue=X("EPDFForm_GetFieldOptionValue",5),t._EPDFForm_IsFieldOptionSelected=X("EPDFForm_IsFieldOptionSelected",3),t._EPDFForm_CountFieldWidgets=X("EPDFForm_CountFieldWidgets",2),t._EPDFForm_GetFieldWidgetObjNum=X("EPDFForm_GetFieldWidgetObjNum",3),t._EPDFForm_GetFieldWidgetPageObjNum=X("EPDFForm_GetFieldWidgetPageObjNum",3),t._EPDFForm_GetFieldWidgetRect=X("EPDFForm_GetFieldWidgetRect",4),t._EPDFForm_GetFieldWidgetOnState=X("EPDFForm_GetFieldWidgetOnState",5),t._EPDFForm_GetFieldWidgetExportValue=X("EPDFForm_GetFieldWidgetExportValue",5),t._EPDFForm_IsFieldWidgetChecked=X("EPDFForm_IsFieldWidgetChecked",3),t._EPDFForm_GetFieldIndexByObjNum=X("EPDFForm_GetFieldIndexByObjNum",2),t._EPDFForm_GetFieldIndexForWidget=X("EPDFForm_GetFieldIndexForWidget",2),t._EPDFForm_SetFieldValue=X("EPDFForm_SetFieldValue",5),t._EPDFForm_SetFieldDefaultValue=X("EPDFForm_SetFieldDefaultValue",5),t._EPDFForm_SetFieldSelectedIndices=X("EPDFForm_SetFieldSelectedIndices",4),t._EPDFForm_SetFieldWidgetsChecked=X("EPDFForm_SetFieldWidgetsChecked",7),t._EPDFForm_RedrawFieldWidgets=X("EPDFForm_RedrawFieldWidgets",5),t._EPDFForm_SetFieldDisplay=X("EPDFForm_SetFieldDisplay",6),t._EPDFForm_SetFieldAppearanceText=X("EPDFForm_SetFieldAppearanceText",6),t._EPDFForm_ExportFDF=X("EPDFForm_ExportFDF",5),t._EPDFForm_ExportXFDF=X("EPDFForm_ExportXFDF",5),t._EPDFForm_Repair=X("EPDFForm_Repair",3),t._EPDFForm_CreateField=X("EPDFForm_CreateField",4),t._EPDFForm_AttachWidget=X("EPDFForm_AttachWidget",6),t._EPDFForm_DetachWidget=X("EPDFForm_DetachWidget",3),t._EPDFForm_DeleteField=X("EPDFForm_DeleteField",5),t._EPDFForm_SetFieldName=X("EPDFForm_SetFieldName",3),t._EPDFForm_GetFieldPartialName=X("EPDFForm_GetFieldPartialName",4),t._EPDFForm_SetFieldFlags=X("EPDFForm_SetFieldFlags",4),t._EPDFForm_SetFieldEventAction=X("EPDFForm_SetFieldEventAction",4),t._EPDFForm_SetCalculationOrder=X("EPDFForm_SetCalculationOrder",3),t._EPDFForm_SetFieldMaxLen=X("EPDFForm_SetFieldMaxLen",3),t._EPDFForm_SetFieldAlternateName=X("EPDFForm_SetFieldAlternateName",3),t._EPDFForm_SetFieldMappingName=X("EPDFForm_SetFieldMappingName",3),t._EPDFForm_SetFieldEmbedMetadataString=X("EPDFForm_SetFieldEmbedMetadataString",4),t._EPDFForm_SetFieldEmbedMetadataNumber=X("EPDFForm_SetFieldEmbedMetadataNumber",4),t._EPDFForm_SetFieldEmbedMetadataBoolean=X("EPDFForm_SetFieldEmbedMetadataBoolean",4),t._EPDFForm_SetFieldEmbedMetadataJSON=X("EPDFForm_SetFieldEmbedMetadataJSON",3),t._EPDFForm_ClearFieldEmbedMetadataKey=X("EPDFForm_ClearFieldEmbedMetadataKey",3),t._EPDFForm_ClearFieldEmbedMetadata=X("EPDFForm_ClearFieldEmbedMetadata",2),t._EPDFForm_SetFieldOptions=X("EPDFForm_SetFieldOptions",5),t._EPDFPage_Flatten=X("EPDFPage_Flatten",2),t._EPDFPage_FlattenAnnotations=X("EPDFPage_FlattenAnnotations",5),t._EPDFPage_ExportAnnotationsAsDocument=X("EPDFPage_ExportAnnotationsAsDocument",3),t._EPDFDoc_ExportPagesFlattened=X("EPDFDoc_ExportPagesFlattened",5),t._EPDFLayer_OpenLayer=X("EPDFLayer_OpenLayer",4),t._EPDFLayer_OpenLayerArtifact=X("EPDFLayer_OpenLayerArtifact",4),t._EPDFLayer_OpenLayerArtifactFromPath=X("EPDFLayer_OpenLayerArtifactFromPath",4),t._EPDFLayer_IsObjectPromoted=X("EPDFLayer_IsObjectPromoted",2),t._EPDFPage_IsValid=X("EPDFPage_IsValid",1),t._EPDFLayer_IsPagePromoted=X("EPDFLayer_IsPagePromoted",2),t._EPDFLayer_GetBirthObjectNumber=X("EPDFLayer_GetBirthObjectNumber",3),t._EPDFLayer_GetBirthName=X("EPDFLayer_GetBirthName",4),t._EPDFLayer_BeginTransaction=X("EPDFLayer_BeginTransaction",1),t._EPDFLayer_CommitTransaction=X("EPDFLayer_CommitTransaction",1),t._EPDFLayer_AbortTransaction=X("EPDFLayer_AbortTransaction",1),t._EPDFLayer_IsInTransaction=X("EPDFLayer_IsInTransaction",1),t._EPDFLayer_GetLastObjectNumber=X("EPDFLayer_GetLastObjectNumber",1),t._EPDFLayer_RaiseLastObjectNumber=X("EPDFLayer_RaiseLastObjectNumber",2),t._EPDFLayer_GetPromotedObjectCount=X("EPDFLayer_GetPromotedObjectCount",1),t._EPDFLayer_GetBaseDocument=X("EPDFLayer_GetBaseDocument",1),t._EPDF_SetBaseDocumentSha256=X("EPDF_SetBaseDocumentSha256",2),t._EPDFLayer_GetBaseSha256=X("EPDFLayer_GetBaseSha256",2),t._EPDFLayer_SaveDelta=X("EPDFLayer_SaveDelta",3),t._EPDFLayer_SaveDeltaEx=X("EPDFLayer_SaveDeltaEx",4),t._EPDFLayer_SaveDeltaToOwnedBuffer=X("EPDFLayer_SaveDeltaToOwnedBuffer",3),t._EPDFLayer_SaveDeltaToOwnedBufferEx=X("EPDFLayer_SaveDeltaToOwnedBufferEx",4),t._EPDFLayer_SaveLayerArtifact=X("EPDFLayer_SaveLayerArtifact",3),t._EPDFLayer_SaveLayerArtifactEx=X("EPDFLayer_SaveLayerArtifactEx",4),t._EPDFLayer_SaveLayerArtifactToOwnedBuffer=X("EPDFLayer_SaveLayerArtifactToOwnedBuffer",3),t._EPDFLayer_SaveLayerArtifactToOwnedBufferEx=X("EPDFLayer_SaveLayerArtifactToOwnedBufferEx",4),t._EPDFNamedDest_SetDest=X("EPDFNamedDest_SetDest",3),t._EPDFNamedDest_Remove=X("EPDFNamedDest_Remove",2),t._EPDFDest_CreateView=X("EPDFDest_CreateView",4),t._EPDFDest_CreateXYZ=X("EPDFDest_CreateXYZ",7),t._EPDFDest_CreateRemoteView=X("EPDFDest_CreateRemoteView",5),t._EPDFDest_CreateRemoteXYZ=X("EPDFDest_CreateRemoteXYZ",8),t._EPDFDest_CreateXYZByObjectNumber=X("EPDFDest_CreateXYZByObjectNumber",8),t._EPDFDest_CreateViewByObjectNumber=X("EPDFDest_CreateViewByObjectNumber",5),t._EPDFDest_GetViewNullParams=X("EPDFDest_GetViewNullParams",1),t._EPDFAction_CreateGoTo=X("EPDFAction_CreateGoTo",2),t._EPDFAction_CreateGoToNamed=X("EPDFAction_CreateGoToNamed",2),t._EPDFAction_CreateLaunch=X("EPDFAction_CreateLaunch",2),t._EPDFAction_CreateRemoteGoToByName=X("EPDFAction_CreateRemoteGoToByName",3),t._EPDFAction_CreateRemoteGoToDest=X("EPDFAction_CreateRemoteGoToDest",3),t._EPDFAction_CreateURI=X("EPDFAction_CreateURI",2),t._EPDFAction_CreateNamed=X("EPDFAction_CreateNamed",2),t._EPDFOutline_GetObjectNumber=X("EPDFOutline_GetObjectNumber",1),t._EPDFOutline_GetItem=X("EPDFOutline_GetItem",2),t._EPDFOutline_CreateItem=X("EPDFOutline_CreateItem",5),t._EPDFOutline_MoveItem=X("EPDFOutline_MoveItem",4),t._EPDFOutline_DeleteItem=X("EPDFOutline_DeleteItem",2),t._EPDFOutline_SetTitle=X("EPDFOutline_SetTitle",3),t._EPDFOutline_SetOpen=X("EPDFOutline_SetOpen",3),t._EPDFOutline_SetColor=X("EPDFOutline_SetColor",6),t._EPDFOutline_SetStyle=X("EPDFOutline_SetStyle",3),t._EPDFOutline_SetAction=X("EPDFOutline_SetAction",3),t._EPDFDoc_GetNamedPageCount=X("EPDFDoc_GetNamedPageCount",2),t._EPDFDoc_GetNamedPageAt=X("EPDFDoc_GetNamedPageAt",7),t._EPDFDoc_SetNamedPage=X("EPDFDoc_SetNamedPage",3),t._EPDFDoc_RemoveNamedPage=X("EPDFDoc_RemoveNamedPage",2),t._EPDFDoc_RemoveNamedPagesForPage=X("EPDFDoc_RemoveNamedPagesForPage",2),t._EPDFDoc_GetPageLabelSectionCount=X("EPDFDoc_GetPageLabelSectionCount",1),t._EPDFDoc_GetPageLabelSectionAt=X("EPDFDoc_GetPageLabelSectionAt",7),t._EPDFDoc_SetPageLabelSections=X("EPDFDoc_SetPageLabelSections",6),t._EPDF_DigestBuffer=X("EPDF_DigestBuffer",5),t._EPDFDoc_GetRevisionCount=X("EPDFDoc_GetRevisionCount",1),t._EPDFDoc_GetRevision=X("EPDFDoc_GetRevision",4),t._EPDFDoc_OpenRevision=X("EPDFDoc_OpenRevision",3),t._EPDFDoc_OpenBaseOverlayFromPath=X("EPDFDoc_OpenBaseOverlayFromPath",2),t._EPDFDoc_OpenBaseOverlay=X("EPDFDoc_OpenBaseOverlay",3),t._EPDFSig_LoadModel=X("EPDFSig_LoadModel",1),t._EPDFSig_CloseModel=X("EPDFSig_CloseModel",1),t._EPDFSig_Count=X("EPDFSig_Count",1),t._EPDFSig_IsRevisionChainValid=X("EPDFSig_IsRevisionChainValid",1),t._EPDFSig_GetIndexByFieldObjNum=X("EPDFSig_GetIndexByFieldObjNum",2),t._EPDFSig_GetFieldObjNum=X("EPDFSig_GetFieldObjNum",2),t._EPDFSig_GetWidgetObjNum=X("EPDFSig_GetWidgetObjNum",2),t._EPDFSig_GetWidgetPageObjNum=X("EPDFSig_GetWidgetPageObjNum",2),t._EPDFSig_GetValueObjNum=X("EPDFSig_GetValueObjNum",2),t._EPDFSig_GetFieldName=X("EPDFSig_GetFieldName",4),t._EPDFSig_IsSigned=X("EPDFSig_IsSigned",2),t._EPDFSig_GetKind=X("EPDFSig_GetKind",2),t._EPDFSig_GetByteRange=X("EPDFSig_GetByteRange",3),t._EPDFSig_GetCoverage=X("EPDFSig_GetCoverage",2),t._EPDFSig_GetRevisionIndex=X("EPDFSig_GetRevisionIndex",2),t._EPDFSig_GetContents=X("EPDFSig_GetContents",4),t._EPDFSig_GetString=X("EPDFSig_GetString",5),t._EPDFSig_GetDocMDPPermission=X("EPDFSig_GetDocMDPPermission",2),t._EPDFSig_IsCatalogCertification=X("EPDFSig_IsCatalogCertification",2),t._EPDFSig_GetFieldMDPAction=X("EPDFSig_GetFieldMDPAction",2),t._EPDFSig_GetLockAction=X("EPDFSig_GetLockAction",2),t._EPDFSig_GetLockPermission=X("EPDFSig_GetLockPermission",2),t._EPDFSig_GetFieldNameCount=X("EPDFSig_GetFieldNameCount",3),t._EPDFSig_GetFieldNameAt=X("EPDFSig_GetFieldNameAt",6),t._EPDFSig_HasSeedValue=X("EPDFSig_HasSeedValue",2),t._EPDFSig_GetSeedValueRequiredFlags=X("EPDFSig_GetSeedValueRequiredFlags",2),t._EPDFSig_GetSeedValuePresentFlags=X("EPDFSig_GetSeedValuePresentFlags",2),t._EPDFSig_GetSeedValueMDP=X("EPDFSig_GetSeedValueMDP",2),t._EPDFSig_GetSeedValueVersion=X("EPDFSig_GetSeedValueVersion",2),t._EPDFSig_GetSeedValueFilter=X("EPDFSig_GetSeedValueFilter",4),t._EPDFSig_GetSeedValueListCount=X("EPDFSig_GetSeedValueListCount",3),t._EPDFSig_GetSeedValueListAt=X("EPDFSig_GetSeedValueListAt",6),t._EPDFSig_DigestByteRange=X("EPDFSig_DigestByteRange",5),t._EPDFSig_DigestFileRange=X("EPDFSig_DigestFileRange",5),t._EPDFDoc_GetLoadedBytesSize=X("EPDFDoc_GetLoadedBytesSize",1),t._EPDFDoc_GetBaseBytesSize=X("EPDFDoc_GetBaseBytesSize",1),t._EPDFDoc_GetStructureObjectNumbers=X("EPDFDoc_GetStructureObjectNumbers",4),t._EPDFDoc_ReadLoadedBytes=X("EPDFDoc_ReadLoadedBytes",5),t._EPDFSig_Prepare=X("EPDFSig_Prepare",3),t._EPDFSig_SetFieldLock=X("EPDFSig_SetFieldLock",6),t._EPDFSig_SaveCandidateToOwnedBuffer=X("EPDFSig_SaveCandidateToOwnedBuffer",5),t._EPDFSig_SaveCandidate=X("EPDFSig_SaveCandidate",6),t._EPDFSig_Seal=X("EPDFSig_Seal",13),t._EPDFSig_SealSpan=X("EPDFSig_SealSpan",10),t._EPDFSig_WriteContents=X("EPDFSig_WriteContents",9),t._EPDFDss_GetCount=X("EPDFDss_GetCount",2),t._EPDFDss_GetData=X("EPDFDss_GetData",5),t._EPDFDss_Add=X("EPDFDss_Add",4),t._EPDFDoc_CompareRevisions=X("EPDFDoc_CompareRevisions",2),t._EPDFObjectDiff_Close=X("EPDFObjectDiff_Close",1),t._EPDFObjectDiff_GetCount=X("EPDFObjectDiff_GetCount",1),t._EPDFObjectDiff_GetEntry=X("EPDFObjectDiff_GetEntry",8),t._EPDFObjectDiff_GetValue=X("EPDFObjectDiff_GetValue",6),t._EPDFObjectDiff_GetReadStatus=X("EPDFObjectDiff_GetReadStatus",3),t._EPDFObjectDiff_GetRevisionHealth=X("EPDFObjectDiff_GetRevisionHealth",5),t._EPDFObjectDiff_GetReferrerCount=X("EPDFObjectDiff_GetReferrerCount",3),t._EPDFObjectDiff_GetReferrer=X("EPDFObjectDiff_GetReferrer",7),t._EPDFDoc_GetLoadedObjectValue=X("EPDFDoc_GetLoadedObjectValue",6),t._EPDFDoc_HasPieceInfoEntry=X("EPDFDoc_HasPieceInfoEntry",2),t._EPDFDoc_GetPieceInfoEntryCount=X("EPDFDoc_GetPieceInfoEntryCount",1),t._EPDFDoc_GetPieceInfoEntryAt=X("EPDFDoc_GetPieceInfoEntryAt",4),t._EPDFDoc_GetLastModified=X("EPDFDoc_GetLastModified",3),t._EPDFDoc_GetPieceInfoLastModified=X("EPDFDoc_GetPieceInfoLastModified",4),t._EPDFDoc_GetPieceInfoKeyCount=X("EPDFDoc_GetPieceInfoKeyCount",2),t._EPDFDoc_GetPieceInfoKeyAt=X("EPDFDoc_GetPieceInfoKeyAt",5),t._EPDFDoc_GetPieceInfoValueType=X("EPDFDoc_GetPieceInfoValueType",3),t._EPDFDoc_SetPieceInfoString=X("EPDFDoc_SetPieceInfoString",5),t._EPDFDoc_GetPieceInfoString=X("EPDFDoc_GetPieceInfoString",5),t._EPDFDoc_SetPieceInfoNumber=X("EPDFDoc_SetPieceInfoNumber",5),t._EPDFDoc_GetPieceInfoNumber=X("EPDFDoc_GetPieceInfoNumber",4),t._EPDFDoc_SetPieceInfoBoolean=X("EPDFDoc_SetPieceInfoBoolean",5),t._EPDFDoc_GetPieceInfoBoolean=X("EPDFDoc_GetPieceInfoBoolean",4),t._EPDFDoc_SetPieceInfoName=X("EPDFDoc_SetPieceInfoName",5),t._EPDFDoc_GetPieceInfoName=X("EPDFDoc_GetPieceInfoName",5),t._EPDFDoc_SetPieceInfoStringArray=X("EPDFDoc_SetPieceInfoStringArray",6),t._EPDFDoc_GetPieceInfoStringArrayCount=X("EPDFDoc_GetPieceInfoStringArrayCount",3),t._EPDFDoc_GetPieceInfoStringArrayAt=X("EPDFDoc_GetPieceInfoStringArrayAt",6),t._EPDFDoc_ClearPieceInfoKey=X("EPDFDoc_ClearPieceInfoKey",4),t._EPDFDoc_ClearPieceInfoEntry=X("EPDFDoc_ClearPieceInfoEntry",2),t._EPDFDoc_HasPagePieceInfoEntry=X("EPDFDoc_HasPagePieceInfoEntry",3),t._EPDFDoc_GetPagePieceInfoEntryCount=X("EPDFDoc_GetPagePieceInfoEntryCount",2),t._EPDFDoc_GetPagePieceInfoEntryAt=X("EPDFDoc_GetPagePieceInfoEntryAt",5),t._EPDFDoc_GetPageLastModified=X("EPDFDoc_GetPageLastModified",4),t._EPDFDoc_GetPagePieceInfoLastModified=X("EPDFDoc_GetPagePieceInfoLastModified",5),t._EPDFDoc_GetPagePieceInfoKeyCount=X("EPDFDoc_GetPagePieceInfoKeyCount",3),t._EPDFDoc_GetPagePieceInfoKeyAt=X("EPDFDoc_GetPagePieceInfoKeyAt",6),t._EPDFDoc_GetPagePieceInfoValueType=X("EPDFDoc_GetPagePieceInfoValueType",4),t._EPDFDoc_SetPagePieceInfoString=X("EPDFDoc_SetPagePieceInfoString",6),t._EPDFDoc_GetPagePieceInfoString=X("EPDFDoc_GetPagePieceInfoString",6),t._EPDFDoc_SetPagePieceInfoNumber=X("EPDFDoc_SetPagePieceInfoNumber",6),t._EPDFDoc_GetPagePieceInfoNumber=X("EPDFDoc_GetPagePieceInfoNumber",5),t._EPDFDoc_SetPagePieceInfoBoolean=X("EPDFDoc_SetPagePieceInfoBoolean",6),t._EPDFDoc_GetPagePieceInfoBoolean=X("EPDFDoc_GetPagePieceInfoBoolean",5),t._EPDFDoc_SetPagePieceInfoName=X("EPDFDoc_SetPagePieceInfoName",6),t._EPDFDoc_GetPagePieceInfoName=X("EPDFDoc_GetPagePieceInfoName",6),t._EPDFDoc_SetPagePieceInfoStringArray=X("EPDFDoc_SetPagePieceInfoStringArray",7),t._EPDFDoc_GetPagePieceInfoStringArrayCount=X("EPDFDoc_GetPagePieceInfoStringArrayCount",4),t._EPDFDoc_GetPagePieceInfoStringArrayAt=X("EPDFDoc_GetPagePieceInfoStringArrayAt",7),t._EPDFDoc_ClearPagePieceInfoKey=X("EPDFDoc_ClearPagePieceInfoKey",5),t._EPDFDoc_ClearPagePieceInfoEntry=X("EPDFDoc_ClearPagePieceInfoEntry",3),t._EPDFAnnot_GetMeasure=X("EPDFAnnot_GetMeasure",1),t._EPDFAnnot_AddMeasure=X("EPDFAnnot_AddMeasure",1),t._EPDFAnnot_RemoveMeasure=X("EPDFAnnot_RemoveMeasure",1),t._EPDFPage_CountViewports=X("EPDFPage_CountViewports",1),t._EPDFPage_GetViewport=X("EPDFPage_GetViewport",2),t._EPDFPage_AddViewport=X("EPDFPage_AddViewport",2),t._EPDFPage_RemoveViewport=X("EPDFPage_RemoveViewport",2),t._EPDFPage_CountViewportsRaw=X("EPDFPage_CountViewportsRaw",2),t._EPDFPage_GetViewportRaw=X("EPDFPage_GetViewportRaw",3),t._EPDFPage_AddViewportRaw=X("EPDFPage_AddViewportRaw",3),t._EPDFPage_RemoveViewportRaw=X("EPDFPage_RemoveViewportRaw",3),t._EPDFViewport_Close=X("EPDFViewport_Close",1),t._EPDFPage_FindViewport=X("EPDFPage_FindViewport",2),t._EPDFViewport_GetBBox=X("EPDFViewport_GetBBox",2),t._EPDFViewport_SetBBox=X("EPDFViewport_SetBBox",2),t._EPDFViewport_GetMeasure=X("EPDFViewport_GetMeasure",1),t._EPDFViewport_AddMeasure=X("EPDFViewport_AddMeasure",1),t._EPDFViewport_RemoveMeasure=X("EPDFViewport_RemoveMeasure",1),t._EPDFMeasure_GetSubtype=X("EPDFMeasure_GetSubtype",1),t._EPDFMeasure_GetOrigin=X("EPDFMeasure_GetOrigin",2),t._EPDFMeasure_SetOrigin=X("EPDFMeasure_SetOrigin",2),t._EPDFMeasure_GetCYX=X("EPDFMeasure_GetCYX",2),t._EPDFMeasure_SetCYX=X("EPDFMeasure_SetCYX",2),t._EPDFMeasure_CountFormats=X("EPDFMeasure_CountFormats",2),t._EPDFMeasure_GetFormat=X("EPDFMeasure_GetFormat",3),t._EPDFMeasure_AddFormat=X("EPDFMeasure_AddFormat",4),t._EPDFMeasure_RemoveFormats=X("EPDFMeasure_RemoveFormats",2),t._EPDFViewport_GetName=X("EPDFViewport_GetName",3),t._EPDFViewport_SetName=X("EPDFViewport_SetName",2),t._EPDFMeasure_GetRatio=X("EPDFMeasure_GetRatio",3),t._EPDFMeasure_SetRatio=X("EPDFMeasure_SetRatio",2),t._EPDFNumberFormat_GetUnit=X("EPDFNumberFormat_GetUnit",3),t._EPDFNumberFormat_SetUnit=X("EPDFNumberFormat_SetUnit",2),t._EPDFNumberFormat_GetConversion=X("EPDFNumberFormat_GetConversion",2),t._EPDFNumberFormat_SetConversion=X("EPDFNumberFormat_SetConversion",2),t._EPDFNumberFormat_GetPrecision=X("EPDFNumberFormat_GetPrecision",2),t._EPDFNumberFormat_SetPrecision=X("EPDFNumberFormat_SetPrecision",2),t._EPDFNumberFormat_GetFixedDenominator=X("EPDFNumberFormat_GetFixedDenominator",2),t._EPDFNumberFormat_SetFixedDenominator=X("EPDFNumberFormat_SetFixedDenominator",2),t._EPDFNumberFormat_GetText=X("EPDFNumberFormat_GetText",4),t._EPDFNumberFormat_SetText=X("EPDFNumberFormat_SetText",3),t._EPDFNumberFormat_GetFraction=X("EPDFNumberFormat_GetFraction",2),t._EPDFNumberFormat_SetFraction=X("EPDFNumberFormat_SetFraction",2),t._EPDFNumberFormat_GetLabelPosition=X("EPDFNumberFormat_GetLabelPosition",2),t._EPDFNumberFormat_SetLabelPosition=X("EPDFNumberFormat_SetLabelPosition",2),t._EPDFAnnot_SetLineLeader=X("EPDFAnnot_SetLineLeader",4),t._EPDFAnnot_GetLineLeader=X("EPDFAnnot_GetLineLeader",4),t._EPDFAnnot_SetLineCaption=X("EPDFAnnot_SetLineCaption",4),t._EPDFAnnot_GetLineCaption=X("EPDFAnnot_GetLineCaption",4),t._EPDFAnnot_SetShapeCaption=X("EPDFAnnot_SetShapeCaption",3),t._EPDFAnnot_GetShapeCaption=X("EPDFAnnot_GetShapeCaption",4),t._EPDFPage_GetParsedSize=X("EPDFPage_GetParsedSize",2),t._EPDFPage_IsContentCurrent=X("EPDFPage_IsContentCurrent",1),t._EPDF_PNG_EncodeRGBA=X("EPDF_PNG_EncodeRGBA",6),t._EPDFDoc_ImportPages=X("EPDFDoc_ImportPages",6),t._EPDFDoc_GetImportFieldRoots=X("EPDFDoc_GetImportFieldRoots",5),t._EPDFPage_ApplyRedactions=X("EPDFPage_ApplyRedactions",4),t._EPDF_InitThread=X("EPDF_InitThread",0),t._EPDF_ShutdownThread=X("EPDF_ShutdownThread",0),t._FPDFAnnot_IsSupportedSubtype=X("FPDFAnnot_IsSupportedSubtype",1),t._FPDFPage_CreateAnnot=X("FPDFPage_CreateAnnot",2),t._FPDFPage_GetAnnotCount=X("FPDFPage_GetAnnotCount",1),t._FPDFPage_GetAnnot=X("FPDFPage_GetAnnot",2),t._FPDFPage_GetAnnotIndex=X("FPDFPage_GetAnnotIndex",2),t._FPDFPage_CloseAnnot=X("FPDFPage_CloseAnnot",1),t._FPDFPage_RemoveAnnot=X("FPDFPage_RemoveAnnot",2),t._FPDFAnnot_GetSubtype=X("FPDFAnnot_GetSubtype",1),t._FPDFAnnot_IsObjectSupportedSubtype=X("FPDFAnnot_IsObjectSupportedSubtype",1),t._FPDFAnnot_UpdateObject=X("FPDFAnnot_UpdateObject",2),t._FPDFAnnot_AddInkStroke=X("FPDFAnnot_AddInkStroke",3),t._FPDFAnnot_RemoveInkList=X("FPDFAnnot_RemoveInkList",1),t._FPDFAnnot_AppendObject=X("FPDFAnnot_AppendObject",2),t._FPDFAnnot_GetObjectCount=X("FPDFAnnot_GetObjectCount",1),t._FPDFAnnot_GetObject=X("FPDFAnnot_GetObject",2),t._FPDFAnnot_RemoveObject=X("FPDFAnnot_RemoveObject",2),t._FPDFAnnot_SetColor=X("FPDFAnnot_SetColor",6),t._FPDFAnnot_GetColor=X("FPDFAnnot_GetColor",6),t._FPDFAnnot_HasAttachmentPoints=X("FPDFAnnot_HasAttachmentPoints",1),t._FPDFAnnot_SetAttachmentPoints=X("FPDFAnnot_SetAttachmentPoints",3),t._FPDFAnnot_AppendAttachmentPoints=X("FPDFAnnot_AppendAttachmentPoints",2),t._FPDFAnnot_CountAttachmentPoints=X("FPDFAnnot_CountAttachmentPoints",1),t._FPDFAnnot_GetAttachmentPoints=X("FPDFAnnot_GetAttachmentPoints",3),t._FPDFAnnot_SetRect=X("FPDFAnnot_SetRect",2),t._FPDFAnnot_GetRect=X("FPDFAnnot_GetRect",2),t._FPDFAnnot_GetVertices=X("FPDFAnnot_GetVertices",3),t._FPDFAnnot_GetInkListCount=X("FPDFAnnot_GetInkListCount",1),t._FPDFAnnot_GetInkListPath=X("FPDFAnnot_GetInkListPath",4),t._FPDFAnnot_GetLine=X("FPDFAnnot_GetLine",3),t._FPDFAnnot_SetBorder=X("FPDFAnnot_SetBorder",4),t._FPDFAnnot_GetBorder=X("FPDFAnnot_GetBorder",4),t._FPDFAnnot_HasKey=X("FPDFAnnot_HasKey",2),t._FPDFAnnot_GetValueType=X("FPDFAnnot_GetValueType",2),t._FPDFAnnot_SetStringValue=X("FPDFAnnot_SetStringValue",3),t._FPDFAnnot_GetStringValue=X("FPDFAnnot_GetStringValue",4),t._FPDFAnnot_GetNumberValue=X("FPDFAnnot_GetNumberValue",3),t._FPDFAnnot_SetAP=X("FPDFAnnot_SetAP",3),t._FPDFAnnot_GetAP=X("FPDFAnnot_GetAP",4),t._FPDFAnnot_GetLinkedAnnot=X("FPDFAnnot_GetLinkedAnnot",2),t._FPDFAnnot_GetFlags=X("FPDFAnnot_GetFlags",1),t._FPDFAnnot_SetFlags=X("FPDFAnnot_SetFlags",2),t._FPDFAnnot_GetFormFieldFlags=X("FPDFAnnot_GetFormFieldFlags",2),t._FPDFAnnot_SetFormFieldFlags=X("FPDFAnnot_SetFormFieldFlags",3),t._FPDFAnnot_GetFormFieldAtPoint=X("FPDFAnnot_GetFormFieldAtPoint",3),t._FPDFAnnot_GetFormFieldName=X("FPDFAnnot_GetFormFieldName",4),t._FPDFAnnot_GetFormFieldType=X("FPDFAnnot_GetFormFieldType",2),t._FPDFAnnot_GetFormAdditionalActionJavaScript=X("FPDFAnnot_GetFormAdditionalActionJavaScript",5),t._FPDFAnnot_GetFormFieldAlternateName=X("FPDFAnnot_GetFormFieldAlternateName",4),t._FPDFAnnot_GetFormFieldValue=X("FPDFAnnot_GetFormFieldValue",4),t._FPDFAnnot_GetOptionCount=X("FPDFAnnot_GetOptionCount",2),t._FPDFAnnot_GetOptionLabel=X("FPDFAnnot_GetOptionLabel",5),t._FPDFAnnot_IsOptionSelected=X("FPDFAnnot_IsOptionSelected",3),t._FPDFAnnot_GetFontSize=X("FPDFAnnot_GetFontSize",3),t._FPDFAnnot_SetFontColor=X("FPDFAnnot_SetFontColor",5),t._FPDFAnnot_GetFontColor=X("FPDFAnnot_GetFontColor",5),t._FPDFAnnot_IsChecked=X("FPDFAnnot_IsChecked",2),t._FPDFAnnot_SetFocusableSubtypes=X("FPDFAnnot_SetFocusableSubtypes",3),t._FPDFAnnot_GetFocusableSubtypesCount=X("FPDFAnnot_GetFocusableSubtypesCount",1),t._FPDFAnnot_GetFocusableSubtypes=X("FPDFAnnot_GetFocusableSubtypes",3),t._FPDFAnnot_GetLink=X("FPDFAnnot_GetLink",1),t._FPDFAnnot_GetFormControlCount=X("FPDFAnnot_GetFormControlCount",2),t._FPDFAnnot_GetFormControlIndex=X("FPDFAnnot_GetFormControlIndex",2),t._FPDFAnnot_GetFormFieldExportValue=X("FPDFAnnot_GetFormFieldExportValue",4),t._FPDFAnnot_SetURI=X("FPDFAnnot_SetURI",2),t._FPDFAnnot_GetFileAttachment=X("FPDFAnnot_GetFileAttachment",1),t._FPDFAnnot_AddFileAttachment=X("FPDFAnnot_AddFileAttachment",2),t._FPDFDoc_GetAttachmentCount=X("FPDFDoc_GetAttachmentCount",1),t._FPDFDoc_AddAttachment=X("FPDFDoc_AddAttachment",2),t._FPDFDoc_GetAttachment=X("FPDFDoc_GetAttachment",2),t._EPDFDoc_GetAttachmentKey=X("EPDFDoc_GetAttachmentKey",4),t._EPDFDoc_GetAttachmentIndexByKey=X("EPDFDoc_GetAttachmentIndexByKey",2),t._FPDFDoc_DeleteAttachment=X("FPDFDoc_DeleteAttachment",2),t._FPDFAttachment_GetName=X("FPDFAttachment_GetName",3),t._FPDFAttachment_HasKey=X("FPDFAttachment_HasKey",2),t._FPDFAttachment_GetValueType=X("FPDFAttachment_GetValueType",2),t._FPDFAttachment_SetStringValue=X("FPDFAttachment_SetStringValue",3),t._FPDFAttachment_GetStringValue=X("FPDFAttachment_GetStringValue",4),t._FPDFAttachment_SetDescription=X("FPDFAttachment_SetDescription",2),t._FPDFAttachment_GetDescription=X("FPDFAttachment_GetDescription",3),t._FPDFAttachment_SetFile=X("FPDFAttachment_SetFile",4),t._FPDFAttachment_GetFile=X("FPDFAttachment_GetFile",4),t._FPDFAttachment_GetSubtype=X("FPDFAttachment_GetSubtype",3),t._FPDFAttachment_GetAFRelationship=X("FPDFAttachment_GetAFRelationship",3),t._EPDFAttachment_SetSubtype=X("EPDFAttachment_SetSubtype",2),t._EPDFAttachment_SetDescription=X("EPDFAttachment_SetDescription",2),t._EPDFAttachment_SetName=X("EPDFAttachment_SetName",2),t._EPDFAttachment_GetDescription=X("EPDFAttachment_GetDescription",3),t._EPDFAttachment_GetIntegerValue=X("EPDFAttachment_GetIntegerValue",3),t._EPDFAttachment_ExtractFile=X("EPDFAttachment_ExtractFile",6),t._EPDFAttachment_ExtractFileToOwnedBuffer=X("EPDFAttachment_ExtractFileToOwnedBuffer",6),t._FPDFCatalog_IsTagged=X("FPDFCatalog_IsTagged",1),t._FPDFCatalog_GetLanguage=X("FPDFCatalog_GetLanguage",3),t._FPDFCatalog_SetLanguage=X("FPDFCatalog_SetLanguage",2),t._EPDFCatalog_GetLanguage=X("EPDFCatalog_GetLanguage",3),t._FPDFAvail_Create=X("FPDFAvail_Create",2),t._FPDFAvail_Destroy=X("FPDFAvail_Destroy",1),t._FPDFAvail_IsDocAvail=X("FPDFAvail_IsDocAvail",2),t._FPDFAvail_GetDocument=X("FPDFAvail_GetDocument",2),t._FPDFAvail_GetFirstPageNum=X("FPDFAvail_GetFirstPageNum",1),t._FPDFAvail_IsPageAvail=X("FPDFAvail_IsPageAvail",3),t._FPDFAvail_IsFormAvail=X("FPDFAvail_IsFormAvail",2),t._FPDFAvail_IsLinearized=X("FPDFAvail_IsLinearized",1),t._FPDFBookmark_GetFirstChild=X("FPDFBookmark_GetFirstChild",2),t._FPDFBookmark_GetNextSibling=X("FPDFBookmark_GetNextSibling",2),t._FPDFBookmark_GetTitle=X("FPDFBookmark_GetTitle",3),t._FPDFBookmark_GetCount=X("FPDFBookmark_GetCount",1),t._FPDFBookmark_Find=X("FPDFBookmark_Find",2),t._FPDFBookmark_GetDest=X("FPDFBookmark_GetDest",2),t._FPDFBookmark_GetAction=X("FPDFBookmark_GetAction",1),t._FPDFBookmark_GetColor=X("FPDFBookmark_GetColor",4),t._FPDFBookmark_GetStyle=X("FPDFBookmark_GetStyle",1),t._FPDFAction_GetType=X("FPDFAction_GetType",1),t._FPDFAction_GetDest=X("FPDFAction_GetDest",2),t._FPDFAction_GetFilePath=X("FPDFAction_GetFilePath",3),t._FPDFAction_GetURIPath=X("FPDFAction_GetURIPath",4),t._FPDFDest_GetDestPageIndex=X("FPDFDest_GetDestPageIndex",2),t._EPDFDest_GetPageObjectNumber=X("EPDFDest_GetPageObjectNumber",2),t._FPDFDest_GetView=X("FPDFDest_GetView",3),t._FPDFDest_GetLocationInPage=X("FPDFDest_GetLocationInPage",7),t._FPDFLink_GetLinkAtPoint=X("FPDFLink_GetLinkAtPoint",3),t._FPDFLink_GetLinkZOrderAtPoint=X("FPDFLink_GetLinkZOrderAtPoint",3),t._FPDFLink_GetDest=X("FPDFLink_GetDest",2),t._FPDFLink_GetAction=X("FPDFLink_GetAction",1),t._FPDFLink_Enumerate=X("FPDFLink_Enumerate",3),t._FPDFLink_GetAnnot=X("FPDFLink_GetAnnot",2),t._FPDFLink_GetAnnotRect=X("FPDFLink_GetAnnotRect",2),t._FPDFLink_CountQuadPoints=X("FPDFLink_CountQuadPoints",1),t._FPDFLink_GetQuadPoints=X("FPDFLink_GetQuadPoints",3),t._FPDF_GetPageAAction=X("FPDF_GetPageAAction",2),t._FPDF_GetFileIdentifier=X("FPDF_GetFileIdentifier",4),t._FPDF_GetMetaText=X("FPDF_GetMetaText",4),t._FPDF_GetPageLabel=X("FPDF_GetPageLabel",4),t._EPDF_SetMetaText=X("EPDF_SetMetaText",3),t._EPDF_HasMetaText=X("EPDF_HasMetaText",2),t._EPDF_GetMetaTrapped=X("EPDF_GetMetaTrapped",1),t._EPDF_SetMetaTrapped=X("EPDF_SetMetaTrapped",2),t._EPDF_GetMetaKeyCount=X("EPDF_GetMetaKeyCount",2),t._EPDF_GetMetaKeyName=X("EPDF_GetMetaKeyName",5),t._FPDFPageObj_NewImageObj=X("FPDFPageObj_NewImageObj",1),t._FPDFImageObj_LoadJpegFile=X("FPDFImageObj_LoadJpegFile",4),t._FPDFImageObj_LoadJpegFileInline=X("FPDFImageObj_LoadJpegFileInline",4),t._FPDFImageObj_SetMatrix=X("FPDFImageObj_SetMatrix",7),t._FPDFImageObj_SetBitmap=X("FPDFImageObj_SetBitmap",4),t._FPDFImageObj_GetBitmap=X("FPDFImageObj_GetBitmap",1),t._FPDFImageObj_GetRenderedBitmap=X("FPDFImageObj_GetRenderedBitmap",3),t._FPDFImageObj_GetImageDataDecoded=X("FPDFImageObj_GetImageDataDecoded",3),t._FPDFImageObj_GetImageDataRaw=X("FPDFImageObj_GetImageDataRaw",3),t._FPDFImageObj_GetImageFilterCount=X("FPDFImageObj_GetImageFilterCount",1),t._FPDFImageObj_GetImageFilter=X("FPDFImageObj_GetImageFilter",4),t._FPDFImageObj_GetImageMetadata=X("FPDFImageObj_GetImageMetadata",3),t._FPDFImageObj_GetImagePixelSize=X("FPDFImageObj_GetImagePixelSize",3),t._FPDFImageObj_GetIccProfileDataDecoded=X("FPDFImageObj_GetIccProfileDataDecoded",5),t._EPDFImageObj_SetPng=X("EPDFImageObj_SetPng",5),t._EPDFImageObj_SetJpeg=X("EPDFImageObj_SetJpeg",5),t._FPDF_CreateNewDocument=X("FPDF_CreateNewDocument",0),t._FPDFPage_Delete=X("FPDFPage_Delete",2),t._FPDF_MovePages=X("FPDF_MovePages",4),t._FPDFPage_New=X("FPDFPage_New",4),t._EPDFPage_InsertBlankRaw=X("EPDFPage_InsertBlankRaw",5),t._FPDFPage_GetRotation=X("FPDFPage_GetRotation",1),t._FPDFPage_InsertObject=X("FPDFPage_InsertObject",2),t._FPDFPage_InsertObjectAtIndex=X("FPDFPage_InsertObjectAtIndex",3),t._FPDFPage_RemoveObject=X("FPDFPage_RemoveObject",2),t._FPDFPage_CountObjects=X("FPDFPage_CountObjects",1),t._FPDFPage_GetObject=X("FPDFPage_GetObject",2),t._FPDFPage_HasTransparency=X("FPDFPage_HasTransparency",1),t._FPDFPageObj_Destroy=X("FPDFPageObj_Destroy",1),t._FPDFPageObj_GetMarkedContentID=X("FPDFPageObj_GetMarkedContentID",1),t._FPDFPageObj_CountMarks=X("FPDFPageObj_CountMarks",1),t._FPDFPageObj_GetMark=X("FPDFPageObj_GetMark",2),t._FPDFPageObj_AddExistingMark=X("FPDFPageObj_AddExistingMark",2),t._FPDFPageObj_AddMark=X("FPDFPageObj_AddMark",2),t._FPDFPageObj_RemoveMark=X("FPDFPageObj_RemoveMark",2),t._FPDFPageObjMark_GetName=X("FPDFPageObjMark_GetName",4),t._FPDFPageObjMark_CountParams=X("FPDFPageObjMark_CountParams",1),t._FPDFPageObjMark_GetParamKey=X("FPDFPageObjMark_GetParamKey",5),t._FPDFPageObjMark_GetParamValueType=X("FPDFPageObjMark_GetParamValueType",2),t._FPDFPageObjMark_GetParamIntValue=X("FPDFPageObjMark_GetParamIntValue",3),t._FPDFPageObjMark_GetParamFloatValue=X("FPDFPageObjMark_GetParamFloatValue",3),t._FPDFPageObjMark_GetParamStringValue=X("FPDFPageObjMark_GetParamStringValue",5),t._FPDFPageObjMark_GetParamBlobValue=X("FPDFPageObjMark_GetParamBlobValue",5),t._FPDFPageObj_HasTransparency=X("FPDFPageObj_HasTransparency",1),t._FPDFPageObjMark_SetIntParam=X("FPDFPageObjMark_SetIntParam",5),t._FPDFPageObjMark_SetFloatParam=X("FPDFPageObjMark_SetFloatParam",5),t._FPDFPageObjMark_SetStringParam=X("FPDFPageObjMark_SetStringParam",5),t._FPDFPageObjMark_SetBlobParam=X("FPDFPageObjMark_SetBlobParam",6),t._FPDFPageObjMark_RemoveParam=X("FPDFPageObjMark_RemoveParam",3),t._FPDFPageObj_GetType=X("FPDFPageObj_GetType",1),t._FPDFPageObj_GetIsActive=X("FPDFPageObj_GetIsActive",2),t._FPDFPageObj_SetIsActive=X("FPDFPageObj_SetIsActive",2),t._FPDFPage_GenerateContent=X("FPDFPage_GenerateContent",1),t._FPDFPageObj_Transform=X("FPDFPageObj_Transform",7),t._FPDFPageObj_TransformF=X("FPDFPageObj_TransformF",2),t._FPDFPageObj_GetMatrix=X("FPDFPageObj_GetMatrix",2),t._FPDFPageObj_SetMatrix=X("FPDFPageObj_SetMatrix",2),t._FPDFPageObj_SetBlendMode=X("FPDFPageObj_SetBlendMode",2),t._FPDFPage_TransformAnnots=X("FPDFPage_TransformAnnots",7),t._FPDFPage_SetRotation=X("FPDFPage_SetRotation",2),t._FPDFPageObj_SetFillColor=X("FPDFPageObj_SetFillColor",5),t._FPDFPageObj_GetFillColor=X("FPDFPageObj_GetFillColor",5),t._FPDFPageObj_GetBounds=X("FPDFPageObj_GetBounds",5),t._FPDFPageObj_GetRotatedBounds=X("FPDFPageObj_GetRotatedBounds",2),t._FPDFPageObj_SetStrokeColor=X("FPDFPageObj_SetStrokeColor",5),t._FPDFPageObj_GetStrokeColor=X("FPDFPageObj_GetStrokeColor",5),t._FPDFPageObj_SetStrokeWidth=X("FPDFPageObj_SetStrokeWidth",2),t._FPDFPageObj_GetStrokeWidth=X("FPDFPageObj_GetStrokeWidth",2),t._FPDFPageObj_GetLineJoin=X("FPDFPageObj_GetLineJoin",1),t._FPDFPageObj_SetLineJoin=X("FPDFPageObj_SetLineJoin",2),t._FPDFPageObj_GetLineCap=X("FPDFPageObj_GetLineCap",1),t._FPDFPageObj_SetLineCap=X("FPDFPageObj_SetLineCap",2),t._FPDFPageObj_GetDashPhase=X("FPDFPageObj_GetDashPhase",2),t._FPDFPageObj_SetDashPhase=X("FPDFPageObj_SetDashPhase",2),t._FPDFPageObj_GetDashCount=X("FPDFPageObj_GetDashCount",1),t._FPDFPageObj_GetDashArray=X("FPDFPageObj_GetDashArray",3),t._FPDFPageObj_SetDashArray=X("FPDFPageObj_SetDashArray",4),t._FPDFPageObj_GetRenderedStrokePattern=X("FPDFPageObj_GetRenderedStrokePattern",2),t._FPDFPageObj_GetRenderedFillPattern=X("FPDFPageObj_GetRenderedFillPattern",2),t._FPDFFormObj_CountObjects=X("FPDFFormObj_CountObjects",1),t._FPDFFormObj_GetObject=X("FPDFFormObj_GetObject",2),t._FPDFFormObj_RemoveObject=X("FPDFFormObj_RemoveObject",2),t._FPDFPageObj_CreateNewPath=X("FPDFPageObj_CreateNewPath",2),t._FPDFPageObj_CreateNewRect=X("FPDFPageObj_CreateNewRect",4),t._FPDFPath_CountSegments=X("FPDFPath_CountSegments",1),t._FPDFPath_GetPathSegment=X("FPDFPath_GetPathSegment",2),t._FPDFPath_MoveTo=X("FPDFPath_MoveTo",3),t._FPDFPath_LineTo=X("FPDFPath_LineTo",3),t._FPDFPath_BezierTo=X("FPDFPath_BezierTo",7),t._FPDFPath_GetBezierControlPoints=X("FPDFPath_GetBezierControlPoints",4),t._FPDFPath_Close=X("FPDFPath_Close",1),t._FPDFPath_SetDrawMode=X("FPDFPath_SetDrawMode",3),t._FPDFPath_GetDrawMode=X("FPDFPath_GetDrawMode",3),t._FPDFPathSegment_GetPoint=X("FPDFPathSegment_GetPoint",3),t._FPDFPathSegment_GetType=X("FPDFPathSegment_GetType",1),t._FPDFPathSegment_GetClose=X("FPDFPathSegment_GetClose",1),t._FPDFPageObj_NewTextObj=X("FPDFPageObj_NewTextObj",3),t._FPDFText_SetText=X("FPDFText_SetText",2),t._FPDFText_SetCharcodes=X("FPDFText_SetCharcodes",3),t._FPDFText_SetPositions=X("FPDFText_SetPositions",3),t._FPDFText_LoadFont=X("FPDFText_LoadFont",5),t._FPDFText_LoadStandardFont=X("FPDFText_LoadStandardFont",2),t._FPDFText_LoadCidType2Font=X("FPDFText_LoadCidType2Font",6),t._FPDFTextObj_GetFontSize=X("FPDFTextObj_GetFontSize",2),t._FPDFTextObj_SetFontSize=X("FPDFTextObj_SetFontSize",2),t._FPDFTextObj_GetText=X("FPDFTextObj_GetText",4),t._FPDFTextObj_GetRenderedBitmap=X("FPDFTextObj_GetRenderedBitmap",4),t._FPDFFont_Close=X("FPDFFont_Close",1),t._FPDFPageObj_CreateTextObj=X("FPDFPageObj_CreateTextObj",3),t._FPDFTextObj_GetTextRenderMode=X("FPDFTextObj_GetTextRenderMode",1),t._FPDFTextObj_SetTextRenderMode=X("FPDFTextObj_SetTextRenderMode",2),t._FPDFTextObj_GetFont=X("FPDFTextObj_GetFont",1),t._FPDFFont_GetBaseFontName=X("FPDFFont_GetBaseFontName",3),t._FPDFFont_GetFamilyName=X("FPDFFont_GetFamilyName",3),t._FPDFFont_GetFontData=X("FPDFFont_GetFontData",4),t._FPDFFont_GetIsEmbedded=X("FPDFFont_GetIsEmbedded",1),t._FPDFFont_GetFlags=X("FPDFFont_GetFlags",1),t._FPDFFont_GetWeight=X("FPDFFont_GetWeight",1),t._FPDFFont_GetItalicAngle=X("FPDFFont_GetItalicAngle",2),t._FPDFFont_GetAscent=X("FPDFFont_GetAscent",3),t._FPDFFont_GetDescent=X("FPDFFont_GetDescent",3),t._FPDFFont_GetGlyphWidth=X("FPDFFont_GetGlyphWidth",4),t._FPDFFont_GetGlyphPath=X("FPDFFont_GetGlyphPath",3),t._FPDFGlyphPath_CountGlyphSegments=X("FPDFGlyphPath_CountGlyphSegments",1),t._FPDFGlyphPath_GetGlyphPathSegment=X("FPDFGlyphPath_GetGlyphPathSegment",2),t._EPDFText_RedactInRect=X("EPDFText_RedactInRect",4),t._EPDFText_RedactInQuads=X("EPDFText_RedactInQuads",5),t._FPDFDoc_GetPageMode=X("FPDFDoc_GetPageMode",1),t._FPDFPage_Flatten=X("FPDFPage_Flatten",2),t._FPDFPage_HasFormFieldAtPoint=X("FPDFPage_HasFormFieldAtPoint",4),t._FPDFPage_FormFieldZOrderAtPoint=X("FPDFPage_FormFieldZOrderAtPoint",4),t._FPDFDOC_InitFormFillEnvironment=X("FPDFDOC_InitFormFillEnvironment",2),t._FPDFDOC_ExitFormFillEnvironment=X("FPDFDOC_ExitFormFillEnvironment",1),t._FORM_OnMouseMove=X("FORM_OnMouseMove",5),t._FORM_OnMouseWheel=X("FORM_OnMouseWheel",6),t._FORM_OnFocus=X("FORM_OnFocus",5),t._FORM_OnLButtonDown=X("FORM_OnLButtonDown",5),t._FORM_OnLButtonUp=X("FORM_OnLButtonUp",5),t._FORM_OnLButtonDoubleClick=X("FORM_OnLButtonDoubleClick",5),t._FORM_OnRButtonDown=X("FORM_OnRButtonDown",5),t._FORM_OnRButtonUp=X("FORM_OnRButtonUp",5),t._FORM_OnKeyDown=X("FORM_OnKeyDown",4),t._FORM_OnKeyUp=X("FORM_OnKeyUp",4),t._FORM_OnChar=X("FORM_OnChar",4),t._FORM_GetFocusedText=X("FORM_GetFocusedText",4),t._FORM_GetSelectedText=X("FORM_GetSelectedText",4),t._FORM_ReplaceAndKeepSelection=X("FORM_ReplaceAndKeepSelection",3),t._FORM_ReplaceSelection=X("FORM_ReplaceSelection",3),t._FORM_SelectAllText=X("FORM_SelectAllText",2),t._FORM_CanUndo=X("FORM_CanUndo",2),t._FORM_CanRedo=X("FORM_CanRedo",2),t._FORM_Undo=X("FORM_Undo",2),t._FORM_Redo=X("FORM_Redo",2),t._FORM_ForceToKillFocus=X("FORM_ForceToKillFocus",1),t._FORM_GetFocusedAnnot=X("FORM_GetFocusedAnnot",3),t._FORM_SetFocusedAnnot=X("FORM_SetFocusedAnnot",2),t._FPDF_FFLDraw=X("FPDF_FFLDraw",9),t._FPDF_SetFormFieldHighlightColor=X("FPDF_SetFormFieldHighlightColor",3),t._FPDF_SetFormFieldHighlightAlpha=X("FPDF_SetFormFieldHighlightAlpha",2),t._FPDF_RemoveFormFieldHighlight=X("FPDF_RemoveFormFieldHighlight",1),t._FORM_OnAfterLoadPage=X("FORM_OnAfterLoadPage",2),t._FORM_OnBeforeClosePage=X("FORM_OnBeforeClosePage",2),t._FORM_DoDocumentJSAction=X("FORM_DoDocumentJSAction",1),t._FORM_DoDocumentOpenAction=X("FORM_DoDocumentOpenAction",1),t._FORM_DoDocumentAAction=X("FORM_DoDocumentAAction",2),t._FORM_DoPageAAction=X("FORM_DoPageAAction",3),t._FORM_SetIndexSelected=X("FORM_SetIndexSelected",4),t._FORM_IsIndexSelected=X("FORM_IsIndexSelected",3),t._FORM_GetTextDirection=X("FORM_GetTextDirection",2),t._FORM_SetTextDirection=X("FORM_SetTextDirection",3),t._FPDFDoc_GetJavaScriptActionCount=X("FPDFDoc_GetJavaScriptActionCount",1),t._FPDFDoc_GetJavaScriptAction=X("FPDFDoc_GetJavaScriptAction",2),t._EPDFDoc_GetNamedJavaScriptActionModel=X("EPDFDoc_GetNamedJavaScriptActionModel",2),t._FPDFDoc_CloseJavaScriptAction=X("FPDFDoc_CloseJavaScriptAction",1),t._FPDFJavaScriptAction_GetName=X("FPDFJavaScriptAction_GetName",3),t._FPDFJavaScriptAction_GetScript=X("FPDFJavaScriptAction_GetScript",3),t._FPDF_ImportPagesByIndex=X("FPDF_ImportPagesByIndex",5),t._FPDF_ImportPages=X("FPDF_ImportPages",4),t._FPDF_ImportNPagesToOne=X("FPDF_ImportNPagesToOne",5),t._FPDF_NewXObjectFromPage=X("FPDF_NewXObjectFromPage",3),t._FPDF_CloseXObject=X("FPDF_CloseXObject",1),t._FPDF_NewFormObjectFromXObject=X("FPDF_NewFormObjectFromXObject",1),t._FPDF_CopyViewerPreferences=X("FPDF_CopyViewerPreferences",2),t._FPDF_RenderPageBitmapWithColorScheme_Start=X("FPDF_RenderPageBitmapWithColorScheme_Start",10),t._FPDF_RenderPageBitmap_Start=X("FPDF_RenderPageBitmap_Start",9),t._FPDF_RenderPage_Continue=X("FPDF_RenderPage_Continue",2),t._FPDF_RenderPage_Close=X("FPDF_RenderPage_Close",1),t._EPDF_RenderPageBitmapWithMatrix_Start=X("EPDF_RenderPageBitmapWithMatrix_Start",6),t._EPDF_RenderPage_Continue=X("EPDF_RenderPage_Continue",2),t._EPDF_FreeBuffer=X("EPDF_FreeBuffer",1),t._FPDF_SaveAsCopy=X("FPDF_SaveAsCopy",3),t._FPDF_SaveWithVersion=X("FPDF_SaveWithVersion",4),t._EPDF_SaveDocumentToOwnedBuffer=X("EPDF_SaveDocumentToOwnedBuffer",3),t._EPDF_SaveDocumentToOwnedBufferWithVersion=X("EPDF_SaveDocumentToOwnedBufferWithVersion",4),t._EPDF_SaveDocumentToOwnedBufferEx=X("EPDF_SaveDocumentToOwnedBufferEx",5),t._EPDF_SaveAsCopyEx=X("EPDF_SaveAsCopyEx",4),t._FPDFText_GetCharIndexFromTextIndex=X("FPDFText_GetCharIndexFromTextIndex",2),t._FPDFText_GetTextIndexFromCharIndex=X("FPDFText_GetTextIndexFromCharIndex",2),t._FPDF_GetSignatureCount=X("FPDF_GetSignatureCount",1),t._FPDF_GetSignatureObject=X("FPDF_GetSignatureObject",2),t._FPDFSignatureObj_GetContents=X("FPDFSignatureObj_GetContents",3),t._FPDFSignatureObj_GetByteRange=X("FPDFSignatureObj_GetByteRange",3),t._FPDFSignatureObj_GetSubFilter=X("FPDFSignatureObj_GetSubFilter",3),t._FPDFSignatureObj_GetReason=X("FPDFSignatureObj_GetReason",3),t._FPDFSignatureObj_GetTime=X("FPDFSignatureObj_GetTime",3),t._FPDFSignatureObj_GetDocMDPPermission=X("FPDFSignatureObj_GetDocMDPPermission",1),t._FPDF_StructTree_GetForPage=X("FPDF_StructTree_GetForPage",1),t._FPDF_StructTree_Close=X("FPDF_StructTree_Close",1),t._FPDF_StructTree_CountChildren=X("FPDF_StructTree_CountChildren",1),t._FPDF_StructTree_GetChildAtIndex=X("FPDF_StructTree_GetChildAtIndex",2),t._FPDF_StructElement_GetAltText=X("FPDF_StructElement_GetAltText",3),t._FPDF_StructElement_GetActualText=X("FPDF_StructElement_GetActualText",3),t._FPDF_StructElement_GetExpansion=X("FPDF_StructElement_GetExpansion",3),t._FPDF_StructElement_GetID=X("FPDF_StructElement_GetID",3),t._FPDF_StructElement_GetLang=X("FPDF_StructElement_GetLang",3),t._FPDF_StructElement_GetAttributeCount=X("FPDF_StructElement_GetAttributeCount",1),t._FPDF_StructElement_GetAttributeAtIndex=X("FPDF_StructElement_GetAttributeAtIndex",2),t._FPDF_StructElement_GetStringAttribute=X("FPDF_StructElement_GetStringAttribute",4),t._FPDF_StructElement_GetMarkedContentID=X("FPDF_StructElement_GetMarkedContentID",1),t._FPDF_StructElement_GetRawType=X("FPDF_StructElement_GetRawType",3),t._FPDF_StructElement_GetType=X("FPDF_StructElement_GetType",3),t._FPDF_StructElement_GetObjType=X("FPDF_StructElement_GetObjType",3),t._FPDF_StructElement_GetTitle=X("FPDF_StructElement_GetTitle",3),t._FPDF_StructElement_CountChildren=X("FPDF_StructElement_CountChildren",1),t._FPDF_StructElement_GetChildAtIndex=X("FPDF_StructElement_GetChildAtIndex",2),t._FPDF_StructElement_GetChildMarkedContentID=X("FPDF_StructElement_GetChildMarkedContentID",2),t._FPDF_StructElement_GetParent=X("FPDF_StructElement_GetParent",1),t._FPDF_StructElement_Attr_GetCount=X("FPDF_StructElement_Attr_GetCount",1),t._FPDF_StructElement_Attr_GetName=X("FPDF_StructElement_Attr_GetName",5),t._FPDF_StructElement_Attr_GetValue=X("FPDF_StructElement_Attr_GetValue",2),t._FPDF_StructElement_Attr_GetType=X("FPDF_StructElement_Attr_GetType",1),t._FPDF_StructElement_Attr_GetBooleanValue=X("FPDF_StructElement_Attr_GetBooleanValue",2),t._FPDF_StructElement_Attr_GetNumberValue=X("FPDF_StructElement_Attr_GetNumberValue",2),t._FPDF_StructElement_Attr_GetStringValue=X("FPDF_StructElement_Attr_GetStringValue",4),t._FPDF_StructElement_Attr_GetBlobValue=X("FPDF_StructElement_Attr_GetBlobValue",4),t._FPDF_StructElement_Attr_CountChildren=X("FPDF_StructElement_Attr_CountChildren",1),t._FPDF_StructElement_Attr_GetChildAtIndex=X("FPDF_StructElement_Attr_GetChildAtIndex",2),t._FPDF_StructElement_GetMarkedContentIdCount=X("FPDF_StructElement_GetMarkedContentIdCount",1),t._FPDF_StructElement_GetMarkedContentIdAtIndex=X("FPDF_StructElement_GetMarkedContentIdAtIndex",2),t._FPDF_AddInstalledFont=X("FPDF_AddInstalledFont",3),t._FPDF_SetSystemFontInfo=X("FPDF_SetSystemFontInfo",1),t._FPDF_GetDefaultTTFMap=X("FPDF_GetDefaultTTFMap",0),t._FPDF_GetDefaultTTFMapCount=X("FPDF_GetDefaultTTFMapCount",0),t._FPDF_GetDefaultTTFMapEntry=X("FPDF_GetDefaultTTFMapEntry",1),t._FPDF_GetDefaultSystemFontInfo=X("FPDF_GetDefaultSystemFontInfo",0),t._FPDF_FreeDefaultSystemFontInfo=X("FPDF_FreeDefaultSystemFontInfo",1),t._FPDFText_LoadPage=X("FPDFText_LoadPage",1),t._FPDFText_ClosePage=X("FPDFText_ClosePage",1),t._FPDFText_CountChars=X("FPDFText_CountChars",1),t._FPDFText_GetUnicode=X("FPDFText_GetUnicode",2),t._FPDFText_GetTextObject=X("FPDFText_GetTextObject",2),t._FPDFText_IsGenerated=X("FPDFText_IsGenerated",2),t._FPDFText_IsHyphen=X("FPDFText_IsHyphen",2),t._FPDFText_HasUnicodeMapError=X("FPDFText_HasUnicodeMapError",2),t._FPDFText_GetFontSize=X("FPDFText_GetFontSize",2),t._FPDFText_GetFontInfo=X("FPDFText_GetFontInfo",5),t._FPDFText_GetFontWeight=X("FPDFText_GetFontWeight",2),t._FPDFText_GetFillColor=X("FPDFText_GetFillColor",6),t._FPDFText_GetStrokeColor=X("FPDFText_GetStrokeColor",6),t._FPDFText_GetCharAngle=X("FPDFText_GetCharAngle",2),t._FPDFText_GetCharBox=X("FPDFText_GetCharBox",6),t._FPDFText_GetLooseCharBox=X("FPDFText_GetLooseCharBox",3),t._EPDFText_GetCharGeometry=X("EPDFText_GetCharGeometry",3),t._EPDFText_GetPageGeometry=X("EPDFText_GetPageGeometry",4),t._EPDFText_GetTextFull=X("EPDFText_GetTextFull",3),t._EPDFText_GetCharToTextMap=X("EPDFText_GetCharToTextMap",3),t._FPDFText_GetMatrix=X("FPDFText_GetMatrix",3),t._FPDFText_GetCharOrigin=X("FPDFText_GetCharOrigin",4),t._FPDFText_GetCharIndexAtPos=X("FPDFText_GetCharIndexAtPos",5),t._FPDFText_GetText=X("FPDFText_GetText",4),t._FPDFText_CountRects=X("FPDFText_CountRects",3),t._FPDFText_GetRect=X("FPDFText_GetRect",6),t._FPDFText_GetBoundedText=X("FPDFText_GetBoundedText",7),t._FPDFText_FindStart=X("FPDFText_FindStart",4),t._FPDFText_FindNext=X("FPDFText_FindNext",1),t._FPDFText_FindPrev=X("FPDFText_FindPrev",1),t._FPDFText_GetSchResultIndex=X("FPDFText_GetSchResultIndex",1),t._FPDFText_GetSchCount=X("FPDFText_GetSchCount",1),t._FPDFText_FindClose=X("FPDFText_FindClose",1),t._FPDFLink_LoadWebLinks=X("FPDFLink_LoadWebLinks",1),t._FPDFLink_CountWebLinks=X("FPDFLink_CountWebLinks",1),t._FPDFLink_GetURL=X("FPDFLink_GetURL",4),t._FPDFLink_CountRects=X("FPDFLink_CountRects",2),t._FPDFLink_GetRect=X("FPDFLink_GetRect",7),t._FPDFLink_GetTextRange=X("FPDFLink_GetTextRange",4),t._FPDFLink_CloseWebLinks=X("FPDFLink_CloseWebLinks",1),t._FPDFPage_GetDecodedThumbnailData=X("FPDFPage_GetDecodedThumbnailData",3),t._FPDFPage_GetRawThumbnailData=X("FPDFPage_GetRawThumbnailData",3),t._FPDFPage_GetThumbnailAsBitmap=X("FPDFPage_GetThumbnailAsBitmap",1),t._FPDFPage_SetMediaBox=X("FPDFPage_SetMediaBox",5),t._FPDFPage_SetCropBox=X("FPDFPage_SetCropBox",5),t._FPDFPage_SetBleedBox=X("FPDFPage_SetBleedBox",5),t._FPDFPage_SetTrimBox=X("FPDFPage_SetTrimBox",5),t._FPDFPage_SetArtBox=X("FPDFPage_SetArtBox",5),t._FPDFPage_GetMediaBox=X("FPDFPage_GetMediaBox",5),t._FPDFPage_GetCropBox=X("FPDFPage_GetCropBox",5),t._FPDFPage_GetBleedBox=X("FPDFPage_GetBleedBox",5),t._FPDFPage_GetTrimBox=X("FPDFPage_GetTrimBox",5),t._FPDFPage_GetArtBox=X("FPDFPage_GetArtBox",5),t._FPDFPage_TransFormWithClip=X("FPDFPage_TransFormWithClip",3),t._FPDFPageObj_TransformClipPath=X("FPDFPageObj_TransformClipPath",7),t._FPDFPageObj_GetClipPath=X("FPDFPageObj_GetClipPath",1),t._FPDFClipPath_CountPaths=X("FPDFClipPath_CountPaths",1),t._FPDFClipPath_CountPathSegments=X("FPDFClipPath_CountPathSegments",2),t._FPDFClipPath_GetPathSegment=X("FPDFClipPath_GetPathSegment",3),t._FPDF_CreateClipPath=X("FPDF_CreateClipPath",4),t._FPDF_DestroyClipPath=X("FPDF_DestroyClipPath",1),t._FPDFPage_InsertClipPath=X("FPDFPage_InsertClipPath",2),t._FPDF_InitLibrary=X("FPDF_InitLibrary",0),t._FPDF_InitLibraryWithConfig=X("FPDF_InitLibraryWithConfig",1),t._FPDF_DestroyLibrary=X("FPDF_DestroyLibrary",0),t._FPDF_SetSandBoxPolicy=X("FPDF_SetSandBoxPolicy",2),t._FPDF_LoadDocument=X("FPDF_LoadDocument",2),t._FPDF_GetFormType=X("FPDF_GetFormType",1),t._FPDF_LoadXFA=X("FPDF_LoadXFA",1),t._FPDF_LoadMemDocument=X("FPDF_LoadMemDocument",3),t._FPDF_LoadMemDocument64=X("FPDF_LoadMemDocument64",3),t._FPDF_LoadCustomDocument=X("FPDF_LoadCustomDocument",2),t._FPDF_GetFileVersion=X("FPDF_GetFileVersion",2),t._FPDF_DocumentHasValidCrossReferenceTable=X("FPDF_DocumentHasValidCrossReferenceTable",1),t._FPDF_GetDocPermissions=X("FPDF_GetDocPermissions",1),t._FPDF_GetDocUserPermissions=X("FPDF_GetDocUserPermissions",1),t._FPDF_GetSecurityHandlerRevision=X("FPDF_GetSecurityHandlerRevision",1),t._EPDF_SetEncryption=X("EPDF_SetEncryption",4),t._EPDF_RemoveEncryption=X("EPDF_RemoveEncryption",1),t._EPDF_UnlockOwnerPermissions=X("EPDF_UnlockOwnerPermissions",2),t._EPDF_CheckPasswordPermissions=X("EPDF_CheckPasswordPermissions",6),t._EPDF_SetRuntimeOwnerPermissions=X("EPDF_SetRuntimeOwnerPermissions",2),t._EPDF_IsEncrypted=X("EPDF_IsEncrypted",1),t._EPDF_IsOwnerUnlocked=X("EPDF_IsOwnerUnlocked",1),t._FPDF_GetPageCount=X("FPDF_GetPageCount",1),t._FPDF_LoadPage=X("FPDF_LoadPage",2),t._EPDFDoc_LoadPageByObjectNumber=X("EPDFDoc_LoadPageByObjectNumber",2),t._EPDFDoc_LoadPageByObjectNumberNormalized=X("EPDFDoc_LoadPageByObjectNumberNormalized",2),t._EPDFDoc_GetPageObjectNumberByIndex=X("EPDFDoc_GetPageObjectNumberByIndex",2),t._EPDFDoc_DeletePageByObjectNumber=X("EPDFDoc_DeletePageByObjectNumber",2),t._EPDFDoc_SetPageRotationByObjectNumber=X("EPDFDoc_SetPageRotationByObjectNumber",3),t._EPDFDoc_StartLoadPageByObjectNumber=X("EPDFDoc_StartLoadPageByObjectNumber",3),t._EPDFPage_ContinueLoad=X("EPDFPage_ContinueLoad",2),t._EPDFPage_GetObjectNumber=X("EPDFPage_GetObjectNumber",1),t._FPDF_GetPageWidthF=X("FPDF_GetPageWidthF",1),t._FPDF_GetPageWidth=X("FPDF_GetPageWidth",1),t._FPDF_GetPageHeightF=X("FPDF_GetPageHeightF",1),t._FPDF_GetPageHeight=X("FPDF_GetPageHeight",1),t._FPDF_GetPageBoundingBox=X("FPDF_GetPageBoundingBox",2),t._FPDF_RenderPageBitmap=X("FPDF_RenderPageBitmap",8),t._FPDF_RenderPageBitmapWithMatrix=X("FPDF_RenderPageBitmapWithMatrix",5),t._EPDF_RenderAnnotBitmap=X("EPDF_RenderAnnotBitmap",7),t._EPDF_RenderAnnotBitmapUnrotated=X("EPDF_RenderAnnotBitmapUnrotated",9),t._EPDF_SetDecodedImageBudget=X("EPDF_SetDecodedImageBudget",1),t._EPDF_GetDecodedImageBytes=X("EPDF_GetDecodedImageBytes",0),t._EPDFPage_ResetRenderCache=X("EPDFPage_ResetRenderCache",1),t._FPDF_ClosePage=X("FPDF_ClosePage",1),t._FPDF_CloseDocument=X("FPDF_CloseDocument",1),t._FPDF_GetLastError=X("FPDF_GetLastError",0),t._FPDF_DeviceToPage=X("FPDF_DeviceToPage",10),t._FPDF_PageToDevice=X("FPDF_PageToDevice",10),t._FPDFBitmap_Create=X("FPDFBitmap_Create",3),t._FPDFBitmap_CreateEx=X("FPDFBitmap_CreateEx",5),t._FPDFBitmap_GetFormat=X("FPDFBitmap_GetFormat",1),t._FPDFBitmap_FillRect=X("FPDFBitmap_FillRect",6),t._FPDFBitmap_GetBuffer=X("FPDFBitmap_GetBuffer",1),t._FPDFBitmap_GetWidth=X("FPDFBitmap_GetWidth",1),t._FPDFBitmap_GetHeight=X("FPDFBitmap_GetHeight",1),t._FPDFBitmap_GetStride=X("FPDFBitmap_GetStride",1),t._FPDFBitmap_Destroy=X("FPDFBitmap_Destroy",1),t._FPDF_GetPageSizeByIndexF=X("FPDF_GetPageSizeByIndexF",3),t._EPDF_GetPageRotateByIndex=X("EPDF_GetPageRotateByIndex",3),t._EPDF_GetPageTabOrderByIndex=X("EPDF_GetPageTabOrderByIndex",4),t._EPDF_GetPageBoxByIndex=X("EPDF_GetPageBoxByIndex",4),t._EPDF_GetPageUserUnitByIndex=X("EPDF_GetPageUserUnitByIndex",3),t._EPDF_LoadPageNormalized=X("EPDF_LoadPageNormalized",3),t._FPDF_GetPageSizeByIndex=X("FPDF_GetPageSizeByIndex",4),t._FPDF_VIEWERREF_GetPrintScaling=X("FPDF_VIEWERREF_GetPrintScaling",1),t._FPDF_VIEWERREF_GetNumCopies=X("FPDF_VIEWERREF_GetNumCopies",1),t._FPDF_VIEWERREF_GetPrintPageRange=X("FPDF_VIEWERREF_GetPrintPageRange",1),t._FPDF_VIEWERREF_GetPrintPageRangeCount=X("FPDF_VIEWERREF_GetPrintPageRangeCount",1),t._FPDF_VIEWERREF_GetPrintPageRangeElement=X("FPDF_VIEWERREF_GetPrintPageRangeElement",2),t._FPDF_VIEWERREF_GetDuplex=X("FPDF_VIEWERREF_GetDuplex",1),t._FPDF_VIEWERREF_GetName=X("FPDF_VIEWERREF_GetName",4),t._FPDF_CountNamedDests=X("FPDF_CountNamedDests",1),t._FPDF_GetNamedDestByName=X("FPDF_GetNamedDestByName",2),t._FPDF_GetNamedDest=X("FPDF_GetNamedDest",4),t._FPDF_GetXFAPacketCount=X("FPDF_GetXFAPacketCount",1),t._FPDF_GetXFAPacketName=X("FPDF_GetXFAPacketName",4),t._FPDF_GetXFAPacketContent=X("FPDF_GetXFAPacketContent",5),t._FPDF_GetTrailerEnds=X("FPDF_GetTrailerEnds",3);var eJ=X("fflush",1),eQ=X("strerror",1),eX=X("emscripten_builtin_memalign",2);t._malloc=X("malloc",1),t._free=X("free",1);var eY=X("setThrew",2);X("_emscripten_tempret_set",1);var e0=()=>(e0=eZ.emscripten_stack_init)(),e1=()=>(e1=eZ.emscripten_stack_get_end)(),e3=e=>(e3=eZ._emscripten_stack_restore)(e),e2=e=>(e2=eZ._emscripten_stack_alloc)(e),e6=()=>(e6=eZ.emscripten_stack_get_current)();function e5(){var e,r;if(!(U>0)){if(e0(),M((3&(e=e1()))==0),0==e&&(e+=4),f[e>>>2>>>0]=0x2135467,f[e+4>>>2>>>0]=0x89bacdfe,f[0]=0x63736d65,t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)r=t.preRun.shift(),B.unshift(r);eu(B),U>0||(t.setStatus?(t.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>t.setStatus(""),1),i()},1)):i(),T())}function i(){if(!D&&(D=!0,t.calledRun=!0,!j)){if(M(!z),z=!0,T(),t.noFSInit||eN.initialized||eN.init(),eN.ignorePermissions=!1,ev.init(),eu(L),n(t),t.onRuntimeInitialized?.(),M(!t._main,\'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]\'),T(),t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;){var e;e=t.postRun.shift(),$.unshift(e)}eu($)}}}if(t.dynCall_jiji=X("dynCall_jiji",5),t.dynCall_iiiiij=X("dynCall_iiiiij",7),t.dynCall_iiiiijj=X("dynCall_iiiiijj",9),t.dynCall_iiiiiijj=X("dynCall_iiiiiijj",10),t.dynCall_viijii=X("dynCall_viijii",7),t.dynCall_ji=X("dynCall_ji",2),t.dynCall_iiij=X("dynCall_iiij",5),t.dynCall_j=X("dynCall_j",1),t.dynCall_iji=X("dynCall_iji",4),t.dynCall_jji=X("dynCall_jji",4),t.dynCall_iiji=X("dynCall_iiji",5),t.dynCall_viijj=X("dynCall_viijj",7),t.dynCall_jij=X("dynCall_jij",4),t.dynCall_iij=X("dynCall_iij",4),t.dynCall_viji=X("dynCall_viji",5),t.wasmExports=eZ,t.ccall=eH,t.cwrap=(e,t,n,r)=>(...i)=>eH(e,t,n,i,r),t.addFunction=(e,t)=>{M(void 0!==e);var n=(e=>{if(!P){P=new WeakMap;var t=_.length;if(P)for(var n=0;n<0+t;n++){var r=ez(n);r&&P.set(r,n)}}return P.get(e)||0})(e);if(n)return n;var r=(()=>{if(eW.length)return eW.pop();try{_.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return _.length-1})();try{eq(r,e)}catch(n){if(!(n instanceof TypeError))throw n;M(void 0!==t,"Missing signature argument to addFunction: "+e),eq(r,((e,t)=>{if(M(!t.includes("j"),"i64 not permitted in function signatures when WASM_BIGINT is disabled"),"function"==typeof WebAssembly.Function)return new WebAssembly.Function((e=>{M(!e.includes("j"),"i64 not permitted in function signatures when WASM_BIGINT is disabled");for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},n={parameters:[],results:"v"==e[0]?[]:[t[e[0]]]},r=1;r{P.delete(ez(e)),eq(e,null),eW.push(e)},t.setValue=function(e,t,n="i8"){switch(n.endsWith("*")&&(n="*"),n){case"i1":case"i8":s[e>>>0]=t;break;case"i16":u[e>>>1>>>0]=t;break;case"i32":c[e>>>2>>>0]=t;break;case"i64":J("to do setValue(i64) use WASM_BIGINT");case"float":m[e>>>2>>>0]=t;break;case"double":p[e>>>3>>>0]=t;break;case"*":f[e>>>2>>>0]=t;break;default:J(`invalid type for setValue: ${n}`)}},t.getValue=function(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return s[e>>>0];case"i16":return u[e>>>1>>>0];case"i32":return c[e>>>2>>>0];case"i64":J("to do getValue(i64) use WASM_BIGINT");case"float":return m[e>>>2>>>0];case"double":return p[e>>>3>>>0];case"*":return f[e>>>2>>>0];default:J(`invalid type for getValue: ${t}`)}},t.UTF8ToString=eg,t.stringToUTF8=ej,t.UTF16ToString=(e,t)=>{M(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var n=e,r=n>>1,i=r+t/2;!(r>=i)&&d[r>>>0];)++r;if((n=r<<1)-e>32&&eU)return eU.decode(l.subarray(e>>>0,n>>>0));for(var o="",a=0;!(a>=t/2);++a){var s=u[e+2*a>>>1>>>0];if(0==s)break;o+=String.fromCharCode(s)}return o},t.stringToUTF16=(e,t,n)=>{if(M(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),M("number"==typeof n,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),n??(n=0x7fffffff),n<2)return 0;for(var r=t,i=(n-=2)<2*e.length?n/2:e.length,o=0;o>>1>>>0]=a,t+=2}return u[t>>>1>>>0]=0,t-r},["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","getTempRet0","setTempRet0","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","emscriptenLog","readEmAsmArgs","jstoi_q","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","asmjsMangle","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","getCallstack","convertPCtoSourceLocation","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","safeSetTimeout","setImmediateWrapped","safeRequestAnimationFrame","clearImmediateWrapped","polyfillSetImmediate","registerPostMainLoop","registerPreMainLoop","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","Browser_asyncPrepareDataCounter","arraySum","addDays","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","toTypedArrayIndex","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","webgl_enable_EXT_polygon_offset_clamp","webgl_enable_EXT_clip_control","webgl_enable_WEBGL_polygon_mode","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","setErrNo","demangle","stackTrace"].forEach(function(e){eo(e,()=>{var t=`\\`${e}\\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`,n=e;n.startsWith("_")||(n="$"+e),t+=` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE=\'${n}\')`,ei(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),em(t)}),es(e)}),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","out","err","callMain","abort","wasmMemory","writeStackCookie","checkStackCookie","convertI32PairToI53Checked","stackSave","stackRestore","stackAlloc","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","ERRNO_CODES","strError","DNS","Protocols","Sockets","timers","warnOnce","readEmAsmArgsArray","jstoi_s","getExecutableName","keepRuntimeAlive","asyncLoad","alignMemory","mmapAlloc","wasmTable","noExitRuntime","getCFunc","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","freeTableIndexes","functionsInTableMap","getEmptyTableSlot","updateTableMap","getFunctionAddress","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","stringToUTF8Array","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","stringToUTF8OnStack","writeArrayToMemory","JSEvents","specialHTMLTargets","findCanvasEventTarget","currentFullscreenStrategy","restoreOldWindowedStyle","UNWIND_CACHE","ExitStatus","getEnvStrings","doReadv","doWritev","initRandomFill","randomFill","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","getPreloadedImageData__data","wget","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS_createPath","FS_createDevice","FS_readFile","FS","FS_createDataFile","FS_createLazyFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack","print","printErr"].forEach(es),W=function e(){D||e5(),D||(W=e)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();for(let e of(e5(),Object.keys(t)))e in t||Object.defineProperty(t,e,{configurable:!0,get(){J(`Access to module property (\'${e}\') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.`)}});return y}}},function(){if(r)throw r[0];try{return t&&(n=(0,t[E(t)[0]])(t=0)),n}catch(e){throw r=[e],e}}),G={Unknown:"Unknown",InvalidArg:"InvalidArg",DocNotOpen:"DocNotOpen",DocOpenFailed:"DocOpenFailed",DocPasswordRequired:"DocPasswordRequired",DocPasswordIncorrect:"DocPasswordIncorrect",GrantPassphraseRequired:"GrantPassphraseRequired",Aborted:"Aborted",Network:"Network",Unauthenticated:"Unauthenticated",Forbidden:"Forbidden",NotFound:"NotFound",WireFormat:"WireFormat",RuntimeUnavailable:"RuntimeUnavailable",LayerVersionConflict:"LayerVersionConflict",NotImplemented:"NotImplemented",MalformedPdf:"MalformedPdf",SigningPending:"SigningPending",SigningExpired:"SigningExpired",SigningVersionMismatch:"SigningVersionMismatch",SignatureRefused:"SignatureRefused",ProtectedDocument:"ProtectedDocument",PayloadTooLarge:"PayloadTooLarge",ObjectNumberUnavailable:"ObjectNumberUnavailable",LayerFull:"LayerFull",ChangeConflict:"ChangeConflict",UndoUnavailable:"UndoUnavailable",IdempotencyKeyReused:"IdempotencyKeyReused",LayerDeleted:"LayerDeleted",VisitorIdentityRequired:"VisitorIdentityRequired",Conflict:"Conflict",EngineBusy:"EngineBusy",EngineRestarting:"EngineRestarting",DocumentQuarantined:"DocumentQuarantined",ThumbnailNotReady:"ThumbnailNotReady",TooManyRequests:"TooManyRequests",GrantExpired:"GrantExpired",OriginRequired:"OriginRequired",OriginNotAllowed:"OriginNotAllowed",FeatureNotEnabled:"FeatureNotEnabled",FeatureStopped:"FeatureStopped",LicenseInvalid:"LicenseInvalid",LicenseUsageLimit:"LicenseUsageLimit",UpstreamError:"UpstreamError"};function O(e){return(O="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)}function I(e,t,n){var r;return(r=function(e,t){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=O(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==O(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.values(G);var N=class e extends Error{constructor(e,t,n={}){super(t??e,void 0===n.cause?void 0:{cause:n.cause}),I(this,"name","EngineError"),I(this,"code",void 0),I(this,"details",void 0),this.code=e,this.details=n.details}static is(t,n){return(t instanceof e||t?.name==="EngineError")&&(void 0===n||t.code===n)}toJSON(){return{code:this.code,message:this.message,details:this.details}}};function C(e){return N.is(e)?e.toJSON():e instanceof Error?{code:"AbortError"===e.name?G.Aborted:G.Unknown,message:e.message}:{code:G.Unknown,message:String(e??"unknown error")}}var j=e=>{let t=t=>(e&1<[[1,e.exclude],[2,e.includeNoValueFields],[3,"html"===e.format],[4,"get"===e.method],[5,e.submitCoordinates],[6,"xfdf"===e.format],[7,e.includeAppendSaves],[8,e.includeAnnotations],[9,"pdf"===e.format],[10,e.canonicalFormat],[11,e.exclNonUserAnnots],[12,e.exclFKey],[14,e.embedForm]].reduce((e,[t,n])=>n?e|1<null!=e&&!("root"in e)&&R(e))}function B(e){return e.incomplete||!e.root?null:function e(t){let n=[];for(let r of t.next){let t=e(r);if(!t)return null;n.push(t)}let r=n.length>0?{next:n}:{};switch(t.type){case"javascript":return{type:"javascript",script:t.script,...r};case"goto":return{type:"goto",destination:t.destination,...r};case"uri":return{type:"uri",uri:t.uri,...r};case"named":return{type:"named",name:t.name,...r};case"hide":return{type:"hide",targets:t.targets,hide:t.hide,...r};case"reset-form":return{type:"reset-form",fields:t.fields,exclude:t.exclude,...r};case"submit-form":return t.payload?{...function(e){let{url:t,fields:n,charSet:r,...i}=e;return i}(t.payload),type:"submit-form",url:t.payload.url,fields:t.payload.fields,...r}:null;default:return null}}(e.root)}var L={javascript:"JavaScript",goto:"GoTo",uri:"URI",named:"Named",hide:"Hide","reset-form":"ResetForm","submit-form":"SubmitForm"};function $(e){return{root:function e(t){let n={subtype:L[t.type],next:(t.next??[]).map(e)};switch(t.type){case"javascript":return{type:"javascript",script:t.script,...n};case"goto":return{type:"goto",destination:t.destination,...n};case"uri":return{type:"uri",uri:t.uri,isMap:!1,...n};case"named":return{type:"named",name:t.name,...n};case"hide":return{type:"hide",targets:t.targets,hide:t.hide,...n};case"reset-form":return{type:"reset-form",fields:t.fields,exclude:t.exclude,...n};case"submit-form":return{type:"submit-form",payload:{url:t.url,fields:t.fields,...j(M(t))},...n}}}(e),incomplete:!1,warnings:[]}}var z=["activate","cursorEnter","cursorExit","mouseDown","mouseUp","focus","blur","pageOpen","pageClose","pageVisible","pageInvisible"];function U(e){let t=B(e);return t&&V(t)?t:null}function V(e){return"javascript"===e.type&&(e.next??[]).every(V)}function W(e){return"number"==typeof e&&Number.isInteger(e)&&e>0}function q(e){return{kind:"objectNumber",objectNumber:e}}function H(e){if(!W(e.objectNumber))throw RangeError(`encodePageKey: objectNumber must be a positive integer, got ${e.objectNumber}`);return`obj:${e.objectNumber}`}function K(e){switch(e.kind){case"objectNumber":return`obj:${e.objectNumber}`;case"baseIndex":return`base:${e.page.objectNumber}:${e.baseIndex}`}}var Z=["courier","courier-bold","courier-bold-oblique","courier-oblique","helvetica","helvetica-bold","helvetica-bold-oblique","helvetica-oblique","times-roman","times-bold","times-bold-italic","times-italic","symbol","zapf-dingbats"],J={invisible:!1,hidden:!1,print:!1,noZoom:!1,noRotate:!1,noView:!1,readOnly:!1,locked:!1,toggleNoView:!1,lockedContents:!1};function Q(e){return void 0!==e.layout?e:{...e,layout:"pushbutton"===e.fieldKind?"caption":null}}function X(e){return null===e?{kind:"unassigned"}:{kind:"group",groupId:e}}function Y(e){return"group"===e.kind?e.groupId:null}function ee(e){return eo(er(e)??{kind:"unassigned"},e.kind)}function et(e,t){let n=er(e);return void 0===n?t.assignment:eo(n,t.kind)}function en(e){if(void 0!==e.assignment)return e;let t="string"==typeof e.groupId?e.groupId:null;return{...e,assignment:X(t)}}function er(e){if(void 0!==e.assignment&&void 0!==e.groupId)throw ea("assignment",\'name a field\\\'s assignment or its groupId, not both: { kind: "group", groupId } says both\');return void 0!==e.assignment?function(e){let t=null!==e&&"object"==typeof e?e.kind:void 0;if("anyone"===t||"unassigned"===t)return{kind:t};if("group"===t){let n=e.groupId;return ei(n,"assignment"),{kind:t,groupId:n}}throw ea("assignment","a field\'s assignment is { kind: \'group\', groupId }, { kind: \'anyone\' } or { kind: \'unassigned\' }")}(e.assignment):void 0!==e.groupId?(null!==e.groupId&&ei(e.groupId,"groupId"),X(e.groupId)):void 0}function ei(e,t){if("string"!=typeof e||e.length<1||e.length>256)throw ea(t,`a field\'s groupId is 1 to 256 characters${"groupId"===t?", or null for no group":""}`)}function eo(e,t){if("anyone"===e.kind&&"signature"===t)throw ea("assignment","a signature field is signed by one signer, so it is never for anyone");return e}function ea(e,t){return new N(G.InvalidArg,t,{details:{field:e}})}function es(e){return void 0===e.lockedBy?{...e,lockedBy:null}:e}function el(e){if("pushbutton"!==e.kind)return e;let t=void 0===e.hasImage,n=void 0===e.takesImage;return t||n?{...e,...t?{hasImage:!1}:{},...n?{takesImage:!1}:{}}:e}var eu=Object.freeze(["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"]),ed=Object.freeze(["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"]),ec=new Map([["yyyy",{part:"year",written:"digits"}],["yy",{part:"year",written:"digits"}],["mmmm",{part:"month",written:"letters"}],["mmm",{part:"month",written:"letters"}],["mm",{part:"month",written:"digits"}],["m",{part:"month",written:"digits"}],["dd",{part:"day",written:"digits"}],["d",{part:"day",written:"digits"}]]),ef=/(?:HH|H|hh|h):MM(?::ss)?(?: *tt)?/;function em(e){let t={written:[],groups:[]};for(let n of e.match(/([A-Za-z])\\1*|[^A-Za-z]/g)??[]){let e=ec.get(n);if(e)t.written.push(e.written),t.groups.push(e.part);else{if(!" /-.,".includes(n))return null;t.written.push("separator")}}return t}function ep(e){if("string"!=typeof e||e.length<1||e.length>64)return!1;let t=ef.exec(e),n=em(t?e.slice(0,t.index):e),r=em(t?e.slice(t.index+t[0].length):"");if(!n||!r)return!1;let i=[...n.groups,...r.groups];if(0===i.length||new Set(i).size!==i.length)return!1;let o=t?["digits",t[0].endsWith("tt")?"letters":"digits"]:[],a=[...n.written,...o,...r.written];return!a.some((e,t)=>"digits"===e&&"digits"===a[t+1]&&t!==n.written.length)}var eh=RegExp(`^${ef.source}$`);function eF(e){return"string"==typeof e&&e.length<=64&&eh.test(e)}function eg(e){return"text"===e||"combobox"===e}var e_={date:{format:"AFDate_FormatEx",numberedFormat:"AFDate_Format",keystroke:"AFDate_KeystrokeEx",numberedKeystroke:"AFDate_Keystroke",standard:eu,isPattern:ep},time:{format:"AFTime_FormatEx",numberedFormat:"AFTime_Format",keystroke:"AFTime_KeystrokeEx",numberedKeystroke:"AFTime_Keystroke",standard:ed,isPattern:eF}},eP=["date","time"];function eD(e,t,n,r){let i=e.trim();i.endsWith(";")&&(i=i.slice(0,-1).trimEnd());let o=/^([A-Za-z_]+)\\(\\s*(?:(["\'])([^"\'\\\\]*)\\2|(\\d{1,2}))\\s*\\)$/.exec(i);if(!o)return null;let[,a,,s,l]=o,{isPattern:u,standard:d}=e_[t];return a===n&&void 0!==s?u(s)?s:null:a===r&&void 0!==l?d[Number(l)]??null:null}function eb(e){let t=e?.format;if(null==t)return null;if("object"!=typeof t)return{kind:"other"};let n=ew(t);return null===n?{kind:"other"}:function(e){for(let t of eP){let n=e_[t],r=eD(e,t,n.format,n.numberedFormat);if(null!==r)return{kind:t,pattern:r}}return{kind:"other"}}(n)}function ey(e){let t=void 0===e.purpose,n=void 0===e.format&&"string"==typeof e.kind&&eg(e.kind);return t||n?{...e,...t?{purpose:null}:{},...n?{format:eb(e.actions)}:{}}:e}function ew(e){let t=e.root;return!1===e.incomplete&&t&&"javascript"===t.type&&Array.isArray(t.next)&&!(t.next.length>0)&&"string"==typeof t.script?t.script:null}function eE(e){var t;let n=e_[e.kind];return{format:`${n.format}("${e.pattern}");`,keystroke:"date"===e.kind?`${n.keystroke}("${e.pattern}");`:`${n.numberedKeystroke}(${2*!!(t=e.pattern).includes("ss")+ +!!t.includes("tt")});`}}function eA(e){if(null===e)return{keystroke:null,format:null};let t=eE(e),n=e=>({type:"javascript",script:e});return{keystroke:n(t.keystroke),format:n(t.format)}}function ev(e){return null!==e&&"other"!==e.kind}function eS(e,t){return null===e||null===t?e===t:e.kind===t.kind&&("other"===e.kind||e.pattern===t.pattern)}var ek={date:"a date format\'s pattern is 1 to 64 characters: the groups yyyy yy mmmm mmm mm m dd d, at least one of them and the year, the month and the day each once at most, with spaces and / - . , between them, and at most one time (HH, H, hh or h, then :MM, then :ss and tt when it has them); two groups written in digits never touch",time:"a time format\'s pattern is a time and nothing else, at most 64 characters: HH, H, hh or h, then :MM, then :ss when it has seconds, then tt when it has one"};function ex(e,t){if(void 0===e.format)return;if(!eg(t))throw new N(G.InvalidArg,`\'format\' does not apply to a ${t} field`,{details:{field:"format"}});let n=function(e){if(null===e)return null;let t="object"==typeof e?e:{};if("other"===t.kind)throw new N(G.InvalidArg,"a format of kind \'other\' is read, never written: write its scripts in actions",{details:{field:"format"}});if("date"!==t.kind&&"time"!==t.kind)throw new N(G.InvalidArg,"a field\'s format is a date or a time with a pattern, or null for none",{details:{field:"format"}});let{pattern:n}=t;if(!e_[t.kind].isPattern(n))throw new N(G.InvalidArg,ek[t.kind],{details:{field:"format.pattern"}});return{kind:t.kind,pattern:n}}(e.format);for(let t of["format","keystroke"])if(e.actions?.[t]!==void 0)throw new N(G.InvalidArg,`\'format\' writes the field\'s ${t} script: name it or actions.${t}, not both`,{details:{field:`actions.${t}`}});return n}function eG(e){return $({type:"javascript",script:e})}function eO(e){return"string"==typeof e&&e.length>=1&&e.length<=256&&e.trim()===e&&!e.includes("\\0")}function eI(e,t){if(null==e)return null;if(!eO(e))throw new N(G.InvalidArg,`a field\'s ${t} is 1 to 256 characters with no space at its start or end and no NUL character, or null for none`,{details:{field:t}});return e}function eN(e){return eO(e)}function eC(e){return eI(e,"placeholder")}function ej(e){return void 0!==e.placeholder?e:{...e,placeholder:null}}function eM(e){if("objectNumber"===e.kind){if(!Number.isInteger(e.objectNumber)||e.objectNumber<=0)throw RangeError(`encodeFieldRefKey: objectNumber must be a positive integer, got ${e.objectNumber}`);return`obj:${e.objectNumber}`}return`fqn:${e.name}`}function eR(e,t){return{ref:e>0&&t?{kind:"objectNumber",page:t,objectNumber:e}:null,objectNumber:e,page:t}}var eT=(e,t)=>e.replace(/\\B(?=(\\d{3})+(?!\\d))/g,()=>t),eB=(e,t)=>t?eB(t,e%t):e;function eL(e){let t=Math.fround(e.conversion??0/0);if(!Number.isFinite(t)||t<=0)return!1;let n=e.precision??("fraction"===e.fraction?16:100);return!!Number.isInteger(n)&&!(n<1)&&!(n>0x7fffffff)&&((e.fraction??"decimal")!=="decimal"||!!Number.isInteger(Math.log10(n)))}function e$(e,t){if(!Number.isFinite(e)||!t.length||!t.every(eL))throw new N(G.InvalidArg,"Measurement requires a finite value and valid number formats");let n=Math.abs(e),r=[];for(let[e,i]of t.entries()){if(!Number.isFinite(n*=Math.fround(i.conversion)))throw new N(G.InvalidArg,"Measurement overflow");let o=Math.floor(n),a=n-o,s=e===t.length-1,l=s||0===a,u=s?function(e,t){let n=t.fraction??"decimal",r=t.thousands??",";if("round"===n)return eT(String(Math.round(e)),r);if("truncate"===n)return eT(String(Math.trunc(e)),r);if("fraction"===n){let n=t.precision??16,i=Math.floor(e),o=Math.round((e-i)*n);if(o===n&&(i++,o=0),!o)return eT(String(i),r);let a=t.fixed?1:eB(o,n);return`${i?`${eT(String(i),r)} `:""}${o/a}/${n/a}`}let i=Math.log10(t.precision??100),[o,a=""]=e.toFixed(i).split(".");return eT(o,r)+(a?(t.decimal||".")+a:"")}(n,i):eT(String(o),i.thousands??","),d="prefix"===i.labelPosition,c=i.prefixSpacing??(d&&0===e?"":" "),f=i.suffixSpacing??(!d&&l?"":" "),m=c+i.unit+f;if(r.push(d?m+u:u+m),l)break;n=a}return(e<0?"-":"")+r.join("")}var ez={courier:{family:"Courier",weight:400,italic:!1},"courier-bold":{family:"Courier",weight:700,italic:!1},"courier-bold-oblique":{family:"Courier",weight:700,italic:!0},"courier-oblique":{family:"Courier",weight:400,italic:!0},helvetica:{family:"Helvetica",weight:400,italic:!1},"helvetica-bold":{family:"Helvetica",weight:700,italic:!1},"helvetica-bold-oblique":{family:"Helvetica",weight:700,italic:!0},"helvetica-oblique":{family:"Helvetica",weight:400,italic:!0},"times-roman":{family:"Times",weight:400,italic:!1},"times-bold":{family:"Times",weight:700,italic:!1},"times-bold-italic":{family:"Times",weight:700,italic:!0},"times-italic":{family:"Times",weight:400,italic:!0},symbol:{family:"Symbol",weight:400,italic:!1},"zapf-dingbats":{family:"ZapfDingbats",weight:400,italic:!1}};function eU(e,t){if(Z.includes(e)){let t=ez[e];return{family:t.family,weight:t.weight,italic:t.italic}}let n=t?.(e);return n?{family:n.familyName,weight:n.weight,italic:n.italic}:{family:e}}function eV(e){return e.toLowerCase().replace(/[\\s\\-_\'"]/g,"")}var eW={helvetica:"Helvetica",arial:"Helvetica",arialmt:"Helvetica",sansserif:"Helvetica",times:"Times",timesroman:"Times",timesnewroman:"Times",timesnewromanpsmt:"Times",serif:"Times",courier:"Courier",couriernew:"Courier",couriernewpsmt:"Courier",monospace:"Courier",symbol:"Symbol",zapfdingbats:"ZapfDingbats",dingbats:"ZapfDingbats"};function eq(e){if("object"!=typeof e||null===e)return!1;let{left:t,bottom:n,right:r,top:i}=e;return[t,n,r,i].every(e=>"number"==typeof e&&Number.isFinite(e))}function eH(e){return{left:Math.min(e.left,e.right),right:Math.max(e.left,e.right),bottom:Math.min(e.top,e.bottom),top:Math.max(e.top,e.bottom)}}var eK=e=>Number.isFinite(e.x)&&Number.isFinite(e.y);function eZ([e,t,n,r]){if(![e,t,n,r].every(eK))return!1;let i={x:t.x-e.x,y:t.y-e.y},o={x:r.x-n.x,y:r.y-n.y},a={x:n.x-e.x,y:n.y-e.y},s={x:r.x-t.x,y:r.y-t.y},l=[i,o,a,s].map(e=>Math.hypot(e.x,e.y));if(l.some(e=>e<=1e-6)||i.x*o.x+i.y*o.y<=0||a.x*s.x+a.y*s.y<=0)return!1;let u=i.x*a.y-i.y*a.x,d=o.x*s.y-o.y*s.x;return!(Math.abs(u)<=1e-6*l[0]*l[2]||Math.abs(d)<=1e-6*l[1]*l[3])&&Math.sign(u)===Math.sign(d)}function eJ(e,t){let n=eQ(t);if(null!==n)return eX(e,n);let r=t*Math.PI/180,i=Math.abs(Math.cos(r)),o=Math.abs(Math.sin(r)),a=e.right-e.left,s=e.top-e.bottom,l=(a*i+s*o)/2,u=(a*o+s*i)/2,d=(e.left+e.right)/2,c=(e.bottom+e.top)/2;return{left:d-l,bottom:c-u,right:d+l,top:c+u}}function eQ(e){let t=(e%360+360)%360;return t%90==0?t:null}function eX(e,t){if(0===t||180===t)return e;let n=(e.left+e.right)/2,r=(e.bottom+e.top)/2,i=(e.top-e.bottom)/2,o=(e.right-e.left)/2;return{left:n-i,bottom:r-o,right:n+i,top:r+o}}function eY(e,t){let n=.01+1e-4*Math.max(e.right-e.left,e.top-e.bottom,t.right-t.left,t.top-t.bottom);return Math.abs(e.left-t.left)<=n&&Math.abs(e.bottom-t.bottom)<=n&&Math.abs(e.right-t.right)<=n&&Math.abs(e.top-t.top)<=n}function e0(e){if(0===e.length)return{left:0,bottom:0,right:0,top:0};let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let{x:o,y:a}of e)t=Math.min(t,o),n=Math.min(n,a),r=Math.max(r,o),i=Math.max(i,a);return{left:t,bottom:n,right:r,top:i}}function e1(e,t){let n=t.degrees*Math.PI/180,r=Math.cos(n),i=Math.sin(n),o=e.x-t.center.x,a=e.y-t.center.y;return{x:t.center.x+o*r+a*i,y:t.center.y-o*i+a*r}}function e3(e,t){return e1(e,{degrees:-t.degrees,center:t.center})}function e2(e,t){return e.replace(/\\r\\n|\\r|\\n/g,t)}var e6={family:"Helvetica",weight:400,italic:!1,size:12,color:"#000000",decoration:[],script:"normal",letterSpacing:0,horizontalScale:1,align:"left",dir:"ltr"};function e5(e){return e2(e.paragraphs.map(e=>e.runs.map(e=>e.text).join("")).join(`\n`),`\n`)}function e4(e){return e.split(/\\r\\n|\\r|\\n/).map(e=>({runs:[{text:e}]}))}var e8=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0");function e7(e,t,n){return`#${e8(e)}${e8(t)}${e8(n)}`}function e9(e){let t=Number.parseInt(e.slice(1),16);return{r:t>>16&255,g:t>>8&255,b:255&t}}var te={highlight:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},underline:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},squiggly:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},strikeout:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data",intent:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},circle:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",box:"data",rotation:"data",cloudyIntensity:"data"},readBack:["rect","borderStyle"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{}},square:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",box:"data",rotation:"data",cloudyIntensity:"data"},readBack:["rect","borderStyle"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{}},polygon:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",vertices:"data",rotation:"data",captionEnabled:"data",captionCenter:"data",intent:"data",measure:"data",cloudyIntensity:"data"},readBack:["rect","borderStyle","vertices"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",vertices:"points",captionCenter:"point",measure:"measure"},resources:{}},polyline:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",vertices:"data",rotation:"data",captionEnabled:"data",captionCenter:"data",intent:"data",measure:"data",lineEndings:"data"},readBack:["rect","borderStyle","vertices"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",vertices:"points",captionCenter:"point",measure:"measure"},resources:{}},line:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",linePoints:"data",lineEndings:"data",rotation:"data",intent:"data",measure:"data",captionEnabled:"data",captionPosition:"data",captionOffset:"data",leader:"data"},readBack:["rect","borderStyle"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",linePoints:"linePoints",measure:"measure"},resources:{}},link:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",target:"data"},readBack:["target"],colors:[],spaces:{rect:"box",actions:"actions",target:"linkTarget"},resources:{}},ink:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",inkList:"data",intent:"data",rotation:"data"},readBack:["rect","strokeWidth","borderStyle","inkList"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",inkList:"strokes"},resources:{}},"free-text":{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",box:"data",rotation:"data",intent:"data",fontFamily:"data",fontSize:"data",textAlign:"data",verticalAlign:"data",color:"data",fontColor:"data",interiorColor:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",cloudyIntensity:"data",calloutLine:"data",lineEnding:"data"},readBack:["rect","intent","borderStyle"],colors:["color","fontColor","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box",calloutLine:"calloutLine"},resources:{}},caret:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",box:"data",rotation:"data",intent:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{}},text:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",icon:"data",open:"data",state:"data",stateModel:"data"},readBack:[],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length"},resources:{}},stamp:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",box:"data",rotation:"data",name:"data",fit:"data",opacity:"data"},readBack:["rect"],colors:[],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{appearance:"required"}},"file-attachment":{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",icon:"data",file:"data"},readBack:[],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length"},resources:{file:"required"}},widget:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"data",box:"data",rotation:"data",color:"data",interiorColor:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",fontFamily:"data",fontSize:"data",fontColor:"data",textAlign:"data",caption:"data",checkStyle:"data",layout:"data",field:"engine",fieldKind:"engine",hasMark:"engine"},readBack:["rect","actions"],colors:["color","interiorColor","fontColor"],spaces:{rect:"box",actions:"actions",box:"box"},resources:{}},redact:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data",interiorColor:"data",overlayText:"data",repeat:"data",fontFamily:"data",fontSize:"data",fontColor:"data",textAlign:"data"},readBack:[],colors:["color","interiorColor","fontColor"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},popup:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",parent:"data",open:"data"},readBack:["parent"],colors:[],spaces:{rect:"box",actions:"actions"},resources:{}},unsupported:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",rawSubtypeCode:"engine",rawSubtypeName:"engine"},readBack:[],colors:[],spaces:{rect:"box",actions:"actions"},resources:{}}};function tt(e){let t={};for(let n of Object.keys(te))t[n]=e(te[n]);return t}function tn(e){return Object.prototype.hasOwnProperty.call(te,e)?te[e]:null}var tr=tt(e=>Object.keys(e.owners)),ti=tt(e=>e.resources),to=tt(e=>e.spaces),ta=Object.assign({},...Object.values(to)),ts=[["highlight","underline","squiggly","strikeout"],["square","circle"]],tl=/^sha256-[0-9a-f]{64}$/,tu=["page","position","size"];async function td(e){let t=new Uint8Array(await crypto.subtle.digest("SHA-256",e)),n="";for(let e of t)n+=e.toString(16).padStart(2,"0");return`sha256-${n}`}async function tc(e,t){for(let[n,r]of Object.entries(t))await td(r)!==n&&tF(e,`resource ${n} doesn\'t match its id`)}function tf(e,t){let n=new Set,r=new Set;for(let o of t){var i;tg(o)&&t_(o.page)&&tg(i=o.size)&&[i.width,i.height].every(e=>"number"==typeof e&&Number.isFinite(e)&&e>=0)||tF(e,"a page needs a page ref, a position and a size"),th(e,"a page",o,tu);let{position:t}=o;(!Number.isInteger(t)||t<0)&&tF(e,`page position ${JSON.stringify(t)} is not a position`);let a=H(o.page);n.has(a)&&tF(e,`page ${a} is listed twice`),r.has(t)&&tF(e,`position ${t} is listed twice`),n.add(a),r.add(t)}return n}function tm(e,t,n,r,i,o){for(let[a,s]of(tg(n)||tF(e,`${t} has no resources`),Object.entries(n)))r.includes(a)||tF(e,`${t} names an unknown resource role \'${a}\'`),"string"==typeof s&&tl.test(s)||tF(e,`${t} names ${JSON.stringify(s)}, which is not a resource id`),i.has(s)||tF(e,`${t} names ${s}, which the bundle doesn\'t hold`),o.add(s)}function tp(e,t,n,r){for(let i of n.keys())tl.test(i)||tF(e,`${JSON.stringify(i)} is not a resource id`),r.has(i)||tF(e,`resource ${i} is named by no ${t}`)}function th(e,t,n,r){for(let i of Object.keys(n))r.includes(i)||tF(e,`${t} has an unknown field \'${i}\'`)}function tF(e,t){throw new N(G.InvalidArg,`${e} bundle: ${t}`)}function tg(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function t_(e){return tg(e)&&"objectNumber"===e.kind&&Number.isInteger(e.objectNumber)&&e.objectNumber>0}function tP(e){let t=function(e,t,n){let r=new Map(n.map(e=>[H(e.page),e.page])),i=new Map;if("same"===t)for(let t of e){let e=r.get(H(t.page));e&&i.set(H(t.page),e)}else if("by-position"===t){let t=new Map(n.map(e=>[e.position,e.page]));for(let n of e){let e=t.get(n.position);e&&i.set(H(n.page),e)}}else for(let{from:e,to:n}of t){let t=H(e);if(i.has(t))throw new N(G.InvalidArg,`import: page ${t} is mapped twice`);let o=r.get(H(n));if(!o)throw new N(G.NotFound,`import: the document has no page ${H(n)}`);i.set(t,o)}return i}(e.bundlePages,e.pages,e.target),n=new Set;for(let r of e.named)t.has(H(r))||n.add(H(r));if(n.size>0){let e=[...n];throw new N(G.InvalidArg,`import: ${1===e.length?"page":"pages"} ${e.join(", ")} map to no page of this document`,{details:{pages:e}})}return e=>t.get(H(e))}var tD=new Set(["subtype","invisible","hidden","print","noZoom","noRotate","noView","readOnly","locked","toggleNoView","lockedContents","nm","reply","popup","parent","open","groupId","subject","state","stateModel","ref","page","hasAppearance","appearanceState","author","createdAt","modifiedAt","userId","createdBy","modifiedBy","importedBy","actions","file","field","fieldKind"]),tb=new Set(["free-text","redact"]),ty=new Set(["square","circle","free-text","stamp","caret","widget","line","polyline","polygon","ink"]),tw={square:["box"],circle:["box"],"free-text":["box","calloutLine"],line:["linePoints"],polygon:["vertices"],polyline:["vertices"],ink:["inkList"],highlight:["quadPoints"],underline:["quadPoints"],squiggly:["quadPoints"],strikeout:["quadPoints"],redact:["rect","quadPoints"],caret:["box"],text:["rect"],stamp:["box"],"file-attachment":["rect"],link:["rect"],widget:["box"]},tE=(e,t)=>.001>=Math.abs(e-t),tA=e=>"number"==typeof e?(e%360+360)%360:0;function tv(e,t){if(null==e||null==t)return null==e&&null==t;if("number"==typeof e&&"number"==typeof t)return tE(e,t);if(Array.isArray(e)||Array.isArray(t))return!!Array.isArray(e)&&!!Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>tv(e,t[n]));if("object"==typeof e&&"object"==typeof t){for(let n of new Set([...Object.keys(e),...Object.keys(t)]))if(!tv(e[n],t[n]))return!1;return!0}return e===t}function tS(e){return null==e||"object"!=typeof e?void 0:Array.isArray(e)?e.length>0?tS(e[0]):void 0:"number"==typeof e.x&&"number"==typeof e.y?{x:e.x,y:e.y}:"number"==typeof e.left&&"number"==typeof e.bottom?{x:e.left,y:e.bottom}:tS(e.start??e.upperLeft)}var tk={impact:"inert"},tx={impact:"regenerate"};function tG(e,t){let n=new Map(e.map(e=>[K(e.ref),e])),r=n.get(K(t));if(!r)return[];let i=new Map,o=new Map,a=(e,t,n)=>e.set(t,[...e.get(t)??[],n]);for(let t of e){let e=t.reply?n.get(K(t.reply.to)):void 0;e&&e!==t&&a(i,e,t);let r="popup"===t.subtype&&t.parent?n.get(K(t.parent)):void 0;r&&r!==t&&a(o,r,t);let s=t.popup?n.get(K(t.popup)):void 0;s&&s!==t&&"popup"===s.subtype&&a(o,t,s)}let s=[],l=new Set,u=e=>{if(!l.has(e)){for(let t of(l.add(e),i.get(e)??[]))u(t);for(let t of o.get(e)??[])l.has(t)||(l.add(t),s.push(t));s.push(e)}};return u(r),s}var tO=new Set(["accepted","rejected","cancelled","completed","none"]),tI=new Set(["marked","unmarked"]);function tN(e){return tO.has(e)?"review":tI.has(e)?"marked":null}var tC=new Set(["highlight","underline","squiggly","strikeout","square","circle","free-text","stamp","caret","widget","line","polyline","polygon","ink"]),tj=new Set(["box","point","points","strokes","quads","linePoints","calloutLine"]);function tM(e){return[...Object.entries(to[e]).filter(([e,t])=>"rect"!==e&&tj.has(t)).map(([e])=>e),"rotation"]}function tR(e,t){return new N(G.InvalidArg,`${e} field \'rect\': ${t}`,{details:{field:"rect"}})}var tT=e=>Number.isFinite(e)&&e>0,tB=e=>({x:Math.fround(e.x),y:Math.fround(e.y)});function tL(e,t,n){let r=0,i=e.map(tB);for(let e=0;e<(t?i.length:i.length-1);e++){let t=i[e],o=i[(e+1)%i.length];r+=Math.hypot((o.x-t.x)*n.sx,(o.y-t.y)*n.sy)}return r}function t$(e,t){if(e.length<3)return 0;let n=e.map(tB),r=n[0],i=0;for(let e=1;e!Number.isFinite(Math.fround(e.x))||!Number.isFinite(Math.fround(e.y))))return{unavailable:"invalid-geometry"};let i="polygon"===e.subtype;if(i&&!function(e){let t=e.map(tB),n=(e,t)=>e.x===t.x&&e.y===t.y;if(t.length>1&&n(t[0],t[t.length-1])&&t.pop(),t.length<3||0===t$(t,{sx:1,sy:1}))return!1;let r=(e,t,n)=>(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),i=(e,t,n)=>0===r(e,t,n)&&n.x>=Math.min(e.x,t.x)&&n.x<=Math.max(e.x,t.x)&&n.y>=Math.min(e.y,t.y)&&n.y<=Math.max(e.y,t.y);for(let e=0;e=Math.fround(e.cyx)))throw new N(G.InvalidArg,"Invalid CYX")}function tW(e){if("number"!=typeof e||!Number.isFinite(Math.fround(e)))throw new N(G.InvalidArg,"Value is outside PDF float range")}var tq=["linePoints","vertices","measure","intent","contents"],tH=["captionEnabled","captionPosition","captionOffset","captionCenter"],tK=e=>tH.some(t=>void 0!==e[t]);function tZ(e,t){try{if(null!=t.measure&&"rectilinear"===t.measure.subtype&&tV(t.measure),"line"===e&&"leader"in t&&null!=t.leader&&("object"!=typeof t.leader||Array.isArray(t.leader)))throw new N(G.InvalidArg,"Invalid line leader");if(null!=t.intent&&!("line"===e?["line-dimension","line-arrow"]:"polygon"===e?["polygon-dimension","polygon-cloud"]:["polyline-dimension"]).includes(t.intent))throw new N(G.InvalidArg,"Invalid measurement intent");if(null!=t.captionEnabled&&"boolean"!=typeof t.captionEnabled)throw new N(G.InvalidArg,"Invalid caption visibility");if("captionPosition"in t&&null!=t.captionPosition&&!["inline","top"].includes(t.captionPosition))throw new N(G.InvalidArg,"Invalid caption position");if("captionOffset"in t&&t.captionOffset&&(tW(t.captionOffset.along),tW(t.captionOffset.perpendicular)),"captionCenter"in t&&t.captionCenter&&(tW(t.captionCenter.x),tW(t.captionCenter.y)),"leader"in t&&t.leader){for(let e of[t.leader.length,t.leader.extension??0,t.leader.offset??0])tW(e);if((t.leader.extension??0)<0||(t.leader.offset??0)<0)throw new N(G.InvalidArg,"Leader extension and offset must be nonnegative")}for(let e of"linePoints"in t?t.linePoints?[t.linePoints.start,t.linePoints.end]:[]:"vertices"in t?t.vertices??[]:[])tW(e.x),tW(e.y)}catch(e){throw new N(G.InvalidArg,e.message)}}function tJ(e){if(void 0!==e.richText&&null!==e.richText&&void 0!==e.contents&&null!==e.contents&&e2(e.contents,`\n`)!==e5(e.richText))throw new N(G.InvalidArg,`${e.subtype??"annotation"}: \\`contents\\` must equal the plain projection of \\`richText\\` when both are given`)}function tQ(e){return void 0!==e&&"free-text"!==e&&(tr[e]?.includes("richText")??!1)}var tX="#ff0000",tY="#000000",t0="#ffff00",t1={invisible:!1,hidden:!1,print:!0,noZoom:!1,noRotate:!1,noView:!1,readOnly:!1,locked:!1,toggleNoView:!1,lockedContents:!1,blendMode:"normal"},t3={...t1,color:tX,opacity:1,strokeWidth:1,borderStyle:"solid"},t2={start:"none",end:"none"},t6={...t1,color:tY,opacity:1},t5={square:t3,circle:t3,line:{...t3,lineEndings:t2,captionEnabled:!1,captionPosition:"inline"},polygon:t3,polyline:{...t3,lineEndings:t2},ink:t3,highlight:{...t1,blendMode:"multiply",color:t0,opacity:1},underline:t6,squiggly:t6,strikeout:t6,caret:{...t1,color:tX,opacity:1},"free-text":{...t1,contents:"",intent:"free-text",fontFamily:"helvetica",fontSize:12,textAlign:"left",verticalAlign:"top",color:tY,fontColor:tY,opacity:1,strokeWidth:1,borderStyle:"solid"},text:{...t1,icon:"note",open:!1,color:t0,opacity:1},"file-attachment":{...t1,icon:"paperclip",color:t0,opacity:1},link:t1,redact:{...t1,quadPoints:[],color:tX,opacity:1,repeat:!1,fontFamily:"helvetica",fontSize:12,fontColor:tY,textAlign:"left"},stamp:{...t1,fit:"contain",opacity:1},widget:{...t1,strokeWidth:1,borderStyle:"solid",textAlign:"left"},popup:{...t1,print:!1,open:!1}};function t4(e){return"unsupported"===e?{}:t5[e]}var t8=[3,3];function t7(e,t){return"dashed"===e&&void 0===t}var t9=e=>tn(e)?.owners.dashArray!==void 0;function ne(e,t,n){let r={...e};if(void 0!==t.fontFamily){let e=eU(t.fontFamily,n);r.family=e.family,void 0!==e.weight&&(r.weight=e.weight),void 0!==e.italic&&(r.italic=e.italic)}return void 0!==t.fontSize&&(r.size=t.fontSize),null!=t.fontColor&&(r.color=t.fontColor),void 0!==t.textAlign&&(r.align=t.textAlign),r}function nt(e,t){if(null!=t&&"free-text-callout"!==e)throw new N(G.InvalidArg,`free-text: a callout line needs intent \'free-text-callout\', not \'${e}\'`,{details:{field:"intent"}})}function nn(e,t){return Object.fromEntries(Object.entries(e).filter(([e,n])=>"subtype"===e||!t(e,n)))}function nr(e){return new N(G.InvalidArg,`text: the custom state \'${e}\' needs a stateModel`,{details:{field:"stateModel"}})}function ni(e,t){let n=tr[e],r=Object.keys(t).filter(e=>"subtype"!==e&&!n.includes(e));if(r.length>0)throw new N(G.InvalidArg,`${e} has no field ${r.map(e=>`\'${e}\'`).join(", ")}`)}var no=class extends N{constructor(e,t){super(G.InvalidArg,`invalid scope "${e}": ${t}`,{details:{scope:e,reason:t}}),this.scope=e,I(this,"name","InvalidScope")}},na=class extends N{constructor(e,t,n,r){super(G.Forbidden,`permission denied${t?` (${t})`:""}: ${n?`one of ${n.join(", ")}`:e}${r?` for ${r.length} annotation${1===r.length?"":"s"}`:""}`,{details:{required:e,...void 0===t?{}:{context:t},...void 0===n?{}:{anyOf:[...n]},...void 0===r?{}:{refs:[...r]}}}),this.required=e,this.context=t,this.anyOf=n,this.refs=r,I(this,"name","PermissionDenied")}},ns=class extends N{constructor(e){super(G.Aborted,function(e){if(null==e)return"aborted";if("string"==typeof e)return e;if(e instanceof Error)return e.message||"aborted";try{return JSON.stringify(e)}catch{return"aborted"}}(e)),I(this,"name","AbortError"),I(this,"reason",void 0),this.reason=e}};function nl(e,t){throw new N(G.InvalidArg,t,{details:{field:e}})}var nu=["normal","rollover","down"],nd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nc=Uint8Array.from(nd,e=>e.charCodeAt(0)),nf=(()=>{let e=(new Int16Array(128)).fill(-1);for(let t=0;t<64;t++)e[nd.charCodeAt(t)]=t;return e})();function nm(e){let t=e.length;for(;t>0&&61===e.charCodeAt(t-1);)t-=1;return t}var np=(e,t,n)=>Math.min(Math.max(Math.floor(e),t),n);function nh(e,t){let n=np(t,0,e.charCount),r=e.charMap;if(!r||0===r.length)return Math.min(n,e.text.length);let[i,o]=function(e,t){let n=0,r=e.length-1,i=null;for(;n<=r;){let o=n+r>>1;e[o][0]<=t?(i=e[o],n=o+1):r=o-1}return i??[0,0]}(r,n);return o+(n-i)}function nF(e,t,n){let r=np(t,0,e.text.length),i=0,o=e.charCount;if("start"===n){for(;i>1;nh(e,t)>=r?o=t:i=t+1}return i}var ng=/[\\r\\p{Noncharacter_Code_Point}]/u;function n_(e){return"start"===e||"end"===e?null:"before"in e?e.before:e.after}function nP(e,t,n){if("start"===t)return 0;if("end"===t)return e.length;let r=n_(t),i=e.findIndex(e=>n(e)===n(r));if(i<0)throw new N(G.NotFound,`no neighbour ${n(r)} in the list`,{details:{field:"position"}});return"before"in t?i:i+1}function nD(e,t,n,r){let i=new Set(t.map(r));if(i.size!==t.length)throw new N(G.InvalidArg,"a row is named twice",{details:{field:"refs"}});let o=new Set(e.map(r)),a=t.find(e=>!o.has(r(e)));if(void 0!==a)throw new N(G.NotFound,`no row ${r(a)} in the list`,{details:{field:"refs"}});let s=n_(n);if(null!==s&&i.has(r(s)))throw new N(G.InvalidArg,`the neighbour ${r(s)} is one of the rows that move`,{details:{field:"position"}});let l=e.filter(e=>!i.has(r(e))),u=nP(l,n,r);return[...l.slice(0,u),...t,...l.slice(u)]}var nb="EmbedPDF";function ny(e,t){return{x:e.x-t.left,y:t.top-e.y}}function nw(e,t){return{x:e.x+t.left,y:t.top-e.y}}function nE(e,t){return{x:e.left-t.left,y:t.top-e.top,width:e.right-e.left,height:e.top-e.bottom}}function nA(e,t){let n=e.x+t.left,r=t.top-e.y;return{left:n,right:n+e.width,bottom:r-e.height,top:r}}function nv(e,t){return{upperLeft:ny(e.upperLeft,t),upperRight:ny(e.upperRight,t),lowerLeft:ny(e.lowerLeft,t),lowerRight:ny(e.lowerRight,t)}}function nS(e){return"rotation"in e}function nk(e){return{kind:"objectNumber",objectNumber:e}}function nx(e){if(e.byteLength<4)return null;let t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?function(e){if(e.byteLength<24)return null;let t=new DataView(e),n=t.getUint32(16),r=t.getUint32(20);return 0===n||0===r?null:{mimeType:"image/png",width:n,height:r}}(e):255===t[0]&&216===t[1]&&255===t[2]?function(e){let t=new Uint8Array(e),n=2;for(;n+4=192&&r<=195){if(n+9>t.byteLength)return null;let r=new DataView(e,n+5),i=r.getUint16(0),o=r.getUint16(2);if(0===o||0===i)return null;return{mimeType:"image/jpeg",width:o,height:i}}if(216===r||217===r)n+=2;else if(255===r)n+=1;else{let e=t[n+2]<<8|t[n+3];n+=2+e}}return null}(e):37===t[0]&&80===t[1]&&68===t[2]&&70===t[3]?{mimeType:"application/pdf"}:null}var nG=["appearance","file"];function nO(e,t,n){let r=ti[e]??{};for(let i of nG){let o=t?.[i]!==void 0;if(o&&void 0===r[i])throw new N(G.InvalidArg,`a ${e} annotation takes no \'${i}\' resource`);if(!o&&"create"===n&&"required"===r[i])throw new N(G.InvalidArg,`creating a ${e} annotation needs its \'${i}\' resource`)}}var nI=Object.freeze({bundleBytes:0x3200000,manifestBytes:0x1000000,items:1e4,pages:2e3,resources:2e3,resourceBytes:0x3200000,imagePixels:4e7});function nN(e){return new TextEncoder().encode(JSON.stringify(e)).length}function nC(e,t,n,r){let i=t[n];if(!(r<=i))throw new N(G.PayloadTooLarge,`the ${e} bundle is past its ${n} limit: ${r} > ${i}`,{details:{limit:n,max:i,value:r}})}var nj={annotation:"an annotation bundle",form:"a form bundle"};function nM(e){let t=t=>new N(G.InvalidArg,`the file is not ${nj[e.kind]}`,void 0===t?void 0:{cause:t});return{stringify(t,n){let r=n?.limits??nI,i=new Map;for(let[e,n]of Object.entries(t.resources))i.set(e,n.length);e.assertManifest(t,i,r);let o={};for(let n of e.keys)o[n]=t[n];let a={};for(let[e,n]of Object.entries(t.resources))a[e]=function(e){let t=new Uint8Array(4*Math.ceil(e.length/3)),n=0,r=0;for(;r+2>18],t[n++]=nc[i>>12&63],t[n++]=nc[i>>6&63],t[n++]=nc[63&i]}let i=e.length-r;if(i>0){let o=e[r]<<16|(2===i?e[r+1]<<8:0);t[n++]=nc[o>>18],t[n++]=nc[o>>12&63],t[n++]=2===i?nc[o>>6&63]:61,t[n++]=61}return new TextDecoder().decode(t)}(n);return o.resources=a,JSON.stringify(o)},async parse(n,r){let i,o=r?.limits??nI,a=Math.ceil(4*o.bundleBytes/3)+81*o.resources+256;if(n.length>a)throw new N(G.PayloadTooLarge,`the file is ${n.length} characters, more than a bundle within ${o.bundleBytes} bytes can be`,{details:{limit:"bundleBytes",max:o.bundleBytes,fileLength:n.length}});try{i=JSON.parse(n)}catch(e){throw t(e)}let s="object"==typeof i&&null!==i?i.resources:null;if("object"!=typeof s||null===s||Array.isArray(s))throw t();let l=new Map;for(let[e,t]of Object.entries(s)){let n="string"==typeof t?function(e){let t=nm(e);return t%4==1?null:Math.floor(3*t/4)}(t):null;if(null===n)throw new N(G.InvalidArg,`resource ${e} is not base64`);l.set(e,n)}e.assertManifest(i,l,o);let u={};for(let[e,t]of Object.entries(s))try{u[e]=function(e){let t=nm(e);if(t%4==1)throw Error("malformed base64");let n=new Uint8Array(Math.floor(3*t/4)),r=0,i=0,o=0;for(let a=0;a=8&&(o-=8,n[r++]=i>>o&255)}return n}(t)}catch(t){throw new N(G.InvalidArg,`resource ${e} is not base64`,{cause:t})}await tc(e.kind,u);let d={};for(let t of e.keys)d[t]=i[t];return d.resources=u,e.complete?e.complete(d):d}}}var nR=["format","version","pages","items"],nT=[...nR,"resources"],nB=["data","resources"];function nL(e,t,n){tg(e)||tF("annotation","not an annotation bundle"),th("annotation","the bundle",e,nT),"embedpdf/annotations"!==e.format&&tF("annotation",`unknown format ${JSON.stringify(e.format)}`),1!==e.version&&tF("annotation",`unknown version ${JSON.stringify(e.version)}`);let{pages:r,items:i}=e;Array.isArray(r)||tF("annotation","pages is not a list"),Array.isArray(i)||tF("annotation","items is not a list"),nC("annotation",n,"items",i.length),nC("annotation",n,"pages",r.length),nC("annotation",n,"resources",t.size);let o=nN({pages:r,items:i});for(let e of(nC("annotation",n,"manifestBytes",o),t.values()))nC("annotation",n,"resourceBytes",e),o+=e;nC("annotation",n,"bundleBytes",o);let a=tf("annotation",r),s=new Set;i.forEach((e,n)=>{tg(e)&&tg(e.data)&&"string"==typeof e.data.subtype||tF("annotation",`item ${n} has no annotation data`),th("annotation",`item ${n}`,e,nB);let r=e.data.ref,i=tg(r)?r.page:void 0;t_(i)&&a.has(H(i))||tF("annotation",`item ${n} is on a page the bundle doesn\'t list`),tm("annotation",`item ${n}`,e.resources,nG,t,s)}),tp("annotation","item",t,s)}function n$(e){return{kind:"key",key:e}}nM({kind:"annotation",keys:nR,assertManifest:nL});var nz=new Set(["square","circle","free-text","stamp","caret"]),nU=(e,t)=>"function"==typeof t?t(e):t,nV=(e,t)=>null===e?null:t(e);function nW(e,t){let{left:n,top:r}=nU(e.page,t),i=e=>nV(e,e=>e-n),o=e=>nV(e,e=>r-e);switch(e.kind){case"xyz":{let{left:t,top:n,...r}=e;return{...r,x:i(t),y:o(n)}}case"fitH":case"fitBH":{let{top:t,...n}=e;return{...n,y:o(t)}}case"fitV":case"fitBV":{let{left:t,...n}=e;return{...n,x:i(t)}}case"fitR":{let{left:t,bottom:i,right:o,top:a,...s}=e,l=Math.min(i,a),u=Math.max(i,a);return{...s,x:Math.min(t,o)-n,y:r-u,width:Math.abs(o-t),height:u-l}}case"fit":case"fitB":return e}}function nq(e,t){let{left:n,top:r}=nU(e.page,t),i=e=>nV(e,e=>e+n),o=e=>nV(e,e=>r-e);switch(e.kind){case"xyz":{let{x:t,y:n,...r}=e;return{...r,left:i(t),top:o(n)}}case"fitH":case"fitBH":{let{y:t,...n}=e;return{...n,top:o(t)}}case"fitV":case"fitBV":{let{x:t,...n}=e;return{...n,left:i(t)}}case"fitR":{let{x:t,y:i,width:o,height:a,...s}=e,l=r-i;return{...s,left:t+n,bottom:l-a,right:t+n+o,top:l}}case"fit":case"fitB":return e}}function nH(e,t){return"goto"===e.kind?{...e,destination:t(e.destination)}:e}function nK(e,t){return{...e,root:e.root?function e(t,n){let r=t.next.map(t=>e(t,n));return"goto"===t.type?{...t,next:r,destination:n(t.destination)}:{...t,next:r}}(e.root,t):null}}function nZ(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>null==n?[e,n]:[e,"root"in n?nK(n,t):function e(t,n){let r=t.next?.map(t=>e(t,n)),i="goto"===t.type?{...t,destination:n(t.destination)}:t;return r?{...i,next:r}:i}(n,t)]))}function nJ(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>[e,n?nK(n,t):n]))}var nQ=(e,t)=>"rectilinear"===e.subtype&&e.origin?{...e,origin:t(e.origin)}:e;function nX(e,t){return nQ(e,e=>ny(e,t))}function nY(e,t){return nQ(e,e=>nw(e,t))}function n0(e,t){return e.map(e=>({...e,bbox:nE(e.bbox,t),measure:e.measure?nX(e.measure,t):null}))}var n1={length:e=>e,point:(e,{visible:t})=>ny(e,t),points:(e,{visible:t})=>e.map(e=>ny(e,t)),strokes:(e,{visible:t})=>e.map(e=>e.map(e=>ny(e,t))),box:(e,{visible:t})=>nE(e,t),quads:(e,{visible:t})=>e.map(e=>nv(e,t)),linePoints:(e,{visible:t})=>({start:ny(e.start,t),end:ny(e.end,t)}),calloutLine:(e,{visible:t})=>e.map(e=>ny(e,t)),measure:(e,{visible:t})=>nX(e,t),linkTarget:(e,{boxOf:t})=>nH(e,e=>nW(e,t)),actions:(e,{boxOf:t})=>nZ(e,e=>nW(e,t))},n3={length:e=>e,point:(e,{visible:t})=>nw(e,t),points:(e,{visible:t})=>e.map(e=>nw(e,t)),strokes:(e,{visible:t})=>e.map(e=>e.map(e=>nw(e,t))),box:(e,{visible:t})=>nA(e,t),quads:(e,{visible:t})=>e.map(e=>({upperLeft:nw(e.upperLeft,t),upperRight:nw(e.upperRight,t),lowerLeft:nw(e.lowerLeft,t),lowerRight:nw(e.lowerRight,t)})),linePoints:(e,{visible:t})=>({start:nw(e.start,t),end:nw(e.end,t)}),calloutLine:(e,{visible:t})=>e.map(e=>nw(e,t)),measure:(e,{visible:t})=>nY(e,t),linkTarget:(e,{boxOf:t})=>nH(e,e=>nq(e,t)),actions:(e,{boxOf:t})=>nZ(e,e=>nq(e,t))};function n2(e,t,n,r){let i=void 0===e?ta:to[e]??to.unsupported;return Object.fromEntries(Object.entries(t).map(([e,t])=>{let o=i[e];if(!o||null==t)return[e,t];let a=r[o](t,n);if(r===n3&&function e(t){return"number"==typeof t?Number.isNaN(t):"object"==typeof t&&null!==t&&Object.values(t).some(e)}(a)){var s,l;throw s=e,l=o,new N(G.InvalidArg,`field \'${s}\': expected page space, ${"box"===l?"{ x, y, width, height }":"points as { x, y }"} from the page\'s top-left`,{details:{field:s}})}return[e,a]}))}function n6(e,t,n){return n2(e.subtype,e,{visible:t,boxOf:n},n1)}function n5(e,t,n){return n2(e.subtype,e,{visible:t,boxOf:n},n3)}function n4(e,t,n){return n2(e.subtype,e,{visible:t,boxOf:n},n3)}var n8=e=>!!(e.space||e.empty),n7=e=>!!e.empty,n9={baseline:{x:1,y:0},ascent:{x:0,y:1}},re=(e,t)=>({x:t.x*e.baseline.x+t.y*e.baseline.y,y:t.x*e.ascent.x+t.y*e.ascent.y}),rt=(e,t)=>({x:e.baseline.x*t.x+e.ascent.x*t.y,y:e.baseline.y*t.x+e.ascent.y*t.y}),rn={left:0,bottom:0,right:0,top:0};function rr(e,t){let n=[t.upperLeft,t.upperRight,t.lowerLeft,t.lowerRight].map(t=>re(e,t)),r=n.map(e=>e.x),i=n.map(e=>e.y);return{left:Math.min(...r),bottom:Math.min(...i),right:Math.max(...r),top:Math.max(...i)}}var ri=(e,t)=>t.x>=e.left&&t.x<=e.right&&t.y>=e.bottom&&t.y<=e.top;function ro(e,t,n=1.5){let r=e.frames.map((e,n)=>0===n?t:re(e,t));for(let t of e.runs){let n=r[t.frame];if(ri(t.rect,n))for(let r=0;rs.right+i)&&!(n.ys.top+i))for(let r=0;rl.right+i||n.yl.top+i)continue;let u=Math.min(Math.abs(n.x-l.left),Math.abs(n.x-l.right)),d=Math.min(Math.abs(n.y-l.bottom),Math.abs(n.y-l.top));u+d=0?o:null}function ra(e,t,n){return 0===t?{upperLeft:{x:n.left,y:n.top},upperRight:{x:n.right,y:n.top},lowerLeft:{x:n.left,y:n.bottom},lowerRight:{x:n.right,y:n.bottom}}:{upperLeft:rt(e,{x:n.left,y:n.top}),upperRight:rt(e,{x:n.right,y:n.top}),lowerLeft:rt(e,{x:n.left,y:n.bottom}),lowerRight:rt(e,{x:n.right,y:n.bottom})}}var rs=e=>e.right===e.left&&e.top===e.bottom;function rl(e,t,n,r){let i=Math.max(t,r)-Math.min(e,n);return 0!==i&&Math.max(0,Math.min(t,r)-Math.max(e,n))/i>=.5}var ru={x:0,y:0,width:0,height:0},rd={upperLeft:{x:0,y:0},upperRight:{x:0,y:0},lowerLeft:{x:0,y:0},lowerRight:{x:0,y:0}},rc=/\\s/,rf=/\\p{M}/gu,rm=/^(?![\\t\\n\\v\\f\\r])[\\p{Cf}\\p{Cc}\\p{Noncharacter_Code_Point}]$/u;function rp(e,t={}){let n=[],r=[],i=!1,o=0;for(let a of e){let e;if(rm.test(a)){o+=a.length;continue}rc.test(a)?e=" ":(e=a.normalize("NFKD"),t.keepMarks||(e=e.replace(rf,"")),t.keepCase||(e=e.toUpperCase().toLowerCase()));for(let a=0;a=55296&&n<=56319&&t+1=56320&&n<=57343)return 2}return 1}(e.original,i)-r}}var rF=["format","version","pages","fields","widgets","calculationOrder"],rg=["image"],r_=[...rF,"resources"],rP=["data"],rD=["data","resources"];function rb(e){let t=ry(e.fields,e=>es(ej(en(el(ey(e)))))),n=e.widgets&&ry(e.widgets,Q);return t===e.fields&&n===e.widgets?e:{...e,fields:t,...n?{widgets:n}:{}}}function ry(e,t){let n=!1,r=e.map(e=>{let r=t(e.data);return r===e.data?e:(n=!0,{...e,data:r})});return n?r:e}function rw(e,t,n){tg(e)||tF("form","not a form bundle"),th("form","the bundle",e,r_),"embedpdf/form"!==e.format&&tF("form",`unknown format ${JSON.stringify(e.format)}`),1!==e.version&&tF("form",`unknown version ${JSON.stringify(e.version)}`);let{pages:r,fields:i,widgets:o,calculationOrder:a}=e;Array.isArray(r)||tF("form","pages is not a list"),Array.isArray(i)||tF("form","fields is not a list"),Array.isArray(o)||tF("form","widgets is not a list"),Array.isArray(a)||tF("form","calculationOrder is not a list"),nC("form",n,"items",i.length+o.length),nC("form",n,"pages",r.length),nC("form",n,"resources",t.size);let s=nN({pages:r,fields:i,widgets:o,calculationOrder:a});for(let e of(nC("form",n,"manifestBytes",s),t.values()))nC("form",n,"resourceBytes",e),s+=e;nC("form",n,"bundleBytes",s);let l=tf("form",r);i.forEach((e,t)=>{tg(e)&&tg(e.data)&&"string"==typeof e.data.kind&&"string"==typeof e.data.name&&tg(e.data.ref)||tF("form",`field ${t} has no field data`),th("form",`field ${t}`,e,rP)});let u=new Set;o.forEach((e,n)=>{tg(e)&&tg(e.data)&&"widget"===e.data.subtype||tF("form",`widget ${n} has no widget data`),th("form",`widget ${n}`,e,rD);let r=e.data.ref,i=tg(r)?r.page:void 0;t_(i)&&l.has(H(i))||tF("form",`widget ${n} is on a page the bundle doesn\'t list`),tm("form",`widget ${n}`,e.resources,rg,t,u)}),a.forEach((e,t)=>{tg(e)||tF("form",`calculation order entry ${t} is not a field ref`)}),tp("form","widget",t,u)}function rE(e){return{keepCase:!!e.matchCase,keepMarks:!!e.matchDiacritics,dropWhitespace:!!e.ignoreWhitespace}}nM({kind:"form",keys:rF,assertManifest:rw,complete:rb});var rA=/[\\p{L}\\p{N}_]/u,rv=/\\p{M}/u;function rS(e,t){if(t<=0)return!1;let n=e.charCodeAt(t-1);return rA.test(String.fromCodePoint(e.codePointAt(n>=56320&&n<=57343&&t>=2?t-2:t-1)))}function rk(e,t){return!(t>=e.length)&&rA.test(String.fromCodePoint(e.codePointAt(t)))}function rx(e,t){let n=rp(t.text,rE(t)).folded;if(0===n.trim().length)return[];let r=[],i=0;for(;i<=e.folded.length-n.length;){let o=e.folded.indexOf(n,i);if(o<0)break;if(t.wholeWord&&!function(e,t,n,r){if(!r.ignoreWhitespace)return!rS(e.folded,t)&&!rk(e.folded,t+n);let{start:i,count:o}=rh(e,t,n);return!rS(e.original,i)&&!rk(e.original,i+o)}(e,o,n.length,t)){i=o+1;continue}if(t.matchDiacritics&&o+n.length512)return{ok:!1,issue:"too-long",message:"Pattern exceeds 512 characters."};let t=!1;for(let n=0;n="1"&&r<="9")return{ok:!1,issue:"backreference",message:`Backreference \\\\${r} is not supported.`};if(!t&&"k"===r&&"<"===e[n+2])return{ok:!1,issue:"backreference",message:"Named backreferences (\\\\k<\\u2026>) are not supported."};n++;continue}if(t){"]"===r&&(t=!1);continue}if("["===r){t=!0;continue}if("("===r&&"?"===e[n+1]){let t=e[n+2]??"";if("="===t||"!"===t)return{ok:!1,issue:"lookaround",message:"Lookahead ((?=\\u2026), (?!\\u2026)) is not supported."};if("<"===t&&("="===e[n+3]||"!"===e[n+3]))return{ok:!1,issue:"lookaround",message:"Lookbehind ((?<=\\u2026), (?{var r;let i;return"link"!==e.subtype||"activate"!==t||o&&(r=n,i=r?.root,!r||!!r.incomplete||!i||!!(i.next.length>0)||!!("uri"===i.type&&i.isMap))})&&n.push({field:"actions",reason:"unsupported-action"}),n}var rT=new Set(["NextPage","PrevPage","FirstPage","LastPage"]);function rB(e){let t=[],n=(e,r)=>{if("object"==typeof e&&null!==e){if(Array.isArray(e))return void e.forEach(e=>n(e));if("page"===r&&r$(e))return void t.push(e);Object.entries(e).forEach(([e,t])=>n(t,e))}};return n(e),t}function rL(e,t){let n=(e,r)=>"object"!=typeof e||null===e?e:Array.isArray(e)?e.map(e=>n(e)):"page"===r&&r$(e)?t(e):Object.fromEntries(Object.entries(e).map(([e,t])=>[e,n(t,e)]));return n(e)}function r$(e){return 2===Object.keys(e).length&&"objectNumber"===e.kind&&"number"==typeof e.objectNumber}var rz=/^\\s*event\\s*\\.\\s*target\\s*\\.\\s*buttonImportIcon\\s*\\(\\s*\\)\\s*(?:;\\s*)?$/,rU=["activate","mouseUp"];function rV(e){let t,n=rU.flatMap(t=>{let n=e?.[t];return null==n?[]:[n]});return 1===n.length&&null!==(t=ew(n[0]))&&rz.test(t)}function rW(e){return e.length>0&&e.every(rV)}function rq(){return{type:"javascript",script:"event.target.buttonImportIcon();"}}function rH(e){return rU.some(t=>e?.[t]!==void 0)?e??{}:{...e,activate:rq()}}function rK(e,t){let{takesImage:n}=e;if(void 0!==n){if("pushbutton"!==t)throw new N(G.InvalidArg,`\'takesImage\' does not apply to a ${t} field`,{details:{field:"takesImage"}});if("boolean"!=typeof n)throw new N(G.InvalidArg,"\'takesImage\' is true or false",{details:{field:"takesImage"}});return n}}function rZ(e,t){if(!t)return rV(e)?{kind:"remove",event:e?.activate!=null?"activate":"mouseUp"}:{kind:"keep"};if(rV(e))return{kind:"keep"};if(rU.some(t=>e?.[t]!=null))throw new N(G.InvalidArg,"\'takesImage\' can\'t be set: a widget\'s press already runs another action, which is never overwritten. Remove it first (updateWidget, actions.activate and actions.mouseUp)",{details:{field:"takesImage"}});return{kind:"write"}}function rJ(e,t=0){if(e.length+t===0)throw rX();if(t>0)throw new N(G.InvalidArg,"\'takesImage\' can\'t be set: a widget of the button is on no page, so its press can\'t be written",{details:{field:"takesImage"}});for(let t of e)rZ(t,!0)}function rQ(e){return"write"===e.kind?{activate:rq()}:"remove"===e.kind?{[e.event]:null}:{}}function rX(){return new N(G.InvalidArg,"\'takesImage\' needs a widget: the script that makes an image field is its widgets\' press",{details:{field:"takesImage"}})}function rY(e,t,n){if(0===e.length||0===n.length)return e;let r=new Set(n),i=[0];for(let e=0;ei[Math.min(Math.max(e,0),t)],a=[];return e.forEach((n,r)=>{if(o(e[r+1]?.firstPage??t)===o(n.firstPage))return;let i=o(n.firstPage);a.push(i===n.firstPage?n:{...n,firstPage:i})}),r1(a,e)?e:a}function r0(e,t,n){if(n<=0)return e;let r=!1,i=e.map(e=>0===e.firstPage||e.firstPage{let r=t[n];return e.firstPage===r.firstPage&&e.style===r.style&&e.firstNumber===r.firstNumber&&e.prefix===r.prefix})}var r3=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]];function r2(e){let t=e%1e6,n="";for(let[e,r]of r3)for(;t>=e;)n+=r,t-=e;return n}function r6(e){if(e<=0)return"";let t=e-1;return String.fromCharCode(97+t%26).repeat((Math.floor(t/26)+1)%1e3)}var r5={text:"{ value }",checkbox:"{ checked } or { value }",radio:"{ value }",combobox:"{ value }",listbox:"{ selectedValues }"};function r4(e,t){var n;switch(e.kind){case"text":if("value"in t)return{kind:"text",value:t.value??""};break;case"checkbox":if("checked"in t){if(!t.checked)return{kind:"toggle",state:null};let n=e.widgets[0];if(!n)throw it(`\'${e.name}\' has no widget to check`);return{kind:"toggle",state:n.onState}}if("value"in t)return{kind:"toggle",state:r9(e,t.value)};break;case"radio":if("value"in t){let n=r9(e,t.value);if(null===n&&e.noToggleToOff)throw it(`\'${e.name}\' must keep a choice: it can\'t be cleared`);return{kind:"toggle",state:n}}break;case"combobox":if("value"in t)return ie(e,null===t.value?[]:[t.value]);break;case"listbox":if("selectedValues"in t)return ie(e,t.selectedValues);break;default:throw it(`${e.kind} fields hold no value you can set`)}throw it(`a ${e.kind} field takes ${r5[e.kind]}, not ${"checked"in(n=t)?"{ checked }":"selectedValues"in n?"{ selectedValues }":"{ value }"}`)}function r8(e,t){let n=e=>new N(G.InvalidArg,e,{details:{field:"defaultValue"}});if(new Set(t).size!==t.length)throw n("the default values must not repeat");if(t.length>1&&!("listbox"===e.kind&&e.multiSelect))throw n(`a ${"listbox"===e.kind?"list without multiSelect":"dropdown"} has one default`);let r="combobox"===e.kind&&!0===e.edit,i=new Set(e.options.map(e=>e.value)),o=t.find(e=>!i.has(e));if(void 0!==o&&!r)throw n(`\'${o}\' is not an option value of the ${"listbox"===e.kind?"list":"dropdown"}`)}function r7(e,t){return e.kind===t.kind&&("scalar"===e.kind&&"scalar"===t.kind?e.value===t.value:"array"!==e.kind||"array"!==t.kind||e.values.length===t.values.length&&e.values.every((e,n)=>e===t.values[n]))}function r9(e,t){if(null===t||"Off"===t)return null;let n=e.widgets.find(e=>e.exportValue===t);if(!n)throw it(`no widget of \'${e.name}\' has the export value \'${t}\'`);return n.onState}function ie(e,t){if(new Set(t).size!==t.length)throw it("the values must not repeat");if("listbox"===e.kind&&!e.multiSelect&&t.length>1)throw it(`\'${e.name}\' takes one value (it has no multiSelect)`);let n=new Set(e.options.map(e=>e.value)),r="combobox"===e.kind&&e.edit&&1===t.length,i=t.find(e=>!n.has(e));if(!r&&void 0!==i)throw it(`\'${i}\' is not an option value of \'${e.name}\'`);return{kind:"choice",values:t}}function it(e){return new N(G.InvalidArg,e,{details:{field:"value"}})}function ir(e,t){let n="checkbox"===e||"radio"===e,r="pushbutton"===e,i=ii(e,t,"caption",r,"a push button\'s");if(r&&null===t.layout)throw new N(G.InvalidArg,"a push button\'s widget always has a layout: \'caption\' shows its caption alone",{details:{field:"layout"}});return ii(e,ii(e,i,"layout",r,"a push button\'s"),"checkStyle",n,"a checkbox\'s or radio button\'s")}function ii(e,t,n,r,i){if(r||void 0===t[n])return t;if(null!==t[n]){let t="unknown"===e?"this widget":`a ${e} field\'s widget`;throw new N(G.InvalidArg,`\'${n}\' applies to ${i} widgets, not to ${t}`,{details:{field:n}})}let{[n]:o,...a}=t;return a}function io(e){if(("combobox"===e.kind||"listbox"===e.kind)&&void 0!==e.defaultValue){let t=Array.isArray(e.defaultValue)?e.defaultValue:[e.defaultValue];r8({...e,options:e.options??[]},t)}switch(e.kind){case"text":case"combobox":return void 0!==e.defaultValue?ib(e.defaultValue):iy();case"listbox":return ip(ih((e.options??[]).map(iP),e.defaultValue??[]));default:return iy()}}function ia(e,t){var n,r,i;let o,a,s,l,u,d={...e.field};if(void 0!==t.name){let e=d.name.lastIndexOf(".");d.name=e<0?t.name:`${d.name.slice(0,e+1)}${t.name}`}for(let e of is)"boolean"==typeof t[e]&&e in d&&(d[e]=t[e]);if(void 0!==t.alternateName&&(d.alternateName=t.alternateName||null),void 0!==t.mappingName&&(d.mappingName=t.mappingName||null),d.assignment=et(t,d),d.groupId=Y(d.assignment),void 0!==t.purpose&&(d.purpose=rj(t.purpose)),void 0!==t.placeholder&&(d.placeholder=eC(t.placeholder)),"text"===d.kind||"combobox"===d.kind){let e=ex(t,d.kind);if(void 0!==e&&!eS(e,d.format)){let t=function(e,t){let{keystroke:n,format:r,...i}=e??{};if(null===t)return Object.keys(i).length>0?i:void 0;let o=eE(t);return{keystroke:eG(o.keystroke),format:eG(o.format),...i}}(d.actions,e);d.format=e,t?d.actions=t:delete d.actions}}if("text"===d.kind&&("maxLength"in t&&void 0!==t.maxLength&&(d.maxLength=t.maxLength),"defaultValue"in t&&void 0!==t.defaultValue)){let e=t.defaultValue;d.defaultValue=e??"",d.defaultValueEntry=null===e?iy():ib(e)}let c=!1;if(("combobox"===d.kind||"listbox"===d.kind)&&("options"in t&&t.options&&(n=d,o=(r=t.options.map(iP)).map(e=>e.value),a="combobox"===n.kind&&n.edit,s=ig("combobox"===n.kind?""===n.value?[]:[n.value]:n.selectedValues,o,a),l=im("listbox"===n.kind?{...n,options:r,topIndex:iF(n.topIndex,r)}:{...n,options:r},s),u="scalar"===(i=n.defaultValueEntry).kind?[i.value]:"array"===i.kind?[...i.values]:[],d="none"===n.defaultValueEntry.kind?l:i_(l,ig(u,o,a),!0),c=!0),"defaultValue"in t&&void 0!==t.defaultValue)){let e=null===t.defaultValue?[]:Array.isArray(t.defaultValue)?t.defaultValue:[t.defaultValue];r8(d,e),d=i_(d,e)}let f={...e,field:d},m=rK(t,d.kind);return void 0!==m?function(e,t){if("pushbutton"!==e.field.kind)return e;let n=new Set(e.field.widgets.map(e=>e.objectNumber)),r=e=>n.has(iD(e.ref)),i=e.widgets.filter(r);t&&rJ(i.map(e=>e.actions),e.field.widgets.length-i.length);let o=e.widgets.map(e=>{if(!r(e))return e;let n=rQ(rZ(e.actions,t)),i=function(e,t){if(null===t)return null;let n={...e},r=!1;for(let e of z){let i=t[e];void 0!==i&&(null===i?(void 0!==n[e]&&(r=!0),delete n[e]):"root"in i||(n[e]=$(i),r=!0))}let i=r?n:e??{};return Object.keys(i).length>0?i:null}(e.actions,n);return i===(e.actions??null)?e:{...e,actions:i}});return{field:{...e.field,takesImage:t},widgets:o}}(f,m):c?il(f.field,f):f}var is=["readOnly","required","noExport","multiline","password","comb","radiosInUnison","noToggleToOff","edit","multiSelect"];function il(e,t){return{field:e,widgets:t.widgets.map(e=>e.hasAppearance?e:{...e,hasAppearance:!0})}}function iu(e,t){let n=e.field;if("checkbox"!==n.kind&&"radio"!==n.kind)return e;let r="checkbox"===n.kind||n.radiosInUnison,i=t>=0?n.widgets[t]:null,o=n.widgets.map((e,n)=>{let o=null!==i&&(r?e.exportValue===i.exportValue&&e.onState===i.onState:n===t);return e.checked===o?e:{...e,checked:o}}),a=ib(i?i.onState:"Off"),s="checkbox"===n.kind?{...n,widgets:o,valueEntry:a,checked:o.some(e=>e.checked)}:{...n,widgets:o,valueEntry:a,value:o.find(e=>e.checked)?.exportValue??"Off"},l=new Map(o.map(e=>[e.objectNumber,e.checked?e.onState:"Off"]));return{field:s,widgets:e.widgets.map(e=>{let t=l.get(iD(e.ref));return void 0===t||e.appearanceState===t?e:{...e,appearanceState:t}})}}function id(e,t){let n=new Set;for(let r of t){let t=e.findIndex(e=>e.value===r);t>=0&&n.add(t)}return[...n].sort((e,t)=>e-t)}var ic=(e,t)=>t.every(t=>e.options.some(e=>e.value===t));function im(e,t){let n=ic(e,t)?id(e.options,t):[],r=t.length>0&&0===n.length,i=e.options.map((e,t)=>{let r=n.includes(t);return e.selected===r?e:{...e,selected:r}}),o=r?[...t]:n.map(t=>e.options[t].value),a=ip(o);return"combobox"===e.kind?{...e,options:i,valueEntry:a,value:o[0]??""}:{...e,options:i,valueEntry:a,selectedValues:o}}function ip(e){return 0===e.length?iy():1===e.length?ib(e[0]):{kind:"array",values:[...e]}}function ih(e,t){return id(e,t).map(t=>e[t].value)}function iF(e,t){return Math.max(0,Math.min(e,t.length-1))}function ig(e,t,n){let r=e.filter(e=>t.includes(e));return 0===r.length&&n&&e.length>0?[...e]:r}function i_(e,t,n=!1){if(0===t.length){let t=n?"listbox"===e.kind&&e.multiSelect?{kind:"array",values:[]}:ib(""):iy();return"combobox"===e.kind?{...e,defaultValueEntry:t,defaultValue:""}:{...e,defaultValueEntry:t,defaultValue:[]}}let r=ic(e,t),i=r?ih(e.options,t):[...t],o=r?ip(i):ib(t[0]);return"combobox"===e.kind?{...e,defaultValueEntry:o,defaultValue:i[0]??""}:{...e,defaultValueEntry:o,defaultValue:i}}var iP=e=>({label:e.label,value:e.value,selected:!1}),iD=e=>"objectNumber"===e.kind?e.objectNumber:0,ib=e=>({kind:"scalar",value:e}),iy=()=>({kind:"none"});function iw(e){return new N(G.Unknown,`\'${e.name}\' could not be reset`)}function iE(e){var t,n;if(null===e)return null;let r=!ArrayBuffer.isView(t=e)&&(n=t,!("u">typeof Blob&&n instanceof Blob)),i=r?e.pdf:e;if(ArrayBuffer.isView(i))return{bytes:i,declaredPdf:r};throw new N(G.InvalidArg,"a signature appearance reaches a write as bytes, never as a Blob")}function iA(e){return"skipped"===e.type}function iv(e){switch(e.type){case"skipped":return!1;case"annotations.import":case"annotations.copy":return e.annotations.length>0;case"forms.import":case"forms.importValues":case"forms.copy":return e.fields.length>0;case"forms.repeat":return e.meta.changedFields.length>0;default:return!0}}function iS(e){return"undoOf"in e}function ik(e,t){return{all:()=>`${e}:${t}:all`,self:()=>`${e}:${t}:self`,createdBy:n=>`${e}:${t}:createdBy=${n}`,group:n=>`${e}:${t}:group=${n}`}}function ix(e,t){return{all:()=>`${e}:${t}:all`,group:n=>`${e}:${t}:group=${n}`}}Object.assign(()=>"doc.render",{thumbnail:()=>"doc.render.thumbnail"}),Object.assign(()=>"doc.download",{flattened:()=>"doc.download.flattened"}),Object.assign(()=>"doc.print",{high:()=>"doc.print.high"}),Object.assign(()=>"doc.sign",{certify:()=>"doc.sign.certify"}),ik("annotations","create"),ik("annotations","update"),ik("annotations","delete"),ix("annotations","set-group"),ik("annotations","*"),ix("fields","fill"),ix("fields","sign"),ix("fields","set-group"),ix("fields","*");var iG={none:0,lta:1,fill:2,annotate:3};function iO(e){return 1===e?"lta":2===e?"fill":"annotate"}function iI(e,t){return iG[e]<=iG[t]?e:t}function iN(e,t){return null===e||iG[e]>=iG[t]}function iC(e,t){return t===e||t.startsWith(`${e}.`)}function ij(e,t){switch(e.action){case"all":return!0;case"include":return e.fields.some(e=>iC(e,t));case"exclude":return!e.fields.some(e=>iC(e,t))}}function iM(e){let t=!1,n=null,r=null,i=[];for(let o of e)o.signed&&(t=!0,o.catalogCertification&&null!==o.docMdp&&null===r&&(r={signatureIndex:o.index,permission:o.docMdp},n=iI(n??"annotate",iO(o.docMdp))),o.fieldMdp&&i.push({signatureIndex:o.index,source:"fieldmdp",spec:o.fieldMdp}),o.lock&&(i.push({signatureIndex:o.index,source:"lock",spec:o.lock}),void 0!==o.lock.permission&&(n=iI(n??"annotate",iO(o.lock.permission)))));return{enforced:n,judged:t?n??"annotate":null,certification:r,fieldLocks:i,policyVersion:6}}function iR(e){let t=new Set;return e&&null!==e.judged&&(t.add("doc.download.flattened"),null===e.enforced||(t.add("doc.pages.modify"),t.add("doc.pages.assemble"),t.add("doc.redact"),t.add("doc.attachments.modify"),t.add("doc.outline.modify"),t.add("doc.forms.modify"),t.add("doc.forms.script"),iN(e.enforced,"annotate")||(t.add("doc.annotate.modify"),t.add("doc.annotate.import")),iN(e.enforced,"fill")||(t.add("doc.forms.fill"),t.add("doc.forms.import"),t.add("doc.metadata.modify"),t.add("doc.sign")))),t}var iT=new Set(["doc.open","doc.render","doc.render.thumbnail","doc.text.select","doc.text.copy","doc.text.search","doc.content.copy","doc.download","doc.download.flattened","doc.print","doc.print.high","doc.pages.modify","doc.pages.assemble","doc.forms.read","doc.forms.fill","doc.forms.modify","doc.forms.import","doc.forms.script","doc.forms.submit","doc.annotate.read","doc.annotate.modify","doc.annotate.import","doc.metadata.modify","doc.attachments.modify","doc.outline.modify","doc.redact","doc.sign","doc.sign.certify"]);function iB(e){if("*"===e)return{kind:"wildcard"};if("pdf.permissions"===e)return{kind:"virtual",name:"pdf.permissions"};if(e.includes(":"))return function(e){let t=e.indexOf(":"),n=e.indexOf(":",t+1);if(-1===t||-1===n)throw new no(e,"collab scope requires entity:action:filter");let r=e.slice(0,t),i=e.slice(t+1,n),o=e.slice(n+1);if("fields"===r){var a=e,s=i,l=o;if("fill"!==s&&"sign"!==s&&"set-group"!==s&&"*"!==s)throw new no(a,`unknown fields action: ${s}`);let t=i$(l,a);if("all"!==t.kind&&"group"!==t.kind)throw new no(a,`fields only support :all or :group= filters (got :${t.kind})`);return{kind:"collab",entity:"fields",action:s,filter:t}}if("annotations"!==r)throw new no(e,`unknown collab entity: ${r}`);if("create"!==i&&"update"!==i&&"delete"!==i&&"set-group"!==i&&"*"!==i)throw new no(e,`unknown collab action: ${i}`);let u=i$(o,e);if("set-group"===i&&("self"===u.kind||"createdBy"===u.kind))throw new no(e,`set-group only supports :all or :group= filters (got :${u.kind})`);return{kind:"collab",entity:r,action:i,filter:u}}(e);let t=function(e){if(e.includes(":"))return null;let t=e.indexOf(".");if(t<=0)return null;let n=e.slice(0,t);return iL.has(n)?null:n}(e);return null!==t?function(e,t){if(!iU.test(e))throw new no(e,"invalid plugin permission shape (expected .)");return{kind:"plugin",name:e,plugin:t}}(e,t):function(e){if(!iz.test(e))throw new no(e,"invalid capability name shape");if(!iT.has(e))throw new no(e,`unknown capability: ${e}`);return{kind:"capability",name:e}}(e)}var iL=new Set(["doc","docs","pdf","annotations","fields","tokens","grants","shares","tenants","layer","visitor","document","submission","signature"]);function i$(e,t){if("all"===e)return{kind:"all"};if("self"===e)return{kind:"self"};if(e.startsWith("createdBy=")){let n=e.slice(10);if(!n)throw new no(t,"createdBy= requires a value");return{kind:"createdBy",userId:n}}if(e.startsWith("group=")){let n=e.slice(6);if(!n)throw new no(t,"group= requires a value");return{kind:"group",groupId:n}}throw new no(t,`unknown filter: ${e}`)}var iz=/^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$/,iU=/^[a-z][a-z0-9]*(-[a-z0-9]+)*(\\.[a-z][a-z0-9]*(-[a-z0-9]+)*)+$/;function iV(e){return{...e.userId?{userId:e.userId}:{},...e.groupId?{groupId:e.groupId}:{}}}function iW(e,t,n,r=null){if(iR(r).has(e))return!1;let i=t.map(iB);return!!i.some(e=>"wildcard"===e.kind)||iH(i,n,r).has(e)}function iq(e,t,n,r,i){let o=n.map(iB);if(o.some(e=>"wildcard"===e.kind))return!0;let a=o.filter(t=>"collab"===t.kind&&"annotations"===t.entity&&(t.action===e||"*"===t.action));return a.length>0?a.some(e=>(function(e,t,n){switch(e.kind){case"all":return!0;case"self":return!!n.userId&&t.userId===n.userId;case"createdBy":return t.userId===e.userId;case"group":return t.groupId===e.groupId}})(e.filter,t,r)):iH(o,i).has("doc.annotate.modify")}function iH(e,t,n=null){let r=new Set,i=!1,o=!1;for(let n of e)"capability"===n.kind?r.add(n.name):"virtual"===n.kind&&"pdf.permissions"===n.name?function(e,t){let n;for(let r of((n=new Set).add("doc.open"),n.add("doc.render"),n.add("doc.annotate.read"),n.add("doc.forms.read"),n.add("doc.text.search"),n.add("doc.text.select"),t.copy&&(n.add("doc.text.copy"),n.add("doc.content.copy")),t.print&&n.add("doc.print"),t.printHighQuality&&t.print&&n.add("doc.print.high"),t.modifyContents&&(n.add("doc.pages.modify"),n.add("doc.redact"),n.add("doc.metadata.modify"),n.add("doc.attachments.modify")),(t.modifyContents||t.assemble)&&(n.add("doc.pages.assemble"),n.add("doc.outline.modify")),t.modifyAnnotations&&n.add("doc.annotate.modify"),(t.modifyContents||t.modifyAnnotations||t.fillForms)&&(n.add("doc.forms.fill"),n.add("doc.sign")),t.modifyAnnotations&&t.modifyContents&&n.add("doc.forms.modify"),[...n]))e.add(r)}(r,t):"collab"===n.kind&&"annotations"===n.entity?i=!0:"collab"===n.kind&&"fields"===n.entity&&(o=!0);for(let e of(r.has("doc.render")&&r.add("doc.render.thumbnail"),r.has("doc.annotate.modify")&&r.add("doc.annotate.read"),r.has("doc.forms.modify")&&(r.add("doc.forms.fill"),r.add("doc.forms.read")),r.has("doc.forms.fill")&&r.add("doc.forms.read"),i&&r.add("doc.annotate.read"),o&&r.add("doc.forms.read"),iR(n)))r.delete(e);return r}function iK(e,t,n,r){if(t===n)return!0;let i=r.map(iB);if(i.some(e=>"wildcard"===e.kind))return!0;for(let n of i)if("collab"===n.kind&&n.entity===e&&("set-group"===n.action||"*"===n.action)&&("all"===n.filter.kind||"group"===n.filter.kind&&n.filter.groupId===t))return!0;return!1}function iZ(e,t,n,r=null){let i="fill"===e?"doc.forms.fill":"doc.sign";if(iR(r).has(i))return!1;let o=t.map(iB);return!!(o.some(e=>"wildcard"===e.kind)||o.some(t=>"collab"===t.kind&&"fields"===t.entity&&(t.action===e||"*"===t.action)))||iH(o,n,r).has(i)}var iJ={left:0,bottom:0,right:612,top:792},iQ={left:0,right:0,bottom:0,top:0};function iX(){let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,i0(e)}function iY(e=Date.now()){let t=globalThis.crypto.getRandomValues(new Uint8Array(16)),n=Math.max(0,Math.floor(e));for(let e=5;e>=0;e--)t[e]=n%256,n=Math.floor(n/256);return t[6]=15&t[6]|112,t[8]=63&t[8]|128,i0(t)}function i0(e){let t=Array.from(e,e=>e.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function i1(e){let t,n=(t=new Map(e.pages.map(e=>[e.ref.objectNumber,e.boxes.crop])),e=>{let n=t.get(e.objectNumber);if(!n)throw new N(G.InvalidArg,`No page ${e.objectNumber} in this document`);return n});return{...e,pages:e.pages.map(e=>(function(e,t){var n;let r,{actions:i,viewports:o,...a}=e;return{...a,boxes:(r=(n=e.boxes).crop,{media:nE(n.media,r),crop:nE(n.crop,r),bleed:nE(n.bleed,r),trim:nE(n.trim,r),art:nE(n.art,r)}),...i?{actions:nJ(i,e=>nW(e,t))}:{},...o?{viewports:n0(o,e.boxes.crop)}:{}}})(e,n))}}function i3(e,t){return e.map(e=>({...e,rect:nE(e.rect,t)}))}function i2(e,t){let{actions:n,...r}=e,i=t(e.page);return{...r,...e.rect?{rect:nA(e.rect,i)}:{},...e.box?{box:nA(e.box,i)}:{},...n?{actions:nZ(n,e=>nq(e,t))}:{}}}function i6(e,t){return e.widgets?{...e,widgets:e.widgets.map(e=>i2(e,t))}:e}function i5(e,t){var n,r;return e.actions?{...e,actions:(n=e.actions,r=t,nJ(n,e=>nW(e,r)))}:e}function i4(e,t){return n6(e,t(e.page),t)}function i8(e,t){return{...e,fields:e.fields.map(e=>i5(e,t)),widgets:e.widgets.map(e=>i4(e,t))}}function i7(e,t){let{target:n,...r}=e;return void 0===n?r:{...r,target:n&&"goto"===n.kind?{...n,destination:t(n.destination)}:n}}function i9(e,t){var n;return n=e=>nW(e,t),{...e,target:e.target&&nH(e.target,n),action:e.action&&nK(e.action,n)}}function oe(e,t){return i7(e,e=>nq(e,t))}function ot(e){let{box:t,rect:n,rotation:r,...i}=e;if(void 0!==r&&![0,90,180,270].includes(r))throw new N(G.InvalidArg,`a widget turns by a quarter turn (0, 90, 180 or 270), not ${r}`,{details:{field:"rotation"}});let o=t?eJ(eH(t),r??0):n;if(!o)throw new N(G.InvalidArg,"a widget\'s placement needs its `rect` or its `box`",{details:{field:"rect"}});return{...i,rect:o,...void 0!==r?{rotation:r}:{},...t7(i.borderStyle,i.dashArray)?{dashArray:[...t8]}:{}}}var on=["certificates","ocspResponses","crls"];function or(e,t,n){let r=t;if(r>=n)return null;let i=e[r++];if((31&i)==31)for(;;){if(r>=n)return null;if((128&e[r++])==0)break}if(r>=n)return null;let o=e[r++],a=o;if(128&o){let t=127&o;if(0===t||t>4||r+t>n)return null;a=0;for(let n=0;nn?null:{constructed:(32&i)!=0,contents:r,end:s}}function oi(e){let t=new oo(e),n=t.value();if(t.skipSpaces(),!t.atEnd())throw Error(`trailing input at ${t.pos}: ${e.slice(t.pos,t.pos+20)}`);return n}var oo=class{constructor(e){this.text=e,I(this,"pos",0)}atEnd(){return this.pos>=this.text.length}skipSpaces(){for(;this.pos>",this.pos))return this.pos+=2,e;if("/"!==this.text[this.pos])throw Error(`expected a key at ${this.pos}`);let t=this.name();this.skipSpaces(),e[t]=this.value()}}stream(){let e=/^stream\\((\\d+),([0-9a-fA-F]*)\\)/.exec(this.text.slice(this.pos));if(!e)throw Error(`malformed stream signature at ${this.pos}`);this.pos+=e[0].length;let t=this.dictEntries();return{t:"stream",length:Number(e[1]),sha256:e[2].toLowerCase(),dict:t}}array(){this.expect("[");let e=[];for(;;){if(this.skipSpaces(),"]"===this.text[this.pos])return this.pos++,{t:"array",items:e};e.push(this.value())}}name(){this.expect("/");let e="";for(;this.pos"===t||"("===t||")"===t)break;if("#"===t&&/^[0-9A-Fa-f]{2}/.test(this.text.slice(this.pos+1,this.pos+3))){e+=String.fromCharCode(parseInt(this.text.slice(this.pos+1,this.pos+3),16)),this.pos+=3;continue}e+=t,this.pos++}return e}literalString(){this.expect("(");let e=1,t="";for(;this.pos",this.pos);if(e<0)throw Error("unterminated hex string");let t=this.text.slice(this.pos,e).replace(/\\s+/g,"");this.pos=e+1;let n="";for(let e=0;e`/${t} ${os(e.entries[t])}`).join("")}>>`;case"stream":return`stream(${e.length},${e.sha256})${os({t:"dict",entries:e.dict})}`;case"array":return`[${e.items.map(os).join(" ")}]`;case"ref":return`${e.num} 0 R`;case"name":return`/${function(e){let t="";for(let n of e){let e=n.charCodeAt(0);e<33||e>126||"#/[]<>(){}%".includes(n)?t+=`#${e.toString(16).toUpperCase().padStart(2,"0")}`:t+=n}return t}(e.v)}`;case"string":return`(${e.v.replace(/[\\\\()]/g,e=>`\\\\${e}`)})`;case"number":return String(e.v);case"bool":return e.v?"true":"false";case"null":return"null"}}function ol(e){return e?"dict"===e.t?e.entries:"stream"===e.t?e.dict:null:null}function ou(e,t){let n=ol(e)??{},r=ol(t)??{},i=new Set;for(let e of new Set([...Object.keys(n),...Object.keys(r)]))oa(n[e]??null,r[e]??null)||i.add(e);return i}function od(e){return e?"ref"===e.t?[e.num]:"array"===e.t?e.items.flatMap(od):[]:[]}function oc(e,t){return e.some(e=>"forbidden"===e.verdict)?"forbidden":e.some(e=>"incomplete"===e.verdict)?"indeterminate":t?"permitted":"unchanged"}function of(e){return e.find(e=>"forbidden"===e.verdict)??e.find(e=>"incomplete"===e.verdict)??e.find(e=>"permitted"===e.verdict)}var om=["old","new"],op=new Set(["Size","Prev","XRefStm","Info","ID","Root","Type","W","Index","Filter","DecodeParms","Length","Encrypt"]),oh=new Set(["Metadata","Extensions","Version","DSS","AcroForm","Perms"]),oF=new Set(["DR","DA","Q","SigFlags","NeedAppearances","Fields"]),og={annotate:new Set(["V","AS","AP","I","DA","Ff","RV","MK","Q","TU","F","Rect","BS","Opt","DV","MaxLen"]),fill:new Set(["V","AS","AP","I","RV","DA","Ff"])},o_={annotate:new Set(["AS","AP","DA","MK","Q","TU","F","Rect","BS"]),fill:new Set(["AS","AP","DA"])},oP={annotate:new Set(["V","AP","AS","Ff","TU","Lock"]),fill:new Set(["V","AP","AS","Ff"])},oD=new Set(["AP","AS"]);function ob(e){return"annotate"===e?oP.annotate:oP.fill}var oy=new Set(["identical-rewrite","orphan","xref-container","trailer"]);function ow(e){let t,n=e.changes.map(e=>{if(e.value.truncated||"xref"===e.kind||"objstm"===e.kind)return e;let t=e.present.old&&(null===e.value.old||e.read?.old==="failed"),n=e.present.new&&(null===e.value.new||e.read?.new==="failed");return t||n?{...e,value:{...e.value,truncated:!0}}:e}),{level:r,locks:i}=e.restrictions??{level:(t=iM(e.before.signatures)).judged??"annotate",locks:t.fieldLocks},o=e.levelOverride??r,a=new oS({...e,changes:n},o,i);(function(e){let t=e.input.health;if(!t)return;let n=t.old;if(n.sparseXref||n.bareReferences>0){let t=[n.sparseXref?"its cross-reference table has no entry for some object numbers below /Size":null,n.bareReferences>0?`${n.bareReferences} reachable indirect object(s) consist of a bare reference`:null].filter(e=>null!==e).join("; ");e.findings.push({rule:"base-unverifiable",verdict:"incomplete",objectNumber:0,detail:`the signed revision cannot be verified against later changes by Acrobat (${t}); no verdict is given rather than one Acrobat would contradict`})}for(let n of om)t[n].referrersComplete||e.findings.push({rule:"unexplained",verdict:"incomplete",objectNumber:0,detail:`the ${"old"===n?"older":"newer"} revision\'s reachability walk hit its budget; not every use of a changed object is known`})})(a),function(e){for(let t of e.changes)("xref"===t.kind||"objstm"===t.kind)&&(e.claimAll(t,"xref-container"),e.permitted(t,"xref-container","cross-reference container; members are judged on their own"))}(a),function(e){for(let t of e.changes)e.isIdentical(t)&&(e.allows("fill")?(e.claimAll(t,"identical-rewrite"),e.permitted(t,"identical-rewrite","written again with the sealed value")):(e.claimAll(t,"identical-rewrite",!1),e.forbidden(t,"identical-rewrite",`written again with the sealed value under level \'${e.level}\' (not established for this level)`)))}(a),a.allows("fill")?(function(e){if(0===e.locks.length)return;let t=e.input.before.fields.filter(t=>e.locks.some(e=>ij(e.spec,t.name))),n=new Set;for(let e of t)for(let t of(n.add(e.objectNumber),e.widgets))n.add(t);let r=new Set(n),i=!0;for(;i;)for(let t of(i=!1,e.changes))!r.has(t.objectNumber)&&t.usage.old.length>0&&t.usage.old.every(e=>r.has(e.parent))&&(r.add(t.objectNumber),i=!0);for(let n of e.changes){if(!r.has(n.objectNumber)||e.isIdentical(n))continue;let i=t.find(e=>e.objectNumber===n.objectNumber||e.widgets.includes(n.objectNumber));if(i&&i.objectNumber===n.objectNumber){let t=ou(n.value.old,n.value.new);if(1===t.size&&t.has("Ff")&&oj(n,e.before.fieldByObj.get(n.objectNumber)?.flags)){e.claimStable(n,"field-lock"),e.permitted(n,"field-lock",`ReadOnly set on locked field "${i.name}"`);continue}}e.locked.add(n.objectNumber),e.forbidden(n,"field-lock",i?`field "${i.name}" is locked by the signature`:"part of a locked field changed")}}(a),ok(a),function(e){for(let t of e.changes)!e.isIdentical(t)&&0!==t.objectNumber&&ox(t,e=>0===e.parent&&"Info"===e.label)&&(e.claimAll(t,"info"),e.permitted(t,"info","document information dictionary"))}(a),function(e){let t=new Set([e.input.before.root,e.input.after.root]);for(let n of e.changes)!e.isIdentical(n)&&ox(n,e=>t.has(e.parent)&&"Metadata"===e.label)&&(e.claimAll(n,"metadata"),e.permitted(n,"metadata","XMP metadata stream"))}(a),function(e){let t=e.input.after.root,n=e.byNum.get(t);if(!n||e.isIdentical(n))return;let r=ou(n.value.old,n.value.new),i=[...r].filter(e=>!oh.has(e));if(i.length>0)return e.forbidden(n,"catalog-housekeeping",`catalog keys changed: ${i.join(", ")}`);if(r.has("AcroForm")&&!e.input.after.acroForm&&!e.input.before.acroForm){let r=oG(e,ol(n.value.old)?.AcroForm??null,ol(n.value.new)?.AcroForm??null);if(r)return e.forbidden(n,"acroform-housekeeping",r);for(let n of om)e.claimSubtree(n,new Set([t]),e=>e.startsWith("AcroForm/DR/"),"acroform-housekeeping")}if(r.has("Perms")){let t=iM(e.input.after.signatures),r=iM(e.input.before.signatures);if(!t.certification||null!==r.judged)return e.forbidden(n,"catalog-housekeeping","/Perms may only appear with the certification signature, in the first signed revision")}e.claimAll(n,"catalog-housekeeping"),e.permitted(n,"catalog-housekeeping")}(a),function(e){let t=e.input.after.acroForm||e.input.before.acroForm;if(!t)return;let n=e.byNum.get(t);if(!n||e.isIdentical(n))return;let r=oG(e,n.value.old,n.value.new);if(r)return e.forbidden(n,"acroform-housekeeping",r);for(let r of(e.claimAll(n,"acroform-housekeeping"),e.permitted(n,"acroform-housekeeping"),om))e.claimSubtree(r,new Set([t]),e=>e.startsWith("DR/"),"acroform-housekeeping")}(a),function(e){let t=new Set([e.input.before.root,e.input.after.root]);for(let n of om)e.claimSubtree(n,t,e=>"DSS"===e||e.startsWith("DSS/"),"dss");for(let n of e.changes)n.usage.new.some(e=>t.has(e.parent)&&"DSS"===e.label)&&!e.findings.some(e=>e.objectNumber===n.objectNumber)&&e.permitted(n,"dss","document security store")}(a),function(e){let t=oC(e);if(0===t.size)return;let n="signature-field-added";if(!e.allows("fill")){for(let r of t){let t=e.byNum.get(r);t&&e.forbidden(t,n,`a signature field was added under level \'${e.level}\'`)}return}let r=new Set;for(let i of t){let t=e.after.fieldByObj.get(i),o=e.byNum.get(i);for(let a of(o&&(e.claimAll(o,n),e.permitted(o,n,`new signature field "${t.name}"`)),t.widgets)){if(r.add(a),a===i)continue;let o=e.byNum.get(a);o&&(e.claimAll(o,n),e.permitted(o,n,`widget of new signature field "${t.name}"`))}}let i=oO(e);for(let t of e.after.pages){let o=e.byNum.get(t);if(!o||e.isIdentical(o))continue;let a=ou(o.value.old,o.value.new);if(1!==a.size||!a.has("Annots"))continue;let s=oI(e,i,o,"old"),l=oI(e,i,o,"new");if(!s||!l)continue;let u=oN(s.refs,l.refs);if(!u||!u.every(e=>r.has(e))||s.object!==l.object&&0===u.length)continue;e.claimAll(o,n),e.permitted(o,n,"page /Annots gained the new signature widget");let d=0!==s.object&&0!==l.object;for(let t of new Set([s.holder,l.holder]))t&&(e.claimAll(t,n),e.permitted(t,n,d?"page /Annots moved to another list object, with the new signature widget":"page /Annots moved into an object of its own, with the new signature widget"))}for(let t of i.keys()){let i=e.byNum.get(t);if("modified"!==i.change||e.isIdentical(i))continue;let o=oN(od(i.value.old),od(i.value.new));o&&o.length>0&&o.every(e=>r.has(e))&&(e.claimAll(i,n),e.permitted(i,n,"page /Annots, an object of its own, gained the new signature widget"))}for(let i of e.changes){if("dictionary"!==i.kind||e.isIdentical(i))continue;let o=ou(i.value.old,i.value.new);if(1!==o.size||!o.has("Kids"))continue;let a=function(e,t){let n=ol(e.value.old)?.[t],r=ol(e.value.new)?.[t],i=od(n),o=od(r);if(n&&"array"!==n.t||!r||"array"!==r.t||i.length>o.length)return null;for(let e=0;e0&&a.every(e=>t.has(e)||r.has(e))&&(e.claimAll(i,n),e.permitted(i,n,"field /Kids gained the new signature field"))}}(a),function(e){let t="signature-added",n=e.newlySigned();if(0===n.length)return;let r=oC(e),i=iM(e.input.before.signatures),o=iM(e.input.after.signatures),a=new Set,s=new Set;for(let{fieldObjectNumber:o,sig:l}of n){let n="timestamp"===l.kind?"lta":"fill";if(!e.allows(n)){let n=e.byNum.get(o);n&&e.forbidden(n,t,`a ${l.kind} was added under level \'${e.level}\'`);continue}if(l.catalogCertification&&null!==i.judged){let n=e.byNum.get(o);n&&e.forbidden(n,t,"a certification signature after another signature");continue}let u=e.after.fieldByObj.get(o);for(let e of(a.add(o),u?.widgets??[]))a.add(e);let d=r.has(o),c=null===i.judged?new Set([...ob(e.level),"Lock"]):ob(e.level),f=e.byNum.get(o);if(f&&d)e.permitted(f,t,`new field "${l.fieldName}" signed`);else if(f&&!e.isIdentical(f)){let n=ou(f.value.old,f.value.new),r=[...n].filter(e=>!c.has(e));r.length>0?(e.forbidden(f,t,`signature field keys changed: ${r.join(", ")}`),e.claimStable(f,t,!1)):n.has("Ff")&&!oj(f,e.before.fieldByObj.get(o)?.flags)?(e.forbidden(f,t,"signature field flags changed beyond ReadOnly"),e.claimStable(f,t,!1)):(e.claimStable(f,t),e.permitted(f,t,`field "${l.fieldName}" signed`))}for(let n of u?.widgets??[]){if(n===o||d)continue;let r=e.byNum.get(n);if(!r||e.isIdentical(r))continue;let i=[...ou(r.value.old,r.value.new)].filter(e=>!oD.has(e));if(i.length>0){e.forbidden(r,t,`signature widget keys changed: ${i.join(", ")}`),e.claimStable(r,t,!1);continue}e.claimStable(r,t),e.permitted(r,t,"signature widget appearance")}for(let n of e.changes){if("added"!==n.change)continue;let r=n.usage.new.filter(e=>e.parent===o&&"V"===e.label),i=n.usage.new.filter(e=>e.parent===o&&"Lock"===e.label),a=ol(n.value.new)?.Type;if(r.length>0){if((a?.t!=="name"||"Sig"!==a.v&&"DocTimeStamp"!==a.v)&&void 0!==a)continue;for(let r of n.usage.new)(r.parent===o&&"V"===r.label||"DocMDP"===r.label)&&e.claimEdge(n,"new",r,t);e.permitted(n,t,"signature value"),s.add(n.objectNumber)}else if(i.length>0){if(void 0!==a&&("name"!==a.t||"SigFieldLock"!==a.v))continue;for(let r of i)e.claimEdge(n,"new",r,t);e.permitted(n,t,"field lock installed with the signature")}}}if(o.certification&&null===i.judged){let n=e.input.after.root;for(let r of e.changes)"added"===r.change&&ox(r,e=>e.parent===n&&"Perms"===e.label)&&(e.claimAll(r,t),e.permitted(r,t,"certification permissions"))}for(let n of om)e.claimSubtree(n,a,e=>"AP"===e||e.startsWith("AP/"),t);s.size>0&&e.claimSubtree("new",s,()=>!0,t)}(a),function(e){let t="signature-appearance",n=e=>"AP"===e||e.startsWith("AP/"),r=new Set;for(let[n,i]of e.before.fieldByObj){let o=e.after.fieldByObj.get(n);if("signature"!==i.kind||o?.kind!=="signature"||e.before.signedFields.has(n)||e.after.signedFields.has(n))continue;let a=new Set([n,...i.widgets]);if(o.widgets.length!==i.widgets.length||o.widgets.some(e=>!a.has(e)))continue;let s=[...a].map(t=>e.byNum.get(t)).filter(t=>void 0!==t&&!e.isIdentical(t));if(0===s.length||s.some(t=>e.locked.has(t.objectNumber)))continue;let l=e=>[...ou(e.value.old,e.value.new)].filter(e=>"AP"!==e);if(s.some(e=>l(e).length>0)){for(let n of s){let r=l(n);0!==r.length&&(e.forbidden(n,t,`signature field "${i.name}", not signed, keys changed: ${r.join(", ")}`),e.claimStable(n,t,!1))}continue}for(let n of s)e.claimStable(n,t),e.permitted(n,t,`new appearance on signature field "${i.name}", not signed`);for(let e of a)r.add(e)}0!==r.size&&(e.claimSubtree("new",r,n,t,e=>"added"===e.change),e.claimSubtree("old",r,n,t,e=>"freed"===e.change))}(a),function(e){let t="form-fill",n="annotate"===e.level?og.annotate:og.fill,r="annotate"===e.level?o_.annotate:o_.fill,i=new Set,o=new Set;for(let[a,s]of new Map([...e.before.fieldByObj,...e.after.fieldByObj])){if("signature"===s.kind)continue;let l="pushbutton"===s.kind,u=e=>l&&function(e){let t=ol(e.value.old)?.MK??null,n=ol(e.value.new)?.MK??null;if(t&&"dict"!==t.t||n&&"dict"!==n.t)return!1;let r=ou(t,n);return r.size>0&&[...r].every(e=>"I"===e)}(e),d=e.byNum.get(a),c=s.widgets.filter(e=>e!==a).map(t=>e.byNum.get(t)).filter(Boolean),f=new Set([a,...s.widgets]),m=d||0!==c.length?[]:e.changes.filter(e=>om.some(t=>e.usage[t].some(e=>f.has(e.parent)&&oR(e.label)))&&om.every(t=>e.usage[t].every(e=>!oR(e.label)||f.has(e.parent))));if(!d&&0===c.length&&0===m.length)continue;if(!e.allows("fill")){for(let n of[d,...c,...m])n&&!e.isIdentical(n)&&e.forbidden(n,t,`form fill under level \'${e.level}\'`);continue}if(m.length>0){for(let n of m)e.permitted(n,t,`appearance of field "${s.name}" regenerated`);for(let e of(i.add(a),s.widgets))i.add(e);continue}let p=!0;if(d&&!e.isIdentical(d)){let r=ou(d.value.old,d.value.new),i=r.has("MK")&&u(d),o=[...r].filter(e=>!n.has(e)&&!("MK"===e&&i));if(o.length>0)e.forbidden(d,t,`field "${s.name}" keys changed: ${o.join(", ")}`),e.claimStable(d,t,!1),p=!1;else if(r.has("Ff")&&!oj(d,e.before.fieldByObj.get(a)?.flags))e.forbidden(d,t,`field "${s.name}" flags changed beyond adding ReadOnly`),e.claimStable(d,t,!1),p=!1;else{e.claimStable(d,t);let n=[...r].filter(e=>"V"!==e&&"AP"!==e&&"AS"!==e&&"I"!==e&&"RV"!==e&&!("MK"===e&&i));e.permitted(d,t,n.length>0?`field "${s.name}" ${r.has("V")||r.has("AS")?"filled, ":""}properties changed: ${n.join(", ")}`:i?`push button "${s.name}" image changed`:`field "${s.name}" filled`)}}for(let n of c){if(e.isIdentical(n))continue;let i=ou(n.value.old,n.value.new),o=i.has("MK")&&u(n),a=[...i].filter(e=>!r.has(e)&&!("MK"===e&&o));if(a.length>0){e.forbidden(n,t,`widget of "${s.name}" keys changed: ${a.join(", ")}`),e.claimStable(n,t,!1),p=!1;continue}e.claimStable(n,t),e.permitted(n,t,`widget of "${s.name}" ${o?"image":"appearance"}`)}if(p){for(let e of(i.add(a),s.widgets))i.add(e);if(l)for(let e of(o.add(a),s.widgets))o.add(e)}}for(let n of om)e.claimSubtree(n,i,(e,t)=>oR(e)||o.has(t)&&oM(e),t)}(a),function(e){let t="annotation",n=new Set([...e.before.pages,...e.after.pages]),r=new Set([...e.before.widgetToField.keys(),...e.after.widgetToField.keys()]),i=e=>{if(r.has(e.objectNumber))return!0;let t=ol(e.value.new??e.value.old)?.Subtype;return t?.t==="name"&&"Widget"===t.v},o=oO(e),a=[];for(let t of e.changes)"dictionary"!==t.kind||e.isIdentical(t)||[...t.usage.old,...t.usage.new].some(e=>n.has(e.parent)&&e.label.startsWith("Annots/")||o.has(e.parent)&&/^\\[\\d+\\]$/.test(e.label))&&!i(t)&&a.push(t);if(a.length,!e.allows("annotate")){for(let n of a)e.forbidden(n,t,`annotation change under level \'${e.level}\'`);return}let s=new Set;for(let n of a)e.claimAll(n,t),e.permitted(n,t,`${n.change} annotation`),s.add(n.objectNumber);for(let i of n){let n=e.byNum.get(i);if(!n||e.isIdentical(n)||e.findings.some(e=>e.objectNumber===i&&"signature-field-added"===e.rule&&"permitted"===e.verdict))continue;let a=ou(n.value.old,n.value.new);if(1===a.size&&a.has("Annots")){let i=oI(e,o,n,"old"),a=oI(e,o,n,"new"),s=[i?.holder,a?.holder].filter(e=>null!=e);if(!i||!a){for(let r of(e.claimAll(n,t,!1),s))e.claimAll(r,t,!1);e.forbidden(n,t,"page /Annots points at a list object this revision did not write, and that list could not be read: what it held cannot be compared");continue}if("widget"===oT(e,r,i.refs,a.refs)){e.forbidden(n,t,"page /Annots added or removed a form widget");continue}for(let r of(e.claimAll(n,t),e.permitted(n,t,"page /Annots changed"),s))e.claimAll(r,t),e.permitted(r,t,"page /Annots, an object of its own, changed")}}for(let n of o.keys()){let i=e.byNum.get(n);if(!("modified"!==i.change||e.isIdentical(i))&&!e.findings.some(e=>e.objectNumber===n&&"permitted"===e.verdict)){if("widget"===oT(e,r,od(i.value.old),od(i.value.new))){e.forbidden(i,t,"page /Annots added or removed a form widget");continue}e.claimAll(i,t),e.permitted(i,t,"page /Annots, an object of its own, changed")}}for(let n of om)e.claimSubtree(n,s,e=>"AP"===e||e.startsWith("AP/")||"Popup"===e||"IRT"===e,t)}(a)):(ok(a),function(e){let t="no-changes-certification";for(let n of e.changes)0!==n.objectNumber&&"xref"!==n.kind&&"objstm"!==n.kind&&(e.isIdentical(n)||(e.claimAll(n,t,!1),e.forbidden(n,t,`${n.change} after a certification that allows no changes: Acrobat reports the certification as altered (ISO 32000-2 allows validation data and document timestamps here, Acrobat does not)`)))}(a)),function(e){for(let t of e.changes){if(t.value.truncated){e.findings.push({rule:"unexplained",verdict:"incomplete",objectNumber:t.objectNumber,detail:"value too large to inspect"});continue}if(t.usageIncomplete){e.findings.push({rule:"unexplained",verdict:"incomplete",objectNumber:t.objectNumber,detail:"references could not be resolved within budget (depth, fan-out or total reads)"});continue}if(!e.locked.has(t.objectNumber)){for(let n of om)for(let r of t.usage[n])e.isClaimed(t,n,r)||e.forbidden(t,"unexplained",`${"old"===n?"was":"is"} referenced from object ${r.parent} at ${r.label} and no rule explains it`,r);0!==t.usage.old.length||0!==t.usage.new.length||e.findings.some(e=>e.objectNumber===t.objectNumber)||e.permitted(t,"orphan","referenced from nowhere reachable")}}}(a);let s=oc(a.findings,a.findings.some(e=>"permitted"===e.verdict&&!oy.has(e.rule)));return{older:e.older,newer:e.newer,levelInForce:o,locks:i,verdict:s,findings:a.findings,changes:n}}function oE(e){return"modified"===e.change&&!e.value.truncated&&e.read?.old!=="failed"&&e.read?.new!=="failed"&&null!==e.raw.old&&null!==e.raw.new&&e.raw.old===e.raw.new&&!e.streamDataChanged}function oA(e){let t=new Map,n=new Map,r=new Set;for(let i of e.fields)for(let e of(t.set(i.objectNumber,i),"signature"===i.kind&&r.add(i.objectNumber),i.widgets))n.set(e,i.objectNumber);let i=new Set;for(let t of e.signatures)t.signed&&"objectNumber"===t.field.kind&&i.add(t.field.objectNumber);return{fieldByObj:t,widgetToField:n,pages:new Set(e.pages),signedFields:i,sigFields:r}}function ov(e){return`${e.parent}:${e.label}`}var oS=class{constructor(e,t,n){for(let r of(this.input=e,this.level=t,this.locks=n,I(this,"findings",[]),I(this,"byNum",new Map),I(this,"unwritten",new Map),I(this,"before",void 0),I(this,"after",void 0),I(this,"claims",new Map),I(this,"locked",new Set),e.changes))this.byNum.set(r.objectNumber,r);for(let t of e.unwritten??[])this.byNum.has(t.objectNumber)||this.unwritten.set(t.objectNumber,t);this.before=oA(e.before),this.after=oA(e.after)}get changes(){return this.input.changes}allows(e){return iN(this.level,e)}claimEdge(e,t,n,r,i=!0){if(this.locked.has(e.objectNumber))return;let o=`${e.objectNumber}:${t}:${ov(n)}`;this.claims.has(o)||this.claims.set(o,{rule:r,allow:i})}claimAll(e,t,n=!0){for(let r of om)for(let i of e.usage[r])this.claimEdge(e,r,i,t,n)}claimStable(e,t,n=!0){let r=new Set(e.usage.old.map(ov)),i=new Set(e.usage.new.map(ov));for(let r of e.usage.old)i.has(ov(r))&&this.claimEdge(e,"old",r,t,n);for(let i of e.usage.new)r.has(ov(i))&&this.claimEdge(e,"new",i,t,n)}isClaimed(e,t,n){return this.claims.has(`${e.objectNumber}:${t}:${ov(n)}`)}isAllowed(e,t,n){return this.claims.get(`${e.objectNumber}:${t}:${ov(n)}`)?.allow===!0}permitted(e,t,n){this.locked.has(e.objectNumber)||this.findings.push({rule:t,verdict:"permitted",objectNumber:e.objectNumber,detail:n})}forbidden(e,t,n,r){this.findings.push({rule:t,verdict:e.value.truncated?"incomplete":"forbidden",objectNumber:e.objectNumber,edge:r?ov(r):void 0,detail:e.value.truncated?`${n} (judged on missing evidence: not proven)`:n})}claimSubtree(e,t,n,r,i=()=>!0){let o=new Set,a=!0;for(;a;)for(let s of(a=!1,this.changes)){if(t.has(s.objectNumber)||o.has(s.objectNumber)||this.locked.has(s.objectNumber)||!i(s))continue;let l=s.usage[e];if(0===l.length)continue;let u=l.filter(e=>t.has(e.parent)&&n(e.label,e.parent)||o.has(e.parent));if(0!==u.length){for(let t of u)this.claimEdge(s,e,t,r);l.every(t=>u.includes(t)||this.isAllowed(s,e,t))&&(o.add(s.objectNumber),a=!0)}}}isIdentical(e){return oE(e)}newlySigned(){let e=[];for(let t of this.input.after.signatures)t.signed&&"objectNumber"===t.field.kind&&(this.before.signedFields.has(t.field.objectNumber)||e.push({fieldObjectNumber:t.field.objectNumber,sig:t}));return e}};function ok(e){let t=e.byNum.get(0);if(!t)return;let n=ou(t.value.old,t.value.new),r=[...n].filter(e=>!op.has(e)),i=ol(t.value.old)?.Root,o=ol(t.value.new)?.Root;r.length>0?e.forbidden(t,"trailer",`trailer keys changed: ${r.join(", ")}`):n.has("Root")&&!oa(i??null,o??null)?e.forbidden(t,"trailer","the trailer points at a different catalog"):n.has("Encrypt")&&!oa(ol(t.value.old)?.Encrypt??null,ol(t.value.new)?.Encrypt??null)?e.forbidden(t,"trailer","the trailer points at a different encryption dictionary"):(e.claimAll(t,"trailer"),e.permitted(t,"trailer"))}function ox(e,t){let n=[...e.usage.old,...e.usage.new];return n.length>0&&n.every(t)}function oG(e,t,n){let r=ou(t,n),i=[...r].filter(e=>!oF.has(e));if(i.length>0)return`AcroForm keys changed: ${i.join(", ")}`;if(r.has("Fields")){let r=od(ol(t)?.Fields),i=od(ol(n)?.Fields);if(r.length>i.length||r.some((e,t)=>i[t]!==e))return"/AcroForm /Fields is not append-only";let o=oC(e),a=i.slice(r.length).filter(e=>!o.has(e));if(a.length>0)return`/AcroForm /Fields gained non-signature fields: ${a.join(", ")}`}return null}function oO(e){let t=new Set([...e.before.pages,...e.after.pages]),n=new Map;for(let r of e.changes){if("array"!==r.kind||r.value.truncated)continue;let e=[...r.usage.old,...r.usage.new];0!==e.length&&e.every(e=>t.has(e.parent)&&"Annots"===e.label)&&1===new Set(e.map(e=>e.parent)).size&&[r.value.old,r.value.new].every(e=>null===e||"array"===e.t&&od(e).length===e.items.length)&&n.set(r.objectNumber,e[0].parent)}return n}function oI(e,t,n,r){let i=ol(n.value[r])?.Annots;if(!i)return{refs:[],object:0,holder:null};if("array"===i.t)return{refs:od(i),object:0,holder:null};if("ref"!==i.t)return null;let o=e.byNum.get(i.num);if(!o){let t=e.unwritten.get(i.num);if(!t||"ok"!==t.read||t.value?.t!=="array")return null;let n=od(t.value);return n.length!==t.value.items.length?null:{refs:n,object:i.num,holder:null}}if(t.get(o.objectNumber)!==n.objectNumber)return null;let a=o.value[r];return a?{refs:od(a),object:o.objectNumber,holder:o}:null}function oN(e,t){if(e.length>t.length)return null;for(let n=0;n"MK/I"===e||e.startsWith("MK/I/"),oR=e=>"AP"===e||e.startsWith("AP/");function oT(e,t,n,r){return[...n.filter(e=>!r.includes(e)),...r.filter(e=>!n.includes(e))].some(n=>t.has(n)&&!e.findings.some(e=>e.objectNumber===n&&"permitted"===e.verdict))?"widget":"annotations"}var oB={maxDepth:16,maxEdgesPerObject:256,maxReads:2e4},oL="incomplete",o$=class{constructor(e,t,n=oB){this.read=e,this.anchors=t,this.budget=n,I(this,"referrers",new Map),I(this,"resolved",new Map),I(this,"reads",0),I(this,"exhausted",!1)}resolve(e){if(!this.resolved.has(e)){for(let t of this.componentsAbove(e)??[])if(!this.resolveComponent(t))break}return this.resolved.get(e)??"incomplete"}readReferrers(e){let t=this.referrers.get(e);if(t)return t;if(this.exhausted||this.reads>=this.budget.maxReads)return this.exhausted=!0,null;this.reads+=1;let n=this.read(e);return this.referrers.set(e,n),n}pendingParents(e){let t=new Set;for(let n of e)this.anchors.has(n.parent)||this.resolved.has(n.parent)||t.add(n.parent);return[...t]}componentsAbove(e){let t=new Map,n=new Map,r=[],i=new Set,o=[],a=[],s=e=>{let a=this.readReferrers(e);return!!a&&(t.set(e,t.size),n.set(e,t.get(e)),r.push(e),i.add(e),o.push({node:e,parents:this.pendingParents(a),next:0}),!0)};if(!s(e))return null;for(;o.length>0;){let e=o[o.length-1];if(e.next0){let e=o[o.length-1].node;n.set(e,Math.min(n.get(e),n.get(l)))}if(n.get(l)===t.get(l)){let e,t=[];do e=r.pop(),i.delete(e),t.push(e);while(e!==l)a.push(t)}}return a}resolveComponent(e){let t=new Set(e),n=1===e.length?this.edgesOfSingle(e[0]):this.edgesOfLoop(e,t);if(!n){for(let t of e)this.resolved.set(t,null);return!1}for(let t of e)this.resolved.set(t,n.get(t));return!0}edgesOfSingle(e){let t=[];for(let n of this.referrers.get(e)){if(n.parent===e)continue;let r=this.through(n);if(!r)return null;t.push(...r)}let n=oV(t);return n.length>this.budget.maxEdgesPerObject?null:new Map([[e,n]])}edgesOfLoop(e,t){let n=new Map,r=new Map;for(let i of e){let e=[];for(let n of this.referrers.get(i)){if(t.has(n.parent))continue;let o=this.through(n);if(!o)return null;for(let t of o){e.push(t);let n=[...t.via??[],i];if(n.length>=this.budget.maxDepth)return null;let o={parent:t.parent,label:`${t.label}/\\u2026`,via:n},a=r.get(oz(o));a?1===a.length&&oU(a[0])!==i&&a.push(o):r.set(oz(o),[o])}if(e.length>this.budget.maxEdgesPerObject)return null}e.length>0&&n.set(i,oV(e))}if(r.size>this.budget.maxEdgesPerObject)return null;let i=new Map,o=[...r.values()].map(e=>e[0]);for(let t of e){let e=n.get(t);if(!e){i.set(t,o);continue}let a=[];for(let e of r.values()){let n=e.find(e=>oU(e)!==t);n&&a.push(n)}let s=[...e,...a];if(s.length>this.budget.maxEdgesPerObject)return null;i.set(t,s)}return i}through(e){if(this.anchors.has(e.parent))return[e];let t=this.resolved.get(e.parent);if(!t)return null;let n=[];for(let r of t){let t=[...r.via??[],e.parent];if(t.length>=this.budget.maxDepth)return null;n.push({parent:r.parent,label:`${r.label}/${e.label}`,via:t})}return n}};function oz(e){return`${e.parent}:${e.label}`}function oU(e){return e.via[e.via.length-1]}function oV(e){let t=new Set;return e.filter(e=>{if(!e.label.includes("\\u2026"))return!0;let n=oz(e);return!t.has(n)&&(t.add(n),!0)})}var oW=/\\s/,oq=/\\s/g,oH=(e,t)=>{let n=e.charCodeAt(t);return n>=56320&&n<=57343},oK=new Set([G.InvalidArg,G.NotFound,G.Forbidden,G.ProtectedDocument,G.MalformedPdf,G.PayloadTooLarge,G.ObjectNumberUnavailable,G.LayerFull,G.ChangeConflict,G.UndoUnavailable]);function oZ(e){let t=function e(t){if(t instanceof ArrayBuffer||ArrayBuffer.isView(t)){let e=t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength);return JSON.stringify({$bytes:`${e.byteLength.toString(36)}-${function(e){let t=0xdeadbeef,n=0x41c6ce57;for(let r of e)t=Math.imul(t^r,0x9e3779b1),n=Math.imul(n^r,0x5f356495);return oJ(t,n)}(e)}`})}return Array.isArray(t)?`[${t.map(e).join(",")}]`:null!==t&&"object"==typeof t?`{${Object.entries(t).filter(([,e])=>void 0!==e).sort(([e],[t])=>et)).map(([t,n])=>`${JSON.stringify(t)}:${e(n)}`).join(",")}}`:JSON.stringify(t)??"null"}(e);return`${t.length.toString(36)}-${function(e){let t=0xdeadbeef,n=0x41c6ce57;for(let r=0;r>>16,0x85ebca6b)^Math.imul(t^t>>>13,0xc2b2ae35),(0x100000000*(2097151&(t=Math.imul(t^t>>>16,0x85ebca6b)^Math.imul(e^e>>>13,0xc2b2ae35)))+(e>>>0)).toString(36)}function oQ(e,t){oY(e,t);let{grants:n,protection:r}=e;if(n&&!iW(t,n.scope,n.permissionFlags,r))throw new na(t,"target")}function oX(e,t){let{grants:n,protection:r}=e;return!(r&&iR(r).has(t))&&(!n||iW(t,n.scope,n.permissionFlags,r))}function oY(e,t){let{protection:n}=e;if(n&&iR(n).has(t))throw new N(G.ProtectedDocument,`the document is signed: ${n.certification?`certification signature ${n.certification.signatureIndex} (permission ${n.certification.permission})`:`an existing signature (declared level \'${n.enforced??"none declared"}\')`} forbids \'${t}\'`)}function o0(e){return"widget"===e?"doc.forms.modify":"doc.annotate.modify"}function o1(e){return[...new Set(e.map(e=>o0(e.subtype)))]}function o3(e,t){let{identity:n,grants:r}=e;if(r&&!iW("doc.forms.modify",r.scope,r.permissionFlags))throw new na("doc.forms.modify","target");if("string"==typeof t)throw new N(G.InvalidArg,"a widget has no group of its own: a form field\'s group is the field\'s");let i={...void 0!==n.userId?{userId:n.userId}:{},...void 0!==n.displayName?{displayName:n.displayName}:{}};return i.userId||i.displayName?i:void 0}function o2(e,t,n){if("widget"===t)return o3(e,n);let{identity:r,grants:i}=e;if(null===n&&void 0!==r.groupId)throw new N(G.InvalidArg,"your annotations have a group: leave groupId out for your own, or name another",{details:{field:"groupId"}});let o=void 0===n?r.groupId:n??void 0;if(i){if(void 0!==o&&!iK("annotations",o,r.groupId,i.scope))throw new na(`annotations:set-group:group=${o}`,"target");if(!iq("create",iV({userId:r.userId,groupId:o}),i.scope,r,i.permissionFlags))throw new na("annotations:create","target")}let a={...void 0!==r.userId?{userId:r.userId}:{},...void 0!==o?{groupId:o}:{},...void 0!==r.displayName?{displayName:r.displayName}:{}};return a.userId||a.groupId||a.displayName?a:void 0}function o6(e,t,n){if("widget"===t.subtype)return o3(e,n);let{identity:r,grants:i}=e,o=iV(t);if(i&&!iq("update",o,i.scope,r,i.permissionFlags))throw new na("annotations:update","target");if(null===n&&void 0!==o.groupId)throw new N(G.InvalidArg,"an annotation\'s group can\'t be removed");let a="string"==typeof n&&n!==o.groupId;if(a&&i&&!iK("annotations",n,r.groupId,i.scope))throw new na(`annotations:set-group:group=${n}`,"target");let s={...void 0!==r.userId?{userId:r.userId}:{},...void 0!==r.displayName?{displayName:r.displayName}:{},...a?{groupId:n}:{}};return s.userId||s.groupId||s.displayName?s:void 0}function o5(e,t){let{identity:n,grants:r}=e;if(!r)return;let i=iW("doc.forms.modify",r.scope,r.permissionFlags),o=t.filter(e=>"widget"===e.subtype?!i:!iq("delete",iV(e),r.scope,n,r.permissionFlags));if(o.length>0)throw new na("annotations:delete","target",void 0,o.map(e=>e.ref))}function o4(e,t,n){if(oY(e,o9(n)),!o8(e,t,n)){let e="string"==typeof t||null===t?t:Y(t);throw new na(null===e?o9(n):`fields:${n}:group=${e}`,"target")}}function o8(e,t,n){let{grants:r,protection:i}=e;return!(i&&iR(i).has(o9(n)))&&(!r||function(e,t,n,r,i=null){let o=null!==t&&"object"==typeof t?t:X(t);if("anyone"===o.kind)return iZ(e,n,r,i);let a="group"===o.kind?o.groupId:null,s="fill"===e?"doc.forms.fill":"doc.sign";if(iR(i).has(s))return!1;let l=n.map(iB);if(l.some(e=>"wildcard"===e.kind))return!0;let u=l.filter(t=>"collab"===t.kind&&"fields"===t.entity&&(t.action===e||"*"===t.action));return u.length>0?u.some(e=>"all"===e.filter.kind||null!==a&&e.filter.groupId===a):iH(l,r,i).has(s)}(n,t,r.scope,r.permissionFlags,i))}function o7(e,t){if("group"===t.kind)return function(e,t){if(null===t)return;let{identity:n,grants:r}=e;if(r&&!iK("fields",t,n.groupId,r.scope))throw new na(`fields:set-group:group=${t}`,"target")}(e,t.groupId);if("unassigned"===t.kind)return;let{grants:n}=e;if(n&&!n.scope.map(iB).some(e=>"wildcard"===e.kind||"collab"===e.kind&&"fields"===e.entity&&("set-group"===e.action||"*"===e.action)&&"all"===e.filter.kind))throw new na("fields:set-group:all","target")}function o9(e){return"fill"===e?"doc.forms.fill":"doc.sign"}function ae(e,t){return"fqn"===t.kind?e.name===t.name:"objectNumber"===e.ref.kind&&e.ref.objectNumber===t.objectNumber}function at(e){if("signature"===e.kind)return{...e,valueEntry:{kind:"none"}};if(!e.noExport)return e;let t={...e,valueEntry:{kind:"none"},filledBy:null,filledByName:null,filledAt:null};switch(e.kind){case"text":case"combobox":return{...t,kind:e.kind,value:""};case"checkbox":return{...t,kind:"checkbox",checked:!1,widgets:e.widgets.map(e=>({...e,checked:!1}))};case"radio":return{...t,kind:"radio",value:"Off",widgets:e.widgets.map(e=>({...e,checked:!1}))};case"listbox":return{...t,kind:"listbox",selectedValues:[],options:e.options.map(e=>({...e,selected:!1}))};case"pushbutton":return{...t,kind:"pushbutton",hasImage:!1};default:return t}}Array.from({length:128},(e,t)=>({print:(1&t)!=0,modifyContents:(2&t)!=0,copy:(4&t)!=0,modifyAnnotations:(8&t)!=0,fillForms:(16&t)!=0,copyForAccessibility:!1,assemble:(32&t)!=0,printHighQuality:(64&t)!=0}));var an=["invisible","hidden","print","noZoom","noRotate","noView","readOnly","locked","toggleNoView","lockedContents"];function ar(e){return"scalar"===e.valueEntry.kind||"array"===e.valueEntry.kind}function ai(e){if(!eg(e.kind))return null;let t=eb(e.actions);return ev(t)?t:null}function ao(e,t,n){let r={},i=t?null:ai(e);for(let[o,a]of Object.entries(e.actions??{})){if(!a)continue;let s=U(a),l=`actions.${o}`;if(s)if(t)r[o]=s;else{if(i&&"format"===o||i&&"keystroke"===o&&function(e,t){let n=t?ew(t):null;if(null===n)return!1;let r=e_[e.kind];return"time"===e.kind?null!==eD(n,"time","",r.numberedKeystroke)||eD(n,"time",r.keystroke,"")===e.pattern:eD(n,"date",r.keystroke,r.numberedKeystroke)===e.pattern}(i,a))continue;n.push({ref:e.ref,field:l,reason:"script-not-allowed"})}else n.push({ref:e.ref,field:l,reason:"unsupported-action"})}return r}function aa(e,t){if("pushbutton"!==e.kind)return e;let n=rW(t.map(e=>e.actions));return e.takesImage===n?e:{...e,takesImage:n}}function as(e,t,n,r,i){let o={},a=!r&&"pushbutton"===e.kind&&e.takesImage&&rV(t.actions);for(let s of z){let l=t.actions?.[s];if(!l||a&&rU.includes(s))continue;let u=B(l),d=n=>i.push({ref:e.ref,widget:t.ref,field:`actions.${s}`,reason:n});u?!r&&R(u)?d("script-not-allowed"):o[s]=rL(u,n):d("unsupported-action")}let s="checkbox"===e.kind||"radio"===e.kind?e.widgets.find(e=>e.ref&&K(e.ref)===K(t.ref)):void 0,l={color:t.color,interiorColor:t.interiorColor,dashArray:t.dashArray,checkStyle:t.checkStyle,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,caption:"pushbutton"===e.kind?t.caption:null,layout:"pushbutton"===e.kind&&"caption"!==t.layout?t.layout:null};return{page:n(t.page),rect:t.rect,...t.rotation?{rotation:t.rotation}:{},strokeWidth:t.strokeWidth,borderStyle:t.borderStyle,textAlign:t.textAlign,...Object.fromEntries(Object.entries(l).filter(([,e])=>null!=e)),...s&&"exportValue"in s?{exportValue:s.exportValue}:{},...Object.keys(o).length>0?{actions:o}:{}}}function al(e){return Object.fromEntries(an.map(t=>[t,e[t]]))}function au(e,t,n,r,i){let o={name:t,readOnly:e.readOnly,required:e.required,noExport:e.noExport,...null!==e.alternateName?{alternateName:e.alternateName}:{},...null!==e.mappingName?{mappingName:e.mappingName}:{},assignment:e.assignment,...rC(e.purpose)?{purpose:e.purpose}:{},...eN(e.placeholder)?{placeholder:e.placeholder}:{},...Object.keys(n).length>0?{actions:n}:{},widgets:r},a=void 0===n.format?ai(e):null,s=a?{format:a}:{},l="none"!==e.defaultValueEntry.kind,u=e=>e.map(({label:e,value:t})=>({label:e,value:t}));switch(e.kind){case"text":return{...o,...s,kind:"text",...l?{defaultValue:e.defaultValue}:{},...null!==e.maxLength?{maxLength:e.maxLength}:{},multiline:e.multiline,password:e.password,comb:e.comb};case"radio":return{...o,kind:"radio",radiosInUnison:e.radiosInUnison,noToggleToOff:e.noToggleToOff};case"combobox":return{...o,...s,kind:"combobox",edit:e.edit,options:u(e.options),...l?{defaultValue:e.defaultValue}:{}};case"listbox":return{...o,kind:"listbox",multiSelect:e.multiSelect,options:u(e.options),...l?{defaultValue:e.defaultValue}:{}};case"pushbutton":{let t=r.every(e=>rU.every(t=>e.actions?.[t]===void 0)),n=e.takesImage&&r.length>0&&t;return{...o,kind:"pushbutton",...n?{takesImage:!0}:{}}}case"checkbox":case"signature":return{...o,kind:e.kind};default:throw new N(G.InvalidArg,`${i} has no family`)}}function ad(e){switch(e.kind){case"checkbox":return{checked:e.checked};case"listbox":return{selectedValues:e.selectedValues};case"radio":return{value:"Off"===e.value?null:e.value};case"text":case"combobox":return{value:e.value};default:return null}}function ac(e,t){if(e.has(t))return!0;for(let n of e)if(n.startsWith(`${t}.`)||t.startsWith(`${n}.`))return!0;return!1}function af(e,t){let n=e.lastIndexOf("."),r=e.slice(0,n+1),i=e.slice(n+1),o=/^(.*)_(\\d+)$/.exec(i),a=o?o[1]:i,s=o?Number(o[2])+1:2;for(;t(`${r}${a}_${s}`);)s+=1;return`${r}${a}_${s}`}function am(e,t){let n=new Set(t.widgets.flatMap(e=>e.ref?K(e.ref):[])),r=new Map;for(let t of e.widgets){let e=K(t.ref);n.has(e)&&r.set(e,t)}let i=t.widgets.flatMap(e=>{let t=e.ref?r.get(K(e.ref)):void 0;return t?[t]:[]}),o=i[0];return o?i.filter(e=>e.page.objectNumber===o.page.objectNumber):[]}var ap=e=>"pushbutton"===e.kind&&e.takesImage?"fields":"boxes",ah=e=>(e%360+360)%360;function aF(e,t,n){let r=e?.[t];if(void 0!==r&&!(n<=r))throw new N(G.PayloadTooLarge,`repeat: past the ${t} limit: ${n} > ${r}`,{details:{limit:t,max:r,value:n}})}var ag=e=>"truetype"===e||"opentype"===e,a_=e=>"installable"===e||"editable"===e;function aP(e){return"whole"===e.embedded&&ag(e.format)&&e.mapsUnicode&&a_(e.permission)}function aD(e){return null!==e.displaySha256&&(null===e.permission||a_(e.permission))}function ab(e){let t=[];return"none"===e.embedded?t.push("type3"===e.format?"unsupported-format":"not-embedded"):("subset"===e.embedded&&t.push("subset"),ag(e.format)?e.mapsUnicode||t.push("no-unicode-map"):t.push("unsupported-format"),null===e.permission||a_(e.permission)||t.push("preview-and-print")),t}function ay(e){let t=aD(e);return{displaySha256:t?e.displaySha256:null,sourceSha256:"none"===e.embedded?null:e.sha256,embedded:e.embedded,format:"none"===e.embedded?null:e.format,embeddingPermission:"restricted"===e.permission||"bitmap-only"===e.permission?"preview-and-print":e.permission,canDownload:t}}var aw=e=>aP(e)?0:aD(e)?1:"none"!==e.embedded?2:3,aE={100:"Thin",200:"ExtraLight",300:"Light",400:"",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"};function aA(e,t){if(t)return t;let n=`${aE[e.weight]??String(e.weight)}${e.italic?"Italic":""}`;return n?`${e.familyName},${n}`:e.familyName}function av(e){let t=new Map;for(let n of e)for(let e of n.programs){if(!e.postScriptName&&""===n.familyName)continue;let r=aA(n,e.postScriptName),i=t.get(r)??[];i.some(({program:t})=>e.objectNumber>0?t.objectNumber===e.objectNumber&&t.displaySha256===e.displaySha256:0===t.objectNumber&&t.embedded===e.embedded&&t.format===e.format&&t.sha256===e.sha256)||i.push({face:n,program:e}),t.set(r,i)}return[...t].map(([e,t])=>{let n=[...t].sort((e,t)=>aw(e.program)-aw(t.program)),{familyName:r,weight:i,italic:o}=n[0].face;return{name:e,face:{familyName:r,weight:i,italic:o},programs:n.map(({program:e})=>e)}})}function aS(e){return void 0!==eW[eV(e.face.familyName)]&&e.programs.every(e=>"none"===e.embedded)}function ak(e){let t=e.programs[0];return{name:e.name,source:"document",builtIn:!1,familyName:e.face.familyName,weight:e.face.weight,italic:e.face.italic,postScriptName:t?.postScriptName??null,canChoose:!!t&&aP(t),restrictions:t?ab(t):["not-embedded"],programs:e.programs.map(ay)}}function ax(e){let{identity:t}=e,n=[];return t.editingAuthorized||n.push("preview-and-print"),e.served||n.push("not-served"),{name:e.key,source:"engine",builtIn:e.builtIn,familyName:t.familyName,weight:t.weight,italic:t.italic,postScriptName:e.postScriptName,canChoose:t.editingAuthorized,restrictions:n,programs:[{displaySha256:e.sha256,sourceSha256:e.sha256,embedded:"none",format:e.format,embeddingPermission:t.embeddingPermission,canDownload:e.served}]}}function aG(e,t){let n=av(e.faces).find(e=>e.name===t&&!aS(e));if(!n)return;let r=n.programs[0];return r?{objectNumber:r.objectNumber,choosable:aP(r)&&r.objectNumber>0,restrictions:ab(r)}:{objectNumber:0,choosable:!1,restrictions:["not-embedded"]}}var aO={elsewhere:0,near:1,visible:2};function aI(e,t){let n=aO[e.place]-aO[t.place];return 0!==n?n>0:e.pixels>t.pixels}var aN=Object.freeze([]);function aC(e,t=aN){return{payload:e,transfer:t}}var aj=[{ts:"boolean",wasm:{kind:"bool",cwrap:"boolean"},native:{kind:"bool",cwrap:"boolean"}},{ts:"Ptr",wasm:{kind:"pointer",cwrap:"number"},native:{kind:"pointer",cwrap:"bigint"}},{ts:"string",wasm:{kind:"cstring",cwrap:"string"},native:{kind:"cstring",cwrap:"string"}},{ts:"number",wasm:{kind:"i32",cwrap:"number"},native:{kind:"i32",cwrap:"number"}},{ts:"Ptr",wasm:{kind:"cstring",cwrap:"number"},native:{kind:"cstring",cwrap:"bigint"}},{ts:"number",wasm:{kind:"f32",cwrap:"number"},native:{kind:"f32",cwrap:"number"}},{ts:"Ptr",wasm:{kind:"utf16ptr",cwrap:"number"},native:{kind:"utf16ptr",cwrap:"bigint"}},{ts:"bigint",wasm:{kind:"i64",cwrap:"bigint"},native:{kind:"i64",cwrap:"bigint"}},{ts:"number",wasm:{kind:"f64",cwrap:"number"},native:{kind:"f64",cwrap:"number"}}],aM=function(e){let t={};for(let n of e.split(`\n`)){if(!n)continue;let[e,r,...i]=n.split(" ");t[e]={params:i.map(e=>aj[Number(e)]),result:"-"===r?null:aj[Number(r)]}}return t}(`\nEPDF_CheckPasswordPermissions 0 1 2 1 1 1 1\nEPDF_DigestBuffer 0 1 3 3 4 1\nEPDF_FreeBuffer - 1\nEPDF_GetDecodedImageBytes 3\nEPDF_GetMetaKeyCount 3 1 0\nEPDF_GetMetaKeyName 3 1 3 0 1 3\nEPDF_GetMetaTrapped 3 1\nEPDF_GetPageBoxByIndex 0 1 3 3 1\nEPDF_GetPageRotateByIndex 0 1 3 1\nEPDF_GetPageTabOrderByIndex 3 1 3 1 3\nEPDF_GetPageUserUnitByIndex 0 1 3 1\nEPDF_HasMetaText 0 1 2\nEPDF_InitThread -\nEPDF_IsEncrypted 0 1\nEPDF_IsOwnerUnlocked 0 1\nEPDF_LoadBaseDocument 1 1 2\nEPDF_LoadMemBaseDocument 1 1 3 2\nEPDF_LoadMemBaseDocument64 1 1 3 2\nEPDF_LoadPageNormalized 1 1 3 1\nEPDF_PNG_EncodeRGBA 3 4 3 3 3 3 4\nEPDF_ReleaseBaseDocument - 1\nEPDF_RemoveEncryption 0 1\nEPDF_RenderAnnotBitmap 0 1 1 1 3 2 1 3\nEPDF_RenderAnnotBitmapUnrotated 0 1 1 1 3 2 5 1 1 3\nEPDF_RenderPage_Continue 3 1 3\nEPDF_RenderPageBitmapWithMatrix_Start 3 1 1 1 1 3 3\nEPDF_SaveAsCopyEx 0 1 1 3 1\nEPDF_SaveDocumentToOwnedBuffer 1 1 3 1\nEPDF_SaveDocumentToOwnedBufferEx 1 1 3 3 1 1\nEPDF_SaveDocumentToOwnedBufferWithVersion 1 1 3 1 3\nEPDF_SetBaseDocumentSha256 - 1 4\nEPDF_SetDecodedImageBudget - 3\nEPDF_SetEncryption 0 1 2 2 3\nEPDF_SetMetaText 0 1 2 1\nEPDF_SetMetaTrapped 0 1 3\nEPDF_SetRuntimeOwnerPermissions 0 1 0\nEPDF_ShutdownThread -\nEPDF_UnlockOwnerPermissions 0 1 2\nEPDFAction_CloseModel - 1\nEPDFAction_CreateGoTo 1 1 1\nEPDFAction_CreateGoToNamed 1 1 2\nEPDFAction_CreateHide 1 1 1 3 0\nEPDFAction_CreateJavaScript 1 1 1\nEPDFAction_CreateLaunch 1 1 1\nEPDFAction_CreateNamed 1 1 2\nEPDFAction_CreateRemoteGoToByName 1 1 1 1\nEPDFAction_CreateRemoteGoToDest 1 1 1 1\nEPDFAction_CreateResetForm 1 1 1 3 0\nEPDFAction_CreateSubmitForm 1 1 1 1 3 3\nEPDFAction_CreateURI 1 1 2\nEPDFAction_GetNextAt 3 1 3 3\nEPDFAction_GetNextCount 3 1 3\nEPDFAction_GetNodeCount 3 1\nEPDFAction_GetNodeDest 1 1 1 3\nEPDFAction_GetNodeFilePath 3 1 3 1 3\nEPDFAction_GetNodeHideFlag 0 1 3 1\nEPDFAction_GetNodeJavaScript 3 1 3 6 3\nEPDFAction_GetNodeName 3 1 3 1 3\nEPDFAction_GetNodeResetForm 0 1 3 1 1\nEPDFAction_GetNodeSubmitForm 0 1 3 1 1\nEPDFAction_GetNodeSubmitFormCharSet 3 1 3 1 3\nEPDFAction_GetNodeSubmitFormURL 3 1 3 1 3\nEPDFAction_GetNodeSubtype 3 1 3 4 3\nEPDFAction_GetNodeTargetCount 3 1 3\nEPDFAction_GetNodeTargetName 3 1 3 3 1 3\nEPDFAction_GetNodeTargetObjectNumber 0 1 3 3 1\nEPDFAction_GetNodeType 3 1 3\nEPDFAction_GetNodeURI 3 1 1 3 1 3\nEPDFAction_GetNodeURIIsMap 0 1 3 1\nEPDFAction_GetRootNode 3 1\nEPDFAction_GetWarningFlags 3 1\nEPDFAction_IsComplete 0 1\nEPDFAction_LoadModel 1 1\nEPDFAction_NodeHasJavaScript 0 1 3\nEPDFAction_SetNext 0 1 1 1 3\nEPDFAnnot_AddMeasure 1 1\nEPDFAnnot_ClearBorderEffect 0 1\nEPDFAnnot_ClearColor 0 1 3\nEPDFAnnot_ClearEmbedMetadata 0 1\nEPDFAnnot_ClearEmbedMetadataKey 0 1 2\nEPDFAnnot_ClearMKColor 0 1 3\nEPDFAnnot_ClearMKIcon 0 1 3\nEPDFAnnot_ClearRectangleDifferences 0 1\nEPDFAnnot_ExportAppearance 1 1 5 1\nEPDFAnnot_GenerateAppearance 0 1\nEPDFAnnot_GenerateAppearanceWithBlend 0 1 3\nEPDFAnnot_GenerateFormFieldAP 0 1\nEPDFAnnot_GetActionModel 1 1 3\nEPDFAnnot_GetAPMatrix 0 1 3 1\nEPDFAnnot_GetAppearanceState 3 1 1 3\nEPDFAnnot_GetAppearanceStateCount 3 1 3\nEPDFAnnot_GetAppearanceStateName 3 1 3 3 1 3\nEPDFAnnot_GetAppearanceTransform 0 1 1 1\nEPDFAnnot_GetAvailableAppearanceModes 3 1\nEPDFAnnot_GetBlendMode 3 1\nEPDFAnnot_GetBooleanValue 0 1 2 1\nEPDFAnnot_GetBorderDashPattern 0 1 1 3\nEPDFAnnot_GetBorderDashPatternCount 3 1\nEPDFAnnot_GetBorderEffect 0 1 1\nEPDFAnnot_GetBorderStyle 3 1 1\nEPDFAnnot_GetCalloutLine 3 1 1 3\nEPDFAnnot_GetCalloutLineCount 3 1\nEPDFAnnot_GetColor 0 1 3 1 1 1\nEPDFAnnot_GetDefaultAppearance 0 1 1 1 1 1 1\nEPDFAnnot_GetDefaultAppearanceFontFace 3 1 6 3 1 1\nEPDFAnnot_GetDefaultAppearanceFontPostScriptName 3 1 4 3\nEPDFAnnot_GetDrawing 3 1\nEPDFAnnot_GetDrawingRect 0 1 3 1\nEPDFAnnot_GetEmbedMetadataBoolean 0 1 2 1\nEPDFAnnot_GetEmbedMetadataJSON 3 1 6 3\nEPDFAnnot_GetEmbedMetadataNumber 0 1 2 1\nEPDFAnnot_GetEmbedMetadataRect 0 1 2 1\nEPDFAnnot_GetEmbedMetadataString 3 1 2 6 3\nEPDFAnnot_GetFileAttachmentForWrite 1 1\nEPDFAnnot_GetIntent 3 1 6 3\nEPDFAnnot_GetLineCaption 0 1 1 1 1\nEPDFAnnot_GetLineEndings 0 1 1 1\nEPDFAnnot_GetLineLeader 0 1 1 1 1\nEPDFAnnot_GetMeasure 1 1\nEPDFAnnot_GetMKColor 0 1 3 1 1 1\nEPDFAnnot_GetMKIcon 3 1 3\nEPDFAnnot_GetMKRotation 3 1\nEPDFAnnot_GetMKText 3 1 3 6 3\nEPDFAnnot_GetMKTextPosition 3 1\nEPDFAnnot_GetName 3 1 4 3\nEPDFAnnot_GetObjectNumber 3 1\nEPDFAnnot_GetOpacity 0 1 1\nEPDFAnnot_GetOverlayText 3 1 6 3\nEPDFAnnot_GetOverlayTextRepeat 0 1\nEPDFAnnot_GetRect 0 1 1\nEPDFAnnot_GetRectangleDifferences 0 1 1 1 1 1\nEPDFAnnot_GetReplyType 3 1\nEPDFAnnot_GetRichContent 3 1 6 3\nEPDFAnnot_GetRichTextJSON 3 1 4 3\nEPDFAnnot_GetRotate 0 1 1\nEPDFAnnot_GetShapeCaption 0 1 1 1 1\nEPDFAnnot_GetStructurePosition 3 1 1 3\nEPDFAnnot_GetTextAlignment 3 1\nEPDFAnnot_HasAppearanceStream 0 1 3\nEPDFAnnot_HasEmbedMetadata 0 1\nEPDFAnnot_HasMKIcon 0 1 3\nEPDFAnnot_IsValid 0 1\nEPDFAnnot_RemoveAction 0 1\nEPDFAnnot_RemoveDest 0 1\nEPDFAnnot_RemoveKey 0 1 2\nEPDFAnnot_RemoveMeasure 0 1\nEPDFAnnot_SetAction 0 1 1\nEPDFAnnot_SetAPMatrix 0 1 3 1\nEPDFAnnot_SetAppearanceFromPage 0 1 1 3\nEPDFAnnot_SetBooleanValue 0 1 2 0\nEPDFAnnot_SetBorderDashPattern 0 1 1 3\nEPDFAnnot_SetBorderEffect 0 1 5\nEPDFAnnot_SetBorderStyle 0 1 3 5\nEPDFAnnot_SetCalloutLine 0 1 1 3\nEPDFAnnot_SetColor 0 1 3 3 3 3\nEPDFAnnot_SetDefaultAppearance 0 1 3 5 3 3 3\nEPDFAnnot_SetDefaultAppearanceDocumentFont 0 1 3 5 3 3 3\nEPDFAnnot_SetDefaultAppearanceRegisteredFont 0 1 3 5 3 3 3\nEPDFAnnot_SetDrawing 0 1 3 3\nEPDFAnnot_SetEmbedMetadataBoolean 0 1 2 0\nEPDFAnnot_SetEmbedMetadataJSON 0 1 1\nEPDFAnnot_SetEmbedMetadataNumber 0 1 2 5\nEPDFAnnot_SetEmbedMetadataRect 0 1 2 1\nEPDFAnnot_SetEmbedMetadataString 0 1 2 1\nEPDFAnnot_SetEventAction 0 1 3 1\nEPDFAnnot_SetIntent 0 1 2\nEPDFAnnot_SetLine 0 1 1 1\nEPDFAnnot_SetLineCaption 0 1 0 3 1\nEPDFAnnot_SetLineEndings 0 1 3 3\nEPDFAnnot_SetLineLeader 0 1 5 5 5\nEPDFAnnot_SetLinkedAnnot 0 1 2 1\nEPDFAnnot_SetMKColor 0 1 3 3 3 3\nEPDFAnnot_SetMKIcon 0 1 3 3\nEPDFAnnot_SetMKRotation 0 1 3\nEPDFAnnot_SetMKText 0 1 3 1\nEPDFAnnot_SetMKTextPosition 0 1 3\nEPDFAnnot_SetName 0 1 2\nEPDFAnnot_SetNoColor 0 1 3\nEPDFAnnot_SetNumberValue 0 1 2 5\nEPDFAnnot_SetOpacity 0 1 5\nEPDFAnnot_SetOverlayText 0 1 1\nEPDFAnnot_SetOverlayTextRepeat 0 1 0\nEPDFAnnot_SetRect 0 1 1\nEPDFAnnot_SetReplyType 0 1 3\nEPDFAnnot_SetRichTextJSON 0 1 2\nEPDFAnnot_SetRichTextXHTML 0 1 1\nEPDFAnnot_SetRotate 0 1 5\nEPDFAnnot_SetShapeCaption 0 1 0 1\nEPDFAnnot_SetStampOpacity 0 1 3 5\nEPDFAnnot_SetSubtype 0 1 3\nEPDFAnnot_SetTextAlignment 0 1 3\nEPDFAnnot_SetVertices 0 1 1 3\nEPDFAnnot_UpdateAppearanceToRect 0 1 3\nEPDFAttachment_ExportCanonicalToOwnedBuffer 1 1 1 1\nEPDFAttachment_ExportRawToOwnedBuffer 1 1 1 1\nEPDFAttachment_ExtractFile 0 1 1 7 1 1\nEPDFAttachment_ExtractFileToOwnedBuffer 0 1 7 1 1 1\nEPDFAttachment_GetDescription 3 1 6 3\nEPDFAttachment_GetIntegerValue 0 1 2 1\nEPDFAttachment_ImportRaw 0 1 1 3\nEPDFAttachment_SetDescription 0 1 1\nEPDFAttachment_SetName 0 1 1\nEPDFAttachment_SetSubtype 0 1 2\nEPDFCatalog_GetLanguage 3 1 1 3\nEPDFCatalog_GetMetadata 3 1 1 3\nEPDFCatalog_SetMetadata 0 1 1 3\nEPDFDest_CreateRemoteView 1 1 3 3 1 3\nEPDFDest_CreateRemoteXYZ 1 1 3 0 5 0 5 0 5\nEPDFDest_CreateView 1 1 3 1 3\nEPDFDest_CreateViewByObjectNumber 1 1 3 3 1 3\nEPDFDest_CreateXYZ 1 1 0 5 0 5 0 5\nEPDFDest_CreateXYZByObjectNumber 1 1 3 0 5 0 5 0 5\nEPDFDest_GetPageObjectNumber 3 1 1\nEPDFDest_GetViewNullParams 3 1\nEPDFDoc_CanonicalDrawing 1 1 3\nEPDFDoc_ClearMissingCharacters - 1\nEPDFDoc_ClearPagePieceInfoEntry 0 1 3 2\nEPDFDoc_ClearPagePieceInfoKey 0 1 3 2 2 1\nEPDFDoc_ClearPieceInfoEntry 0 1 2\nEPDFDoc_ClearPieceInfoKey 0 1 2 2 1\nEPDFDoc_CompareRevisions 1 1 1\nEPDFDoc_CountMissingCharacters 3 1\nEPDFDoc_DeletePageByObjectNumber 0 1 3\nEPDFDoc_ExportDictCanonicalToOwnedBuffer 1 1 3 2 2 1\nEPDFDoc_ExportDictRawToOwnedBuffer 1 1 3 2 1\nEPDFDoc_ExportDrawing 1 1 3\nEPDFDoc_ExportPagesFlattened 1 1 1 3 3 3\nEPDFDoc_GetAdditionalActionModel 1 1 3\nEPDFDoc_GetAttachmentIndexByKey 3 1 1\nEPDFDoc_GetAttachmentKey 3 1 3 6 3\nEPDFDoc_GetBaseBytesSize 7 1\nEPDFDoc_GetDrawings 3 1 1 3\nEPDFDoc_GetFontDisplayProgramCoverage 3 1 4 1 3\nEPDFDoc_GetFontDisplayProgramData 3 1 4 1 3\nEPDFDoc_GetFontEmbeddingPolicy 3 1\nEPDFDoc_GetFontProgramData 3 1 3 1 3\nEPDFDoc_GetFontsFingerprint 0 1 4\nEPDFDoc_GetImportFieldRoots 3 1 1 3 1 3\nEPDFDoc_GetLastModified 3 1 6 3\nEPDFDoc_GetLoadedBytesSize 7 1\nEPDFDoc_GetLoadedObjectValue 3 1 3 4 3 1 1\nEPDFDoc_GetMissingCharacter 3 1 3 6 3\nEPDFDoc_GetNamedJavaScriptActionModel 1 1 3\nEPDFDoc_GetNamedPageAt 3 1 3 3 6 3 1 1\nEPDFDoc_GetNamedPageCount 3 1 3\nEPDFDoc_GetOpenActionDest 1 1\nEPDFDoc_GetOpenActionModel 1 1\nEPDFDoc_GetPageActionModel 1 1 3 3\nEPDFDoc_GetPageLabelSectionAt 3 1 3 6 3 1 1 1\nEPDFDoc_GetPageLabelSectionCount 3 1\nEPDFDoc_GetPageLastModified 3 1 3 6 3\nEPDFDoc_GetPageObjectNumberByIndex 3 1 3\nEPDFDoc_GetPagePieceInfoBoolean 0 1 3 2 2 1\nEPDFDoc_GetPagePieceInfoEntryAt 3 1 3 3 4 3\nEPDFDoc_GetPagePieceInfoEntryCount 3 1 3\nEPDFDoc_GetPagePieceInfoKeyAt 3 1 3 2 3 4 3\nEPDFDoc_GetPagePieceInfoKeyCount 3 1 3 2\nEPDFDoc_GetPagePieceInfoLastModified 3 1 3 2 6 3\nEPDFDoc_GetPagePieceInfoName 3 1 3 2 2 4 3\nEPDFDoc_GetPagePieceInfoNumber 0 1 3 2 2 1\nEPDFDoc_GetPagePieceInfoString 3 1 3 2 2 6 3\nEPDFDoc_GetPagePieceInfoStringArrayAt 3 1 3 2 2 3 6 3\nEPDFDoc_GetPagePieceInfoStringArrayCount 3 1 3 2 2\nEPDFDoc_GetPagePieceInfoValueType 3 1 3 2 2\nEPDFDoc_GetPieceInfoBoolean 0 1 2 2 1\nEPDFDoc_GetPieceInfoEntryAt 3 1 3 4 3\nEPDFDoc_GetPieceInfoEntryCount 3 1\nEPDFDoc_GetPieceInfoKeyAt 3 1 2 3 4 3\nEPDFDoc_GetPieceInfoKeyCount 3 1 2\nEPDFDoc_GetPieceInfoLastModified 3 1 2 6 3\nEPDFDoc_GetPieceInfoName 3 1 2 2 4 3\nEPDFDoc_GetPieceInfoNumber 0 1 2 2 1\nEPDFDoc_GetPieceInfoString 3 1 2 2 6 3\nEPDFDoc_GetPieceInfoStringArrayAt 3 1 2 2 3 6 3\nEPDFDoc_GetPieceInfoStringArrayCount 3 1 2 2\nEPDFDoc_GetPieceInfoValueType 3 1 2 2\nEPDFDoc_GetRevision 0 1 3 1 1\nEPDFDoc_GetRevisionCount 3 1\nEPDFDoc_GetStructureObjectNumbers 0 1 1 1 1\nEPDFDoc_GetTypographicFeatures 0 1\nEPDFDoc_HasPagePieceInfoEntry 0 1 3 2\nEPDFDoc_HasPieceInfoEntry 0 1 2\nEPDFDoc_ImportDictRaw 0 1 1 3\nEPDFDoc_ImportDrawing 3 1 1\nEPDFDoc_ImportPages 0 1 1 1 3 3 1\nEPDFDoc_LoadPageByObjectNumber 1 1 3\nEPDFDoc_LoadPageByObjectNumberNormalized 1 1 3\nEPDFDoc_OpenBaseOverlay 1 1 1 3\nEPDFDoc_OpenBaseOverlayFromPath 1 1 4\nEPDFDoc_OpenRevision 1 1 7\nEPDFDoc_ReadLoadedBytes 3 1 7 1 3\nEPDFDoc_RemoveNamedPage 0 1 1\nEPDFDoc_RemoveNamedPagesForPage 3 1 3\nEPDFDoc_ResolveFonts 1 1 1 3 6 6 1 1 1\nEPDFDoc_SetFontEmbeddingPolicy 0 1 3\nEPDFDoc_SetNamedPage 0 1 1 3\nEPDFDoc_SetPageLabelSections 0 1 1 1 1 6 3\nEPDFDoc_SetPagePieceInfoBoolean 0 1 3 2 2 0 1\nEPDFDoc_SetPagePieceInfoName 0 1 3 2 2 2 1\nEPDFDoc_SetPagePieceInfoNumber 0 1 3 2 2 5 1\nEPDFDoc_SetPagePieceInfoString 0 1 3 2 2 1 1\nEPDFDoc_SetPagePieceInfoStringArray 0 1 3 2 2 6 3 1\nEPDFDoc_SetPageRotationByObjectNumber 0 1 3 3\nEPDFDoc_SetPieceInfoBoolean 0 1 2 2 0 1\nEPDFDoc_SetPieceInfoName 0 1 2 2 2 1\nEPDFDoc_SetPieceInfoNumber 0 1 2 2 5 1\nEPDFDoc_SetPieceInfoString 0 1 2 2 1 1\nEPDFDoc_SetPieceInfoStringArray 0 1 2 2 6 3 1\nEPDFDoc_SetTypographicFeatures 0 1 0\nEPDFDoc_StartLoadPageByObjectNumber 1 1 3 0\nEPDFDocument_ClearEmbedMetadata 0 1\nEPDFDss_Add 3 1 3 1 3\nEPDFDss_GetCount 3 1 3\nEPDFDss_GetData 3 1 3 3 1 3\nEPDFFont_AddFallbackFont 0 3 3\nEPDFFont_AuthorizeEditing 0 3\nEPDFFont_ClearFallbackFonts -\nEPDFFont_ClearRegisteredFonts -\nEPDFFont_GetCoverage 3 3 1 3\nEPDFFont_GetEmbeddingPermission 3 3\nEPDFFont_GetFallbackOrder 3 3 0 1 3\nEPDFFont_GetFamilyName 3 3 4 3\nEPDFFont_GetLastResortFont 3\nEPDFFont_GetMetrics 0 3 1 1\nEPDFFont_GetPostScriptName 3 3 4 3\nEPDFFont_GetProgramData 3 3 1 3\nEPDFFont_GetProgramFormat 3 3\nEPDFFont_GetProgramHash 0 3 4\nEPDFFont_GetWeight 3 3\nEPDFFont_IsEditingAuthorized 0 3\nEPDFFont_IsInstanced 0 3\nEPDFFont_IsItalic 0 3\nEPDFFont_RegisterFont 3 2 3 3 1\nEPDFFont_RegisterMemFont 3 2 3 3 1 3\nEPDFFont_RegisterMemFont64 3 2 3 3 1 3\nEPDFFont_SetLastResortFont 0 3\nEPDFFontFaces_Close - 1\nEPDFFontFaces_Count 3 1\nEPDFFontFaces_CountPrograms 3 1 3\nEPDFFontFaces_GetFamily 3 1 3 6 3\nEPDFFontFaces_GetProgramDisplayHash 0 1 3 3 4\nEPDFFontFaces_GetProgramEmbedded 3 1 3 3\nEPDFFontFaces_GetProgramEmbeddingPermission 3 1 3 3\nEPDFFontFaces_GetProgramFormat 3 1 3 3\nEPDFFontFaces_GetProgramHash 0 1 3 3 4\nEPDFFontFaces_GetProgramMetrics 0 1 3 3 1 1\nEPDFFontFaces_GetProgramObjNum 3 1 3 3\nEPDFFontFaces_GetProgramPostScriptName 3 1 3 3 4 3\nEPDFFontFaces_GetWeight 3 1 3\nEPDFFontFaces_IsItalic 0 1 3\nEPDFFontFaces_Load 1 1\nEPDFFontFaces_ProgramMapsUnicode 0 1 3 3\nEPDFFontResolution_Close - 1\nEPDFFontResolution_CountMissingCharacters 3 1\nEPDFFontResolution_GetBaseFontName 3 1 3 4 3\nEPDFFontResolution_GetFallbacks 3 1 3 1 3\nEPDFFontResolution_GetFamily 3 1 3 6 3\nEPDFFontResolution_GetMissingCharacter 3 1 3 6 3\nEPDFFontResolution_GetProgramDisplayHash 0 1 3 4\nEPDFFontResolution_GetProgramObjNum 3 1 3\nEPDFFontResolution_GetRegisteredFont 3 1 3\nEPDFFontResolution_GetSource 3 1 3\nEPDFFontResolution_GetWeight 3 1 3\nEPDFFontResolution_IsDegraded 0 1 3\nEPDFFontResolution_IsItalic 0 1 3\nEPDFForm_AttachWidget 0 1 3 3 2 1 3\nEPDFForm_ClearFieldEmbedMetadata 0 1 3\nEPDFForm_ClearFieldEmbedMetadataKey 0 1 3 2\nEPDFForm_CloseModel - 1\nEPDFForm_CountCalculationOrder 3 1\nEPDFForm_CountFieldDefaultValues 3 1 3\nEPDFForm_CountFieldOptions 3 1 3\nEPDFForm_CountFields 3 1\nEPDFForm_CountFieldValues 3 1 3\nEPDFForm_CountFieldWidgets 3 1 3\nEPDFForm_CreateField 3 1 3 1 3\nEPDFForm_DeleteField 0 1 3 1 3 1\nEPDFForm_DetachWidget 0 1 3 3\nEPDFForm_ExportFDF 3 1 1 3 1 3\nEPDFForm_ExportFieldRawToOwnedBuffer 1 1 3 1\nEPDFForm_ExportXFDF 3 1 1 3 1 3\nEPDFForm_GetCalculationOrderFieldIndex 3 1 3\nEPDFForm_GetFieldActionModel 1 1 3 3\nEPDFForm_GetFieldAlternateName 3 1 3 6 3\nEPDFForm_GetFieldDefaultValueAt 3 1 3 3 6 3\nEPDFForm_GetFieldDefaultValueKind 3 1 3\nEPDFForm_GetFieldEmbedMetadataBoolean 0 1 3 2 1\nEPDFForm_GetFieldEmbedMetadataJSON 3 1 3 6 3\nEPDFForm_GetFieldEmbedMetadataNumber 0 1 3 2 1\nEPDFForm_GetFieldEmbedMetadataString 3 1 3 2 6 3\nEPDFForm_GetFieldFamily 3 1 3\nEPDFForm_GetFieldFlags 3 1 3\nEPDFForm_GetFieldIndexByObjNum 3 1 3\nEPDFForm_GetFieldIndexForWidget 3 1 3\nEPDFForm_GetFieldMappingName 3 1 3 6 3\nEPDFForm_GetFieldMaxLen 3 1 3\nEPDFForm_GetFieldName 3 1 3 6 3\nEPDFForm_GetFieldObjNum 3 1 3\nEPDFForm_GetFieldOptionLabel 3 1 3 3 6 3\nEPDFForm_GetFieldOptionValue 3 1 3 3 6 3\nEPDFForm_GetFieldOrigin 3 1 3\nEPDFForm_GetFieldPartialName 3 1 3 6 3\nEPDFForm_GetFieldTopIndex 3 1 3\nEPDFForm_GetFieldValueAt 3 1 3 3 6 3\nEPDFForm_GetFieldValueKind 3 1 3\nEPDFForm_GetFieldWidgetExportValue 3 1 3 3 6 3\nEPDFForm_GetFieldWidgetObjNum 3 1 3 3\nEPDFForm_GetFieldWidgetOnState 3 1 3 3 1 3\nEPDFForm_GetFieldWidgetPageObjNum 3 1 3 3\nEPDFForm_GetFieldWidgetRect 0 1 3 3 1\nEPDFForm_GetFormKind 3 1\nEPDFForm_GetNeedAppearances 0 1\nEPDFForm_HasFieldEmbedMetadata 0 1 3\nEPDFForm_HasFieldValuesList 0 1 3\nEPDFForm_ImportFieldRaw 0 1 1 3\nEPDFForm_IsFieldOptionSelected 0 1 3 3\nEPDFForm_IsFieldWidgetChecked 0 1 3 3\nEPDFForm_LoadModel 1 1\nEPDFForm_RedrawFieldWidgets 0 1 3 1 3 1\nEPDFForm_Repair 0 1 3 1\nEPDFForm_SetCalculationOrder 0 1 1 3\nEPDFForm_SetFieldAlternateName 0 1 3 1\nEPDFForm_SetFieldAppearanceText 0 1 3 1 1 3 1\nEPDFForm_SetFieldDefaultValue 0 1 3 3 6 3\nEPDFForm_SetFieldDisplay 0 1 3 3 1 3 1\nEPDFForm_SetFieldEmbedMetadataBoolean 0 1 3 2 0\nEPDFForm_SetFieldEmbedMetadataJSON 0 1 3 1\nEPDFForm_SetFieldEmbedMetadataNumber 0 1 3 2 5\nEPDFForm_SetFieldEmbedMetadataString 0 1 3 2 1\nEPDFForm_SetFieldEventAction 0 1 3 3 1\nEPDFForm_SetFieldFlags 0 1 3 3 3\nEPDFForm_SetFieldMappingName 0 1 3 1\nEPDFForm_SetFieldMaxLen 0 1 3 3\nEPDFForm_SetFieldName 0 1 3 1\nEPDFForm_SetFieldOptions 0 1 3 6 6 3\nEPDFForm_SetFieldSelectedIndices 0 1 3 1 3\nEPDFForm_SetFieldValue 0 1 3 3 6 3\nEPDFForm_SetFieldWidgetsChecked 0 1 3 1 3 1 3 1\nEPDFImageObj_SetJpeg 0 1 3 1 4 3\nEPDFImageObj_SetPng 0 1 3 1 4 3\nEPDFLayer_AbortTransaction 0 1\nEPDFLayer_BeginTransaction 0 1\nEPDFLayer_CommitTransaction 0 1\nEPDFLayer_GetBaseDocument 1 1\nEPDFLayer_GetBaseSha256 0 1 4\nEPDFLayer_GetBirthName 0 1 3 1 1\nEPDFLayer_GetBirthObjectNumber 3 1 3 3\nEPDFLayer_GetLastObjectNumber 3 1\nEPDFLayer_GetPromotedObjectCount 3 1\nEPDFLayer_IsInTransaction 0 1\nEPDFLayer_IsObjectPromoted 0 1 3\nEPDFLayer_IsPagePromoted 0 1 3\nEPDFLayer_OpenLayer 1 1 1 2 1\nEPDFLayer_OpenLayerArtifact 1 1 1 2 1\nEPDFLayer_OpenLayerArtifactFromPath 1 1 4 2 1\nEPDFLayer_RaiseLastObjectNumber 0 1 3\nEPDFLayer_SaveDelta 0 1 1 1\nEPDFLayer_SaveDeltaEx 0 1 1 1 1\nEPDFLayer_SaveDeltaToOwnedBuffer 1 1 1 1\nEPDFLayer_SaveDeltaToOwnedBufferEx 1 1 1 1 1\nEPDFLayer_SaveLayerArtifact 0 1 1 1\nEPDFLayer_SaveLayerArtifactEx 0 1 1 1 1\nEPDFLayer_SaveLayerArtifactToOwnedBuffer 1 1 1 1\nEPDFLayer_SaveLayerArtifactToOwnedBufferEx 1 1 1 1 1\nEPDFMeasure_AddFormat 1 1 3 1 5\nEPDFMeasure_CountFormats 3 1 3\nEPDFMeasure_GetCYX 0 1 1\nEPDFMeasure_GetFormat 1 1 3 3\nEPDFMeasure_GetOrigin 0 1 1\nEPDFMeasure_GetRatio 3 1 6 3\nEPDFMeasure_GetSubtype 3 1\nEPDFMeasure_RemoveFormats 0 1 3\nEPDFMeasure_SetCYX 0 1 1\nEPDFMeasure_SetOrigin 0 1 1\nEPDFMeasure_SetRatio 0 1 1\nEPDFNamedDest_Remove 0 1 2\nEPDFNamedDest_SetDest 0 1 2 1\nEPDFNumberFormat_GetConversion 0 1 1\nEPDFNumberFormat_GetFixedDenominator 0 1 1\nEPDFNumberFormat_GetFraction 0 1 1\nEPDFNumberFormat_GetLabelPosition 0 1 1\nEPDFNumberFormat_GetPrecision 0 1 1\nEPDFNumberFormat_GetText 3 1 3 6 3\nEPDFNumberFormat_GetUnit 3 1 6 3\nEPDFNumberFormat_SetConversion 0 1 5\nEPDFNumberFormat_SetFixedDenominator 0 1 0\nEPDFNumberFormat_SetFraction 0 1 3\nEPDFNumberFormat_SetLabelPosition 0 1 3\nEPDFNumberFormat_SetPrecision 0 1 3\nEPDFNumberFormat_SetText 0 1 3 1\nEPDFNumberFormat_SetUnit 0 1 1\nEPDFObjectDiff_Close - 1\nEPDFObjectDiff_GetCount 3 1\nEPDFObjectDiff_GetEntry 0 1 3 1 1 1 1 1 1\nEPDFObjectDiff_GetReadStatus 3 1 3 3\nEPDFObjectDiff_GetReferrer 3 1 3 3 3 1 4 3\nEPDFObjectDiff_GetReferrerCount 3 1 3 3\nEPDFObjectDiff_GetRevisionHealth 0 1 3 1 1 1\nEPDFObjectDiff_GetValue 3 1 3 3 4 3 1\nEPDFOutline_CreateItem 3 1 3 3 3 1\nEPDFOutline_DeleteItem 0 1 3\nEPDFOutline_ExportItemRawToOwnedBuffer 1 1 3 1\nEPDFOutline_GetItem 1 1 3\nEPDFOutline_GetObjectNumber 3 1\nEPDFOutline_ImportItemRaw 0 1 1 3\nEPDFOutline_MoveItem 0 1 3 3 3\nEPDFOutline_SetAction 0 1 3 1\nEPDFOutline_SetColor 0 1 3 0 5 5 5\nEPDFOutline_SetOpen 0 1 3 0\nEPDFOutline_SetStyle 0 1 3 3\nEPDFOutline_SetTitle 0 1 3 1\nEPDFPage_AddViewport 1 1 1\nEPDFPage_AddViewportRaw 1 1 3 1\nEPDFPage_ApplyRedactions 0 1 1 3 1\nEPDFPage_ContinueLoad 3 1 3\nEPDFPage_CountViewports 3 1\nEPDFPage_CountViewportsRaw 3 1 3\nEPDFPage_CreateAnnot 1 1 3\nEPDFPage_CreateAnnotRaw 1 1 3 3 3\nEPDFPage_ExportAnnotationsAsDocument 1 1 1 3\nEPDFPage_ExportAnnotsRawToOwnedBuffer 1 1 3 1 3 1\nEPDFPage_ExportRawToOwnedBuffer 1 1 3 1\nEPDFPage_FindViewport 3 1 1\nEPDFPage_Flatten 3 1 3\nEPDFPage_FlattenAnnotations 3 1 1 3 3 1\nEPDFPage_GetAnnotByName 1 1 1\nEPDFPage_GetAnnotByObjectNumber 1 1 3\nEPDFPage_GetAnnotCountRaw 3 1 3\nEPDFPage_GetAnnotIndexByNameRaw 3 1 3 1\nEPDFPage_GetAnnotIndexByObjectNumberRaw 3 1 3 3\nEPDFPage_GetAnnotRaw 1 1 3 3\nEPDFPage_GetObjectNumber 3 1\nEPDFPage_GetParsedSize 0 1 1\nEPDFPage_GetViewport 1 1 3\nEPDFPage_GetViewportRaw 1 1 3 3\nEPDFPage_ImportAnnotsRaw 0 1 3 1 3\nEPDFPage_ImportRaw 0 1 1 3\nEPDFPage_InsertBlankRaw 0 1 3 8 8 3\nEPDFPage_IsContentCurrent 0 1\nEPDFPage_IsValid 0 1\nEPDFPage_MoveAnnots 0 1 1 3 3\nEPDFPage_MoveAnnotsRaw 0 1 3 1 3 3\nEPDFPage_PromoteInlineAnnotsRaw 3 1 3\nEPDFPage_RemoveAnnot 0 1 3\nEPDFPage_RemoveAnnotByName 0 1 1\nEPDFPage_RemoveAnnotByObjectNumber 0 1 3\nEPDFPage_RemoveAnnotRaw 0 1 3 3\nEPDFPage_RemoveViewport 0 1 3\nEPDFPage_RemoveViewportRaw 0 1 3 3\nEPDFPage_ResetRenderCache 0 1\nEPDFSig_CloseModel - 1\nEPDFSig_Count 3 1\nEPDFSig_DigestByteRange 0 1 1 3 4 1\nEPDFSig_DigestFileRange 0 1 1 3 4 1\nEPDFSig_GetByteRange 0 1 3 1\nEPDFSig_GetContents 3 1 3 1 3\nEPDFSig_GetCoverage 3 1 3\nEPDFSig_GetDocMDPPermission 3 1 3\nEPDFSig_GetFieldMDPAction 3 1 3\nEPDFSig_GetFieldName 3 1 3 6 3\nEPDFSig_GetFieldNameAt 3 1 3 3 3 6 3\nEPDFSig_GetFieldNameCount 3 1 3 3\nEPDFSig_GetFieldObjNum 3 1 3\nEPDFSig_GetIndexByFieldObjNum 3 1 3\nEPDFSig_GetKind 3 1 3\nEPDFSig_GetLockAction 3 1 3\nEPDFSig_GetLockPermission 3 1 3\nEPDFSig_GetRevisionIndex 3 1 3\nEPDFSig_GetSeedValueFilter 3 1 3 6 3\nEPDFSig_GetSeedValueListAt 3 1 3 3 3 6 3\nEPDFSig_GetSeedValueListCount 3 1 3 3\nEPDFSig_GetSeedValueMDP 3 1 3\nEPDFSig_GetSeedValuePresentFlags 3 1 3\nEPDFSig_GetSeedValueRequiredFlags 3 1 3\nEPDFSig_GetSeedValueVersion 3 1 3\nEPDFSig_GetString 3 1 3 3 6 3\nEPDFSig_GetValueObjNum 3 1 3\nEPDFSig_GetWidgetObjNum 3 1 3\nEPDFSig_GetWidgetPageObjNum 3 1 3\nEPDFSig_HasSeedValue 0 1 3\nEPDFSig_IsCatalogCertification 0 1 3\nEPDFSig_IsRevisionChainValid 0 1\nEPDFSig_IsSigned 0 1 3\nEPDFSig_LoadModel 1 1\nEPDFSig_Prepare 3 1 3 1\nEPDFSig_SaveCandidate 0 1 3 1 1 1 1\nEPDFSig_SaveCandidateToOwnedBuffer 1 1 3 1 1 1\nEPDFSig_Seal 0 4 7 7 7 3 1 1 1 4 1\nEPDFSig_SealSpan 0 4 7 7 7 1 1 1\nEPDFSig_SetFieldLock 0 1 3 3 6 3 3\nEPDFSig_WriteContents 0 4 7 7 7 4 3\nEPDFText_GetCharGeometry 0 1 3 1\nEPDFText_GetCharToTextMap 3 1 1 3\nEPDFText_GetPageGeometry 3 1 3 3 1\nEPDFText_GetTextFull 3 1 1 3\nEPDFText_RedactInQuads 0 1 1 3 0 0\nEPDFText_RedactInRect 0 1 1 0 0\nEPDFViewport_AddMeasure 1 1\nEPDFViewport_Close - 1\nEPDFViewport_GetBBox 0 1 1\nEPDFViewport_GetMeasure 1 1\nEPDFViewport_GetName 3 1 6 3\nEPDFViewport_RemoveMeasure 0 1\nEPDFViewport_SetBBox 0 1 1\nEPDFViewport_SetName 0 1 1\nFORM_CanRedo 0 1 1\nFORM_CanUndo 0 1 1\nFORM_DoDocumentAAction - 1 3\nFORM_DoDocumentJSAction - 1\nFORM_DoDocumentOpenAction - 1\nFORM_DoPageAAction - 1 1 3\nFORM_ForceToKillFocus 0 1\nFORM_GetFocusedAnnot 0 1 1 1\nFORM_GetFocusedText 3 1 1 1 3\nFORM_GetSelectedText 3 1 1 1 3\nFORM_GetTextDirection 3 1 1\nFORM_IsIndexSelected 0 1 1 3\nFORM_OnAfterLoadPage - 1 1\nFORM_OnBeforeClosePage - 1 1\nFORM_OnChar 0 1 1 3 3\nFORM_OnFocus 0 1 1 3 8 8\nFORM_OnKeyDown 0 1 1 3 3\nFORM_OnKeyUp 0 1 1 3 3\nFORM_OnLButtonDoubleClick 0 1 1 3 8 8\nFORM_OnLButtonDown 0 1 1 3 8 8\nFORM_OnLButtonUp 0 1 1 3 8 8\nFORM_OnMouseMove 0 1 1 3 8 8\nFORM_OnMouseWheel 0 1 1 3 1 3 3\nFORM_OnRButtonDown 0 1 1 3 8 8\nFORM_OnRButtonUp 0 1 1 3 8 8\nFORM_Redo 0 1 1\nFORM_ReplaceAndKeepSelection - 1 1 1\nFORM_ReplaceSelection - 1 1 1\nFORM_SelectAllText 0 1 1\nFORM_SetFocusedAnnot 0 1 1\nFORM_SetIndexSelected 0 1 1 3 0\nFORM_SetTextDirection 0 1 1 3\nFORM_Undo 0 1 1\nFPDF_AddInstalledFont - 1 4 3\nFPDF_CloseDocument - 1\nFPDF_ClosePage - 1\nFPDF_CloseXObject - 1\nFPDF_CopyViewerPreferences 0 1 1\nFPDF_CountNamedDests 3 1\nFPDF_CreateClipPath 1 5 5 5 5\nFPDF_CreateNewDocument 1\nFPDF_DestroyClipPath - 1\nFPDF_DestroyLibrary -\nFPDF_DeviceToPage 0 1 3 3 3 3 3 3 3 1 1\nFPDF_DocumentHasValidCrossReferenceTable 0 1\nFPDF_FFLDraw - 1 1 1 3 3 3 3 3 3\nFPDF_FreeDefaultSystemFontInfo - 1\nFPDF_GetDefaultSystemFontInfo 1\nFPDF_GetDefaultTTFMap 1\nFPDF_GetDefaultTTFMapCount 3\nFPDF_GetDefaultTTFMapEntry 1 3\nFPDF_GetDocPermissions 3 1\nFPDF_GetDocUserPermissions 3 1\nFPDF_GetFileIdentifier 3 1 3 1 3\nFPDF_GetFileVersion 0 1 1\nFPDF_GetFormType 3 1\nFPDF_GetLastError 3\nFPDF_GetMetaText 3 1 2 1 3\nFPDF_GetNamedDest 1 1 3 1 1\nFPDF_GetNamedDestByName 1 1 2\nFPDF_GetPageAAction 1 1 3\nFPDF_GetPageBoundingBox 0 1 1\nFPDF_GetPageCount 3 1\nFPDF_GetPageHeight 8 1\nFPDF_GetPageHeightF 5 1\nFPDF_GetPageLabel 3 1 3 1 3\nFPDF_GetPageSizeByIndex 3 1 3 1 1\nFPDF_GetPageSizeByIndexF 0 1 3 1\nFPDF_GetPageWidth 8 1\nFPDF_GetPageWidthF 5 1\nFPDF_GetSecurityHandlerRevision 3 1\nFPDF_GetSignatureCount 3 1\nFPDF_GetSignatureObject 1 1 3\nFPDF_GetTrailerEnds 3 1 1 3\nFPDF_GetXFAPacketContent 0 1 3 1 3 1\nFPDF_GetXFAPacketCount 3 1\nFPDF_GetXFAPacketName 3 1 3 1 3\nFPDF_ImportNPagesToOne 1 1 5 5 3 3\nFPDF_ImportPages 0 1 1 2 3\nFPDF_ImportPagesByIndex 0 1 1 1 3 3\nFPDF_InitLibrary -\nFPDF_InitLibraryWithConfig - 1\nFPDF_LoadCustomDocument 1 1 2\nFPDF_LoadDocument 1 4 2\nFPDF_LoadMemDocument 1 1 3 2\nFPDF_LoadMemDocument64 1 1 3 2\nFPDF_LoadPage 1 1 3\nFPDF_LoadXFA 0 1\nFPDF_MovePages 0 1 1 3 3\nFPDF_NewFormObjectFromXObject 1 1\nFPDF_NewXObjectFromPage 1 1 1 3\nFPDF_PageToDevice 0 1 3 3 3 3 3 8 8 1 1\nFPDF_RemoveFormFieldHighlight - 1\nFPDF_RenderPage_Close - 1\nFPDF_RenderPage_Continue 3 1 1\nFPDF_RenderPageBitmap - 1 1 3 3 3 3 3 3\nFPDF_RenderPageBitmap_Start 3 1 1 3 3 3 3 3 3 1\nFPDF_RenderPageBitmapWithColorScheme_Start 3 1 1 3 3 3 3 3 3 1 1\nFPDF_RenderPageBitmapWithMatrix - 1 1 1 1 3\nFPDF_SaveAsCopy 0 1 1 3\nFPDF_SaveWithVersion 0 1 1 3 3\nFPDF_SetFormFieldHighlightAlpha - 1 3\nFPDF_SetFormFieldHighlightColor - 1 3 3\nFPDF_SetSandBoxPolicy - 3 0\nFPDF_SetSystemFontInfo - 1\nFPDF_StructElement_Attr_CountChildren 3 1\nFPDF_StructElement_Attr_GetBlobValue 0 1 1 3 1\nFPDF_StructElement_Attr_GetBooleanValue 0 1 1\nFPDF_StructElement_Attr_GetChildAtIndex 1 1 3\nFPDF_StructElement_Attr_GetCount 3 1\nFPDF_StructElement_Attr_GetName 0 1 3 1 3 1\nFPDF_StructElement_Attr_GetNumberValue 0 1 1\nFPDF_StructElement_Attr_GetStringValue 0 1 1 3 1\nFPDF_StructElement_Attr_GetType 3 1\nFPDF_StructElement_Attr_GetValue 1 1 2\nFPDF_StructElement_CountChildren 3 1\nFPDF_StructElement_GetActualText 3 1 1 3\nFPDF_StructElement_GetAltText 3 1 1 3\nFPDF_StructElement_GetAttributeAtIndex 1 1 3\nFPDF_StructElement_GetAttributeCount 3 1\nFPDF_StructElement_GetChildAtIndex 1 1 3\nFPDF_StructElement_GetChildMarkedContentID 3 1 3\nFPDF_StructElement_GetExpansion 3 1 1 3\nFPDF_StructElement_GetID 3 1 1 3\nFPDF_StructElement_GetLang 3 1 1 3\nFPDF_StructElement_GetMarkedContentID 3 1\nFPDF_StructElement_GetMarkedContentIdAtIndex 3 1 3\nFPDF_StructElement_GetMarkedContentIdCount 3 1\nFPDF_StructElement_GetObjType 3 1 1 3\nFPDF_StructElement_GetParent 1 1\nFPDF_StructElement_GetRawType 3 1 6 3\nFPDF_StructElement_GetStringAttribute 3 1 2 1 3\nFPDF_StructElement_GetTitle 3 1 1 3\nFPDF_StructElement_GetType 3 1 1 3\nFPDF_StructTree_Close - 1\nFPDF_StructTree_CountChildren 3 1\nFPDF_StructTree_GetChildAtIndex 1 1 3\nFPDF_StructTree_GetForPage 1 1\nFPDF_VIEWERREF_GetDuplex 3 1\nFPDF_VIEWERREF_GetName 3 1 2 4 3\nFPDF_VIEWERREF_GetNumCopies 3 1\nFPDF_VIEWERREF_GetPrintPageRange 1 1\nFPDF_VIEWERREF_GetPrintPageRangeCount 3 1\nFPDF_VIEWERREF_GetPrintPageRangeElement 3 1 3\nFPDF_VIEWERREF_GetPrintScaling 0 1\nFPDFAction_GetDest 1 1 1\nFPDFAction_GetFilePath 3 1 1 3\nFPDFAction_GetType 3 1\nFPDFAction_GetURIPath 3 1 1 1 3\nFPDFAnnot_AddFileAttachment 1 1 1\nFPDFAnnot_AddInkStroke 3 1 1 3\nFPDFAnnot_AppendAttachmentPoints 0 1 1\nFPDFAnnot_AppendObject 0 1 1\nFPDFAnnot_CountAttachmentPoints 3 1\nFPDFAnnot_GetAP 3 1 3 6 3\nFPDFAnnot_GetAttachmentPoints 0 1 3 1\nFPDFAnnot_GetBorder 0 1 1 1 1\nFPDFAnnot_GetColor 0 1 3 1 1 1 1\nFPDFAnnot_GetFileAttachment 1 1\nFPDFAnnot_GetFlags 3 1\nFPDFAnnot_GetFocusableSubtypes 0 1 1 3\nFPDFAnnot_GetFocusableSubtypesCount 3 1\nFPDFAnnot_GetFontColor 0 1 1 1 1 1\nFPDFAnnot_GetFontSize 0 1 1 1\nFPDFAnnot_GetFormAdditionalActionJavaScript 3 1 1 3 6 3\nFPDFAnnot_GetFormControlCount 3 1 1\nFPDFAnnot_GetFormControlIndex 3 1 1\nFPDFAnnot_GetFormFieldAlternateName 3 1 1 6 3\nFPDFAnnot_GetFormFieldAtPoint 1 1 1 1\nFPDFAnnot_GetFormFieldExportValue 3 1 1 6 3\nFPDFAnnot_GetFormFieldFlags 3 1 1\nFPDFAnnot_GetFormFieldName 3 1 1 6 3\nFPDFAnnot_GetFormFieldType 3 1 1\nFPDFAnnot_GetFormFieldValue 3 1 1 6 3\nFPDFAnnot_GetInkListCount 3 1\nFPDFAnnot_GetInkListPath 3 1 3 1 3\nFPDFAnnot_GetLine 0 1 1 1\nFPDFAnnot_GetLink 1 1\nFPDFAnnot_GetLinkedAnnot 1 1 2\nFPDFAnnot_GetNumberValue 0 1 2 1\nFPDFAnnot_GetObject 1 1 3\nFPDFAnnot_GetObjectCount 3 1\nFPDFAnnot_GetOptionCount 3 1 1\nFPDFAnnot_GetOptionLabel 3 1 1 3 6 3\nFPDFAnnot_GetRect 0 1 1\nFPDFAnnot_GetStringValue 3 1 2 6 3\nFPDFAnnot_GetSubtype 3 1\nFPDFAnnot_GetValueType 3 1 2\nFPDFAnnot_GetVertices 3 1 1 3\nFPDFAnnot_HasAttachmentPoints 0 1\nFPDFAnnot_HasKey 0 1 2\nFPDFAnnot_IsChecked 0 1 1\nFPDFAnnot_IsObjectSupportedSubtype 0 3\nFPDFAnnot_IsOptionSelected 0 1 1 3\nFPDFAnnot_IsSupportedSubtype 0 3\nFPDFAnnot_RemoveInkList 0 1\nFPDFAnnot_RemoveObject 0 1 3\nFPDFAnnot_SetAP 0 1 3 1\nFPDFAnnot_SetAttachmentPoints 0 1 3 1\nFPDFAnnot_SetBorder 0 1 5 5 5\nFPDFAnnot_SetColor 0 1 3 3 3 3 3\nFPDFAnnot_SetFlags 0 1 3\nFPDFAnnot_SetFocusableSubtypes 0 1 1 3\nFPDFAnnot_SetFontColor 0 1 1 3 3 3\nFPDFAnnot_SetFormFieldFlags 0 1 1 3\nFPDFAnnot_SetRect 0 1 1\nFPDFAnnot_SetStringValue 0 1 2 1\nFPDFAnnot_SetURI 0 1 4\nFPDFAnnot_UpdateObject 0 1 1\nFPDFAttachment_GetAFRelationship 3 1 6 3\nFPDFAttachment_GetDescription 3 1 6 3\nFPDFAttachment_GetFile 0 1 1 3 1\nFPDFAttachment_GetName 3 1 6 3\nFPDFAttachment_GetStringValue 3 1 2 6 3\nFPDFAttachment_GetSubtype 3 1 6 3\nFPDFAttachment_GetValueType 3 1 2\nFPDFAttachment_HasKey 0 1 2\nFPDFAttachment_SetDescription 0 1 1\nFPDFAttachment_SetFile 0 1 1 1 3\nFPDFAttachment_SetStringValue 0 1 2 1\nFPDFAvail_Create 1 1 1\nFPDFAvail_Destroy - 1\nFPDFAvail_GetDocument 1 1 2\nFPDFAvail_GetFirstPageNum 3 1\nFPDFAvail_IsDocAvail 3 1 1\nFPDFAvail_IsFormAvail 3 1 1\nFPDFAvail_IsLinearized 3 1\nFPDFAvail_IsPageAvail 3 1 3 1\nFPDFBitmap_Create 1 3 3 3\nFPDFBitmap_CreateEx 1 3 3 3 1 3\nFPDFBitmap_Destroy - 1\nFPDFBitmap_FillRect 0 1 3 3 3 3 3\nFPDFBitmap_GetBuffer 1 1\nFPDFBitmap_GetFormat 3 1\nFPDFBitmap_GetHeight 3 1\nFPDFBitmap_GetStride 3 1\nFPDFBitmap_GetWidth 3 1\nFPDFBookmark_Find 1 1 1\nFPDFBookmark_GetAction 1 1\nFPDFBookmark_GetColor 0 1 1 1 1\nFPDFBookmark_GetCount 3 1\nFPDFBookmark_GetDest 1 1 1\nFPDFBookmark_GetFirstChild 1 1 1\nFPDFBookmark_GetNextSibling 1 1 1\nFPDFBookmark_GetStyle 3 1\nFPDFBookmark_GetTitle 3 1 1 3\nFPDFCatalog_GetLanguage 3 1 6 3\nFPDFCatalog_IsTagged 0 1\nFPDFCatalog_SetLanguage 0 1 1\nFPDFClipPath_CountPaths 3 1\nFPDFClipPath_CountPathSegments 3 1 3\nFPDFClipPath_GetPathSegment 1 1 3 3\nFPDFDest_GetDestPageIndex 3 1 1\nFPDFDest_GetLocationInPage 0 1 1 1 1 1 1 1\nFPDFDest_GetView 3 1 1 1\nFPDFDoc_AddAttachment 1 1 1\nFPDFDoc_CloseJavaScriptAction - 1\nFPDFDoc_DeleteAttachment 0 1 3\nFPDFDOC_ExitFormFillEnvironment - 1\nFPDFDoc_GetAttachment 1 1 3\nFPDFDoc_GetAttachmentCount 3 1\nFPDFDoc_GetJavaScriptAction 1 1 3\nFPDFDoc_GetJavaScriptActionCount 3 1\nFPDFDoc_GetPageMode 3 1\nFPDFDOC_InitFormFillEnvironment 1 1 1\nFPDFFont_Close - 1\nFPDFFont_GetAscent 0 1 5 1\nFPDFFont_GetBaseFontName 3 1 4 3\nFPDFFont_GetDescent 0 1 5 1\nFPDFFont_GetFamilyName 3 1 4 3\nFPDFFont_GetFlags 3 1\nFPDFFont_GetFontData 0 1 4 3 1\nFPDFFont_GetGlyphPath 1 1 3 5\nFPDFFont_GetGlyphWidth 0 1 3 5 1\nFPDFFont_GetIsEmbedded 3 1\nFPDFFont_GetItalicAngle 0 1 1\nFPDFFont_GetWeight 3 1\nFPDFFormObj_CountObjects 3 1\nFPDFFormObj_GetObject 1 1 3\nFPDFFormObj_RemoveObject 0 1 1\nFPDFGlyphPath_CountGlyphSegments 3 1\nFPDFGlyphPath_GetGlyphPathSegment 1 1 3\nFPDFImageObj_GetBitmap 1 1\nFPDFImageObj_GetIccProfileDataDecoded 0 1 1 4 3 1\nFPDFImageObj_GetImageDataDecoded 3 1 1 3\nFPDFImageObj_GetImageDataRaw 3 1 1 3\nFPDFImageObj_GetImageFilter 3 1 3 1 3\nFPDFImageObj_GetImageFilterCount 3 1\nFPDFImageObj_GetImageMetadata 0 1 1 1\nFPDFImageObj_GetImagePixelSize 0 1 1 1\nFPDFImageObj_GetRenderedBitmap 1 1 1 1\nFPDFImageObj_LoadJpegFile 0 1 3 1 1\nFPDFImageObj_LoadJpegFileInline 0 1 3 1 1\nFPDFImageObj_SetBitmap 0 1 3 1 1\nFPDFImageObj_SetMatrix 0 1 8 8 8 8 8 8\nFPDFJavaScriptAction_GetName 3 1 6 3\nFPDFJavaScriptAction_GetScript 3 1 6 3\nFPDFLink_CloseWebLinks - 1\nFPDFLink_CountQuadPoints 3 1\nFPDFLink_CountRects 3 1 3\nFPDFLink_CountWebLinks 3 1\nFPDFLink_Enumerate 0 1 1 1\nFPDFLink_GetAction 1 1\nFPDFLink_GetAnnot 1 1 1\nFPDFLink_GetAnnotRect 0 1 1\nFPDFLink_GetDest 1 1 1\nFPDFLink_GetLinkAtPoint 1 1 8 8\nFPDFLink_GetLinkZOrderAtPoint 3 1 8 8\nFPDFLink_GetQuadPoints 0 1 3 1\nFPDFLink_GetRect 0 1 3 3 1 1 1 1\nFPDFLink_GetTextRange 0 1 3 1 1\nFPDFLink_GetURL 3 1 3 1 3\nFPDFLink_LoadWebLinks 1 1\nFPDFPage_CloseAnnot - 1\nFPDFPage_CountObjects 3 1\nFPDFPage_CreateAnnot 1 1 3\nFPDFPage_Delete - 1 3\nFPDFPage_Flatten 3 1 3\nFPDFPage_FormFieldZOrderAtPoint 3 1 1 8 8\nFPDFPage_GenerateContent 0 1\nFPDFPage_GetAnnot 1 1 3\nFPDFPage_GetAnnotCount 3 1\nFPDFPage_GetAnnotIndex 3 1 1\nFPDFPage_GetArtBox 0 1 1 1 1 1\nFPDFPage_GetBleedBox 0 1 1 1 1 1\nFPDFPage_GetCropBox 0 1 1 1 1 1\nFPDFPage_GetDecodedThumbnailData 3 1 1 3\nFPDFPage_GetMediaBox 0 1 1 1 1 1\nFPDFPage_GetObject 1 1 3\nFPDFPage_GetRawThumbnailData 3 1 1 3\nFPDFPage_GetRotation 3 1\nFPDFPage_GetThumbnailAsBitmap 1 1\nFPDFPage_GetTrimBox 0 1 1 1 1 1\nFPDFPage_HasFormFieldAtPoint 3 1 1 8 8\nFPDFPage_HasTransparency 0 1\nFPDFPage_InsertClipPath - 1 1\nFPDFPage_InsertObject 0 1 1\nFPDFPage_InsertObjectAtIndex 0 1 1 3\nFPDFPage_New 1 1 3 8 8\nFPDFPage_RemoveAnnot 0 1 3\nFPDFPage_RemoveObject 0 1 1\nFPDFPage_SetArtBox - 1 5 5 5 5\nFPDFPage_SetBleedBox - 1 5 5 5 5\nFPDFPage_SetCropBox - 1 5 5 5 5\nFPDFPage_SetMediaBox - 1 5 5 5 5\nFPDFPage_SetRotation - 1 3\nFPDFPage_SetTrimBox - 1 5 5 5 5\nFPDFPage_TransformAnnots - 1 8 8 8 8 8 8\nFPDFPage_TransFormWithClip 0 1 1 1\nFPDFPageObj_AddExistingMark 0 1 1\nFPDFPageObj_AddMark 1 1 2\nFPDFPageObj_CountMarks 3 1\nFPDFPageObj_CreateNewPath 1 5 5\nFPDFPageObj_CreateNewRect 1 5 5 5 5\nFPDFPageObj_CreateTextObj 1 1 1 5\nFPDFPageObj_Destroy - 1\nFPDFPageObj_GetBounds 0 1 1 1 1 1\nFPDFPageObj_GetClipPath 1 1\nFPDFPageObj_GetDashArray 0 1 1 3\nFPDFPageObj_GetDashCount 3 1\nFPDFPageObj_GetDashPhase 0 1 1\nFPDFPageObj_GetFillColor 0 1 1 1 1 1\nFPDFPageObj_GetIsActive 0 1 1\nFPDFPageObj_GetLineCap 3 1\nFPDFPageObj_GetLineJoin 3 1\nFPDFPageObj_GetMark 1 1 3\nFPDFPageObj_GetMarkedContentID 3 1\nFPDFPageObj_GetMatrix 0 1 1\nFPDFPageObj_GetRenderedFillPattern 1 1 1\nFPDFPageObj_GetRenderedStrokePattern 1 1 1\nFPDFPageObj_GetRotatedBounds 0 1 1\nFPDFPageObj_GetStrokeColor 0 1 1 1 1 1\nFPDFPageObj_GetStrokeWidth 0 1 1\nFPDFPageObj_GetType 3 1\nFPDFPageObj_HasTransparency 0 1\nFPDFPageObj_NewImageObj 1 1\nFPDFPageObj_NewTextObj 1 1 2 5\nFPDFPageObj_RemoveMark 0 1 1\nFPDFPageObj_SetBlendMode - 1 2\nFPDFPageObj_SetDashArray 0 1 1 3 5\nFPDFPageObj_SetDashPhase 0 1 5\nFPDFPageObj_SetFillColor 0 1 3 3 3 3\nFPDFPageObj_SetIsActive 0 1 0\nFPDFPageObj_SetLineCap 0 1 3\nFPDFPageObj_SetLineJoin 0 1 3\nFPDFPageObj_SetMatrix 0 1 1\nFPDFPageObj_SetStrokeColor 0 1 3 3 3 3\nFPDFPageObj_SetStrokeWidth 0 1 5\nFPDFPageObj_Transform - 1 8 8 8 8 8 8\nFPDFPageObj_TransformClipPath - 1 8 8 8 8 8 8\nFPDFPageObj_TransformF 0 1 1\nFPDFPageObjMark_CountParams 3 1\nFPDFPageObjMark_GetName 0 1 6 3 1\nFPDFPageObjMark_GetParamBlobValue 0 1 2 4 3 1\nFPDFPageObjMark_GetParamFloatValue 0 1 2 1\nFPDFPageObjMark_GetParamIntValue 0 1 2 1\nFPDFPageObjMark_GetParamKey 0 1 3 6 3 1\nFPDFPageObjMark_GetParamStringValue 0 1 2 6 3 1\nFPDFPageObjMark_GetParamValueType 3 1 2\nFPDFPageObjMark_RemoveParam 0 1 1 2\nFPDFPageObjMark_SetBlobParam 0 1 1 1 2 4 3\nFPDFPageObjMark_SetFloatParam 0 1 1 1 2 5\nFPDFPageObjMark_SetIntParam 0 1 1 1 2 3\nFPDFPageObjMark_SetStringParam 0 1 1 1 2 2\nFPDFPath_BezierTo 0 1 5 5 5 5 5 5\nFPDFPath_Close 0 1\nFPDFPath_CountSegments 3 1\nFPDFPath_GetBezierControlPoints 0 1 3 1 1\nFPDFPath_GetDrawMode 0 1 1 1\nFPDFPath_GetPathSegment 1 1 3\nFPDFPath_LineTo 0 1 5 5\nFPDFPath_MoveTo 0 1 5 5\nFPDFPath_SetDrawMode 0 1 3 0\nFPDFPathSegment_GetClose 0 1\nFPDFPathSegment_GetPoint 0 1 1 1\nFPDFPathSegment_GetType 3 1\nFPDFSignatureObj_GetByteRange 3 1 1 3\nFPDFSignatureObj_GetContents 3 1 1 3\nFPDFSignatureObj_GetDocMDPPermission 3 1\nFPDFSignatureObj_GetReason 3 1 1 3\nFPDFSignatureObj_GetSubFilter 3 1 4 3\nFPDFSignatureObj_GetTime 3 1 4 3\nFPDFText_ClosePage - 1\nFPDFText_CountChars 3 1\nFPDFText_CountRects 3 1 3 3\nFPDFText_FindClose - 1\nFPDFText_FindNext 0 1\nFPDFText_FindPrev 0 1\nFPDFText_FindStart 1 1 1 3 3\nFPDFText_GetBoundedText 3 1 8 8 8 8 1 3\nFPDFText_GetCharAngle 5 1 3\nFPDFText_GetCharBox 0 1 3 1 1 1 1\nFPDFText_GetCharIndexAtPos 3 1 8 8 8 8\nFPDFText_GetCharIndexFromTextIndex 3 1 3\nFPDFText_GetCharOrigin 0 1 3 1 1\nFPDFText_GetFillColor 0 1 3 1 1 1 1\nFPDFText_GetFontInfo 3 1 3 1 3 1\nFPDFText_GetFontSize 8 1 3\nFPDFText_GetFontWeight 3 1 3\nFPDFText_GetLooseCharBox 0 1 3 1\nFPDFText_GetMatrix 0 1 3 1\nFPDFText_GetRect 0 1 3 1 1 1 1\nFPDFText_GetSchCount 3 1\nFPDFText_GetSchResultIndex 3 1\nFPDFText_GetStrokeColor 0 1 3 1 1 1 1\nFPDFText_GetText 3 1 3 3 1\nFPDFText_GetTextIndexFromCharIndex 3 1 3\nFPDFText_GetTextObject 1 1 3\nFPDFText_GetUnicode 3 1 3\nFPDFText_HasUnicodeMapError 3 1 3\nFPDFText_IsGenerated 3 1 3\nFPDFText_IsHyphen 3 1 3\nFPDFText_LoadCidType2Font 1 1 4 3 2 4 3\nFPDFText_LoadFont 1 1 4 3 3 0\nFPDFText_LoadPage 1 1\nFPDFText_LoadStandardFont 1 1 2\nFPDFText_SetCharcodes 0 1 1 3\nFPDFText_SetPositions 0 1 1 3\nFPDFText_SetText 0 1 1\nFPDFTextObj_GetFont 1 1\nFPDFTextObj_GetFontSize 0 1 1\nFPDFTextObj_GetRenderedBitmap 1 1 1 1 5\nFPDFTextObj_GetText 3 1 1 6 3\nFPDFTextObj_GetTextRenderMode 3 1\nFPDFTextObj_SetFontSize 0 1 5\nFPDFTextObj_SetTextRenderMode 0 1 3\n`);function aR(e){return BigInt("number"==typeof e?e>>>0:e)}function aT(e){return Number(e)}function aB(e){switch(e){case"i8":return"i8";case"i16":return"i16";case"i32":return"i32";case"i64":return"i64";case"f32":return"float";case"f64":return"double";case"ptr":return"*"}}async function aL(e={}){let t,n,r=await Promise.resolve().then(()=>(x(),k)),i=r.default??r,o=await i((t={...e.wasm??{}},void 0!==e.wasmBinary&&void 0===t.wasmBinary&&(t.wasmBinary=e.wasmBinary instanceof Uint8Array?e.wasmBinary:new Uint8Array(e.wasmBinary)),void 0!==(n=e.wasmUrl)&&void 0===t.locateFile&&(t.locateFile=(e,t)=>e.endsWith(".wasm")?n:t+e),void 0!==t.wasmBinary&&void 0===t.locateFile&&(t.locateFile=(e,t)=>e.endsWith(".wasm")?e:t+e),t)),a=function(e){let t=e._malloc??e.wasmExports?.malloc,n=e._free??e.wasmExports?.free;if(!t||!n)throw Error("WASM runtime does not expose malloc/free");return{alloc:e=>aR(t(e)),free(e){n(aT(e))},readBytes:(t,n)=>e.HEAPU8.slice(aT(t),aT(t)+n),writeBytes(t,n){e.HEAPU8.set(n,aT(t))},readU8String:t=>e.UTF8ToString?.(aT(t))??"",writeU8String(n){let r=new TextEncoder().encode(`${n}\\0`),i=aR(t(r.length));return e.HEAPU8.set(r,aT(i)),i},readU16String:t=>e.UTF16ToString?.(aT(t))??"",writeU16String(n){let r=(n.length+1)*2,i=aR(t(r));return e.stringToUTF16?.(n,aT(i),r),i},peek(t,n,r=0){let i=e.getValue?.(aT(t)+r,aB(n))??0;return"ptr"===n?aR(i):i},poke(t,n,r,i=0){let o="ptr"===n&&"bigint"==typeof r?Number(r):r;e.setValue?.(aT(t)+i,o,aB(n))}}}(o),s={register(e,t){if(!o.addFunction)throw Error("WASM runtime does not expose addFunction");return BigInt(o.addFunction(t,e))},dispose(e){o.removeFunction?.(aT(e))}};return{kind:"wasm",platform:"wasm32",mem:a,cb:s,fileAccess:{fromMemory(e){let t=e instanceof Uint8Array?e:new Uint8Array(e);if(t.byteLength>0xffffffff)throw RangeError("FPDF_FILEACCESS on wasm supports files up to 4 GiB");let n=a.alloc(12),r=null,i=!1;try{return r=s.register("iiiii",(e,n,r,i)=>{let o=Number(n),s=Number(i);return!Number.isSafeInteger(o)||!Number.isSafeInteger(s)||o<0||s<0||o+s>t.byteLength?0:(a.writeBytes(aR(r),t.subarray(o,o+s)),1)}),a.poke(n,"i32",t.byteLength,0),a.poke(n,"i32",aT(r),4),a.poke(n,"i32",0,8),{ptr:n,close(){i||(i=!0,s.dispose(r),a.free(n))}}}catch(e){throw r&&s.dispose(r),a.free(n),e}},fromNodeFile(){throw Error("fromNodeFile() is only available on the native Node runtime")},readRange(){throw Error("readRange() is only available on the native Node runtime")},sizeOf(){throw Error("sizeOf() is only available on the native Node runtime")}},fileWrite:{toNodeFile(){throw Error("toNodeFile() is only available on the native Node runtime")},writeRange(){throw Error("writeRange() is only available on the native Node runtime")},appendBytes(){throw Error("appendBytes() is only available on the native Node runtime")},removeFile(){throw Error("removeFile() is only available on the native Node runtime")}},fn:function(e){let t={};for(let[n,r]of Object.entries(aM)){let i=r.params.some(e=>"i64"===e.wasm.kind),o=e=>(...t)=>{let n=t.map((e,t)=>{var n;return n=r.params[t],n&&"Ptr"===n.ts&&"bigint"==typeof e?Number(e):e});var o=r.result,a=e(...i?function(e,t){let n=[];return e.params.forEach((e,r)=>{if("i64"===e.wasm.kind){let e=BigInt(t[r]??0);n.push(Number(4294967295n&e),Number(e>>32n&4294967295n))}else n.push(t[r])}),n}(r,n):n);if(o)return"Ptr"===o.ts&&"number"==typeof a?aR(a):"bigint"===o.ts&&"number"==typeof a?BigInt(a):a};if(e.cwrap){let i=r.params.flatMap(e=>"i64"===e.wasm.kind?["number","number"]:[e.wasm.cwrap]);t[n]=o(e.cwrap(n,r.result?r.result.wasm.cwrap:null,i))}else"function"==typeof e[`_${n}`]&&(t[n]=o(e[`_${n}`].bind(e)))}return t}(o),async destroy(){o._free=o._free}}}async function a$(e={}){return aL(e)}var az={};function aU(e){return e}function aV(e){return e}function aW(){return e=>e}function aq(e){}function aH(e){throw Error("Unexpected value in exhaustive check")}function aK(e){}function aZ(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function aJ(e,t="|"){return e.map(e=>sy(e)).join(t)}function aQ(e,t){return"bigint"==typeof t?t.toString():t}v(az,{BIGINT_FORMAT_RANGES:()=>sA,CONSTANT_CATCH:()=>le,Class:()=>s1,NUMBER_FORMAT_RANGES:()=>sE,aborted:()=>sj,allowsEval:()=>sc,assert:()=>aK,assertEqual:()=>aU,assertIs:()=>aq,assertNever:()=>aH,assertNotEqual:()=>aV,assignProp:()=>a4,attachSchema:()=>sL,base64ToUint8Array:()=>sZ,base64urlToUint8Array:()=>sQ,cached:()=>aY,captureStackTrace:()=>su,cleanEnum:()=>sK,cleanRegex:()=>a1,clone:()=>sP,cloneDef:()=>sr,codePointLength:()=>sV,constantCatch:()=>lt,createTransparentProxy:()=>sb,defineLazy:()=>a6,defineLazyInternal:()=>s7,derived:()=>s5,esc:()=>ss,escapeRegex:()=>s_,explicitlyAborted:()=>sM,extend:()=>sx,finalizeIssue:()=>s$,floatSafeRemainder:()=>a3,getElementAtPath:()=>si,getEnumValues:()=>aZ,getLengthableOrigin:()=>sW,getParsedType:()=>sh,getSizableOrigin:()=>sz,hexToUint8Array:()=>sY,hide:()=>s6,installLazyProp:()=>s9,isObject:()=>sd,isPlainObject:()=>sf,issue:()=>sH,joinValues:()=>aJ,jsonStringifyReplacer:()=>aQ,members:()=>s3,merge:()=>sI,mergeDefs:()=>sn,normalizeParams:()=>sD,nullish:()=>a0,numKeys:()=>sp,objectClone:()=>a5,omit:()=>sk,optionalKeys:()=>sw,own:()=>s2,parsedType:()=>sq,partial:()=>sN,pick:()=>sv,prefixIssues:()=>sR,primitiveTypes:()=>sg,promiseAllObject:()=>so,propertyKeyTypes:()=>sF,randomString:()=>sa,rawShape:()=>a8,required:()=>sC,safeExtend:()=>sO,shallowClone:()=>sm,sizeCaps:()=>sB,slugify:()=>sl,stringifyPrimitive:()=>sy,toZod:()=>aW,uint8ArrayToBase64:()=>sJ,uint8ArrayToBase64url:()=>sX,uint8ArrayToHex:()=>s0,unwrapMessage:()=>sT});var aX=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return void 0!==e&&(this._value=e(),this._getter=void 0),this._value}};function aY(e){return new aX(e)}function a0(e){return null==e}function a1(e){let t=+!!e.startsWith("^"),n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function a3(e,t){let n=e/t,r=Math.round(n),i=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r){let e=t._zod.def.shape[o];return r?r(e,o):e}):se(e,o,r?r(n.value,o):n.value))}}function sn(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function sr(e){return sn(e._zod.def)}function si(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function so(e){let t=Object.keys(e);return Promise.all(t.map(t=>e[t])).then(e=>{let n={};for(let r=0;r{};function sd(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var sc=aY(()=>{if(ls.jitless||"u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch{return!1}});function sf(e){if(!1===sd(e))return!1;let t=e.constructor;if(void 0===t||"function"!=typeof t)return!0;let n=t.prototype;return!1!==sd(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function sm(e){return sf(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function sp(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var sh=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return"promise";if("u">typeof Map&&e instanceof Map)return"map";if("u">typeof Set&&e instanceof Set)return"set";if("u">typeof Date&&e instanceof Date)return"date";if("u">typeof File&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},sF=new Set(["string","number","symbol"]),sg=new Set(["string","number","bigint","boolean","symbol","undefined"]);function s_(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}function sP(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function sD(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e}function sb(e){let t;return new Proxy({},{get:(n,r,i)=>(t??(t=e()),Reflect.get(t,r,i)),set:(n,r,i,o)=>(t??(t=e()),Reflect.set(t,r,i,o)),has:(n,r)=>(t??(t=e()),Reflect.has(t,r)),deleteProperty:(n,r)=>(t??(t=e()),Reflect.deleteProperty(t,r)),ownKeys:n=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(n,r)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)),defineProperty:(n,r,i)=>(t??(t=e()),Reflect.defineProperty(t,r,i))})}function sy(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function sw(e){return Object.keys(e).filter(t=>void 0!==e[t]._zod.optin&&"optional"===e[t]._zod.optout)}var sE={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},sA={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function sv(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i={};return st(i,e,sS(e,t)),sP(e,sn(n,{shape:i,checks:[]}))}function sS(e,t){let n=a7(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function sk(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(sS(e,t)),o={};return st(o,e,Reflect.ownKeys(a7(e)).filter(e=>!i.has(e))),sP(e,sn(n,{shape:o,checks:[]}))}function sx(e,t){if(!sf(t))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let n=a7(e);for(let e of Reflect.ownKeys(t))if(void 0!==Object.getOwnPropertyDescriptor(n,e))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return sP(e,sn(e._zod.def,{shape:sG(e,t)}))}function sG(e,t){let n={};st(n,e,Reflect.ownKeys(a7(e)));for(let e of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,e);r.enumerable&&(r.get?a9(n,e,()=>t[e]):se(n,e,r.value))}return n}function sO(e,t){if(!sf(t))throw Error("Invalid input to safeExtend: expected a plain object");return sP(e,sn(e._zod.def,{shape:sG(e,t)}))}function sI(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n={};st(n,e,Reflect.ownKeys(a7(e))),st(n,t,Reflect.ownKeys(a7(t)));let r=sn(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return sP(e,r)}function sN(e,t,n,r="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let o=n?new Set(sS(t,n)):void 0,a={};return st(a,t,Reflect.ownKeys(a7(t)),e&&((t,n)=>o&&!o.has(n)?t:new e({type:"optional",innerType:t}))),sP(t,sn(t._zod.def,{shape:a,checks:[]}))}function sC(e,t,n){let r=n?new Set(sS(t,n)):void 0,i={};return st(i,t,Reflect.ownKeys(a7(t)),(t,n)=>r&&!r.has(n)?t:new e({type:"nonoptional",innerType:t})),sP(t,sn(t._zod.def,{shape:i}))}function sj(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n(t.path??(t.path=[]),t.path.unshift(e),t))}function sT(e){return"string"==typeof e?e:e?.message}function sB(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function sL(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function sZ(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,"0")).join("")}var s1=class{constructor(...e){}};function s3(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):function(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:s2(this,t,n.bind(this))},set(e){s2(this,t,e)}})}(e,n,r.value)}}function s2(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function s6(e,t,n){return s2(e,t,n,!1)}function s5(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return s2(this,n,r(this))},set(e){s2(this,n,e)}})}return t}var s4=!1,s8={configurable:!0,get(){s4=!0}};function s7(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&P!==e._zod){P=void 0;return}P=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,s8);let e=s4;s4=!1;try{let r=n(this);return s4?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),s4=s4||e,r}catch(n){throw delete this[t],s4=s4||e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function s9(e,t,n,r){let i,o=t in(i=Object.getPrototypeOf(e))?void 0:i;o&&Object.defineProperty(o,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var le="~constantCatch";function lt(e){let t=()=>e;return t[le]=!0,t}var ln={value:void 0,enumerable:!1},lr="captureStackTrace"in Error?Error:null;function li(e,t,n,r){function i(e){this.def=e,this.constr=u,this.traits=new Set}i.prototype={};let o=n&&new WeakSet;function a(r,a){if(r._zod){if(r._zod.traits.has(e))return}else{ln.value=new i(a);try{Object.defineProperty(r,"_zod",ln)}finally{ln.value=void 0}}if(r._zod.traits.add(e),t(r,a),o){let e=Object.getPrototypeOf(r),t=r._zod.constr.prototype,i=e;for(;i&&i!==t;)i=Object.getPrototypeOf(i);let a=i??e;o.has(a)||(o.add(a),s3(a,n))}let s=u.prototype;for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(e in r||(r[e]=s[e].bind(r)))}let s=r?.Parent??Object;class l extends s{}function u(e){let t=r?.Parent?function(e){let t=lr;if(t){let n=t.stackTraceLimit;if("number"==typeof n){try{t.stackTraceLimit=0}catch{return lr=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}(l):this;a(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(l,"name",{value:e}),Object.defineProperty(u,"init",{value:a}),Object.defineProperty(u,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}var lo=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},la=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(D=globalThis).__zod_globalConfig??(D.__zod_globalConfig={});var ls=globalThis.__zod_globalConfig;function ll(e){return e&&Object.assign(ls,e),ls}var lu={get:function(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,aQ,2)),e.message},set:function(e){this._zod.message=e},enumerable:!0,configurable:!0},ld={value:void 0,enumerable:!1},lc=new WeakSet([Object.prototype,Error.prototype]),lf=(e,t)=>{e.name="$ZodError",ld.value=t,Object.defineProperty(e,"issues",ld),ld.value=void 0,Object.defineProperty(e,"message",lu);let n=Object.getPrototypeOf(e);lc.has(n)||(lc.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},lm=li("$ZodError",lf);function lp(e,t){return{callee:t?.callee??e,Err:t?.Err}}li("$ZodError",lf,void 0,{Parent:Error});var lh=e=>{let t=(n,r,i,o)=>{let a=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new lo;if(s.issues.length){let n=new(o?.Err??e)(s.issues.map(e=>s$(e,a,ll())));throw su(n,o?.callee??t),n}return s.value};return t},lF=e=>{let t=async(n,r,i,o)=>{let a=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new(o?.Err??e)(s.issues.map(e=>s$(e,a,ll())));throw su(n,o?.callee??t),n}return s.value};return t},lg=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new lo;return o.issues.length?l_(e,o.issues,i):{success:!0,data:o.value}};function l_(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>s$(e,n,ll()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var lP=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?l_(e,o.issues,i):{success:!0,data:o.value}},lD=Symbol.for("zod.compile.invalid"),lb=Symbol.for("zod.compile.fallback"),ly=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),0===i.issues.length},lw=/^[cC][0-9a-z]{6,}$/,lE=/^[0-9a-z]+$/,lA=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,lv=/^[0-9a-vA-V]{20}$/,lS=/^[A-Za-z0-9]{27}$/,lk=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1,7}|:))$/,lj=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/,lM=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lR=/^https?$/,lT=/^\\+[1-9]\\d{6,14}$/,lB="(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))",lL=RegExp(`^${lB}$`);function l$(e){let t="(?:[01]\\\\d|2[0-3]):[0-5]\\\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\\\d`:`${t}:[0-5]\\\\d\\\\.\\\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\\\d(?:\\\\.\\\\d+)?`:`${t}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`}var lz=/^[\\s\\S]{0,}$/,lU=/^-?\\d+(?:\\.\\d+)?$/,lV=/^(?:true|false)$/i,lW=/^[^A-Z]*$/,lq=/^[^a-z]*$/,lH=li("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),lK=e=>{let t=e.value;return!a0(t)&&void 0!==t.length},lZ={number:"number",bigint:"bigint",object:"date"},lJ=li("$ZodCheckLessThan",(e,t)=>{lH.init(e,t);let n=lZ[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value{lH.init(e,t);let n=lZ[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:lZ[typeof r.value]??n,code:"too_small",minimum:"object"==typeof t.value?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lX=li("$ZodCheckMultipleOf",(e,t)=>{lH.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):0===a3(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),lY=li("$ZodCheckNumberFormat",(e,t)=>{lH.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[i,o]=sE[t.format];e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}))}so&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),l0=li("$ZodCheckMaxLength",(e,t)=>{var n;lH.init(e,t),(n=e._zod.def).when??(n.when=lK),e._zod.check=n=>{let r=n.value,i=r.length;if(("string"==typeof r&&i>t.maximum?sV(r):i)<=t.maximum)return;let o=sW(r);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),l1=li("$ZodCheckMinLength",(e,t)=>{var n;lH.init(e,t),(n=e._zod.def).when??(n.when=lK),e._zod.check=n=>{let r=n.value,i=r.length;if(("string"==typeof r&&i>=t.minimum&&i<2*t.minimum?sV(r):i)>=t.minimum)return;let o=sW(r);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),l3=li("$ZodCheckLengthEquals",(e,t)=>{var n;lH.init(e,t),(n=e._zod.def).when??(n.when=lK),e._zod.check=n=>{let r=n.value,i=r.length,o="string"==typeof r&&i>=t.length&&i<=2*t.length?sV(r):i;if(o===t.length)return;let a=sW(r),s=o>t.length;n.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),l2=li("$ZodCheckStringFormat",(e,t)=>{var n,r;lH.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),l6=li("$ZodCheckRegex",(e,t)=>{l2.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),l5=li("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=lW),l2.init(e,t)}),l4=li("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=lq),l2.init(e,t)}),l8=li("$ZodCheckIncludes",(e,t)=>{lH.init(e,t);let n=s_(t.includes),r=new RegExp("number"==typeof t.position?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),l7=li("$ZodCheckStartsWith",(e,t)=>{lH.init(e,t);let n=RegExp(`^${s_(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),l9=li("$ZodCheckEndsWith",(e,t)=>{lH.init(e,t);let n=RegExp(`.*${s_(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),ue=li("$ZodCheckOverwrite",(e,t)=>{lH.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ut=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{this.indent-=1}}write(e){if("function"==typeof e){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split(`\n`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length));for(let e of t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e))this.content.push(e)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {\n${t.join(`\n`)}\n};`)(...Object.values(this.closed))}},un={major:4,minor:6,patch:7},ur=li("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=un;let r=e._zod.def.checks,i=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{let i;if(t.memo)return t;let o=sj(t);for(let a of n){if(a._zod.def.when){if(sM(t)||!a._zod.def.when(t))continue}else if(o)continue;let n=t.issues.length,s=a._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new lo;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(sL(t.issues,n,e),o||(o=sj(t,n)))});else{if(t.issues.length===n)continue;sL(t.issues,n,e),o||(o=sj(t,n))}}return i?i.then(()=>t):t},n=(n,r,o)=>{if(sj(n))return n.aborted=!0,n;let a=t(r,i,o);if(a instanceof Promise){if(!1===o.async)throw new lo;return a.then(t=>e._zod.parse(t,o))}return e._zod.parse(a,o)};e._zod.run=(r,o)=>{if(o.skipChecks)return e._zod.parse(r,o);if("backward"===o.direction){let t=e._zod.parse({value:r.value,issues:[]},{...o,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,o)):n(t,r,o)}let a=e._zod.parse(r,o);if(a instanceof Promise){if(!1===o.async)throw new lo;return a.then(e=>t(e,i,o))}return t(a,i,o)}}},{get"~standard"(){return s6(this,"~standard",ua(this))},set"~standard"(e){s2(this,"~standard",e)}}),ui=(e,t)=>e.issues.length?{issues:e.issues.map(e=>s$(e,t,ll()))}:{value:e.value};async function uo(e,t){let n={async:!0};return ui(await e._zod.run({value:t,issues:[]},n),n)}function ua(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return ui(r,n)}catch{}return uo(e,t)},vendor:"zod",version:1}}var us=li("$ZodString",(e,t)=>{ur.init(e,t),e._zod.pattern=t.pattern??lz,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ul=li("$ZodStringFormat",(e,t)=>{l2.init(e,t),us.init(e,t)}),uu=li("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=lG),ul.init(e,t)}),ud=li("$ZodUUID",(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=lO(e))}else t.pattern??(t.pattern=lO());ul.init(e,t)}),uc=li("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=lI),ul.init(e,t)});function uf(e){try{if("u">typeof URL&&"function"==typeof URL.canParse)return URL.canParse(e);return new URL(e),!0}catch{return!1}}var um=/[\\t\\n\\r]/g;function up(e){return e.replace(um,"")}var uh=li("$ZodURL",(e,t)=>{ul.init(e,t),e._zod.check=n=>{try{var r,i;let o=n.value.trim(),a="normalize"in t||"hostname"in t||"protocol"in t?function(e,t){if(!t.normalize&&t.protocol?.source===lR.source&&!/^https?:\\/\\//i.test(e))return 1;try{if("u">typeof URL){let t=URL;if("function"==typeof t.parse)return t.parse(e)??2}return new URL(e)}catch{return 2}}(o,t):uf(o)||2;if(1===a)return void n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});if(2===a)return void n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});if(!0===a){n.value=up(o);return}t.hostname&&((r=t.hostname).lastIndex=0,!r.test(a.hostname))&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&((i=t.protocol).lastIndex=0,!i.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol))&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?a.href:up(o);return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),uF=li("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=RegExp("^(?=[\\\\s\\\\S]*[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\u20E3])[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$","u")),ul.init(e,t)}),ug=li("$ZodNanoID",(e,t)=>{var n;if(void 0!==t.length&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=void 0===t.length?lk:(n=t.length,RegExp(`^[a-zA-Z0-9_-]{${n}}$`))),ul.init(e,t)}),u_=li("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=lw),ul.init(e,t)}),uP=li("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=lE),ul.init(e,t)}),uD=li("$ZodULID",(e,t)=>{t.pattern??(t.pattern=lA),ul.init(e,t)}),ub=li("$ZodXID",(e,t)=>{t.pattern??(t.pattern=lv),ul.init(e,t)}),uy=li("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=lS),ul.init(e,t)}),uw=li("$ZodISODateTime",(e,t)=>{let n,r,i;t.pattern??(n=["Z"],t.offset&&n.push("([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)"),r=`${l$({precision:t.precision,seconds:!0})}(?:${n.join("|")})`,i=t.local?`${r}|${l$({precision:t.precision})}`:r,t.pattern=RegExp(`^${lB}T(?:${i})$`)),ul.init(e,t)}),uE=li("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=lL),ul.init(e,t)}),uA=li("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=RegExp(`^${l$(t)}$`)),ul.init(e,t)}),uv=li("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=lx),ul.init(e,t)}),uS=li("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=lN),ul.init(e,t)}),uk=/^[0-9a-fA-F:.]+$/;function ux(e){return!!uk.test(e)&&uf(`http://[${e}]`)}var uG=li("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=lC),ul.init(e,t),e._zod.check=n=>{ux(n.value)||n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}),uO=li("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=lj),ul.init(e,t)}),uI=li("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=lM),ul.init(e,t),e._zod.check=n=>{!function(e){let t=e.split("/");if(2!==t.length)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`===r&&!(i<0)&&!(i>128)&&ux(n)}(n.value)&&n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}});function uN(e){if(""===e)return!0;if(/\\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var uC=/^[0-9a-zA-Z+/]*={0,2}$/,uj=li("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=uC),ul.init(e,t),e._zod.check=n=>{uN(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}}),uM=/^[A-Za-z0-9_-]*$/,uR=li("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=uM),ul.init(e,t),e._zod.check=n=>{!function(e){if(!uM.test(e))return!1;let t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return uN(t.padEnd(4*Math.ceil(t.length/4),"="))}(n.value)&&n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),uT=li("$ZodE164",(e,t)=>{t.pattern??(t.pattern=lT),ul.init(e,t)}),uB=li("$ZodJWT",(e,t)=>{ul.init(e,t),e._zod.check=n=>{!function(e,t=null){try{let n=e.split(".");if(3!==n.length)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));if("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))return!1;return!0}catch{return!1}}(n.value,t.alg)&&n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),uL=li("$ZodNumber",(e,t)=>{ur.init(e,t),e._zod.pattern=lU,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return n;let o="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),u$=li("$ZodNumberFormat",(e,t)=>{lY.init(e,t),uL.init(e,t)}),uz=li("$ZodBoolean",(e,t)=>{ur.init(e,t),e._zod.pattern=lV,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return"boolean"==typeof i||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),uU=li("$ZodUnknown",(e,t)=>{ur.init(e,t),e._zod.parse=e=>e}),uV=li("$ZodNever",(e,t)=>{ur.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),uW=li("$ZodDate",(e,t)=>{ur.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),n}}),uq=e=>Array.isArray(e)?e.length:-1;function uH(e,t,n){e.issues.length&&t.issues.push(...sR(n,e.issues)),t.value[n]=e.value}var uK=li("$ZodArray",(e,t)=>{ur.init(e,t);let n=ls.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=n?n.alloc(e,r,Array(o.length),i):Array(o.length);let a=[],s=i?.abortEarly;for(let e=0;euH(t,r,e)));else if(uH(l,r,e),s&&0!==l.issues.length&&sj(l))break}return a.length?Promise.all(a).then(()=>r):r},function(e,t){let n=sB(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,o)=>{let a=t(n.value);if(a>r&&!o?.skipChecks&&o?.direction!=="backward"){for(let[t,r]of sB(e._zod.def.checks))if(a>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,sL(n.issues,t,e),n}}return i(n,o)}}(e,uq)});function uZ(e,t,n,r,i,o){let a=n in r,s="optional"===o;if(a||!s||"optional"!==i){if(e.issues.length){if(void 0!==i&&s&&!a)return;t.issues.push(...sR(n,e.issues))}if(!a&&void 0===i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}void 0===e.value?(a||"defaulted"===i&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var uJ=[];function uQ(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:uJ,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let o=sw(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function uX(e,t,n,r,i,o,a){let s=[],l=i.keySet,u=i.catchall._zod,d=u.def.type,c=u.optin,f=u.optout,m=0;for(let i in t){if(a&&n.issues.length!==m){if(sj(n,m))break;m=n.issues.length}if(l.has(i))continue;if("__proto__"===i){"never"===d&&s.push(i);continue}if("never"===d){s.push(i);continue}let o=u.run({value:t[i],issues:[]},r);o instanceof Promise?e.push(o.then(e=>uZ(e,n,i,t,c,f))):uZ(o,n,i,t,c,f)}return(s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o,continue:!0}),e.length)?Promise.all(e).then(()=>n):n}var uY=li("$ZodObject",(e,t)=>{let n;ur.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),i=r?.get?r.get.raw:t.shape??{};if(i){let e=()=>{let n={...i};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=i,Object.defineProperty(t,"shape",{get:e})}let o=aY(()=>uQ(t));s7(e,"propValues",e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){for(let t of(Object.prototype.hasOwnProperty.call(n,e)||a4(n,e,new Set),r.values))n[e].add(t);void 0!==r.optin&&n[e].add(void 0)}}return n});let a=t.catchall,s=ls.memoizer;s?.attach(e),e._zod.parse=(t,r)=>{n??(n=o.value);let i=t.value;if(!sd(i))return t.issues.push({expected:"object",code:"invalid_type",input:i,inst:e}),t;t.value=s?s.alloc(e,t,{},r):{};let l=[],u=n.shape,d=r?.abortEarly,c=t.issues.length;for(let e of n.allKeys){if(d&&t.issues.length!==c){if(sj(t,c))break;c=t.issues.length}if("__proto__"===e)continue;let n=u[e],o=n._zod.optin,a=n._zod.optout,s=n._zod.run({value:i[e],issues:[]},r);s instanceof Promise?l.push(s.then(n=>uZ(n,t,e,i,o,a))):uZ(s,t,e,i,o,a)}return a?uX(l,i,t,r,o.value,e,!0===d):l.length?Promise.all(l).then(()=>t):t}}),u0=li("$ZodObjectJIT",(e,t)=>{let n,r;uY.init(e,t);let i=e._zod.parse,o=aY(()=>uQ(t)),a=ls.memoizer,s=!ls.jitless,l=s&&sc.value,u=t.catchall;e._zod.parse=(d,c)=>{r??(r=o.value);let f=d.value;return sd(f)?s&&l&&c?.async===!1&&!0!==c.jitless?(n||(n=(t=>{let n=o.value,r=n.symbolKeys,i=new ut(["payload","ctx"],{shape:t,inst:e,memo:a,syms:r}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,l=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;i.write("const input = payload.value;");let u=Object.create(null),d=0;for(let e of n.allKeys)u[e]=`key_${d++}`;for(let e of(i.write(a?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};"),n.allKeys)){if("__proto__"===e)continue;let n=u[e],o="symbol"==typeof e?`syms[${r.indexOf(e)}]`:ss(e),a=`${o} in input`,d=t[e],c=d?._zod?.optin,f=void 0!==c,m=d?._zod?.optout==="optional";if(i.write(`const ${n} = ${s(o)};`),f&&m){let e="optional"===c?`${n}_present`:`${n}.value !== undefined || ${n}_present`;i.write(`\n const ${n}_present = ${a};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${l(n,o)}\n }\n\n if (${e}) {\n newResult[${o}] = ${n}.value;\n }\n }\n\n `)}else f?(i.write(`\n if (${n}.issues.length) {${l(n,o)}\n }\n `),"defaulted"===c?i.write(`newResult[${o}] = ${n}.value;`):i.write(`\n if (${n}.value !== undefined || ${a}) {\n newResult[${o}] = ${n}.value;\n }\n `)):i.write(`\n const ${n}_present = ${a};\n if (${n}.issues.length) {${l(n,o)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${o}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${o}] = ${n}.value;\n }\n\n `)}return i.write("payload.value = newResult;"),i.write("return payload;"),i.compile()})(t.shape)),d=n(d,c),u)?uX([],f,d,c,r,e,c?.abortEarly===!0):d:i(d,c):(d.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),d)}});function u1(e,t,n,r){for(let n of e)if(0===n.issues.length)return t.value=n.value,t;let i=e.filter(e=>!sj(e));return 1===i.length?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>s$(e,r,ll())))}),t)}var u3=li("$ZodUnion",(e,t)=>{ur.init(e,t),s7(e,"optin",e=>e.def.options.some(e=>"defaulted"===e._zod.optin)?"defaulted":e.def.options.some(e=>void 0!==e._zod.optin)?"optional":void 0),s7(e,"optout",e=>e.def.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),s7(e,"values",e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),s7(e,"pattern",e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>a1(e.source)).join("|")})$`)}});let n=1===t.options.length?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1,a=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)a.push(t),o=!0;else{if(0===t.issues.length)return t;a.push(t)}}return o?Promise.all(a).then(t=>u1(t,r,e,i)):u1(a,r,e,i)}});function u2(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||0===r.size)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(void 0!==e)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var u6=li("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,u3.init(e,t);let n=e._zod.parse;s7(e,"propValues",e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||0===Object.keys(i).length)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);for(let[r,o]of(i[e.def.discriminator]?.has(void 0)&&n++,Object.entries(i)))for(let e of(Object.prototype.hasOwnProperty.call(t,r)||a4(t,r,new Set),o))t[r].add(e)}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=a8(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=aY(()=>u2(t));e._zod.parse=(i,o)=>{let a=i.value;if(!sd(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;let s=a?.[t.discriminator],l=r.value.get(s);return l&&(void 0!==s||"backward"!==o.direction)?l._zod.run(i,o):t.unionFallback||"backward"===o.direction?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>null!==r.value.get(e)),input:a,path:[t.discriminator],inst:e}),i)}}),u5=li("$ZodIntersection",(e,t)=>{ur.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),o=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([t,n])=>u4(e,t,n)):u4(e,i,o)}});function u4(e,t,n){let r,i=new Map,o=new Map,a=(e,t)=>{let n;if("unrecognized_keys"!==e.code||e.path?.length)if("invalid_key"!==e.code||"record"!==e.origin||e.path?.length!==1)return!1;else{let t=String(e.path[0]);o.has(t)||o.set(t,e),n=[t]}else r??(r=e),n=e.keys;for(let e of n)i.has(e)||i.set(e,{}),i.get(e)[t]=!0;return!0};for(let n of t.issues)a(n,"l")||e.issues.push(n);for(let t of n.issues)a(t,"r")||e.issues.push(t);let s=[...i].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=r?s.filter(e=>r.keys.includes(e)):[];for(let n of(t.length&&e.issues.push({...r,keys:t}),s))!t.includes(n)&&o.has(n)&&e.issues.push(o.get(n))}let l=function e(t,n){if(t===n||t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(sf(t)&&sf(n)){let r=Object.keys(n),i=Object.keys(t).filter(e=>-1!==r.indexOf(e)),o={...t,...n};for(let r of(Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__,i)){if("__proto__"===r)continue;let i=e(t[r],n[r]);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};o[r]=i.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i{ur.init(e,t);let n=t.items,r=ls.memoizer;r?.attach(e),e._zod.parse=(i,o)=>{let a=i.value;if(!Array.isArray(a))return i.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=r?r.alloc(e,i,[],o):[];let s=[],l=u7(n,"optin"),u=u7(n,"optout");if(!t.rest){if(a.lengthn.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:a,inst:e,origin:"array"})}let d=Array(n.length),c=t.rest?o?.abortEarly:void 0,f=!1;for(let e=0;e{d[e]=t})):(d[e]=t,c&&!f&&t.issues.length&&(f=sj(t)))}if(t.rest&&!f){let e=n.length-1,r=a.slice(n.length),l=i.issues.length;for(let n of r){if(c&&i.issues.length!==l){if(sj(i,l))break;l=i.issues.length}e++;let r=t.rest._zod.run({value:n,issues:[]},o);r instanceof Promise?s.push(r.then(t=>u9(t,i,e))):u9(r,i,e)}}return s.length?Promise.all(s).then(()=>de(d,i,n,a,u)):de(d,i,n,a,u)}});function u7(e,t){for(let n=e.length-1;n>=0;n--)if(!("optin"===t?void 0!==e[n]._zod.optin:"optional"===e[n]._zod.optout))return n+1;return 0}function u9(e,t,n){e.issues.length&&t.issues.push(...sR(n,e.issues)),t.value[n]=e.value}function de(e,t,n,r,i){for(let o=0;o=i&&"optional"===n[o]._zod.optin){t.value.length=o;break}if(a.issues.length){if(!s&&o>=i){t.value.length=o;break}t.issues.push(...sR(o,a.issues))}t.value[o]=a.value}for(let e=t.value.length-1;e>=r.length;e--)if("optional"===n[e]._zod.optout&&void 0===t.value[e])t.value.length=e;else break;return t}var dt=li("$ZodEnum",(e,t)=>{ur.init(e,t);let n=aZ(t.entries),r=new Set(n);e._zod.values=r,s7(e,"pattern",e=>{let t=aZ(e.def.entries).filter(e=>sF.has(typeof e));return new RegExp(t.length?`^(${t.map(e=>s_(e.toString())).join("|")})$`:"^[^\\\\s\\\\S]$")}),e._zod.parse=(t,i)=>{let o=t.value;return r.has(o)||t.issues.push({code:"invalid_value",values:n,input:o,inst:e}),t}}),dn=li("$ZodLiteral",(e,t)=>{ur.init(e,t);let n=new Set(t.values);e._zod.values=n,s7(e,"pattern",e=>{let t=e.def.values;return new RegExp(t.length?`^(${t.map(e=>"string"==typeof e?s_(e):e?s_(e.toString()):String(e)).join("|")})$`:"^[^\\\\s\\\\S]$")}),e._zod.parse=(r,i)=>{let o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),dr=li("$ZodTransform",(e,t)=>{ur.init(e,t),e._zod.optin="optional",ls.memoizer?.guard(e),e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new la(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new lo;return n.value=i,n}});function di(e,t){return e.value=t.issues.length?void 0:t.value,e}var da=li("$ZodOptional",(e,t)=>{ur.init(e,t),s7(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),e._zod.optout="optional",s7(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),s7(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${a1(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(void 0===e.value){if("defaulted"!==t.innerType._zod.optin)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>di(e,t)):di(e,r)}return t.innerType._zod.run(e,n)}}),ds=li("$ZodExactOptional",(e,t)=>{da.init(e,t),s7(e,"values",e=>e.def.innerType._zod.values),s7(e,"pattern",e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),dl=li("$ZodNullable",(e,t)=>{ur.init(e,t),s7(e,"optin",e=>e.def.innerType._zod.optin),s7(e,"optout",e=>e.def.innerType._zod.optout),s7(e,"pattern",e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${a1(t.source)}|null)$`):void 0}),s7(e,"values",e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),du=li("$ZodDefault",(e,t)=>{ur.init(e,t),e._zod.optin="defaulted",s7(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>dd(e,t)):dd(r,t)}});function dd(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}var dc=li("$ZodPrefault",(e,t)=>{ur.init(e,t),e._zod.optin="defaulted",s7(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),df=li("$ZodNonOptional",(e,t)=>{ur.init(e,t),s7(e,"values",e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>dm(t,e)):dm(i,e)}});function dm(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function dp(e,t,n,r){return t.issues.length?e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>s$(e,r,ll()))},input:e.value}):(e.value=t.value,t.memo&&(e.memo=!0)),e}var dh=li("$ZodCatch",(e,t)=>{ur.init(e,t),s7(e,"optin",e=>"defaulted"===e.def.innerType._zod.optin?"defaulted":"optional"),s7(e,"optout",e=>e.def.innerType._zod.optout),s7(e,"values",e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>dp(e,r,t,n)):dp(e,r,t,n)}}),dF=li("$ZodPipe",(e,t)=>{ur.init(e,t),s7(e,"values",e=>e.def.in._zod.values),s7(e,"optin",e=>e.def.in._zod.optin),s7(e,"optout",e=>e.def.out._zod.optout),s7(e,"propValues",e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if("backward"===n.direction){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>dg(e,t.in,n)):dg(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>dg(e,t.out,n)):dg(r,t.out,n)}});function dg(e,t,n){return e.issues.some(e=>"unrecognized_keys"!==e.code)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var d_=li("$ZodPreprocess",(e,t)=>{dF.init(e,t)}),dP=li("$ZodReadonly",(e,t)=>{ur.init(e,t),s7(e,"propValues",e=>e.def.innerType._zod.propValues),s7(e,"values",e=>e.def.innerType._zod.values),s7(e,"optin",e=>e.def.innerType?._zod?.optin),s7(e,"optout",e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(dD):dD(r)}});function dD(e){return e.memo||(e.value=Object.freeze(e.value)),e}var db=li("$ZodLazy",(e,t)=>{ur.init(e,t),a6(e._zod,"innerType",()=>(t._cachedInner||(t._cachedInner=t.getter()),t._cachedInner)),s7(e,"pattern",e=>e.innerType?._zod?.pattern),s7(e,"propValues",e=>e.innerType?._zod?.propValues),s7(e,"optin",e=>e.innerType?._zod?.optin??void 0),s7(e,"optout",e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),dy=li("$ZodCustom",(e,t)=>{lH.init(e,t),ur.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>dw(t,n,r,e));dw(i,n,r,e)}});function dw(e,t,n,r){if(!e){let e={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(sH(e))}}var dE=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},dA="~memo",dv=[];function dS(e){return null!==e&&"object"==typeof e}function dk(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var dx=new WeakMap,dG=[],dO={alloc(e,t,n){let r=b;if(!r)return n;b=void 0;let i={value:n,issues:null};return r.set(t.value,i),dG.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{var r,i;let o;if("backward"!==n.direction&&(r=n,i=e.value,void 0!==(o=r[dA]?.backEdges)&&dS(i)&&o.has(i)))throw new dE;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i,o=!1;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(s,l)=>{let u;if(void 0===n){let r=function e(t,n,r){var i,o;let a=dx.get(t);if(void 0!==a)return 2*!!a;if(n.has(t))return 2;n.add(t);let s=0,l=t=>{if(2!==s&&t?._zod){let i=e(t,n,r);i>s&&(s=i)}},u=e=>{e>s&&(s=e)},d=t._zod.def;switch(d.type){case"object":{let t=a8(d);u(t?((t,i)=>{let o=0;for(let a of Reflect.ownKeys(t)){let s=Object.getOwnPropertyDescriptor(t,a);if(i&&!s.enumerable)continue;let l=s.get?1:s.value?._zod?e(s.value,n,r):0;l>o&&(o=l)}return o})(t,!0):1),l(d.catchall);break}case"array":l(d.element);break;case"tuple":for(let e of d.items)l(e);l(d.rest);break;case"record":case"map":l(d.keyType),l(d.valueType);break;case"set":l(d.valueType);break;case"union":for(let e of d.options)l(e);break;case"intersection":l(d.left),l(d.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":l(d.innerType);break;case"pipe":l(d.in),l(d.out);break;case"function":l(d.input),l(d.output);break;case"lazy":{let i=d._cachedInner??(r?t._zod.innerType:void 0);u(i?e(i,n,!1):1);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let e in d){let t=Object.getOwnPropertyDescriptor(d,e);if(!t||t.get)continue;let n=t.value;if(n&&"object"==typeof n){if(n._zod)l(n);else if(Array.isArray(n))for(let e of n)l(e)}}}return n.delete(t),i=t,1!==(o=s)&&dx.set(i,2===o),o}(e,new Set,!1);if(0===r)return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(s,l);2===r||o?n=!0:o=!0}let d=s.value;if(!dS(d))return t(s,l);let c=l[dA];if(c||(c={buckets:new WeakMap,backEdges:void 0},l[dA]=c),r===l)u=i;else{var f;let t;(t=(f=c).buckets.get(e))||(t=new WeakMap,f.buckets.set(e,t)),u=t,r=l,i=u}let m=u.get(d);if(m)return s.value=m.value,m.issues?m.issues.length&&s.issues.push(...dk(m.issues)):(s.memo=!0,c.backEdges??(c.backEdges=new WeakSet),c.backEdges.add(m.value)),s;b=u;let p=dG.length,h=t(s,l);b=void 0;let F=dG.length>p?dG.pop():void 0;return h instanceof Promise?h.then(e=>(F&&(F.issues=e.issues.length?dk(e.issues):dv),e)):(F&&(F.issues=h.issues.length?dk(h.issues):dv),h)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}},dI=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&"object"==typeof n&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};(y=globalThis).__zod_globalRegistry??(y.__zod_globalRegistry=new dI);var dN=globalThis.__zod_globalRegistry;function dC(e){return e.checks&&(e.checks=[...e.checks]),e}function dj(e,t){return new lJ({check:"less_than",...sD(t),value:e,inclusive:!1})}function dM(e,t){return new lJ({check:"less_than",...sD(t),value:e,inclusive:!0})}function dR(e,t){return new lQ({check:"greater_than",...sD(t),value:e,inclusive:!1})}function dT(e,t){return new lQ({check:"greater_than",...sD(t),value:e,inclusive:!0})}function dB(e,t){return new lX({check:"multiple_of",...sD(t),value:e})}function dL(e,t){return new l0({check:"max_length",...sD(t),maximum:e})}function d$(e,t){return new l1({check:"min_length",...sD(t),minimum:e})}function dz(e,t){return new l3({check:"length_equals",...sD(t),length:e})}function dU(e){return new ue({check:"overwrite",tx:e})}function dV(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&a4(e,t,n[t]);return e}function dW(e){let t=e?.target??"draft-2020-12";return"draft-4"===t&&(t="draft-04"),"draft-7"===t&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??dN,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function dq(e,t,n,r,i){let o="function"==typeof t.unrepresentable?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if("any"===o)return!1;if(void 0===o||"throw"===o)throw Error(i);return Object.assign(n,o),!0}function dH(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,r);else{let n=a.schema,o=t.processors[i.type];if(!o)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);o(e,t,n,r)}let o=e._zod.parent;o&&(a.ref||(a.ref=o),dH(o,t,r),t.seen.get(o).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&dV(a.schema,l),"input"===t.io&&function e(t,n){let r=n??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let i=t._zod.def;if("transform"===i.type)return!0;if("array"===i.type)return e(i.element,r);if("set"===i.type)return e(i.valueType,r);if("lazy"===i.type)return e(i.getter(),r);if("promise"===i.type||"optional"===i.type||"nonoptional"===i.type||"nullable"===i.type||"readonly"===i.type||"default"===i.type||"prefault"===i.type||"catch"===i.type)return e(i.innerType,r);if("intersection"===i.type)return e(i.left,r)||e(i.right,r);if("record"===i.type||"map"===i.type)return e(i.keyType,r)||e(i.valueType,r);if("pipe"===i.type)return!!t._zod.traits.has("$ZodCodec")||e(i.in,r)||e(i.out,r);if("object"===i.type){for(let t in i.shape)if(e(i.shape[t],r))return!0;return!1}if("union"===i.type){for(let t of i.options)if(e(t,r))return!0;return!1}if("tuple"===i.type){for(let t of i.items)if(e(t,r))return!0;if(i.rest&&e(i.rest,r))return!0}return!1}(e)&&(delete a.schema.examples,delete a.schema.default),"input"===t.io&&"_prefault"in a.schema&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function dK(e){return e.replace(/~/g,"~0").replace(/\\//g,"~1")}function dZ(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{if(t[1].schema.$ref)return;let r=t[1],{ref:i,defId:o}=(t=>{let r="draft-2020-12"===e.target?"$defs":"definitions";if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let o=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=o,{defId:o,ref:`${i("__shared")}#/${r}/${dK(o)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:"#"};let o=t[1].schema.id??`__schema${e.counter++}`;return{defId:o,ref:i+dK(o)}})(t);r.def={...r.schema},o&&(r.defId=o);let a=r.schema;for(let e in a)delete a[e];a.$ref=i};if("throw"===e.cycles)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join("/")}/\n\nSet the \\`cycles\\` parameter to \\`"ref"\\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){i(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){i(n);continue}}if(e.metadataRegistry.get(n[0])?.id||r.cycle){i(n);continue}r.count>1&&"ref"===e.reused&&i(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}var dJ=new Set(["type","properties","required","additionalProperties"]),dQ=["oneOf","anyOf"];function dX(e){let t=e.additionalProperties;return void 0===t||!1===t||"object"!=typeof t||null===t?null:Object.keys(t).length?t:null}function dY(e){let t=[];for(let n of e){if("object"!=typeof n||"object"!==n.type)return null;for(let e in n)if(!dJ.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??dX(n);null!=t&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}a4(n,r,1===e.length?e[0]:dY(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:"object",properties:n};if(r.size&&(i.required=[...r]),t.every(e=>!1===e.additionalProperties))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=dX(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}1===e.length?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function d0(e,t){let n=e.seen.get(t);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=t=>{let n=e.seen.get(t);if(null===n.ref)return;let i=n.def??n.schema,o={...i},a=n.ref;if(n.ref=null,a){r(a);let n=e.seen.get(a),s=n.schema;if(s.$ref&&("draft-07"===e.target||"draft-04"===e.target||"openapi-3.0"===e.target)?(i.allOf=i.allOf??[],i.allOf.push(s)):dV(i,s),dV(i,o),t._zod.parent===a)for(let e in i)"$ref"!==e&&"allOf"!==e&&(e in o||delete i[e]);if(s.$ref&&n.def)for(let e in i)"$ref"!==e&&"allOf"!==e&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==a){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)"$ref"!==e&&"allOf"!==e&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if("openapi-3.0"!==e.target)for(let t of e.seen.entries())!function e(t){let n=t.anyOf;if(!Array.isArray(n)||0===n.length||void 0!==t.type)return;let r=[];for(let t of n){if(!t||"object"!=typeof t)return;e(t);let n=Object.keys(t);if(1!==n.length||"type"!==n[0])return;let i=t.type;for(let e of Array.isArray(i)?i:[i]){if("string"!=typeof e)return;r.includes(e)||r.push(e)}}delete t.anyOf,t.type=1===r.length?r[0]:r}(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])!function(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of dJ)if(t in e)return;let n=t.filter(e=>dQ.some(t=>Array.isArray(e[t]))),r=null;if(n.length){let e=n[0],i=dQ.find(t=>Array.isArray(e[t]));if(1!==Object.keys(e).length)return;let o=t.filter(t=>t!==e),a=e[i].map(e=>dY([...o,e]));if(a.some(e=>!e))return;r={[i]:a}}else r=dY(t);r&&(delete e.allOf,dV(e,r))}(e)}}let i={};if("draft-2020-12"===e.target?i.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===e.target?i.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===e.target?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}dV(i,n.defId?n.schema:n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;void 0!==o&&i.id===o&&delete i.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,a4(a,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&("draft-2020-12"===e.target?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t["~standard"],jsonSchema:{input:d1(t,"input",e.processors),output:d1(t,"output",e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error("Error converting schema to JSON.")}}var d1=(e,t,n={})=>r=>{let{libraryOptions:i,target:o}=r??{},a=dW({...i??{},target:o,io:t,processors:n});return dH(e,a),dZ(a,e),d0(a,e)},d3=(e,t,n)=>{(void 0===e[t]||n>e[t])&&(e[t]=n)},d2=(e,t,n)=>{(void 0===e[t]||n{d3(e,"minimum",t),d2(e,"maximum",t)},d5=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},d4=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},d8=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},d7=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},d9=(e,t)=>d3(e,"minimum",t.minimum),ce=(e,t)=>d2(e,"maximum",t.maximum),ct=e=>(t,n)=>{d7(t,n.format);let[r,i]=e[n.format];d3(t,"minimum",r),d2(t,"maximum",i)},cn={greater_than:(e,t)=>d3(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>d2(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>d5(e,t.value),number_format:ct(sE),bigint_format:ct(sA),min_length:d9,max_length:ce,length_equals:(e,t)=>d6(e,t.length),min_size:d9,max_size:ce,size_equals:(e,t)=>d6(e,t.size),string_format:(e,t)=>{d7(e,t.format),t.pattern&&d4(e,t.pattern),("base64"===t.format||"base64url"===t.format)&&(e.contentEncoding=t.format),(t.local||-1===t.precision)&&(e.laxFormat=!0)},mime_type:(e,t)=>d8(e,t.mime)};function cr(e){let t={},n=e._zod.def;for(let r of e._zod.traits.has("$ZodCheck")?[e,...n.checks??[]]:n.checks??[])cn[r._zod.def.check]?.(t,r._zod.def);let r=e._zod.bag;for(let e of(void 0!==r.minimum&&d3(t,"minimum",r.minimum),void 0!==r.exclusiveMinimum&&d3(t,"exclusiveMinimum",r.exclusiveMinimum),void 0!==r.maximum&&d2(t,"maximum",r.maximum),void 0!==r.exclusiveMaximum&&d2(t,"exclusiveMaximum",r.exclusiveMaximum),void 0!==r.multipleOf&&d5(t,r.multipleOf),void 0!==r.format&&(t.format??(t.format=r.format),r.format.includes("int")&&(t.isInt=!0)),r.mime&&d8(t,r.mime),r.patterns??[]))d4(t,e);return t}var ci={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},co=new Map([[uC,/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/],[uM,/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/]]),ca=e=>co.get(e)??e;function cs(e){let t=e._zod.def;return"pipe"===t.type&&t.in._zod.traits.has("$ZodTransform")?cs(t.out):"catch"===t.type?cs(t.innerType):e._zod.optin}var cl=Symbol();function cu(e,t,n,r,i){let o=!1,a=JSON.stringify(e,(e,t)=>"bigint"!=typeof t?t:(o=!0,null));return o?(dq(t,n,r,i,"BigInt defaults cannot be represented in JSON Schema"),cl):JSON.parse(a)}var cd=(e,t,n,r)=>{let i=e._zod.def;dH(i.innerType,t,r),t.seen.get(e).ref=i.innerType},cc=new WeakSet([Object.prototype,Error.prototype]);function cf(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var cm=li("ZodError",(e,t)=>{lm.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);cc.has(n)||(cc.add(n),cf(n,"format",e=>t=>(function(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let o of e.issues)if("invalid_union"===o.code&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if("invalid_key"===o.code)r({issues:o.issues},[...i,...o.path]);else if("invalid_element"===o.code)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(0===e.length)n._errors.push(t(o));else{let r=n,i=0;for(;it=>(function(e,t=e=>e.message){let n={},r=[];for(let a of e.issues)if(a.path.length>0){var i,o;(i=a.path[0],o=()=>[],!Object.prototype.hasOwnProperty.call(n,i)&&("__proto__"===i?Object.defineProperty(n,i,{value:o(),writable:!0,enumerable:!0,configurable:!0}):n[i]=o()),n[i]).push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}})(e,t)),cf(n,"addIssue",e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,aQ,2)}),cf(n,"addIssues",e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,aQ,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return 0===this.issues.length}}))},void 0,{Parent:Error}),cp=lh(cm),ch=lF(cm),cF=lg(cm),cg=lP(cm),c_=(i=lh(cm),o=(e,t,n,r)=>i(e,t,n?{...n,direction:"backward"}:{direction:"backward"},lp(o,r))),cP=(a=lh(cm),s=(e,t,n,r)=>a(e,t,n,lp(s,r))),cD=(l=lF(cm),u=async(e,t,n,r)=>{let i=n?{...n,direction:"backward"}:{direction:"backward"};return await l(e,t,i,lp(u,r))}),cb=(d=lF(cm),c=async(e,t,n,r)=>await d(e,t,n,lp(c,r))),cy=(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return lg(cm)(e,t,r)},cw=(e,t,n)=>lg(cm)(e,t,n),cE=async(e,t,n)=>{let r=n?{...n,direction:"backward"}:{direction:"backward"};return lP(cm)(e,t,r)},cA=async(e,t,n)=>lP(cm)(e,t,n);function cv(){ls.memoizer||ll({memoizer:dO})}var cS=li("ZodType",(e,t)=>(ls.localeError||ll({localeError:(()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}},t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function r(e,t){return"number"!==e||"number"!=typeof t||Number.isFinite(t)?n[e]??e:String(t)}return n=>{switch(n.code){case"invalid_type":{let e=r(n.expected),t=r(sq(n.input),n.input);return`Invalid input: expected ${e}, received ${t}`}case"invalid_value":if(1===n.values.length)return`Invalid input: expected ${sy(n.values[0])}`;return`Invalid option: expected one of ${aJ(n.values,"|")}`;case"too_big":{let t=n.exact?"exactly ":n.inclusive?"<=":"<",r=e[n.origin]??null;if(r)return`Too big: expected ${n.origin??"value"} to have ${t}${n.maximum.toString()} ${r.unit??"elements"}`;return`Too big: expected ${n.origin??"value"} to be ${t}${n.maximum.toString()}`}case"too_small":{let t=n.exact?"exactly ":n.inclusive?">=":">",r=e[n.origin]??null;if(r)return`Too small: expected ${n.origin} to have ${t}${n.minimum.toString()} ${r.unit}`;return`Too small: expected ${n.origin} to be ${t}${n.minimum.toString()}`}case"invalid_format":if("starts_with"===n.format)return`Invalid string: must start with "${n.prefix}"`;if("ends_with"===n.format)return`Invalid string: must end with "${n.suffix}"`;if("includes"===n.format)return`Invalid string: must include "${n.includes}"`;if("regex"===n.format)return`Invalid string: must match pattern ${n.pattern}`;return`Invalid ${t[n.format]??n.format}`;case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${aJ(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":if(n.options&&Array.isArray(n.options)&&n.options.length>0){let e=n.options.map(e=>`\'${e}\'`).join(" | ");return`Invalid discriminator value. Expected ${e}`}if(!1===n.inclusive)return"Invalid input: more than one option matched";return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}})()}),ur.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(az.mergeDefs(t,{checks:[...t.checks??[],...e.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return sP(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(function(e,t={}){return new fC({type:"custom",check:"custom",fn:e,...sD(t)})}(e,t))},superRefine(e,t){return this.check(function(e,t){var n;let r,i;return n=t=>(t.addIssue=e=>{"string"==typeof e?t.issues.push(sH(e,t.value,r._zod.def)):(e.fatal&&(e.continue=!1),e.code??(e.code="custom"),"input"in e||(e.input=t.value),e.inst??(e.inst=r),e.continue??(e.continue=!r._zod.def.abort),t.issues.push(sH(e)))},e(t.value,t)),(i=new lH({check:"custom",...sD(t)}))._zod.check=n,r=i}(e,t))},overwrite(e){return this.check(dU(e))},optional(){return fD(this)},exactOptional(){var e;return e=this,new fb({type:"optional",innerType:e})},nullable(){return fw(this)},nullish(){return fD(fw(this))},nonoptional(e){var t,n;return t=this,n=e,new fv({type:"nonoptional",innerType:t,...az.normalizeParams(n)})},array(){return fr(this)},or(e){return fs([this,e])},and(e){var t;return t=this,new fd({type:"intersection",left:t,right:e})},transform(e){return fx(this,f_(e))},default(e){var t,n;return t=this,n=e,new fE({type:"default",innerType:t,get defaultValue(){return"function"==typeof n?n():az.shallowClone(n)}})},prefault(e){var t,n;return t=this,n=e,new fA({type:"prefault",innerType:t,get defaultValue(){return"function"==typeof n?n():az.shallowClone(n)}})},catch(e){var t,n;return t=this,new fS({type:"catch",innerType:t,catchValue:"function"==typeof(n=e)?n:az.constantCatch(n)})},pipe(e){return fx(this,e)},readonly(){var e;return e=this,new fO({type:"readonly",innerType:e})},describe(e){let t=this.clone();return dN.add(t,{description:e}),t},meta(...e){if(0===e.length)return dN.get(this);let t=this.clone();return dN.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return 0===t.length?e(this):e(this,...t)},get"~standard"(){return az.hide(this,"~standard",{...ua(this),jsonSchema:{input:d1(this,"input"),output:d1(this,"output")}})},set"~standard"(e){az.own(this,"~standard",e)},parse:function e(t,n){return cp(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ch(this,t,n,{callee:e})},safeParse(e,t){return cF(this,e,t)},async safeParseAsync(e,t){return cg(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){az.own(this,"spa",e)},validate(e,t){let n=this._zod.bag.validator;if(void 0!==n){if(n(e)!==lD)return!0;if(!0===n.definite&&void 0===t)return!1}return function(e,t,n){let r,i=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;if(o?(i[lb]=!0,r=o({value:t,issues:[]},i)):r=e._zod.run({value:t,issues:[]},i),r instanceof Promise)throw new lo;return 0===r.issues.length}(this,e,t)},validateAsync(e,t){return ly(this,e,t)},encode:function e(t,n){return c_(this,t,n,{callee:e})},decode:function e(t,n){return cP(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await cD(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await cb(this,t,n,{callee:e})},safeEncode(e,t){return cy(this,e,t)},safeDecode(e,t){return cw(this,e,t)},async safeEncodeAsync(e,t){return cE(this,e,t)},async safeDecodeAsync(e,t){return cA(this,e,t)},toJSONSchema(e){return((e,t={})=>n=>{let r=dW({...n,processors:t});return dH(e,r),dZ(r,e),d0(r,e)})(this,{})(e)},get description(){return dN.get(this)?.description},get _def(){return this._zod.def}}),ck=li("_ZodString",(e,t)=>{us.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n)=>{n.type="string";let{minimum:r,maximum:i,format:o,patterns:a,contentEncoding:s,laxFormat:l}=cr(e);if("number"==typeof r&&(n.minLength=r),"number"==typeof i&&(n.maxLength=i),o&&(n.format=ci[o]??o,""===n.format&&delete n.format,("time"===o||l)&&delete n.format),s&&(n.contentEncoding=s),a&&a.size>0){let e=[...a].map(ca);1===e.length?n.pattern=e[0].source:e.length>1&&(n.allOf=[...e.map(e=>({..."draft-07"===t.target||"draft-04"===t.target||"openapi-3.0"===t.target?{type:"string"}:{},pattern:e.source}))])}})(e,t,n)},az.derived({format:e=>cr(e).format??null,minLength:e=>cr(e).minimum??null,maxLength:e=>cr(e).maximum??null},{regex(...e){return this.check(function(e,t){return new l6({check:"string_format",format:"regex",...sD(t),pattern:e})}(...e))},includes(...e){return this.check(function(e,t){return new l8({check:"string_format",format:"includes",...sD(t),includes:e})}(...e))},startsWith(...e){return this.check(function(e,t){return new l7({check:"string_format",format:"starts_with",...sD(t),prefix:e})}(...e))},endsWith(...e){return this.check(function(e,t){return new l9({check:"string_format",format:"ends_with",...sD(t),suffix:e})}(...e))},min(...e){return this.check(d$(...e))},max(...e){return this.check(dL(...e))},length(...e){return this.check(dz(...e))},nonempty(...e){return this.check(d$(1,...e))},lowercase(e){return this.check(new l5({check:"string_format",format:"lowercase",...sD(e)}))},uppercase(e){return this.check(new l4({check:"string_format",format:"uppercase",...sD(e)}))},trim(){return this.check(dU(e=>e.trim()))},normalize(...e){return this.check(function(e){return dU(t=>t.normalize(e))}(...e))},toLowerCase(){return this.check(dU(e=>e.toLowerCase()))},toUpperCase(){return this.check(dU(e=>e.toUpperCase()))},slugify(){return this.check(dU(e=>sl(e)))}})),cx=li("ZodString",(e,t)=>{us.init(e,t),ck.init(e,t)},{email(e){return this.check(new cM({type:"string",format:"email",check:"string_format",abort:!1,...sD(e)}))},url(e){return this.check(new cB({type:"string",format:"url",check:"string_format",abort:!1,...sD(e)}))},jwt(e){return this.check(new c0({type:"string",format:"jwt",check:"string_format",abort:!1,...sD(e)}))},emoji(e){return this.check(new cL({type:"string",format:"emoji",check:"string_format",abort:!1,...sD(e)}))},guid(e){return this.check(new cR({type:"string",format:"guid",check:"string_format",abort:!1,...sD(e)}))},uuid(e){return this.check(new cT({type:"string",format:"uuid",check:"string_format",abort:!1,...sD(e)}))},uuidv4(e){return this.check(new cT({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...sD(e)}))},uuidv6(e){return this.check(new cT({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...sD(e)}))},uuidv7(e){return this.check(new cT({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...sD(e)}))},nanoid(e){return this.check(new c$({type:"string",format:"nanoid",check:"string_format",abort:!1,...sD(e)}))},cuid(e){return this.check(new cz({type:"string",format:"cuid",check:"string_format",abort:!1,...sD(e)}))},cuid2(e){return this.check(new cU({type:"string",format:"cuid2",check:"string_format",abort:!1,...sD(e)}))},ulid(e){return this.check(new cV({type:"string",format:"ulid",check:"string_format",abort:!1,...sD(e)}))},base64(e){return this.check(new cQ({type:"string",format:"base64",check:"string_format",abort:!1,...sD(e)}))},base64url(e){return this.check(new cX({type:"string",format:"base64url",check:"string_format",abort:!1,...sD(e)}))},xid(e){return this.check(new cW({type:"string",format:"xid",check:"string_format",abort:!1,...sD(e)}))},ksuid(e){return this.check(new cq({type:"string",format:"ksuid",check:"string_format",abort:!1,...sD(e)}))},ipv4(e){return this.check(new cH({type:"string",format:"ipv4",check:"string_format",abort:!1,...sD(e)}))},ipv6(e){return this.check(new cK({type:"string",format:"ipv6",check:"string_format",abort:!1,...sD(e)}))},cidrv4(e){return this.check(new cZ({type:"string",format:"cidrv4",check:"string_format",abort:!1,...sD(e)}))},cidrv6(e){return this.check(new cJ({type:"string",format:"cidrv6",check:"string_format",abort:!1,...sD(e)}))},e164(e){return this.check(new cY({type:"string",format:"e164",check:"string_format",abort:!1,...sD(e)}))},datetime(e){return this.check(new cI({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...sD(e)}))},date(e){return this.check(new cN({type:"string",format:"date",check:"string_format",...sD(e)}))},time(e){return this.check(new cC({type:"string",format:"time",check:"string_format",precision:null,...sD(e)}))},duration(e){return this.check(new cj({type:"string",format:"duration",check:"string_format",...sD(e)}))}});function cG(e){return new cx(dC({type:"string",...sD(e)}))}var cO=li("ZodStringFormat",(e,t)=>{ul.init(e,t),ck.init(e,t)}),cI=li("ZodISODateTime",(e,t)=>{uw.init(e,t),cO.init(e,t)}),cN=li("ZodISODate",(e,t)=>{uE.init(e,t),cO.init(e,t)}),cC=li("ZodISOTime",(e,t)=>{uA.init(e,t),cO.init(e,t)}),cj=li("ZodISODuration",(e,t)=>{uv.init(e,t),cO.init(e,t)}),cM=li("ZodEmail",(e,t)=>{uc.init(e,t),cO.init(e,t)}),cR=li("ZodGUID",(e,t)=>{uu.init(e,t),cO.init(e,t)}),cT=li("ZodUUID",(e,t)=>{ud.init(e,t),cO.init(e,t)}),cB=li("ZodURL",(e,t)=>{uh.init(e,t),cO.init(e,t)}),cL=li("ZodEmoji",(e,t)=>{uF.init(e,t),cO.init(e,t)}),c$=li("ZodNanoID",(e,t)=>{ug.init(e,t),cO.init(e,t)}),cz=li("ZodCUID",(e,t)=>{u_.init(e,t),cO.init(e,t)}),cU=li("ZodCUID2",(e,t)=>{uP.init(e,t),cO.init(e,t)}),cV=li("ZodULID",(e,t)=>{uD.init(e,t),cO.init(e,t)}),cW=li("ZodXID",(e,t)=>{ub.init(e,t),cO.init(e,t)}),cq=li("ZodKSUID",(e,t)=>{uy.init(e,t),cO.init(e,t)}),cH=li("ZodIPv4",(e,t)=>{uS.init(e,t),cO.init(e,t)}),cK=li("ZodIPv6",(e,t)=>{uG.init(e,t),cO.init(e,t)}),cZ=li("ZodCIDRv4",(e,t)=>{uO.init(e,t),cO.init(e,t)}),cJ=li("ZodCIDRv6",(e,t)=>{uI.init(e,t),cO.init(e,t)}),cQ=li("ZodBase64",(e,t)=>{uj.init(e,t),cO.init(e,t)}),cX=li("ZodBase64URL",(e,t)=>{uR.init(e,t),cO.init(e,t)}),cY=li("ZodE164",(e,t)=>{uT.init(e,t),cO.init(e,t)}),c0=li("ZodJWT",(e,t)=>{uB.init(e,t),cO.init(e,t)}),c1=li("ZodNumber",(e,t)=>{uL.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let{minimum:i,maximum:o,multipleOf:a,exclusiveMaximum:s,exclusiveMinimum:l,isInt:u}=cr(e);n.type=u?"integer":"number";let d="number"==typeof l&&l>=(i??-1/0),c="number"==typeof s&&s<=(o??1/0),f="draft-04"===t.target||"openapi-3.0"===t.target;if(d?f?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:"number"==typeof i&&(n.minimum=i),c?f?(n.maximum=s,n.exclusiveMaximum=!0):n.exclusiveMaximum=s:"number"==typeof o&&(n.maximum=o),a){let i=new Set;for(let o of a)Number.isFinite(o)&&0!==o?i.add(Math.abs(o)):dq(e,t,n,r,`A multipleOf divisor of ${o} cannot be represented in JSON Schema`);let[o,...s]=i;void 0!==o&&(n.multipleOf=o),s.length&&(n.allOf=[...n.allOf??[],...s.map(e=>({multipleOf:e}))])}})(e,t,n,r),e.isFinite=!0},az.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=cr(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=cr(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=cr(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>cr(e).format??null},{gt(e,t){return this.check(dR(e,t))},gte(e,t){return this.check(dT(e,t))},min(e,t){return this.check(dT(e,t))},lt(e,t){return this.check(dj(e,t))},lte(e,t){return this.check(dM(e,t))},max(e,t){return this.check(dM(e,t))},int(e){return this.check(c6(e))},safe(e){return this.check(c6(e))},positive(e){return this.check(dR(0,e))},nonnegative(e){return this.check(dT(0,e))},negative(e){return this.check(dj(0,e))},nonpositive(e){return this.check(dM(0,e))},multipleOf(e,t){return this.check(dB(e,t))},step(e,t){return this.check(dB(e,t))},finite(){return this}}));function c3(e){return new c1(dC({type:"number",checks:[],...sD(e)}))}var c2=li("ZodNumberFormat",(e,t)=>{u$.init(e,t),c1.init(e,t)});function c6(e){return new c2({type:"number",check:"number_format",abort:!1,format:"safeint",...sD(e)})}var c5=li("ZodBoolean",(e,t)=>{uz.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.type="boolean"}});function c4(e){return new c5({type:"boolean",...sD(e)})}var c8=li("ZodUnknown",(e,t)=>{uU.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function c7(){return new c8({type:"unknown"})}var c9=li("ZodNever",(e,t)=>{uV.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(e,t,n)=>{t.not={}}});function fe(e){return new c9({type:"never",...sD(e)})}var ft=li("ZodDate",(e,t)=>{uW.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{dq(e,t,n,r,"Date cannot be represented in JSON Schema")},e.min=(t,n)=>e.check(dT(t,n)),e.max=(t,n)=>e.check(dM(t,n))},az.derived({minDate:e=>{let{minimum:t}=cr(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=cr(e);return t?new Date(t):null}},{})),fn=li("ZodArray",(e,t)=>{cv(),uK.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,{minimum:o,maximum:a}=cr(e);"number"==typeof o&&(n.minItems=o),"number"==typeof a&&(n.maxItems=a),n.type="array",n.items=dH(i.element,t,{...r,path:[...r.path,"items"]})})(e,t,n,r),e.element=t.element},{min(e,t){return this.check(d$(e,t))},nonempty(e){return this.check(d$(1,e))},max(e,t){return this.check(dL(e,t))},length(e,t){return this.check(dz(e,t))},unwrap(){return this.element}});function fr(e,t){return new fn({type:"array",element:e,...sD(t)})}var fi=li("ZodObject",(e,t)=>{cv(),u0.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def,o=i.shape;if(Object.getOwnPropertySymbols(o).length&&dq(e,t,n,r,"Symbol keys cannot be represented in JSON Schema"))return;for(let e in n.type="object",n.properties={},o)a4(n.properties,e,dH(o[e],t,{...r,path:[...r.path,"properties",e]}));let a=[];for(let e of Object.keys(o)){let n=i.shape[e];("input"===t.io?void 0===cs(n):void 0===n._zod.optout)&&a.push(e)}a.length>0&&(n.required=a),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=dH(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):"output"===t.io&&(n.additionalProperties=!1)})(e,t,n,r),az.installLazyProp(e,"shape",e=>e._zod.def.shape,!1)},{keyof(){return fp(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(az.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(az.mergeDefs(this._zod.def,{catchall:c7()}))},loose(){return this.clone(az.mergeDefs(this._zod.def,{catchall:c7()}))},strict(){return this.clone(az.mergeDefs(this._zod.def,{catchall:fe()}))},strip(){return this.clone(az.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return az.extend(this,e)},safeExtend(e){return az.safeExtend(this,e)},merge(e){return az.merge(this,e)},pick(e){return az.pick(this,e)},omit(e){return az.omit(this,e)},partial(...e){return az.partial(fP,this,e[0])},exactPartial(...e){return az.partial(fb,this,e[0],"exactPartial")},required(...e){return az.required(fv,this,e[0])}});function fo(e,t){return new fi({type:"object",shape:e??{},...az.normalizeParams(t)})}var fa=li("ZodUnion",(e,t)=>{u3.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=!1===(i=e._zod.def).inclusive,a=i.options.map((e,n)=>dH(e,t,{...r,path:[...r.path,o?"oneOf":"anyOf",n]})),void(o?n.oneOf=a:n.anyOf=a)},e.options=t.options});function fs(e,t){return new fa({type:"union",options:e,...az.normalizeParams(t)})}var fl=li("ZodDiscriminatedUnion",(e,t)=>{fa.init(e,t),u6.init(e,t)});function fu(e,t,n){return new fl({type:"union",options:t,discriminator:e,...az.normalizeParams(n)})}var fd=li("ZodIntersection",(e,t)=>{u5.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a,s,l;return o=dH((i=e._zod.def).left,t,{...r,path:[...r.path,"allOf",0]}),a=dH(i.right,t,{...r,path:[...r.path,"allOf",1]}),void(n.allOf=l=[...(s=e=>"allOf"in e&&1===Object.keys(e).length)(o)?o.allOf:[o],...s(a)?a.allOf:[a]],t.intersections.push(l))}}),fc=li("ZodTuple",(e,t)=>{cv(),u8.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;n.type="array";let o="draft-2020-12"===t.target?"prefixItems":"items",a="draft-2020-12"===t.target||"openapi-3.0"===t.target?"items":"additionalItems",s=i.items.map((e,n)=>dH(e,t,{...r,path:[...r.path,o,n]})),l=i.rest?dH(i.rest,t,{...r,path:[...r.path,a,..."openapi-3.0"===t.target?[i.items.length]:[]]}):null,u=i.items.length;for(;u>0;){let e=i.items[u-1];if(!("input"===t.io?void 0!==cs(e):"optional"===e._zod.optout))break;u--}let d=i.items.length,c=!i.rest;"draft-2020-12"===t.target?(n.prefixItems=s,c?n.items=!1:l&&(n.items=l)):"openapi-3.0"===t.target?(n.items={anyOf:s},l&&n.items.anyOf.push(l)):(n.items=s,c?n.additionalItems=!1:l&&(n.additionalItems=l)),u>0&&(n.minItems=u),c&&(n.maxItems=d);let{minimum:f,maximum:m}=cr(e);"number"==typeof f&&(n.minItems=f),"number"==typeof m&&(n.maxItems=m)})(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(e=>new fP({type:"optional",innerType:e}))})}});function ff(e,t,n){let r=t instanceof ur,i=r?n:t;return new fc({type:"tuple",items:e,rest:r?t:null,...az.normalizeParams(i)})}var fm=li("ZodEnum",(e,t)=>{dt.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t)=>{let n=aZ(e._zod.def.entries);if(0===n.length){t.not={};return}n.every(e=>"number"==typeof e)&&(t.type="number"),n.every(e=>"string"==typeof e)&&(t.type="string"),t.enum=n})(e,n),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new fm({...t,checks:[],...az.normalizeParams(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new fm({...t,checks:[],...az.normalizeParams(r),entries:i})}});function fp(e,t){return new fm({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...az.normalizeParams(t)})}var fh=li("ZodLiteral",(e,t)=>{dn.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(0===i.values.length){n.not={};return}let o=[];for(let a of i.values)if(void 0===a){if(dq(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if("bigint"==typeof a){if(dq(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(0===o.length);else if(1===o.length){let e=o[0];n.type=null===e?"null":typeof e,"draft-04"===t.target||"openapi-3.0"===t.target?n.enum=[e]:n.const=e}else o.every(e=>"number"==typeof e)&&(n.type="number"),o.every(e=>"string"==typeof e)&&(n.type="string"),o.every(e=>"boolean"==typeof e)&&(n.type="boolean"),o.every(e=>null===e)&&(n.type="null"),n.enum=o})(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function fF(e,t){return new fh({type:"literal",values:Array.isArray(e)?e:[e],...az.normalizeParams(t)})}var fg=li("ZodTransform",(e,t)=>{cv(),dr.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{dq(e,t,n,r,"Transforms cannot be represented in JSON Schema")},e._zod.parse=(n,r)=>{if("backward"===r.direction)throw new la(e.constructor.name);n.addIssue=r=>{"string"==typeof r?n.issues.push(az.issue(r,n.value,t)):(r.fatal&&(r.continue=!1),r.code??(r.code="custom"),"input"in r||(r.input=n.value),r.inst??(r.inst=e),n.issues.push(az.issue(r)))};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function f_(e){return new fg({type:"transform",transform:e})}var fP=li("ZodOptional",(e,t)=>{da.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fD(e){return new fP({type:"optional",innerType:e})}var fb=li("ZodExactOptional",(e,t)=>{ds.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),fy=li("ZodNullable",(e,t)=>{dl.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=dH((i=e._zod.def).innerType,t,r),a=t.seen.get(e),void("openapi-3.0"===t.target?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}])},e.unwrap=()=>e._zod.def.innerType});function fw(e){return new fy({type:"nullable",innerType:e})}var fE=li("ZodDefault",(e,t)=>{du.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o;return dH((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,void((o=cu(i.defaultValue,e,t,n,r))!==cl&&(n.default=o))},e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),fA=li("ZodPrefault",(e,t)=>{dc.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i=e._zod.def;if(dH(i.innerType,t,r),t.seen.get(e).ref=i.innerType,"input"!==t.io)return;let o=cu(i.defaultValue,e,t,n,r);o!==cl&&(n._prefault=o)})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),fv=li("ZodNonOptional",(e,t)=>{df.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;dH((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType},e.unwrap=()=>e._zod.def.innerType}),fS=li("ZodCatch",(e,t)=>{dh.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>((e,t,n,r)=>{let i,o=e._zod.def;dH(o.innerType,t,r),t.seen.get(e).ref=o.innerType;try{i=o.catchValue(void 0)}catch{dq(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i})(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),fk=li("ZodPipe",(e,t)=>{dF.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i,o,a;return o=(i=e._zod.def).in._zod.traits.has("$ZodTransform"),void(dH(a="input"===t.io?o?i.out:i.in:i.out,t,r),t.seen.get(e).ref=a)},e.in=t.in,e.out=t.out});function fx(e,t){return new fk({type:"pipe",in:e,out:t})}var fG=li("ZodPreprocess",(e,t)=>{fk.init(e,t),d_.init(e,t)}),fO=li("ZodReadonly",(e,t)=>{dP.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;dH((i=e._zod.def).innerType,t,r),t.seen.get(e).ref=i.innerType,n.readOnly=!0},e.unwrap=()=>e._zod.def.innerType}),fI=li("ZodLazy",(e,t)=>{db.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{let i;dH(i=e._zod.innerType,t,r),t.seen.get(e).ref=i},e.unwrap=()=>e._zod.def.getter()});function fN(e){return new fI({type:"lazy",getter:e})}var fC=li("ZodCustom",(e,t)=>{dy.init(e,t),cS.init(e,t),e._zod.processJSONSchema=(t,n,r)=>{dq(e,t,n,r,"Custom types cannot be represented in JSON Schema")}});function fj(e,t){return new fG({type:"pipe",in:f_(e),out:t})}var fM=(("document"in globalThis||"WorkerGlobalScope"in globalThis)&&ll({jitless:!0}),fo),fR=Symbol.for("@embedpdf/engine-core/reading");function fT(e,t){e._zod.def[fR]=t}function fB(e){return fT(e,{closed:!0}),e}function fL(e,t,n=e=>e,r=e=>e){let{discriminator:i}=e.def,o=fj(o=>{if("object"!=typeof o||null===o||Array.isArray(o))return o;let a=r(o),s=a[i];return"string"!=typeof s||function(e,t){let n=e._zod,r=n.bag.optionsMap;r||(r=u2(n.def),n.bag.optionsMap=r);let i=r.get(t);if(null===i)throw Error(`Ambiguous discriminator value "${String(t)}"`);return i}(e,s)?a:n({...a,[i]:t})},e);return fT(o,{unknownAs:t}),o}var f$=fM({kind:fB(fF("objectNumber")),objectNumber:c3().int().positive()}),fz=cG().regex(/^#[0-9a-fA-F]{6}$/,"expected a color as \'#rrggbb\'"),fU=fB(fp(["solid","dashed","beveled","inset"])),fV=fB(fp(["solid","dashed","beveled","inset","underline"])),fW=fB(fp(["check","cross","star","circle","square","diamond"])),fq=fB(fp(["caption","image","caption-below","caption-above","caption-right","caption-left","caption-over"])),fH=fp(["solid","dashed"]),fK=fr(c3().nonnegative()).min(1),fZ=fB(fp(["none","square","circle","diamond","open-arrow","closed-arrow","butt","r-open-arrow","r-closed-arrow","slash"])),fJ=fM({start:fZ,end:fZ});fp(Z);var fQ=fB(fp(["left","center","right"])),fX=fB(fp(["free-text","free-text-callout","free-text-typewriter"])),fY=fp(["free-text","free-text-callout"]),f0=fB(fp(["top","middle","bottom"])),f1=fB(fF("replace")),f3=fB(fF("strikeout-text-edit")),f2=fB(fF("ink-highlight")),f6=fB(fp(["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"])),f5=fB(fu("kind",[fM({kind:fF("objectNumber"),page:f$,objectNumber:c3().int().positive()}),fM({kind:fF("baseIndex"),page:f$,baseIndex:c3().int().nonnegative()})])),f4=c3().nullable(),f8=fB(fu("kind",[fM({kind:fF("xyz"),page:f$,left:f4,top:f4,zoom:f4}),fM({kind:fF("fit"),page:f$}),fM({kind:fF("fitH"),page:f$,top:f4}),fM({kind:fF("fitV"),page:f$,left:f4}),fM({kind:fF("fitR"),page:f$,left:c3(),bottom:c3(),right:c3(),top:c3()}),fM({kind:fF("fitB"),page:f$}),fM({kind:fF("fitBH"),page:f$,top:f4}),fM({kind:fF("fitBV"),page:f$,left:f4})])),f7=fB(fu("kind",[fM({kind:fF("xyz"),page:f$,x:f4,y:f4,zoom:f4}),fM({kind:fF("fit"),page:f$}),fM({kind:fF("fitH"),page:f$,y:f4}),fM({kind:fF("fitV"),page:f$,x:f4}),fM({kind:fF("fitR"),page:f$,x:c3(),y:c3(),width:c3().nonnegative(),height:c3().nonnegative()}),fM({kind:fF("fitB"),page:f$}),fM({kind:fF("fitBH"),page:f$,y:f4}),fM({kind:fF("fitBV"),page:f$,x:f4})]));function f9(e){let t=fM({kind:fF("goto"),destination:e}),n=fM({kind:fF("uri"),uri:cG()});return{read:fL(fu("kind",[t,n,fM({kind:fF("goto-remote"),file:cG()}),fM({kind:fF("launch"),path:cG()}),fM({kind:fF("javascript")}),fM({kind:fF("named"),name:cG()}),fM({kind:fF("unsupported")})]),"unsupported").describe("Where a link goes, by its `kind`. A newer server can add kinds: read one your client doesn\'t know as `unsupported`."),write:fu("kind",[t,n,fM({kind:fF("named"),name:fp(["NextPage","PrevPage","FirstPage","LastPage"])})])}}var me=f9(f7),mt=f9(f8),mn=me.read,mr=me.write,mi=mt.read,mo=mt.write,ma=fB(fu("kind",[fM({kind:fF("name"),name:cG()}),fM({kind:fF("objectNumber"),objectNumber:c3().int().positive()})])),ms={exclude:c4(),includeNoValueFields:c4(),format:fB(fp(["fdf","html","xfdf","pdf"])),method:fB(fp(["post","get"])),submitCoordinates:c4(),includeAppendSaves:c4(),includeAnnotations:c4(),canonicalFormat:c4(),exclNonUserAnnots:c4(),exclFKey:c4(),embedForm:c4()},ml=Object.fromEntries(Object.entries(ms).map(([e,t])=>[e,t.optional()]));function mu(e){let t={subtype:cG(),next:fr(fN(()=>i))},n=(e,n={})=>fM({type:fF(e),...t,...n}),r=[n("javascript",{script:cG()}),n("goto",{destination:e}),n("uri",{uri:cG(),isMap:c4()}),n("named",{name:cG()}),n("hide",{targets:fr(ma),hide:c4()}),n("reset-form",{fields:fr(ma).nullable(),exclude:c4()}),n("goto-remote",{filePath:cG()}),n("goto-embedded",{filePath:cG()}),n("launch",{filePath:cG()}),n("rendition",{script:cG().optional()}),n("submit-form",{payload:fM({url:cG(),fields:fr(ma).nullable(),...ms,charSet:cG().optional()}).optional()}),n("thread"),n("sound"),n("movie"),n("import-data"),n("set-ocg-state"),n("transition"),n("goto-3d-view"),n("unknown")],i=fN(()=>fL(fu("type",[...r]),"unknown").describe("An action, by its `type`. A newer server can add types: read one your client doesn\'t know as `unknown`, keeping its `subtype` and `next`.")),o=fM({root:i.nullable(),incomplete:c4(),warnings:fr(fB(fp(["cycle-dropped","malformed-next","incomplete","payload-dropped"])))});return{arms:r,node:i,tree:o,fieldActions:fM({keystroke:o.optional(),format:o.optional(),validate:o.optional(),calculate:o.optional()}),pageActions:fM({open:o.optional(),close:o.optional()}),annotationActions:fM({activate:o.optional(),cursorEnter:o.optional(),cursorExit:o.optional(),mouseDown:o.optional(),mouseUp:o.optional(),focus:o.optional(),blur:o.optional(),pageOpen:o.optional(),pageClose:o.optional(),pageVisible:o.optional(),pageInvisible:o.optional()}),documentActions:fM({nameTreeScripts:fr(fM({name:cG(),action:o})),openAction:o.nullable(),openDestination:e.nullable(),willClose:o.optional(),willSave:o.optional(),didSave:o.optional(),willPrint:o.optional(),didPrint:o.optional()}).superRefine((e,t)=>{null!==e.openAction&&null!==e.openDestination&&t.addIssue({code:"custom",message:"openAction and openDestination are mutually exclusive",path:["openDestination"]})})}}var md=mu(f7),mc=mu(f8);function mf(e){let t=()=>({next:fr(fN(()=>r)).optional()}),n=[fM({type:fF("javascript"),script:cG(),...t()}),fM({type:fF("goto"),destination:e,...t()}),fM({type:fF("uri"),uri:cG().min(1),...t()}),fM({type:fF("named"),name:cG().min(1),...t()}),fM({type:fF("hide"),targets:fr(ma).min(1),hide:c4(),...t()}),fM({type:fF("reset-form"),fields:fr(ma).nullable(),exclude:c4(),...t()}),fM({type:fF("submit-form"),url:cG().min(1),fields:fr(ma).nullable(),...ml,...t()})],r=fN(()=>fu("type",[...n])),i=()=>r.nullable().optional();return{node:r,widgetActions:fM({activate:i(),cursorEnter:i(),cursorExit:i(),mouseDown:i(),mouseUp:i(),focus:i(),blur:i(),pageOpen:i(),pageClose:i(),pageVisible:i(),pageInvisible:i()}).strict()}}var mm=mf(f7),mp=mf(f8);mm.node;var mh=mm.widgetActions,mF=mp.widgetActions;md.node,fp(md.arms.map(e=>e.shape.type.value)),md.tree;var mg=md.fieldActions;md.pageActions,md.documentActions;var m_=md.annotationActions,mP=mc.annotationActions,mD=fN(()=>fM({type:fF("javascript"),script:cG(),next:fr(mD).optional()})),mb=fM({keystroke:mD.nullable().optional(),format:mD.nullable().optional(),validate:mD.nullable().optional(),calculate:mD.nullable().optional()}),my=fM({x:c3(),y:c3()}),mw=fM({start:my,end:my}),mE=fs([ff([my,my]),ff([my,my,my])]),mA=fr(fr(my)),mv=fM({left:c3().finite(),bottom:c3().finite(),right:c3().finite(),top:c3().finite()});fM({width:c3().nonnegative(),height:c3().nonnegative()});var mS=fM({upperLeft:my,upperRight:my,lowerLeft:my,lowerRight:my}),mk=fB(fs([fF(0),fF(90),fF(180),fF(270)])),mx=fM({x:c3(),y:c3()}),mG=fM({x:c3().finite(),y:c3().finite(),width:c3().finite().nonnegative(),height:c3().finite().nonnegative()});function mO(e,t,n){let r=r=>mO(e,t,{...n,...r});return{read:e,write:t,traits:n,nullable:()=>r({readNullable:!0,writeNullable:!0}),nullableOnRead:()=>r({readNullable:!0}),optional:()=>r({required:!1}),readBack:()=>r({readBack:!0}),space:e=>r({space:e}),writes:t=>mO(e,t,n)}}fM({upperLeft:mx,upperRight:mx,lowerLeft:mx,lowerRight:mx});var mI=(e,t)=>({owner:e,readNullable:!1,writeNullable:!1,required:t,readBack:!1,space:"none"}),mN=e=>mO(e,e,mI("data",!0)),mC=e=>mO(e,e,mI("attribution",!1)),mj=e=>mO(e,e,mI("engine",!1)),mM={box:{read:mG,write:mG},linkTarget:{read:mn,write:mr},actions:{read:m_,write:mh}};function mR(e,t,n){let r={subtype:fB(fF(e))},i={subtype:fF(e)},o={subtype:fF(e).optional()},a={};for(let[e,s]of Object.entries(t)){let{owner:t,readNullable:l,writeNullable:u,required:d,readBack:c}=s.traits,f=n(s);if(r[e]=l?f.read.nullable():f.read,"data"===t){let t=u?f.write.nullable():f.write;i[e]=d?t:t.optional();let n=f.read===f.write?l||u?f.write.nullable():f.write:fs([t,r[e]]);o[e]=(c?n:t).optional(),c&&(a[e]=t)}else i[e]=c?r[e].optional():c7().optional(),o[e]=c?r[e].optional():c7().optional(),c&&(a[e]=null)}return{read:r,create:i,update:o,readBackWrites:a}}function mT(e,t,n={}){let r=mR(e,t,e=>e),i=mR(e,t,e=>mM[e.traits.space]??e);return{subtype:e,fields:t,resources:n,readSchema:fM(i.read),createSchema:fM(i.create).strict(),updateSchema:fM(i.update).strict(),fileSchemas:{read:fM(r.read),create:fM(r.create).strict(),update:fM(r.update).strict()},readBackWrites:r.readBackWrites,shapes:{read:i.read,create:i.create,update:i.update}}}var mB=cG().datetime({offset:!0,local:!0}),mL=fs([mB,new ft({type:"date",...sD(void 0)})]),m$=c3().finite().refine(e=>Number.isFinite(Math.fround(e)),"Outside PDF float range"),mz=fM({x:m$,y:m$}),mU=mz.strict(),mV=m$.refine(e=>Math.fround(e)>0,"Must be positive in PDF float precision"),mW=fM({unit:cG(),conversion:m$.optional(),fraction:fB(fp(["decimal","fraction","round","truncate"])).optional(),precision:c3().int().optional(),fixed:c4().optional(),thousands:cG().optional(),decimal:cG().optional(),prefixSpacing:cG().optional(),suffixSpacing:cG().optional(),labelPosition:fB(fp(["suffix","prefix"])).optional()}),mq=fM({subtype:fF("rectilinear"),ratio:cG().optional(),x:fr(mW),y:fr(mW).optional(),distance:fr(mW),area:fr(mW),angle:fr(mW).optional(),slope:fr(mW).optional(),origin:mz.optional(),cyx:m$.optional()}),mH=mW.extend({conversion:mV,precision:c3().int().min(1).max(0x7fffffff).optional()}).refine(eL,"Invalid number format precision"),mK=mq.extend({x:fr(mH),y:fr(mH).optional(),distance:fr(mH),area:fr(mH),angle:fr(mH).optional(),slope:fr(mH).optional(),cyx:mV.optional(),origin:mU.optional()}),mZ=fM({subtype:fF("geospatial")}),mJ=fM({subtype:fF("unknown")}),mQ=fs([mZ,mJ]);fM({measure:mK.nullable()});var mX=fL(fu("subtype",[mq,mZ,mJ]),"unknown").describe("A measure, by its `subtype`. A newer server can add subtypes: read one your client doesn\'t know as `unknown`."),mY=fM({bbox:mG,name:cG().nullable(),measure:mX.nullable(),owned:c4()});fM({viewports:fr(mY)});var m0=fB(fp(["line-arrow","line-dimension"])),m1=fB(fp(["polygon-cloud","polygon-dimension"])),m3=fB(fF("polyline-dimension")),m2=fM({along:m$,perpendicular:m$}).strict();fM({enabled:c4(),position:fp(["inline","top"]).optional(),offset:m2.optional()}).strict(),fM({enabled:c4(),center:mU.optional()}).strict();var m6=fM({length:m$,extension:m$.refine(e=>e>=0).optional(),offset:m$.refine(e=>e>=0).optional()}),m5=m6.strict(),m4=fB(fp(["left","center","right","justify"])),m8={family:cG().min(1),weight:c3().int().min(100).max(900),italic:c4(),size:c3().nonnegative(),color:fz,decoration:fr(fB(fp(["underline","line-through","word"]))),script:fB(fp(["normal","sub","super"])),letterSpacing:c3(),horizontalScale:c3().positive(),unknown:cG().optional()},m7={align:m4,dir:fB(fp(["ltr","rtl"])),lineHeight:c3().positive().optional(),margins:fM({top:c3(),bottom:c3(),left:c3(),right:c3()}).optional(),textIndent:c3().optional(),unknown:cG().optional()},m9=fM(m8).partial(),pe=fM({...m7,runs:fr(fM({text:cG(),style:m9.optional()}))}).partial({align:!0,dir:!0}),pt=fM({body:fM({...m8,...m7}),paragraphs:fr(pe)}),pn=fM({body:fM({...m8,...m7}).partial().optional(),paragraphs:fr(pe)}),pr=fM({to:f5,type:fB(fp(["reply","group"]))}),pi=fM({to:f5,type:fp(["reply","group"]).optional()}),po=cG().min(1),pa=()=>mN(c4()).optional(),ps={ref:mj(f5),page:mj(f$),hasAppearance:mj(c4()),appearanceState:mj(cG()).nullable(),structurePosition:mj(fr(c3().int().nonnegative())).nullable(),nm:mN(cG()).nullable().optional(),rect:mN(mv).space("box"),contents:mN(cG()).nullable().optional(),subject:mN(cG()).nullable().optional(),blendMode:mN(f6).optional(),invisible:pa(),hidden:pa(),print:pa(),noZoom:pa(),noRotate:pa(),noView:pa(),readOnly:pa(),locked:pa(),toggleNoView:pa(),lockedContents:pa(),reply:mN(pr).writes(pi).nullable().optional(),popup:mj(f5).nullable(),groupId:mN(cG().min(1)).nullable().optional(),author:mC(cG()).nullable(),createdAt:mC(mB).writes(mL).nullable(),modifiedAt:mC(mB).writes(mL).nullable(),userId:mC(cG()).nullable(),createdBy:mC(cG()).nullable(),modifiedBy:mC(cG()).nullable(),importedBy:mj(cG()).nullable(),actions:mO(p=mP,p,mI("preserved",!1)).nullable().space("actions")},pl={...ps,richText:mN(pt).writes(pn).nullable().optional().space("length")},pu={color:mN(fz).optional(),opacity:mN(c3().min(0).max(1)).optional()},pd={...pu,color:mN(fz).nullable().optional(),strokeWidth:mN(c3().nonnegative()).optional(),borderStyle:mN(fU).writes(fH).readBack().optional(),dashArray:mN(fr(c3().nonnegative())).writes(fK).nullable().optional()},pc={...pd,interiorColor:mN(fz).nullable().optional()},pf={rect:mj(mv).readBack().space("box")},pm={rotation:mN(c3()).nullable().optional()},pp={...pf,box:mN(mv).space("box").optional(),rotation:mN(c3()).nullable().optional()},ph={...pf,box:mN(mv).space("box").optional(),rotation:mN(mk).nullable().optional()},pF={...pl,...pu,...pf,quadPoints:mN(fr(mS).min(1)).space("quads")},pg={...pl,...pc,...pp,cloudyIntensity:mN(c3().positive()).nullable().optional()},p_={...pl,...pc,...pf,vertices:mN(fr(my)).space("points"),...pm},pP=mN(mX).writes(fs([mK,mQ])).nullable().optional().space("measure"),pD={captionEnabled:mN(c4()).nullable().optional(),captionCenter:mN(my).nullable().optional().space("point")},pb=mT("caret",{...pl,...pu,...pp,intent:mN(f1).nullable().optional()}),py={subtype:"caret",pdfSubtypeCode:14,dtoSchema:pb.readSchema,draftSchema:pb.createSchema,patchSchema:pb.updateSchema,readBackWrites:pb.readBackWrites},pw=mT("circle",pg),pE={subtype:"circle",pdfSubtypeCode:6,dtoSchema:pw.readSchema,draftSchema:pw.createSchema,patchSchema:pw.updateSchema,readBackWrites:pw.readBackWrites},pA=cG().min(1);fM({appearance:pA.optional(),file:pA.optional()}).strict(),fM({appearance:pA}).strict(),fM({appearance:pA.nullable()}).strict(),fM({image:pA.nullable()}).strict();var pv=fM({file:pA}).strict();fM({source:pA}).strict(),fM({image:pA}),fM({resources:pv,name:cG().min(1),mimeType:cG().optional(),description:cG().optional()}),fM({name:cG().min(1),mimeType:cG().optional(),description:cG().optional()});var pS=fM({name:cG(),mimeType:cG().nullable(),description:cG().nullable(),sizeBytes:c3().int().nonnegative().nullable(),md5:cG().nullable(),createdAt:mB.nullable(),modifiedAt:mB.nullable()});fM({kind:fB(fF("key")),key:cG().min(1)}),fM({ref:fM({kind:fB(fF("key")),key:cG()}),name:cG(),mimeType:cG().nullable(),description:cG().nullable(),sizeBytes:c3().int().nonnegative().nullable(),md5:cG().nullable(),createdAt:mB.nullable(),modifiedAt:mB.nullable(),index:c3().int().nonnegative()});var pk=fB(fp(["push-pin","paperclip","graph","tag"])),px=fM({name:cG().min(1),mimeType:cG().nullable().optional(),description:cG().nullable().optional()}),pG=mT("file-attachment",{...pl,...pu,icon:mN(pk).optional(),file:mN(pS).writes(px).nullable().optional()},{file:"required"}),pO=mT("free-text",{...pl,...pp,intent:mN(fX).writes(fY).readBack().optional(),fontFamily:mN(po).optional(),fontSize:mN(c3().positive()).optional(),textAlign:mN(m4).optional(),verticalAlign:mN(f0).optional(),richText:mN(pt).writes(pn).optional().space("length"),color:mN(fz).optional(),fontColor:mN(fz).optional(),interiorColor:mN(fz).nullable().optional(),opacity:mN(c3().min(0).max(1)).optional(),strokeWidth:mN(c3().nonnegative()).optional(),borderStyle:mN(fU).writes(fH).readBack().optional(),dashArray:mN(fr(c3().nonnegative())).writes(fK).nullable().optional(),cloudyIntensity:mN(c3().positive()).nullable().optional(),calloutLine:mN(mE).nullable().optional().space("calloutLine"),lineEnding:mN(fZ).nullable().optional()}),pI=mT("highlight",pF),pN=mT("ink",{...pl,...pd,strokeWidth:mN(c3().nonnegative()).writes(c3().positive()).readBack().optional(),...pf,inkList:mN(mA).writes(fr(fr(my).min(1)).min(1)).readBack().space("strokes"),intent:mN(f2).nullable().optional(),...pm}),pC=mT("line",{...pl,...pc,...pf,linePoints:mN(mw).space("linePoints"),lineEndings:mN(fJ).optional(),...pm,intent:mN(m0).nullable().optional(),measure:pP,captionEnabled:mN(c4()).optional(),captionPosition:mN(fB(fp(["inline","top"]))).optional(),captionOffset:mN(fM({along:c3(),perpendicular:c3()})).nullable().optional(),leader:mN(m6).writes(m5).nullable().optional()}),pj=mT("link",{...ps,target:mN(mi).writes(mo).nullable().readBack().space("linkTarget")}),pM=mT("polygon",{...p_,vertices:mN(fr(my)).writes(fr(my).min(3)).readBack().space("points"),...pD,intent:mN(m1).nullable().optional(),measure:pP,cloudyIntensity:mN(c3().positive()).nullable().optional()}),pR=mT("polyline",{...p_,vertices:mN(fr(my)).writes(fr(my).min(2)).readBack().space("points"),...pD,intent:mN(m3).nullable().optional(),measure:pP,lineEndings:mN(fJ).optional()}),pT=mT("popup",{...ps,parent:mN(f5).nullableOnRead().readBack(),open:mN(c4()).optional()}),pB=mT("redact",{...pl,...pu,rect:mN(mv).optional().space("box"),quadPoints:mN(fr(mS)).optional().space("quads"),interiorColor:mN(fz).nullable().optional(),overlayText:mN(cG()).nullable().optional(),repeat:mN(c4()).optional(),fontFamily:mN(po).optional(),fontSize:mN(c3().nonnegative()).optional(),fontColor:mN(fz).optional(),textAlign:mN(fQ).optional()}),pL=mT("square",pg),p$=mT("squiggly",pF),pz=fB(fp(["contain","cover","fill"])),pU=mT("stamp",{...pl,...pp,name:mN(cG()).nullable().optional(),fit:mN(pz).nullable().optional(),opacity:mN(c3().min(0).max(1)).optional()},{appearance:"required"}),pV=mT("strikeout",{...pF,intent:mN(f3).nullable().optional()}),pW=fB(fp(["comment","key","note","help","new-paragraph","paragraph","insert"])),pq=mT("text",{...pl,...pu,icon:mN(pW).optional(),open:mN(c4()).optional(),state:mN(cG().min(1)).nullable().optional(),stateModel:mN(cG().min(1)).nullable().optional()}),pH=mT("underline",pF),pK=mT("unsupported",{...ps,rawSubtypeCode:mj(c3().int()),rawSubtypeName:mj(cG()).nullable()}),pZ=fB(fu("kind",[fM({kind:fF("objectNumber"),objectNumber:c3().int().positive()}),fM({kind:fF("fqn"),name:cG().min(1)})])),pJ=mT("widget",{...ps,...ph,color:mN(fz).nullable().optional(),interiorColor:mN(fz).nullable().optional(),strokeWidth:mN(c3().nonnegative()).optional(),borderStyle:mN(fV).optional(),dashArray:mN(fr(c3().nonnegative())).writes(fK).nullable().optional(),fontFamily:mN(po).nullable().optional(),fontSize:mN(c3().nonnegative()).nullable().optional(),fontColor:mN(fz).nullable().optional(),textAlign:mN(fQ).optional(),caption:mN(cG()).nullable().optional(),checkStyle:mN(fW).nullable().optional(),layout:mN(fq).nullable().optional(),actions:mN(mP).writes(mF).readBack().nullable().optional().space("actions"),field:mj(pZ).nullable(),fieldKind:mj((h=fp(["text","checkbox","radio","combobox","listbox","pushbutton","signature","unknown"]),F="unknown",f=new Set(h.options),fT(m=fj(e=>"string"!=typeof e||f.has(e)?e:F,h),{unknownAs:F}),m).describe("Its field\'s family. A newer server can add families: read one your client doesn\'t know as `unknown`.")),hasMark:mj(c4())}),pQ=[pI,pH,p$,pV,pw,pL,pM,pR,pC,pj,pN,pO,pb,pq,pU,pG,pJ,pB,pT,pK];function pX(e){return pQ.find(t=>t.subtype===e)??null}var pY={subtype:"file-attachment",pdfSubtypeCode:17,dtoSchema:pG.readSchema,draftSchema:pG.createSchema,patchSchema:pG.updateSchema,readBackWrites:pG.readBackWrites},p0={subtype:"free-text",pdfSubtypeCode:3,dtoSchema:pO.readSchema,draftSchema:pO.createSchema,patchSchema:pO.updateSchema,readBackWrites:pO.readBackWrites},p1={subtype:"highlight",pdfSubtypeCode:9,dtoSchema:pI.readSchema,draftSchema:pI.createSchema,patchSchema:pI.updateSchema,readBackWrites:pI.readBackWrites},p3={subtype:"ink",pdfSubtypeCode:15,dtoSchema:pN.readSchema,draftSchema:pN.createSchema,patchSchema:pN.updateSchema,readBackWrites:pN.readBackWrites},p2={subtype:"line",pdfSubtypeCode:4,dtoSchema:pC.readSchema,draftSchema:pC.createSchema,patchSchema:pC.updateSchema,readBackWrites:pC.readBackWrites},p6={subtype:"link",pdfSubtypeCode:2,dtoSchema:pj.readSchema,draftSchema:pj.createSchema,patchSchema:pj.updateSchema,readBackWrites:pj.readBackWrites},p5={subtype:"polygon",pdfSubtypeCode:7,dtoSchema:pM.readSchema,draftSchema:pM.createSchema,patchSchema:pM.updateSchema,readBackWrites:pM.readBackWrites},p4={subtype:"polyline",pdfSubtypeCode:8,dtoSchema:pR.readSchema,draftSchema:pR.createSchema,patchSchema:pR.updateSchema,readBackWrites:pR.readBackWrites},p8={subtype:"popup",pdfSubtypeCode:16,dtoSchema:pT.readSchema,draftSchema:pT.createSchema,patchSchema:pT.updateSchema,readBackWrites:pT.readBackWrites},p7={subtype:"redact",pdfSubtypeCode:28,dtoSchema:pB.readSchema,draftSchema:pB.createSchema,patchSchema:pB.updateSchema,readBackWrites:pB.readBackWrites},p9={subtype:"square",pdfSubtypeCode:5,dtoSchema:pL.readSchema,draftSchema:pL.createSchema,patchSchema:pL.updateSchema,readBackWrites:pL.readBackWrites},he={subtype:"squiggly",pdfSubtypeCode:11,dtoSchema:p$.readSchema,draftSchema:p$.createSchema,patchSchema:p$.updateSchema,readBackWrites:p$.readBackWrites},ht={subtype:"stamp",pdfSubtypeCode:13,dtoSchema:pU.readSchema,draftSchema:pU.createSchema,patchSchema:pU.updateSchema,readBackWrites:pU.readBackWrites},hn={subtype:"strikeout",pdfSubtypeCode:12,dtoSchema:pV.readSchema,draftSchema:pV.createSchema,patchSchema:pV.updateSchema,readBackWrites:pV.readBackWrites},hr={subtype:"text",pdfSubtypeCode:1,dtoSchema:pq.readSchema,draftSchema:pq.createSchema,patchSchema:pq.updateSchema,readBackWrites:pq.readBackWrites},hi={subtype:"underline",pdfSubtypeCode:10,dtoSchema:pH.readSchema,draftSchema:pH.createSchema,patchSchema:pH.updateSchema,readBackWrites:pH.readBackWrites},ho={subtype:"unsupported",pdfSubtypeCode:0,dtoSchema:pK.readSchema,draftSchema:fe(),patchSchema:fe(),readBackWrites:pK.readBackWrites},ha=fj(e=>"object"!=typeof e||null===e||Array.isArray(e)?e:Q(e),pJ.readSchema),hs=pJ.createSchema,hl=pJ.updateSchema,hu={subtype:"widget",pdfSubtypeCode:20,dtoSchema:pJ.readSchema,draftSchema:hs,patchSchema:hl,readBackWrites:pJ.readBackWrites},hd=Object.fromEntries(rM.map(e=>[e,pJ.shapes.update[e]]));fM(hd).strict();var hc=[p1,hi,he,hn,pE,p9,p5,p4,p2,p6,p3,p0,py,hr,ht,pY,hu,p7,p8,ho],hf=Object.freeze(Object.fromEntries(hc.map(e=>[e.subtype,e])));fL(fu("subtype",[p1.dtoSchema,hi.dtoSchema,he.dtoSchema,hn.dtoSchema,pE.dtoSchema,p9.dtoSchema,p5.dtoSchema,p4.dtoSchema,p2.dtoSchema,p6.dtoSchema,p3.dtoSchema,p0.dtoSchema,py.dtoSchema,hr.dtoSchema,ht.dtoSchema,pY.dtoSchema,hu.dtoSchema,p7.dtoSchema,p8.dtoSchema,ho.dtoSchema]),"unsupported",e=>({...e,rawSubtypeCode:Number.isInteger(e.rawSubtypeCode)?e.rawSubtypeCode:0,rawSubtypeName:"string"==typeof e.rawSubtypeName?e.rawSubtypeName:null}),e=>"widget"===e.subtype?Q(e):e).describe("An annotation, by its `subtype`. A newer server can add subtypes: read one your client doesn\'t know as `unsupported`, keeping the fields every annotation has, with `rawSubtypeCode` 0 and `rawSubtypeName` null when the body has neither.");var hm=fu("subtype",[p1.draftSchema,hi.draftSchema,he.draftSchema,hn.draftSchema,pE.draftSchema,p9.draftSchema,p5.draftSchema,p4.draftSchema,p2.draftSchema,p6.draftSchema,p3.draftSchema,p0.draftSchema,py.draftSchema,hr.draftSchema,ht.draftSchema,pY.draftSchema,hu.draftSchema,p7.draftSchema,p8.draftSchema]);fs(hc.filter(e=>"unsupported"!==e.subtype).map(e=>e.patchSchema));var hp=fu("subtype",pQ.filter(e=>"unsupported"!==e.subtype).map(e=>e.fileSchemas.create)),hh={ref:f5.nullable(),objectNumber:c3().int().nonnegative(),page:f$.nullable()},hF=fM(hh),hg=fM({...hh,onState:cG(),exportValue:cG(),checked:c4()}),h_=fM({label:cG(),value:cG(),selected:c4()}),hP=fL(fu("kind",[fM({kind:fF("none")}),fM({kind:fF("scalar"),value:cG()}),fM({kind:fF("array"),values:fr(cG())}),fM({kind:fF("unsupported")})]),"unsupported").describe("A field\'s stored value, by its `kind`. A newer server can add kinds: read one your client doesn\'t know as `unsupported`."),hD=fL(fu("kind",[fM({kind:fF("date"),pattern:cG()}),fM({kind:fF("time"),pattern:cG()}),fM({kind:fF("other")})]),"other").describe("The shape a text field\'s or a dropdown\'s value has, by its `kind`: a date or a time with the pattern it is shown in, or `other` for a format script the engine does not recognise. A newer server can add kinds: read one your client doesn\'t know as `other`."),hb=cG().min(1).max(64).refine(ep,{message:"a date pattern is made of the groups yyyy yy mmmm mmm mm m dd d, at least one of them and the year, the month and the day each once at most, with spaces and / - . , between them, and at most one time such as HH:MM or h:MM:ss tt"}),hy=cG().min(1).max(64).refine(eF,{message:"a time pattern is a time and nothing else: HH, H, hh or h, then :MM, then :ss when it has seconds, then tt when it has one"}),hw=fu("kind",[fM({kind:fF("date"),pattern:hb}).strict(),fM({kind:fF("time"),pattern:hy}).strict()]),hE=cG().min(1).max(256).refine(rC,{message:"a purpose has no space at its start or its end, and no NUL character"}),hA=cG().min(1).max(256).refine(eN,{message:"a placeholder has no space at its start or its end, and no NUL character"}),hv=fB(fu("kind",[fM({kind:fF("group"),groupId:cG()}),fM({kind:fF("anyone")}),fM({kind:fF("unassigned")})])),hS=fM({signatureIndex:c3().int().nonnegative(),source:fB(fp(["fieldmdp","lock"]))}),hk={ref:pZ,name:cG(),origin:fB(fp(["acroform","recovered"])),readOnly:c4(),required:c4(),noExport:c4(),alternateName:cG().nullable(),mappingName:cG().nullable(),valueEntry:hP,defaultValueEntry:hP,actions:mg.optional(),groupId:cG().nullable(),assignment:hv,lockedBy:hS.nullable(),purpose:cG().nullable(),placeholder:cG().nullable(),createdBy:cG().nullable(),createdAt:mB.nullable(),filledBy:cG().nullable(),filledByName:cG().nullable(),filledAt:mB.nullable(),importedBy:cG().nullable(),widgets:fr(hF)},hx=fL(fu("kind",[fM({...hk,kind:fF("text"),value:cG(),defaultValue:cG(),maxLength:c3().int().positive().nullable(),multiline:c4(),password:c4(),comb:c4(),format:hD.nullable()}),fM({...hk,kind:fF("checkbox"),checked:c4(),exportValue:cG(),hasValuesList:c4().describe("Whether the field names its widgets\' values in a list (`/Opt`), as Acrobat does for values that repeat or aren\'t plain names: each widget\'s `exportValue` is then the list\'s entry at its place, and its `onState` only a key."),widgets:fr(hg)}),fM({...hk,kind:fF("radio"),value:cG(),radiosInUnison:c4(),noToggleToOff:c4(),hasValuesList:c4().describe("Whether the field names its widgets\' values in a list (`/Opt`), as Acrobat does for values that repeat or aren\'t plain names: each widget\'s `exportValue` is then the list\'s entry at its place, and its `onState` only a key."),widgets:fr(hg)}),fM({...hk,kind:fF("combobox"),value:cG(),defaultValue:cG(),edit:c4(),options:fr(h_),format:hD.nullable()}),fM({...hk,kind:fF("listbox"),selectedValues:fr(cG()),defaultValue:fr(cG()),multiSelect:c4(),options:fr(h_),topIndex:c3().int().nonnegative()}),fM({...hk,kind:fF("pushbutton"),hasImage:c4(),takesImage:c4().describe("Whether the push button is an image field, which a person fills with a picture: it has a widget, and every widget\'s press runs Acrobat\'s import-icon script (`event.target.buttonImportIcon()`) and nothing else.")}),fM({...hk,kind:fF("signature")}),fM({...hk,kind:fF("unknown"),rawValue:cG()})]),"unknown",e=>({...e,rawValue:"string"==typeof e.rawValue?e.rawValue:""}),e=>{var t;return"checkbox"!==(t=es(ej(en(el(ey(e)))))).kind&&"radio"!==t.kind||void 0!==t.hasValuesList?t:{...t,hasValuesList:!1}}).describe("A form field, by its `family`. A newer server can add families: read one your client doesn\'t know as `unknown`, keeping the fields every field has, with `rawValue` an empty string when the body has none.");fM({formKind:fB(fp(["none","acroform","xfa"])),needsAppearances:c4(),fields:fr(hx),widgets:fr(ha),calculationOrder:fr(pZ.nullable())}),fM({value:cG().nullable().optional(),checked:c4().optional(),selectedValues:fr(cG()).optional()}).strict().refine(e=>1===[e.value,e.checked,e.selectedValues].filter(e=>void 0!==e).length,{message:"exactly one of value, checked or selectedValues"});var hG=fM({page:f$,rect:mG.optional(),box:mG.optional(),rotation:mk.optional(),exportValue:cG().min(1).optional(),actions:mh.optional(),...hd}).strict(),hO=fM({label:cG(),value:cG()}),hI={name:cG().min(1),readOnly:c4().optional(),required:c4().optional(),noExport:c4().optional(),alternateName:cG().optional(),mappingName:cG().optional(),groupId:cG().min(1).max(256).nullable().optional(),assignment:hv.optional(),purpose:hE.nullable().optional(),placeholder:hA.nullable().optional(),actions:mb.optional(),widgets:fr(hG).optional()},hN=fu("kind",[fM({...hI,kind:fF("text"),defaultValue:cG().optional(),maxLength:c3().int().positive().optional(),multiline:c4().optional(),password:c4().optional(),comb:c4().optional(),format:hw.nullable().optional()}).strict(),fM({...hI,kind:fF("checkbox")}).strict(),fM({...hI,kind:fF("radio"),radiosInUnison:c4().optional(),noToggleToOff:c4().optional()}).strict(),fM({...hI,kind:fF("combobox"),edit:c4().optional(),options:fr(hO).optional(),defaultValue:cG().optional(),format:hw.nullable().optional()}).strict(),fM({...hI,kind:fF("listbox"),multiSelect:c4().optional(),options:fr(hO).optional(),defaultValue:fr(cG()).optional()}).strict(),fM({...hI,kind:fF("pushbutton"),takesImage:c4().optional().describe("Make the push button an image field: the engine writes Acrobat\'s import-icon script as each widget\'s activation action. It needs a widget, and can\'t go beside a widget\'s `actions.activate` or `actions.mouseUp`.")}).strict(),fM({...hI,kind:fF("signature")}).strict()]);function hC(e,t){let n=e.issues[0],r=n.path.join(".");return new N(G.InvalidArg,`${t}${r?` field \'${r}\'`:""}: ${n.message}`,{details:r?{field:r}:{}})}function hj(e){let{ref:t,reply:n,popup:r,...i}=e,o={...i};return"popup"===e.subtype&&delete o.parent,[t.page,...rB(o)]}function hM(e){let t=[],n=pX(e.subtype);for(let[r,i]of Object.entries(n?.fields??{})){let{owner:n,readBack:o,required:a}=i.traits;if("data"!==n||!o||"target"===r)continue;let s=e[r];if(null!=s&&!i.write.safeParse(s).success){if(a)return"item";t.push({field:r,reason:"unsupported-value"})}}return t}function hR(e,t,n,r){let i={...e};delete i.reply;let o=pX(e.subtype)?.fields??{};for(let{field:e}of t)o[e]?.traits.writeNullable?i[e]=null:delete i[e];let a=hm.safeParse(i);if("popup"===e.subtype&&delete i.parent,!a.success){let e=a.error.issues[0],t=e.path.join(".");throw new N(G.InvalidArg,`${r.label}${t?` field \'${t}\'`:""}: ${e.message}`,{details:{...r.details,...t?{field:t}:{}}})}return rL(i,n)}function hT(e,t,n){let r=hN.safeParse(e);if(!r.success){let e=r.error.issues[0],i=e.path.join(".");throw new N(G.InvalidArg,`${t}${i?` member \'${i}\'`:""}: ${e.message}`,{details:{...n,...i?{field:i}:{}}})}return e}fM({name:cG().min(1).optional(),readOnly:c4().optional(),required:c4().optional(),noExport:c4().optional(),alternateName:cG().nullable().optional(),mappingName:cG().nullable().optional(),groupId:cG().min(1).max(256).nullable().optional(),assignment:hv.optional(),purpose:hE.nullable().optional(),placeholder:hA.nullable().optional(),actions:mb.optional(),kind:fp(["text","checkbox","radio","combobox","listbox","pushbutton","signature"]).optional(),defaultValue:fs([cG(),fr(cG())]).nullable().optional(),maxLength:c3().int().positive().nullable().optional(),multiline:c4().optional(),password:c4().optional(),comb:c4().optional(),radiosInUnison:c4().optional(),noToggleToOff:c4().optional(),edit:c4().optional(),multiSelect:c4().optional(),options:fr(hO).optional(),format:hw.nullable().optional(),takesImage:c4().optional().describe("A push button\'s: `true` makes it an image field, writing Acrobat\'s import-icon script as the activation action of each widget whose press does nothing, and is refused while a widget\'s press runs another action. `false` takes the script off each widget whose press is exactly it.")}).strict();var hB=[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,8226,8364,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,381,8216,8217,8220,8221,8211,8212,732,8482,353,8250,339,382,376,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],hL={courier:{ascent:803,descent:-248,programHash:"955500bf0048e07e3046477b3874ef9e7653010a2bc780bbf27f837d7ca34d19",codePoints:hB,advances:[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]},"courier-bold":{ascent:811,descent:-248,programHash:"386d8684b075c7ff4911235ae9691d5e9e924fff13fa1f17841c6d4d4f3762e6",codePoints:hB,advances:[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]},"courier-bold-oblique":{ascent:811,descent:-248,programHash:"d1dae62980ea92bfa86f9e3961a3064e164e41a5064211f2a3a8833643a322a5",codePoints:hB,advances:[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]},"courier-oblique":{ascent:803,descent:-248,programHash:"d790f273acf84a1afada2cf96a6eb646728a1a6e7afe961a2cc846bb3a501b0b",codePoints:hB,advances:[600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600,600]},helvetica:{ascent:945,descent:-224,programHash:"93fe419ed14bac240018cf4506dbb64643eeeee379c0b51d3c52d239f4adbc58",codePoints:hB,advances:[278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,350,667,222,556,333,1e3,556,556,333,1e3,667,333,1e3,611,222,222,333,333,556,1e3,333,1e3,500,366,944,500,667,333,556,556,556,556,260,556,333,737,370,612,584,737,333,400,584,333,333,333,556,537,278,333,333,365,612,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500]},"helvetica-bold":{ascent:962,descent:-227,programHash:"f11bf41cf5d115966ee4d954d9d3eab4a7d1b63d371e5d655fc82d15350bc929",codePoints:hB,advances:[278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,1072,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,350,722,278,556,500,1e3,556,556,333,1e3,667,333,1e3,611,278,278,500,500,556,1e3,333,1e3,556,333,944,500,667,333,556,556,556,556,280,556,333,737,370,556,584,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,611,611,611,611,611,556,611,556]},"helvetica-bold-oblique":{ascent:962,descent:-227,programHash:"9cd559e9d134dd6bb8bb75186d4302079e78ebee53a7c9b38dea1fba52a534d8",codePoints:hB,advances:[278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,528,556,556,556,556,333,333,584,584,584,611,1072,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,350,722,278,556,500,1e3,556,556,333,1e3,667,333,1e3,611,278,278,500,500,556,1e3,333,1e3,556,333,944,500,667,333,556,556,556,556,280,556,333,737,370,556,584,737,333,400,584,333,333,333,611,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,584,519,611,611,611,611,556,611,556]},"helvetica-oblique":{ascent:951,descent:-224,programHash:"872e4efa9cc73daff4a3fffa952663f32144db19ec91a8407afc359486eae30b",codePoints:hB,advances:[278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1116,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,350,667,222,556,333,1e3,556,556,333,1e3,667,350,1e3,611,222,222,333,333,556,1e3,333,1e3,500,333,944,500,667,333,556,556,556,556,260,556,333,737,370,556,584,737,333,400,584,333,333,333,556,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,584,611,556,556,556,556,500,556,500]},"times-roman":{ascent:878,descent:-249,programHash:"7be927a55309ca34d67972ccf041ff3d156d774017022b18131fa365e6dd922e",codePoints:hB,advances:[250,333,408,500,500,833,778,180,333,333,500,564,250,333,250,278,500,500,500,500,500,500,500,500,500,500,278,278,564,564,564,444,921,722,667,667,722,611,556,722,722,333,389,722,611,889,722,722,556,722,667,556,611,722,722,944,722,722,611,333,278,333,469,500,333,444,500,444,500,444,333,500,500,278,278,500,278,778,500,500,500,500,333,389,278,500,500,722,500,500,444,480,200,480,541,350,722,333,500,444,1e3,500,500,333,1e3,556,333,889,611,333,333,444,444,500,1e3,333,980,389,333,722,444,722,333,500,500,500,500,200,500,333,760,276,500,564,760,333,400,564,300,300,333,500,453,250,333,300,310,500,750,750,750,444,722,722,722,722,722,722,889,667,611,611,611,611,333,333,333,333,722,722,722,722,722,722,722,564,722,722,722,722,722,722,556,500,444,444,444,444,444,444,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,564,500,500,500,500,500,500,500,500]},"times-bold":{ascent:889,descent:-249,programHash:"f23f2efbfa079f9083d967acf695b10db7c78e39862dbeb4788a4fd0533ff29c",codePoints:hB,advances:[250,333,555,500,500,1e3,833,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,930,722,667,722,722,667,611,778,778,389,500,778,667,944,722,778,611,778,722,556,667,722,722,1e3,722,722,667,333,278,333,581,500,333,500,556,444,556,444,333,500,556,278,333,556,278,833,556,500,556,556,444,389,333,556,500,722,500,500,444,394,220,394,520,350,722,333,500,500,1e3,500,500,333,1e3,556,333,1e3,667,333,333,500,500,500,1e3,333,1e3,389,333,722,444,722,333,500,500,500,500,220,500,333,747,300,500,570,747,333,400,570,300,300,333,556,540,250,333,300,330,500,750,750,750,500,722,722,722,722,722,722,1e3,722,667,667,667,667,389,389,389,389,722,722,778,778,778,778,778,570,778,722,722,722,722,722,611,556,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,500,556,500]},"times-bold-italic":{ascent:869,descent:-249,programHash:"cf51fab68d7d965f5755218a7f99b0376bc440e1bb4e90498aef0964aac94490",codePoints:hB,advances:[250,389,555,500,500,833,778,278,333,333,500,570,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,570,570,570,500,832,667,667,667,722,667,667,722,778,389,500,667,611,889,722,722,611,722,667,556,611,722,667,889,667,611,611,333,278,333,570,500,333,500,500,444,500,444,333,500,556,278,278,500,278,778,556,500,500,500,389,389,278,556,444,667,500,444,389,348,220,348,570,350,667,333,500,500,1e3,500,500,333,1e3,556,333,944,611,333,333,500,500,500,1e3,333,1e3,389,333,722,389,611,389,500,500,500,500,220,500,333,747,266,500,606,747,333,400,570,300,300,333,576,500,250,333,300,300,500,750,750,750,500,667,667,667,667,667,667,944,667,667,667,667,667,389,389,389,389,722,722,722,722,722,722,722,570,722,722,722,722,722,611,611,500,500,500,500,500,500,500,722,444,444,444,444,444,278,278,278,278,500,556,500,500,500,500,500,570,500,556,556,556,556,444,500,444]},"times-italic":{ascent:868,descent:-249,programHash:"f405670768d71ff8d8a4e493cbcb9c6deff9565419bf63a38abb544789aa87b4",codePoints:hB,advances:[250,333,420,500,500,833,778,214,333,333,500,675,250,333,250,278,500,500,500,500,500,500,500,500,500,500,333,333,675,675,675,500,920,611,611,667,722,611,611,722,722,333,444,667,556,833,667,722,611,722,611,500,556,722,611,833,611,556,556,389,278,389,422,500,333,500,500,444,500,444,278,500,500,278,278,444,278,722,500,500,500,500,389,389,278,500,444,667,444,444,389,400,275,400,541,350,500,333,500,556,889,500,500,333,1e3,500,333,944,556,333,333,556,556,500,889,333,980,389,333,667,389,556,389,500,500,500,500,275,500,333,760,276,500,675,760,333,400,675,300,300,333,500,523,250,333,300,310,500,750,750,750,500,611,611,611,611,611,611,889,667,611,611,611,611,333,333,333,333,722,667,722,722,722,722,722,675,722,722,722,722,722,556,611,500,500,500,500,500,500,500,667,444,444,444,444,444,278,278,278,278,500,500,500,500,500,500,500,675,500,500,500,500,500,444,500,444]},symbol:{ascent:1010,descent:-293,programHash:"1f027bd5b336f563724a2cba62295329edbb3df7ca9efbe8f296d7a1e86849a1",codePoints:[32,33,8704,35,8707,37,38,8715,40,41,8727,43,44,8722,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,8773,913,914,935,916,917,934,915,919,921,977,922,923,924,925,927,928,920,929,931,932,933,962,937,926,936,918,91,8756,93,8869,95,63717,945,946,967,948,949,966,947,951,953,981,954,955,956,957,959,960,952,961,963,964,965,982,969,958,968,950,123,124,125,8764,8364,978,8242,8804,8260,8734,402,9827,9830,9829,9824,8596,8592,8593,8594,8595,176,177,8243,8805,215,8733,8706,8226,247,8800,8801,8776,8230,63718,63719,8629,8501,8465,8476,8472,8855,8853,8709,8745,8746,8835,8839,8836,8834,8838,8712,8713,8736,8711,63194,63193,63195,8719,8730,8901,172,8743,8744,8660,8656,8657,8658,8659,9674,9001,63720,63721,63722,8721,63723,63724,63725,63726,63727,63728,63729,63730,63731,63732,9002,8747,8992,63733,8993,63734,63735,63736,63737,63738,63739,63740,63741,63742],advances:[250,333,713,500,549,833,778,439,333,333,500,549,250,549,250,278,500,500,500,500,500,500,500,500,500,500,278,278,549,549,549,444,549,722,667,722,612,611,763,603,722,333,631,722,686,889,722,722,768,741,556,592,611,690,439,768,645,795,611,333,863,333,658,500,500,631,549,549,494,439,521,411,603,329,603,549,549,576,521,549,549,521,549,603,439,576,713,686,493,686,494,480,200,480,549,750,620,247,549,167,713,500,753,753,753,753,1042,987,603,987,603,400,549,411,549,549,713,494,460,549,549,549,549,1e3,603,1e3,658,823,686,795,987,768,768,823,768,768,713,713,713,713,713,713,713,768,713,790,790,890,823,549,250,713,603,603,1042,987,603,987,603,494,329,790,790,786,713,384,384,384,384,384,384,494,494,494,494,329,274,686,686,686,384,384,384,384,384,384,494,494,494]},"zapf-dingbats":{ascent:826,descent:-163,programHash:"0439c04b1c3ba23c2fd8c2f4a5f2c65b2b0f817588c45afd5c06a41eab70bfbd",codePoints:[32,9985,9986,9987,9988,9742,9990,9991,9992,9993,9755,9758,9996,9997,9998,9999,1e4,10001,10002,10003,10004,10005,10006,10007,10008,10009,10010,10011,10012,10013,10014,10015,10016,10017,10018,10019,10020,10021,10022,10023,9733,10025,10026,10027,10028,10029,10030,10031,10032,10033,10034,10035,10036,10037,10038,10039,10040,10041,10042,10043,10044,10045,10046,10047,10048,10049,10050,10051,10052,10053,10054,10055,10056,10057,10058,10059,9679,10061,9632,10063,10064,10065,10066,9650,9660,9670,10070,9687,10072,10073,10074,10075,10076,10077,10078,10081,10082,10083,10084,10085,10086,10087,9827,9830,9829,9824,9312,9313,9314,9315,9316,9317,9318,9319,9320,9321,10102,10103,10104,10105,10106,10107,10108,10109,10110,10111,10112,10113,10114,10115,10116,10117,10118,10119,10120,10121,10122,10123,10124,10125,10126,10127,10128,10129,10130,10131,10132,8594,8596,8597,10136,10137,10138,10139,10140,10141,10142,10143,10144,10145,10146,10147,10148,10149,10150,10151,10152,10153,10154,10155,10156,10157,10158,10159,10161,10162,10163,10164,10165,10166,10167,10168,10169,10170,10171,10172,10173,10174],advances:[278,974,961,974,980,719,789,790,791,690,960,939,549,855,911,933,911,945,974,755,846,762,761,571,677,763,760,759,754,494,552,537,577,692,786,788,788,790,793,794,816,823,789,841,823,833,816,831,923,744,723,749,790,792,695,776,768,792,759,707,708,682,701,826,815,789,789,707,687,696,689,786,787,713,791,785,791,873,761,762,762,759,759,892,892,788,784,438,138,277,415,392,392,668,668,732,544,544,910,667,760,760,776,595,694,626,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,788,894,838,1016,458,748,924,748,918,927,928,928,834,873,828,924,924,917,930,931,463,883,836,836,867,867,696,696,874,874,760,946,771,865,771,888,967,888,831,873,927,970,918]}},h$=new Uint8Array(128);for(let e=0;e<64;e+=1)h$["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(e)]=e;var hz={standardDisplayHash:e=>hL[e].programHash,lastResortDisplayHash:"e9d14973462069b4906f8d22a9aaec2d6ec9eb02ac31d697631783316d8b8768"},hU=new WeakSet;function hV(e){hU.has(e)||(e.fn.EPDF_InitThread(),hU.add(e))}function hW(e){if(e.aborted){let t=e.reason;if(t instanceof Error)throw t;throw new ns(t)}}function hq(e){let t=/^(?:D:)?(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(?:([Zz])(?:00\'?00\'?)?|([+-])(\\d{2})(?:\'?(\\d{2})\'?)?)?$/.exec(e.trim());if(!t)return null;let[,n,r="01",i="01",o="00",a="00",s="00"]=t,[,,,,,,,l,u,d,c="00"]=t;if(!hK({year:n,month:r,day:i,hour:o,minute:a,second:s}))return null;let f="";if(l)f="Z";else if(u){if(Number(d)>23||Number(c)>59)return null;f=0===Number(d)&&0===Number(c)?"Z":`${u}${d}:${c}`}return`${n}-${r}-${i}T${o}:${a}:${s}${f}`}function hH(e=new Date){if(e instanceof Date){if(Number.isNaN(e.getTime()))throw RangeError("Cannot format an invalid Date");return hH(`${e.toISOString().slice(0,19)}Z`)}let t=/^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.\\d+)?)?(?:([Zz])|([+-])(\\d{2}):(\\d{2}))?$/.exec(e),n=t&&{year:t[1],month:t[2],day:t[3],hour:t[4],minute:t[5],second:t[6]??"00"};if(!t||!n||!hK(n))throw new N(G.InvalidArg,`not an ISO 8601 date and time: \'${e}\'`);let[,,,,,,,r,i,o,a]=t,s=r?"+00\'00\'":i?`${i}${o}\'${a}\'`:"",{year:l,month:u,day:d,hour:c,minute:f,second:m}=n;return`D:${l}${u}${d}${c}${f}${m}${s}`}function hK({year:e,month:t,day:n,hour:r,minute:i,second:o}){let a=Number(e),s=Number(t),l=Number(n);if(s<1||s>12||l<1)return!1;let u=new Date(Date.UTC(2e3,s,0)).getUTCDate();return!(l>(2!==s||a%4==0&&(a%100!=0||a%400==0)?u:28))&&23>=Number(r)&&59>=Number(i)&&59>=Number(o)}function hZ(e){return(hZ="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)}function hJ(e,t,n){var r;return(r=function(e,t){if("object"!=hZ(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=hZ(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==hZ(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hQ=class{constructor(){hJ(this,"byContent",null),hJ(this,"bySource",new Map),hJ(this,"hashes",new WeakMap)}forget(){this.byContent=null,this.bySource.clear()}};function hX(e,t,n){return 4!==e.FPDF_GetLastError()?n:t?new N(G.DocPasswordIncorrect,"incorrect document password"):new N(G.DocPasswordRequired,"document requires a password")}function hY(e,t,n){let r=e.alloc(t);try{return n(r)}finally{e.free(r)}}function h0(e,t,n){let r=t.map(t=>e.alloc(t));try{return n(r)}finally{for(let t=r.length-1;t>=0;t--)e.free(r[t])}}function h1(e,t,n){return hY(e,4*Math.max(1,t.length),r=>(t.forEach((t,n)=>e.poke(r,"i32",t,4*n)),n(r,t.length)))}function h3(e,t,n=""){let r=t(0n,0);return r<=0?null:2===r?n:hY(e,r,n=>0>=t(n,r)?null:e.readU16String(n))}function h2(e,t){let n=t(0n,0);return n<=0?null:hY(e,n,r=>0>=t(r,n)?null:e.readU8String(r))}function h6(e,t,n){let r=e.writeU16String(t);try{return n(r)}finally{e.free(r)}}function h5(e,t,n){let r=e.writeU16String(t);try{return n(r)}finally{e.free(r)}}function h4(e,t,n){let r=new TextEncoder().encode(t),i=new Uint8Array(r.byteLength+1);i.set(r);let o=e.alloc(i.byteLength);try{return e.writeBytes(o,i),n(o)}finally{e.free(o)}}var h8=class{constructor(){hJ(this,"actions",[]),hJ(this,"closed",!1)}push(e){this.closed?e():this.actions.push(e)}close(){if(this.closed)return;this.closed=!0;let e=null;for(let t=this.actions.length-1;t>=0;t--)try{this.actions[t]?.()}catch(t){e??(e=t)}if(this.actions.length=0,e)throw e}};function h7(e,t,n=null){let{mem:r,fn:i}=e,o=new h8,a=r.alloc(t.byteLength);o.push(()=>r.free(a));try{r.writeBytes(a,t);let s=i.FPDF_LoadMemDocument64(a,t.byteLength,n??"");if(!s)throw hX(i,n,new N(G.DocOpenFailed,"failed to open document"));return Fe(e,s),o.push(()=>i.FPDF_CloseDocument(s)),{kind:"fat-memory",docPtr:s,source:{base:null,layer:null,password:n},close:()=>o.close()}}catch(e){throw o.close(),e}}function h9(e,t,n={kind:"fresh"},r=null){let{mem:i,fn:o}=e,a=new h8;a.push(()=>t.release());let s=null,l=i.alloc(4);try{let u;i.poke(l,"i32",-1),"fresh"===n.kind?u=o.EPDFLayer_OpenLayer(t.basePtr,0n,r??"",l):"artifact-file"===n.kind&&"native"===e.kind?u=h4(i,n.path,e=>o.EPDFLayer_OpenLayerArtifactFromPath(t.basePtr,e,r??"",l)):(s="artifact-file"===n.kind?e.fileAccess.fromNodeFile(n.path):e.fileAccess.fromMemory(n.bytes),a.push(()=>s?.close()),u="artifact"===n.kind||"artifact-file"===n.kind?o.EPDFLayer_OpenLayerArtifact(t.basePtr,s.ptr,r??"",l):o.EPDFLayer_OpenLayer(t.basePtr,s.ptr,r??"",l));let d=Number(i.peek(l,"i32"));if(!u||0!==d)throw function(e){switch(e){case 1:return new N(G.DocPasswordRequired,"layer requires a password");case 2:return new N(G.MalformedPdf,"layer delta is malformed");case 3:return new N(G.MalformedPdf,"layer artifact does not match the supplied base document");default:return new N(G.DocOpenFailed,"failed to open layer document")}}(d);Fe(e,u),a.push(()=>o.FPDF_CloseDocument(u));let c="file"===t.kind&&void 0!==t.path?{kind:"file",key:t.key,path:t.path}:{kind:"memory",key:t.key};return{kind:"layer",docPtr:u,source:{base:c,layer:n,password:r},close:()=>a.close()}}catch(e){throw a.close(),e}finally{i.free(l)}}function Fe(e,t){let{fn:n}=e;n.EPDF_IsEncrypted&&n.EPDF_SetRuntimeOwnerPermissions&&n.EPDF_IsEncrypted(t)&&n.EPDF_SetRuntimeOwnerPermissions(t,!0)}function Ft(e,t,n,r=0){let i=BigInt(n);e.poke(t,"i32",0|Number(4294967295n&i),r),e.poke(t,"i32",0|Number(i>>32n&4294967295n),r+4)}function Fn(e,t,n=0){let r=Number(e.peek(t,"i32",n))>>>0;return(Number(e.peek(t,"i32",n+4))>>>0)*0x100000000+r}var Fr={budgetBytes:0x18000000,idleMs:3e4},Fi={place:"elsewhere",pixels:0},Fo=class{constructor(e,t=Fr,n=()=>!1){this.runtime=e,this.policy=t,this.busy=n,hJ(this,"pages",new Map),hJ(this,"closedSizes",new Map),hJ(this,"workingSets",new Map),hJ(this,"totalBytes",0),hJ(this,"clock",0),hJ(this,"timer",null)}acquire(e,t,n){let r=this.take(e,n);if(!r){this.makeRoom(this.expectedBytes(e,n));let i=this.runtime.fn.EPDFDoc_LoadPageByObjectNumberNormalized(t,n);if(!i)throw Fa(n);r=this.add(e,n,i,!0)}if(r.refs++,!r.loaded){if(1!==this.runtime.fn.EPDFPage_ContinueLoad(r.ptr,0x3fffffff))throw this.drop(r),Fs(n);r.loaded=!0}return this.measure(r),this.makeRoom(0),r.ptr}async acquireInSlices(e,t,n,r,i){hW(r);let{fn:o}=this.runtime,a=this.take(e,n);if(!a){this.makeRoom(this.expectedBytes(e,n));let r=o.EPDFDoc_StartLoadPageByObjectNumber(t,n,!0);if(!r)throw Fa(n);a=this.add(e,n,r,!1)}for(a.refs++;!a.loaded;){let t=o.EPDFPage_ContinueLoad(a.ptr,i.budgetMs);if(t<0)throw this.drop(a),Fs(n);if(a.loaded=1===t,this.measure(a),this.makeRoom(0),a.loaded)break;try{await i.between(),hW(r)}catch(t){throw this.release(e,n),t}}return a.ptr}release(e,t){let n=this.pages.get(e)?.get(t);if(n&&!(n.refs<=0)&&(n.refs--,!(n.refs>0))){if(n.lastUsed=++this.clock,n.loaded&&!this.runtime.fn.EPDFPage_ResetRenderCache(n.ptr))return void this.close(n);this.armTimer(),this.makeRoom(0)}}setWorkingSet(e,t,n){let r=new Map;for(let{pageObjectNumber:e,role:t,pixels:i}of n){let n={place:t,pixels:i},o=r.get(e);(!o||aI(n,o))&&r.set(e,n)}let i=this.workingSets.get(e);r.size>0?(i||(i=new Map,this.workingSets.set(e,i)),i.set(t,r)):(i?.delete(t),i?.size===0&&this.workingSets.delete(e)),this.totalBytes>0&&this.armTimer()}isHeld(e,t){return(this.pages.get(e)?.get(t)?.refs??0)>0}isKept(e,t){return this.pages.get(e)?.has(t)??!1}closeOwner(e){for(let t of[...this.pages.get(e)?.values()??[]])this.close(t);this.pages.delete(e),this.closedSizes.delete(e),this.workingSets.delete(e)}closeIdleOf(e){for(let t of[...this.pages.get(e)?.values()??[]])0===t.refs&&this.close(t)}closeIdle(){for(let e of[...this.pages.values()])for(let t of[...e.values()])0===t.refs&&this.close(t)}closeUnshown(){for(let e of[...this.pages.values()])for(let t of[...e.values()])0===t.refs&&"visible"!==this.placeOf(t).place&&this.close(t)}get size(){let e=0;for(let t of this.pages.values())e+=t.size;return e}get bytes(){return this.totalBytes}take(e,t){let n=this.pages.get(e)?.get(t);return n?0!==n.refs||this.runtime.fn.EPDFPage_IsContentCurrent(n.ptr)?(n.lastUsed=++this.clock,n):(this.close(n),null):null}add(e,t,n,r){let i={owner:e,pageObjectNumber:t,ptr:n,refs:0,loaded:r,bytes:65536,lastUsed:++this.clock},o=this.pages.get(e);return o||(o=new Map,this.pages.set(e,o)),o.set(t,i),this.totalBytes+=i.bytes,i}measure(e){let{fn:t,mem:n}=this.runtime,r=65536+hY(n,40,r=>t.EPDFPage_GetParsedSize(e.ptr,r)?Fn(n,r,24):0);this.totalBytes+=r-e.bytes,e.bytes=r}expectedBytes(e,t){return this.closedSizes.get(e)?.get(t)??65536}makeRoom(e){let t=this.policy.budgetBytes>0?this.lastToCloseOverBudget():null;for(;this.totalBytes-(t?.bytes??0)+e>this.policy.budgetBytes;){let e=this.firstToClose(t);if(e)this.close(e);else{if(!t||0!==t.refs)return;this.close(t),t=null}}}firstToClose(e){let t=null,n=Fi;for(let r of this.pages.values())for(let i of r.values()){if(i.refs>0||i===e)continue;let r=this.placeOf(i);(!t||aI(n,r)||!aI(r,n)&&i.lastUsede.lastUsed)&&(e=r,t=n)}return e}placeOf(e){let t=Fi;for(let n of this.workingSets.get(e.owner)?.values()??[]){let r=n.get(e.pageObjectNumber);r&&aI(r,t)&&(t=r)}return t}close(e){if(e.loaded){let t=this.closedSizes.get(e.owner);t||(t=new Map,this.closedSizes.set(e.owner,t)),t.set(e.pageObjectNumber,e.bytes)}this.drop(e)}drop(e){this.runtime.fn.FPDF_ClosePage(e.ptr);let t=this.pages.get(e.owner);t?.delete(e.pageObjectNumber),t?.size===0&&this.pages.delete(e.owner),this.totalBytes-=e.bytes,this.totalBytes<=0&&this.disarmTimer()}armTimer(){this.policy.idleMs<=0||(this.disarmTimer(),this.timer=setTimeout(()=>{this.timer=null,this.busy()?this.armTimer():this.closeUnshown()},this.policy.idleMs),this.timer.unref?.())}disarmTimer(){this.timer&&clearTimeout(this.timer),this.timer=null}};function Fa(e){return new N(G.NotFound,`no page with object number ${e}`)}function Fs(e){return new N(G.RuntimeUnavailable,`failed to load page object ${e}`)}var Fl=class{constructor(e,t,n=null){this.docPtr=t,hJ(this,"residency",void 0),this.residency=n??new Fo(e,{budgetBytes:0,idleMs:0})}acquire(e){return this.residency.acquire(this,this.docPtr,e)}acquireInSlices(e,t,n){return this.residency.acquireInSlices(this,this.docPtr,e,t,n)}isHeld(e){return this.residency.isHeld(this,e)}isKept(e){return this.residency.isKept(this,e)}release(e){this.residency.release(this,e)}setWorkingSet(e,t){this.residency.setWorkingSet(this,e,t)}closeIdle(){this.residency.closeIdleOf(this)}closeAll(){this.residency.closeOwner(this)}},Fu=class{constructor(e,t){this.runtime=e,hJ(this,"docPtr",null),hJ(this,"closeDocument",null),hJ(this,"_kind",null),hJ(this,"_source",null),hJ(this,"_sessionId",void 0),hJ(this,"recordsByObjectNumber",new Map),hJ(this,"recordsByIndex",new Map),hJ(this,"fullyEnumerated",!1),hJ(this,"cacheSeqCounter",0),hJ(this,"editsSeqCounter",0),hJ(this,"transaction",null),hJ(this,"unusableReason",null),hJ(this,"pages",null),hJ(this,"residency",null),hJ(this,"signedDocumentPolicy","protect"),hJ(this,"password",null),hJ(this,"persistLayerArtifact",!0),hJ(this,"loadedSeq",0),hJ(this,"plainSha256",null),hJ(this,"pendingSigning",null),hJ(this,"lastCompletion",null),hJ(this,"drawings",null),hJ(this,"parkedLoad",null),hJ(this,"objectNumberAuthority","session"),hJ(this,"heldObjectNumbers",new Set),hJ(this,"objectNumbersInUse",[]),hJ(this,"retained",[]),this._sessionId=t??`sess_${(++Fc).toString(36)}_${Date.now().toString(36)}`}get sessionId(){return this._sessionId}get kind(){return this._kind}get source(){if(!this._source)throw new N(G.DocNotOpen,"document is not open");return this._source}isOpen(){return null!==this.docPtr}open(e,t=null){this.openFromHandle(h7(this.runtime,e,t))}openFromHandle(e){if(this.docPtr)throw e.close(),new N(G.InvalidArg,"document already open");this.docPtr=e.docPtr,this.closeDocument=()=>e.close(),this._kind=e.kind,this._source=e.source,this.pages=new Fl(this.runtime,e.docPtr,this.residency),this.parkedLoad=null,this.drawings=null,this.loadedSeq=this.editsSeqCounter}hasUnsavedEdits(){return this.editsSeqCounter!==this.loadedSeq}cachedPlainSha256(){return this.plainSha256&&this.plainSha256.loadedSeq===this.loadedSeq?this.plainSha256.sha256:null}rememberPlainSha256(e){this.plainSha256={loadedSeq:this.loadedSeq,sha256:e}}install(e){if(!this.docPtr)throw e.close(),new N(G.DocNotOpen,"no document to replace");let t=null;try{this.pages?.closeAll()}catch(e){t=e}try{this.closeDocument?.()}catch(e){t??(t=e)}if(this.docPtr=e.docPtr,this.closeDocument=()=>e.close(),this._kind=e.kind,this._source=e.source,this.pages=new Fl(this.runtime,e.docPtr,this.residency),this.recordsByIndex.clear(),this.recordsByObjectNumber.clear(),this.fullyEnumerated=!1,this.cacheSeqCounter++,this.editsSeqCounter++,this.loadedSeq=this.editsSeqCounter,this.pendingSigning=null,this.drawings=null,this.heldObjectNumbers.clear(),this.objectNumbersInUse=[],t)throw t}versionRef(e){return{baseSha256:e,editsVersion:this.editsSeqCounter}}parkLocked(e){if(this.docPtr)throw new N(G.InvalidArg,"document already open");this.parkedLoad=e}isLocked(){return null===this.docPtr&&null!==this.parkedLoad}unlockWith(e){if(!this.parkedLoad)throw new N(G.DocNotOpen,"document session is not locked");this.parkedLoad(e),this.parkedLoad=null}pageCount(){return this.runtime.fn.FPDF_GetPageCount(this.requireDocPtr())}ensureFullPageRegistry(){if(this.fullyEnumerated)return;let{fn:e}=this.runtime,t=this.requireDocPtr(),n=e.FPDF_GetPageCount(t);for(let r=0;rthis.resolvePageRef(e).pageObjectNumber)}allRecords(){return this.ensureFullPageRegistry(),Array.from(this.recordsByIndex.entries()).sort(([e],[t])=>e-t).map(([,e])=>e)}refreshPageRegistry(){this.recordsByIndex.clear(),this.recordsByObjectNumber.clear(),this.fullyEnumerated=!1,this.ensureFullPageRegistry()}cacheSeq(){return this.cacheSeqCounter}invalidateDerived(){this.cacheSeqCounter++}editsSeq(){return this.editsSeqCounter}noteEdit(){this.editsSeqCounter++}clearMissingCharacters(){this.docPtr&&this.runtime.fn.EPDFDoc_ClearMissingCharacters(this.docPtr)}missingCharacters(){if(!this.docPtr)return[];let{fn:e,mem:t}=this.runtime,n=this.docPtr,r=[],i=e.EPDFDoc_CountMissingCharacters(n);for(let o=0;oe.EPDFDoc_GetMissingCharacter(n,o,t,r));i&&r.push(i)}return r}inTransaction(){return null!==this.transaction}beginTransaction(e){let t=this.requireDocPtr();if(this.transaction)throw new N(G.Unknown,"a transaction is already open");if(!this.runtime.fn.EPDFLayer_BeginTransaction(t))throw new N(G.Unknown,"EPDFLayer_BeginTransaction refused");this.transaction={docPtr:t,opId:e,undoable:!1}}writeStamp(){let{opId:e,undoable:t}=this.requireTransaction();return{opId:e,undoable:t}}markUndoable(){this.requireTransaction().undoable=!0}commitTransaction(){let{docPtr:e}=this.requireTransaction();if(!this.runtime.fn.EPDFLayer_IsInTransaction(e))throw new N(G.Unknown,"the layer transaction is no longer open");let t=this.runtime.fn.EPDFLayer_GetLastObjectNumber(e);if(t>8388607)throw new N(G.LayerFull,"the document would pass object number 8388607",{details:{lastObjectNumber:t}});this.transaction=null;let n=!1;try{n=this.runtime.fn.EPDFLayer_CommitTransaction(e)}finally{n||(this.unusableReason=Fd)}if(!n)throw new N(G.DocNotOpen,Fd);for(let e of this.objectNumbersInUse)this.heldObjectNumbers.delete(e);this.objectNumbersInUse=[]}abortTransaction(){let{docPtr:e}=this.requireTransaction();this.transaction=null,this.objectNumbersInUse=[];let t=!1;try{t=this.runtime.fn.EPDFLayer_AbortTransaction(e)}catch{}this.drawings?.forget(),this.recordsByIndex.clear(),this.recordsByObjectNumber.clear(),this.fullyEnumerated=!1,this.invalidateDerived(),t||(this.unusableReason="a layer transaction failed to abort")}lastObjectNumber(){return this.runtime.fn.EPDFLayer_GetLastObjectNumber(this.requireDocPtr())}raiseLastObjectNumber(e){if(!this.runtime.fn.EPDFLayer_RaiseLastObjectNumber(this.requireDocPtr(),e))throw new N(G.LayerFull,`the document would pass object number ${e}`,{details:{lastObjectNumber:this.lastObjectNumber()}})}reserveObjectNumbers(e){if("session"!==this.objectNumberAuthority)throw new N(G.InvalidArg,"object numbers are handed out by the caller, not this session");if(!Number.isInteger(e)||e<1)throw new N(G.InvalidArg,`cannot reserve ${e} object numbers`,{details:{field:"count"}});let{fn:t}=this.runtime,n=this.requireDocPtr(),r=t.EPDFLayer_GetLastObjectNumber(n);if(r+e>8e6)throw new N(G.LayerFull,"no more object numbers to hand out",{details:{lastObjectNumber:r}});if(!t.EPDFLayer_RaiseLastObjectNumber(n,r+e))throw new N(G.Unknown,"EPDFLayer_RaiseLastObjectNumber refused");let i={first:r+1,count:e};for(let t=0;t=0;t--)try{this.retained[t]()}catch(t){e??(e=t)}if(this.retained.length=0,e)throw e}},Fd="a layer transaction failed to commit",Fc=0;function Ff(e,t){return new N(G.ObjectNumberUnavailable,"not-held"===t?`object number ${e} isn\'t one this session holds`:`an object already has object number ${e}`,{details:{objectNumber:e,reason:t}})}function Fm(e,t){return hX(e.fn,t,new N(G.DocOpenFailed,"failed to open base document"))}var Fp=class{constructor(e){this.runtime=e,hJ(this,"entries",new Map)}acquireMemoryBase(e){let t=this.retain(e.key);if(t)return t;let{mem:n,fn:r}=this.runtime,i=new h8,o=n.alloc(e.bytes.byteLength);i.push(()=>n.free(o));try{n.writeBytes(o,e.bytes);let t=r.EPDF_LoadMemBaseDocument64(o,e.bytes.byteLength,e.password??"");if(!t)throw Fm(this.runtime,e.password);return Fe(this.runtime,t),i.push(()=>r.EPDF_ReleaseBaseDocument(t)),this.supplyKnownSha(t,e.knownSha256),this.insert({key:e.key,kind:"memory",basePtr:t,refs:1,close:()=>i.close()})}catch(e){throw i.close(),e}}acquireFileBase(e){let t=this.retain(e.key);if(t)return t;let{fn:n}=this.runtime,r=new h8,i=null;try{i=this.runtime.fileAccess.fromNodeFile(e.path),r.push(()=>i?.close());let t=n.EPDF_LoadBaseDocument(i.ptr,e.password??"");if(!t)throw Fm(this.runtime,e.password);return Fe(this.runtime,t),r.push(()=>n.EPDF_ReleaseBaseDocument(t)),this.supplyKnownSha(t,e.knownSha256),this.insert({key:e.key,kind:"file",path:e.path,basePtr:t,refs:1,close:()=>r.close()})}catch(e){throw r.close(),e}}retainByKey(e){return this.retain(e)}supplyKnownSha(e,t){if(!t||!/^[0-9a-fA-F]{64}$/.test(t))return;let{mem:n,fn:r}=this.runtime,i=new Uint8Array(32);for(let e=0;e<32;e++)i[e]=parseInt(t.slice(2*e,2*e+2),16);let o=n.alloc(32);try{n.writeBytes(o,i),r.EPDF_SetBaseDocumentSha256(e,o)}finally{n.free(o)}}releaseAll(){let e=Array.from(this.entries.values());this.entries.clear();let t=null;for(let n of e)try{n.close()}catch(e){t??(t=e)}if(t)throw t}getRefCountForTesting(e){return this.entries.get(e)?.refs??0}retain(e){let t=this.entries.get(e);return t?(t.refs++,this.handleFor(t)):null}insert(e){return this.entries.set(e.key,e),this.handleFor(e)}handleFor(e){let t=!1;return{key:e.key,kind:e.kind,...void 0!==e.path?{path:e.path}:{},basePtr:e.basePtr,release:()=>{if(t)return;t=!0;let n=this.entries.get(e.key);!n||(n.refs--,n.refs>0||(this.entries.delete(e.key),n.close()))}}}};function Fh(e,t,n,r){return e.EPDF_HasMetaText(n,r)?h3(t,(t,i)=>e.FPDF_GetMetaText(n,r,t,i),""):null}var FF=class{constructor(e,t){this.runtime=e,this.session=t}read(e){let t;hW(e);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=Fh(n,r,i,"Title");hW(e);let a=Fh(n,r,i,"Author");hW(e);let s=Fh(n,r,i,"Subject");hW(e);let l=Fh(n,r,i,"Keywords");hW(e);let u=Fh(n,r,i,"Producer");hW(e);let d=Fh(n,r,i,"Creator");hW(e);let c=Fh(n,r,i,"CreationDate");hW(e);let f=Fh(n,r,i,"ModDate");hW(e);let m=1===(t=Number(n.EPDF_GetMetaTrapped(i)))?"true":2===t?"false":"unknown";return{title:o,author:a,subject:s,keywords:l,producer:u,creator:d,createdAt:c?hq(c):null,modifiedAt:f?hq(f):null,trapped:m}}readCustom(e){hW(e);let{fn:t,mem:n}=this.runtime;return function(e,t,n){let r=0|Number(e.EPDF_GetMetaKeyCount(n,!0)),i={};for(let o=0;oe.EPDF_GetMetaKeyName(n,r,i,t,o))}(e,t,n,o,!0);if(!r)continue;let a=Fh(e,t,n,r);null!=a&&(i[r]=a)}return i}(t,n,this.session.requireDocPtr())}};function Fg(e,t,n,r,i){return null===i?e.EPDF_SetMetaText(n,r,0n):h6(t,i,t=>e.EPDF_SetMetaText(n,r,t))}var F_=new Set(["Title","Author","Subject","Keywords","Producer","Creator","CreationDate","ModDate","Trapped"]),FP=[["title","Title"],["author","Author"],["subject","Subject"],["keywords","Keywords"],["producer","Producer"],["creator","Creator"]],FD="http://www.w3.org/2000/xmlns/";function Fb(e){return(function(e){let t="";for(let n of e){let e=n.codePointAt(0);e<32&&9!==e&&10!==e&&13!==e||e>=55296&&e<=57343||65534===e||65535===e||(t+=n)}return t})(e).replace(/&/g,"&").replace(//g,">").replace(/\\r/g," ")}function Fy(e){return Fb(e).replace(/"/g,""").replace(/\'/g,"'").replace(/\\t/g," ").replace(/\\n/g," ")}function Fw(e,t){return e?`${e}:${t}`:t}var FE=class extends Error{},FA=/&(?:#x([0-9a-fA-F]+)|#([0-9]+)|(lt|gt|amp|quot|apos));/g,Fv={lt:"<",gt:">",amp:"&",quot:\'"\',apos:"\'"},FS=/[ \\t\\r\\n]/,Fk=/[ \\t\\r\\n/>=<"\']/;function Fx(e){if(!e.includes("&"))return e;if(e.replace(FA,"").includes("&"))throw new FE;return e.replace(FA,(e,t,n,r)=>{if(r)return Fv[r];let i=t?parseInt(t,16):Number(n);if(i>1114111)throw new FE;return String.fromCodePoint(i)})}function FG(e){let t=e.indexOf(":");return t<0?{prefix:"",local:e}:{prefix:e.slice(0,t),local:e.slice(t+1)}}var FO=class{constructor(e){this.text=e,hJ(this,"at",0),hJ(this,"open",[]),hJ(this,"root",null)}read(){let{text:e}=this;for(;this.atthis.at&&this.addText(e.slice(this.at,n)),t<0)break;e.startsWith("\\x3c!--",t)?this.at=this.after("--\\x3e",t+4):e.startsWith("",t+2):e.startsWith("0||!this.root)throw new FE;return this.root}after(e,t){let n=this.text.indexOf(e,t);if(n<0)throw new FE;return n+e.length}skipSpace(e){let t=e;for(;t",e+9);if(t<0)throw new FE;this.addText(this.text.slice(e+9,t),!0),this.at=t+3}skipDeclaration(e){let t=0;for(let n=e+2;n"===e&&t<=0){this.at=n+1;return}}throw new FE}readStartTag(e){let t,{text:n}=this,r=this.readName(e+1),i=[],o=e+1+r.length,a=!1;for(;;){let e=this.skipSpace(o);if(n.startsWith("/>",e)){t=e,a=!0;break}if(">"===n[e]){t=e;break}if(e===o||e>=n.length)throw new FE;let r=this.readName(e),s=this.skipSpace(e+r.length);if("="!==n[s])throw new FE;let l=n[s=this.skipSpace(s+1)];if(\'"\'!==l&&"\'"!==l)throw new FE;let u=n.indexOf(l,s+1);if(u<0)throw new FE;let d=n.slice(s+1,u);if(d.includes("<"))throw new FE;i.push({qname:r,...FG(r),ns:null,value:Fx(d.replace(/[\\t\\r\\n]/g," ")),start:e,end:u+1,valueStart:s+1,valueEnd:u}),o=u+1}let s=this.open[this.open.length-1]??null;if(!s&&this.root)throw new FE;let l=new Map(s?.scope??[]);for(let e of i)"xmlns"===e.qname?l.set("",e.value):"xmlns"===e.prefix&&l.set(e.local,e.value);let u=e=>"xml"===e?"http://www.w3.org/XML/1998/namespace":l.get(e)||null;for(let e of i)e.ns="xmlns"===e.qname||"xmlns"===e.prefix?FD:e.prefix?u(e.prefix):null;let d=t+(a?2:1),{prefix:c,local:f}=FG(r),m={qname:r,prefix:c,local:f,ns:u(c),attributes:i,scope:l,parent:s,children:[],text:"",start:e,startTagClose:t,startTagEnd:d,selfClosing:a,endTagStart:d,end:d};s?s.children.push(m):this.root=m,a||this.open.push(m),this.at=d}readEndTag(e){let t=this.readName(e+2),n=this.skipSpace(e+2+t.length),r=this.open.pop();if(">"!==this.text[n]||!r||r.qname!==t)throw new FE;r.endTagStart=e,r.end=n+1,this.at=n+1}};function FI(e,t){return"http://www.w3.org/1999/02/22-rdf-syntax-ns#"===e.ns&&e.local===t}function FN(e,t){return e.ns===t.ns&&e.local===t.name}var FC=class{constructor(e,t){this.packet=e,this.rdf=t,hJ(this,"splices",[]),hJ(this,"additions",new Map)}removeElement(e){this.splices.push({start:this.spaceBefore(e.start),end:e.end,text:""})}removeAttribute(e){this.splices.push({start:this.spaceBefore(e.start),end:e.end,text:""})}replaceAttributeValue(e,t){this.splices.push({start:e.valueStart,end:e.valueEnd,text:Fy(t)})}replaceElement(e,t){let n=e.attributes.filter(e=>e.ns===FD).map(e=>` ${this.packet.slice(e.start,e.end)}`).join(""),r=Fj(e.scope,"http://www.w3.org/1999/02/22-rdf-syntax-ns#")??"rdf";this.splices.push({start:e.start,end:e.end,text:FM(e.qname,n,r,t)})}addProperty(e,t,n){let r=this.additionsFor(e),i=e?.scope??this.rdf.scope,o=Fj(i,t.ns,!1)??this.declare(r,i,t),a=Fj(i,"http://www.w3.org/1999/02/22-rdf-syntax-ns#")??"rdf";r.children.push(FM(Fw(o,t.name),"",a,n))}result(){for(let[e,t]of this.additions)this.writeAdditions(e,t);let e=this.splices.map((e,t)=>({splice:e,index:t})).sort((e,t)=>e.splice.start-t.splice.start||e.splice.end-e.splice.start-(t.splice.end-t.splice.start)||e.index-t.index),t="",n=0;for(let{splice:r}of e){if(r.start` xmlns:${e}="${Fy(t)}"`).join("");if(!e){let e=this.rdf.prefix,r=Fw(e,"Description"),i=`<${r} ${Fw(e,"about")}=""${n}>${t.children.join("")}`;this.insertInto(this.rdf,i);return}n&&this.splices.push({start:e.startTagClose,end:e.startTagClose,text:n});let r=this.childIndent(e);this.insertInto(e,t.children.map(e=>r+e).join(""))}insertInto(e,t){if(e.selfClosing)return void this.splices.push({start:e.startTagClose,end:e.startTagEnd,text:`>${t}`});let n=e.children[e.children.length-1],r=n?n.end:e.startTagEnd;this.splices.push({start:r,end:r,text:t})}childIndent(e){let[t]=e.children,n=t?this.packet.slice(e.startTagEnd,t.start):this.packet.slice(e.startTagEnd,e.endTagStart);return/^\\s*$/.test(n)?t?n:n&&`${n} `:""}spaceBefore(e){let t=e;for(;t>0&&/\\s/.test(this.packet[t-1]);)t--;return t}};function Fj(e,t,n=!0){let r;for(let[i,o]of e)if(o===t){if(i)return i;n&&(r=i)}return r}function FM(e,t,n,r){let i,o=(e,t="")=>`<${Fw(n,"li")}${t}>${Fb(e)}`,a=(e,t)=>`<${Fw(n,e)}>${t}`;switch(r.kind){case"text":i=Fb(r.text);break;case"alt":i=a("Alt",o(r.text,\' xml:lang="x-default"\'));break;case"seq":i=a("Seq",r.items.map(e=>o(e)).join(""));break;case"bag":i=a("Bag",r.items.map(e=>o(e)).join(""))}return`<${e}${t}>${i}`}function FR(e,t,n,r){if(0===r.length)return;let i=function(e,t,n){let r=e.EPDFCatalog_GetMetadata(n,0n,0);if(r<=0)return null;let i=hY(t,r,i=>e.EPDFCatalog_GetMetadata(n,i,r)===r?t.readBytes(i,r):null),o=i&&function(e){let[t=1,n=1,r=1,i=1]=e;return 254===t&&255===n?"utf-16be":255===t&&254===n?0===r&&0===i?null:"utf-16le":0===t&&0===n?null:0===t?"utf-16be":0===n?0===r?null:"utf-16le":"utf-8"}(i);if(!i||!o)return null;try{return{text:new TextDecoder(o,{fatal:!0,ignoreBOM:!0}).decode(i),encoding:o}}catch{return null}}(e,t,n);if(!i)return;let o=function(e,t){let n=function(e){try{return new FO(e).read()}catch(e){if(e instanceof FE)return null;throw e}}(e),r=n&&[...function* e(t){for(let n of(yield t,t.children))yield*e(n)}(n)].find(e=>FI(e,"RDF"));if(!r)return null;let i=r.children.filter(e=>FI(e,"Description")),o=new FC(e,r);for(let{property:e,value:n,add:r}of t){let t=i.flatMap(t=>t.children.filter(t=>FN(t,e))),a=i.flatMap(t=>t.attributes.filter(t=>FN(t,e)).map(e=>({attribute:e,description:t})));if(null===n){t.forEach(e=>o.removeElement(e)),a.forEach(({attribute:e})=>o.removeAttribute(e));continue}let[s,...l]=t,[u,...d]=a;if(s)(l.length>0||a.length>0||!function(e,t){if(e.attributes.some(e=>"http://www.w3.org/1999/02/22-rdf-syntax-ns#"===e.ns))return!1;if("text"===t.kind)return 0===e.children.length&&e.text===t.text;let[n,...r]=e.children,i={alt:"Alt",seq:"Seq",bag:"Bag"}[t.kind];if(!n||r.length>0||!FI(n,i))return!1;let o=n.children;if(!o.every(e=>FI(e,"li")&&0===e.children.length))return!1;if("alt"===t.kind){let[e]=o,n=e?.attributes.find(e=>"http://www.w3.org/XML/1998/namespace"===e.ns&&"lang"===e.local);return 1===o.length&&n?.value==="x-default"&&e.text===t.text}return o.length===t.items.length&&o.every((e,n)=>e.text===t.items[n])}(s,n))&&(o.replaceElement(s,n),l.forEach(e=>o.removeElement(e)),a.forEach(({attribute:e})=>o.removeAttribute(e)));else if(u&&"text"===n.kind)(d.length>0||u.attribute.value!==n.text)&&(o.replaceAttributeValue(u.attribute,n.text),d.forEach(({attribute:e})=>o.removeAttribute(e)));else if(u)a.forEach(({attribute:e})=>o.removeAttribute(e)),o.addProperty(u.description,e,n);else if(r){let t=i.find(t=>(function(e,t){return e.attributes.some(e=>"http://www.w3.org/2000/xmlns/"===e.ns&&e.value===t)})(t,e.ns))??i[0];o.addProperty(t??null,e,n)}}return o.result()}(i.text,r);if(null!==o&&o!==i.text){let r;if(!hY(t,Math.max((r=function({text:e,encoding:t}){if("utf-8"===t)return new TextEncoder().encode(e);let n=new Uint8Array(2*e.length),r=new DataView(n.buffer);for(let n=0;n(t.writeBytes(i,r),e.EPDFCatalog_SetMetadata(n,i,r.length))))throw new N(G.Unknown,"failed to write the XMP metadata")}}var FT="http://purl.org/dc/elements/1.1/",FB="http://ns.adobe.com/xap/1.0/",FL="http://ns.adobe.com/pdf/1.3/",F$=(e,t,n)=>({ns:e,prefix:t,name:n}),Fz={title:{property:F$(FT,"dc","title"),kind:"alt"},author:{property:F$(FT,"dc","creator"),kind:"seq"},subject:{property:F$(FT,"dc","description"),kind:"alt"},keywords:{property:F$(FL,"pdf","Keywords"),kind:"text"},creator:{property:F$(FB,"xmp","CreatorTool"),kind:"text"},producer:{property:F$(FL,"pdf","Producer"),kind:"text"}},FU=F$(FB,"xmp","CreateDate"),FV=F$(FB,"xmp","ModifyDate"),FW=F$(FL,"pdf","Trapped"),Fq=F$(FT,"dc","subject"),FH={true:"True",false:"False",unknown:"Unknown"};function FK(e){if(null===e)return null;let t=hH(e);return{kind:"text",text:hq(t)??t}}var FZ=class{constructor(e,t){this.runtime=e,this.session=t}update(e,t){hW(t);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr();return!function(e,t,n,r){var i;let o=e=>{throw new N(G.Unknown,`failed to write metadata ${e}`)};for(let[i,a]of FP){let s=r[i];void 0!==s&&(Fg(e,t,n,a,s)||o(a))}void 0===r.createdAt||Fg(e,t,n,"CreationDate",null===r.createdAt?null:hH(r.createdAt))||o("CreationDate"),void 0===r.modifiedAt||Fg(e,t,n,"ModDate",null===r.modifiedAt?null:hH(r.modifiedAt))||o("ModDate"),void 0===r.trapped||(i=r.trapped,e.EPDF_SetMetaTrapped(n,"true"===i?1:"false"===i?2:3))||o("Trapped")}(n,r,i,e),FR(n,r,i,function(e){let t=[],n=(e,n,r=!0)=>t.push({property:e,value:n,add:r});for(let[t,{property:r,kind:i}]of Object.entries(Fz)){let o=e[t];void 0!==o&&n(r,null===o?null:"seq"===i?{kind:i,items:[o]}:{kind:i,text:o})}if(void 0!==e.keywords){let t=null===e.keywords?null:e.keywords.split(/[,;]/).map(e=>e.trim()).filter(e=>""!==e);n(Fq,t&&{kind:"bag",items:t},!1)}return void 0!==e.createdAt&&n(FU,FK(e.createdAt)),void 0!==e.modifiedAt&&n(FV,FK(e.modifiedAt)),void 0!==e.trapped&&n(FW,{kind:"text",text:FH[e.trapped]}),t}(e)),hW(t),{metadata:new FF(this.runtime,this.session).read(t),meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}updateCustom(e,t){hW(t);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=Object.entries(e);for(let[e]of o){let t=function(e){if(F_.has(e))return`\'${e}\' is a standard key; set it with metadata.update`;if(!e||e.length>127||"/"===e[0])return`\'${e}\' can\'t be a custom key: 1 to 127 characters, no leading slash`;for(let t=0;t126)return`\'${e}\' can\'t be a custom key: printable ASCII only`}return null}(e);if(t)throw new N(G.InvalidArg,t,{details:{field:e}})}for(let[e,t]of o)if(!Fg(n,r,i,e,t))throw new N(G.Unknown,`failed to write metadata ${e}`);return FR(n,r,i,Object.entries(e).filter(([e])=>/^[A-Za-z_][A-Za-z0-9._-]*$/.test(e)).map(([e,t])=>({property:F$("http://ns.adobe.com/pdfx/1.3/","pdfx",e),value:null===t?null:{kind:"text",text:t},add:!1}))),hW(t),{custom:new FF(this.runtime,this.session).readCustom(t),meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}},FJ={bytes:124,offsets:{looseBox:0,tightBox:16,looseQuad:32,tightQuad:64,matrix:96,flags:120},flags:{hasTightBox:1,hasLooseQuad:2,hasTightQuad:4,upright:8,space:16,empty:32,synthesized:64}},FQ={bytes:132,offsets:{geometry:0,objectRun:124,fontSize:128}};function FX(e,t,n=0){return{left:F0(e,t,n),top:F0(e,t,n+4),right:F0(e,t,n+8),bottom:F0(e,t,n+12)}}function FY(e,t,n){e.poke(t,"f32",n.left,0),e.poke(t,"f32",n.top,4),e.poke(t,"f32",n.right,8),e.poke(t,"f32",n.bottom,12)}function F0(e,t,n=0){return Number(e.peek(t,"f32",n))}function F1(e,t,n=0){return Number(e.peek(t,"i32",n))}var F3={fit:2,fitH:3,fitV:4,fitR:5,fitB:6,fitBH:7,fitBV:8};function F2(e,t,n,r){let i=e.EPDFDest_GetPageObjectNumber(n,r);if(0===i)return null;let o=q(i),a=h0(t,[8,16],([n,i])=>{let o=e.FPDFDest_GetView(r,n,i),a=Math.min(F1(t,n),4),s=[];for(let e=0;eethis.limits.maxModels||this.nodes>this.limits.maxNodes||this.scriptCodeUnits>this.limits.maxScriptCodeUnits||this.targetEntries>this.limits.maxTargetEntries||this.payloadCodeUnits>this.limits.maxPayloadCodeUnits)throw new N(G.MalformedPdf,"aggregate PDF action read budget exceeded",{details:{models:this.models,nodes:this.nodes,scriptCodeUnits:this.scriptCodeUnits,targetEntries:this.targetEntries,payloadCodeUnits:this.payloadCodeUnits,limits:this.limits}})}};function F8(e,t,n,r,i){if(0n===r)return null;try{var o,a,s,l;let u,d=e.EPDFAction_GetNodeCount(r);if(!Number.isInteger(d)||d<0)throw F9("invalid node count",{nodeCount:d});i.addModel(d);let c=e.EPDFAction_GetWarningFlags(r)>>>0,f=!e.EPDFAction_IsComplete(r),m=(o=e.EPDFAction_GetRootNode(r),a=d,-1===o||0xffffffff===o||o>>>0==0xffffffff?null:F7(o,a)),p=new Set,h=!1,F=e=>{let n=e(0n,0);return n<=0?null:(i.reservePayloadBytes(n),h2(t,e))},g=e=>h0(t,[4],([n])=>e(n)?0!==F1(t,n):null),_=(n,i)=>h0(t,[4],([o])=>{if(!e.EPDFAction_GetNodeTargetObjectNumber(r,n,i,o))return null;let a=F1(t,o)>>>0;return 0===a?null:a}),P=(t,n)=>{let i=[];for(let o=0;oe.EPDFAction_GetNodeTargetName(r,t,o,n,i));if(null!==n){i.push({kind:"name",name:n});continue}let a=_(t,o);if(null===a)return null;i.push({kind:"objectNumber",objectNumber:a})}return i},D=o=>{if(p.has(o))throw F9("native action model contains a cycle",{nodeId:o});p.add(o);try{let a=F5[e.EPDFAction_GetNodeType(r,o)]??"unknown",s=h2(t,(t,n)=>e.EPDFAction_GetNodeSubtype(r,o,t,n))??"",l=e.EPDFAction_GetNextCount(r,o);if(!Number.isInteger(l)||l<0)throw F9("invalid action child count",{nodeId:o,nextCount:l});let u=[];for(let t=0;t(h=!0,{type:"unknown",subtype:s,next:u});switch(a){case"javascript":{if(!e.EPDFAction_NodeHasJavaScript(r,o))return c();let n=h3(t,(t,n)=>e.EPDFAction_GetNodeJavaScript(r,o,t,n))??"";return i.addScript(n),{type:a,subtype:s,script:n,next:u}}case"rendition":{if(!e.EPDFAction_NodeHasJavaScript(r,o))return{type:a,subtype:s,next:u};let n=h3(t,(t,n)=>e.EPDFAction_GetNodeJavaScript(r,o,t,n))??"";return i.addScript(n),{type:a,subtype:s,script:n,next:u}}case"goto":{let i=e.EPDFAction_GetNodeDest(n,r,o),l=0n!==i?F2(e,t,n,i):null;return l?{type:a,subtype:s,destination:l,next:u}:c()}case"uri":{let t=F((t,i)=>e.EPDFAction_GetNodeURI(n,r,o,t,i));if(null===t)return c();return{type:a,subtype:s,uri:t,isMap:g(t=>e.EPDFAction_GetNodeURIIsMap(r,o,t))??!1,next:u}}case"named":{let t=F((t,n)=>e.EPDFAction_GetNodeName(r,o,t,n));return null===t?c():{type:a,subtype:s,name:t,next:u}}case"hide":{let t=e.EPDFAction_GetNodeTargetCount(r,o);if(!Number.isInteger(t)||t<0)return c();i.reserveTargets(t);let n=P(o,t);if(null===n)return c();return{type:a,subtype:s,targets:n,hide:g(t=>e.EPDFAction_GetNodeHideFlag(r,o,t))??!0,next:u}}case"reset-form":{let n=h0(t,[4,4],([n,i])=>e.EPDFAction_GetNodeResetForm(r,o,n,i)?{hasFields:0!==F1(t,n),exclude:0!==F1(t,i)}:null),l=e.EPDFAction_GetNodeTargetCount(r,o);if(null===n||!Number.isInteger(l)||l<0)return c();i.reserveTargets(l);let d=n.hasFields?P(o,l):null;if(n.hasFields&&null===d)return c();return{type:a,subtype:s,fields:d,exclude:n.exclude,next:u}}case"submit-form":{if("function"!=typeof e.EPDFAction_GetNodeSubmitForm)return{type:a,subtype:s,next:u};let n=h0(t,[4,4],([n,i])=>e.EPDFAction_GetNodeSubmitForm(r,o,n,i)?{hasFields:0!==F1(t,n),flags:F1(t,i)>>>0}:null);if(null===n)return c();let l=F((t,n)=>e.EPDFAction_GetNodeSubmitFormURL(r,o,t,n));if(null===l)return c();let d=e.EPDFAction_GetNodeTargetCount(r,o);if(!Number.isInteger(d)||d<0)return c();i.reserveTargets(d);let f=n.hasFields?P(o,d):null;if(n.hasFields&&null===f)return c();let m=F((t,n)=>e.EPDFAction_GetNodeSubmitFormCharSet(r,o,t,n));return{type:a,subtype:s,payload:{url:l,fields:f,...j(n.flags),...null===m?{}:{charSet:m}},next:u}}case"goto-remote":case"goto-embedded":case"launch":{let t=F((t,n)=>e.EPDFAction_GetNodeFilePath(r,o,t,n));return null===t?c():{type:a,subtype:s,filePath:t,next:u}}default:return{type:a,subtype:s,next:u}}}finally{p.delete(o)}},b=null===m?null:D(m),y=(s=c,l=f,u=[],(1&s)!=0&&u.push("cycle-dropped"),(2&s)!=0&&u.push("malformed-next"),((4&s)!=0||l)&&u.push("incomplete"),u);return h&&y.push("payload-dropped"),{root:b,incomplete:f,warnings:y}}finally{e.EPDFAction_CloseModel(r)}}function F7(e,t){if(!Number.isInteger(e)||e<0||e>=t)throw F9("native action model returned an invalid node id",{raw:e,nodeCount:t});return e}function F9(e,t){return new N(G.MalformedPdf,e,{details:t})}var ge={x:0,y:1,distance:2,area:3,angle:4,slope:5},gt=["decimal","fraction","round","truncate"],gn=["thousands","decimal","prefixSpacing","suffixSpacing"];function gr(e){if(!e)throw new N(G.Unknown,"Measurement native write failed after preflight")}function gi(e,t,n="f32"){return hY(e,4,r=>t(r)?Number(e.peek(r,n)):void 0)}function go(e,t,n){return t?hY(e,8,r=>(e.poke(r,"f32",t.x),e.poke(r,"f32",t.y,4),n(r))):n(0n)}function ga(e,t,n){if(!n)return;let r=e.EPDFMeasure_GetSubtype(n);if(1!==r)return{subtype:2===r?"geospatial":"unknown"};let i=r=>Array.from({length:e.EPDFMeasure_CountFormats(n,r)},(i,o)=>{let a=e.EPDFMeasure_GetFormat(n,r,o),s={unit:h3(t,(t,n)=>e.EPDFNumberFormat_GetUnit(a,t,n))??""},l=gi(t,t=>e.EPDFNumberFormat_GetConversion(a,t));void 0!==l&&(s.conversion=l);let u=gi(t,t=>e.EPDFNumberFormat_GetFraction(a,t),"i32");void 0!==u&>[u]&&(s.fraction=gt[u]);let d=gi(t,t=>e.EPDFNumberFormat_GetPrecision(a,t),"i32");void 0!==d&&(s.precision=d);let c=gi(t,t=>e.EPDFNumberFormat_GetFixedDenominator(a,t),"i32");void 0!==c&&(s.fixed=!!c);let f=gi(t,t=>e.EPDFNumberFormat_GetLabelPosition(a,t),"i32");for(let[n,r]of(void 0!==f&&(s.labelPosition=1===f?"prefix":"suffix"),gn.entries())){let i=h3(t,(t,r)=>e.EPDFNumberFormat_GetText(a,n,t,r));null!==i&&(s[r]=i)}return s}),o=h3(t,(t,r)=>e.EPDFMeasure_GetRatio(n,t,r)),a=hY(t,8,r=>e.EPDFMeasure_GetOrigin(n,r)?{x:Number(t.peek(r,"f32")),y:Number(t.peek(r,"f32",4))}:void 0),s=gi(t,t=>e.EPDFMeasure_GetCYX(n,t)),l={subtype:"rectilinear",x:i(0),distance:i(2),area:i(3),...null!==o?{ratio:o}:{},...a?{origin:a}:{},...void 0!==s?{cyx:s}:{}};for(let e of["y","angle","slope"]){let t=i(ge[e]);t.length&&(l[e]=t)}return l}function gs(e,t,n,r){for(let[i,o]of(gr(n),void 0!==r.ratio&&gr(h6(t,r.ratio,t=>e.EPDFMeasure_SetRatio(n,t))),r.origin&&gr(go(t,r.origin,t=>e.EPDFMeasure_SetOrigin(n,t))),void 0!==r.cyx&&hY(t,4,i=>{t.poke(i,"f32",r.cyx),gr(e.EPDFMeasure_SetCYX(n,i))}),Object.entries(ge)))for(let a of r[i]??[]){let r,i=t.writeU16String(a.unit);try{r=e.EPDFMeasure_AddFormat(n,o,i,a.conversion)}finally{t.free(i)}for(let[n,i]of(gr(r),void 0!==a.fraction&&gr(e.EPDFNumberFormat_SetFraction(r,gt.indexOf(a.fraction))),void 0!==a.precision&&gr(e.EPDFNumberFormat_SetPrecision(r,a.precision)),void 0!==a.fixed&&gr(e.EPDFNumberFormat_SetFixedDenominator(r,a.fixed)),void 0!==a.labelPosition&&gr(e.EPDFNumberFormat_SetLabelPosition(r,+("prefix"===a.labelPosition))),gn.entries()))void 0!==a[i]&&gr(h6(t,a[i],t=>e.EPDFNumberFormat_SetText(r,n,t)))}}function gl(e,t,n,r){let i=[],o=e.EPDFPage_CountViewportsRaw(n,r);for(let a=0;ae.EPDFViewport_GetBBox(o,n)?eH(FX(t,n)):void 0);if(!n)continue;let r=h3(t,(t,n)=>e.EPDFViewport_GetName(o,t,n)),a=ga(e,t,e.EPDFViewport_GetMeasure(o));i.push({bbox:n,owned:r===nb&&(!a||"rectilinear"===a.subtype),name:r,measure:a??null})}finally{e.EPDFViewport_Close(o)}}return i}function gu(e){return"wasm"===e.kind?4:8}function gd(e,t,n,r){"wasm"===e.kind?e.mem.poke(t,"i32",Number(r),n):e.mem.poke(t,"i64",BigInt(r),n)}function gc(e,t,n){let r=gu(e);return hY(e.mem,Math.max(1,t.length*r),i=>(t.forEach((t,n)=>gd(e,i,n*r,t)),n(i,t.length)))}function gf(e,t,n){let{mem:r}=e,i=t.map(e=>r.writeU16String(e));try{return gc(e,i,n)}finally{for(let e=i.length-1;e>=0;e--)r.free(i[e])}}var gm=[null,"decimal","upperRoman","lowerRoman","upperLetters","lowerLetters"];function gp(e,t){let{fn:n,mem:r}=e,i=n.EPDFDoc_GetPageLabelSectionCount(t),o=[];return h0(r,[4,4,4],([e,a,s])=>{for(let l=0;ln.EPDFDoc_GetPageLabelSectionAt(t,l,r,i,e,a,s));o.push({firstPage:F1(r,e),style:gm[F1(r,a)]??null,firstNumber:F1(r,s),prefix:i??""})}}),o}var gh=class{constructor(e,t){this.runtime=e,this.session=t}read(e){hW(e);let{fn:t,mem:n}=this.runtime,r=this.session.requireDocPtr(),i=this.session.allRecords(),o=new F4,a=gp(this.runtime,r);return h0(n,[16,4,4],([s,l,u])=>{var d,c,f;let m,p=i.map(i=>{var d,c,f,m,p,h,F,g,_,P;let D,b,y,w;hW(e);let E=i.pageIndex,A=(c=t,f=n,m=r,p=i.pageObjectNumber,h=o,D={},b=F8(c,f,m,c.EPDFDoc_GetPageActionModel(m,p,0),h),y=F8(c,f,m,c.EPDFDoc_GetPageActionModel(m,p,1),h),b&&(D.open=b),y&&(D.close=y),b||y?D:void 0),v=gl(t,n,r,E),S=gg(t,n,r,E,s);return{index:E,ref:q(i.pageObjectNumber),label:function(e,t){let n;for(let r of e){if(r.firstPage>t)break;n=r}if(!n)return null;let r=n.prefix+function(e,t){switch(e){case null:return"";case"decimal":return String(t);case"upperRoman":return r2(t).toUpperCase();case"lowerRoman":return r2(t);case"upperLetters":return r6(t).toUpperCase();case"lowerLetters":return r6(t)}}(n.style,n.firstNumber+t-n.firstPage);return""===r?null:r}(a,E),size:{width:(d=S.crop).right-d.left,height:d.top-d.bottom},rotation:gP(t,n,r,E,u),userUnit:function(e,t,n,r,i){if(!e.EPDF_GetPageUserUnitByIndex(n,r,i))return 1;let o=F0(t,i,0);return Number.isFinite(o)&&o>0?o:1}(t,n,r,E,l),tabOrder:(F=t,g=n,_=r,P=E,(w=h2(g,(e,t)=>F.EPDF_GetPageTabOrderByIndex(_,P,e,t)))?gD[w]??null:null),boxes:S,pdfCropBox:S.crop,...A?{actions:A}:{},...v.length?{viewports:v}:{}}});return{pageCount:p.length,pages:p,labels:a,namedPages:(d=t,c=n,f=r,m=[],h0(c,[4,4],([e,t])=>{for(let n of gb){let r=d.EPDFDoc_GetNamedPageCount(f,n);for(let i=0;id.EPDFDoc_GetNamedPageAt(f,n,i,r,o,e,t),"");if(null===r)continue;let o=Number(c.peek(e,"i32"))>>>0,a=Number(c.peek(t,"i32"));m.push({name:r,target:0===a?{kind:"page",page:q(o)}:1===a?{kind:"template",objectNumber:o}:{kind:"dangling"}})}}}),m)}})}};function gF(e,t){let n=new Map,r=null;return i=>{let o=n.get(i.objectNumber);if(o)return o;r??(r=new Map(t.allRecords().map(e=>[e.pageObjectNumber,e.pageIndex])));let a=r.get(i.objectNumber);if(void 0===a)throw new N(G.NotFound,`no page with object number ${i.objectNumber}`);let{fn:s,mem:l}=e,u=t.requireDocPtr(),d=hY(l,16,e=>gg(s,l,u,a,e).crop);return n.set(i.objectNumber,d),d}}function gg(e,t,n,r,i){var o;let a,s,l,u=o=>(function(e,t,n,r,i,o){if(e.EPDF_GetPageBoxByIndex(n,r,i,o))return eH(FX(t,o))})(e,t,n,r,o,i);return a=(o={media:u(0),crop:u(1),bleed:u(2),trim:u(3),art:u(4)}).media??iJ,l=(s=e=>{let t,n,r,i;return t=Math.max(e.left,a.left),n=Math.min(e.right,a.right),r=Math.max(e.bottom,a.bottom),i=Math.min(e.top,a.top),(tgP(e.fn,e.mem,t,n,r))}function gP(e,t,n,r,i){var o;return e.EPDF_GetPageRotateByIndex(n,r,i)?Number.isInteger(o=F1(t,i))&&o%90==0?(o%360+360)%360:0:0}var gD={R:"rows",C:"columns",S:"structure",A:"annotations",W:"widgets"},gb=[0,1];function gy(e,t,n){if("start"===t)return 0;if("end"===t)return n;let{pageIndex:r}=e.resolvePageRef(n_(t));return"before"in t?r:r+1}var gw=class{constructor(e,t){this.runtime=e,this.session=t}reorder(e,t,n){let r,i=this.session.resolvePageRefs(e);hW(n),this.requireUniquePageObjectNumbers("pages.reorder",i);let o=n_(t);if(o&&i.includes(o.objectNumber))throw new N(G.InvalidArg,`pages.reorder: the neighbour page ${o.objectNumber} is one of the pages that move`,{details:{field:"position"}});let{fn:a,mem:s}=this.runtime,l=this.session.requireDocPtr(),u=i.map(e=>(hW(n),this.session.recordByObjectNumber(e).pageIndex)),d=gy(this.session,t,a.FPDF_GetPageCount(l)),c=d-u.filter(e=>e=o)throw new N(G.InvalidArg,`pages.delete would remove every page (${n.length} of ${o}); a document must keep at least one`);let a=this.session.pagePool();for(let e of n)if(this.session.recordByObjectNumber(e),a.isHeld(e))throw new N(G.Unknown,`internal invariant violation: pagePtr for page ${e} is still held during pages.delete`);for(let e of n)if(!r.EPDFDoc_DeletePageByObjectNumber(i,e))throw new N(G.Unknown,`EPDFDoc_DeletePageByObjectNumber rejected page ${e} after validation`);return this.session.refreshPageRegistry(),{layout:new gh(this.runtime,this.session).read(t),meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}setName(e,t){if(hW(t),0===e.name.length)throw new N(G.InvalidArg,"pages.setName requires a non-empty name");let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=this.session.resolvePageRef(e.page).pageObjectNumber;if(void 0!==e.replace&&e.replace!==e.name&&e.replace.length>0&&h6(r,e.replace,e=>n.EPDFDoc_RemoveNamedPage(i,e)),!h6(r,e.name,e=>n.EPDFDoc_SetNamedPage(i,e,o)))throw new N(G.Unknown,`EPDFDoc_SetNamedPage rejected \'${e.name}\' for page ${o}`);return{layout:new gh(this.runtime,this.session).read(t),meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}removeName(e,t){if(hW(t),0===e.name.length)throw new N(G.InvalidArg,"pages.removeName requires a non-empty name");let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr();if(!h6(r,e.name,e=>n.EPDFDoc_RemoveNamedPage(i,e)))throw new N(G.NotFound,`pages.removeName: no /Names /Pages registration \'${e.name}\'`);return{layout:new gh(this.runtime,this.session).read(t),meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}requireUniquePageObjectNumbers(e,t){if(0===t.length)throw new N(G.InvalidArg,`${e} requires at least one page`);let n=new Set;for(let r of t){if(n.has(r))throw new N(G.InvalidArg,`${e} was given duplicate page object number ${r}`);n.add(r)}}},gE=class{constructor(e,t){this.runtime=e,this.session=t}extract(e,t,n){let r;if(hW(n),0===e.length)throw new N(G.InvalidArg,"pages.extract requires at least one page");let i=this.session.resolvePageRefs(e),o=new Set;for(let e of i){if(o.has(e))throw new N(G.InvalidArg,`pages.extract was given duplicate page object number ${e}`);o.add(e)}let a=i.map(e=>this.session.recordByObjectNumber(e).pageIndex),{fn:s,mem:l}=this.runtime,u=this.session.requireDocPtr(),d=l.alloc(4*a.length);for(let e=0;e(n.EPDFDoc_GetImportFieldRoots(t,0n,0,e,i),Array.from({length:i},(t,n)=>Number(r.peek(e,"i32",4*n)))))}(e,n);if(0===o.length)return;let a=o.map(e=>h3(i,(t,i)=>r.EPDFForm_GetFieldPartialName(n,e,t,i))??""),s=function(e,t){let{fn:n,mem:r}=e,i=gv(e,t),o=new Set;for(let e=0;en.EPDFForm_GetFieldName(i,e,t,r));t&&o.add(t.split(".")[0])}return o}(e,t),l=new Set([...s,...a]);o.forEach((e,t)=>{let o=a[t];if(!s.has(o))return;let u=o;for(let e=2;l.has(u);e++)u=`${o}_${e}`;if(l.add(u),!h5(i,u,t=>r.EPDFForm_SetFieldName(n,e,t)))throw new N(G.Unknown,`pages.insert could not rename the inserted field "${o}" to "${u}"`)})}function gx(e,t,n){let{pageIndex:r}=t.resolvePageRef(q(n)),i=e.fn.EPDFPage_PromoteInlineAnnotsRaw(t.requireDocPtr(),r);if(i<0)throw new N(G.Unknown,`the inline annotations of page ${n} could not be promoted`);return 0!==i&&(t.pagePool().closeIdle(),!0)}var gG=class{constructor(e,t){this.runtime=e,this.session=t}insert(e,t,n,r){if(hW(n),0===e.byteLength)throw new N(G.InvalidArg,"pages.insert requires non-empty bytes");let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr(),s=gy(this.session,t,i.FPDF_GetPageCount(a)),l=o.alloc(e.byteLength),u=null;try{if(o.writeBytes(l,new Uint8Array(e)),!(u=i.FPDF_LoadMemDocument(l,e.byteLength,"")))throw hX(i,null,new N(G.MalformedPdf,"pages.insert source PDF could not be opened"));let t=i.FPDF_GetPageCount(u);if(t<=0)throw new N(G.InvalidArg,"pages.insert source PDF has no pages");gk(this.runtime,this.session,u);let a=this.importInto(u,s,t,r,"pages.insert",n),d=u;return this.session.retainUntilClose(()=>{i.FPDF_CloseDocument(d),o.free(l)}),a}catch(e){throw u&&i.FPDF_CloseDocument(u),o.free(l),e}}copy(e,t,n,r){if(hW(n),0===e.length)throw new N(G.InvalidArg,"pages.copy requires at least one page");let i=this.session.resolvePageRefs([...e]).map(e=>this.session.recordByObjectNumber(e).pageIndex),{fn:o}=this.runtime,a=this.session.requireDocPtr(),s=gy(this.session,t,o.FPDF_GetPageCount(a)),l=o.FPDF_CreateNewDocument();if(!l)throw new N(G.Unknown,"FPDF_CreateNewDocument failed");try{if(!h1(this.runtime.mem,i,(e,t)=>o.EPDFDoc_ImportPages(l,a,e,t,0,0n)))throw new N(G.Unknown,`EPDFDoc_ImportPages rejected copying pages [${i.join(",")}] out`);gk(this.runtime,this.session,l);let e=this.importInto(l,s,i.length,r,"pages.copy",n);return this.session.retainUntilClose(()=>o.FPDF_CloseDocument(l)),e}catch(e){throw o.FPDF_CloseDocument(l),e}}importInto(e,t,n,r,i,o){let{fn:a,mem:s}=this.runtime,l=this.session.requireDocPtr();if(r&&r.length!==n)throw new N(G.InvalidArg,`${i} needs one object number per page: ${r.length} for ${n}`,{details:{field:"objectNumbers"}});for(let e of r??[])this.session.claimObjectNumber(e);if(!(r?h1(s,r,n=>a.EPDFDoc_ImportPages(l,e,0n,0,t,n)):a.EPDFDoc_ImportPages(l,e,0n,0,t,0n)))throw new N(G.Unknown,`EPDFDoc_ImportPages rejected the ${i} at index ${t}`);this.session.refreshPageRegistry();let u=new gh(this.runtime,this.session).read(o),d=u.pages.slice(t,t+n).map(e=>e.ref);for(let e of d)gx(this.runtime,this.session,e.objectNumber);return{insertedPages:d,layout:u,meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}insertBlank(e,t,n,r){hW(n);let{size:i}=e,o=e.count??1;if(!Number.isFinite(i?.width)||!Number.isFinite(i?.height)||i.width<=0||i.height<=0)throw new N(G.InvalidArg,`pages.insertBlank size must have positive finite dimensions, got ${i?.width}x${i?.height}`);if(!Number.isInteger(o)||o<1||o>100)throw new N(G.InvalidArg,`pages.insertBlank count ${o} out of range [1, 100]`);let{fn:a}=this.runtime,s=this.session.requireDocPtr(),l=gy(this.session,t,a.FPDF_GetPageCount(s));if(r&&r.length!==o)throw new N(G.InvalidArg,`pages.insertBlank needs one object number per page: ${r.length} for ${o}`,{details:{field:"objectNumbers"}});for(let e of r??[])this.session.claimObjectNumber(e);for(let e=0;ee.ref),layout:u,meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}},gO=class{constructor(e,t){this.runtime=e,this.session=t}flatten(e,t,n){hW(n);let r=this.session.resolvePageRefs(e);var i=r;if(0===i.length)throw new N(G.InvalidArg,"pages.flatten requires at least one page");let o=new Set;for(let e of i){if(o.has(e))throw new N(G.InvalidArg,`pages.flatten was given duplicate page object number ${e}`);o.add(e)}let a=[],s=new Set;for(let e of r){let r;hW(n),gx(this.runtime,this.session,e)&&s.add(e);let i=this.session.pagePool(),o=i.acquire(e);try{r=this.runtime.fn.EPDFPage_Flatten(o,+("print"===t))}finally{i.release(e)}if(2===r){a.push({page:q(e),status:"unchanged"});continue}if(1!==r)throw new N(G.Unknown,0===r?"native page flatten failed after preflight":`native page flatten returned unexpected code ${r}`);s.add(e),a.push({page:q(e),status:"applied"})}return 0===s.size?{pages:e,usage:t,results:a,meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}:(this.session.invalidateDerived(),{pages:e,usage:t,results:a,meta:{affectedPages:[...s].map(e=>q(e)),cacheDelta:null,...this.session.writeStamp()}})}};function gI(e,t,n,r,i,o){let a=e.EPDFAnnot_GetObjectNumber(i);return a<=0?{kind:"baseIndex",page:r,baseIndex:o}:gN(e,t,n,r,a)}function gN(e,t,n,r,i){var o,a,s,l;let u=(o=e,a=t,s=n,l=i,h0(a,[8,8],([e,t])=>(Ft(a,e,0),Ft(a,t,0),o.EPDFLayer_GetBirthName(s,l,e,t))?Fn(a,t):null));return null===u?{kind:"objectNumber",page:r,objectNumber:i}:{kind:"baseIndex",page:r,baseIndex:u}}function gC(e,t,n){let{fn:r}=e,i=t.requireDocPtr(),{pageIndex:o}=t.resolvePageRef(n.page),a=n.page.objectNumber;switch(n.kind){case"objectNumber":{let e=r.EPDFPage_GetAnnotIndexByObjectNumberRaw(i,o,n.objectNumber);if(e<0)throw new N(G.NotFound,`no annotation with object number ${n.objectNumber} on page ${a}`);return{pageIndex:o,index:e}}case"baseIndex":{let t=function(e,t,n,r,i){let{fn:o}=e;if(o.EPDFLayer_IsPagePromoted(t,n)){let e=o.EPDFLayer_GetBirthObjectNumber(t,n,i);return e<=0?-1:o.EPDFPage_GetAnnotIndexByObjectNumberRaw(t,r,e)}if(i<0||i>=o.EPDFPage_GetAnnotCountRaw(t,r))return -1;let a=o.EPDFPage_GetAnnotRaw(t,r,i);if(!a)return -1;try{return o.EPDFAnnot_GetObjectNumber(a)>0?-1:i}finally{o.FPDFPage_CloseAnnot(a)}}(e,i,a,o,n.baseIndex);if(t<0)throw new N(G.NotFound,`no annotation born at position ${n.baseIndex} of page ${a}`);return{pageIndex:o,index:t}}}}function gj(e,t,n){let{pageIndex:r,index:i}=gC(e,t,n);return gM(e,t,r,i)}function gM(e,t,n,r){let i=e.fn.EPDFPage_GetAnnotRaw(t.requireDocPtr(),n,r);if(!i)throw new N(G.Unknown,`annotation ${r} of page index ${n} could not be opened`);return i}function gR(e,t,n){let{pageIndex:r,index:i}=gC(e,t,n),o=gM(e,t,r,i),{fn:a,mem:s}=e;return{annotPtr:o,name:gI(a,s,t.requireDocPtr(),n.page,o,i)}}function gT(e,t,n,r){let{index:i}=gC(e,t,r),o=e.fn.FPDFPage_GetAnnot(n,i);if(!o)throw new N(G.Unknown,`annotation ${i} of page ${r.page.objectNumber} could not be opened`);return o}var gB=class{constructor(e,t){this.runtime=e,this.session=t}apply(e,t){hW(t);let n=this.buildPlan(e);for(let e of n.keys())this.session.recordByObjectNumber(e);this.preflight(n,t);let{fn:r}=this.runtime,i=[],o=new Set,a=0;for(let[e,s]of n){hW(t),gx(this.runtime,this.session,e)&&o.add(e);let n=this.session.pagePool(),l=n.acquire(e);try{let t=null===s?this.applyAllOnPage(l):this.applyRefsOnPage(l,s);"applied"===t.status&&(r.FPDFPage_GenerateContent(l),o.add(e),a+=t.removed),i.push({page:q(e),status:t.status,removedAnnotationCount:t.removed})}finally{n.release(e)}}return 0===o.size?{scope:e,results:i,removedAnnotationCount:a,meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}:(this.session.invalidateDerived(),{scope:e,results:i,removedAnnotationCount:a,meta:{affectedPages:[...o].map(e=>q(e)),cacheDelta:null,...this.session.writeStamp()}})}buildPlan(e){let t=new Map;if("pages"in e){if(0===this.session.resolvePageRefs(e.pages).length)throw new N(G.InvalidArg,"redaction.apply requires at least one page");for(let n of this.session.resolvePageRefs(e.pages)){if(t.has(n))throw new N(G.InvalidArg,`redaction.apply was given duplicate page object number ${n}`);t.set(n,null)}return t}if(0===e.annotations.length)throw new N(G.InvalidArg,"redaction.apply requires at least one annotation ref");for(let n of e.annotations){let e=t.get(n.page.objectNumber);if(null===e)throw new N(G.InvalidArg,"mixed redaction scopes on one page");e?e.push(n):t.set(n.page.objectNumber,[n])}return t}preflight(e,t){let{fn:n}=this.runtime;for(let[r,i]of e){if(null===i)continue;hW(t);let e=this.session.pagePool(),o=e.acquire(r);try{for(let e of i){let t=gT(this.runtime,this.session,o,e);try{let e=rN(n.FPDFAnnot_GetSubtype(t));if("redact"!==e)throw new N(G.InvalidArg,`redaction.apply ref on page ${r} resolves to a \'${e}\' annotation, not a redact annotation`)}finally{n.FPDFPage_CloseAnnot(t)}}}finally{e.release(r)}}}applyAllOnPage(e){let{fn:t,mem:n}=this.runtime,r=this.pageHasRedactAnnotations(e);return hY(n,4,i=>{if(!t.EPDFPage_ApplyRedactions(e,0n,0,i)){if(r)throw new N(G.Unknown,"native page redaction apply failed");return{status:"unchanged",removed:0}}return{status:"applied",removed:F1(n,i)>>>0}})}pageHasRedactAnnotations(e){let{fn:t}=this.runtime,n=t.FPDFPage_GetAnnotCount(e);for(let r=0;rhY(r,4,a=>{let s=n.EPDFPage_ApplyRedactions(e,t,i,a);return s&&(o=F1(r,a)>>>0),s})))throw new N(G.Unknown,"native redaction apply failed after preflight")}finally{for(let e of i)n.FPDFPage_CloseAnnot(e)}return{status:"applied",removed:o}}},gL=class{constructor(e,t){this.runtime=e,this.session=t}async read(e,t,n){hW(t);let{fn:r}=this.runtime,i=this.session.pagePool(),o=await i.acquireInSlices(e,t,n);try{hW(t);let n=r.FPDFText_LoadPage(o);if(!n)throw new N(G.RuntimeUnavailable,`FPDFText_LoadPage returned null for page object ${e}`);try{hW(t);let i=Math.max(r.FPDFText_CountChars(n),0),o=function(e,t,n){if(n<=0)return"";let{fn:r,mem:i}=e,o=2*n+1;return hY(i,2*o,e=>{let n=r.EPDFText_GetTextFull(t,e,o);return n<=1?"":function(e){let t=new Uint16Array(e.buffer,e.byteOffset,e.byteLength>>1),n="";for(let e=0;e{r.EPDFText_GetCharToTextMap(t,e,o);let n=i.readBytes(e,8*o),a=new Int32Array(n.buffer,n.byteOffset,2*o),s=Array(o);for(let e=0;ee)return`anchor ${t} char ${o} outside [1, ${e}]`;let s=a-(i+(o-r-1));if(0!==s&&2!==s)return`anchor ${t} implies a character contributing ${s} text units (expected 0 or 2)`;r=o,i=a}let o=i+(e-r);return o!==t?`map projects charCount to ${o}, but text length is ${t}`:null}(i,o.length,a);if(null!==s)throw new N(G.RuntimeUnavailable,`char map invariant violated for page object ${e}: ${s}`);return function(e){let{text:t,charCount:n}=e;if(!ng.test(t))return e;let r=e.charMap??[],i=[],o=[],a=0,s=0,l=0;for(let e=0;e=64976&&n<=65007||(65534&n)==65534)?"":e}(t.slice(s,n),t[n]);i.push(u),l+=u.length,1!==u.length&&o.push([e+1,l]),s=n}let u=i.join("");return o.length>0?{text:u,charCount:n,charMap:o}:{text:u,charCount:n}}(a.length>0?{text:o,charCount:i,charMap:a}:{text:o,charCount:i})}finally{r.FPDFText_ClosePage(n)}}finally{i.release(e)}}},g$=class{constructor(e,t){this.slices=e,this.signal=t,hJ(this,"started",performance.now())}get due(){return performance.now()-this.started>=this.slices.budgetMs}async pause(){await this.slices.between(),hW(this.signal),this.started=performance.now()}},gz=class{constructor(e,t){this.runtime=e,this.session=t}async read(e,t,n){hW(t);let{fn:r,mem:i}=this.runtime,o=this.session.pagePool(),a=await o.acquireInSlices(e,t,n);try{hW(t);let o=r.FPDFText_LoadPage(a);if(!o)throw new N(G.RuntimeUnavailable,`FPDFText_LoadPage returned null for page object ${e}`);try{hW(t);let a=Math.max(r.FPDFText_CountChars(o),0);if(0===a)return{runs:[]};let s=[],l=Math.min(a,4096),u=i.alloc(l*FQ.bytes);try{let d=new g$(n,t);for(let t=0;ta.getFloat32(e,!0),l=e=>eH({left:s(e),top:s(e+4),right:s(e+8),bottom:s(e+12)}),u=e=>({upperLeft:{x:s(e),y:s(e+4)},upperRight:{x:s(e+8),y:s(e+12)},lowerLeft:{x:s(e+16),y:s(e+20)},lowerRight:{x:s(e+24),y:s(e+28)}}),d=e.length>0?e[e.length-1].objectKey:null;for(let c=0;c+n<=t.byteLength;c+=n){let t=c+r.geometry,n=a.getUint32(c+r.objectRun,!0),f={objectKey:n,...function(e){let t=a.getUint32(e+i.flags,!0);if(t&o.empty)return{flags:2,looseBox:{left:0,bottom:0,right:0,top:0},upright:!0,baselineAngle:0,ascentFlip:!1};let n=!!(t&o.upright),r={flags:t&o.space?1:0,looseBox:l(e+i.looseBox),upright:n,baselineAngle:0,ascentFlip:!1};if(t&o.hasTightBox&&(r.tightBox=l(e+i.tightBox)),t&o.hasLooseQuad&&!n){r.looseQuad=u(e+i.looseQuad),t&o.hasTightQuad&&(r.tightQuad=u(e+i.tightQuad));let n=s(e+i.matrix),a=s(e+i.matrix+4),l=s(e+i.matrix+8),d=s(e+i.matrix+12);r.baselineAngle=Math.atan2(a,n),r.ascentFlip=n*d-a*l<0}return r}(t)};n!==d&&(f.fontSize=s(c+r.fontSize),d=n),e.push(f)}}(s,i.readBytes(u,c*FQ.bytes))}}finally{i.free(u)}return{runs:function(e){let t,n,r=[],i=[],o=0,a=null,s=e=>{i.length>0&&(r.push(function(e,t,n,r){if(r&&!r.upright){let i=e.map(e=>e.looseQuad?{loose:e.looseQuad,...e.tightQuad?{tight:e.tightQuad}:{},...gU(e.flags)}:{loose:{upperLeft:{x:0,y:0},upperRight:{x:0,y:0},lowerLeft:{x:0,y:0},lowerRight:{x:0,y:0}},...gU(e.flags)});return{rect:gV(e,e=>{var t;let n,r;return e.looseQuad?(n=[(t=e.looseQuad).upperLeft.x,t.upperRight.x,t.lowerLeft.x,t.lowerRight.x],r=[t.upperLeft.y,t.upperRight.y,t.lowerLeft.y,t.lowerRight.y],{left:Math.min(...n),right:Math.max(...n),bottom:Math.min(...r),top:Math.max(...r)}):gW}),start:t,glyphs:i,rotation:(-(180*r.baselineAngle)/Math.PI%360+360)%360,ascentFlip:r.ascentFlip,...void 0!==n?{fontSize:n}:{}}}let i=e.map(e=>({loose:e.looseBox,...e.tightBox?{tight:e.tightBox}:{},...gU(e.flags)}));return{rect:gV(e,e=>e.looseBox),start:t,glyphs:i,...void 0!==n?{fontSize:n}:{}}}(i,o,t,n)),i=[],n=void 0),o=e};for(let r=0;r=Math.abs(Math.atan2(Math.sin(n),Math.cos(n)))}(n,l)&&s(r),n||(n=l)),i.push(o)}return s(e.length),r}(s)}}finally{r.FPDFText_ClosePage(o)}}finally{o.release(e)}}};function gU(e){return{...1&e?{space:!0}:{},...2&e?{empty:!0}:{}}}function gV(e,t){let n=null;for(let r of e){if(2&r.flags)continue;let e=t(r);if(!n){n={left:e.left,bottom:e.bottom,right:e.right,top:e.top};continue}n.left=Math.min(n.left,e.left),n.bottom=Math.min(n.bottom,e.bottom),n.right=Math.max(n.right,e.right),n.top=Math.max(n.top,e.top)}return n??{...gW}}var gW={left:0,bottom:0,right:0,top:0};async function gq(e,t){let n=gH(e,t);if(!n)return null;try{return await t.draw(n.bitmapPtr,n.matrixPtr,n.clipPtr)?n.read():null}finally{n.free()}}function gH(e,t){var n,r,i;let{fn:o,mem:a}=e,{rect:s,page:l,rotation:u,viewport:d,background:c}=t;if(s.right<=s.left||s.top<=s.bottom)return null;let f=(n=s,r=l,{left:n.left-r.left,right:n.right-r.left,bottom:r.top-n.top,top:r.top-n.bottom}),{width:m,height:p}=function(e,t,n){var r;let i,o=90===t||270===t,a=o?e.height:e.width,s=o?e.width:e.height;if("width"===n.kind){if(!Number.isFinite(n.width)||n.width<=0)throw new N(G.InvalidArg,"render viewport width must be positive");let e=Math.max(1,Math.round(n.width));return{width:e,height:Math.max(1,Math.round(e*s/a))}}let l="dpi"===n.kind?(r=n.dpi,i=Math.max(e.width,e.height),r/72*Math.min(1,842/i,612/Math.min(e.width,e.height))):"thumbnail"===n.kind?512/Math.max(e.width,e.height):n.scale??1;if(!Number.isFinite(l)||l<=0)throw new N(G.InvalidArg,"render viewport scale must be positive");return{width:Math.max(1,Math.round(a*l)),height:Math.max(1,Math.round(s*l))}}({width:f.right-f.left,height:f.top-f.bottom},u,d);if(void 0!==t.maxOutputPixels&&m*p>t.maxOutputPixels)throw new N(G.InvalidArg,`render output ${m}x${p} exceeds the ${t.maxOutputPixels}-pixel budget \\u2014 request a smaller width (or tiles, once available)`);let h=4*m,F=h*p,g=null,_=null,P=null,D=null,b=()=>{_&&o.FPDFBitmap_Destroy(_),D&&a.free(D),P&&a.free(P),g&&a.free(g)};try{if(g=a.alloc(F),!(_=o.FPDFBitmap_CreateEx(m,p,4,g,h)))return b(),null;o.FPDFBitmap_FillRect(_,0,0,m,p,0xffffffff*("transparent"!==c)),P=a.alloc(24),function(e,t,n){for(let r=0;r<6;r++)e.poke(t,"f32",n[r],4*r)}(a,P,function(e,t,n,r){let{x:i,y:o}=e,a=e.width,s=e.height;switch(t){case 0:return[n/a,0,0,r/s,-n/a*i,-r/s*o];case 90:return[0,r/a,-n/s,0,n/s*(o+s),-r/a*i];case 180:return[-n/a,0,0,-r/s,n/a*(i+a),r/s*(o+s)];case 270:return[0,-r/a,n/s,0,-n/s*o,r/a*(i+a)]}}({x:(i=f).left,y:i.bottom,width:i.right-i.left,height:i.top-i.bottom},u,m,p)),D=a.alloc(16),a.poke(D,"f32",0,0),a.poke(D,"f32",0,4),a.poke(D,"f32",m,8),a.poke(D,"f32",p,12)}catch(e){throw b(),e}let y=g;return{bitmapPtr:_,matrixPtr:P,clipPtr:D,read:()=>{var e;let t;return{width:m,height:p,stride:h,color:"rgba8",premultipliedAlpha:!1,data:((t=new Uint8Array((e=a.readBytes(y,F)).byteLength)).set(e),t.buffer)}},free:b}}function gK(e,t){let{fn:n,mem:r}=e,i=hY(r,16,e=>n.FPDF_GetPageBoundingBox(t,e)?FX(r,e):null);return i?eH(i):{left:0,bottom:0,right:n.FPDF_GetPageWidthF(t),top:n.FPDF_GetPageHeightF(t)}}var gZ=class{constructor(e,t){this.runtime=e,this.session=t}async render(e,t,n,r){hW(n);let{fn:i}=this.runtime,o=this.session.pagePool(),a=await o.acquireInSlices(e,n,r);try{hW(n),function(e){let{usage:t,viewport:n}=e??{};if(void 0===t||"display"===t){if(n?.kind==="dpi"&&nl("viewport",\'a dpi viewport is only for a print picture (usage: "print")\'),n?.kind==="thumbnail"){e?.target!==void 0&&"page"!==e.target.kind&&nl("target","a thumbnail is the whole page: it takes no target");}return}for(let r of("print"!==t&&nl("usage",\'usage must be "display" or "print"\'),(n?.kind!=="dpi"||150!==n.dpi&&300!==n.dpi)&&nl("viewport","a print picture needs viewport: { kind: \'dpi\', dpi: 150 or 300 }"),["target","rotation","background"]))e?.[r]!==void 0&&nl(r,`a print picture takes no ${r}: it is the whole page, upright, on white`)}(t);let o="print"===t.usage,s=gK(this.runtime,a),l=function(e,t){if(!e||"page"===e.kind)return t;let n=eH(e.rect);if(!(n.right>n.left&&n.top>n.bottom))throw new N(G.InvalidArg,"render rect must have positive area");return n}(t.target,s),u=t.rotation??0,d=t.viewport??{kind:"scale",scale:1},c=function(e,t){let{includeAnnotations:n,includeFormFields:r}=e??{};if(!0===n&&!t.annotations)throw new na("doc.annotate.read","includeAnnotations");if(!0===r&&!t.formFields)throw new na("doc.forms.read","includeFormFields");return{includeAnnotations:n??t.annotations,includeFormFields:r??(!1!==n&&t.formFields)}}(t,{annotations:!0,formFields:!0}),f=16;c.includeAnnotations&&(f|=1),c.includeFormFields&&(f|=32768),o&&(f|=2048);let m=await gq(this.runtime,{rect:l,page:s,rotation:u,viewport:d,...void 0!==t.maxOutputPixels?{maxOutputPixels:t.maxOutputPixels}:{},background:"transparent"===t.background?"transparent":"white",draw:async(e,t,o)=>{hW(n);let s=i.EPDF_RenderPageBitmapWithMatrix_Start(e,a,t,o,f,r.budgetMs);try{for(;1===s;)await r.between(),hW(n),s=i.EPDF_RenderPage_Continue(a,r.budgetMs)}finally{i.FPDF_RenderPage_Close(a)}return 2===s}});if(!m)throw new N(G.RuntimeUnavailable,`failed to render page object ${e}`);return{raster:m,area:l}}finally{o.release(e)}}};function gJ(e,t){return{docPtr:e.requireDocPtr(),...t?{fonts:t}:{}}}function gQ(e,t){if(void 0===e.family)return e;let n=t.programOf?.(e.family),r=eU(e.family,t.describe),i={...e,family:r.family};return void 0!==r.weight&&void 0===e.weight&&(i.weight=r.weight),void 0!==r.italic&&void 0===e.italic&&(i.italic=r.italic),void 0!==n&&(i.program=n),i}function gX(e,t={}){let n=e.body?gQ(e.body,t):void 0;n&&void 0!==t.bodyProgram&&(n.program=t.bodyProgram);let r=e.paragraphs.map(e=>({...e,runs:e.runs.map(e=>({...e,text:e2(e.text,`\\r`),...e.style?{style:gQ(e.style,t)}:{}}))}));return JSON.stringify(n?{body:n,paragraphs:r}:{paragraphs:r})}function gY(e){let t;try{t=JSON.parse(e)}catch{return null}if(!t||"object"!=typeof t||!t.body||!Array.isArray(t.paragraphs))return null;let{source:n,...r}=t.body,i=g0(r),o=t.paragraphs.map(e=>{let{runs:t,...n}=e;return{...n,runs:(t??[]).map(e=>{let t="string"==typeof e.text?e2(e.text,`\n`):e.text;return e.style?{...e,text:t,style:g0(e.style)}:{...e,text:t}})}});return{source:t.source,document:{body:i,paragraphs:o}}}function g0(e){return"string"==typeof e.color?{...e,color:e.color.toLowerCase()}:e}function g1(e,t,n){let r=h2(t,(t,r)=>e.EPDFAnnot_GetRichTextJSON(n,t,r)),i=r?gY(r):null;if(i?.source!=="rc")return null;let{body:o,paragraphs:a}=i.document;return{body:{...o,family:o.family||e6.family},paragraphs:a}}function g3(e){let t=Math.fround(e);if(!Number.isFinite(t))return t;for(let e=1;e<9;e++){let n=Number(t.toPrecision(e));if(Math.fround(n)===t)return n}return t}var g2={invisible:1,hidden:2,print:4,noZoom:8,noRotate:16,noView:32,readOnly:64,locked:128,toggleNoView:256,lockedContents:512},g6=Object.keys(g2);function g5(e){let t={};for(let n of g6)void 0!==e[n]&&(t[n]=e[n]);return Object.keys(t).length>0?t:null}function g4(e){switch(e){case"square":return 1;case"circle":return 2;case"diamond":return 3;case"open-arrow":return 4;case"closed-arrow":return 5;case"butt":return 6;case"r-open-arrow":return 7;case"r-closed-arrow":return 8;case"slash":return 9;default:return 0}}function g8(e){switch(e){case 1:return"square";case 2:return"circle";case 3:return"diamond";case 4:return"open-arrow";case 5:return"closed-arrow";case 6:return"butt";case 7:return"r-open-arrow";case 8:return"r-closed-arrow";case 9:return"slash";default:return"none"}}function g7(e,t,n,r){return e.FPDFAnnot_HasKey(n,r)?h3(t,(t,i)=>e.FPDFAnnot_GetStringValue(n,r,t,i),""):null}function g9(e,t,n){return hY(t,16,r=>e.FPDFAnnot_GetRect(n,r)?FX(t,r):{left:0,bottom:0,right:0,top:0})}function _e(e,t,n,r=0){return h0(t,[4,4,4],([i,o,a])=>e.EPDFAnnot_GetColor(n,r,i,o,a)?e7(255&F1(t,i),255&F1(t,o),255&F1(t,a)):null)}function _t(e,t,n,r){return hY(t,4,i=>e.EPDFAnnot_GetBooleanValue(n,r,i)?0!==F1(t,i):null)}function _n(e,t,n){return hY(t,4,r=>e.EPDFAnnot_GetOpacity(n,r)?g3(F0(t,r)):null)}function _r(e,t,n){return hY(t,4,r=>({styleCode:e.EPDFAnnot_GetBorderStyle(n,r),width:F0(t,r)}))}function _i(e,t,n){return hY(t,4,r=>{if(!e.EPDFAnnot_GetBorderEffect(n,r))return null;let i=F0(t,r);return i>0?i:null})}function _o(e,t,n){let r=e.FPDFAnnot_GetVertices(n,0n,0);return r<=0?[]:hY(t,8*r,i=>{let o=e.FPDFAnnot_GetVertices(n,i,r);if(o<=0)return[];let a=[];for(let e=0;e{let a=e.FPDFAnnot_GetInkListPath(n,o,i,r);if(a<=0)return[];let s=[];for(let e=0;e0&&i.push(a)}return i}function _s(e,t,n){return h0(t,[8,8],([r,i])=>e.FPDFAnnot_GetLine(n,r,i)?{start:{x:F0(t,r,0),y:F0(t,r,4)},end:{x:F0(t,i,0),y:F0(t,i,4)}}:null)}function _l(e,t,n){return h0(t,[4,4],([r,i])=>e.EPDFAnnot_GetLineEndings(n,r,i)?{start:g8(F1(t,r)),end:g8(F1(t,i))}:{start:"none",end:"none"})}function _u(e,t,n){return h0(t,[4,4,4,4,4],([r,i,o,a,s])=>e.EPDFAnnot_GetDefaultAppearance(n,r,i,o,a,s)?{fontCode:F1(t,r),fontSize:F0(t,i),color:e7(255&F1(t,o),255&F1(t,a),255&F1(t,s))}:null)}function _d(e,t,n){return h0(t,[4,4],([r,i])=>{let o=h3(t,(t,o)=>e.EPDFAnnot_GetDefaultAppearanceFontFace(n,t,o,r,i),null);return o?{family:o,weight:F1(t,r),italic:0!==F1(t,i)}:null})}function _c(e,t){return e.EPDFAnnot_GetTextAlignment(t)}function _f(e,t,n){let r=e.EPDFAnnot_GetIntent(n,0n,0);if(r<=0)return null;let i=(r+1)*2;return hY(t,i,r=>(e.EPDFAnnot_GetIntent(n,r,i),t.readU16String(r)))}function _m(e,t,n){let r=e.FPDFAnnot_CountAttachmentPoints(n);return r<=0?[]:hY(t,32,i=>{let o=[];for(let a=0;aF0(t,i,e);o.push(function(e){let[t,n,r,i]=e;if(eZ(e))return{upperLeft:t,upperRight:n,lowerLeft:r,lowerRight:i};if(eZ([t,n,i,r]))return{upperLeft:t,upperRight:n,lowerLeft:i,lowerRight:r};let o=e.map(e=>eK(e)?e:{x:0,y:0}),a=o.reduce((e,t)=>e+t.x,0)/4,s=o.reduce((e,t)=>e+t.y,0)/4,l=[...o].sort((e,t)=>Math.atan2(e.y-s,e.x-a)-Math.atan2(t.y-s,t.x-a)),u=0;for(let e=1;e<4;e++)l[e].y+l[(e+1)%4].y>l[u].y+l[(u+1)%4].y&&(u=e);let d=[l[u],l[(u+1)%4]],c=[l[(u+3)%4],l[(u+2)%4]];return d[0].x<=d[1].x?{upperLeft:d[0],upperRight:d[1],lowerLeft:c[0],lowerRight:c[1]}:{upperLeft:d[1],upperRight:d[0],lowerLeft:c[1],lowerRight:c[0]}}([{x:r(0),y:r(4)},{x:r(8),y:r(12)},{x:r(16),y:r(20)},{x:r(24),y:r(28)}]))}return o})}function _p(e,t,n){return h2(t,(t,r)=>e.EPDFAnnot_GetName(n,t,r))}function _h(e,t,n){return h2(t,(t,r)=>e.EPDFAnnot_GetAppearanceState(n,t,r))}function _F(e){let t=g3((-g3(e)%360+360)%360+0);return 0===t||360===t?void 0:t}function _g(e){let t=(-e%360+360)%360+0;return t>180?t-360:t}var __=new Set([5,6,3,13,14]),_P=[90,180,270],_D=e=>(e%360+360)%360;function _b(e,t){let n=Math.abs(_D(e)-_D(t));return Math.min(n,360-n)}function _y(e,t,n){if(!e.EPDFAnnot_HasEmbedMetadata(n))return;let r=hY(t,4,r=>e.EPDFAnnot_GetEmbedMetadataNumber(n,"Rotation",r)?_D(F0(t,r)):void 0);if(void 0===r||.01>_b(r,0))return;let i=hY(t,16,r=>e.EPDFAnnot_GetEmbedMetadataRect(n,"UnrotatedRect",r)?eH(FX(t,r)):void 0);if(i&&!(i.right<=i.left)&&!(i.top<=i.bottom))return{degrees:r,box:i}}function _w(e,t,n){let r=eH(g9(e,t,n)),i=h0(t,[4,4,4,4],([r,i,o,a])=>e.EPDFAnnot_GetRectangleDifferences(n,r,i,o,a)?{left:F0(t,r),bottom:F0(t,i),right:F0(t,o),top:F0(t,a)}:null);if(!i)return r;let o={left:r.left+i.left,bottom:r.bottom+i.bottom,right:r.right-i.right,top:r.top-i.top};return o.left<=o.right&&o.bottom<=o.top?o:r}function _E(e,t,n){let r=function(e,t,n){let r=e.FPDFAnnot_GetSubtype(n);if(!__.has(r))return;let i=function(e,t,n){if(e.FPDFAnnot_HasKey(n,"Rotate"))return hY(t,4,r=>e.EPDFAnnot_GetRotate(n,r)?F0(t,r):void 0)}(e,t,n),o=hY(t,16,r=>hY(t,24,o=>{if(!e.EPDFAnnot_GetAppearanceTransform(n,r,o))return;let a={a:F0(t,o,0),b:F0(t,o,4),c:F0(t,o,8),d:F0(t,o,12),e:F0(t,o,16),f:F0(t,o,20)},s=function(e){let t=Math.hypot(e.a,e.b);if(!(t>0))return;let n=.002*t;if(Math.abs(e.a-e.d)>n||Math.abs(e.b+e.c)>n)return;let r=_D(180*Math.atan2(e.b,e.a)/Math.PI);return _b(r,0)>.05?r:void 0}(a);if(void 0===s)return;let l=eH(FX(t,r)),u=Math.hypot(a.a,a.b),d=(l.left+l.right)/2,c=(l.bottom+l.top)/2,f=a.a*d+a.c*c+a.e,m=a.b*d+a.d*c+a.f,p=(l.right-l.left)*u/2,h=(l.top-l.bottom)*u/2;return{degrees:void 0!==i&&.05>=_b(i,s)?_D(i):Math.round(100*s)/100,box:{left:f-p,bottom:m-h,right:f+p,top:m+h}}})),a=_w(e,t,n),s=3===r,l=s&&void 0!==i?_P.find(e=>.05>=_b(i,e)):void 0,u=_y(e,t,n);if(u&&eY(eJ(u.box,u.degrees),a)&&(o?.05>=_b(o.degrees,u.degrees):!e.EPDFAnnot_HasAppearanceStream(n,0)||s&&(e.FPDFAnnot_HasKey(n,"CL")||void 0!==l&&.05>=_b(l,u.degrees))))return u;if(o)return o;if(void 0===l)return;if(180===l)return{degrees:l,box:a};let d=(a.left+a.right)/2,c=(a.bottom+a.top)/2,f=(a.top-a.bottom)/2,m=(a.right-a.left)/2;return{degrees:l,box:{left:d-f,bottom:c-m,right:d+f,top:c+m}}}(e,t,n);if(!r)return;let i=_F(r.degrees);return void 0===i?void 0:{rotation:i,box:r.box}}function _A(e,t,n){let r=_E(e,t,n);return r?{box:r.box,rotation:r.rotation}:{box:_w(e,t,n),rotation:null}}var _v="Replace",_S="StrikeOutTextEdit";function _k(e){if("replace"===e)return _v}function _x(e){if("strikeout-text-edit"===e)return _S}function _G(e,t,n,r){let i=t.writeU16String(r.key);try{return e.EPDFDoc_GetAttachmentIndexByKey(n,i)}finally{t.free(i)}}function _O(e,t,n,r,i,o){let a=o.bytes.byteLength;if(0===a){if(!e.FPDFAttachment_SetFile(n,r,0n,0))throw new N(G.Unknown,"FPDFAttachment_SetFile returned false")}else{let i=t.alloc(a);try{if(t.writeBytes(i,new Uint8Array(o.bytes)),!e.FPDFAttachment_SetFile(n,r,i,a))throw new N(G.Unknown,"FPDFAttachment_SetFile returned false")}finally{t.free(i)}}if(h6(t,hH(new Date),t=>e.FPDFAttachment_SetStringValue(n,"CreationDate",t)),i.mimeType&&!e.EPDFAttachment_SetSubtype(n,i.mimeType))throw new N(G.Unknown,"EPDFAttachment_SetSubtype returned false");if(void 0!==i.description&&!h6(t,i.description,t=>e.EPDFAttachment_SetDescription(n,t)))throw new N(G.Unknown,"EPDFAttachment_SetDescription returned false")}function _I(e,t,n){let r=h3(t,(t,r)=>e.FPDFAttachment_GetName(n,t,r))??"",i=h3(t,(t,r)=>e.FPDFAttachment_GetSubtype(n,t,r)),o=h3(t,(t,r)=>e.EPDFAttachment_GetDescription(n,t,r)),a=_M(e,t,n,"CreationDate"),s=_M(e,t,n,"ModDate"),l=function(e){if(!e)return null;let t=e.startsWith("<")&&e.endsWith(">")?e.slice(1,-1):e;return/^[0-9a-fA-F]+$/.test(t)?t.toLowerCase():e}(_j(e,t,n,"CheckSum"));return{name:r,mimeType:i||null,description:o||null,sizeBytes:function(e,t,n){let r=t.alloc(4);try{if(!e.EPDFAttachment_GetIntegerValue(n,"Size",r))return null;let i=Number(t.peek(r,"i32"));return i>=0?i:null}finally{t.free(r)}}(e,t,n),md5:l||null,createdAt:a||null,modifiedAt:s||null}}function _N(e,t,n){let{fn:r,mem:i}=e,o=i.alloc(8),a=i.alloc(4),s=i.alloc(4),l=null;try{if(i.poke(o,"ptr",0),i.poke(a,"i32",0),i.poke(s,"i32",-1),!r.EPDFAttachment_ExtractFileToOwnedBuffer(t,BigInt(n??0),o,a,s))throw _C(Number(i.peek(s,"i32")),n);let e=Number(i.peek(a,"i32"))>>>0;if(l=i.peek(o,"ptr"),0===e||!l)return{bytes:new ArrayBuffer(0),size:0};let u=i.readBytes(l,e),d=new ArrayBuffer(u.byteLength);return new Uint8Array(d).set(u),{bytes:d,size:e}}finally{l&&r.EPDF_FreeBuffer(l),i.free(s),i.free(a),i.free(o)}}function _C(e,t){switch(e){case 1:return new N(G.InvalidArg,"attachment has no embedded file stream (missing /EF)");case 2:return new N(G.MalformedPdf,"embedded file stream failed to decode");case 3:return new N(G.PayloadTooLarge,`the embedded file decodes to more than ${t} bytes, the limit`,{details:{limit:t}});case 4:return new N(G.Unknown,"writing the extracted attachment failed");default:return new N(G.Unknown,`attachment extraction failed (status ${e})`)}}function _j(e,t,n,r){return e.FPDFAttachment_HasKey(n,r)?h3(t,(t,i)=>e.FPDFAttachment_GetStringValue(n,r,t,i),null):null}function _M(e,t,n,r){let i=_j(e,t,n,r);return i?hq(i):null}var _R=Object.freeze({comment:"Comment",key:"Key",note:"Note",help:"Help","new-paragraph":"NewParagraph",paragraph:"Paragraph",insert:"Insert"}),_T=Object.freeze(Object.fromEntries(Object.entries(_R).map(([e,t])=>[t,e]))),_B=Object.freeze({graph:"Graph","push-pin":"PushPin",paperclip:"Paperclip",tag:"Tag"}),_L=Object.freeze(Object.fromEntries(Object.entries(_B).map(([e,t])=>[t,e]))),_$={"free-text":"FreeText","free-text-callout":"FreeTextCallout","free-text-typewriter":"FreeTextTypeWriter"};function _z(e){return Object.entries(_$).find(([,t])=>t===e)?.[0]??"free-text"}var _U={courier:0,"courier-bold":1,"courier-bold-oblique":2,"courier-oblique":3,helvetica:4,"helvetica-bold":5,"helvetica-bold-oblique":6,"helvetica-oblique":7,"times-roman":8,"times-bold":9,"times-bold-italic":10,"times-italic":11,symbol:12,"zapf-dingbats":13},_V=Object.fromEntries(Object.entries(_U).map(([e,t])=>[t,e])),_W="helvetica";function _q(e){return _V[e]??"helvetica"}function _H(e){switch(e){case"center":return 1;case"right":return 2;default:return 0}}function _K(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}}var _Z=["top","middle","bottom"];function _J(e,t,n,r,i){let o=i?.keyForFace(r.family,r.weight,r.italic);if(void 0!==o)return o;let a=function(e){let t;if(void 0!==t)return t;let n=eW[eV(e.family)];if(n){let t=Object.entries(ez),r=e.weight>=600,i=t.find(([,t])=>t.family===n&&t.weight>=600===r&&t.italic===e.italic)??t.find(([,e])=>e.family===n);if(i)return i[0]}return e.family}(r);if(Z.includes(a))return a;let s=_d(e,t,n);if(s&&eV(s.family)===eV(r.family)&&s.weight===r.weight&&s.italic===r.italic){let r=h2(t,(t,r)=>e.EPDFAnnot_GetDefaultAppearanceFontPostScriptName(n,t,r));if(r)return r}return aA({familyName:r.family,weight:r.weight,italic:r.italic},null)}function _Q(e,t,n,r){let i=e.EPDFAnnot_GetEmbedMetadataString(n,r,0n,0);if(i<=2)return;let o=t.alloc(i);try{if(0>=e.EPDFAnnot_GetEmbedMetadataString(n,r,o,i))return;return t.readU16String(o)}finally{t.free(o)}}function _X(e,t,n,r){let i=t.alloc(4);try{if(!e.EPDFAnnot_GetEmbedMetadataNumber(n,r,i))return;return Number(t.peek(i,"f32"))}finally{t.free(i)}}function _Y(e){switch(e){case"dashed":return 2;case"beveled":return 3;case"inset":return 4;default:return 1}}function _0(e){switch(e){case 2:return"dashed";case 3:return"beveled";case 4:return"inset";default:return"solid"}}function _1(e){return 5===e?"underline":_0(e)}function _3(e,t,n){let r,{styleCode:i,width:o}=_r(e,t,n),a=(r=e.EPDFAnnot_GetBorderDashPatternCount(n))<=0?[]:hY(t,4*r,i=>{if(!e.EPDFAnnot_GetBorderDashPattern(n,i,r))return[];let o=[];for(let e=0;e0?a:null}}function _2(e,t,n){let r=_e(e,t,n,0),i=_n(e,t,n);return{color:r,opacity:null==i?1:Math.max(0,Math.min(1,i)),..._3(e,t,n)}}function _6(e,t,n){let r=_e(e,t,n,1);return{..._2(e,t,n),interiorColor:r??null}}function _5(e,t,n,r){let i=r.flat();if(0===i.length)return;let o=function(e,t,n){let r=function(e,t,n){if(e.EPDFAnnot_HasEmbedMetadata(n))return hY(t,4,r=>{if(e.EPDFAnnot_GetEmbedMetadataNumber(n,"Rotation",r))return _F(F0(t,r))})}(e,t,n);if(void 0===r)return;let i=hY(t,16,r=>e.EPDFAnnot_GetEmbedMetadataRect(n,"UnrotatedRect",r)?eH(FX(t,r)):void 0);return i?{rotation:r,box:i}:void 0}(e,t,n);if(!o)return;let{box:a}=o,s={degrees:o.rotation,center:{x:(a.left+a.right)/2,y:(a.bottom+a.top)/2}};return eY(e0(i.map(e=>e3(e,s))),a)?s:void 0}var _4=(e,t)=>t?e3(e,t):e;function _8(e){if("ink-highlight"===e)return"InkHighlight"}var _7={"line-arrow":"LineArrow","line-dimension":"LineDimension","polygon-cloud":"PolygonCloud","polygon-dimension":"PolygonDimension","polyline-dimension":"PolyLineDimension"};function _9(e,t,n){return{measure:ga(e,t,e.EPDFAnnot_GetMeasure(n))??null}}function Pe(e,t,n){return h0(t,[4,4,8],([r,i,o])=>{if(!e.EPDFAnnot_GetShapeCaption(n,r,i,o))return;let a=!!t.peek(r,"i32"),s=!!t.peek(i,"i32");if(e.EPDFAnnot_GetEmbedMetadataBoolean(n,"MeasurementCaption",r)||s)return{enabled:a,...s?{center:{x:Number(t.peek(o,"f32")),y:Number(t.peek(o,"f32",4))}}:{}}})}var Pt={start:{x:0,y:0},end:{x:0,y:0}};function Pn(e,t,n,r){var i,o,a,s,l;let u,d,c=r.page.objectNumber,f="xyz"===r.kind?e.EPDFDest_CreateXYZByObjectNumber(n,c,null!=r.left,r.left??0,null!=r.top,r.top??0,null!=r.zoom,r.zoom??0):(i=e,o=t,a=n,s=c,l=r,u=(()=>{switch(l.kind){case"fitH":case"fitBH":return null!=l.top?[l.top]:[];case"fitV":case"fitBV":return null!=l.left?[l.left]:[];case"fitR":return[l.left,l.bottom,l.right,l.top];default:return[]}})(),d=F3[l.kind],u.length?hY(o,4*u.length,e=>{for(let t=0;t[t,e]))}function PS(e,t,n,r="#000000"){let i=_e(e,t,n)??r,o=_n(e,t,n);return{color:i,opacity:null==o?1:Math.max(0,Math.min(1,o)),quadPoints:_m(e,t,n),richText:g1(e,t,n)}}function Pk(e,t,n){let r=_o(e,t,n),i=_5(e,t,n,[r]),o=Pe(e,t,n);return{vertices:r.map(e=>_4(e,i)),rotation:i?.degrees??null,captionEnabled:o?.enabled??null,captionCenter:o?.center?_4(o.center,i):null}}var Px=["caption","image","caption-below","caption-above","caption-right","caption-left","caption-over"];function PG(e,t,n,r){return h0(t,[4,4,4],([i,o,a])=>e.EPDFAnnot_GetMKColor(n,r,i,o,a)?e7(255&F1(t,i),255&F1(t,o),255&F1(t,a)):null)}function PO(e,t){return eQ(-e.EPDFAnnot_GetMKRotation(t))||null}var PI={highlight:function(e,t,n,r){let i=PS(e,t,n,"#ffff00");return{...r,subtype:"highlight",...i}},underline:function(e,t,n,r){let i=PS(e,t,n);return{...r,subtype:"underline",...i}},squiggly:function(e,t,n,r){let i=PS(e,t,n);return{...r,subtype:"squiggly",...i}},strikeout:function(e,t,n,r){let i=PS(e,t,n),o=_f(e,t,n)===_S?"strikeout-text-edit":null;return{...r,subtype:"strikeout",intent:o,...i}},circle:function(e,t,n,r){return{...r,subtype:"circle",...Pu(e,t,n)}},square:function(e,t,n,r){return{...r,subtype:"square",...Pu(e,t,n)}},polygon:function(e,t,n,r){let{captionEnabled:i,captionCenter:o,...a}=Pk(e,t,n),s=_f(e,t,n);return{...r,richText:g1(e,t,n),..._9(e,t,n),captionEnabled:i,captionCenter:o,intent:"PolygonCloud"===s?"polygon-cloud":"PolygonDimension"===s?"polygon-dimension":null,subtype:"polygon",..._6(e,t,n),...a,cloudyIntensity:_i(e,t,n)}},polyline:function(e,t,n,r){let{captionEnabled:i,captionCenter:o,...a}=Pk(e,t,n),s=_f(e,t,n);return{...r,richText:g1(e,t,n),..._9(e,t,n),captionEnabled:i,captionCenter:o,intent:"PolyLineDimension"===s?"polyline-dimension":null,subtype:"polyline",..._6(e,t,n),...a,lineEndings:_l(e,t,n)}},line:function(e,t,n,r){let i=_s(e,t,n)??Pt,o=_5(e,t,n,[[i.start,i.end]]),a=_f(e,t,n),s=function(e,t,n){if(["Cap","CP","CO"].some(t=>e.FPDFAnnot_HasKey(n,t)))return h0(t,[4,4,8],([r,i,o])=>{if(e.EPDFAnnot_GetLineCaption(n,r,i,o))return{enabled:!!t.peek(r,"i32"),position:1===t.peek(i,"i32")?"top":"inline",...e.FPDFAnnot_HasKey(n,"CO")?{offset:{along:Number(t.peek(o,"f32")),perpendicular:Number(t.peek(o,"f32",4))}}:{}}})}(e,t,n),l=function(e,t,n){if(["LL","LLE","LLO"].some(t=>e.FPDFAnnot_HasKey(n,t)))return h0(t,[4,4,4],([r,i,o])=>{if(e.EPDFAnnot_GetLineLeader(n,r,i,o))return{length:Number(t.peek(r,"f32")),extension:Number(t.peek(i,"f32")),offset:Number(t.peek(o,"f32"))}})}(e,t,n);return{...r,richText:g1(e,t,n),..._9(e,t,n),intent:"LineArrow"===a?"line-arrow":"LineDimension"===a?"line-dimension":null,captionEnabled:s?.enabled??!1,captionPosition:s?.position??"inline",captionOffset:s?.offset??null,leader:l??null,subtype:"line",..._6(e,t,n),linePoints:{start:_4(i.start,o),end:_4(i.end,o)},lineEndings:_l(e,t,n),rotation:o?.degrees??null}},link:function(e,t,n,r,i,o){return{...r,subtype:"link",target:function(e,t,n,r,i){let o=r.actions?.activate;if(o)return Pr(o);let a=e.FPDFAnnot_GetLink(n);if(!a)return null;let s=e.FPDFLink_GetDest(i.docPtr,a);if(!s)return null;let l=F2(e,t,i.docPtr,s);return l?{kind:"goto",destination:l}:{kind:"unsupported"}}(e,t,n,r,o)}},ink:function(e,t,n,r){let i=_a(e,t,n),o=_5(e,t,n,i),a="InkHighlight"===_f(e,t,n)?"ink-highlight":null;return{...r,richText:g1(e,t,n),subtype:"ink",..._2(e,t,n),intent:a,inkList:i.map(e=>e.map(e=>_4(e,o))),rotation:o?.degrees??null}},"free-text":function(e,t,n,r,i,o){var a;let s,l,u=_u(e,t,n),d=u?.color??"#000000",c=(s=h2(t,(t,r)=>e.EPDFAnnot_GetRichTextJSON(n,t,r)))?gY(s)?.document??null:null,f=o?.fonts,m=c?_J(e,t,n,c.body,f):u?_q(u.fontCode):_W,p=c&&c.body.size>0?c.body.size:u&&u.fontSize>0?u.fontSize:12,h=c??{body:{family:"Helvetica",weight:400,italic:!1,size:p,color:d,decoration:[],script:"normal",letterSpacing:0,horizontalScale:1,align:"left",dir:"ltr"},paragraphs:[{runs:[{text:r.contents??""}]}]},F=h.body.color.toLowerCase(),g=_e(e,t,n,0),_=_n(e,t,n),P=null==_?1:Math.max(0,Math.min(1,_)),D=c?c.body.align:_K(_c(e,n)),b=void 0!==(a=_X(e,t,n,"VerticalAlignment"))&&_Z[a]||"top",y=_z(_f(e,t,n)),w=(l=e.EPDFAnnot_GetCalloutLineCount(n))<=0?[]:hY(t,8*l,r=>{let i=e.EPDFAnnot_GetCalloutLine(n,r,l);if(i<=0)return[];let o=[];for(let e=0;ee.EPDFAnnot_GetMKText(n,0,t,r)),checkStyle:null,layout:Px[e.EPDFAnnot_GetMKTextPosition(n)]??"caption",field:null,fieldKind:"unknown",hasMark:0!==e.EPDFAnnot_GetDrawing(n)}},redact:function(e,t,n,r,i,o){let a=_e(e,t,n,0)??"#ff0000",s=_n(e,t,n),l=null==s?1:Math.max(0,Math.min(1,s)),u=_e(e,t,n,1)??null,d=_u(e,t,n),c=d?_d(e,t,n):null,f=o?.fonts,m=c?.family?_J(e,t,n,c,f):d?_q(d.fontCode):_W,p=d?d.fontSize:12,h=d?.color??"#000000";return{...r,richText:g1(e,t,n),subtype:"redact",quadPoints:_m(e,t,n),color:a,opacity:l,interiorColor:u,overlayText:e.FPDFAnnot_HasKey(n,"OverlayText")?h3(t,(t,r)=>e.EPDFAnnot_GetOverlayText(n,t,r),""):null,repeat:e.EPDFAnnot_GetOverlayTextRepeat(n),fontFamily:m,fontSize:p,fontColor:h,textAlign:_K(_c(e,n))}},popup:function(e,t,n,r,i,o){return{...r,subtype:"popup",parent:Ps(e,t,o.docPtr,n,"Parent",r.page.objectNumber),open:_t(e,t,n,"Open")??!1}},unsupported:function(e,t,n,r,i){let o=g7(e,t,n,"Subtype");return{...r,subtype:"unsupported",rawSubtypeCode:i,rawSubtypeName:o}}};function PN(e){let t=rN(e),n=PI[t];return n?{reader:n,subtype:t}:{reader:PI.unsupported,subtype:"unsupported"}}function PC(e,t,n){let r=(n.next??[]).map(n=>PC(e,t,n)),i=function(e,t,n){let{fn:r,mem:i}=e,o=(()=>{switch(n.type){case"javascript":return h5(i,n.script,e=>r.EPDFAction_CreateJavaScript(t,e));case"goto":return r.EPDFAction_CreateGoTo(t,Pn(r,i,t,n.destination));case"uri":return r.EPDFAction_CreateURI(t,n.uri);case"named":return r.EPDFAction_CreateNamed(t,n.name);case"hide":return Pj(e,n.targets,(e,i)=>r.EPDFAction_CreateHide(t,e,i,n.hide));case"reset-form":return Pj(e,n.fields??[],(e,i)=>r.EPDFAction_CreateResetForm(t,e,n.fields?i:-1,n.exclude));case"submit-form":return h5(i,n.url,i=>Pj(e,n.fields??[],(e,o)=>r.EPDFAction_CreateSubmitForm(t,i,e,n.fields?o:-1,M(n))))}})();if(!o)throw new N(G.InvalidArg,`the ${n.type} action could not be written`);return o}(e,t,n);if(r.length>0&&!gc(e,r,(n,r)=>e.fn.EPDFAction_SetNext(t,i,n,r)))throw new N(G.Unknown,`the ${n.type} action\'s next ones could not be set`);return i}function Pj(e,t,n){let{mem:r}=e,i=8+gu(e),o=t.map(e=>"name"===e.kind?r.writeU16String(e.name):null);try{return hY(r,Math.max(1,t.length*i),a=>(t.forEach((t,n)=>{let s=n*i,l=o[n];r.poke(a,"i32",+!l,s),r.poke(a,"i32","objectNumber"===t.kind?t.objectNumber:0,s+4),gd(e,a,s+8,l??0n)}),n(a,t.length)))}finally{for(let e of o)e&&r.free(e)}}function PM(e,t,n,r){z.forEach((i,o)=>{let a=null===r?null:r[i];if(void 0===a)return;let s=null===a?0n:PC(e,t,a);if(!e.fn.EPDFAnnot_SetEventAction(n,o,s))throw new N(G.Unknown,`the widget\'s ${i} action could not be written`)})}var PR=class{constructor(e,t){this.runtime=e,this.docPtr=t,hJ(this,"indexes",null)}indexOf(e){if(!this.indexes){let{fn:e}=this.runtime,t=new Map,n=e.FPDF_GetPageCount(this.docPtr);for(let r=0;r0&&!t.has(n)&&t.set(n,r)}this.indexes=t}return this.indexes.get(e)??-1}};function PT(e,t,n,r){let{fn:i}=e;return n.some(n=>PB(e,t,n,r,e=>0!==i.EPDFAnnot_GetMKIcon(e,0))??!1)}function PB(e,t,n,r,i){let{fn:o}=e;if(!n.page||n.objectNumber<=0)return null;let a=r.indexOf(n.page.objectNumber);if(a<0)return null;let s=o.EPDFPage_GetAnnotIndexByObjectNumberRaw(t,a,n.objectNumber);if(s<0)return null;let l=o.EPDFPage_GetAnnotRaw(t,a,s);if(!l)return null;try{return i(l)}finally{o.FPDFPage_CloseAnnot(l)}}var PL=e=>z.indexOf(e),P$={root:null,incomplete:!0,warnings:["incomplete"]};function Pz(e,t,n,r){let{fn:i,mem:o}=e;return n.map(n=>PB(e,t,n,r,e=>{let n=new F4,r={};for(let a of["activate","mouseUp"]){let s=i.EPDFAnnot_GetActionModel(e,PL(a));try{let e=F8(i,o,t,s,n);e&&(r[a]=e)}catch(e){if(!N.is(e)||e.code!==G.MalformedPdf)throw e;r[a]=P$}}return r}))}function PU(e,t,n,r){let{fn:i}=e,o=gj(e,t,n);try{if(i.EPDFAnnot_GetMKIcon(o,0)===r)return;if(!(0===r?i.EPDFAnnot_ClearMKIcon(o,0):i.EPDFAnnot_SetMKIcon(o,0,r)))throw new N(G.Unknown,"the push button\'s icon (/MK /I) could not be written");if(!i.EPDFAnnot_GenerateFormFieldAP(o))throw new N(G.Unknown,"the push button\'s look could not be drawn")}finally{i.FPDFPage_CloseAnnot(o)}}function PV(e,t,n){let r=gj(e,t,n);try{return e.fn.EPDFAnnot_GetMKIcon(r,0)}finally{e.fn.FPDFPage_CloseAnnot(r)}}var PW="GroupID",Pq="ForAnyone",PH="Purpose",PK="Placeholder",PZ="CreatedBy",PJ="CreatedAt",PQ="ImportedBy",PX={createdBy:null,createdAt:null,importedBy:null};function PY(e,t,n){let{fn:r,mem:i}=e;return r.EPDFForm_HasFieldEmbedMetadata(t,n)?h3(i,(e,i)=>r.EPDFForm_GetFieldEmbedMetadataString(t,n,PW,e,i),null):null}function P0(e,t,n){let r=PY(e,t,n);return null!==r?{kind:"group",groupId:r}:7!==e.fn.EPDFForm_GetFieldFamily(t,n)&&P1(e,t,n)?{kind:"anyone"}:{kind:"unassigned"}}function P1(e,t,n){let{fn:r,mem:i}=e;return!!r.EPDFForm_HasFieldEmbedMetadata(t,n)&&hY(i,4,e=>r.EPDFForm_GetFieldEmbedMetadataBoolean(t,n,Pq,e)&&0!==i.peek(e,"i32"))}function P3(e,t,n,r){if(P2(e,t,n,[]),!r)return void P6(e,t,n,Pq);if(!e.fn.EPDFForm_SetFieldEmbedMetadataBoolean(t,n,Pq,!0))throw P5(n)}function P2(e,t,n,r){let{fn:i,mem:o}=e;if(!i.EPDFForm_SetFieldEmbedMetadataNumber(t,n,"SchemaVersion",1))throw P5(n);for(let[a,s]of r){if(null===s){P6(e,t,n,a);continue}let r=o.writeU16String(s);try{if(!i.EPDFForm_SetFieldEmbedMetadataString(t,n,a,r))throw P5(n)}finally{o.free(r)}}}function P6(e,t,n,r){if(!e.fn.EPDFForm_ClearFieldEmbedMetadataKey(t,n,r))throw P5(n)}function P5(e){return new N(G.Unknown,`the metadata of field ${e} could not be written`)}var P4={0:"unknown",1:"pushbutton",2:"checkbox",3:"radio",4:"text",5:"combobox",6:"listbox",7:"signature"},P8={0:"none",1:"acroform",2:"xfa"};function P7(e,t){return h3(e.mem,t)??""}function P9(e,t){return h3(e.mem,t,null)}function De(e,t,n,r){let{fn:i}=e;return eR(i.EPDFForm_GetFieldWidgetObjNum(t,n,r),Dl(i.EPDFForm_GetFieldWidgetPageObjNum(t,n,r)))}function Dt(e,t,n){let{fn:r}=e,i=r.EPDFForm_CountFieldWidgets(t,n),o=[];for(let a=0;ar.EPDFForm_GetFieldWidgetOnState(t,n,a,e,i))??"",exportValue:P7(e,(e,i)=>r.EPDFForm_GetFieldWidgetExportValue(t,n,a,e,i)),checked:r.EPDFForm_IsFieldWidgetChecked(t,n,a)});return o}function Dn(e,t,n){let r=e.fn.EPDFForm_CountFieldWidgets(t,n),i=[];for(let o=0;or.EPDFForm_GetFieldOptionLabel(t,n,a,e,i)),value:P7(e,(e,i)=>r.EPDFForm_GetFieldOptionValue(t,n,a,e,i)),selected:r.EPDFForm_IsFieldOptionSelected(t,n,a)});return o}function Di(e,t,n,r,i,o=new F4,a=new PR(e,r)){var s,l;let{fn:u}=e,d=u.EPDFForm_GetFieldObjNum(t,n),c=P7(e,(e,r)=>u.EPDFForm_GetFieldName(t,n,e,r)),f=u.EPDFForm_GetFieldFlags(t,n),m=P4[u.EPDFForm_GetFieldFamily(t,n)]??"unknown",p=Da(e,t,n,!1),h=Da(e,t,n,!0),F=function(e,t,n,r,i){let{fn:o,mem:a}=e,s={};for(let[e,l]of[["keystroke",0],["format",1],["validate",2],["calculate",3]]){let u=F8(o,a,r,o.EPDFForm_GetFieldActionModel(t,n,l),i);u&&(s[e]=u)}return Object.keys(s).length>0?s:void 0}(e,t,n,r,o),g=P0(e,t,n),_={ref:d>0?{kind:"objectNumber",objectNumber:d}:{kind:"fqn",name:c},name:c,kind:m,origin:1===u.EPDFForm_GetFieldOrigin(t,n)?"recovered":"acroform",readOnly:(1&f)!=0,required:(2&f)!=0,noExport:(4&f)!=0,alternateName:P9(e,(e,r)=>u.EPDFForm_GetFieldAlternateName(t,n,e,r)),mappingName:P9(e,(e,r)=>u.EPDFForm_GetFieldMappingName(t,n,e,r)),valueEntry:p,defaultValueEntry:h,...F?{actions:F}:{},groupId:Y(g),assignment:g,lockedBy:null===(s=i?.(c)??null)?null:{signatureIndex:s.signatureIndex,source:s.source},purpose:function(e,t,n){let{fn:r,mem:i}=e;if(!r.EPDFForm_HasFieldEmbedMetadata(t,n))return null;let o=h3(i,(e,i)=>r.EPDFForm_GetFieldEmbedMetadataString(t,n,PH,e,i),null);return rC(o)?o:null}(e,t,n),placeholder:function(e,t,n){let{fn:r,mem:i}=e;if(!r.EPDFForm_HasFieldEmbedMetadata(t,n))return null;let o=h3(i,(e,i)=>r.EPDFForm_GetFieldEmbedMetadataString(t,n,PK,e,i),null);return eN(o)?o:null}(e,t,n),...function(e,t,n){let r,{fn:i,mem:o}=e;if(!i.EPDFForm_HasFieldEmbedMetadata(t,n))return PX;let a=e=>h3(o,(r,o)=>i.EPDFForm_GetFieldEmbedMetadataString(t,n,e,r,o),null);return{createdBy:a(PZ),createdAt:null===(r=a(PJ))?null:hq(r),importedBy:a(PQ)}}(e,t,n),filledBy:null,filledByName:null,filledAt:null,widgets:[]},P=Ds(p),D=Ds(h);switch(m){case"text":{let r=u.EPDFForm_GetFieldMaxLen(t,n);return{..._,kind:m,value:P,defaultValue:D,maxLength:r>0?r:null,multiline:(4096&f)!=0,password:(8192&f)!=0,comb:(0x1000000&f)!=0,format:eb(F),widgets:Dn(e,t,n)}}case"checkbox":{let r=Dt(e,t,n);return{..._,kind:m,checked:r.some(e=>e.checked),exportValue:r[0]?.exportValue??"Yes",hasValuesList:e.fn.EPDFForm_HasFieldValuesList(t,n),widgets:r}}case"radio":{let r=Dt(e,t,n);return{..._,kind:m,value:r.find(e=>e.checked)?.exportValue??"Off",radiosInUnison:(0x2000000&f)!=0,noToggleToOff:(16384&f)!=0,hasValuesList:e.fn.EPDFForm_HasFieldValuesList(t,n),widgets:r}}case"combobox":return{..._,kind:m,value:P,defaultValue:D,edit:(262144&f)!=0,options:Dr(e,t,n),format:eb(F),widgets:Dn(e,t,n)};case"listbox":{let r=Dr(e,t,n);return{..._,kind:m,selectedValues:r.filter(e=>e.selected).map(e=>e.value),defaultValue:"scalar"===(l=h).kind?[l.value]:"array"===l.kind?[...l.values]:[],multiSelect:(2097152&f)!=0,options:r,topIndex:iF(u.EPDFForm_GetFieldTopIndex(t,n),r),widgets:Dn(e,t,n)}}case"pushbutton":{let i=Dn(e,t,n);return{..._,kind:"pushbutton",hasImage:PT(e,r,i,a),takesImage:rW(Pz(e,r,i,a)),widgets:i}}case"signature":return{..._,kind:m,widgets:Dn(e,t,n)};default:return{..._,kind:"unknown",rawValue:"array"===p.kind?p.values.join(","):Ds(p),widgets:Dn(e,t,n)}}}function Do(e,t,n,r){let{fn:i}=e,o=i.EPDFForm_CountFields(t),a=[],s=new F4,l=new PR(e,n);for(let i=0;i=0&&nr?i.EPDFForm_GetFieldDefaultValueAt(t,n,o,e,a):i.EPDFForm_GetFieldValueAt(t,n,o,e,a)));return 1===o?{kind:"scalar",value:s[0]??""}:{kind:"array",values:s}}function Ds(e){return"scalar"===e.kind?e.value:"array"===e.kind?e.values[0]??"":""}function Dl(e){return e>0?q(e):null}var Du={check:"4",cross:"8",star:"H",circle:"l",square:"n",diamond:"u"};function Dd(e,t,n){for(let r of n){if("widget"!==r.subtype)continue;if("objectNumber"!==r.ref.kind){r.caption=null,r.layout=null,r.hasMark=!1;continue}let n=gv(e,t),i=e.fn.EPDFForm_GetFieldIndexForWidget(n,r.ref.objectNumber),o=i<0?0:e.fn.EPDFForm_GetFieldObjNum(n,i);if(o<=0){r.field=null,r.fieldKind="unknown",r.caption=null,r.layout=null,r.hasMark=!1;continue}r.field={kind:"objectNumber",objectNumber:o},r.fieldKind=P4[e.fn.EPDFForm_GetFieldFamily(n,i)]??"unknown",("checkbox"===r.fieldKind||"radio"===r.fieldKind)&&(r.checkStyle=function(e){return Object.keys(Du).find(t=>e?.[0]===Du[t])??null}(r.caption??null)),"pushbutton"!==r.fieldKind&&(r.caption=null,r.layout=null),r.hasMark="signature"===r.fieldKind&&(r.hasMark||0!==e.fn.EPDFForm_GetFieldValueKind(n,i))}}function Dc(e){return 20===e?"widgets":"annotations"}function Df(e){switch(e){case 1:return"multiply";case 2:return"screen";case 3:return"overlay";case 4:return"darken";case 5:return"lighten";case 6:return"color-dodge";case 7:return"color-burn";case 8:return"hard-light";case 9:return"soft-light";case 10:return"difference";case 11:return"exclusion";case 12:return"hue";case 13:return"saturation";case 14:return"color";case 15:return"luminosity";default:return"normal"}}function Dm(e,t,n,r,i,o,a=new F4){let s,l=q(i),u=g9(e,t,r),d=function(e,t){var n=e.FPDFAnnot_GetFlags(t);if(0===n)return{...J};let r={...J};for(let e of g6)r[e]=(n&g2[e])!=0;return r}(e,r),c=g7(e,t,r,"Contents"),f=null===c?null:e2(c,`\n`),m=g7(e,t,r,"Subj"),p=g7(e,t,r,"T"),h=g7(e,t,r,"CreationDate"),F=g7(e,t,r,"M"),g=Df(e.EPDFAnnot_GetBlendMode(r)),_=function(e,t,n){if(!e.EPDFAnnot_HasEmbedMetadata(n))return null;let r=_X(e,t,n,"SchemaVersion"),i=_Q(e,t,n,"UserID"),o=_Q(e,t,n,"GroupID"),a=_Q(e,t,n,"CreatedBy"),s=_Q(e,t,n,"UpdatedBy"),l=_Q(e,t,n,"ImportedBy"),u={};return void 0!==r&&(u.schemaVersion=r),void 0!==i&&(u.userId=i),void 0!==o&&(u.groupId=o),void 0!==a&&(u.createdBy=a),void 0!==s&&(u.modifiedBy=s),void 0!==l&&(u.importedBy=l),u}(e,t,r),P=function(e,t,n,r,i){let o=e.FPDFAnnot_GetLinkedAnnot(r,"IRT");if(!o)return Pa;try{var a;let s=Pl(e,t,n,o,i);if(!s)return Pa;return{inReplyTo:s,replyType:(a=e.EPDFAnnot_GetReplyType(r),2===a?"group":"reply")}}finally{e.FPDFPage_CloseAnnot(o)}}(e,t,n,r,i),D=Ps(e,t,n,r,"Popup",i),b=function(e,t,n,r,i){let o={};for(let[a,s]of[["activate",0],["cursorEnter",1],["cursorExit",2],["mouseDown",3],["mouseUp",4],["focus",5],["blur",6],["pageOpen",7],["pageClose",8],["pageVisible",9],["pageInvisible",10]]){let l=F8(e,t,n,e.EPDFAnnot_GetActionModel(r,s),i);l&&(o[a]=l)}return Object.keys(o).length>0?o:void 0}(e,t,n,r,a);return{ref:gI(e,t,n,l,r,o),page:l,hasAppearance:e.EPDFAnnot_HasAppearanceStream(r,0),appearanceState:_h(e,t,r),structurePosition:(s=e.EPDFAnnot_GetStructurePosition(r,0n,0))<=0?null:hY(t,4*s,n=>(e.EPDFAnnot_GetStructurePosition(r,n,s),Array.from({length:s},(e,r)=>Number(t.peek(n,"i32",4*r))>>>0))),nm:g7(e,t,r,"NM"),...d,rect:u,contents:f,subject:m,author:p,createdAt:h?hq(h):null,modifiedAt:F?hq(F):null,blendMode:g,reply:P.inReplyTo?{to:P.inReplyTo,type:P.replyType??"reply"}:null,popup:D,groupId:_?.groupId??null,userId:_?.userId??null,createdBy:_?.createdBy??null,modifiedBy:_?.modifiedBy??null,importedBy:_?.importedBy??null,actions:b??null}}function Dp(e){let{runtime:t,session:n,pageObjectNumber:r,count:i,getAnnotPtrAt:o,signal:a,fonts:s,family:l}=e,{fn:u,mem:d}=t,c=[],f=new F4,m=gJ(n,s);for(let e=0;ee.includes(t));return t.length===nu.length?void 0:t}(n.modes))?Dh.filter(e=>o.includes(e.name)):Dh,f=this.session.requireDocPtr(),m=q(e),p=[];try{let e=gK(this.runtime,u),o=function(e,t,n){if(void 0===e||"scale"===e.kind){var r;return r=e?.scale,void 0===r||!Number.isFinite(r)||r<=0?1:r}let i=90===n||270===n?t.height:t.width;if(!Number.isFinite(e.width)||e.width<=0||!(i>0))throw new N(G.InvalidArg,"render viewport width must be positive");return e.width/i}(n.viewport,{width:e.right-e.left,height:e.top-e.bottom},d),l=a.FPDFPage_GetAnnotCount(u),h=new g$(i,r);for(let i=0;ie.EPDFAnnot_GetDrawingRect(n,Dg.modeInt,r)?eH(FX(t,r)):null)}(a,s,l);if(!h&&!F)continue;let g=gI(a,s,f,m,l,i),_=eH(g9(a,s,l)),P=_E(a,s,l),D=P&&null!==function(e){let{subtype:t,rect:n,box:r,rotation:i,intent:o}=e;return nz.has(t)&&r&&i&&("free-text"!==t||"free-text-callout"!==o)&&eY(eJ(r,i),n)?i:null}({subtype:rN(r),rect:_,box:P.box,rotation:P.rotation,intent:3===r?_z(_f(a,s,l)):null})?P:void 0,b=D?eH(D.box):_;for(let t of c){let r=!!(h&t.bit),i=r?b:t===Dg?F:null;if(i)for(let c of r?function(e,t,n,r){let i=function(e,t,n,r){let i=[],o=e.EPDFAnnot_GetAppearanceStateCount(n,r);for(let a=0;ae.EPDFAnnot_GetAppearanceStateName(n,r,a,t,i));null!==o&&i.push(o)}return i}(e,t,n,r);return 0===i.length?D_:i.length>8?[{draw:"",label:_h(e,t,n)}]:i.map(e=>({draw:e,label:e}))}(a,s,l,t.modeInt):D_){let a=this.renderOne(u,l,t.modeInt,c.draw,i,e,d,o,r?D:void 0,n.maxOutputPixels);a&&p.push({ref:g,mode:t.name,state:c.label,rect:i,raster:a})}}}finally{a.FPDFPage_CloseAnnot(l)}}return{page:m,appearances:p}}finally{l.release(e)}}renderOne(e,t,n,r,i,o,a,s,l,u){let{fn:d}=this.runtime,c=Math.min(s,Math.sqrt(16e6/Math.max(1,(i.right-i.left)*(i.top-i.bottom))));return function(e,t){let n=gH(e,t);if(!n)return null;try{return t.draw(n.bitmapPtr,n.matrixPtr,n.clipPtr)?n.read():null}finally{n.free()}}(this.runtime,{rect:i,page:o,rotation:a,viewport:{kind:"scale",scale:c},...void 0!==u?{maxOutputPixels:u}:{},background:"transparent",draw:(i,o)=>l?hY(this.runtime.mem,16,a=>(FY(this.runtime.mem,a,l.box),d.EPDF_RenderAnnotBitmapUnrotated(i,e,t,n,r,_g(l.rotation),a,o,16))):d.EPDF_RenderAnnotBitmap(i,e,t,n,r,o,16)})}},Dg=Dh[0],D_=[{draw:"",label:null}],DP=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}list(e,t,n){hW(t),void 0===e&&(this.session.ensureFullPageRegistry(),e=this.session.allRecords().map(e=>e.pageObjectNumber));let r=[];for(let i of e)hW(t),r.push(this.listOne(i,t,n));return{annotations:r.flatMap(e=>e.annotations),pages:r.flatMap(e=>e.pages)}}listOne(e,t,n){hW(t);let{fn:r}=this.runtime,i=this.session.requireDocPtr(),o=this.session.recordByObjectNumber(e),a=r.EPDFPage_GetAnnotCountRaw(i,o.pageIndex);if(a<0)throw new N(G.Unknown,`EPDFPage_GetAnnotCountRaw returned ${a} for page ${e}`);return Dp({runtime:this.runtime,session:this.session,pageObjectNumber:e,count:a,getAnnotPtrAt:e=>r.EPDFPage_GetAnnotRaw(i,o.pageIndex,e),signal:t,...this.fonts?{fonts:this.fonts}:{},...n?{family:n}:{}})}};function DD(e,t,n,r){return h0(t,[32,8],([i,o])=>{if(t.poke(o,"i32",32,0),t.poke(o,"i32",0,4),!e.EPDF_DigestBuffer(n,r,1,i,o))throw new N(G.Unknown,"EPDF_DigestBuffer returned false");let a="";for(let e of t.readBytes(i,32))a+=e.toString(16).padStart(2,"0");return a})}function Db(e,t,n){let r=t.alloc(Math.max(1,n.byteLength));try{return t.writeBytes(r,n),DD(e,t,r,n.byteLength)}finally{t.free(r)}}function Dy(e,t,n,r,i,o){let a=r.hashes.get(i),s=void 0===a?void 0:r.bySource.get(a);if(void 0!==s)return s;let l=t.alloc(i.byteLength);try{t.writeBytes(l,new Uint8Array(i));let s=a??DD(e,t,l,i.byteLength);r.hashes.set(i,s);let u=r.bySource.get(s);if(void 0!==u)return u;let d=function(e,t,n,r,i,o){if("application/pdf"===i.mimeType){let t=e.FPDF_LoadMemDocument(n,r,"");if(!t)throw new N(G.MalformedPdf,"the appearance PDF could not be opened");try{return o(t)}finally{e.FPDF_CloseDocument(t)}}return function(e,t,n,r,i,o){if(!("width"in i))throw new N(G.InvalidArg,"the appearance image has no size");let a=Math.min(1,14400/Math.max(i.width,i.height)),s=i.width*a,l=i.height*a,u=e.FPDF_CreateNewDocument();if(!u)throw new N(G.Unknown,"FPDF_CreateNewDocument returned NULL");try{let a=e.FPDFPage_New(u,0,s,l);if(!a)throw new N(G.Unknown,"FPDFPage_New returned NULL");try{let o=e.FPDFPageObj_NewImageObj(u);if(!o)throw new N(G.Unknown,"FPDFPageObj_NewImageObj returned NULL");let h=!1;try{var d,c,f,m,p;if(!("image/png"===i.mimeType?e.EPDFImageObj_SetPng(0n,0,o,n,r):e.EPDFImageObj_SetJpeg(0n,0,o,n,r)))throw new N(G.InvalidArg,`${"image/png"===i.mimeType?"EPDFImageObj_SetPng":"EPDFImageObj_SetJpeg"} rejected the image data`);d=e,c=t,f=o,m=s,p=l,hY(c,24,e=>{if(c.poke(e,"f32",m,0),c.poke(e,"f32",0,4),c.poke(e,"f32",0,8),c.poke(e,"f32",p,12),c.poke(e,"f32",0,16),c.poke(e,"f32",0,20),!d.FPDFPageObj_SetMatrix(f,e))throw new N(G.Unknown,"FPDFPageObj_SetMatrix returned false")}),e.FPDFPage_InsertObject(a,o),h=!0}finally{h||e.FPDFPageObj_Destroy(o)}if(!e.FPDFPage_GenerateContent(a))throw new N(G.Unknown,"FPDFPage_GenerateContent returned false")}finally{e.FPDF_ClosePage(a)}return o(u)}finally{e.FPDF_CloseDocument(u)}}(e,t,n,r,i,o)}(e,t,l,i.byteLength,o,t=>e.EPDFDoc_CanonicalDrawing(t,0));if(!d)throw new N(G.Unknown,"EPDFDoc_CanonicalDrawing returned NULL");try{let i=Dw(e,t,d),o=function(e,t,n,r){if(r.byContent)return r.byContent;let i=new Map,o=e.EPDFDoc_GetDrawings(n,0n,0);for(let r of o>0?hY(t,4*o,r=>(e.EPDFDoc_GetDrawings(n,r,o),Array.from({length:o},(e,n)=>Number(t.peek(r,"i32",4*n))>>>0))):[]){let o=e.EPDFDoc_ExportDrawing(n,r);if(o)try{let n=Dw(e,t,o);i.has(n)||i.set(n,r)}finally{e.FPDF_CloseDocument(o)}}return r.byContent=i,i}(e,t,n,r),a=o.get(i);if(void 0===a){if(!(a=e.EPDFDoc_ImportDrawing(n,d)))throw new N(G.Unknown,"EPDFDoc_ImportDrawing returned 0");o.set(i,a)}return r.bySource.set(s,a),a}finally{e.FPDF_CloseDocument(d)}}finally{t.free(l)}}function Dw(e,t,n){return hY(t,8,r=>{t.poke(r,"i32",0,0),t.poke(r,"i32",0,4);let i=e.EPDF_SaveDocumentToOwnedBuffer(n,2,r),o=Number(t.peek(r,"i32",0));if(!i||o<=0)throw i&&e.EPDF_FreeBuffer(i),new N(G.Unknown,"failed to save a stamp drawing");try{return DD(e,t,i,o)}finally{e.EPDF_FreeBuffer(i)}})}function DE(e,t,n){let r=t.alloc(n.byteLength);try{t.writeBytes(r,new Uint8Array(n));let i=e.FPDF_LoadMemDocument(r,n.byteLength,"");if(!i)return null;try{return e.FPDF_GetPageCount(i)}finally{e.FPDF_CloseDocument(i)}}finally{t.free(r)}}function DA(e,t,n,r=0){let{r:i,g:o,b:a}=e9(n);if(!e.EPDFAnnot_SetColor(t,r,i,o,a))throw new N(G.Unknown,"EPDFAnnot_SetColor returned false")}function Dv(e,t,n){e.EPDFAnnot_ClearColor(t,n)}function DS(e,t,n){if(!e.EPDFAnnot_SetOpacity(t,n))throw new N(G.Unknown,"EPDFAnnot_SetOpacity returned false")}function Dk(e,t,n){let r=function(e,t){let n=e;for(let e of g6){let r=t[e];void 0!==r&&(r?n|=g2[e]:n&=~g2[e])}return n}(e.FPDFAnnot_GetFlags(t),n);if(!e.FPDFAnnot_SetFlags(t,r))throw new N(G.Unknown,"FPDFAnnot_SetFlags returned false")}function Dx(e,t,n,r){let i=t.alloc(16);try{if(t.poke(i,"f32",r.left,0),t.poke(i,"f32",r.top,4),t.poke(i,"f32",r.right,8),t.poke(i,"f32",r.bottom,12),!e.EPDFAnnot_SetRect(n,i))throw new N(G.Unknown,"EPDFAnnot_SetRect returned false")}finally{t.free(i)}}function DG(e,t,n,r,i){let o=t.writeU16String(i);try{e.FPDFAnnot_SetStringValue(n,r,o)}finally{t.free(o)}}function DO(e,t,n,r,i){null===i?e.EPDFAnnot_RemoveKey(n,r):DG(e,t,n,r,i)}function DI(e,t,n,r){if(!e.EPDFAnnot_SetBorderStyle(t,n,r))throw new N(G.Unknown,"EPDFAnnot_SetBorderStyle returned false")}function DN(e,t,n,r){let i=t.alloc(4*r.length);try{for(let e=0;ee.FPDFAnnot_AddInkStroke(n,r,i.length))throw new N(G.Unknown,"FPDFAnnot_AddInkStroke returned < 0")}finally{t.free(r)}}}function DL(e,t,n){if(!e.EPDFAnnot_SetLineEndings(t,g4(n.start),g4(n.end)))throw new N(G.Unknown,"EPDFAnnot_SetLineEndings returned false")}function D$(e,t,n,r,i){let{r:o,g:a,b:s}=e9(i);if(!e.EPDFAnnot_SetDefaultAppearance(t,n,r,o,a,s))throw new N(G.Unknown,"EPDFAnnot_SetDefaultAppearance returned false")}function Dz(e,t,n){if(!e.EPDFAnnot_SetTextAlignment(t,n))throw new N(G.Unknown,"EPDFAnnot_SetTextAlignment returned false")}function DU(e,t,n){if(!e.EPDFAnnot_SetIntent(t,n))throw new N(G.Unknown,"EPDFAnnot_SetIntent returned false")}function DV(e,t,n){null===n?e.EPDFAnnot_RemoveKey(t,"IT"):DU(e,t,n)}function DW(e,t,n,r){let i=t.writeU16String(r);try{if(!e.EPDFAnnot_SetOverlayText(n,i))throw new N(G.Unknown,"EPDFAnnot_SetOverlayText returned false")}finally{t.free(i)}}function Dq(e,t,n){if(!e.EPDFAnnot_SetOverlayTextRepeat(t,n))throw new N(G.Unknown,"EPDFAnnot_SetOverlayTextRepeat returned false")}function DH(e,t,n,r){let i=t.alloc(8*r.length);try{for(let e=0;etv({x:e.x+n,y:e.y+r},{x:t[i].x,y:t[i].y}))?{dx:n,dy:r}:void 0}function D1(e,t,n,{dx:r,dy:i}){let o=eH(g9(e,t,n));Dx(e,t,n,{left:o.left+r,bottom:o.bottom+i,right:o.right+r,top:o.top+i})}var D3="Rotation",D2="UnrotatedRect";function D6(e,t){e.EPDFAnnot_HasEmbedMetadata(t)||e.EPDFAnnot_SetEmbedMetadataNumber(t,"SchemaVersion",1)}function D5(e,t,n){D6(e,t),e.EPDFAnnot_SetEmbedMetadataNumber(t,D3,_g(n))}var D4=new Set([90,180,270]);function D8(e,t,n,r){D6(e,n);let i=t.alloc(16);try{t.poke(i,"f32",r.left,0),t.poke(i,"f32",r.top,4),t.poke(i,"f32",r.right,8),t.poke(i,"f32",r.bottom,12),e.EPDFAnnot_SetEmbedMetadataRect(n,D2,i)}finally{t.free(i)}}function D7(e,t,n,r){var i;let o;r?(D5(e,n,r.rotation),D8(e,t,n,r.box)):(e.EPDFAnnot_ClearEmbedMetadataKey(n,D3),e.EPDFAnnot_ClearEmbedMetadataKey(n,D2)),i=r?.rotation??null,o=e.FPDFAnnot_GetSubtype(n),null!==i&&(13===o||3===o&&D4.has(i))?e.EPDFAnnot_SetRotate(n,_g(i)):(13===o||3===o)&&e.EPDFAnnot_SetRotate(n,0)}var D9=e=>(e%360+360)%360;function be(e,t,n,r){let i=eH(r.box),o=r.rotation||null;D7(e,t,n,null===o?null:{rotation:o,box:i}),Dx(e,t,n,null===o?i:eJ(i,o)),e.EPDFAnnot_ClearRectangleDifferences(n)}function bt(e,t,n,r){var i;if(void 0===r.box&&void 0===r.rotation)return!1;let o=_A(e,t,n),a=eH(r.box??o.box),s=void 0===r.rotation?o.rotation:r.rotation||null,l=(i=o.rotation,null===s||null===i?s===i:tv(D9(s),D9(i)));if(l&&tv(a,o.box))return!1;let u=a.right-a.left,d=a.top-a.bottom;return l&&tv(u,o.box.right-o.box.left)&&tv(d,o.box.top-o.box.bottom)?(D1(e,t,n,{dx:a.left-o.box.left,dy:a.bottom-o.box.bottom}),null!==s&&D7(e,t,n,{rotation:s,box:a})):be(e,t,n,{box:a,rotation:s}),!0}var bn=t5.caret,br=t5["file-attachment"];function bi(e){return"file-attachment"===e}function bo(e,t,n){if(!e.EPDFAnnot_SetName(t,_B[n]))throw new N(G.Unknown,"EPDFAnnot_SetName returned false")}function ba(e,t,n,r){let i,o=t.writeU16String(r);try{i=e.FPDFAnnot_AddFileAttachment(n,o)}finally{t.free(o)}if(!i)throw new N(G.Unknown,"FPDFAnnot_AddFileAttachment returned NULL");return i}function bs(e){let t=e?.resources?.file;if(void 0===t)throw new N(G.InvalidArg,"creating a file-attachment annotation needs its \'file\' resource");return t}function bl(e){if(e?.docPtr===void 0)throw new N(G.Unknown,"file-attachment writer requires docPtr on the write context");return e.docPtr}function bu(e,t,n,r,i,o){if(Object.prototype.hasOwnProperty.call(_U,n))return void D$(e,t,_U[n]??_U.helvetica,r,i);if(o?.resolveRegisteredFontId&&o.describeRegisteredFont?.(n))return void function(e,t,n,r,i){let{r:o,g:a,b:s}=e9(i);if(!e.EPDFAnnot_SetDefaultAppearanceRegisteredFont(t,n,r,o,a,s))throw new N(G.Unknown,"EPDFAnnot_SetDefaultAppearanceRegisteredFont returned false")}(e,t,o.resolveRegisteredFontId(n),r,i);let a=o?.resolveDocumentFont?.(n);if(a){if(!a.choosable)throw new N(G.InvalidArg,`\'${n}\' can\'t be chosen for new text (${a.restrictions.join(", ")})`,{details:{field:"fontFamily",restrictions:a.restrictions}});!function(e,t,n,r,i){let{r:o,g:a,b:s}=e9(i);if(!e.EPDFAnnot_SetDefaultAppearanceDocumentFont(t,n,r,o,a,s))throw new N(G.InvalidArg,"EPDFAnnot_SetDefaultAppearanceDocumentFont refused the program")}(e,t,a.objectNumber,r,i);return}throw new N(G.InvalidArg,`fontFamily \'${n}\' is not a standard font, one of the engine\'s fonts or one of the document\'s`,{details:{field:"fontFamily"}})}function bd(e,t,n,r){let i=t5[r.subtype];bc(e,n,void 0===r.color?i.color:r.color),DS(e,n,r.opacity??i.opacity),bf(e,t,n,r)}function bc(e,t,n){null===n?function(e,t,n=0){if(!e.EPDFAnnot_SetNoColor(t,n))throw new N(G.Unknown,"EPDFAnnot_SetNoColor returned false")}(e,t):DA(e,t,n)}function bf(e,t,n,r){let i=t5[r.subtype];DI(e,n,_Y(r.borderStyle??i.borderStyle),r.strokeWidth??i.strokeWidth),null!=r.dashArray&&r.dashArray.length>0&&DN(e,t,n,r.dashArray)}function bm(e,t,n,r){void 0!==r.color&&bc(e,n,r.color),void 0!==r.opacity&&DS(e,n,r.opacity),bp(e,t,n,r)}function bp(e,t,n,r){if(void 0!==r.borderStyle||void 0!==r.strokeWidth){let i=_r(e,t,n),o=r.borderStyle??_0(i.styleCode),a=r.strokeWidth??i.width;DI(e,n,_Y(o),a)}null===r.dashArray||r.dashArray?.length===0?DC(e,n):void 0!==r.dashArray&&DN(e,t,n,r.dashArray)}function bh(e,t,n,r){let i=r.interiorColor??null;null===i?Dv(e,n,1):DA(e,n,i,1),bd(e,t,n,r)}function bF(e,t,n,r){void 0!==r.interiorColor&&(null===r.interiorColor?Dv(e,n,1):DA(e,n,r.interiorColor,1)),bm(e,t,n,r)}var bg=t5["free-text"];function b_(e,t,n,r,i){let o=gX(n,{describe:r?.describeFont,programOf:r?.documentProgramOf,bodyProgram:void 0===i?void 0:r?.documentProgramOf?.(i)});if(!e.EPDFAnnot_SetRichTextJSON(t,o))throw new N(G.InvalidArg,"rich text could not be written (empty rect, or a font resource could not be built)")}function bP(e,t,n){if(!e.EPDFAnnot_SetEmbedMetadataNumber(t,"VerticalAlignment",_Z.indexOf(n)))throw new N(G.Unknown,"EPDFAnnot_SetEmbedMetadataNumber returned false")}function bD(e){return"free-text"===e}var bb=e=>(e%360+360)%360;function by(e,t,n,r,i){let o,a=r.flat(),s=null===i||0===a.length?null:{degrees:i,center:{x:((o=e0(a)).left+o.right)/2,y:(o.bottom+o.top)/2}};return D7(e,t,n,s?{rotation:s.degrees,box:e0(a)}:null),{drawn:r.map(e=>e.map(e=>s?e1(e,s):e)),turn:s}}function bw(e,t,n,r,i){let o=by(e,t,n,r,i||null);return Dx(e,t,n,e0(o.drawn.flat())),o}function bE(e,t,n){let r=function(e,t,n){switch(e.FPDFAnnot_GetSubtype(n)){case 4:{let r=_s(e,t,n);return r?[[r.start,r.end]]:[]}case 7:case 8:return[_o(e,t,n)];case 15:return _a(e,t,n).map(e=>[...e]);default:return[]}}(e,t,n),i=_5(e,t,n,r);return{drawn:r,turn:i,upright:r.map(e=>e.map(e=>_4(e,i)))}}function bA(e,t,n,r,i,o){if(void 0===i&&void 0===o)return;let a=r.turn?.degrees??null,s=void 0===o?a:o||null,l=tv(bb(s??0),bb(a??0));if(void 0===i&&l)return;let u=by(e,t,n,i??r.upright,s),d=D0(r.drawn.flat(),u.drawn.flat());return d&&D1(e,t,n,d),u}function bv(e,t,n,r){if(void 0!==r.intent&&(null===r.intent?e.EPDFAnnot_RemoveKey(n,"IT"):gr(e.EPDFAnnot_SetIntent(n,_7[r.intent]))),void 0!==r.measure)if(null===r.measure)gr(e.EPDFAnnot_RemoveMeasure(n));else{let i=e.EPDFAnnot_GetMeasure(n);i&&1!==e.EPDFMeasure_GetSubtype(i)&&gr(e.EPDFAnnot_RemoveMeasure(n)),gs(e,t,e.EPDFAnnot_AddMeasure(n),r.measure)}if("line"===r.subtype){if(void 0!==r.leader&&gr(e.EPDFAnnot_SetLineLeader(n,r.leader?.length??0,r.leader?.extension??0,r.leader?.offset??0)),void 0!==r.captionEnabled){let i=r.captionOffset??null;gr(go(t,i?{x:i.along,y:i.perpendicular}:void 0,t=>e.EPDFAnnot_SetLineCaption(n,r.captionEnabled??!1,+("top"===r.captionPosition),t)))}}else if(void 0!==r.captionEnabled)if(null===r.captionEnabled)e.EPDFAnnot_ClearEmbedMetadataKey(n,"MeasurementCaption"),e.EPDFAnnot_ClearEmbedMetadataKey(n,"MeasurementCaptionCenter");else{let i=r.captionEnabled;gr(go(t,("captionCenter"in r?r.captionCenter:null)??void 0,t=>e.EPDFAnnot_SetShapeCaption(n,i,t)))}}function bS(e,t,n,r,i){let o=i?.docPtr;if(!o)throw new N(G.InvalidArg,"writing a link target requires a document pointer on the write context");let a=Pi(e,t,o,r);if(!e.EPDFAnnot_SetAction(n,a))throw new N(G.Unknown,"EPDFAnnot_SetAction failed for link")}function bk(e,t,n){if(!e.EPDFAnnot_SetBooleanValue(t,"Open",n))throw new N(G.Unknown,"EPDFAnnot_SetBooleanValue returned false")}var bx=e=>[e.upperLeft,e.upperRight,e.lowerLeft,e.lowerRight];function bG(e){return"highlight"===e||"underline"===e||"squiggly"===e||"strikeout"===e}function bO(e,t,n,r){let i=t.alloc(32);try{for(let l of r){var o,a,s;if(o=t,a=i,s=l,o.poke(a,"f32",s.upperLeft.x,0),o.poke(a,"f32",s.upperLeft.y,4),o.poke(a,"f32",s.upperRight.x,8),o.poke(a,"f32",s.upperRight.y,12),o.poke(a,"f32",s.lowerLeft.x,16),o.poke(a,"f32",s.lowerLeft.y,20),o.poke(a,"f32",s.lowerRight.x,24),o.poke(a,"f32",s.lowerRight.y,28),!e.FPDFAnnot_AppendAttachmentPoints(n,i))throw new N(G.Unknown,"FPDFAnnot_AppendAttachmentPoints returned false")}}finally{t.free(i)}}function bI(e,t,n,r){e.EPDFAnnot_RemoveKey(n,"QuadPoints"),bO(e,t,n,r)}function bN(e,t,n,r){let i=1/0,o=1/0,a=-1/0,s=-1/0;for(let e of r)for(let t of[e.upperLeft,e.upperRight,e.lowerLeft,e.lowerRight])t.xa&&(a=t.x),t.ys&&(s=t.y);Dx(e,t,n,{left:i,top:s,right:a,bottom:o})}var bC=t5.redact;function bj(e){return void 0!==e.overlayText&&null!==e.overlayText||void 0!==e.fontFamily||void 0!==e.fontSize||void 0!==e.fontColor}function bM(e){return"redact"===e}function bR(e){return"circle"===e||"square"===e}function bT(e){return"stamp"===e}function bB(e,t,n){if(!e.EPDFAnnot_SetName(t,n))throw new N(G.Unknown,"EPDFAnnot_SetName returned false")}function bL(e){if(0===e.length)throw new N(G.InvalidArg,"stamp name must be non-empty")}function b$(e){if(void 0===Pg[e])throw new N(G.InvalidArg,`unknown stamp fit \'${String(e)}\'; expected contain, cover, or fill`)}function bz(e){let t=e?.resources?.appearance;if(!t)throw new N(G.InvalidArg,"creating a stamp annotation needs its \'appearance\' resource");return t}function bU(e,t){e||bz(t);let n=e instanceof ArrayBuffer?nx(e):null;if(!n)throw new N(G.InvalidArg,"the appearance resource must be PNG, JPEG or one-page PDF bytes");if("application/pdf"===n.mimeType){let n=t?.pdfPageCount?.(e);if(null===n)throw new N(G.MalformedPdf,"the stamp\'s appearance PDF could not be opened");if(void 0!==n&&1!==n)throw new N(G.InvalidArg,`the appearance PDF has ${n} pages; a stamp takes a one-page PDF`)}bV(t)}function bV(e){if(e?.docPtr===void 0||!e.drawings)throw new N(G.Unknown,"stamp writer requires docPtr/drawings on the write context");return{docPtr:e.docPtr,drawings:e.drawings}}function bW(e,t,n,r,i,o,a){be(e,t,n,{box:a.box,rotation:null}),function(e,t,n,r,i,o){let a=nx(r);if(!a)throw new N(G.Unknown,"stamp content preflight invariant broken");let s=Dy(e,t,i.docPtr,i.drawings,r,a);if(!e.EPDFAnnot_SetDrawing(n,s,Pg[o]))throw new N(G.Unknown,"EPDFAnnot_SetDrawing returned false")}(e,t,n,r,i,o),a.rotation&&(be(e,t,n,a),Pb(e,n,o))}var bq=t5.text;function bH(e,t,n){if(!e.EPDFAnnot_SetBooleanValue(t,"Open",n))throw new N(G.Unknown,"EPDFAnnot_SetBooleanValue returned false")}function bK(e,t,n){if(!e.EPDFAnnot_SetName(t,_R[n]))throw new N(G.Unknown,"EPDFAnnot_SetName returned false")}var bZ=(e,t)=>t?e1(e,t):e;function bJ(e,t){return e.captionCenter?{...e,captionCenter:bZ(e.captionCenter,t.turn)}:e}function bQ(e,t,n,r){let i=bE(e,t,n),o=bA(e,t,n,i,r.vertices&&[r.vertices],r.rotation);bv(e,t,n,function(e,t,n,r,i,o){let a=o?o.turn:i.turn;if(r.captionCenter)return{...r,captionCenter:bZ(r.captionCenter,a)};if(!o||void 0!==r.captionEnabled)return r;let s=Pe(e,t,n);return s?.center?{...r,captionEnabled:s.enabled,captionCenter:bZ(_4(s.center,i.turn),a)}:r}(e,t,n,r,i,o)),o&&DR(e,t,n,o.drawn[0])}function bX(e){return"polygon"===e||"polyline"===e}function bY(e){return"widget"===e}function b0(e,t,n,r,i){var o,a;if(null===r.color)e.EPDFAnnot_ClearMKColor(n,0);else if(r.color){let{r:t,g:i,b:o}=e9(r.color);e.EPDFAnnot_SetMKColor(n,0,t,i,o)}if(null===r.interiorColor)e.EPDFAnnot_ClearMKColor(n,1);else if(r.interiorColor){let{r:t,g:i,b:o}=e9(r.interiorColor);e.EPDFAnnot_SetMKColor(n,1,t,i,o)}if(void 0!==r.strokeWidth||void 0!==r.borderStyle){let i=_r(e,t,n);e.EPDFAnnot_SetBorderStyle(n,"underline"===(o=r.borderStyle??_1(i.styleCode))?5:_Y(o),r.strokeWidth??i.width)}null===r.dashArray?DC(e,n):void 0!==r.dashArray&&DN(e,t,n,r.dashArray),(void 0!==r.fontFamily||void 0!==r.fontSize||void 0!==r.fontColor)&&function(e,t,n,r,i){let o=_u(e,t,n);if([r.fontFamily,r.fontSize,r.fontColor].includes(null)&&null!==o)throw new N(G.InvalidArg,"a widget\'s font can\'t be removed: send a font, or leave the font fields out",{details:{field:"fontFamily"}});let a=r.fontFamily??void 0,s=r.fontSize??void 0,l=r.fontColor??void 0;if(void 0===a&&void 0===s&&void 0===l)return;let u=s??o?.fontSize??12,d=l??o?.color??"#000000";null!==o&&(void 0===a||function(e,t,n,r,i){let o=_d(e,t,n);if(!o)return!1;if(_J(e,t,n,o)===r)return!0;let a=eU(r,i?.describeFont);return eV(a.family)===eV(o.family)&&(void 0===a.weight||a.weight===o.weight)&&(void 0===a.italic||a.italic===o.italic)}(e,t,n,a,i))?D$(e,n,-1,u,d):bu(e,n,a??"helvetica",u,d,i)}(e,t,n,r,i),void 0!==r.textAlign&&e.EPDFAnnot_SetTextAlignment(n,_H(r.textAlign));let s=void 0!==r.checkStyle?r.checkStyle&&Du[r.checkStyle]:r.caption;if(null===s?e.EPDFAnnot_SetMKText(n,0,0n):void 0!==s&&h5(t,s,t=>e.EPDFAnnot_SetMKText(n,0,t)),r.layout&&!e.EPDFAnnot_SetMKTextPosition(n,(a=r.layout,Px.indexOf(a))))throw new N(G.Unknown,"the widget\'s layout (/MK /TP) could not be written")}function b1(e,t,n){if(!e.EPDFAnnot_SetMKRotation(t,(360-(n??0))%360))throw new N(G.Unknown,"the widget\'s turn (/MK /R) could not be written")}function b3(e,t,n,r,i){let o=eH(r.box),a=r.rotation?eJ(o,r.rotation):o;i&&r.rotation===i.rotation||b1(e,n,r.rotation),i&&tv(a,i.rect)||Dx(e,t,n,a)}function b2(e,t,n,r){if("free-text"===n.subtype||void 0===n.richText)return;if(null===n.richText)return void e.EPDFAnnot_RemoveKey(t,"RC");let i=gX(function(e){if(e.body?.family!==e6.family)return e;let{family:t,...n}=e.body;return{...e,body:n}}(n.richText),{describe:r?.describeFont});if(!e.EPDFAnnot_SetRichTextJSON(t,i))throw new N(G.InvalidArg,`${n.subtype}: the comment\'s rich text could not be written`)}function b6(e){if(void 0===e.subtype)throw new N(G.InvalidArg,"a patch reached the writer without its subtype");return e.subtype}function b5(e,t,n,r){let{fn:i,mem:o}=e,a=o.writeU16String(r);try{return i.EPDFPage_GetAnnotIndexByNameRaw(t,n,a)}finally{o.free(a)}}function b4(e,t){return new N(G.InvalidArg,`nm \'${e}\' is already used on page ${t}`,{details:{field:"nm"}})}function b8(e,t,n,r,i,o){let a=Dm(e,t,o.docPtr,n,r,i),s=e.FPDFAnnot_GetSubtype(n),{reader:l}=PN(s);return l(e,t,n,a,s,o)}function b7(e,t,n){return void 0===n?e.EPDFAnnot_GenerateAppearance(t):e.EPDFAnnot_GenerateAppearanceWithBlend(t,function(e){switch(e){case"normal":return 0;case"multiply":return 1;case"screen":return 2;case"overlay":return 3;case"darken":return 4;case"lighten":return 5;case"color-dodge":return 6;case"color-burn":return 7;case"hard-light":return 8;case"soft-light":return 9;case"difference":return 10;case"exclusion":return 11;case"hue":return 12;case"saturation":return 13;case"color":return 14;case"luminosity":return 15}}(n))}function b9(e,t,n,r){let{fn:i}=e;if(!i.EPDFAnnot_SetLinkedAnnot(t,"IRT",n))throw new N(G.Unknown,"failed to set /IRT linked annotation");i.EPDFAnnot_SetReplyType(t,Po(r))}function ye(e,t,n){let{fn:r}=e;if(function(e,t,n){let{fn:r}=e,i=r.FPDFAnnot_GetLinkedAnnot(n,"Popup");if(!i)return;let o=r.EPDFAnnot_GetObjectNumber(i);if(r.FPDFPage_CloseAnnot(i),o!==r.EPDFAnnot_GetObjectNumber(t))throw new N(G.InvalidArg,`the annotation already has a popup (object ${o}); delete it first`,{details:{field:"parent",popupObjectNumber:o}})}(e,t,n),!r.EPDFAnnot_SetLinkedAnnot(t,"Parent",n)||!r.EPDFAnnot_SetLinkedAnnot(n,"Popup",t))throw new N(G.Unknown,"failed to link a popup to its parent");!function(e,t,n){let{fn:r,mem:i}=e;if(1!==r.FPDFAnnot_GetSubtype(n))return;let o=_t(r,i,t,"Open");if(null!==o)return yt(e,n,o);let a=_t(r,i,n,"Open");null!==a&&yt(e,t,a)}(e,t,n)}function yt(e,t,n){if(!e.fn.EPDFAnnot_SetBooleanValue(t,"Open",n))throw new N(G.Unknown,"EPDFAnnot_SetBooleanValue returned false")}function yn(e,t){let{mem:n}=e,r=t(0n,0);return r<=0?[]:hY(n,8*r,e=>(t(e,r),Array.from({length:r},(t,r)=>({start:Number(n.peek(e,"i32",8*r))>>>0,count:Number(n.peek(e,"i32",8*r+4))>>>0}))))}var yr={0:null,1:"truetype",2:"opentype",3:"cff",4:"type1",5:"type3"},yi={0:"none",1:"whole",2:"subset"},yo={0:"installable",1:"editable",2:"preview-and-print",3:"restricted",4:"bitmap-only"},ya={0:"standard",1:"engine",2:"document-program",3:"document-font"},ys=e=>Array.from(e,e=>e.toString(16).padStart(2,"0")).join(""),yl=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}facts(){return{faces:this.faces(),engineFonts:this.fonts.engineFontFacts(),fallbacks:this.fonts.fallbackKeys()}}faces(){return yu(this.runtime,this.session)}resolve(e,t,n){let{fn:r,mem:i}=this.runtime,o=t.map(e=>this.faceOfRun(e,n)),a=t.map(e=>i.writeU16String(e.text)),s=o.map(e=>i.writeU16String(e.family)),l=e?this.openAnnotation(e):0n;try{let e=gc(this.runtime,a,e=>gc(this.runtime,s,n=>h1(i,o.map(e=>e.weight),a=>h1(i,o.map(e=>+!!e.italic),s=>h1(i,o.map(e=>e.program),i=>r.EPDFDoc_ResolveFonts(this.session.requireDocPtr(),l,t.length,e,n,a,s,i))))));if(!e)throw new N(G.Unknown,"EPDFDoc_ResolveFonts failed");try{return this.readResolution(e,t.length)}finally{r.EPDFFontResolution_Close(e)}}finally{for(let e of(l&&r.FPDFPage_CloseAnnot(l),[...a,...s]))i.free(e)}}readResolution(e,t){let{fn:n,mem:r}=this.runtime,i=[];for(let o=0;o(n.EPDFFontResolution_GetFallbacks(e,o,t,a),Array.from({length:a},(e,n)=>Number(r.peek(t,"i32",4*n))>>>0)));i.push({source:ya[n.EPDFFontResolution_GetSource(e,o)]??"standard",engineFont:t?this.fonts.keyForId(t)??null:null,objectNumber:n.EPDFFontResolution_GetProgramObjNum(e,o),displaySha256:hY(r,32,t=>n.EPDFFontResolution_GetProgramDisplayHash(e,o,t)?ys(r.readBytes(t,32)):null),baseFontName:h2(r,(t,r)=>n.EPDFFontResolution_GetBaseFontName(e,o,t,r))||null,familyName:h3(r,(t,r)=>n.EPDFFontResolution_GetFamily(e,o,t,r))??"",weight:n.EPDFFontResolution_GetWeight(e,o),italic:n.EPDFFontResolution_IsItalic(e,o),degraded:n.EPDFFontResolution_IsDegraded(e,o),fallbacks:s.flatMap(e=>{let t=this.fonts.keyForId(e);return t?[t]:[]})})}let o=[],a=n.EPDFFontResolution_CountMissingCharacters(e);for(let t=0;tn.EPDFFontResolution_GetMissingCharacter(e,t,r,i));i&&o.push(i)}return{runs:i,missingCharacters:o}}faceOfRun(e,t){if(!("fontFamily"in e))return{family:e.family,weight:e.weight,italic:e.italic,program:0};let n=e.fontFamily;if(Z.includes(n)){let e=ez[n];return{family:e.family,weight:e.weight,italic:e.italic,program:0}}let r=this.fonts.describeOrUndefined(n);if(r){let{familyName:e,weight:t,italic:n}=r;return{family:e,weight:t,italic:n,program:0}}let i=av(t.faces).find(e=>e.name===n);if(i){let{familyName:e,weight:r,italic:o}=i.face,a=aG(t,n);return{family:e,weight:r,italic:o,program:a?.choosable?a.objectNumber:0}}let o=eU(n);return{family:o.family,weight:o.weight??400,italic:o.italic??!1,program:0}}openAnnotation(e){let{pageIndex:t,index:n}=gC(this.runtime,this.session,e),r=this.runtime.fn.EPDFPage_GetAnnotRaw(this.session.requireDocPtr(),t,n);if(!r)throw new N(G.NotFound,"annotation not found");return r}program(e,t){let n=this.fonts.programFor(e);if(n)return{...n.info(),bytes:t?n.bytes():null};let r=this.faces().flatMap(e=>e.programs).find(t=>t.displaySha256===e&&t.objectNumber>0);if(!r)throw new N(G.NotFound,`no font program ${e}`);let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr();return hY(o,32,n=>{var s;o.writeBytes(n,(s=e,Uint8Array.from({length:s.length/2},(e,t)=>parseInt(s.slice(2*t,2*t+2),16))));let l=yn(this.runtime,(e,t)=>i.EPDFDoc_GetFontDisplayProgramCoverage(a,n,e,t)),u=null;if(t){let e=i.EPDFDoc_GetFontDisplayProgramData(a,n,0n,0);u=hY(o,Math.max(1,e),t=>(i.EPDFDoc_GetFontDisplayProgramData(a,n,t,e),o.readBytes(t,e)))}return{covers:l,ascent:r.ascent,descent:r.descent,bytes:u}})}};function yu(e,t){let{fn:n,mem:r}=e,i=n.EPDFFontFaces_Load(t.requireDocPtr());if(!i)throw new N(G.Unknown,"EPDFFontFaces_Load failed");try{let t=[],o=n.EPDFFontFaces_Count(i);for(let a=0;ahY(o,32,t=>e(t)?ys(o.readBytes(t,32)):null),s=a(e=>i.EPDFFontFaces_GetProgramHash(t,n,r,e)),l=a(e=>i.EPDFFontFaces_GetProgramDisplayHash(t,n,r,e)),u=h0(o,[4,4],([e,a])=>i.EPDFFontFaces_GetProgramMetrics(t,n,r,e,a)?{ascent:Number(o.peek(e,"f32")),descent:Number(o.peek(a,"f32"))}:{ascent:0,descent:0});return{objectNumber:i.EPDFFontFaces_GetProgramObjNum(t,n,r),format:yr[i.EPDFFontFaces_GetProgramFormat(t,n,r)]??null,embedded:yi[i.EPDFFontFaces_GetProgramEmbedded(t,n,r)]??"none",postScriptName:h2(o,(e,o)=>i.EPDFFontFaces_GetProgramPostScriptName(t,n,r,e,o))||null,permission:yo[i.EPDFFontFaces_GetProgramEmbeddingPermission(t,n,r)]??null,mapsUnicode:i.EPDFFontFaces_ProgramMapsUnicode(t,n,r),sha256:s,displaySha256:l,ascent:Math.round(1e3*u.ascent),descent:-Math.round(1e3*u.descent)}}(e,i,a,t));t.push({familyName:h3(r,(e,t)=>n.EPDFFontFaces_GetFamily(i,a,e,t))??"",weight:n.EPDFFontFaces_GetWeight(i,a),italic:n.EPDFFontFaces_IsItalic(i,a),programs:o})}return t}finally{n.EPDFFontFaces_Close(i)}}var yd=new WeakMap;function yc(e,t){let{fn:n,mem:r}=e;return hY(r,32,e=>{if(!n.EPDFDoc_GetFontsFingerprint(t.requireDocPtr(),e))throw new N(G.Unknown,"EPDFDoc_GetFontsFingerprint failed");return ys(r.readBytes(e,32))})}function yf(e,t){var n;let r;return JSON.stringify((n={faces:yu(e,t),engineFonts:[],fallbacks:[]},r=av(n.faces).filter(e=>!aS(e)&&!e.programs.some(e=>e.sha256===hz.lastResortDisplayHash)).map(ak),{fonts:[...Z.map(e=>{let t;return t=ez[e],{name:e,source:"standard",builtIn:!0,familyName:t.family,weight:t.weight,italic:t.italic,postScriptName:null,canChoose:!0,restrictions:[],programs:[{displaySha256:hz.standardDisplayHash(e),sourceSha256:null,embedded:"none",format:null,embeddingPermission:null,canDownload:!0}]}}),...n.engineFonts.map(ax),...r],fallbacks:[...n.fallbacks],lastResort:{displaySha256:hz.lastResortDisplayHash,sourceSha256:null,embedded:"none",format:"truetype",embeddingPermission:"installable",canDownload:!0}}).fonts.filter(e=>"document"===e.source))}function ym(e,t){yd.has(t)||yd.set(t,{fingerprint:yc(e,t),documentFonts:yf(e,t)})}function yp(e,t,n){let r,i=n=>(r??(r=av(yu(e,t)))).find(e=>e.name===n);return{...n?{resolveRegisteredFontId:e=>n.idFor(e),describeRegisteredFont:e=>n.describeOrUndefined(e)}:{},describeFont:e=>{let t=n?.describeOrUndefined(e);if(t)return t;let r=i(e)?.face;return r&&{familyName:r.familyName,weight:r.weight,italic:r.italic}},documentProgramOf:e=>{if(Z.includes(e)||n?.describeOrUndefined(e))return;let t=i(e)?.programs[0];return t&&aP(t)&&t.objectNumber>0?t.objectNumber:void 0},resolveDocumentFont:n=>aG({faces:yu(e,t),engineFonts:[],fallbacks:[]},n)}}var yh=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}create(e,t){hW(t);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=new Set,a=e.map(t=>{let n=this.session.resolvePageRef(t.page),r=this.writeContext(t.resources),i=yg(t.label,()=>{var e,n;let i;return e=t.draft,n=t.resources,nO((i=function(e,t={}){let n=(ni(e.subtype,e),function(e){if(to[e.subtype]?.box!=="box"||void 0!==e.box)return e;if(void 0===e.rect)throw new N(G.InvalidArg,`${e.subtype} create: give its \\`box\\`, or its \\`rect\\` with a quarter turn`,{details:{field:"box"}});if(!eq(e.rect))throw new N(G.InvalidArg,`${e.subtype} create field \'rect\': not a rect of finite numbers`,{details:{field:"rect"}});let t=e.rotation??0,n=eQ(t);if(null===n)throw new N(G.InvalidArg,`${e.subtype} create field \'rect\': a rect places a box at a quarter turn; at ${t}\\xb0 give its \\`box\\``,{details:{field:"rect"}});let{rect:r,...i}=e;return{...i,box:eX(eH(e.rect),n)}}(e));return!function(e,t={}){var n;let r,i=pX(String(e.subtype)),o=t.linked??[],a=(i&&o.length>0?(n=i.fileSchemas.create,r=o.filter(e=>e in n.shape),n.omit(Object.fromEntries(r.map(e=>[e,!0])))):hp).safeParse(e);if(!a.success)throw hC(a.error,`${String(e.subtype)} create`)}(n,{linked:t.linked??[]}),function(e,t={}){var n;return tJ(e),function(e){let t;if("line"!==(t=e.subtype)&&"polygon"!==t&&"polyline"!==t)return e;if(tZ(e.subtype,e),null!=e.measure&&"rectilinear"!==e.measure.subtype)throw new N(G.InvalidArg,`A ${"geospatial"===e.measure.subtype?"geospatial":"foreign"} measure can\'t be written; leave measure out`);let n=e;tK(e)&&("line"===e.subtype?n={...e,captionEnabled:e.captionEnabled??!1,captionPosition:e.captionPosition??"inline",captionOffset:e.captionOffset??null}:("polygon"===e.subtype||"polyline"===e.subtype)&&(n={...e,captionEnabled:e.captionEnabled??(null==e.captionCenter&&null),captionCenter:e.captionCenter??null}));var r=n;let i=tU(r);return"unavailable"in i||r.contents===i.label?r:{...r,contents:i.label}}(function(e){if("redact"!==e.subtype||null!=e.rect)return e;let t=e.quadPoints??[];if(0===t.length)return e;let n=e0(t.flatMap(e=>[e.upperLeft,e.upperRight,e.lowerLeft,e.lowerRight]));return{...e,rect:n}}(function(e){if(!tQ(e.subtype))return e;let{richText:t}=e;return t?{...e,contents:e5(t)}:e}(function(e,t){if("free-text"!==e.subtype)return e;let n=e.intent??(null!=e.calloutLine?"free-text-callout":"free-text");nt(n,e.calloutLine);let r={body:ne(e.richText?.body??{},e,t),paragraphs:e.richText?.paragraphs??e4(e.contents??"")};return{...e,intent:n,richText:r,contents:e5(r)}}(t9((n=function(e){if("text"!==e.subtype||null==e.state||null!=e.stateModel)return e;let t=tN(e.state);if(!t)throw nr(e.state);return{...e,stateModel:t}}(e)).subtype)&&t7(n.borderStyle??t4(n.subtype).borderStyle,n.dashArray)?{...n,dashArray:[...t8]}:n,t.describeFont))))}(n,t)}(e,{linked:["reply","parent"],describeFont:r.describeFont})).subtype,n,"create"),bT(i.subtype)&&(null!=i.name&&bL(i.name),null!=i.fit&&b$(i.fit),bU(r?.resources?.appearance,r)),bi(i.subtype)&&function(e,t){if(bs(t),bl(t),!e.file?.name)throw new N(G.InvalidArg,"a file attachment needs the file\'s name: give file.name, or the bytes as a File",{details:{field:"file.name"}})}(i,r),bM(i.subtype)&&function(e){if(void 0===e.rect&&0===(e.quadPoints??[]).length)throw new N(G.InvalidArg,"redact create needs a rect or at least one of quadPoints",{details:{field:"rect"}})}(i),i});yg(t.label,()=>this.claimName(i.nm,n,o));let a=void 0!==i.nm||"stamp"!==t.attribution.kind?i:{...i,nm:iY()};void 0!==t.objectNumber&&yg(t.label,()=>this.session.claimObjectNumber(t.objectNumber));let s=t.replyTo&&{type:t.replyTo.type,to:yg(t.label,()=>this.linkTarget(t.replyTo.to,t.page,e.length,"reply"))};if("popup"===a.subtype&&!t.parent)throw new N(G.InvalidArg,`${t.label??"create"}: a popup needs the annotation it shows (parent)`,{details:{field:"parent"}});return{create:t,record:n,ctx:r,draft:a,replyTo:s,parent:t.parent&&yg(t.label,()=>this.linkTarget(t.parent,t.page,e.length,"popup"))}});if(hW(t),0===a.length)return{created:[],meta:yF(this.session.writeStamp(),[],[])};let s=a.map(({create:e,record:o,ctx:a,draft:s})=>{let l;hW(t);let u=n.EPDFPage_CreateAnnotRaw(i,o.pageIndex,rI[s.subtype],e.objectNumber??0);if(!u&&void 0!==e.objectNumber)throw Ff(e.objectNumber,"taken");if(!u)throw new N(G.Unknown,`${e.label??"create"}: EPDFPage_CreateAnnotRaw returned NULL`);try{if(yg(e.label,()=>{(function(e,t,n,r,i){if(bG(r.subtype)){let i,o;return DZ(e,t,n,r),i=r.quadPoints,bO(e,t,n,i),bN(e,t,n,i),o=t5[r.subtype],DA(e,n,r.color??o.color),DS(e,n,r.opacity??o.opacity),"strikeout"===r.subtype&&null!=r.intent&&DU(e,n,_x(r.intent))}if(bR(r.subtype))return DZ(e,t,n,r),be(e,t,n,{box:r.box,rotation:r.rotation??null}),bh(e,t,n,r),null!=r.cloudyIntensity&&r.cloudyIntensity>0&&Dj(e,n,r.cloudyIntensity);if(bX(r.subtype)){if("polygon"===r.subtype){let i;DZ(e,t,n,r),i=bw(e,t,n,[r.vertices],r.rotation),bv(e,t,n,bJ(r,i)),bh(e,t,n,r),DR(e,t,n,i.drawn[0]),null!=r.cloudyIntensity&&r.cloudyIntensity>0&&Dj(e,n,r.cloudyIntensity)}else{let i;DZ(e,t,n,r),i=bw(e,t,n,[r.vertices],r.rotation),bv(e,t,n,bJ(r,i)),bh(e,t,n,r),DR(e,t,n,i.drawn[0]),DL(e,n,r.lineEndings??t5.polyline.lineEndings)}return}if("line"===r.subtype)return function(e,t,n,r){DZ(e,t,n,r),bv(e,t,n,r),bh(e,t,n,r);let{start:i,end:o}=r.linePoints,[a]=bw(e,t,n,[[i,o]],r.rotation).drawn;DT(e,t,n,{start:a[0],end:a[1]}),DL(e,n,r.lineEndings??t5.line.lineEndings)}(e,t,n,r);if("link"===r.subtype){var o,a,s,l,u,d,c,f,m=e,p=t,h=n,F=r,g=i;if(DZ(m,p,h,F),Dx(m,p,h,F.rect),!m.FPDFAnnot_SetBorder(h,0,0,0))throw new N(G.Unknown,"FPDFAnnot_SetBorder returned false");F.target&&bS(m,p,h,F.target,g);return}if("ink"===r.subtype)return DZ(e,t,n,r),null!=r.intent&&DU(e,n,_8(r.intent)),bd(e,t,n,r),DB(e,t,n,bw(e,t,n,r.inkList,r.rotation).drawn);if(bD(r.subtype)){let o,a;return s=e,l=t,u=n,d=r,c=i,DZ(s,l,u,d),be(s,l,u,{box:d.box,rotation:d.rotation??null}),o=d.interiorColor??null,null===o?Dv(s,u,0):DA(s,u,o,0),DS(s,u,d.opacity??bg.opacity),bf(s,l,u,d),null!=d.cloudyIntensity&&Dj(s,u,d.cloudyIntensity),bu(s,u,d.fontFamily??bg.fontFamily,d.fontSize??bg.fontSize,d.color??bg.color,c),a=d.richText,Dz(s,u,_H(a.body?.align??bg.textAlign)),DU(s,u,_$[d.intent??bg.intent]),void 0!==d.verticalAlign&&d.verticalAlign!==bg.verticalAlign&&bP(s,u,d.verticalAlign),null!=d.calloutLine&&DH(s,l,u,d.calloutLine),null!=d.lineEnding&&DL(s,u,{start:"none",end:d.lineEnding}),b_(s,u,a,c,d.fontFamily??bg.fontFamily)}if("caret"===r.subtype)return DZ(e,t,n,r),be(e,t,n,{box:r.box,rotation:r.rotation??null}),DA(e,n,r.color??bn.color),DS(e,n,r.opacity??bn.opacity),null!=r.intent&&DU(e,n,_k(r.intent));if("text"===r.subtype)return DZ(e,t,n,r),Dx(e,t,n,r.rect),DA(e,n,r.color??bq.color),DS(e,n,r.opacity??bq.opacity),bK(e,n,r.icon??bq.icon),void 0!==r.open&&bH(e,n,r.open),null!=r.stateModel&&DG(e,t,n,"StateModel",Py[o=r.stateModel]??o),null!=r.state&&DG(e,t,n,"State",Pw[a=r.state]??a);if(bT(r.subtype)){let o;return DZ(e,t,n,r),null!=r.name&&bB(e,n,r.name),void 0!==r.opacity&&DS(e,n,r.opacity),o=null===r.fit?"fill":r.fit??t5.stamp.fit,bW(e,t,n,bz(i),bV(i),o,{box:r.box,rotation:r.rotation??null}),null!==r.fit&&PD(e,t,n,o)}if(bi(r.subtype)){let o;return DZ(e,t,n,r),Dx(e,t,n,r.rect),DA(e,n,r.color??br.color),DS(e,n,r.opacity??br.opacity),bo(e,n,r.icon??br.icon),o=r.file,_O(e,t,ba(e,t,n,o.name),bl(i),(f=o,{...null!=f.mimeType?{mimeType:f.mimeType}:{},...null!=f.description?{description:f.description}:{}}),{bytes:bs(i)})}if(bY(r.subtype))return function(e,t,n,r,i){let{actions:o,...a}=r;DZ(e,t,n,a),b3(e,t,n,{box:r.box,rotation:r.rotation??null},null),b0(e,t,n,r,i)}(e,t,n,r,i);if("popup"===r.subtype)return DZ(e,t,n,r),Dx(e,t,n,r.rect),void 0!==r.open&&bk(e,n,r.open);if(bM(r.subtype)){let o,a;return DZ(e,t,n,r),(o=r.quadPoints??[]).length>0&&bO(e,t,n,o),r.rect?Dx(e,t,n,r.rect):bN(e,t,n,o),DA(e,n,r.color??bC.color,0),DS(e,n,r.opacity??bC.opacity),a=r.interiorColor??null,null!==a&&DA(e,n,a,1),null!=r.overlayText&&r.overlayText.length>0&&DW(e,t,n,r.overlayText),r.repeat&&Dq(e,n,!0),bj(r)&&bu(e,n,r.fontFamily??bC.fontFamily,r.fontSize??bC.fontSize,r.fontColor??bC.fontColor,i),void 0!==r.textAlign&&Dz(e,n,_H(r.textAlign))}throw new N(G.NotImplemented,`no writer registered for draft.subtype=\'${r.subtype}\'`)})(n,r,u,s,a),b2(n,u,s,a)}),b7(n,u,s.blendMode),(l=n.EPDFAnnot_GetObjectNumber(u))<=0)throw new N(G.Unknown,`${e.label??"create"}: EPDFPage_CreateAnnotRaw made a direct object`)}finally{n.FPDFPage_CloseAnnot(u)}return{pageIndex:o.pageIndex,pageObjectNumber:o.pageObjectNumber,index:n.EPDFPage_GetAnnotCountRaw(i,o.pageIndex)-1,objectNumber:l}}),l=[],u=(e,t)=>"number"==typeof e?this.withOpen(s[e],t):this.withOpenExisting(e,t);a.forEach(({replyTo:e,parent:t},o)=>{e&&this.withOpen(s[o],t=>u(e.to,n=>b9(this.runtime,t,n,e.type))),void 0!==t&&this.withOpen(s[o],e=>u(t,o=>{ye(this.runtime,e,o),"number"!=typeof t&&l.push(gI(n,r,i,t.page,o,t.index))}))});let d=new Date;a.forEach(({create:{attribution:e,fileDates:t,label:i}},o)=>{this.withOpen(s[o],o=>yg(i,()=>{if("stamp"===e.kind){var i;i=e.actor,i?.displayName&&DQ(n,r,o,i.displayName),DX(n,r,o,d),DY(n,r,o,d),i&&(i.userId||i.groupId)&&(n.EPDFAnnot_SetEmbedMetadataNumber(o,Pd,1),i.userId&&(Ph(n,r,o,Pc,i.userId),Ph(n,r,o,Pm,i.userId),Ph(n,r,o,Pp,i.userId)),i.groupId&&Ph(n,r,o,Pf,i.groupId))}else!function(e,t,n,r,i){null===r.author?e.EPDFAnnot_RemoveKey(n,"T"):DQ(e,t,n,r.author),null===r.createdAt?e.EPDFAnnot_RemoveKey(n,"CreationDate"):DX(e,t,n,r.createdAt),null===r.modifiedAt?e.EPDFAnnot_RemoveKey(n,"M"):DY(e,t,n,r.modifiedAt);let o=[[Pc,r.userId],[Pm,r.createdBy],[Pp,r.modifiedBy],[Pf,r.groupId],["ImportedBy",i]];if(!o.every(([,e])=>!e))for(let[r,i]of(e.EPDFAnnot_SetEmbedMetadataNumber(n,Pd,1),o))i&&Ph(e,t,n,r,i)}(n,r,o,e.from,e.importedBy);t&&function(e,t,n,r){let i=e.EPDFAnnot_GetFileAttachmentForWrite(n);if(i)for(let[n,o]of[["CreationDate",r.createdAt],["ModDate",r.modifiedAt]]){if(!o)continue;let r=t.writeU16String(hH(o));try{e.FPDFAttachment_SetStringValue(i,n,r)}finally{t.free(r)}}}(n,r,o,t)}))});let c=gJ(this.session,this.fonts),f=s.map(e=>this.withOpen(e,t=>b8(n,r,t,e.pageObjectNumber,e.index,c)));return Dd(this.runtime,this.session,f),{created:f,meta:yF(this.session.writeStamp(),s,l)}}claimName(e,t,n){if(!e)return;let r=`${t.pageIndex}\\0${e}`,i=this.session.requireDocPtr();if(n.has(r)||b5(this.runtime,i,t.pageIndex,e)>=0)throw b4(e,t.pageObjectNumber);n.add(r)}linkTarget(e,t,n,r){if("planned"in e){if(e.planned<0||e.planned>=n)throw new N(G.InvalidArg,`no create ${e.planned} to link to`);return e.planned}let{existing:i}=e;if(i.page.objectNumber!==t.objectNumber)throw new N(G.InvalidArg,"reply"===r?`/IRT parent must be on the same page as the reply (parent page ${i.page.objectNumber}, reply page ${t.objectNumber})`:`a popup\'s parent must be on the same page (parent page ${i.page.objectNumber}, popup page ${t.objectNumber})`);return{page:i.page,...gC(this.runtime,this.session,i)}}writeContext(e){return{...yp(this.runtime,this.session,this.fonts),docPtr:this.session.requireDocPtr(),drawings:this.session.drawingIndex(),pdfPageCount:e=>DE(this.runtime.fn,this.runtime.mem,e),...e?{resources:e}:{}}}withOpen(e,t){let{fn:n}=this.runtime,r=n.EPDFPage_GetAnnotRaw(this.session.requireDocPtr(),e.pageIndex,e.index);if(!r)throw new N(G.Unknown,"a created annotation is not where it was");try{if(n.EPDFAnnot_GetObjectNumber(r)!==e.objectNumber)throw new N(G.Unknown,"a created annotation is not where it was");return t(r)}finally{n.FPDFPage_CloseAnnot(r)}}withOpenExisting(e,t){let{fn:n}=this.runtime,r=n.EPDFPage_GetAnnotRaw(this.session.requireDocPtr(),e.pageIndex,e.index);if(!r)throw new N(G.Unknown,"an annotation to link to is not where it was");try{return t(r)}finally{n.FPDFPage_CloseAnnot(r)}}};function yF(e,t,n){return{affectedPages:[...new Set(t.map(e=>e.pageObjectNumber))].map(e=>q(e)),cacheDelta:null,...e,changedRefs:[...t.map(e=>({kind:"objectNumber",page:q(e.pageObjectNumber),objectNumber:e.objectNumber})),...n]}}function yg(e,t){try{return t()}catch(t){if(!e||!N.is(t))throw t;throw new N(t.code,`${e}: ${t.message}`,{...t.details?{details:t.details}:{},cause:t})}}var y_=class{constructor(e,t){this.runtime=e,this.ids=t,hJ(this,"fileHandles",[]),hJ(this,"identities",new Map),hJ(this,"programs",new Map),hJ(this,"fallbacks",[]),hJ(this,"builtIn",new Set),this.registerLastResort()}registerLastResort(){let e=function(e){let t=e.endsWith("==")?2:+!!e.endsWith("="),n=new Uint8Array(e.length/4*3-t),r=0;for(let t=0;t>16),r>8&255),r{try{return e()}catch{return t}};return{familyName:i(()=>h2(r,(t,r)=>n.EPDFFont_GetFamilyName(e,t,r))??t.familyName,t.familyName),weight:i(()=>n.EPDFFont_GetWeight(e),t.weight||400),italic:i(()=>n.EPDFFont_IsItalic(e),1===t.italic),embeddingPermission:i(()=>(function(e){switch(e){case 1:return"editable";case 2:return"preview-and-print";default:return"installable"}})(n.EPDFFont_GetEmbeddingPermission(e)),"installable"),editingAuthorized:i(()=>n.EPDFFont_IsEditingAuthorized(e),!0),instanced:i(()=>n.EPDFFont_IsInstanced(e),!1)}}registerStartup(e){for(let t of e){let e=void 0===t.italic?-1:+!!t.italic;this.registerFromNodeFile(t.key,t.familyName??"",t.weight??0,e,t.path,t.serve??!1,t.builtIn??!1),t.fallback&&this.addFallback(t.key,t.tier)}}addFallback(e,t=0){let n=this.requireId(e);if(!this.runtime.fn.EPDFFont_AddFallbackFont(n,t))throw new N(G.InvalidArg,`addFallback failed: ${e}`);let r=this.fallbacks.find(t=>t.key===e);r?r.tier=t:this.fallbacks.push({key:e,tier:t})}clearFallbacks(){this.runtime.fn.EPDFFont_ClearFallbackFonts(),this.fallbacks=[]}fallbackKeys(){return[...this.fallbacks].sort((e,t)=>e.tier-t.tier).map(e=>e.key)}engineFontFacts(){let e=[];for(let[t,n]of this.identities){let r=this.programs.get(t);r&&e.push({key:t,identity:n,postScriptName:r.postScriptName,format:r.format,sha256:r.sha256,served:r.served,builtIn:this.builtIn.has(t)})}return e}keyForId(e){for(let[t,n]of this.ids)if(n===e)return t}programFor(e){let t=[...this.programs].find(([,t])=>t.sha256===e)?.[0];if(void 0===t)return;let n=this.requireId(t),{fn:r,mem:i}=this.runtime;return{info:()=>{let e=yn(this.runtime,(e,t)=>r.EPDFFont_GetCoverage(n,e,t)),t=h0(i,[4,4],([e,t])=>r.EPDFFont_GetMetrics(n,e,t)?{ascent:Number(i.peek(e,"f32")),descent:Number(i.peek(t,"f32"))}:{ascent:0,descent:0});return{covers:e,ascent:Math.round(1e3*t.ascent),descent:-Math.round(1e3*t.descent)}},bytes:()=>{let e=r.EPDFFont_GetProgramData(n,0n,0);return hY(i,Math.max(1,e),t=>(r.EPDFFont_GetProgramData(n,t,e),i.readBytes(t,e)))}}}readProgram(e){let{fn:t,mem:n}=this.runtime;return{sha256:hY(n,32,r=>t.EPDFFont_GetProgramHash(e,r)?Array.from(n.readBytes(r,32),e=>e.toString(16).padStart(2,"0")).join(""):""),format:2===t.EPDFFont_GetProgramFormat(e)?"opentype":"truetype",postScriptName:h2(n,(n,r)=>t.EPDFFont_GetPostScriptName(e,n,r))||null}}clear(){for(let e of(this.runtime.fn.EPDFFont_ClearRegisteredFonts(),this.registerLastResort(),this.ids.clear(),this.identities.clear(),this.programs.clear(),this.fallbacks=[],this.builtIn.clear(),this.fileHandles))e.close();this.fileHandles.length=0}idFor(e){return this.requireId(e)}requireId(e){let t=this.ids.get(e);if(void 0===t)throw new N(G.InvalidArg,`font not registered on this thread: ${e}`);return t}};function yP(e,t,n){return{affectedPages:[q(t)],cacheDelta:null,...e,changedRefs:[...n]}}var yD=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}writeContext(e){return{...yp(this.runtime,this.session,this.fonts),runtime:this.runtime,docPtr:this.session.requireDocPtr(),drawings:this.session.drawingIndex(),pdfPageCount:e=>DE(this.runtime.fn,this.runtime.mem,e),...e?{resources:e}:{}}}create(e,t,n,r={}){let{actor:i,resources:o,objectNumber:a}=r,{reply:s,...l}=t,u="popup"===t.subtype?t.parent:null;"popup"===t.subtype&&delete l.parent;let{created:d,meta:c}=new yh(this.runtime,this.session,this.fonts).create([{page:q(e),draft:l,...s?{replyTo:{to:{existing:s.to},type:s.type??"reply"}}:{},...u?{parent:{existing:u}}:{},...o?{resources:o}:{},...void 0!==a?{objectNumber:a}:{},attribution:{kind:"stamp",...i?{actor:i}:{}}}],n);return{annotation:d[0],meta:c}}update(e,t,n,r,i){hW(r);let{fn:o,mem:a}=this.runtime,{pageIndex:s,index:l}=gC(this.runtime,this.session,e),u=gM(this.runtime,this.session,s,l);try{let b,y,w;hW(r);let E=this.writeContext(i),A=Df(o.EPDFAnnot_GetBlendMode(u)),v=b8(o,a,u,e.page.objectNumber,l,gJ(this.session,this.fonts));Dd(this.runtime,this.session,[v]);let S=o6(n,v,t.groupId);var d,c,f,m,p,h,F,g,_,P=u,D=t;if(("polygon"===v.subtype||"polyline"===v.subtype)&&tK(D)&&o.FPDFAnnot_HasKey(P,"EMBD_Metadata")&&6!==o.FPDFAnnot_GetValueType(P,"EMBD_Metadata"))throw new N(G.InvalidArg,"Malformed annotation metadata cannot store a caption");t=function(e,t,n={}){var r,i;let o,a=(r=function(e,t){let{rect:n,...r}=t;if(void 0===n||!tC.has(e.subtype))return t;if(!eq(n))throw new N(G.InvalidArg,`${e.subtype} update field \'rect\': not a rect of finite numbers`,{details:{field:"rect"}});if(tv(eH(n),e.rect))return r;let i=tM(e.subtype).find(n=>{let r=t[n];return void 0!==r&&!tv(r,e[n])});if(i)throw new N(G.InvalidArg,`${e.subtype} update field \'rect\': a new rect moves the shape, so it can\'t come with a new \'${i}\'`,{details:{field:"rect"}});let{left:o,bottom:a,right:s,top:l}=n;return{...r,...function(e,t){let n=e.subtype;if(!tC.has(n))return{rect:t};let r=eH(t),i=eH(e.rect),o=r.right-r.left,a=r.top-r.bottom,s=i.right-i.left,l=i.top-i.bottom,u=tv(o,s),d=tv(a,l);if(!u&&o<=0||!d&&a<=0)throw tR(n,"a rect needs a width and a height");let c=e.rotation??0,f=to[n],m="box"===f.box?eQ(c):null;if(!tv((c%360+360)%360,0)&&null===m&&(!u||!d))throw tR(n,"a turned drawing\'s rect can only move; resize its shape instead");if(!u&&s<=0||!d&&l<=0)throw tR(n,"its rect has no width or height to stretch; it can only move");let p=u?1:o/s,h=d?1:a/l,F=e=>({x:r.left+(e.x-i.left)*p,y:r.bottom+(e.y-i.bottom)*h}),g=e=>{let t=F({x:e.left,y:e.bottom}),n=F({x:e.right,y:e.top});return eH({left:t.x,bottom:t.y,right:n.x,top:n.y})},_={box:e=>null===m||0===m||180===m?g(e):eX(g(eJ(e,m)),m),point:F,points:e=>e.map(F),strokes:e=>e.map(e=>e.map(F)),quads:e=>e.map(e=>({upperLeft:F(e.upperLeft),upperRight:F(e.upperRight),lowerLeft:F(e.lowerLeft),lowerRight:F(e.lowerRight)})),linePoints:e=>({start:F(e.start),end:F(e.end)}),calloutLine:e=>e.map(F)},P={};for(let t of tM(n)){let n=e[t],r=f[t];null!=n&&r&&(P[t]=_[r](n))}return P}(e,{left:o,bottom:a,right:s,top:l})}}(e,function(e,t){let n=function(e,t){var n;let r;if(void 0===t||t===e.subtype)return e.subtype;let i=(n=e.subtype,(r=ts.find(e=>e.includes(n)))?r.filter(e=>e!==n):[]);if(!i.includes(t))throw new N(G.InvalidArg,0===i.length?`${e.subtype} has no other kind it can become`:`${e.subtype} can become ${i.length<2?i.join(""):`${i.slice(0,-1).join(", ")} or ${i.at(-1)}`}, not ${t}`,{details:{field:"subtype"}});let o=function(e,t){let n=tn(t)?.owners??{};for(let t of Object.keys(tn(e.subtype)?.owners??{})){let r=e[t];if(!(t in n)&&null!=r)return t}return null}(e,t);if(null!==o){let n=e[o];throw new N(G.InvalidArg,`${e.subtype} field \'${o}\' holds ${"string"==typeof n?`\'${n}\'`:JSON.stringify(n)}, and ${t} has no such field: clear it first, in the same change`,{details:{field:o}})}return t}(e,t.subtype);if("unsupported"===e.subtype)throw new N(G.InvalidArg,"an annotation of a type the engine doesn\'t model can\'t be updated");return ni(n,t),{...t,subtype:n}}(e,t)),o=tn(e.subtype)?.colors??[],i=nn(r,(t,n)=>{let r=e[t];return o.includes(t)&&"string"==typeof n&&"string"==typeof r&&n.toLowerCase()===r.toLowerCase()}),nn(i,(t,n)=>void 0!==n&&tv(n,e[t])));return!function(e,t){let n=t.subtype??e.subtype;if("unsupported"===n)return;for(let[e,r]of Object.entries(hf[n].readBackWrites)){let i=t[e];if(!(void 0===i||r?.safeParse(i).success))throw new N(G.InvalidArg,r?`${n} update field \'${e}\': this value can be read but not written; send it back unchanged or replace it`:`${n} update field \'${e}\': the engine works this out; send it back unchanged or leave it out`,{details:{field:e}})}let r=pX(n).fileSchemas.update.safeParse(t);if(!r.success)throw hC(r.error,`${n} update`)}(e,a),function(e,t,n={}){var r;let i=(r=function(e,t){if("text"!==e.subtype||"text"!==t.subtype||null==t.state||void 0!==t.stateModel)return t;let n=tN(t.state);if(n)return{...t,stateModel:n};if(!e.stateModel)throw nr(t.state);return t}(e,t),t9(e.subtype)&&t7(r.borderStyle,r.dashArray)&&null==e.dashArray?{...r,dashArray:[...t8]}:r);return tJ(i),function(e,t){if("line"!==e.subtype&&"polygon"!==e.subtype&&"polyline"!==e.subtype)return t;let n=e.subtype,r={...t,subtype:n};if(tZ(n,r),null!=r.measure&&"rectilinear"!==r.measure.subtype){if(e.measure?.subtype!==r.measure.subtype)throw new N(G.InvalidArg,`A ${"geospatial"===r.measure.subtype?"geospatial":"foreign"} measure can\'t be written; leave measure out`);r={...r,measure:void 0}}if("line"===e.subtype&&"line"===r.subtype)tK(r)&&(r={...r,captionEnabled:void 0===r.captionEnabled?e.captionEnabled:r.captionEnabled,captionPosition:r.captionPosition??e.captionPosition,captionOffset:void 0===r.captionOffset?e.captionOffset:r.captionOffset});else if("line"!==e.subtype&&"line"!==r.subtype){if(r.vertices&&null!==r.captionEnabled&&void 0===r.captionCenter&&e.captionCenter){let t=function(e,t,n){if(e.length!==t.length||e.length<2)return;let r=e[0],i=t[0],o=e.findIndex(e=>Math.hypot(e.x-r.x,e.y-r.y)>1e-6);if(o<0)return;let a={x:e[o].x-r.x,y:e[o].y-r.y},s={x:t[o].x-i.x,y:t[o].y-i.y},l=a.x*a.x+a.y*a.y,u=(a.x*s.x+a.y*s.y)/l,d=(a.x*s.y-a.y*s.x)/l;if(Math.abs(u*u+d*d-1)>1e-5)return;let c=e=>({x:i.x+u*(e.x-r.x)-d*(e.y-r.y),y:i.y+d*(e.x-r.x)+u*(e.y-r.y)});if(e.every((e,n)=>{let r=c(e);return .001>=Math.hypot(r.x-t[n].x,r.y-t[n].y)}))return c(n)}(e.vertices,r.vertices,e.captionCenter);t&&(r={...r,captionCenter:t})}tK(r)&&(r=null===r.captionEnabled?{...r,captionEnabled:null,captionCenter:null}:{...r,captionEnabled:r.captionEnabled??e.captionEnabled??!1,captionCenter:void 0===r.captionCenter?e.captionCenter:r.captionCenter})}if(tq.some(e=>void 0!==r[e])){let t=tU({...e,...r});"unavailable"in t||(r={...r,contents:t.label})}return tZ(n,r),r}(e,function(e,t){var n;let r,i,o,a,s,l;if("free-text"!==e.subtype||"free-text"!==t.subtype)return t;let u=e.calloutLine;if(!u||void 0!==t.calloutLine||void 0===t.box&&void 0===t.rotation)return t;let d=t.box??e.box,c=(void 0===t.rotation?e.rotation:t.rotation)??0,f=3===u.length?u[1]:void 0,m=(n=f??u[0],r={x:(d.left+d.right)/2,y:(d.bottom+d.top)/2},i={degrees:c,center:r},a=(o=c?e3(n,i):n).x-r.x,s=o.y-r.y,l=Math.abs(a)>=Math.abs(s)?{x:a>=0?d.right:d.left,y:r.y}:{x:r.x,y:s>0?d.top:d.bottom},c?e1(l,i):l);return{...t,calloutLine:f?[u[0],f,m]:[u[0],m]}}(e,function(e,t){if(!tQ(t.subtype??e.subtype))return t;let{richText:n}=t;if(n)return{...t,contents:e5(n)};if(null===n||void 0===t.contents||!e.richText)return t;if(null===t.contents)return{...t,richText:null};let r={paragraphs:e4(t.contents)};return{...t,richText:r,contents:e5(r)}}(e,function(e,t,n){let r;if("free-text"!==e.subtype||"free-text"!==t.subtype)return t;(void 0!==t.intent||void 0!==t.calloutLine)&&nt(t.intent??e.intent,void 0!==t.calloutLine?t.calloutLine:e.calloutLine);let i=ne({},t,n),o=void 0!==t.richText||void 0!==t.contents;if(!o&&0===Object.keys(i).length)return t;let a={...t.richText?.body?{...e6,...t.richText.body}:e.richText.body,...i},s={body:a,paragraphs:t.richText?.paragraphs??(void 0!==t.contents?e4(t.contents??""):e.richText.paragraphs)};return{...t,...(r={},void 0===t.fontSize&&void 0!==a.size&&a.size!==e.fontSize&&(r.fontSize=a.size),void 0===t.fontColor&&void 0!==a.color&&a.color.toLowerCase()!==e.fontColor?.toLowerCase()&&(r.fontColor=a.color.toLowerCase()),void 0===t.textAlign&&void 0!==a.align&&a.align!==e.textAlign&&(r.textAlign=a.align),r),richText:s,...o?{contents:e5(s)}:{}}}(e,i,n.describeFont))))}(e,a,n)}(v,t,{describeFont:E.describeFont}),function(e,t){if("widget"!==e.subtype||!e.hasMark)return;let n=rM.filter(n=>void 0!==t[n]&&!tv(t[n],e[n]));if(n.length>0)throw new N(G.InvalidArg,`the widget has a mark in it, which its style doesn\'t draw: ${n.join(", ")} can\'t change`)}(v,t),nO(v.subtype,i,"update"),m=t,bT(b6(m))&&(void 0!==m.name&&null!==m.name&&bL(m.name),null!=m.fit&&b$(m.fit),y=E?.resources?.appearance,void 0!==y&&bU(y,E)),hW(r);let k=i?.appearance?"regenerate":(p=t,function(e,t){if(void 0!==t.subtype&&t.subtype!==e.subtype)return tx;let n=e.subtype,r=void 0===t.captionEnabled?e.captionEnabled:t.captionEnabled,i=tb.has(n)||["line","polygon","polyline"].includes(n)&&!0===r,o=[];for(let[n,r]of Object.entries(t))!(void 0===r||tD.has(n))&&("contents"!==n||i)&&(tv(r,e[n])||o.push(n));if(0===o.length)return tk;let a=tw[n],s=a&&("polygon"===n||"polyline"===n)&&e.captionCenter?[...a,"captionCenter"]:a;if(!s||!o.every(e=>s.includes(e)))return tx;let l=function(e,t,n,r){let[i]=r,o=tS(e[i]),a=tS(t[i]);if(!o||!a)return null;let s=a.x-o.x,l=a.y-o.y;if(ty.has(n)){let n=void 0===t.rotation?e.rotation:t.rotation;if(!tE(tA(e.rotation),tA(n)))return null}for(let n of r){let r=e[n],i=t[n];if((null!=r||null!=i)&&(null==r||null==i||!function e(t,n,r,i){if(null==t||null==n)return null==t&&null==n;if(Array.isArray(t)||Array.isArray(n))return!!Array.isArray(t)&&!!Array.isArray(n)&&t.length===n.length&&t.every((t,o)=>e(t,n[o],r,i));if("object"==typeof t&&"object"==typeof n){for(let o of new Set([...Object.keys(t),...Object.keys(n)])){let a=t[o],s=n[o];if("number"==typeof a&&"number"==typeof s){if(!tE(a+("left"===o||"right"===o||"x"===o?r:"bottom"===o||"top"===o||"y"===o?i:0),s))return!1}else if(!e(a,s,r,i))return!1}return!0}return t===n}(r,i,s,l)))return null}return{x:s,y:l}}(e,t,n,s);return l?{impact:"translation",by:l}:tx}(v,p).impact);if("inert"!==k&&function(e,t,n){var r,i;let o;if(!__.has(e.FPDFAnnot_GetSubtype(n)))return;let a=_E(e,t,n);r=a,i=function(e,t,n){let r=_y(e,t,n);if(!r)return;let i=_F(r.degrees);return void 0===i?void 0:{rotation:i,box:r.box}}(e,t,n),(r&&i?(o=r.rotation,.05>=_b(o,i.rotation)&&eY(r.box,i.box)):!r&&!i)||(a?(D5(e,n,a.rotation),D8(e,t,n,a.box)):(e.EPDFAnnot_ClearEmbedMetadataKey(n,D3),e.EPDFAnnot_ClearEmbedMetadataKey(n,D2)))}(o,a,u),void 0!==t.subtype&&t.subtype!==v.subtype&&!o.EPDFAnnot_SetSubtype(u,rI[t.subtype]))throw new N(G.Unknown,"EPDFAnnot_SetSubtype returned false");h=u,F=t,function(e,t,n,r,i){var o,a;let s=b6(r);if(bG(s)){var l=e,u=t,d=n,c=r;if(DJ(l,u,d,c),void 0!==c.color&&DA(l,d,c.color),void 0!==c.opacity&&DS(l,d,c.opacity),"strikeout"===c.subtype&&void 0!==c.intent&&DV(l,d,null===c.intent?null:_x(c.intent)),void 0!==c.quadPoints){let e=D0(_m(l,u,d).flatMap(bx),c.quadPoints.flatMap(bx));bI(l,u,d,c.quadPoints),e?D1(l,u,d,e):bN(l,u,d,c.quadPoints)}return}if(bR(s))return DJ(e,t,n,r),bt(e,t,n,r),bF(e,t,n,r),void 0!==r.cloudyIntensity&&(null!==r.cloudyIntensity&&r.cloudyIntensity>0?Dj(e,n,r.cloudyIntensity):DM(e,n));if(bX(s))return"polygon"===s?(DJ(e,t,n,r),bQ(e,t,n,r),bF(e,t,n,r),void 0!==r.cloudyIntensity&&(null!==r.cloudyIntensity&&r.cloudyIntensity>0?Dj(e,n,r.cloudyIntensity):DM(e,n))):(DJ(e,t,n,r),bQ(e,t,n,r),bF(e,t,n,r),void 0!==r.lineEndings&&DL(e,n,r.lineEndings));if("line"===s)return function(e,t,n,r){DJ(e,t,n,r),bv(e,t,n,r),bF(e,t,n,r);let i=r.linePoints&&[[r.linePoints.start,r.linePoints.end]],o=bA(e,t,n,bE(e,t,n),i,r.rotation);if(o){let[r]=o.drawn;DT(e,t,n,{start:r[0],end:r[1]})}void 0!==r.lineEndings&&DL(e,n,r.lineEndings)}(e,t,n,r);if("link"===s){var f=e,m=t,p=n,h=r,F=i;if(DJ(f,m,p,h),void 0!==h.rect&&Dx(f,m,p,h.rect),null===h.target){var g=f,_=p;if(!g.EPDFAnnot_RemoveAction(_)||!g.EPDFAnnot_RemoveDest(_))throw new N(G.Unknown,"failed to clear link target")}else if(void 0!==h.target){if("goto"!==h.target.kind&&"uri"!==h.target.kind&&"named"!==h.target.kind)throw new N(G.InvalidArg,`a \'${h.target.kind}\' link target can\'t be written`,{details:{field:"target"}});bS(f,m,p,h.target,F)}return}if("ink"===s){let i;return DJ(e,t,n,r),void 0!==r.intent&&DV(e,n,null===r.intent?null:_8(r.intent)),bm(e,t,n,r),(i=bA(e,t,n,bE(e,t,n),r.inkList,r.rotation))&&DB(e,t,n,i.drawn)}if(bD(s)){var P=e,D=t,b=n,y=r,w=i;if(DJ(P,D,b,y),bt(P,D,b,y),void 0!==y.interiorColor&&(null===y.interiorColor?Dv(P,b,0):DA(P,b,y.interiorColor,0)),void 0!==y.opacity&&DS(P,b,y.opacity),bp(P,D,b,y),void 0!==y.cloudyIntensity&&(null===y.cloudyIntensity?DM(P,b):Dj(P,b,y.cloudyIntensity)),void 0!==y.color){let e=_u(P,D,b);e?D$(P,b,-1,e.fontSize>0?e.fontSize:bg.fontSize,y.color):bu(P,b,bg.fontFamily,bg.fontSize,y.color,w)}void 0!==y.richText&&b_(P,b,y.richText,w,y.fontFamily),void 0!==y.textAlign&&Dz(P,b,_H(y.textAlign)),void 0!==y.intent&&DU(P,b,_$[y.intent]),void 0!==y.verticalAlign&&bP(P,b,y.verticalAlign),null===y.calloutLine?P.EPDFAnnot_RemoveKey(b,"CL"):void 0!==y.calloutLine&&DH(P,D,b,y.calloutLine),null===y.lineEnding?P.EPDFAnnot_RemoveKey(b,"LE"):void 0!==y.lineEnding&&DL(P,b,{start:"none",end:y.lineEnding});return}if("caret"===s)return DJ(e,t,n,r),bt(e,t,n,r),void 0!==r.color&&DA(e,n,r.color),void 0!==r.opacity&&DS(e,n,r.opacity),void 0!==r.intent&&DV(e,n,null===r.intent?null:_k(r.intent));if("text"===s)return DJ(e,t,n,r),void 0!==r.rect&&Dx(e,t,n,r.rect),void 0!==r.color&&DA(e,n,r.color),void 0!==r.opacity&&DS(e,n,r.opacity),void 0!==r.icon&&bK(e,n,r.icon),void 0!==r.open&&bH(e,n,r.open),void 0!==r.stateModel&&DO(e,t,n,"StateModel",null===r.stateModel?null:Py[o=r.stateModel]??o),void 0!==r.state&&DO(e,t,n,"State",null===r.state?null:Pw[a=r.state]??a);if(bT(s))return function(e,t,n,r,i){DJ(e,t,n,r),null===r.name?e.EPDFAnnot_RemoveKey(n,"Name"):void 0!==r.name&&bB(e,n,r.name);let o=PP(e,t,n)??"fill",a=void 0!==r.fit?r.fit??"fill":o;void 0!==r.fit&&PD(e,t,n,r.fit);let s=i?.resources?.appearance;if(void 0!==s){void 0!==r.opacity&&DS(e,n,r.opacity);let o=_A(e,t,n);bW(e,t,n,s,bV(i),a,{box:r.box??o.box,rotation:void 0===r.rotation?o.rotation:r.rotation});return}let l=bt(e,t,n,r);void 0!==r.opacity?function(e,t,n,r){if(!e.EPDFAnnot_SetStampOpacity(t,Pg[n],r))throw new N(G.Unknown,"EPDFAnnot_SetStampOpacity returned false")}(e,n,a,r.opacity):(l||void 0!==r.fit)&&Pb(e,n,a)}(e,t,n,r,i);if(bi(s))return DJ(e,t,n,r),void 0!==r.rect&&Dx(e,t,n,r.rect),void 0!==r.color&&DA(e,n,r.color),void 0!==r.opacity&&DS(e,n,r.opacity),void 0!==r.icon&&bo(e,n,r.icon),function(e,t,n,r,i){let o=i?.resources?.file;if(void 0===r&&void 0===o)return;let a=e.EPDFAnnot_GetFileAttachmentForWrite(n);if(null===r){if(a)throw new N(G.InvalidArg,"a file attachment\'s file can\'t be removed");if(void 0===o)return}let s=a?_I(e,t,a):null;if(!a){if(!r||void 0===o)throw new N(G.InvalidArg,"the file attachment has no file: send the file\'s name as `file` and its bytes as the `file` resource");a=ba(e,t,n,r.name)}let l=r?r.mimeType??null:s?.mimeType??null;if(void 0!==o?_O(e,t,a,bl(i),{mimeType:l},{bytes:o}):l!==(s?.mimeType??null)&&function(e,t,n){if(!e.EPDFAttachment_SetSubtype(t,n??""))throw new N(G.InvalidArg,"the file attachment\'s file has no embedded data to give a MIME type")}(e,a,l),r){if(null!==s&&r.name!==s.name&&!h6(t,r.name,t=>e.EPDFAttachment_SetName(a,t)))throw new N(G.Unknown,"EPDFAttachment_SetName returned false");if((r.description??null)!==(s?.description??null)&&!h6(t,r.description??"",t=>e.EPDFAttachment_SetDescription(a,t)))throw new N(G.Unknown,"EPDFAttachment_SetDescription returned false")}}(e,t,n,r.file,i);if(bY(s))return function(e,t,n,r,i){let{actions:o,...a}=r;if(DJ(e,t,n,a),!function(e,t,n,r){if(void 0===r.box&&void 0===r.rotation)return;let i=eH(g9(e,t,n)),o=PO(e,n);b3(e,t,n,{box:r.box??eX(i,o??0),rotation:void 0===r.rotation?o:r.rotation||null},{rect:i,rotation:o})}(e,t,n,r),b0(e,t,n,r,i),void 0!==r.actions){if(!i?.runtime||!i.docPtr)throw new N(G.InvalidArg,"writing a widget\'s actions requires the runtime and the document on the write context");PM(i.runtime,i.docPtr,n,r.actions)}}(e,t,n,r,i);if("popup"===s)return DJ(e,t,n,r),void 0!==r.rect&&Dx(e,t,n,r.rect),void 0!==r.open&&bk(e,n,r.open);if(bM(s)){var E=e,A=t,v=n,S=r,k=i;if(DJ(E,A,v,S),void 0!==S.rect&&Dx(E,A,v,S.rect),void 0!==S.quadPoints&&(bI(E,A,v,S.quadPoints),void 0===S.rect&&bN(E,A,v,S.quadPoints)),void 0!==S.color&&DA(E,v,S.color,0),void 0!==S.opacity&&DS(E,v,S.opacity),void 0!==S.interiorColor&&(null===S.interiorColor?Dv(E,v,1):DA(E,v,S.interiorColor,1)),void 0!==S.overlayText&&DW(E,A,v,S.overlayText??""),void 0!==S.repeat&&Dq(E,v,S.repeat),bj(S)){let e=_u(E,A,v);bu(E,v,S.fontFamily??(e?_q(e.fontCode):bC.fontFamily),S.fontSize??e?.fontSize??bC.fontSize,S.fontColor??e?.color??bC.fontColor,k)}void 0!==S.textAlign&&Dz(E,v,_H(S.textAlign));return}throw new N(G.NotImplemented,`no writer registered for subtype=\'${s}\'`)}(o,a,h,F,E),b2(o,h,{...F,subtype:b6(F)},E),void 0!==t.contents&&t.contents!==v.contents&&tz({...v,...t})&&o.EPDFAnnot_RemoveKey(u,"RC");let x=null;void 0===t.reply||(d=t.reply,c=v.reply,null===d||null===c?d===c:yb(d.to,c.to)&&(d.type??"reply")===c.type)||function(e,t,n,r,i){let{fn:o}=e;if(null===i.inReplyTo){o.EPDFAnnot_SetLinkedAnnot(n,"IRT",0n),o.EPDFAnnot_SetReplyType(n,0);return}if(i.inReplyTo){if(i.inReplyTo.page.objectNumber!==r)throw new N(G.InvalidArg,`/IRT parent must be on the same page as the reply (parent page ${i.inReplyTo.page.objectNumber}, reply page ${r})`);let a=gj(e,t,i.inReplyTo);try{b9(e,n,a,i.replyType??"reply")}finally{o.FPDFPage_CloseAnnot(a)}return}if(void 0!==i.replyType){let e=o.FPDFAnnot_GetLinkedAnnot(n,"IRT");if(e)try{o.EPDFAnnot_SetReplyType(n,Po(i.replyType))}finally{o.FPDFPage_CloseAnnot(e)}}}(this.runtime,this.session,u,e.page.objectNumber,null===t.reply?{inReplyTo:null}:{inReplyTo:t.reply.to,replyType:t.reply.type??"reply"});let O=!1;"popup"!==t.subtype||"popup"!==v.subtype||void 0===t.parent||yb(t.parent,v.parent)||(O=!0,x=function(e,t,n,r,i,o){let{fn:a}=e;if(o){let r=gj(e,t,o);try{let e=a.FPDFAnnot_GetLinkedAnnot(r,"Popup");if(e){let t=a.EPDFAnnot_GetObjectNumber(e)===a.EPDFAnnot_GetObjectNumber(n);a.FPDFPage_CloseAnnot(e),t&&a.EPDFAnnot_SetLinkedAnnot(r,"Popup",0n)}}finally{a.FPDFPage_CloseAnnot(r)}}if(null===i)return a.EPDFAnnot_SetLinkedAnnot(n,"Parent",0n),null;if(i.page.objectNumber!==r)throw new N(G.InvalidArg,`a popup\'s parent must be on the same page (parent page ${i.page.objectNumber}, popup page ${r})`);let{annotPtr:s,name:l}=gR(e,t,i);try{return ye(e,n,s),l}finally{a.FPDFPage_CloseAnnot(s)}}(this.runtime,this.session,u,e.page.objectNumber,t.parent,v.parent));let I=null,C=t.open;if(void 0!==C&&!O){let e="text"===v.subtype?v.popup:"popup"===v.subtype?v.parent:null;e&&(I=function(e,t,n,r,i){let{fn:o}=e,{annotPtr:a,name:s}=gR(e,t,n);try{if(i&&1!==o.FPDFAnnot_GetSubtype(a))return null;return yt(e,a,r),s}finally{o.FPDFPage_CloseAnnot(a)}}(this.runtime,this.session,e,C,"popup"===v.subtype))}if(DY(o,a,u),g=u,S&&(S.userId||S.groupId)&&(o.EPDFAnnot_HasEmbedMetadata(g)||o.EPDFAnnot_SetEmbedMetadataNumber(g,Pd,1),S.userId&&Ph(o,a,g,Pp,S.userId),S.groupId&&Ph(o,a,g,Pf,S.groupId)),"inert"===k||"translation"===k)b={action:"preserved",changed:!1};else{let e;"widget"!==v.subtype?e=b7(o,u,t.blendMode??A):v.hasMark?(_=u,Pb(o,_,"contain"),e=!1):e=o.EPDFAnnot_GenerateFormFieldAP(u),b=e?{action:"regenerated",changed:!0}:{action:"generation-unavailable",changed:"regenerate"===k}}o.FPDFPage_CloseAnnot(u),u=null,u=gM(this.runtime,this.session,s,l);let j=b8(o,a,u,e.page.objectNumber,l,gJ(this.session,this.fonts));Dd(this.runtime,this.session,[j]);let M=yP(this.session.writeStamp(),e.page.objectNumber,(f=[j.ref,x,I],w=new Set,f.filter(e=>!(null===e||w.has(K(e)))&&(w.add(K(e)),!0))));return{annotation:j,appearance:b,meta:M}}finally{null!==u&&o.FPDFPage_CloseAnnot(u)}}assertNotAttachedWidget(e,t){let{fn:n}=this.runtime;if(20!==n.FPDFAnnot_GetSubtype(e))return;let r=n.EPDFAnnot_GetObjectNumber(e);if(t>0&&r===t)return;let i=function(e,t,n){if(n<=0)return 0;let r=gv(e,t),i=e.fn.EPDFForm_GetFieldIndexForWidget(r,n);return i<0?0:e.fn.EPDFForm_GetFieldObjNum(r,i)}(this.runtime,this.session,r);if(0!==i)throw new N(G.InvalidArg,i===r?"widget is its form field\'s own dictionary (a merged field/widget) - delete the field with doc.forms.delete":"widget is attached to a form field - use doc.forms.removeWidget or doc.forms.delete")}delete(e,t,n){hW(n);let{fn:r}=this.runtime,i=this.session.requireDocPtr(),o=e.page.objectNumber,{pageIndex:a}=this.session.resolvePageRef(e.page),{annotations:s}=new DP(this.runtime,this.session,this.fonts).listOne(o,n),l=tG(s,e);if(0===l.length){var u;throw u=e,new N(G.NotFound,`no annotation ${K(u)} on page ${u.page.objectNumber}`)}o5(t,l);let d=e=>gC(this.runtime,this.session,e).index,c=l.map(e=>d(e.ref));for(let e of c)this.withAnnotAt(a,e,e=>this.assertNotAttachedWidget(e,0));let f=new Set(l.map(e=>K(e.ref))),m=l.flatMap(e=>{if("popup"!==e.subtype||!e.parent)return[];let t=K(e.parent),n=s.find(e=>K(e.ref)===t);return n&&!f.has(t)?[d(n.ref)]:[]});for(let e of(hW(n),gx(this.runtime,this.session,o),[...c].sort((e,t)=>t-e)))if(!r.EPDFPage_RemoveAnnotRaw(i,a,e))throw new N(G.Unknown,`failed to remove annotation ${e} on page ${o}`);for(let e of m){let t=c.filter(t=>tr.EPDFAnnot_RemoveKey(e,"Popup"))}let p=[...l].reverse().map(e=>e.ref);return{meta:yP(this.session.writeStamp(),o,p)}}deleteReleasedWidget(e,t){let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=e.page.objectNumber,{pageIndex:a,index:s}=gC(this.runtime,this.session,e),l=this.withAnnotAt(a,s,o=>(this.assertNotAttachedWidget(o,t),gI(n,r,i,e.page,o,s)));if(gx(this.runtime,this.session,o),!n.EPDFPage_RemoveAnnotRaw(i,a,s))throw new N(G.Unknown,`failed to remove annotation: ${e.kind}`);return{meta:yP(this.session.writeStamp(),o,[l])}}withAnnotAt(e,t,n){let r=gM(this.runtime,this.session,e,t);try{return n(r)}finally{this.runtime.fn.FPDFPage_CloseAnnot(r)}}},yb=(e,t)=>null===e||null===t?e===t:K(e)===K(t);function yy(e,t,n){let r=_E(e,t,n);return r?hY(t,16,i=>(FY(t,i,r.box),e.EPDFAnnot_ExportAppearance(n,_g(r.rotation),i))):e.EPDFAnnot_ExportAppearance(n,0,0n)}function yw(e,t,n,r){let i=null;try{return hY(t,8,o=>{Ft(t,o,0),i=e.EPDF_SaveDocumentToOwnedBuffer(n,2,o);let a=Number(t.peek(o,"i32"));if(!i||a<=0)throw new N(G.DocOpenFailed,`failed to save ${r}`);let s=t.readBytes(i,a),l=new ArrayBuffer(s.byteLength);return new Uint8Array(l).set(s),{bytes:l,size:a}})}finally{i&&e.EPDF_FreeBuffer(i)}}var yE=class{constructor(e,t){this.runtime=e,this.session=t}flatten(e,t,n,r){hW(r),this.requireRefs("annotations.flatten",e,t);let{fn:i,mem:o}=this.runtime,a=gx(this.runtime,this.session,e),s=this.session.pagePool(),l=s.acquire(e);try{let r,s,u=this.resolveAll(l,t);try{[r,s]=this.withHandleArray(u,e=>hY(o,4*t.length,r=>{let a=i.EPDFPage_FlattenAnnotations(l,e,t.length,+("print"===n),r),s=[];for(let e=0;e2===e);throw new N(t>=0?G.InvalidArg:G.Unknown,t>=0?`annotations.flatten: ref ${t} is not an annotation of page ${e}`:"native annotation flatten failed after preflight")}let d=t.map((e,t)=>({ref:e,status:0===s[t]?"applied":"unchanged"}));if(1!==r&&!a){let t={affectedPages:[],cacheDelta:null,...this.session.writeStamp()};return{page:q(e),usage:n,results:d,meta:t}}this.session.invalidateDerived();let c={affectedPages:[q(e)],cacheDelta:null,...this.session.writeStamp()};return{page:q(e),usage:n,results:d,meta:c}}finally{s.release(e)}}exportAppearance(e,t,n){hW(n),this.requireRefs("annotations.exportAppearance",e,t);let{fn:r}=this.runtime,i=this.session.pagePool(),o=i.acquire(e),a=null;try{let e=this.resolveAll(o,t);try{a=this.withHandleArray(e,e=>r.EPDFPage_ExportAnnotationsAsDocument(o,e,t.length))}finally{for(let t of e)r.FPDFPage_CloseAnnot(t)}if(!a)throw new N(G.InvalidArg,"annotations.exportAppearance: every ref must be a visible annotation of this page with a normal appearance");return yw(this.runtime.fn,this.runtime.mem,a,"exported appearances")}finally{a&&r.FPDF_CloseDocument(a),i.release(e)}}readAppearance(e,t,n){hW(n);let{fn:r}=this.runtime,i=this.session.pagePool(),o=i.acquire(e),a=null;try{let e=gT(this.runtime,this.session,o,t);try{let t=rN(r.FPDFAnnot_GetSubtype(e));if(ti[t]?.appearance===void 0)throw new N(G.InvalidArg,`a ${t} annotation has no \'appearance\' resource`);a=yy(r,this.runtime.mem,e)}finally{r.FPDFPage_CloseAnnot(e)}if(!a)throw new N(G.InvalidArg,"the annotation has no normal appearance to read");return yw(this.runtime.fn,this.runtime.mem,a,"the appearance")}finally{a&&r.FPDF_CloseDocument(a),i.release(e)}}resolveAll(e,t){let{fn:n}=this.runtime,r=[];try{for(let n of t)r.push(gT(this.runtime,this.session,e,n));return r}catch(e){for(let e of r)n.FPDFPage_CloseAnnot(e);throw e}}withHandleArray(e,t){let{mem:n}=this.runtime,r="wasm"===this.runtime.kind;return hY(n,Math.max(1,e.length*(r?4:8)),i=>(e.forEach((e,t)=>r?n.poke(i,"i32",Number(e),4*t):n.poke(i,"i64",e,8*t)),t(i)))}requireRefs(e,t,n){if(0===n.length)throw new N(G.InvalidArg,`${e} requires at least one ref`);for(let r of n)if(r.page.objectNumber!==t)throw new N(G.InvalidArg,`${e} refs must all target page ${t}; got ref on page ${r.page.objectNumber}`)}};function yA(e,t,n,r){let{fn:i,mem:o}=e,a=r?i.EPDFDoc_ExportDrawing(t,r):yy(i,o,n);if(!a)return null;try{return yw(i,o,a,"a drawing").bytes}finally{i.FPDF_CloseDocument(a)}}function yv(e,t,n){let r=e.fn.FPDFAnnot_GetFileAttachment(t);return r?_N(e,r,n).bytes:null}function yS(e){return N.is(e,G.PayloadTooLarge)}function yk(e,t,n){let{fn:r,mem:i}=e,o=new Set(n.flatMap(e=>rB(e).map(H))),a=t.requireDocPtr();return hY(i,16,e=>t.allRecords().filter(e=>o.has(H(q(e.pageObjectNumber)))).map(t=>{let n=gg(r,i,a,t.pageIndex,e).crop;return{page:q(t.pageObjectNumber),position:t.pageIndex,size:{width:n.right-n.left,height:n.top-n.bottom}}}))}var yx=class{constructor(e,t,n){this.runtime=e,this.kind=t,this.limits=n,hJ(this,"byId",{}),hJ(this,"totalBytes",0)}keep(e){nC(this.kind,this.limits,"resourceBytes",e.byteLength);let{fn:t,mem:n}=this.runtime,r=`sha256-${Db(t,n,new Uint8Array(e))}`;return r in this.byId||(this.byId[r]=e,this.totalBytes+=e.byteLength,nC(this.kind,this.limits,"resources",Object.keys(this.byId).length),nC(this.kind,this.limits,"bundleBytes",this.totalBytes)),r}},yG=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}export(e,t,n){hW(n);let r=this.session.allRecords(),i=new DP(this.runtime,this.session,this.fonts),o=function(e,t,n){let r=new Set(t.map(H)),i=new Map,o=new Map,a=e=>{let t=H(e);if(i.has(t)||!r.has(t))return;let a=n(e);for(let e of(i.set(t,a),a))o.set(K(e.ref),e)},s=e=>(a(e.page),o.get(K(e)));for(let t of e.pages??[])if(!r.has(H(t)))throw new N(G.NotFound,`export: the document has no page ${H(t)}`);let l=!e.refs&&!e.pages,u=(e.include??"threads")==="threads";for(let n of l?t:e.pages??[])a(n);let d=new Set,c=[],f=e=>{if(!e)return;let t=K(e.ref);d.has(t)||(d.add(t),c.push(e))};if(l)for(let e of i.values())e.forEach(f);else{for(let t of e.pages??[])i.get(H(t))?.forEach(f);for(let t of e.refs??[]){let e=s(t);if(!e)throw new N(G.NotFound,`export: the document has no annotation ${K(t)}`);f(e)}}if(u){for(let e of[...c])"popup"===e.subtype&&e.parent&&f(s(e.parent));let e=new Map;for(let t of i.values())for(let n of t){let t=n.reply?s(n.reply.to):void 0;if(!t)continue;let r=K(t.ref);e.set(r,[...e.get(r)??[],n])}for(let t=0;tq(e.pageObjectNumber)),e=>i.listOne(e.objectNumber,n,"annotations").annotations);nC("annotation",t,"items",o.length);let a=new yO(this.runtime,this.session,t),s=gF(this.runtime,this.session),l=o.map(e=>(hW(n),{data:n6(e,s(e.ref.page),s),resources:a.of(e)})),u=yk(this.runtime,this.session,l.map(e=>e.data));nC("annotation",t,"pages",u.length);let d=nN({pages:u,items:l});return nC("annotation",t,"manifestBytes",d),nC("annotation",t,"bundleBytes",d+a.totalBytes),{format:"embedpdf/annotations",version:1,pages:u,items:l,resources:a.byId}}},yO=class extends yx{constructor(e,t,n){super(e,"annotation",n),this.session=t,hJ(this,"drawings",new Map)}of(e){let t=ti[e.subtype];if(!t)return{};let{fn:n}=this.runtime,r=this.rawHandleOf(e);try{let e={};if(t.appearance){let t=this.appearanceOf(r);t&&(e.appearance=t)}if(t.file){let t=this.fileOf(r);t&&(e.file=t)}return e}finally{n.FPDFPage_CloseAnnot(r)}}rawHandleOf(e){return gj(this.runtime,this.session,e.ref)}appearanceOf(e){let t=this.runtime.fn.EPDFAnnot_GetDrawing(e),n=t?this.drawings.get(t):void 0;if(n)return n;let r=yA(this.runtime,this.session.requireDocPtr(),e,t);if(!r)return null;let i=this.keep(r);return t&&this.drawings.set(t,i),i}fileOf(e){let t;try{t=yv(this.runtime,e,this.limits.resourceBytes)}catch(e){if(!yS(e))throw e;throw new N(G.PayloadTooLarge,`the annotation bundle is past its resourceBytes limit: an attached file is larger than ${this.limits.resourceBytes}`,{details:{limit:"resourceBytes",max:this.limits.resourceBytes}})}return t?this.keep(t):null}};function yI(e,t,n,r,i){let o=new Map;for(let[e,r]of Object.entries(n.resources??{})){if(!(r instanceof ArrayBuffer))throw new N(G.InvalidArg,`${t} bundle: resource ${e} is not bytes`);o.set(e,r.byteLength)}i(n,o,r);let{fn:a,mem:s}=e,l=new Map;for(let[e,r]of Object.entries(n.resources??{})){let n=Db(a,s,new Uint8Array(r));if(`sha256-${n}`!==e)throw new N(G.InvalidArg,`${t} bundle: resource ${e} doesn\'t match its id`);l.set(r,n)}return l}var yN=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}import(e,t){var n;hW(t);let{bundle:r,limits:i}=e;this.assertBundle(r,i);let o=function(e){let{bundle:t,target:n,nameTaken:r}=e,i=t.items.map(e=>e.data),o=tP({bundlePages:t.pages,pages:e.pages??"same",target:n,named:i.flatMap(hj)}),a=new Map,s=new Map,l=new Map;i.forEach((e,t)=>{if("unsupported"===e.subtype)return void a.set(t,"unsupported-kind");if("widget"===e.subtype)return void a.set(t,"widget");if("popup"===e.subtype&&null===e.parent)return void a.set(t,"parent-missing");let n=hM(e);if("item"===n)return void a.set(t,"unsupported-value");let r=[...rR(e),...n];r.length>0&&s.set(t,r),l.set(t,hR(e,r,o,{label:`import: item ${t}`,details:{item:t}}))});let u=new Map;i.forEach((e,t)=>{let n=K(e.ref);u.has(n)||u.set(n,t)});let d=e=>H(o(i[e].ref.page)),c=(e,t)=>{let n=u.get(K(e));return void 0!==n&&d(n)===d(t)?n:void 0},f=e=>[e.reply?.to,"popup"===e.subtype?e.parent:null].filter(e=>null!=e);i.forEach((e,t)=>{!a.has(t)&&f(e).some(e=>void 0===c(e,t))&&a.set(t,"parent-missing")});let m=new Map;i.forEach((e,t)=>{if(a.has(t)||"popup"!==e.subtype||!e.parent)return;let n=c(e.parent,t);m.has(n)?a.set(t,"popup-taken"):m.set(n,t)});let p=new Set;i.forEach((e,t)=>{if(a.has(t)||!e.nm)return;let n=o(e.ref.page),i=`${H(n)}\\0${e.nm}`;p.has(i)||r(n,e.nm)?a.set(t,"name-conflict"):p.add(i)});for(let e=!0;e;)e=!1,i.forEach((t,n)=>{!a.has(n)&&f(t).some(e=>a.has(c(e,n)))&&(a.set(n,"parent-dropped"),e=!0)});let h=new Map;i.forEach((e,t)=>{a.has(t)||h.set(t,h.size)});let F=[...h.keys()].map(e=>{let t=i[e],n=t.reply?h.get(c(t.reply.to,e)):void 0,r="popup"===t.subtype&&t.parent?h.get(c(t.parent,e)):void 0;return{item:e,page:o(t.ref.page),draft:l.get(e),...void 0!==n?{replyTo:{planned:n,type:t.reply.type}}:{},...void 0!==r?{parent:r}:{}}}),g=[];return i.forEach((e,t)=>{let n=a.get(t);if(n)g.push({ref:e.ref,reason:n});else for(let n of s.get(t)??[])g.push({ref:e.ref,...n})}),{creates:F,dropped:g}}({bundle:"stamp"===e.attribution?{...n=r,items:n.items.map(({data:{nm:e,...t},...n})=>({...n,data:t}))}:r,...void 0!==e.pages?{pages:e.pages}:{},target:this.session.allRecords().map(e=>({page:q(e.pageObjectNumber),position:e.pageIndex})),nameTaken:(e,t)=>b5(this.runtime,this.session.requireDocPtr(),this.session.resolvePageRef(e).pageIndex,t)>=0}),a=gF(this.runtime,this.session),s=o.creates.map(t=>{let n=r.items[t.item],i={};for(let[e,t]of Object.entries(n.resources))i[e]=r.resources[t];return{page:t.page,draft:n5(t.draft,a(t.page),a),...t.replyTo?{replyTo:{to:{planned:t.replyTo.planned},type:t.replyTo.type}}:{},...void 0!==t.parent?{parent:{planned:t.parent}}:{},resources:i,attribution:function(e,t,n){let{actor:r}=e;if("stamp"===e.attribution){let{groupId:e}=t,n="string"==typeof e?{...r,groupId:e}:r;return{kind:"stamp",...n?{actor:n}:{}}}return{kind:"restore",from:{author:n.author,createdAt:n.createdAt,modifiedAt:n.modifiedAt,userId:n.userId,createdBy:n.createdBy,modifiedBy:n.modifiedBy,groupId:n.groupId??null},...r?.userId?{importedBy:r.userId}:{}}}(e,t.draft,n.data),..."file-attachment"===n.data.subtype&&n.data.file?{fileDates:{createdAt:n.data.file.createdAt,modifiedAt:n.data.file.modifiedAt}}:{},label:`import: item ${t.item}`}});for(let t of s)e.authorizeCreate?.(t.draft);let{created:l,meta:u}=new yh(this.runtime,this.session,this.fonts).create(s,t);return{annotations:l,refMap:o.creates.map((e,t)=>({from:r.items[e.item].data.ref,to:l[t].ref})),dropped:[...o.dropped],meta:u}}assertBundle(e,t){let n=yI(this.runtime,"annotation",e,t,nL),r=this.session.drawingIndex();for(let[e,t]of n)r.hashes.set(e,t);for(let n of e.items){let r=n.resources.appearance;r&&function(e,t,n){let r=nx(n);r&&"width"in r&&nC(e,t,"imagePixels",r.width*r.height)}("annotation",t,e.resources[r])}}};function yC(e,t,n,r){let{fn:i,mem:o}=e;return hY(o,Math.max(4,4*r.length),a=>(r.forEach((e,t)=>o.poke(a,"i32",e,4*t)),yz(e,"annotations",e=>i.EPDFPage_ExportAnnotsRawToOwnedBuffer(t,n,a,r.length,e))))}function yj(e,t,n,r){yU(e,r,i=>{if(!e.fn.EPDFPage_ImportAnnotsRaw(t,n,i,r.byteLength))throw new N(G.Unknown,"EPDFPage_ImportAnnotsRaw refused a capture")})}function yM(e,t,n,r){return yz(e,`object ${n}`,i=>e.fn.EPDFDoc_ExportDictRawToOwnedBuffer(t,n,r.join(" "),i))}function yR(e,t,n,r,i=[]){return yz(e,`object ${n}`,o=>e.fn.EPDFDoc_ExportDictCanonicalToOwnedBuffer(t,n,r.join(" "),i.join(" "),o))}function yT(e,t,n){yU(e,n,r=>{if(!e.fn.EPDFDoc_ImportDictRaw(t,r,n.byteLength))throw new N(G.Unknown,"EPDFDoc_ImportDictRaw refused a capture")})}function yB(e,t,n){return yz(e,`field ${n}`,r=>e.fn.EPDFForm_ExportFieldRawToOwnedBuffer(t,n,r))}function yL(e,t,n){yU(e,n,r=>{if(!e.fn.EPDFForm_ImportFieldRaw(t,r,n.byteLength))throw new N(G.Unknown,"EPDFForm_ImportFieldRaw refused a capture")})}function y$(e,t,n){try{return yz(e,`attachment \'${n}\'`,r=>h5(e.mem,n,n=>e.fn.EPDFAttachment_ExportCanonicalToOwnedBuffer(t,n,r)))}catch(e){if(N.is(e))return null;throw e}}function yz(e,t,n){let{fn:r,mem:i}=e;return hY(i,8,e=>{Ft(i,e,0);let o=n(e);if(!o)throw new N(G.Unknown,`the capture of ${t} failed`);try{return i.readBytes(o,Number(i.peek(e,"i32"))).slice()}finally{r.EPDF_FreeBuffer(o)}})}function yU(e,t,n){let{mem:r}=e;return hY(r,Math.max(1,t.byteLength),e=>(r.writeBytes(e,t),n(e)))}function yV(e,t,n=yW){if(Object.is(e,t))return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;if(Array.isArray(e)||Array.isArray(t))return!!Array.isArray(e)&&!!Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>yV(e,t[n]));let r=yq(e,n),i=yq(t,n);return r.length===i.length&&r.every(n=>i.includes(n)&&yV(e[n],t[n]))}var yW=new Set;function yq(e,t){return Object.entries(e).filter(([e,n])=>void 0!==n&&!t.has(e)).map(([e])=>e)}function yH(e,t){return{item:{type:"skipped",op:t,meta:{affectedPages:[],cacheDelta:null,...e.session.writeStamp()}},reverse:[]}}function yK(e,t,n){if(!n)return;let r=Object.entries(n).filter(([e,n])=>void 0!==n&&!yV(t[e],n)).map(([e])=>e);if(r.length>0)throw new N(G.ChangeConflict,`op ${e} expected other values in ${r.join(", ")}`,{details:{opIndex:e,fields:r}})}function yZ(e,t){if(e.byteLength!==t.byteLength)return!1;for(let n=0;n({...n,after:yR(e,t.requireDocPtr(),n.objectNumber,[])}))}function yX(e,t,n){return n.every(n=>{let r=function(e,t,n){try{return yR(e,t.requireDocPtr(),n,[])}catch(e){if(N.is(e))return null;throw e}}(e,t,n.objectNumber);return null!==r&&yZ(r,n.after)})}function yY(e,t,n){let r=yJ(e,t,n),i=t.requireDocPtr();for(let t of n)t.before&&yT(e,i,t.before);return t.invalidateDerived(),yQ(e,t,r)}function y0(e,t,n){let r=e[t];if(!(n<=r))throw new N(G.PayloadTooLarge,`copy: past the ${t} limit: ${n} > ${r}`,{details:{limit:t,max:r,value:n}})}var y1=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}copy(e,t){var n,r;let i,o,a,s,l,u,d;hW(t);let{refs:c,objectNumbers:f,limits:m}=e;if(f&&f.length!==c.length)throw new N(G.InvalidArg,`copy: objectNumbers names ${f.length} copies of ${c.length}`,{details:{field:"objectNumbers"}});y0(m,"items",c.length),e.page&&this.session.resolvePageRef(e.page);let p=c.map(t=>e.read(t)),h=gF(this.runtime,this.session),F=(n=p.map(e=>n6(e,h(e.ref.page),h)),r={...e.page?{page:e.page}:{},...e.offset?{offset:e.offset}:{}},i=new Map,n.forEach((e,t)=>{if("unsupported"===e.subtype||"widget"===e.subtype)return;let n=hM(e);i.set(t,"item"===n?"item":[...rR(e),...n])}),o=e=>{let t=i.get(e);return void 0===t||"item"===t?[]:t},l=new Set((s=(a=function(e,t,n=()=>!1){let r=new Map;e.forEach((e,t)=>{"unsupported"===e.subtype?r.set(t,"unsupported-kind"):"widget"===e.subtype?r.set(t,"widget"):n(t)&&r.set(t,"unsupported-value")});let i=new Map;e.forEach((e,t)=>{let n=K(e.ref);i.has(n)||i.set(n,t)});let o=n=>t.page??e[n].ref.page,a=(e,t)=>{let n=i.get(K(e));if(!(void 0===n||r.has(n)))return H(o(n))===H(o(t))?n:void 0},s=new Set;e.forEach((e,t)=>{if(r.has(t)||"popup"!==e.subtype)return;let n=e.parent?i.get(K(e.parent)):void 0,o=e.parent?a(e.parent,t):void 0;void 0===o?r.set(t,void 0!==n&&r.has(n)?"parent-dropped":"parent-missing"):s.has(o)?r.set(t,"popup-taken"):s.add(o)});let l=new Map;e.forEach((e,t)=>{r.has(t)||l.set(t,l.size)});let u=t.offset??{x:0,y:0},d=[...l.keys()].map(t=>{let n=e[t],r=n.reply?a(n.reply.to,t):void 0,i="popup"===n.subtype&&n.parent?a(n.parent,t):void 0,{nm:s,groupId:d,reply:c,popup:f,...m}=n;for(let{field:e}of rR(n))delete m[e];return{source:t,page:o(t),data:function(e,t){if(0===t.x&&0===t.y)return e;let n=new Set(["rect","captionCenter",...tw[e.subtype]??[]]),r={...e};for(let i of n)null!=e[i]&&(r[i]=function e(t,n,r){return Array.isArray(t)?t.map(t=>e(t,n,r)):null===t||"object"!=typeof t?t:Object.fromEntries(Object.entries(t).map(([t,i])=>"number"!=typeof i?[t,e(i,n,r)]:[t,i+("left"===t||"right"===t||"x"===t?n:"bottom"===t||"top"===t||"y"===t?r:0)]))}(e[i],t.x,t.y));return r}(m,u),...void 0!==r?{replyTo:{copy:l.get(r),type:n.reply.type}}:{},...void 0!==i?{parent:l.get(i)}:{}}}),c=[];return e.forEach((e,t)=>{let n=r.get(t);n&&c.push({ref:e.ref,reason:n})}),{copies:d,dropped:c}}(n,r,e=>"item"===i.get(e))).copies.map(({data:e,...t})=>({...t,draft:hR(e,o(t.source),e=>e,{label:`copy: annotation ${t.source}`,details:{annotation:t.source}})}))).map(e=>e.source)),u=a.dropped[Symbol.iterator](),d=[],n.forEach((e,t)=>{if(l.has(t))for(let n of o(t))d.push({ref:e.ref,...n});else d.push(u.next().value)}),{creates:s,dropped:d}),g=this.resourceReader(m),_=F.creates.map(n=>{hW(t);let r=p[n.source],i=n5(n.draft,h(n.page),h),o=e.authorizeCreate(i);return{page:n.page,draft:i,...n.replyTo?{replyTo:{to:{planned:n.replyTo.copy},type:n.replyTo.type}}:{},...void 0!==n.parent?{parent:{planned:n.parent}}:{},resources:g(r),...f?{objectNumber:f[n.source]}:{},attribution:{kind:"stamp",...o?{actor:o}:{}},..."file-attachment"===r.subtype&&r.file?{fileDates:{createdAt:r.file.createdAt,modifiedAt:r.file.modifiedAt}}:{},label:`copy: annotation ${n.source}`}}),{created:P,meta:D}=new yh(this.runtime,this.session,this.fonts).create(_,t);return{annotations:P,refMap:F.creates.map((e,t)=>({from:p[e.source].ref,to:P[t].ref})),dropped:[...F.dropped],meta:D}}resourceReader(e){let{fn:t}=this.runtime,n=new Map,r=0,i=0,o=t=>(y0(e,"resourceBytes",t.byteLength),y0(e,"resources",r+=1),y0(e,"bundleBytes",i+=t.byteLength),t);return r=>{let i=ti[r.subtype];if(!i)return{};let a=gj(this.runtime,this.session,r.ref);try{let r={};if(i.appearance){let e=t.EPDFAnnot_GetDrawing(a),i=n.get(e),s=i??yA(this.runtime,this.session.requireDocPtr(),a,e);s&&(r.appearance=i??o(s)),s&&e&&n.set(e,s)}if(i.file){let t=this.fileOf(a,e.resourceBytes);t&&(r.file=o(t))}return r}finally{t.FPDFPage_CloseAnnot(a)}}}fileOf(e,t){try{return yv(this.runtime,e,t)}catch(e){if(!yS(e))throw e;throw new N(G.PayloadTooLarge,`copy: an attached file is larger than ${t} bytes`,{details:{limit:"resourceBytes",max:t}})}}};function y3(e,t,n){let{fn:r,mem:i}=e,o=t.requireDocPtr(),{pageIndex:a}=t.resolvePageRef(n),s=r.EPDFPage_GetAnnotCountRaw(o,a),l=[];for(let e=0;ee?.family===t?[e.ref]:[])}function y6(e,t,n,r){let i;if(0===n.length)throw new N(G.InvalidArg,"a reorder names at least one row",{details:{field:"refs"}});let o=new Map;e.entries.forEach((e,t)=>{e&&o.set(K(e.ref),t)});let a=n_(r);(a?[...n,a]:n).forEach((r,i)=>{let s=a&&i===n.length?"position":"refs";if(r.page.objectNumber!==e.page.objectNumber)throw new N(G.InvalidArg,`${K(r)} is on page ${r.page.objectNumber}; a reorder stays on page ${e.page.objectNumber}`,{details:{field:s}});let l=o.get(K(r)),u=void 0===l?null:e.entries[l];if(u&&u.family!==t)throw new N(G.InvalidArg,"widgets"===u.family?"widgets paint above every annotation and have an order of their own: reorder them with doc.forms.reorderWidgets":"annotations paint below every widget and have an order of their own: reorder them with page.annotations.reorder",{details:{field:s}})});let s=y2(e,t),l=nD(s,n,r,K),u=n.map(e=>o.get(K(e))),d=new Set(u),c=e=>e-u.filter(t=>to.get(K(e))).filter(e=>!d.has(e)),m=Math.min(...u);if("start"===r)i=f.length>0?c(f[0]):m;else if("end"===r)i=f.length>0?c(f.at(-1))+1:m;else{let e=c(o.get(K(a)));i="before"in r?e:e+1}return{stack:e,family:t,before:s,after:l,from:u,to:i}}function y5(e,t,n){let{fn:r,mem:i}=e;if(gx(e,t,n.stack.page.objectNumber),!hY(i,4*n.from.length,e=>(n.from.forEach((t,n)=>i.poke(e,"i32",t,4*n)),r.EPDFPage_MoveAnnotsRaw(t.requireDocPtr(),n.stack.pageIndex,e,n.from.length,n.to))))throw new N(G.Unknown,`the annotations of page ${n.stack.page.objectNumber} could not be reordered`)}function y4(e,t,n,r=n){let i=new Set;for(let e of n)e.page&&i.add(e.page.objectNumber);return{affectedPages:[...i].map(e=>q(e)),cacheDelta:null,...e,changedFields:t,changedWidgets:n,redrawnWidgets:r}}function y8(e,t){return"checkbox"===e||"radio"===e?[]:[...t]}var y7=["AP","FS"];function y9(e,t,n){let r=new Map,i=t.map(t=>{var n;let i;return{ref:t.ref,left:(n=t.ref,(i=r.get(n.page.objectNumber))||(i=wc(e,n.page.objectNumber),r.set(n.page.objectNumber,i)),tG(i,n))}}),o=new Set(i.flatMap(e=>e.left.map(e=>K(e.ref)).filter(t=>t!==K(e.ref))));return i.filter(e=>!o.has(K(e.ref))).reverse().map(e=>({kind:"annotation.remove",ref:e.ref,left:e.left,...n?{rights:n}:{}}))}function we(e){oQ(e,"doc.annotate.modify"),oQ(e,"doc.annotate.import")}function wt(e,t,n){if(!n||n===t.nm)return;let r=e.session.resolvePageRef(t.ref.page);if(b5(e.runtime,e.session.requireDocPtr(),r.pageIndex,n)>=0)throw b4(n,r.pageObjectNumber)}function wn(e,t,n){let{page:r}=t.stack;return{item:wo(e,t.family,r,t.after,n),reverse:[{kind:"annotation.reorder",page:r,family:t.family,refs:n,before:t.before,after:t.after}]}}function wr(e,t){let n=e.findIndex(e=>K(e)===K(t));if(!(n<0))return 0===n?null:K(e[n-1])}function wi(e,t,n){if("widgets"===t)return void oQ(e.authority,"doc.forms.modify");for(let t of o1(n.map(t=>wd(e,t))))oQ(e.authority,t)}function wo(e,t,n,r,i){let o=e.session.writeStamp();return"annotations"===t?{type:"annotations.reorder",page:n,order:r,meta:yP(o,n.objectNumber,i)}:{type:"forms.reorderWidgets",page:n,order:r,meta:y4(o,[],i.map(t=>({ref:t,objectNumber:wm(e,t),page:n})))}}function wa(e,t,n,r,i){var o,a;let s;gx(e.runtime,e.session,t.page.objectNumber);let l=wd(e,t),u="widget"===l.subtype?ir(l.fieldKind,n):n,d=(function(e,t){let n=[];if("open"in t&&("text"===e.subtype&&e.popup&&n.push(e.popup),"popup"===e.subtype&&e.parent&&n.push(e.parent)),"popup"===e.subtype&&"parent"in t){e.parent&&n.push(e.parent);let r=t.parent;r&&n.push(r)}return n})(l,u).map(t=>({objectNumber:wm(e,t),deep:[]})),c=yJ(e.runtime,e.session,[{objectNumber:wm(e,t),deep:y7},...d]),f=wu(e).update(t,u,e.authority,e.signal,i),m=yQ(e.runtime,e.session,c);return{item:ws(e,r,t,f),reverse:[{kind:"objects.revert",reports:r,objects:m,subject:{annotation:t},appearanceChanged:f.appearance.changed,fallback:(o=l,a=f.annotation,{kind:"annotation",restore:Object.fromEntries((s=Object.keys(u).filter(e=>!yV(o[e],a[e]))).map(e=>[e,o[e]])),left:Object.fromEntries(s.map(e=>[e,a[e]]))})}]}}function ws(e,t,n,r){if("annotations.update"===t)return{type:"annotations.update",page:n.page,...r};let i=r.annotation;if("widget"!==i.subtype)throw Error("a widget update read back no widget");let o=eR(wm(e,n),n.page);return{type:"forms.updateWidget",widget:i,appearance:r.appearance,meta:y4(e.session.writeStamp(),i.field?[i.field]:[],[o],r.appearance.changed?[o]:[])}}function wl(e,t,n){let r=t.page.objectNumber;gx(e.runtime,e.session,r);let i=tG(wc(e,r),t),o=new Set(i.map(e=>K(e.ref))),a=i.flatMap(t=>"popup"===t.subtype&&t.parent&&!o.has(K(t.parent))?[{objectNumber:wm(e,t.parent),deep:[]}]:[]),s=yJ(e.runtime,e.session,a),{pageIndex:l}=e.session.resolvePageRef(t.page),u=i.length>0?yC(e.runtime,e.session.requireDocPtr(),l,i.map(t=>gC(e.runtime,e.session,t.ref).index)):new Uint8Array,d=n?{...e.authority,grants:null}:e.authority,c=wu(e).delete(t,d,e.signal);return{item:{type:"annotations.delete",page:t.page,...c},reverse:[{kind:"annotation.restore",page:t.page,members:c.meta.changedRefs,capture:u,unlinked:yQ(e.runtime,e.session,s),...n?{rights:n}:{}}]}}function wu(e){return new yD(e.runtime,e.session,e.fonts)}function wd(e,t){gC(e.runtime,e.session,t);let n=K(t),r=wc(e,t.page.objectNumber).find(e=>K(e.ref)===n);if(!r)throw Error(`annotation ${n} is on its page but reads as none`);return r}function wc(e,t){return new DP(e.runtime,e.session,e.fonts).listOne(t,e.signal).annotations}function wf(e,t){try{return wc(e,e.session.resolvePageRef(t).pageObjectNumber)}catch{return null}}function wm(e,t){if("objectNumber"===t.kind)return t.objectNumber;let{pageIndex:n,index:r}=gC(e.runtime,e.session,t),i=gM(e.runtime,e.session,n,r);try{return e.runtime.fn.EPDFAnnot_GetObjectNumber(i)}finally{e.runtime.fn.FPDFPage_CloseAnnot(i)}}var wp=class{constructor(e,t){this.runtime=e,this.session=t}list(e){hW(e);let{fn:t,mem:n}=this.runtime,r=this.session.requireDocPtr(),i=t.FPDFDoc_GetAttachmentCount(r),o=[];for(let e=0;ee.EPDFDoc_GetAttachmentKey(n,r,t,i))}(t,n,r,e)??"";o.push({..._I(t,n,i),ref:n$(a),index:e})}return o}readFile(e,t,n,r){hW(r);let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr(),s=_G(i,o,a,e);if(s<0)throw new N(G.NotFound,`no embedded file with key \'${e.key}\' in the document`);let l=i.FPDFDoc_GetAttachment(a,s);if(!l)throw new N(G.Unknown,`embedded file with key \'${e.key}\' resolved to index ${s} but could not be opened`);let u=_I(i,o,l);return this.extract(l,u.name,u.mimeType??void 0,t,n)}async readAnnotationFile(e,t,n,r,i,o){hW(i);let{fn:a,mem:s}=this.runtime,l=this.session.pagePool(),u=await l.acquireInSlices(e,i,o),d=null;try{d=gT(this.runtime,this.session,u,t);let e=a.FPDFAnnot_GetFileAttachment(d);if(!e)throw new N(G.InvalidArg,"annotation is not a file attachment or carries no embedded file (/FS)");let i=_I(a,s,e);return this.extract(e,i.name,i.mimeType??void 0,n,r)}finally{null!==d&&a.FPDFPage_CloseAnnot(d),l.release(e)}}extract(e,t,n,r,i){if(void 0!==r){let{size:o}=function(e,t,n,r){let{fn:i,mem:o}=e,a=o.alloc(4),s=o.alloc(4),l=e.fileWrite.toNodeFile(n);try{if(o.poke(a,"i32",0),o.poke(s,"i32",-1),!i.EPDFAttachment_ExtractFile(t,l.ptr,BigInt(r??0),a,s))throw _C(Number(o.peek(s,"i32")),r);return{size:Number(o.peek(a,"i32"))>>>0}}finally{l.close(),o.free(s),o.free(a)}}(this.runtime,e,r,i);return{name:t,...n?{mimeType:n}:{},size:o,path:r}}let{bytes:o,size:a}=_N(this.runtime,e,i);return{name:t,...n?{mimeType:n}:{},size:a,bytes:o}}},wh=class{constructor(e,t){this.runtime=e,this.session=t}create(e,t,n){let r;hW(n);let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr();if(!t)throw new N(G.InvalidArg,"an attachments.create op needs its bytes as its file resource",{details:{field:"resources.file"}});if(0===e.name.length)throw new N(G.InvalidArg,"attachment file requires a name");if(-1!==_G(i,o,a,{kind:"key",key:e.name}))throw new N(G.InvalidArg,`an embedded file with key \'${e.name}\' already exists \\u2014 keys are unique; rename and retry`);hW(n);let s=o.writeU16String(e.name);try{r=i.FPDFDoc_AddAttachment(a,s)}finally{o.free(s)}if(!r)throw new N(G.Unknown,"FPDFDoc_AddAttachment returned NULL");_O(i,o,r,a,e,{bytes:t,...void 0!==e.mimeType?{mimeType:e.mimeType}:{},name:e.name});let l=n$(e.name),u=this.find(l);if(!u)throw new N(G.Unknown,"created attachment did not resolve by key after the write");return{attachment:u,meta:this.meta(l)}}find(e){let{fn:t,mem:n}=this.runtime,r=this.session.requireDocPtr(),i=_G(t,n,r,e),o=i<0?null:t.FPDFDoc_GetAttachment(r,i);return o?{..._I(t,n,o),ref:e,index:i}:null}meta(e){return{affectedPages:[],cacheDelta:null,...this.session.writeStamp(),changedRefs:[e]}}delete(e,t){hW(t);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=_G(n,r,i,e);if(o<0)throw new N(G.NotFound,`no embedded file with key \'${e.key}\' in the document`);if(!n.FPDFDoc_DeleteAttachment(i,o))throw new N(G.Unknown,"FPDFDoc_DeleteAttachment returned false");return{meta:this.meta(e)}}},wF=e=>new wh(e.runtime,e.session);function wg(e,t){var n,r,i;let o=wF(e);if(!o.find(t))throw new N(G.NotFound,`no embedded file with key \'${t.key}\' in the document`,{details:{field:"ref"}});let a=(n=e.runtime,r=e.session.requireDocPtr(),i=t.key,yz(n,`attachment \'${i}\'`,e=>h5(n.mem,i,t=>n.fn.EPDFAttachment_ExportRawToOwnedBuffer(r,t,e))));return{item:{type:"attachments.delete",...o.delete(t,e.signal)},reverse:[{kind:"attachments.restore",ref:t,capture:a}]}}function w_(e,t){let n=y$(e.runtime,e.session.requireDocPtr(),t.key);if(!n)throw new N(G.Unknown,`attachment \'${t.key}\' is not there to guard`);return{kind:"attachments.remove",ref:t,left:n}}function wP(e,t,n){let{fn:r}=e;if("objectNumber"===n.kind){let e=r.EPDFForm_GetFieldIndexByObjNum(t,n.objectNumber);if(e<0)throw new N(G.NotFound,`form field not found: object ${n.objectNumber}`);return{fieldIndex:e,fieldObjectNumber:n.objectNumber}}let i=r.EPDFForm_CountFields(t);for(let o=0;or.EPDFForm_GetFieldName(t,o,e,n))??"")===n.name)return{fieldIndex:o,fieldObjectNumber:r.EPDFForm_GetFieldObjNum(t,o)};throw new N(G.NotFound,`form field not found: "${n.name}"`)}function wD(e){return"objectNumber"===e.ref.kind?e.ref.objectNumber:0}var wb={0:"whole-revision",1:"partial",2:"malformed"},wy={1:"all",2:"include",3:"exclude"};function ww(e,t){return h3(e.mem,t,"")}function wE(e){return 1===e||2===e||3===e}function wA(e,t,n){let{fn:r,mem:i}=e;return hY(i,32,e=>{for(let t=0;t<4;t++)Ft(i,e,0,8*t);return r.EPDFSig_GetByteRange(t,n,e)?[Fn(i,e,0),Fn(i,e,8),Fn(i,e,16),Fn(i,e,24)]:null})}function wv(e,t,n,r){let{fn:i}=e,o=wy[1===r?i.EPDFSig_GetLockAction(t,n):i.EPDFSig_GetFieldMDPAction(t,n)];if(!o)return null;let a=[],s=i.EPDFSig_GetFieldNameCount(t,n,r);for(let o=0;oi.EPDFSig_GetFieldNameAt(t,n,r,o,e,a))??"");let l={action:o,fields:a};if(1===r){let e=i.EPDFSig_GetLockPermission(t,n);wE(e)&&(l.permission=e)}return l}function wS(e,t){let{fn:n}=e,r=n.EPDFSig_Count(t),i=[],o=(r,i)=>ww(e,(e,o)=>n.EPDFSig_GetString(t,r,i,e,o));for(let s=0;sn.EPDFSig_GetFieldName(t,s,e,r))??"",widget:l>0?eR(l,Dl(n.EPDFSig_GetWidgetPageObjNum(t,s))):null,signed:r,kind:1===n.EPDFSig_GetKind(t,s)?"timestamp":"signature",filter:o(s,0),subFilter:o(s,1),byteRange:r?wA(e,t,s):null,contentsSizeBytes:r?Math.max(0,n.EPDFSig_GetContents(t,s,0n,0)):0,coverage:r?wb[n.EPDFSig_GetCoverage(t,s)]??"malformed":null,revisionIndex:r&&u>=0?u:null,signer:{name:o(s,2),reason:o(s,3),location:o(s,4),contactInfo:o(s,5),signedAt:(a=o(s,6))?hq(a):null},docMdp:wE(d)?d:null,catalogCertification:n.EPDFSig_IsCatalogCertification(t,s),fieldMdp:wv(e,t,s,0),lock:wv(e,t,s,1),seedValue:function(e,t,n){let{fn:r}=e;if(!r.EPDFSig_HasSeedValue(t,n))return null;let i=r.EPDFSig_GetSeedValueRequiredFlags(t,n)>>>0,o=r.EPDFSig_GetSeedValuePresentFlags(t,n)>>>0,a=r.EPDFSig_GetSeedValueVersion(t,n),s=r.EPDFSig_GetSeedValueMDP(t,n),l=i=>{let o=r.EPDFSig_GetSeedValueListCount(t,n,i),a=[];for(let s=0;sr.EPDFSig_GetSeedValueListAt(t,n,i,s,e,o))??"");return a};return{parserVersion:a>0?a:null,parserVersionRequired:(4&i)!=0,mdp:(131072&o)!=0&&s>=0&&s<=3?s:null,filter:ww(e,(e,i)=>r.EPDFSig_GetSeedValueFilter(t,n,e,i)),filterRequired:(1&i)!=0,subFilters:l(0),subFiltersRequired:(2&i)!=0,digestMethods:l(1),digestMethodsRequired:(64&i)!=0,reasons:l(2),reasonsRequired:(8&i)!=0,unsupportedRequired:(432&i)!=0||(4&i)!=0&&a>2}}(e,t,s)})}return i}function wk(e,t,n){let{fn:r,mem:i}=e,o=r.EPDFSig_GetContents(t,n,0n,0);if(o<=0)throw new N(G.NotFound,"signature has no usable /Contents (malformed encoding)");return hY(i,o,e=>{if(r.EPDFSig_GetContents(t,n,e,o)!==o)throw new N(G.Unknown,"failed to read signature contents");let a=new Uint8Array(o);return a.set(i.readBytes(e,o)),a})}function wx(e,t,n){let{fn:r,mem:i}=e,o=r.EPDFDoc_GetRevisionCount(t),a=[];return o<=0||h0(i,[8,8],([e,s])=>{for(let l=0;le.revisionIndex===l);a.push({index:l,end:Fn(i,e),xrefOffset:Fn(i,s),signatureIndex:o?o.index:null})}}),a}function wG(e,t,n){let r=e.fn.EPDFSig_LoadModel(t);if(0n===r)throw new N(G.Unknown,"failed to build signature model");try{return n(r)}finally{e.fn.EPDFSig_CloseModel(r)}}function wO(e,t){let{fn:n,mem:r}=e,[i,o,a]=h0(r,[4,4,4],([e,i,o])=>(r.poke(e,"i32",0),r.poke(i,"i32",0),r.poke(o,"i32",0),n.EPDFDoc_GetStructureObjectNumbers(t,e,i,o),[Number(r.peek(e,"i32"))>>>0,Number(r.peek(i,"i32"))>>>0,Number(r.peek(o,"i32"))>>>0])),s=[],l=n.FPDF_GetPageCount(t);for(let e=0;e{u.push({objectNumber:wD(e),name:e.name,kind:e.kind,widgets:e.widgets.map(e=>e.objectNumber),flags:n.EPDFForm_GetFieldFlags(d,t)})})}finally{n.EPDFForm_CloseModel(d)}return{root:i,acroForm:o,pagesRoot:a,pages:s,fields:u,signatures:wG(e,t,t=>wS(e,t))}}var wI=new WeakMap;function wN(e,t){let n=t.cacheSeq(),r=wI.get(t);if(r&&r.seq===n)return r.ptr;r&&(e.fn.EPDFSig_CloseModel(r.ptr),wI.delete(t));let i=e.fn.EPDFSig_LoadModel(t.requireDocPtr());if(0n===i)throw new N(G.Unknown,"failed to build signature model");return wI.set(t,{seq:n,ptr:i}),i}function wC(e,t){let n=wI.get(t);n&&(e.fn.EPDFSig_CloseModel(n.ptr),wI.delete(t))}var wj={sha1:0,sha256:1,sha384:2,sha512:3},wM={sha1:20,sha256:32,sha384:48,sha512:64},wR=class{constructor(e,t){this.runtime=e,this.session=t}readSnapshot(){let e=wN(this.runtime,this.session),t=this.runtime.fn.EPDFSig_IsRevisionChainValid(e),n=wS(this.runtime,e);return{chainValid:t,revisions:t?wx(this.runtime,this.session.requireDocPtr(),n):[],signatures:n,protection:iM(n)}}readProtection(){let e=wN(this.runtime,this.session);return iM(wS(this.runtime,e))}readContents(e){let t=wN(this.runtime,this.session),n=this.requireSignedIndex(t,e);return wk(this.runtime,t,n).buffer}digest(e,t){let n=wN(this.runtime,this.session),r=this.requireSignedIndex(n,e),i=wA(this.runtime,n,r);if(!i)throw new N(G.NotFound,"signature has no usable /ByteRange");return this.digestRange(i,t)}revisionBytes(e){let t=this.readSnapshot();if(!t.chainValid)throw new N(G.MalformedPdf,"revision chain is not valid");let n=t.revisions[e];if(!n)throw new N(G.NotFound,`no revision ${e}`);return this.readLoadedBytes(0,n.end)}resolveField(e){let{fn:t}=this.runtime,n=wN(this.runtime,this.session),r=this.indexOf(n,e);if(r<0)throw new N(G.NotFound,"objectNumber"===e.kind?`signature field not found: object ${e.objectNumber}`:`signature field not found: "${e.name}"`);let i=t.EPDFSig_GetWidgetObjNum(n,r);return{index:r,fieldObjectNumber:t.EPDFSig_GetFieldObjNum(n,r),signed:t.EPDFSig_IsSigned(n,r),widget:i>0?eR(i,Dl(t.EPDFSig_GetWidgetPageObjNum(n,r))):null,lock:wv(this.runtime,n,r,1)}}readSignatureByObjectNumber(e){let t=this.readSnapshot().signatures.find(t=>"objectNumber"===t.field.kind&&t.field.objectNumber===e);if(!t)throw new N(G.NotFound,`signature field not found: object ${e}`);return t}loadedBytes(){let e=Number(this.runtime.fn.EPDFDoc_GetLoadedBytesSize(this.session.requireDocPtr()));return this.readLoadedBytes(0,e)}version(){let{fn:e,mem:t}=this.runtime,n=this.session.requireDocPtr(),r=Number(e.EPDFDoc_GetBaseBytesSize(n));if(r<=0)throw new N(G.DocNotOpen,"document has no loaded bytes");if("layer"===this.session.kind)return{sha256:hY(t,32,r=>{if(!e.EPDFLayer_GetBaseSha256(n,r))throw new N(G.Unknown,"failed to read the base hash");return wB(t.readBytes(r,32))}),sizeBytes:r};let i=this.session.cachedPlainSha256();if(i)return{sha256:i,sizeBytes:r};let o=wB(new Uint8Array(this.digestRange([0,r,r,0],"sha256")));return this.session.rememberPlainSha256(o),{sha256:o,sizeBytes:r}}digestRange(e,t){let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=wM[t];return h0(r,[32,o,8],([a,s,l])=>{for(let t=0;t<4;t++)Ft(r,a,e[t],8*t);if(Ft(r,l,o),!n.EPDFSig_DigestByteRange(i,a,wj[t],s,l))throw new N(G.InvalidArg,"byte range is not within the loaded bytes");let u=Number(r.peek(l,"i32"));return wT(r.readBytes(s,u))})}readLoadedBytes(e,t){let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr();return 0===t?new ArrayBuffer(0):hY(r,t,o=>{if(n.EPDFDoc_ReadLoadedBytes(i,BigInt(e),o,t)!==t)throw new N(G.Unknown,"failed to read the loaded bytes");return wT(r.readBytes(o,t))})}indexOf(e,t){let{fn:n}=this.runtime;if("objectNumber"===t.kind)return n.EPDFSig_GetIndexByFieldObjNum(e,t.objectNumber);let r=n.EPDFSig_Count(e);for(let i=0;in.EPDFSig_GetFieldName(e,i,t,r))===t.name)return i;return -1}requireSignedIndex(e,t){let{fn:n}=this.runtime,r=this.indexOf(e,t);if(r<0)throw new N(G.NotFound,"objectNumber"===t.kind?`signature field not found: object ${t.objectNumber}`:`signature field not found: "${t.name}"`);if(!n.EPDFSig_IsSigned(e,r))throw new N(G.NotFound,"signature field is not signed");return r}readString(e,t,n){return this.readWide((r,i)=>this.runtime.fn.EPDFSig_GetString(e,t,n,r,i))}readWide(e){return h3(this.runtime.mem,e,"")}};function wT(e){let t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(e),t}function wB(e){let t="";for(let n of e)t+=n.toString(16).padStart(2,"0");return t}var wL=new WeakMap;function w$(e,t){let n=t.cacheSeq(),r=wL.get(t);if(r&&r.seq===n)return r.locks;let i=null;try{let n=new wR(e,t).readProtection();n.fieldLocks.length>0&&(i=e=>(function(e,t){for(let n of e.fieldLocks)if(ij(n.spec,t))return n;return null})(n,e))}catch{i=null}return wL.set(t,{seq:n,locks:i}),i}function wz(e,t){return"protect"!==t.signedDocumentPolicy?null:w$(e,t)}function wU(e,t,n,r){let{fn:i,mem:o}=e,a=[],s=new Set;for(let l of n){if(!l.ref||s.has(l.objectNumber))continue;s.add(l.objectNumber);let n=function(e,t,n){try{return gC(e,t,n.ref)}catch(e){if(N.is(e)&&e.code===G.NotFound)return null;throw e}}(e,t,l);if(!n)continue;let u=gM(e,t,n.pageIndex,n.index);try{let e=b8(i,o,u,l.ref.page.objectNumber,n.index,gJ(t,r));"widget"===e.subtype&&a.push(e)}finally{i.FPDFPage_CloseAnnot(u)}}return Dd(e,t,a),a}function wV(e,t,n,r){return{...n,widgets:wU(e,t,n.meta.changedWidgets,r)}}var wW=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}snapshot(e){return hW(e),function(e,t,n,r){let{formKind:i,needsAppearances:o,fields:a,calculationOrder:s}=Do(e,gv(e,t),t.requireDocPtr(),w$(e,t));return{formKind:i,needsAppearances:o,fields:a,widgets:function(e,t,n,r){let{fn:i}=e,o=t.requireDocPtr(),a=[],s=i.FPDF_GetPageCount(o);for(let l=0;li.EPDFPage_GetAnnotRaw(o,l,e),signal:n,family:"widgets",...r?{fonts:r}:{}});a.push(...d)}return a}(e,t,n,r),calculationOrder:s}}(this.runtime,this.session,e,this.fonts)}field(e,t){hW(t);let n=gv(this.runtime,this.session),{fieldIndex:r}=wP(this.runtime,n,e);return Di(this.runtime,n,r,this.session.requireDocPtr(),w$(this.runtime,this.session))}};function wq(e,t,n,r,i,o){let{fn:a,mem:s}=e,l=a.EPDFPage_CreateAnnotRaw(t,n,20,i??0);if(0n===l&&void 0!==i)throw Ff(i,"taken");if(0n===l)throw new N(G.Unknown,"failed to create widget annotation");try{DG(a,s,l,"NM",iY());let{page:n,rect:i,rotation:u,exportValue:d,actions:c,...f}=r;Dx(a,s,l,i),u&&b1(a,l,u),Object.keys(f).length>0&&b0(a,s,l,f,o),c&&PM(e,t,l,c);let m=a.EPDFAnnot_GetObjectNumber(l);if(m<=0)throw new N(G.Unknown,"widget annotation has no object number");return m}finally{a.FPDFPage_CloseAnnot(l)}}function wH(e,t,n,r){if(!n.ref)return;let i=gj(e,t,n.ref);try{Dk(e.fn,i,r)}finally{e.fn.FPDFPage_CloseAnnot(i)}}function wK(e,t){let{fn:n}=e,r=[],i=n.EPDFForm_CountCalculationOrder(t);for(let e=0;e0&&!r.includes(o)&&r.push(o)}return r}function wZ(e,t,n){let{fn:r,mem:i}=e;if(!h1(i,n,(e,n)=>r.EPDFForm_SetCalculationOrder(t,e,n)))throw new N(G.InvalidArg,"the calculation order could not be written")}function wJ(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function wQ(e,t){let n=e.indexOf(t);if(!(n<0))return 0===n?null:e[n-1]}function wX(e,t,n,r,i=!1,o="appearance"){let a=i?{mimeType:"application/pdf"}:nx(n);if(!a)throw new N(G.InvalidArg,`the ${o} resource must be PNG, JPEG or one-page PDF bytes`);if("application/pdf"!==a.mimeType)return a;let s=DE(e,t,n);if(null===s)throw new N(G.MalformedPdf,`the ${o} PDF could not be opened`);if(1!==s)throw new N(G.InvalidArg,`the ${o} PDF has ${s} pages; ${r} takes a one-page PDF`);return a}function wY(e){return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.slice().buffer}var w0={readOnly:1,required:2,noExport:4,multiline:4096,password:8192,noToggleToOff:16384,edit:262144,multiSelect:2097152,comb:0x1000000,radiosInUnison:0x2000000};function w1(e){let t=0,n=0;for(let[r,i]of Object.entries(w0)){let o=e[r];!0===o?t|=i:!1===o&&(n|=i)}return{setBits:t,clearBits:n}}function w3(e,t,n,r,i){let{mem:o,fn:a}=e,s=wY(i.bytes),l=wX(a,o,s,"a signature appearance",i.declaredPdf);w2(e,t,r,e=>{let r=Dy(a,o,t,n,s,l);if(!a.EPDFAnnot_SetDrawing(e,r,0))throw new N(G.InvalidArg,"the appearance page could not be drawn into the widget")})}function w2(e,t,n,r){let{fn:i}=e,o=new h8;try{let e=n.page?i.EPDFDoc_LoadPageByObjectNumber(t,n.page.objectNumber):0n;if(!e)throw new N(G.NotFound,"the widget page could not be loaded");o.push(()=>i.FPDF_ClosePage(e));let a=i.EPDFPage_GetAnnotByObjectNumber(e,n.objectNumber);if(!a)throw new N(G.NotFound,"the signature widget could not be loaded");o.push(()=>i.FPDFPage_CloseAnnot(a)),r(a)}finally{o.close()}}var w6={keystroke:0,format:1,validate:2,calculate:3};function w5(e,t,n,r,i){for(let o of Object.keys(w6)){let a=i[o];if(void 0===a)continue;if(null!==a&&!V(a))throw new N(G.InvalidArg,`a field\'s ${o} event takes JavaScript only`,{details:{field:`actions.${o}`}});let s=r?.[o];if(null===a?!s:void 0!==s&&function(e,t){if(e.incomplete||!e.root)return!1;let n=(e,t)=>{if(!e||"javascript"!==e.type||e.script!==t.script)return!1;let r=t.next??[];return e.next.length===r.length&&e.next.every((e,t)=>n(e,r[t]))};return n(e.root,t)}(s,a))continue;let l=null===a?0n:PC(e,t,a);if(!e.fn.EPDFForm_SetFieldEventAction(t,n,w6[o],l))throw new N(G.Unknown,`the field\'s ${o} script could not be written`)}}var w4={none:0,scalar:1,array:2};function w8(e,t,n,r,i){let{fn:o}=e;if("unsupported"===r.kind)return!1;let a="scalar"===r.kind?[r.value]:"array"===r.kind?r.values:[],s="value"===i?o.EPDFForm_SetFieldValue:o.EPDFForm_SetFieldDefaultValue;return gf(e,a,(e,i)=>s(t,n,w4[r.kind],e,i))}var w7={pushbutton:1,checkbox:2,radio:3,text:4,combobox:5,listbox:6,signature:7},w9={visible:0,hidden:1,noPrint:2,noView:3},Ee=new Set(["text","checkbox","radio","combobox","listbox"]),Et=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}setValue(e,t,n){hW(n);let r=gv(this.runtime,this.session),i=wP(this.runtime,r,e);this.assertWritable(i);let o=this.session.requireDocPtr(),a=Di(this.runtime,r,i.fieldIndex,o,w$(this.runtime,this.session)),s=function(e,t){let{field:n}=e,r=r4(n,t);switch(r.kind){case"text":{if("text"!==n.kind)return e;let t=function(e,t){if(!t)return e;let n=Array.from(e);return n.length>t?n.slice(0,t).join(""):e}(r.value,n.maxLength);if(t===n.value)return e;return il({...n,value:t,valueEntry:{kind:"scalar",value:t}},e)}case"toggle":{if("checkbox"!==n.kind&&"radio"!==n.kind)return e;let t=n.widgets.findIndex(e=>e.onState===r.state);return iu(e,null===r.state?-1:t)}case"choice":if("combobox"!==n.kind&&"listbox"!==n.kind)return e;return il(im(n,r.values),e)}}({field:a,widgets:[]},t).field,l=this.writeFieldAfter(i.fieldObjectNumber,a,s);return this.readBack(i.fieldObjectNumber,l??[])}setDisplay(e,t,n){hW(n);let r=wP(this.runtime,gv(this.runtime,this.session),e);this.assertWritable(r);let i=this.session.requireDocPtr(),o=this.withChangedWidgets((e,n,o)=>this.runtime.fn.EPDFForm_SetFieldDisplay(i,r.fieldObjectNumber,w9[t],e,n,o));if(null===o)throw new N(G.Unknown,"the field could not be shown or hidden");return this.readBack(r.fieldObjectNumber,o,!1)}setAppearanceText(e,t,n){hW(n);let r=gv(this.runtime,this.session),i=wP(this.runtime,r,e);this.assertWritable(i);let o=this.session.requireDocPtr(),a=Di(this.runtime,r,i.fieldIndex,o,w$(this.runtime,this.session));if("text"!==a.kind&&"combobox"!==a.kind)throw new N(G.InvalidArg,`appearance text does not apply to a ${a.kind} field`);let s=h5(this.runtime.mem,t,e=>this.withChangedWidgets((t,n,r)=>this.runtime.fn.EPDFForm_SetFieldAppearanceText(o,i.fieldObjectNumber,e,t,n,r)));if(null===s)throw new N(G.Unknown,"the appearance text could not be drawn");return this.readBack(i.fieldObjectNumber,s,!0)}emptyMeta(){return{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}reset(e,t){hW(t);let n=gv(this.runtime,this.session),r=void 0===e?this.wholeFormTargets(n):this.namedTargets(n,e);hW(t);let i=r.filter(e=>!function(e){if("unsupported"===e.valueEntry.kind||!r7(e.valueEntry,e.defaultValueEntry))return!1;if("checkbox"!==e.kind&&"radio"!==e.kind)return!0;let t=e.defaultValueEntry,n="scalar"===t.kind?t.value:null;return e.widgets.every(e=>e.checked===(e.onState===n))}(e)).flatMap(e=>{let t=function(e){let{field:t}=e,n=t.defaultValueEntry;switch(t.kind){case"text":{if("array"===n.kind||"unsupported"===n.kind)throw iw(t);let r="scalar"===n.kind?n.value:"",i="scalar"===n.kind?n:{kind:"none"};return il({...t,value:r,valueEntry:i},e)}case"checkbox":case"radio":{var r,i;let o;if("array"===n.kind||"unsupported"===n.kind)throw iw(t);let a="scalar"===n.kind?n.value:null;if(null===a||"Off"===a)return iu(e,-1);let s=(r=t.widgets,i=a,(o=r.findIndex(e=>e.onState===i))>=0||!/^\\d+$/.test(i)?o:Number(i)0&&this.session.invalidateDerived();let o=[],a=[],s=[];for(let{before:e,changed:t}of i){let n=this.readBackField(wD(e));if(0===t.length&&r7(e.valueEntry,n.valueEntry))continue;o.push(n);let r=new Set(t),i=n.widgets.filter(e=>r.has(e.objectNumber)).map(e=>eR(e.objectNumber,e.page));a.push(...i),s.push(...y8(n.kind,i))}return{fields:o,meta:y4(this.session.writeStamp(),o.map(e=>e.ref),a,s)}}wholeFormTargets(e){let t=this.session.requireDocPtr(),n=wz(this.runtime,this.session),r=[],i=this.runtime.fn.EPDFForm_CountFields(e);for(let o=0;o{if(!n.EPDFForm_Repair(this.session.requireDocPtr(),i,e))throw new N(G.Unknown,"form repair failed");return{acroformCreated:0!==Number(r.peek(e,"i32",0)),fieldsLinked:Number(r.peek(e,"i32",4)),widgetsLinked:Number(r.peek(e,"i32",8)),fieldsUnrepairable:Number(r.peek(e,"i32",12)),appearancesBaked:Number(r.peek(e,"i32",16)),needsAppearancesCleared:0!==Number(r.peek(e,"i32",20))}});return this.session.invalidateDerived(),{...o,meta:this.emptyMeta()}}createField(e,t,n,r={}){let{objectNumber:i,calculationOrder:o}=this.writeField(e,t,n,r);return{field:this.readBackField(i),calculationOrder:o}}writeField(e,t,n,r={}){hW(t);let{fn:i}=this.runtime,o=this.session.requireDocPtr(),a=(e.widgets??[]).map(t=>ot(ir(e.kind,t))),s=a.map(e=>this.preflightPlacement(e)),l=a.map(t=>Ei(e.kind,t));io(e);let u=ee(e),d=rj(e.purpose),c=eC(e.placeholder),f=ex(e,e.kind)??null,m=rK(e,e.kind);if(void 0!==m){for(let e of a)for(let t of rU)if(e.actions?.[t]!==void 0)throw new N(G.InvalidArg,`\'takesImage\' writes each widget\'s press: name it or a widget\'s actions.${t}, not both`,{details:{field:"takesImage"}});if(m&&0===a.length)throw rX()}if("maxLength"in e&&void 0!==e.maxLength&&(!Number.isInteger(e.maxLength)||e.maxLength<=0))throw new N(G.InvalidArg,`maxLength must be a positive integer, got ${e.maxLength}`,{details:{field:"maxLength"}});let{objectNumber:p,widgetObjectNumbers:h}=r;if(h&&h.length!==a.length)throw new N(G.InvalidArg,`forms.create needs one widget object number per widget: ${h.length} for ${a.length}`,{details:{field:"widgetObjectNumbers"}});for(let e of(void 0!==p&&this.session.claimObjectNumber(p),h??[]))this.session.claimObjectNumber(e);hW(t);let F=this.createFieldNode(e,p);this.configureNewField(e,F),f&&w5(this.runtime,o,F,void 0,eA(f)),function(e,t,n,r,i=new Date){r.userId&&P2(e,t,n,[[PZ,r.userId],[PJ,hH(i)]])}(this.runtime,o,F,n),"group"===u.kind&&P2(this.runtime,o,F,[[PW,u.groupId]]),"anyone"===u.kind&&P3(this.runtime,o,F,!0),null!==d&&P2(this.runtime,o,F,[[PH,d]]),null!==c&&P2(this.runtime,o,F,[[PK,c]]);let g=a.map((e,t)=>{let n=wq(this.runtime,o,s[t],m?{...e,actions:rH(e.actions)}:e,h?.[t],yp(this.runtime,this.session,this.fonts));if(!i.EPDFForm_AttachWidget(o,F,n,l[t],0n,0))throw new N(G.Unknown,"widget adoption failed");return eR(n,e.page)}),_=this.followCalculateScript(F,e.actions?.calculate);return this.session.invalidateDerived(),{objectNumber:F,widgets:g,calculationOrder:_}}nativeDeleteField(e){let{fn:t,mem:n}=this.runtime;return h0(n,[1024,8],([r,i])=>(Ft(n,i,0),t.EPDFForm_DeleteField(this.session.requireDocPtr(),e,r,256,i)))}preflightPlacement(e){let t=this.session.resolvePageRef(e.page),{left:n,bottom:r,right:i,top:o}=e.rect;if(![n,r,i,o].every(Number.isFinite))throw new N(G.InvalidArg,"widget rect must be finite numbers",{details:{field:"rect"}});return t.pageIndex}createFieldNode(e,t){let n,{fn:r,mem:i}=this.runtime,o=i.writeU16String(e.name);try{n=r.EPDFForm_CreateField(this.session.requireDocPtr(),w7[e.kind],o,t??0)}finally{i.free(o)}if(n<=0)throw new N(G.InvalidArg,`cannot create field "${e.name}" (name conflict or invalid)`);return n}configureNewField(e,t){let{fn:n}=this.runtime,r=this.session.requireDocPtr(),{setBits:i,clearBits:o}=w1(e);if((0!==i||0!==o)&&n.EPDFForm_SetFieldFlags(r,t,i,o),"options"in e&&e.options&&this.applyOptions(t,e.options),this.writeDefault(t,{kind:"none"},io(e)),"maxLength"in e&&void 0!==e.maxLength&&!n.EPDFForm_SetFieldMaxLen(r,t,e.maxLength))throw new N(G.InvalidArg,"maxLength rejected");void 0!==e.alternateName&&this.applyWideSetter(n.EPDFForm_SetFieldAlternateName,t,e.alternateName,"alternate name rejected"),void 0!==e.mappingName&&this.applyWideSetter(n.EPDFForm_SetFieldMappingName,t,e.mappingName,"mapping name rejected"),e.actions&&w5(this.runtime,r,t,void 0,e.actions)}setSignatureAppearance(e,t,n){hW(n);let r=this.session.requireDocPtr(),i=gv(this.runtime,this.session),o=wP(this.runtime,i,e);this.assertWritable(o);let a=Di(this.runtime,i,o.fieldIndex,r,w$(this.runtime,this.session));if("signature"!==a.kind)throw new N(G.InvalidArg,`\'${a.name}\' is a ${a.kind} field, not a signature field`);if(wG(this.runtime,r,e=>wS(this.runtime,e).some(e=>e.signed&&"objectNumber"===e.field.kind&&e.field.objectNumber===o.fieldObjectNumber)))throw new N(G.ProtectedDocument,`\'${a.name}\' is signed; its appearance is sealed with the signature`);if(0===a.widgets.length)throw new N(G.InvalidArg,`\'${a.name}\' has no widget to draw into`);let s=this.session.drawingIndex();for(let e of a.widgets)null===t?function(e,t,n){let{fn:r}=e;w2(e,t,n,e=>{if(0!==r.EPDFAnnot_GetDrawing(e)&&!r.EPDFAnnot_GenerateFormFieldAP(e))throw new N(G.Unknown,"the signature field\'s box could not be drawn into the widget")})}(this.runtime,r,e):w3(this.runtime,r,s,e,t);return this.session.invalidateDerived(),{field:this.readBackField(o.fieldObjectNumber)}}setButtonImage(e,t,n){hW(n);let{fn:r,mem:i}=this.runtime,o=this.session.requireDocPtr(),a=gv(this.runtime,this.session),s=wP(this.runtime,a,e);this.assertWritable(s);let l=Di(this.runtime,a,s.fieldIndex,o,w$(this.runtime,this.session));if("pushbutton"!==l.kind)throw new N(G.InvalidArg,`\'${l.name}\' is a ${l.kind} field, not a push button`);let u=l.widgets.filter(e=>null!==e.ref);if(null!==t&&0===u.length)throw new N(G.InvalidArg,`\'${l.name}\' has no widget to show an image in`);let d=0;if(null!==t){let e=wY(t),n=wX(r,i,e,"a push button\'s image",!1,"image");d=Dy(r,i,o,this.session.drawingIndex(),e,n)}for(let e of(hW(n),u))PU(this.runtime,this.session,e.ref,d);return this.session.invalidateDerived(),{field:this.readBackField(s.fieldObjectNumber)}}updateField(e,t,n){hW(n);let{fn:r}=this.runtime,i=this.session.requireDocPtr(),o=gv(this.runtime,this.session),a=wP(this.runtime,o,e);this.assertWritable(a);let s=Di(this.runtime,o,a.fieldIndex,this.session.requireDocPtr(),w$(this.runtime,this.session));var l=t,u=s.kind;if(void 0!==l.kind&&l.kind!==u)throw new N(G.InvalidArg,`patch family \'${l.kind}\' does not match field family \'${u}\'`,{details:{field:"kind"}});let d=new Set([...En,...Er[u]??[]]);for(let[e,t]of Object.entries(l))if(void 0!==t&&!d.has(e))throw new N(G.InvalidArg,`\'${e}\' does not apply to a ${u} field`,{details:{field:e}});let c="defaultValue"in l?l.defaultValue:void 0;if(null!=c&&Array.isArray(c)!==("listbox"===u))throw new N(G.InvalidArg,"listbox"===u?"a list\'s defaultValue is a list of option values":`a ${u} field\'s defaultValue is one string`,{details:{field:"defaultValue"}});let f=et(t,s),m=Y(f),p="anyone"===f.kind,h=P1(this.runtime,o,a.fieldIndex),F=void 0===t.purpose?void 0:rj(t.purpose),g=void 0===t.placeholder?void 0:eC(t.placeholder),_=ex(t,s.kind),P=rK(t,s.kind),D=void 0===P?[]:this.pressesOf(s);if(P){let e=D.filter(e=>null!==e);rJ(e,D.length-e.length)}"defaultValue"in t&&void 0!==t.defaultValue&&ia({field:s,widgets:[]},t);let b=a.fieldObjectNumber;void 0!==t.name&&this.applyWideSetter(r.EPDFForm_SetFieldName,b,t.name,`cannot rename to "${t.name}" (sibling conflict or invalid)`);let{setBits:y,clearBits:w}=w1(t);if((0!==y||0!==w)&&!r.EPDFForm_SetFieldFlags(i,b,y,w))throw new N(G.InvalidArg,"flag update rejected");if("maxLength"in t&&void 0!==t.maxLength&&!r.EPDFForm_SetFieldMaxLen(i,b,t.maxLength??0))throw new N(G.InvalidArg,"maxLength rejected (current value exceeds it)");void 0!==t.alternateName&&this.applyWideSetter(r.EPDFForm_SetFieldAlternateName,b,t.alternateName??"","alternate name rejected"),void 0!==t.mappingName&&this.applyWideSetter(r.EPDFForm_SetFieldMappingName,b,t.mappingName??"","mapping name rejected"),m!==s.groupId&&P2(this.runtime,i,b,[[PW,m]]),p!==h&&P3(this.runtime,i,b,p),void 0!==F&&F!==s.purpose&&P2(this.runtime,i,b,[[PH,F]]),void 0!==g&&g!==s.placeholder&&P2(this.runtime,i,b,[[PK,g]]),void 0===_||eS(_,"format"in s?s.format:null)||w5(this.runtime,i,b,s.actions,eA(_));let E="options"in t&&void 0!==t.options,A="defaultValue"in t&&void 0!==t.defaultValue;if(E||A){let e=ia({field:s,widgets:[]},t).field;"options"in t&&t.options&&this.applyOptions(b,t.options),this.writeDefault(b,s.defaultValueEntry,e.defaultValueEntry),E&&this.writeFieldAfter(b,s,e,!0)}t.actions&&w5(this.runtime,i,b,s.actions,t.actions),void 0!==P&&s.widgets.forEach((e,t)=>{let n=D[t];if(!n||!e.ref)return;let r=rZ(n,P);"keep"!==r.kind&&function(e,t,n,r){let i=gj(e,t,n);try{PM(e,t.requireDocPtr(),i,rQ(r))}finally{e.fn.FPDFPage_CloseAnnot(i)}}(this.runtime,this.session,e.ref,r)});let v=this.followCalculateScript(b,t.actions?.calculate);return this.session.invalidateDerived(),{field:this.readBackField(b),calculationOrder:v}}pressesOf(e){let t=this.session.requireDocPtr();return Pz(this.runtime,t,e.widgets,new PR(this.runtime,t))}reorderCalculations(e,t,n){hW(n);let r=gv(this.runtime,this.session),i=e=>wP(this.runtime,r,e).fieldObjectNumber,o=wK(this.runtime,r),a=e.map(i),s=nD(o,a,"start"===t||"end"===t?t:"before"in t?{before:i(t.before)}:{after:i(t.after)},String);return hW(n),wJ(o,s)||(wZ(this.runtime,this.session.requireDocPtr(),s),this.session.invalidateDerived()),{before:o,after:s,moved:a}}followCalculateScript(e,t){if(void 0===t)return null;let n=wK(this.runtime,gv(this.runtime,this.session)),r=n.includes(e),i=null===t?n.filter(t=>t!==e):r?n:[...n,e];return wJ(n,i)?null:(wZ(this.runtime,this.session.requireDocPtr(),i),{before:n,after:i})}deleteField(e,t){hW(t);let n=gv(this.runtime,this.session),r=wP(this.runtime,n,e);this.assertWritable(r);let i=Di(this.runtime,n,r.fieldIndex,this.session.requireDocPtr(),w$(this.runtime,this.session)),o=i.widgets.map(e=>eR(e.objectNumber,e.page));hW(t);let a=this.followCalculateScript(r.fieldObjectNumber,null);if(!this.nativeDeleteField(r.fieldObjectNumber))throw new N(G.InvalidArg,"field cannot be deleted");this.session.invalidateDerived();let s=new yD(this.runtime,this.session);for(let e of o)e.ref&&s.deleteReleasedWidget(e.ref,r.fieldObjectNumber);return this.session.invalidateDerived(),{deleted:i.ref,removedWidgets:o,calculationOrder:a}}deleteFields(e,t){hW(t);let{fn:n}=this.runtime,r=this.session.requireDocPtr(),i=gv(this.runtime,this.session),o=w$(this.runtime,this.session),a=e.map(e=>{let t=wP(this.runtime,i,e);this.assertWritable(t);let n=Di(this.runtime,i,t.fieldIndex,r,o);return{objectNumber:t.fieldObjectNumber,widgets:n.widgets.map(e=>eR(e.objectNumber,e.page))}}),s=new Set(a.map(e=>e.objectNumber)),l=wK(this.runtime,i),u=l.filter(e=>!s.has(e)),d=wJ(l,u)?null:{before:l,after:u};for(let{objectNumber:e}of(hW(t),d&&wZ(this.runtime,r,u),a))if(!this.nativeDeleteField(e))throw new N(G.InvalidArg,"field cannot be deleted");let c=a.flatMap(e=>e.widgets),f=new Map;for(let e of c){if(!e.ref||!e.page)continue;let t=f.get(e.page.objectNumber)??[];t.push(e.objectNumber),f.set(e.page.objectNumber,t)}for(let[e,t]of f){gx(this.runtime,this.session,e);let{pageIndex:i}=this.session.resolvePageRef(q(e));for(let o of t.map(e=>n.EPDFPage_GetAnnotIndexByObjectNumberRaw(r,i,e)).filter(e=>e>=0).sort((e,t)=>t-e))if(!n.EPDFPage_RemoveAnnotRaw(r,i,o))throw new N(G.Unknown,`a widget could not leave page ${e}`)}return this.session.invalidateDerived(),{removedWidgets:c,calculationOrder:d}}addWidget(e,t,n,r={}){let{objectNumber:i,splitObjectNumber:o}=r,{field:a,widgets:s}=this.addWidgets(e,[{placement:t}],n,{...void 0!==i?{objectNumbers:[i]}:{},...void 0!==o?{splitObjectNumber:o}:{}});return{field:a,widget:s[0]}}addWidgets(e,t,n,r={}){hW(n);let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr(),s=gv(this.runtime,this.session),l=wP(this.runtime,s,e);this.assertWritable(l);let u=Di(this.runtime,s,l.fieldIndex,a,w$(this.runtime,this.session)),d="pushbutton"===u.kind&&u.takesImage,c=t.map(({placement:e})=>{let t=ot(ir(u.kind,e));return d?{...t,actions:rH(t.actions)}:t}),f=c.map(e=>this.preflightPlacement(e)),m=c.map(e=>Ei(u.kind,e)),p="checkbox"===u.kind||"radio"===u.kind,h=p?function(e,t,n=[]){let r="checkbox"===e.kind||"radio"===e.kind,i=r?e.widgets:[],o=new Map;for(let e of i)""===e.onState||o.has(e.exportValue)||o.set(e.exportValue,e.onState);let a=new Set(i.map(e=>e.onState)),s=r&&e.hasValuesList;return t.map((e,t)=>{let r=n[t]??o.get(e)??(s?(()=>{let e=0;for(;a.has(String(e));)e+=1;return String(e)})():e);return a.add(r),o.has(e)||o.set(e,r),r})}(u,m,t.map(e=>e.onState)):m,{objectNumbers:F}=r;if(F&&F.length!==t.length)throw new N(G.InvalidArg,`one widget object number per widget: ${F.length} for ${t.length}`,{details:{field:"objectNumbers"}});let g="pushbutton"===u.kind&&u.hasImage?this.imageOf(u):0,_=u.widgets.find(e=>e.objectNumber===l.fieldObjectNumber)?.page??null;for(let e of F??[])this.session.claimObjectNumber(e);let P=_?r.splitObjectNumber:void 0;if(void 0!==P&&this.session.claimObjectNumber(P),hW(n),_&&gx(this.runtime,this.session,_.objectNumber),r.radiosInUnison){let{setBits:e,clearBits:t}=w1({radiosInUnison:!0});i.EPDFForm_SetFieldFlags(a,l.fieldObjectNumber,e,t)}let D=yp(this.runtime,this.session,this.fonts),b=c.map((e,n)=>{let r,s=wq(this.runtime,a,f[n],e,F?.[n],D),u=p?o.writeU16String(m[n]):0n;try{r=i.EPDFForm_AttachWidget(a,l.fieldObjectNumber,s,h[n],u,(0===n?P:void 0)??0)}finally{0n!==u&&o.free(u)}if(!r)throw new N(G.InvalidArg,"the widget could not join the field");let d=eR(s,e.page);0!==g&&PU(this.runtime,this.session,d.ref,g);let c=t[n].flags;return c&&wH(this.runtime,this.session,d,c),d}),y=m.map(e=>(function(e,t,n=!1){return("checkbox"===e.kind||"radio"===e.kind)&&("radio"!==e.kind||!!e.radiosInUnison||!!n)&&e.widgets.some(e=>e.checked&&e.exportValue===t)})(u,e,r.radiosInUnison));if(y.some(Boolean)){let e=[...u.widgets.map(e=>e.checked),...y];if(null===this.withChangedWidgets((t,n,r)=>h1(this.runtime.mem,e.map(e=>+!!e),(e,o)=>i.EPDFForm_SetFieldWidgetsChecked(a,l.fieldObjectNumber,e,o,t,n,r))))throw new N(G.Unknown,"the new widgets could not take the field\'s value")}this.session.invalidateDerived();let w=this.readBackField(l.fieldObjectNumber);if(p){let e=new Map(w.widgets.map(e=>[e.objectNumber,"exportValue"in e?e.exportValue:null]));for(let[t,n]of b.entries()){let r=e.get(n.objectNumber);if(null!=r&&r!==m[t])throw new N(G.Unknown,`a new widget of \'${u.name}\' reads \'${r}\', not \'${m[t]}\'`)}}return{field:w,widgets:b}}imageOf(e){for(let t of e.widgets){if(null===t.ref)continue;let e=PV(this.runtime,this.session,t.ref);if(0!==e)return e}return 0}detachWidget(e,t,n){hW(n);let{fn:r}=this.runtime,i=gv(this.runtime,this.session),o=wP(this.runtime,i,e);this.assertWritable(o);let a=Eo(t);if(a===o.fieldObjectNumber)throw new N(G.InvalidArg,`widget ${a} is the field\'s own dictionary (a merged field/widget) and cannot be removed from it - delete the field with doc.forms.delete`);if(!r.EPDFForm_DetachWidget(this.session.requireDocPtr(),o.fieldObjectNumber,a))throw new N(G.InvalidArg,"widget is not attached to this field");return this.session.invalidateDerived(),{field:this.readBackField(o.fieldObjectNumber),widget:eR(Eo(t),t.page)}}applyOptions(e,t){let{fn:n}=this.runtime,r=this.session.requireDocPtr();if(!gf(this.runtime,t.map(e=>e.label),i=>gf(this.runtime,t.map(e=>e.value),(t,o)=>n.EPDFForm_SetFieldOptions(r,e,i,t,o))))throw new N(G.InvalidArg,"options rejected")}applyWideSetter(e,t,n,r){let{mem:i}=this.runtime,o=this.session.requireDocPtr(),a=i.writeU16String(n);try{if(!e(o,t,a))throw new N(G.InvalidArg,r)}finally{i.free(a)}}writeDefault(e,t,n){if(r7(t,n))return;let r=this.session.requireDocPtr();if(!w8(this.runtime,r,e,n,"default"))throw new N(G.InvalidArg,"default value rejected")}readBackField(e){let t=gv(this.runtime,this.session),n=this.runtime.fn.EPDFForm_GetFieldIndexByObjNum(t,e);if(n<0)throw new N(G.Unknown,"form field vanished after write");return Di(this.runtime,t,n,this.session.requireDocPtr(),w$(this.runtime,this.session))}assertWritable(e){if(0===e.fieldObjectNumber)throw new N(G.InvalidArg,"form field is stored as a direct object and cannot be written");this.assertNotLockedBySignature(e)}assertNotLockedBySignature(e){let t=wz(this.runtime,this.session);if(!t)return;let n=gv(this.runtime,this.session);var r=h3(this.runtime.mem,(t,r)=>this.runtime.fn.EPDFForm_GetFieldName(n,e.fieldIndex,t,r))??"";let i=t?.(r);if(i)throw new N(G.ProtectedDocument,`form field "${r}" is locked by signature ${i.signatureIndex} (${"fieldmdp"===i.source?"FieldMDP":"/Lock"})`)}writeFieldAfter(e,t,n,r=!1){let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr(),s="checkbox"===n.kind||"radio"===n.kind?n.widgets:null,l=!r7(t.valueEntry,n.valueEntry),u=s?.some((e,n)=>e.checked!==t.widgets[n]?.checked)??!1;if(!l&&!u&&!r)return null;let d=()=>new N(G.InvalidArg,`\'${n.name}\' could not take the value`);if(l&&!w8(this.runtime,a,e,n.valueEntry,"value"))throw d();if("combobox"===n.kind||"listbox"===n.kind){var c;let t=n.options.flatMap((e,t)=>e.selected?[t]:[]);if(c=this.runtime,!h1(c.mem,t,(t,n)=>c.fn.EPDFForm_SetFieldSelectedIndices(a,e,t,n)))throw d()}if(s?.length===0)return[];let f=this.withChangedWidgets((t,n,r)=>s?h1(o,s.map(e=>+!!e.checked),(o,s)=>i.EPDFForm_SetFieldWidgetsChecked(a,e,o,s,t,n,r)):i.EPDFForm_RedrawFieldWidgets(a,e,t,n,r));if(null===f)throw d();return f}withChangedWidgets(e){let{mem:t}=this.runtime;return h0(t,[1024,8],([n,r])=>{if(Ft(t,r,0),!e(n,256,r))return null;let i=Math.min(Number(t.peek(r,"i32")),256),o=[];for(let e=0;ea.has(e.objectNumber)).map(e=>eR(e.objectNumber,e.page));return{field:o,meta:y4(this.session.writeStamp(),[o.ref],s,void 0===n?y8(o.kind,s):n?s:[])}}},En=["kind","name","readOnly","required","noExport","alternateName","mappingName","groupId","assignment","purpose","placeholder","actions"],Er={text:["defaultValue","maxLength","multiline","password","comb","format"],radio:["radiosInUnison","noToggleToOff"],combobox:["edit","defaultValue","options","format"],listbox:["multiSelect","options","defaultValue"],pushbutton:["takesImage"]};function Ei(e,t){let{exportValue:n}=t;if("checkbox"!==e&&"radio"!==e){if(void 0!==n)throw new N(G.InvalidArg,`\'exportValue\' applies to checkbox and radio widgets, not a ${e} field\'s`,{details:{field:"exportValue"}});return""}let r=n??("checkbox"===e?"Yes":void 0);if(!r||"Off"===r)throw new N(G.InvalidArg,"radio"===e?\'every radio button needs an exportValue other than "Off"\':"a checkbox\'s exportValue can\'t be \\"Off\\"",{details:{field:"exportValue"}});return r}function Eo(e){if("objectNumber"!==e.kind)throw new N(G.InvalidArg,"widget must be addressed by object number");return e.objectNumber}function Ea(e,t,n,r,i,o){let a=()=>wK(e,gv(e,t)),s=a(),l=gF(e,t),u=new Et(e,t,n),d=r.map((n,r)=>{let{groupId:i,assignment:a,...s}=i6(n.draft,l),d=o.assignmentOf(a??X(i??null)),[c,...f]=n.objectNumbers??[],{objectNumber:m,widgets:p}=u.writeField({...s,assignment:d},o.signal,o.actor,void 0===c?{}:{objectNumber:c,widgetObjectNumbers:f});return p.forEach((r,i)=>wH(e,t,r,n.flags[i])),n.images?.forEach((n,r)=>{let i=p[r];n&&i?.ref&&PU(e,t,i.ref,function(e,t,n){if("drawing"in n)return n.drawing;let{fn:r,mem:i}=e,o=wX(r,i,n.bytes,"a push button\'s image",!1,"image");return Dy(r,i,t.requireDocPtr(),t.drawingIndex(),n.bytes,o)}(e,t,n))}),t.invalidateDerived(),n.value&&u.setValue(Es(m),n.value,o.signal),o.made?.(m,r),m}),c=i.map(e=>Es(d[e]));c.length>0&&u.reorderCalculations(c,"end",o.signal),t.invalidateDerived();let f=a(),m=d.map(n=>{let r=gv(e,t);return Di(e,r,e.fn.EPDFForm_GetFieldIndexByObjNum(r,n),t.requireDocPtr(),w$(e,t))});return wV(e,t,{fields:m,...wJ(s,f)?{}:{calculationOrder:f.map(Es)},meta:y4(t.writeStamp(),m.map(e=>e.ref),m.flatMap(e=>e.widgets))},n)}function Es(e){return{kind:"objectNumber",objectNumber:e}}function El(e){let{groupOf:t,assignmentOf:n}=e;return n||(t?e=>"anyone"===e.kind?e:X(t(Y(e))):e=>e)}var Eu=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}copy(e,t){hW(t),y0(e.limits,"items",e.fields.length),e.page&&this.session.resolvePageRef(e.page);let n=i8(new wW(this.runtime,this.session,this.fonts).snapshot(t),gF(this.runtime,this.session)),r=function(e){let t=function(e){let{form:t,mayScript:n,placement:r}=e,i=new Map(t.widgets.map(e=>[K(e.ref),e])),o=e.widgets?new Set(e.widgets.map(K)):null,a=new Set(t.fields.map(e=>e.name)),s=r.offset??{x:0,y:0},l=[],u=[],d=[],c=new Set;for(let f of(e.fields.forEach((f,m)=>{let p=t.fields.find(e=>ae(e,f));if(!p)throw new N(G.NotFound,`copy: no form field ${eM(f)}`,{details:{item:m}});let h=p.widgets.flatMap(e=>{let t=e.ref?i.get(K(e.ref)):void 0;return t&&(!o||o.has(K(t.ref)))?[t]:[]}),F=aa(p,h);for(let e of h)c.add(K(e.ref));if(o&&0===h.length)throw new N(G.InvalidArg,`copy: \'widgets\' names no widget of field ${m}`,{details:{item:m,field:"widgets"}});if("unknown"===F.kind)return void l.push({ref:F.ref,reason:"unsupported-kind"});let g=af(F.name,e=>ac(a,e));a.add(g);let _=ao(F,n,l),P=h.map(e=>{let t;return{...t=as(F,e,e=>e,n,l),...r.page?{page:r.page}:{},...t.rect?{rect:{...t.rect,x:t.rect.x+s.x,y:t.rect.y+s.y}}:{}}}),D=e.values&&"signature"!==F.kind&&ar(F)?ad(F):null;d.push(p),u.push({source:m,draft:au(F,g,_,P,`copy: field ${m}`),widgets:h.map(e=>e.ref),flags:h.map(al),...D?{value:D}:{}})}),o??[]))if(!c.has(f))throw new N(G.InvalidArg,`copy: widget ${f} is a widget of none of the fields`,{details:{field:"widgets"}});return{creates:u,calculationOrder:t.calculationOrder.flatMap(e=>e?u.flatMap((t,n)=>ae(d[n],e)&&t.draft.actions?.calculate?[n]:[]):[]),dropped:l}}(e);for(let e of t.creates)hT(e.draft,`copy: field ${e.source}`,{item:e.source});return t}({form:n,fields:e.fields,...e.widgets?{widgets:e.widgets}:{},placement:{...e.page?{page:e.page}:{},...e.offset?{offset:e.offset}:{}},values:e.values,mayScript:e.mayScript}),{objectNumbers:i}=e,o=r.creates.reduce((e,t)=>e+1+t.widgets.length,0);if(i&&i.length!==o)throw new N(G.InvalidArg,`copy: objectNumbers names ${i.length} objects of ${o}`,{details:{field:"objectNumbers"}});let a=0,s=Ea(this.runtime,this.session,this.fonts,r.creates.map(t=>{let n=1+t.widgets.length,r=i?.slice(a,a+n);a+=n;let o=e.values&&"pushbutton"===t.draft.kind?t.widgets.map(e=>{let t=PV(this.runtime,this.session,e);return 0===t?null:{drawing:t}}):void 0;return{...t,...r?{objectNumbers:r}:{},...o?{images:o}:{}}}),r.calculationOrder,{actor:e.actor,assignmentOf:El(e),signal:t});return{...s,refMap:r.creates.map((t,r)=>({from:n.fields.find(n=>ae(n,e.fields[t.source])).ref,to:s.fields[r].ref})),dropped:[...r.dropped]}}},Ed=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}import(e,t){hW(t),yI(this.runtime,"form",e.bundle,e.limits,rw);let n=rb(e.bundle),r=this.fieldNames(),i=function(e){let{bundle:t,mayScript:n}=e,r=tP({bundlePages:t.pages,pages:e.pages??"same",target:e.target,named:t.widgets.flatMap(e=>rB(e.data))}),i=new Map(t.widgets.map((e,t)=>[K(e.data.ref),t])),o=new Set,a=[],s=new Set,l=[];return t.fields.forEach(({data:u},d)=>{var c,f,m,p;let h,F=u.widgets.flatMap(e=>{let t=e.ref?i.get(K(e.ref)):void 0;return void 0===t?[]:[t]});for(let e of F)o.add(e);let g=aa(u,F.map(e=>t.widgets[e].data));if("unknown"===g.kind)return void a.push({ref:g.ref,reason:"unsupported-kind"});if(s.has(g.name)||e.nameTaken(g.name))return void a.push({ref:g.ref,reason:"name-conflict"});s.add(g.name);let _=(c=g,f=ao(g,n,a),m=F.map(e=>as(g,t.widgets[e].data,r,n,a)),p=d,h=`import: field ${p}`,hT(au(c,c.name,f,m,h),h,{item:p})),P=e.values&&ar(g)?ad(g):null;l.push({field:d,draft:_,widgets:F,flags:F.map(e=>al(t.widgets[e].data)),...P?{value:P}:{}})}),t.widgets.forEach((e,t)=>{o.has(t)||a.push({ref:e.data.field,widget:e.data.ref,reason:"no-field"})}),{creates:l,calculationOrder:t.calculationOrder.flatMap(e=>{let n=l.findIndex(n=>eM(t.fields[n.field].data.ref)===eM(e)&&n.draft.actions?.calculate);return n<0?[]:[n]}),dropped:a}}({bundle:n,...void 0!==e.pages?{pages:e.pages}:{},target:this.session.allRecords().map(e=>({page:q(e.pageObjectNumber),position:e.pageIndex})),nameTaken:e=>ac(r,e),mayScript:e.mayScript,values:e.values}),o=this.session.requireDocPtr(),a=e.actor.userId??null,s="restore"===e.attribution,l=i.creates.map(t=>{if(!e.values||"pushbutton"!==t.draft.kind)return t;let r=t.widgets.map(e=>{let t=n.widgets[e]?.resources.image,r=void 0===t?void 0:n.resources[t];return r?{bytes:r}:null});return r.some(Boolean)?{...t,images:r}:t}),u=Ea(this.runtime,this.session,this.fonts,l,i.calculationOrder,{actor:e.actor,assignmentOf:El(e),signal:t,made:(e,t)=>{var r;if(!s)return;let l=n.fields[i.creates[t].field].data;r=this.runtime,P2(r,o,e,[[PZ,l.createdBy],[PJ,l.createdAt?hH(l.createdAt):null],[PQ,a]])}});return{...u,refMap:i.creates.map((e,t)=>({from:n.fields[e.field].data.ref,to:u.fields[t].ref})),dropped:[...i.dropped]}}planValues(e,t,n,r){var i;let o,a;hW(n),yI(this.runtime,"form",e,t,rw);let s=wz(this.runtime,this.session),l=(i={bundle:e,target:this.readFields(),refusal:(e,t)=>{if("objectNumber"!==e.ref.kind)return"value-not-allowed";try{r4(e,t)}catch(e){if(N.is(e))return"value-not-allowed";throw e}return s?.(e.name)?"locked":r(e)?null:"fill-not-allowed"}},o=[],a=[],i.bundle.fields.forEach(({data:e},t)=>{let n=ar(e)?ad(e):null;if(!n)return;let r=i.target.find(t=>ae(t,{kind:"fqn",name:e.name}));if(r)if(r.kind!==e.kind)a.push({ref:e.ref,reason:"wrong-kind"});else{let s=i.refusal?.(r,n);s?a.push({ref:e.ref,reason:s}):o.push({field:t,target:r,value:n})}else a.push({ref:e.ref,reason:"no-field"})}),{writes:o,dropped:a});return{writes:l.writes.filter(({target:e,value:t})=>!function(e,t){switch(t.kind){case"text":return"text"===e.kind&&e.value===t.value;case"toggle":return("checkbox"===e.kind||"radio"===e.kind)&&e.widgets.every(e=>e.checked===(e.onState===t.state));case"choice":if("combobox"===e.kind)return 0===t.values.length?""===e.value:e.value===t.values[0];return"listbox"===e.kind&&e.selectedValues.length===t.values.length&&e.selectedValues.every((e,n)=>e===t.values[n])}}(e,r4(e,t))),dropped:l.dropped}}writeValue(e,t){return new Et(this.runtime,this.session,this.fonts).setValue(e.target.ref,e.value,t),this.readField(function(e){if("objectNumber"!==e.kind)throw Error("a written field has an object number");return e.objectNumber}(e.target.ref))}fieldNames(){let{fn:e,mem:t}=this.runtime,n=gv(this.runtime,this.session),r=new Set;for(let i=0;ie.EPDFForm_GetFieldName(n,i,t,r));o&&r.add(o)}return r}readFields(){let e=gv(this.runtime,this.session),t=this.session.requireDocPtr();return Array.from({length:this.runtime.fn.EPDFForm_CountFields(e)},(n,r)=>Di(this.runtime,e,r,t,w$(this.runtime,this.session)))}readField(e){let t=gv(this.runtime,this.session),n=this.runtime.fn.EPDFForm_GetFieldIndexByObjNum(t,e);return Di(this.runtime,t,n,this.session.requireDocPtr(),w$(this.runtime,this.session))}},Ec=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}plan(e,t){hW(t);let n=this.session.requireDocPtr(),r=gF(this.runtime,this.session),i=e=>{let t=this.session.resolvePageRef(e),i=q(t.pageObjectNumber),o=r(i);return{ref:i,size:{width:o.right-o.left,height:o.top-o.bottom},rotation:g_(this.runtime,n,t.pageIndex)}},o=("all"===e.pages?this.session.allRecords().sort((e,t)=>e.pageIndex-t.pageIndex).map(e=>q(e.pageObjectNumber)):e.pages).map(i),a=function(e){let t=function(e){let{form:t,mayScript:n}=e,{as:r,field:i,template:o,from:a,targets:s}=function(e){let{form:t,limits:n}=e,r=t.fields.find(t=>ae(t,e.field));if(!r)throw new N(G.NotFound,`repeat: no form field ${eM(e.field)}`);let i=e.as??ap(r),o=function(e,t,n=ap(t)){return"signature"===t.kind?"a signature field shows in one place: a signer signs once":"unknown"===t.kind?"a field of a kind the engine does not model":am(e,t).length>0?null:"the field shows on no page"}(t,r,i);if(o)throw new N(G.InvalidArg,`repeat: ${o}`,{details:{field:"field"}});let a=am(t,r),s=a[0].page,l=e.pageOf(s);if(!l)throw new N(G.NotFound,`repeat: no page ${s.objectNumber}`);let u=new Set("boxes"===i?r.widgets.flatMap(e=>e.page?.objectNumber??[]):[s.objectNumber]),d=[];for(let t of e.pages)u.has(t.ref.objectNumber)||(u.add(t.ref.objectNumber),d.push(t));let c=d.length*("boxes"===i?a.length:1+a.length);return aF(n,"pages",d.length),aF(n,"items",c),{as:i,field:r,template:a,from:l,targets:d,count:c}}(e),l={as:r,field:i,pages:s.map(e=>e.ref)},u={widgets:[],unison:!1,splits:!1,creates:[],calculationOrder:[]};if(0===s.length)return{...l,...u,dropped:[],needs:0};let d=[],c="fields"===r?aa(i,o):i,f=o.map(e=>{let{rect:t,box:r,rotation:i,...o}=as(c,e,e=>e,n,d);return{row:e,look:o,place:{rect:e.rect,rotation:e.rotation??0}}}),m=e=>f.map(({look:t,place:n})=>{let r,i,o,{rect:s,rotation:l}=(i=Math.min((r=ah(a.rotation)===ah(e.rotation)&&a.size.width===e.size.width&&a.size.height===e.size.height?n.rect:function(e,t){let{x:n,y:r,width:i,height:o}=t,{width:a,height:s}=e.size;switch(ah(e.rotation)){case 90:return{x:r,y:s-n-i,width:o,height:i};case 180:return{x:a-n-i,y:s-r-o,width:i,height:o};case 270:return{x:a-r-o,y:n,width:o,height:i};default:return{x:n,y:r,width:i,height:o}}}(e,function(e,t){let{x:n,y:r,width:i,height:o}=t,{width:a,height:s}=e.size;switch(ah(e.rotation)){case 90:return{x:s-r-o,y:n,width:o,height:i};case 180:return{x:a-n-i,y:s-r-o,width:i,height:o};case 270:return{x:r,y:a-n-i,width:o,height:i};default:return{x:n,y:r,width:i,height:o}}}(a,n.rect))).width,e.size.width),o=Math.min(r.height,e.size.height),{rect:{x:Math.min(Math.max(r.x,0),Math.max(e.size.width-i,0)),y:Math.min(Math.max(r.y,0),Math.max(e.size.height-o,0)),width:i,height:o},rotation:ah(n.rotation+a.rotation-e.rotation)});return{...t,page:e.ref,rect:s,...l?{rotation:l}:{}}});if("boxes"===r){let e=new Map("checkbox"===i.kind||"radio"===i.kind?i.widgets.flatMap(e=>e.ref?[[K(e.ref),e.onState]]:[]):[]),t=s.flatMap(t=>m(t).map((t,n)=>{let r=f[n].row.ref,i=e.get(K(r));return{source:r,placement:t,flags:al(f[n].row),...i?{onState:i}:{}}})),n="objectNumber"===i.ref.kind&&i.widgets.some(e=>e.objectNumber===i.ref.objectNumber);return{...l,...u,widgets:t,unison:"radio"===i.kind&&!i.radiosInUnison,splits:n,dropped:d,needs:t.length+ +!!n}}let p=new Set(t.fields.map(e=>e.name)),h=ao(c,n,d),F=f.map(({row:e})=>al(e)),g=f.map(({row:e})=>e.ref),_=c.name,P=s.map(e=>(_=af(_,e=>ac(p,e)),p.add(_),{source:0,draft:au(c,_,h,m(e),"repeat: the field"),widgets:g,flags:F})),D=t.calculationOrder.some(e=>null!==e&&ae(i,e));return{...l,...u,creates:P,calculationOrder:D?P.flatMap((e,t)=>e.draft.actions?.calculate?[t]:[]):[],dropped:d,needs:P.length*(1+o.length)}}(e);for(let e of t.creates)hT(e.draft,"repeat: the field",{});return t}({form:i8(this.read(e.field),r),field:e.field,pages:o,pageOf:i,...e.as?{as:e.as}:{},mayScript:e.mayScript,limits:e.limits}),{objectNumbers:s}=e;if(s&&s.length!==a.needs)throw new N(G.InvalidArg,`repeat: objectNumbers names ${s.length} objects of ${a.needs}`,{details:{field:"objectNumbers"}});return a}read(e){let t=Do(this.runtime,gv(this.runtime,this.session),this.session.requireDocPtr(),w$(this.runtime,this.session)),n=t.fields.find(t=>ae(t,e));return{...t,widgets:n?wU(this.runtime,this.session,n.widgets,this.fonts):[]}}addBoxes(e,t,n){let r=gF(this.runtime,this.session),i=e.widgets.length,o=e.splits?t?.[i]:void 0,a=new Set(e.field.widgets.map(e=>e.objectNumber)),{field:s,widgets:l}=new Et(this.runtime,this.session,this.fonts).addWidgets(e.field.ref,e.widgets.map(({placement:e,flags:t,onState:n})=>({placement:i2(e,r),flags:t,...void 0!==n?{onState:n}:{}})),n,{...t?{objectNumbers:t.slice(0,i)}:{},...void 0!==o?{splitObjectNumber:o}:{},radiosInUnison:e.unison});for(let e of l)a.add(e.objectNumber);return{field:s,added:l,split:s.widgets.filter(e=>!a.has(e.objectNumber))}}createFields(e,t,n){let r=0;return Ea(this.runtime,this.session,this.fonts,e.creates.map(e=>{let n=1+e.widgets.length,i=t.objectNumbers?.slice(r,r+n);return r+=n,{...e,...i?{objectNumbers:i}:{}}}),e.calculationOrder,{actor:t.actor,assignmentOf:t.assignmentOf,signal:n})}},Ef=["AP","MK"],Em=new Set(["text","checkbox","radio","combobox","listbox"]),Ep=new Set(["forms.setValue","forms.setDisplay","forms.setAppearanceText","forms.reset","forms.setSignatureAppearance","forms.setButtonImage"]);function Eh(e,t){let n=t.field.widgets.find(e=>e.objectNumber===t.objectNumber&&e.page);if(!n?.page)return{split:null,mergedEntry:null};let{pageIndex:r}=e.session.resolvePageRef(n.page),i=e.session.requireDocPtr(),o=e.runtime.fn.EPDFPage_GetAnnotIndexByObjectNumberRaw(i,r,n.objectNumber);return o<0?{split:null,mergedEntry:null}:{split:n,mergedEntry:yC(e.runtime,i,r,[o])}}function EF(e,t,n,r,i,o){let a={kind:"widgets.added",reports:t,direction:"remove",fieldObjectNumber:n,added:i,split:o.merged&&o.mergedEntry&&o.widget?{merged:o.merged,mergedEntry:o.mergedEntry,widget:o.widget}:null,objects:yQ(e.runtime,e.session,r),guards:[],kids:[],states:[],values:[],widgets:[],captures:[]},{field:s}=EU(e,n),l=new Map(s.widgets.map(e=>[e.objectNumber,"onState"in e?{state:e.onState,value:e.exportValue}:null])),u=E_(a);return{...a,guards:EP(e,u),kids:s.widgets.map(e=>e.objectNumber),states:u.map(e=>l.get(e.objectNumber)?.state??""),values:u.map(e=>l.get(e.objectNumber)?.value??"")}}var Eg=e=>e.split?[e.split.merged,e.split.widget]:[],E_=e=>e.split?[e.split.widget,...e.added]:[...e.added];function EP(e,t){return yQ(e.runtime,e.session,t.map(e=>({objectNumber:e.objectNumber,deep:[],before:null})))}function ED(e,t){return EW(e,t)?.field.widgets.map(e=>e.objectNumber)??null}function Eb(e){let{fn:t,mem:n}=e.runtime,r=gv(e.runtime,e.session),i=new Set,o=t.EPDFForm_CountFields(r);for(let e=0;et.EPDFForm_GetFieldName(r,e,n,i));o&&i.add(o)}return i}function Ey(e,t,n,r=[],i=!1){let{field:o}=EU(e,t);return{type:"forms.repeat",as:"boxes",...E0(e,{fields:[o],meta:y4(e.session.writeStamp(),[o.ref],[...n])}),dropped:r,...i?{undone:!0}:{}}}function Ew(e,t,n){return{type:"forms.reorderCalculations",calculationOrder:t.map(EM),meta:y4(e.session.writeStamp(),n.map(EM),[])}}function EE(e,t){if(!o8(e.authority,t.field.assignment,"fill")){var n,r;if(n=e,r=t,r.field.actions?.calculate&&wK(n.runtime,gv(n.runtime,n.session)).includes(r.objectNumber)&&e.fillsOwnField())return void oY(e.authority,"doc.forms.fill");o4(e.authority,t.field.assignment,"fill")}}function EA(e){!function(e,t){let{grants:n,protection:r}=e;return!(r&&iR(r).has(o9(t)))&&(!n||iZ(t,n.scope,n.permissionFlags,r))}(e.authority,"fill")&&oQ(e.authority,"doc.forms.fill")}function Ev(e,t){return o7(e.authority,t),t}function ES(e,t,n){return{kind:"field.remove",objectNumber:EK(t.ref),left:t,widgets:EP(e,t.widgets),...n?{rights:n}:{}}}function Ek(e,t){let n=t.ref;gx(e.runtime,e.session,n.page.objectNumber);let r=wm(e,n),i=t.field?E$(e,t.field):null;if(i&&i.objectNumber===r)throw new N(G.InvalidArg,`widget ${r} is its field\'s own dictionary (a merged field/widget) - delete the field with doc.forms.delete`,{details:{field:"widget"}});let o=[];if(i){let t=yJ(e.runtime,e.session,[{objectNumber:i.objectNumber,deep:[]},{objectNumber:r,deep:[]}]);new Et(e.runtime,e.session,e.fonts).detachWidget({kind:"objectNumber",objectNumber:i.objectNumber},n,e.signal),o=yQ(e.runtime,e.session,t)}let{pageIndex:a,index:s}=gC(e.runtime,e.session,n),l=yC(e.runtime,e.session.requireDocPtr(),a,[s]);new yD(e.runtime,e.session,e.fonts).deleteReleasedWidget(n,0),e.session.invalidateDerived();let u=i?EU(e,i.objectNumber).field:null;return{item:{type:"forms.deleteWidget",widget:n,page:n.page,field:u,meta:y4(e.session.writeStamp(),u?[u.ref]:[],[{ref:n,objectNumber:r,page:n.page}])},reverse:[{kind:"widget.restore",page:n.page,widget:n,capture:l,fieldObjectNumber:i?.objectNumber??null,detached:o}]}}function Ex(e,t,n){let r={kind:"objectNumber",objectNumber:t.objectNumber},i=yJ(e.runtime,e.session,EH(t)),o=new Et(e.runtime,e.session,e.fonts).setValue(r,n,e.signal),a=yQ(e.runtime,e.session,i),s={type:"forms.setValue",...E0(e,o)};return 0===o.meta.changedWidgets.length&&yV(EQ(t.field),EQ(o.field))?{item:s,reverse:[]}:{item:s,reverse:[{...EL("forms.setValue",a,[t.objectNumber]),fallback:{kind:"value",fields:[{objectNumber:t.objectNumber,before:EQ(t.field),left:EQ(o.field)}]}}]}}function EG(e,t,n,r){let i=!1,o=ER(e,r,t,()=>(i=n(new Et(e.runtime,e.session,e.fonts)).meta.changedWidgets.length>0,{field:EU(e,r.objectNumber).field}));return i?o:{item:o.item,reverse:[]}}function EO(e,t,n){let r={kind:"objectNumber",objectNumber:t.objectNumber},i=null;return EN(e,ER(e,t,"forms.update",()=>{let t=new Et(e.runtime,e.session,e.fonts).updateField(r,n,e.signal);return i=t.calculationOrder,t},e=>{let r=EZ(t.field),i=EZ(e),o=[...new Set(Object.keys(n).map(EI))].filter(e=>"kind"!==e&&!yV(r[e],i[e]));return{kind:"properties",objectNumber:t.objectNumber,restore:EJ(r,o),left:EJ(i,o)}}),i)}function EI(e){return"format"===e?"actions":"groupId"===e?"assignment":e}function EN(e,t,n){return!n||iA(t.item)?t:{item:{...t.item,...EC(n)},reverse:[...t.reverse,Ej(n)]}}function EC(e){return e?{calculationOrder:e.after.map(EM)}:{}}function Ej({before:e,after:t}){return{kind:"calculations.restore",before:e,after:t}}function EM(e){return{kind:"objectNumber",objectNumber:e}}function ER(e,t,n,r,i){let o=yJ(e.runtime,e.session,EH(t)),{field:a}=r(),s=EL(n,yQ(e.runtime,e.session,o),[t.objectNumber]);return{item:E3(e,n,[a]),reverse:[i?{...s,fallback:i(a)}:s]}}function ET(e,t,n){let r=yB(e.runtime,e.session.requireDocPtr(),t.objectNumber),i={kind:"objectNumber",objectNumber:t.objectNumber},{deleted:o,removedWidgets:a,calculationOrder:s}=new Et(e.runtime,e.session).deleteField(i,e.signal);return EN(e,{item:{type:"forms.delete",meta:y4(e.session.writeStamp(),[o],a)},reverse:[{kind:"field.restore",objectNumber:t.objectNumber,name:t.field.name,pages:t.field.widgets.flatMap(e=>e.page?[e.page]:[]),capture:r,...n?{rights:n}:{}}]},s)}function EB(e){return new Set(Eq(e).map(({objectNumber:e})=>e))}function EL(e,t,n){return{kind:"objects.revert",reports:e,objects:t,subject:{fields:n}}}function E$(e,t){let n=gv(e.runtime,e.session),r=wP(e.runtime,n,t),i=Di(e.runtime,n,r.fieldIndex,e.session.requireDocPtr(),w$(e.runtime,e.session));return{objectNumber:r.fieldObjectNumber,field:i}}function Ez(e,t){try{let n=wd(e,t);return"widget"===n.subtype?n:null}catch(e){if(N.is(e))return null;throw e}}function EU(e,t){return E$(e,{kind:"objectNumber",objectNumber:t})}function EV(e,t){try{return E$(e,t)}catch{return null}}function EW(e,t){return EV(e,{kind:"objectNumber",objectNumber:t})}function Eq(e){let t=gv(e.runtime,e.session),n=e.runtime.fn.EPDFForm_CountFields(t),r=[];for(let i=0;i({objectNumber:e.objectNumber,deep:Ef}))]}function EK(e){return"objectNumber"===e.kind?e.objectNumber:0}function EZ(e){let t={name:e.name.slice(e.name.lastIndexOf(".")+1),readOnly:e.readOnly,required:e.required,noExport:e.noExport,alternateName:e.alternateName,mappingName:e.mappingName,groupId:e.groupId,assignment:e.assignment,purpose:e.purpose,placeholder:e.placeholder,actions:function(e){let t={};for(let n of["keystroke","format","validate","calculate"]){let r=e.actions?.[n];if(!r){t[n]=null;continue}let i=U(r);i&&(t[n]=i)}return t}(e)},n=e=>null===e||ev(e)?{format:e}:{},r="none"!==e.defaultValueEntry.kind,i=e=>e.map(({label:e,value:t})=>({label:e,value:t}));switch(e.kind){case"text":return{...t,defaultValue:r?e.defaultValue:null,maxLength:e.maxLength,multiline:e.multiline,password:e.password,comb:e.comb,...n(e.format)};case"radio":return{...t,radiosInUnison:e.radiosInUnison,noToggleToOff:e.noToggleToOff};case"combobox":return{...t,edit:e.edit,defaultValue:r?e.defaultValue:null,options:i(e.options),...n(e.format)};case"listbox":return{...t,multiSelect:e.multiSelect,defaultValue:r?e.defaultValue:null,options:i(e.options)};case"pushbutton":return{...t,takesImage:e.takesImage};default:return t}}function EJ(e,t){return Object.fromEntries(t.map(t=>[t,e[t]]))}function EQ(e){return ad(e)??{value:null}}function EX(e,t,n=t.widgets){return E0(e,{field:t,meta:y4(e.session.writeStamp(),[t.ref],t.widgets,n)})}function EY(e,t){let n=t.widgets;return"forms.setDisplay"===e?[]:"forms.setValue"===e||"forms.reset"===e?y8(t.kind,n):n}function E0(e,t){return wV(e.runtime,e.session,t,e.fonts)}function E1(e,t){return{type:"forms.reset",...E0(e,{fields:[...t],meta:y4(e.session.writeStamp(),t.map(e=>e.ref),t.flatMap(e=>e.widgets),t.flatMap(e=>EY("forms.reset",e)))})}}function E3(e,t,n){if("forms.reset"===t)return E1(e,n);let r=n[0];return{type:t,...EX(e,r,EY(t,r))}}function E2(e,t,n,r){let i=t.filter(e=>!yV(E6(n,e),E6(r,e)));return{kind:"metadata.revert",op:e,restore:Object.fromEntries(i.map(e=>[e,E6(n,e)])),left:Object.fromEntries(i.map(e=>[e,E6(r,e)]))}}function E6(e,t){return e[t]??null}function E5(e,t){return Object.fromEntries(t.map(t=>[t,E6(e,t)]))}var E4=class{constructor(e,t){hJ(this,"childrenByParent",new Map),hJ(this,"parentByItem",new Map);let n=(r,i,o)=>{if(o>=128)return;let a=[];this.childrenByParent.set(i,a);for(let s=e.FPDFBookmark_GetFirstChild(t,r);s;s=e.FPDFBookmark_GetNextSibling(t,s)){let t=e.EPDFOutline_GetObjectNumber(s);if(t){if(this.parentByItem.has(t))break;this.parentByItem.set(t,i),a.push(t),n(s,t,o+1)}}};n(0n,0,0)}has(e){return this.parentByItem.has(e)}parentOf(e){return this.parentByItem.get(e)}childrenOf(e){return this.childrenByParent.get(e)??[]}subtreeOf(e){let t=[e];for(let n of this.childrenOf(e))t.push(...this.subtreeOf(n));return t}levelOf(e){let t=-1;for(let n=e;n;n=this.parentOf(n))t+=1;return this.has(e)?t:void 0}isAtOrUnder(e,t){for(let n=e;n;n=this.parentOf(n))if(n===t)return!0;return!1}items(){return this.childrenOf(0).flatMap(e=>this.subtreeOf(e))}},E8={maxModels:5e4,maxNodes:2e5,maxScriptCodeUnits:16e6,maxTargetEntries:65536,maxPayloadCodeUnits:16e6};function E7(e,t,n,r,i,o){let{fn:a,mem:s}=e,l=h3(s,(e,t)=>a.FPDFBookmark_GetTitle(n,e,t))??"",u=0n!==a.FPDFBookmark_GetFirstChild(t,n),d=a.FPDFBookmark_GetStyle(n),{action:c,target:f,complete:m}=function(e,t,n,r){let{fn:i,mem:o}=e,a=i.FPDFBookmark_GetAction(n);if(a)try{let e=F8(i,o,t,i.EPDFAction_LoadModel(a),r);return{action:e,target:e?Pr(e):{kind:"unsupported"},complete:null!==e&&!e.incomplete}}catch(e){if(!N.is(e))throw e;return{action:null,target:{kind:"unsupported"},complete:!1}}let s=i.FPDFBookmark_GetDest(t,n);if(!s)return{action:null,target:null,complete:!0};let l=F2(i,o,t,s);return{action:null,target:l?{kind:"goto",destination:l}:{kind:"unsupported"},complete:!0}}(e,t,n,o);return{item:{ref:nk(r),parent:0===i?null:nk(i),title:l,target:f,action:c,open:u&&a.FPDFBookmark_GetCount(n)>0,color:function(e,t){let{fn:n,mem:r}=e;return h0(r,[4,4,4],([e,i,o])=>{if(!n.FPDFBookmark_GetColor(t,e,i,o))return null;let a=e=>Math.min(255,Math.max(0,Math.round(255*F0(r,e))));return e7(a(e),a(i),a(o))})}(e,n),bold:(2&d)!=0,italic:(1&d)!=0},complete:m}}var E9=class{constructor(e,t){this.runtime=e,this.session=t}read(e){let{fn:t}=this.runtime,n=this.session.requireDocPtr(),r=new F4(E8),i=[],o=new Set,a=!1,s=(l,u,d)=>{for(let c=t.FPDFBookmark_GetFirstChild(n,l);c;c=t.FPDFBookmark_GetNextSibling(n,c)){hW(e);let l=t.EPDFOutline_GetObjectNumber(c);if(!l){a=!0;continue}if(o.has(l)){a=!0;break}if(i.length>=5e4)return a=!0,!1;o.add(l);let f=E7(this.runtime,n,c,l,u,r);if(i.push(f.item),f.complete||(a=!0),0n!==t.FPDFBookmark_GetFirstChild(n,c)){if(d+1>=128){a=!0;continue}if(!s(c,l,d+1))return!1}}return!0};return s(0n,0,0),{items:i,incomplete:a}}readItem(e,t){let n=this.session.requireDocPtr(),r=this.runtime.fn.EPDFOutline_GetItem(n,e);if(!r)throw new N(G.NotFound,`no outline item ${e}`,{details:{field:"ref"}});return E7(this.runtime,n,r,e,t,new F4(E8)).item}},Ae=/^#[0-9a-fA-F]{6}$/;function At(e){let t=(e,t)=>{throw new N(G.InvalidArg,t,{details:{field:e}})};void 0!==e.title&&("string"!=typeof e.title&&t("title","a title is a string"),e.title.length>32767&&t("title","a title holds at most 32767 characters")),null==e.color||Ae.test(e.color)||t("color","expected a color as \'#rrggbb\'");let n=e.target;null==n||"goto"===n.kind||"uri"===n.kind||"named"===n.kind&&["NextPage","PrevPage","FirstPage","LastPage"].includes(n.name??"")||t("target",`a \'${n.kind}\' target can\'t be written`)}function An(e,t,n,r){let{fn:i,mem:o}=e,a=(e,t)=>{if(!e)throw new N(G.Unknown,`the ${t} of outline item ${n} could not be written`)};if(void 0!==r.title&&a(h5(o,r.title,e=>i.EPDFOutline_SetTitle(t,n,e)),"title"),void 0!==r.target){let e=null===r.target?0n:Pi(i,o,t,r.target);a(i.EPDFOutline_SetAction(t,n,e),"target")}if(void 0!==r.color)if(null===r.color)a(i.EPDFOutline_SetColor(t,n,!1,0,0,0),"colour");else{let{r:e,g:o,b:s}=e9(r.color);a(i.EPDFOutline_SetColor(t,n,!0,e/255,o/255,s/255),"colour")}if(void 0!==r.bold||void 0!==r.italic){let e=i.FPDFBookmark_GetStyle(i.EPDFOutline_GetItem(t,n));void 0!==r.bold&&(e=r.bold?2|e:-3&e),void 0!==r.italic&&(e=r.italic?1|e:-2&e),a(i.EPDFOutline_SetStyle(t,n,e),"style")}void 0!==r.open&&a(i.EPDFOutline_SetOpen(t,n,r.open),"open state")}var Ar=class{constructor(e,t){this.runtime=e,this.session=t,hJ(this,"reader",void 0),this.reader=new E9(e,t)}tree(){return new E4(this.runtime.fn,this.session.requireDocPtr())}create(e,t,n,r){At(n);let i=this.tree(),o=this.parentNumberOf(i,e),a=i.childrenOf(o),s=nP(a.map(nk),t,Ai),l=0===s?0:a[s-1];void 0!==r&&this.session.claimObjectNumber(r);let{fn:u,mem:d}=this.runtime,c=this.session.requireDocPtr(),f=h5(d,n.title,e=>u.EPDFOutline_CreateItem(c,r??0,o,l,e));if(!f)throw Aa("create the item");let{title:m,...p}=n;An(this.runtime,c,f,p);let h=this.reader.readItem(f,o);return{item:h,order:this.orderOf(this.tree(),o),meta:this.meta([h.ref])}}update(e,t){At(t);let n=this.tree(),r=this.requireItem(n,e,"ref");return An(this.runtime,this.session.requireDocPtr(),e.objectNumber,t),{item:this.reader.readItem(e.objectNumber,r),meta:this.meta([e])}}move(e,t,n){let r=this.tree(),i=e.map(e=>(this.requireItem(r,e,"refs"),e.objectNumber)),o=new Set(i);for(let e of(o.size!==i.length&&Ao("refs","an item is named twice"),i))i.some(t=>t!==e&&r.isAtOrUnder(e,t))&&Ao("refs",`item ${e} is under another item that moves`);let a=this.parentNumberOf(r,t);i.some(e=>r.isAtOrUnder(a,e))&&Ao("parent","an item would go under itself");let s=r.childrenOf(a).filter(e=>!o.has(e)),l="start"===n||"end"===n?null:"before"in n?n.before:n.after;l&&o.has(l.objectNumber)&&Ao("position",`the neighbour ${l.objectNumber} is one of the items that move`);let u=nP(s.map(nk),n,Ai),d=0===u?0:s[u-1];return this.place(i.map(e=>{let t={item:e,parent:a,after:d};return d=e,t}),r)}place(e,t=this.tree()){let{fn:n}=this.runtime,r=this.session.requireDocPtr(),i=new Set;for(let{item:o,parent:a,after:s}of e){i.add(t.parentOf(o)??0),i.add(a);let e=this.tree(),l=s&&e.parentOf(s)===a?s:0;if(!n.EPDFOutline_MoveItem(r,o,a,l))throw Aa(`move item ${o}`)}let o=this.tree();return{orders:[...i].map(e=>this.orderOf(o,e)),meta:this.meta(e.map(({item:e})=>nk(e)))}}placementsOf(e,t=this.tree()){let n=new Set(e);return t.items().filter(e=>n.has(e)).map(e=>{let n=t.parentOf(e),r=t.childrenOf(n),i=r.indexOf(e);return{item:e,parent:n,after:i>0?r[i-1]:0}})}delete(e){let t=this.tree();this.requireItem(t,e,"ref");let n=t.subtreeOf(e.objectNumber);if(!this.runtime.fn.EPDFOutline_DeleteItem(this.session.requireDocPtr(),e.objectNumber))throw Aa(`delete item ${e.objectNumber}`);return{meta:this.meta(n.map(nk))}}restored(e){let t=this.tree(),n=t.parentOf(e);if(void 0===n)throw Aa(`restore item ${e}`);let r=this.subtree(e,t);return{items:r,order:this.orderOf(t,n),meta:this.meta(r.map(e=>e.ref))}}find(e,t=this.tree()){let n=t.parentOf(e.objectNumber);return void 0===n?null:this.reader.readItem(e.objectNumber,n)}subtree(e,t=this.tree()){return t.subtreeOf(e).map(e=>this.reader.readItem(e,t.parentOf(e)))}updated(e){let t=this.find(e);if(!t)throw Aa(`read item ${e.objectNumber}`);return{item:t,meta:this.meta([e])}}countAgain(e){let t=this.find(e);t&&An(this.runtime,this.session.requireDocPtr(),e.objectNumber,{open:t.open})}parentNumberOf(e,t){return null===t?0:(this.requireItem(e,t,"parent"),(e.levelOf(t.objectNumber)??0)>=127&&Ao("parent",`an item under ${t.objectNumber} would be deeper than reads go`),t.objectNumber)}requireItem(e,t,n){let r=e.parentOf(t.objectNumber);if(void 0===r)throw new N(G.NotFound,`no outline item ${t.objectNumber}`,{details:{field:n}});return r}orderOf(e,t){return{parent:0===t?null:nk(t),children:e.childrenOf(t).map(nk)}}meta(e){return{affectedPages:[],cacheDelta:null,...this.session.writeStamp(),changedRefs:e}}},Ai=e=>String(e.objectNumber);function Ao(e,t){throw new N(G.InvalidArg,t,{details:{field:e}})}function Aa(e){return new N(G.MalformedPdf,`could not ${e}: the outline holds an item that isn\'t an indirect object`)}var As=["title","target","color","bold","italic","open"],Al=["A","Dest"],Au=e=>new Ar(e.runtime,e.session);function Ad(e,t,n,r){var i,o,a;let s,l=yJ(e.runtime,e.session,[{objectNumber:t.objectNumber,deep:Al}]),u=Au(e).update(t,n),d=yQ(e.runtime,e.session,l);return{item:{type:"outline.update",...u},reverse:[{kind:"objects.revert",reports:"outline.update",objects:d,subject:{outlineItem:t},fallback:(i=r,o=u.item,a=n,{kind:"outline",restore:Object.fromEntries((s=As.filter(e=>void 0!==a[e]&&!yV(i[e],o[e]))).map(e=>[e,i[e]])),left:Object.fromEntries(s.map(e=>[e,o[e]]))})}]}}function Ac(e,t){var n,r,i;let o=Au(e),a=o.tree(),s=a.parentOf(t.objectNumber),l=Af(e,a,[t.objectNumber]),u=(n=e.runtime,r=e.session.requireDocPtr(),i=t.objectNumber,yz(n,`outline item ${i}`,e=>n.fn.EPDFOutline_ExportItemRawToOwnedBuffer(r,i,e)));return{item:{type:"outline.delete",...o.delete(t)},reverse:[{kind:"outline.restore",ref:t,parent:void 0===s||0===s?null:nk(s),capture:u},...l]}}function Af(e,t,n){let r=new Set(n),i=new Set(n.map(e=>t.parentOf(e)??0));return i.delete(0),[...i].flatMap(n=>{let i=t.childrenOf(n);return i.every(e=>r.has(e))&&Au(e).find(nk(n),t)?.open?[{kind:"outline.reopen",ref:nk(n),children:i}]:[]})}function Am(e,t){return yQ(e.runtime,e.session,t.map(e=>({objectNumber:e.objectNumber,deep:[],before:null})))}function Ap(e,t){let n=Au(e).find(t);if(!n)throw new N(G.NotFound,`no outline item ${t.objectNumber}`,{details:{field:"ref"}});return n}var Ah=["Annots","Contents","Resources"],AF=["Parent","Rotate"];function Ag(e,t){let n=e.session.pagePool();n.closeIdle();try{return t()}finally{n.closeIdle()}}var A_=e=>new gw(e.runtime,e.session),AP=e=>new gG(e.runtime,e.session);function AD(e,t,n){let r="pages.insertBlank"!==t,i=Aw(e),o=r?EB(e):new Set,a=n();r&&e.session.invalidateDerived();let s=r?[...EB(e)].filter(e=>!o.has(e)):[],l=a.insertedPages.map(e=>e.objectNumber),u=AA(e,i,r0(i,AO(e).indexOf(l[0]),l.length));return{item:{type:t,...a,...AS(e,u)},reverse:[Ay(e,l,u,s)]}}function Ab(e,t,n){let r=e.session.requireDocPtr(),i=AO(e),o=Aw(e),a=t.map(t=>{var n;return{page:t,capture:(n=e.runtime,yz(n,`page ${t}`,e=>n.fn.EPDFPage_ExportRawToOwnedBuffer(r,t,e)))}}),s=t.map(q),l=A_(e).delete(s,e.signal);e.session.invalidateDerived();let u=AA(e,o,AE(o,rY(o,i.length,t.map(e=>i.indexOf(e))),n));return{item:{type:"pages.delete",pages:s,...l,...AS(e,u)},reverse:[{kind:"pages.restore",pages:a,...u?{labels:u}:{}}]}}function Ay(e,t,n,r=[]){return{kind:"pages.remove",pages:t.map(t=>({page:t,left:Ak(e,t)})),...n?{labels:n}:{},...r.length>0?{fields:r}:{}}}function Aw(e){return gp(e.runtime,e.session.requireDocPtr())}function AE(e,t,n){return n&&r1(e,n.left)?n.sections:t}function AA(e,t,n){if(!r1(t,n))return!function(e,t,n){let{fn:r,mem:i}=e;if(!h1(i,n.map(e=>e.firstPage),o=>h1(i,n.map(e=>gm.indexOf(e.style)),a=>h1(i,n.map(e=>e.firstNumber),i=>gf(e,n.map(e=>e.prefix),(e,n)=>r.EPDFDoc_SetPageLabelSections(t,o,a,i,e,n))))))throw new N(G.Unknown,"EPDFDoc_SetPageLabelSections refused",{details:{sections:n.length}})}(e.runtime,e.session.requireDocPtr(),n),{sections:t,left:n}}function Av(e,t,n,r){var i,o,a;return t.every((e,t)=>n[t]===e)?e:(i=t.length,o=r.map(e=>t.indexOf(e)),a=n.indexOf(r[0]),r0(rY(e,i,o),a,o.length))}function AS(e,t){return t?{layout:AI(e)}:{}}function Ak(e,t){let{fn:n,mem:r}=e.runtime,i=e.session.requireDocPtr(),o=yR(e.runtime,i,t,Ah,AF),a=e.session.allRecords().find(e=>e.pageObjectNumber===t),s=a?g_(e.runtime,i,a.pageIndex):0,l=new TextEncoder().encode(`\nturn ${s}`),u=new Uint8Array(o.byteLength+l.byteLength);return u.set(o),u.set(l,o.byteLength),Db(n,r,u)}function Ax(e,t){return AG(e,t).map(t=>({page:t,after:e[e.indexOf(t)-1]??0}))}function AG(e,t){return[...t].sort((t,n)=>e.indexOf(t)-e.indexOf(n))}function AO(e){return e.session.allRecords().map(e=>e.pageObjectNumber)}function AI(e){return new gh(e.runtime,e.session).read(e.signal)}function AN(e){return new Map(e.pages.map(e=>[e.ref.objectNumber,e.rotation]))}function AC(e){return{affectedPages:[],cacheDelta:null,...e.session.writeStamp()}}var Aj=class{constructor(e,t){this.runtime=e,this.session=t}setScale(e,t,n){if(hW(n),null!==t)try{tV(t)}catch(e){throw new N(G.InvalidArg,e.message)}let{fn:r,mem:i}=this.runtime,o=this.session.requireDocPtr(),a=this.session.recordByObjectNumber(e).pageIndex,s=[];for(let e=0;er.EPDFViewport_GetName(t,e,n))!==nb)continue;let n=r.EPDFViewport_GetMeasure(t);n&&1!==r.EPDFMeasure_GetSubtype(n)||s.push(e)}finally{r.EPDFViewport_Close(t)}}let l=hY(i,16,e=>gg(r,i,o,a,e).crop);if(![l.left,l.right,l.bottom,l.top].every(Number.isFinite))throw new N(G.InvalidArg,"Invalid calibration box");if(hW(n),null===t){for(let e of s.reverse())gr(r.EPDFPage_RemoveViewportRaw(o,a,e));return}hY(i,16,e=>{i.poke(e,"f32",l.left),i.poke(e,"f32",l.top,4),i.poke(e,"f32",l.right,8),i.poke(e,"f32",l.bottom,12);let n=s.length?r.EPDFPage_GetViewportRaw(o,a,s[s.length-1]):r.EPDFPage_AddViewportRaw(o,a,e);gr(n);try{gr(r.EPDFViewport_SetBBox(n,e)),gr(h6(i,nb,e=>r.EPDFViewport_SetName(n,e))),gs(r,i,r.EPDFViewport_AddMeasure(n),t)}finally{r.EPDFViewport_Close(n)}})}};function AM(e,t,n){new Aj(e.runtime,e.session).setScale(t,n,e.signal)}function AR(e,t){return{page:t,layout:new gh(e.runtime,e.session).read(e.signal),meta:{affectedPages:[],cacheDelta:null,...e.session.writeStamp()}}}function AT(e,t){let{fn:n,mem:r}=e.runtime,i=e.session.recordByObjectNumber(t).pageIndex,o=gl(n,r,e.session.requireDocPtr(),i).filter(e=>e.owned).pop();return o?.measure?.subtype==="rectilinear"?o.measure:null}function AB(e,t){let{fn:n,mem:r}=e.runtime,i=e.session.recordByObjectNumber(t).pageIndex;return hY(r,16,t=>gg(n,r,e.session.requireDocPtr(),i,t).crop)}var AL={opInFileSpace:e=>e,itemOut:e=>e},A$=class{constructor(e,t,n,r=nI){this.runtime=e,this.session=t,this.fonts=n,this.limits=r}apply(e,t,n,r){let i=this.context(t,n,t=>e.some(e=>{if("forms.setValue"!==e.type&&"forms.setAppearanceText"!==e.type)return!1;let n=EV(t,e.field);return null!==n&&o8(t.authority,n.field.assignment,"fill")}));return Az(this.session,t,e.map((e,t)=>()=>(function(e,t,n){var r,i,o,a;switch(t.type){case"annotations.create":if("widget"===t.data.subtype)throw new N(G.InvalidArg,"a widget is the form\'s: create one with doc.forms.create or doc.forms.addWidget",{details:{field:"subtype"}});oY(e.authority,o0(t.data.subtype));let s=o2(e.authority,t.data.subtype,t.data.groupId),l=e.session.resolvePageRef(t.page).pageObjectNumber,u=wu(e).create(l,t.data,e.signal,{...s?{actor:s}:{},...t.resources?{resources:t.resources}:{},...void 0!==t.objectNumber?{objectNumber:t.objectNumber}:{}});return{item:{type:"annotations.create",page:t.page,...u},reverse:[{kind:"annotation.remove",ref:u.annotation.ref,left:[u.annotation]}]};case"annotations.import":let d,c;return(d="restore"===t.attribution?"import":void 0)&&we(e.authority),{item:{type:"annotations.import",...c=new yN(e.runtime,e.session,e.fonts).import({bundle:t.bundle,...void 0!==t.pages?{pages:t.pages}:{},attribution:t.attribution,...t.actor?{actor:t.actor}:{},limits:t.limits,authorizeCreate:t=>{oY(e.authority,o0(t.subtype)),d||o2(e.authority,t.subtype,t.groupId??void 0)}},e.signal)},reverse:y9(e,c.annotations,d)};case"annotations.update":let f=wd(e,t.ref);if("widget"===f.subtype)throw new N(G.InvalidArg,"a widget is the form\'s: change its place and look with doc.forms.updateWidget");return oY(e.authority,o0(f.subtype)),yK(n,f,t.expect),wt(e,f,t.patch.nm),wa(e,t.ref,t.patch,"annotations.update",t.resources);case"annotations.delete":let m=wd(e,t.ref);if("widget"===m.subtype){let e;throw i=m,e=i.field?.kind==="objectNumber"&&"objectNumber"===i.ref.kind&&i.field.objectNumber===i.ref.objectNumber,new N(G.InvalidArg,e?"widget is its form field\'s own dictionary (a merged field/widget) - delete the field with doc.forms.delete":i.field?"widget is attached to a form field - use doc.forms.removeWidget or doc.forms.delete":"a widget is the form\'s: it isn\'t deleted as an annotation")}return oY(e.authority,o0(m.subtype)),yK(n,m,t.expect),wl(e,t.ref);case"annotations.reorder":let p;return p=y6(y3(e.runtime,e.session,t.page),"annotations",t.refs,t.position),wi(e,"annotations",t.refs),y5(e.runtime,e.session,p),wn(e,p,t.refs);case"annotations.copy":let h;return oQ(e.authority,"doc.annotate.read"),{item:{type:"annotations.copy",...h=new y1(e.runtime,e.session,e.fonts).copy({refs:t.refs,...t.page?{page:t.page}:{},...t.offset?{offset:t.offset}:{},...t.objectNumbers?{objectNumbers:t.objectNumbers}:{},read:t=>wd(e,t),authorizeCreate:t=>(oY(e.authority,o0(t.subtype)),o2(e.authority,t.subtype,void 0)),limits:e.limits},e.signal)},reverse:y9(e,h.annotations,void 0)};case"forms.setValue":let F;return F=E$(e,t.field),EE(e,F),yK(n,EQ(F.field),t.expect),Ex(e,F,t.value);case"forms.setDisplay":let g;return g=E$(e,t.field),function(e,t){if(!o8(e.authority,t.field.assignment,"fill")){if(e.fillsOwnField())return oY(e.authority,"doc.forms.fill");o4(e.authority,t.field.assignment,"fill")}}(e,g),EG(e,"forms.setDisplay",n=>n.setDisplay(t.field,t.display,e.signal),g);case"forms.setAppearanceText":let _;return _=E$(e,t.field),EE(e,_),EG(e,"forms.setAppearanceText",n=>n.setAppearanceText(t.field,t.text,e.signal),_);case"forms.reset":return function(e,t){EA(e);let n=t.fields?t.fields.map(t=>E$(e,t)):Eq(e).filter(({field:e})=>Em.has(e.kind));for(let t of n)o4(e.authority,t.field.assignment,"fill");let r=yJ(e.runtime,e.session,n.flatMap(EH)),i=new Et(e.runtime,e.session,e.fonts).reset(t.fields?[...t.fields]:void 0,e.signal),o=yQ(e.runtime,e.session,r),a=new Set(i.fields.map(e=>EK(e.ref))),s={type:"forms.reset",...E0(e,i)};return 0===a.size?{item:s,reverse:[]}:{item:s,reverse:[{kind:"objects.revert",reports:"forms.reset",objects:o,subject:{fields:[...a]},fallback:{kind:"value",fields:n.filter(({objectNumber:e})=>a.has(e)).map(({objectNumber:e,field:t})=>({objectNumber:e,before:EQ(t),left:EQ(i.fields.find(t=>EK(t.ref)===e))}))}}]}}(e,t);case"forms.create":return function(e,t){var n;oQ(e.authority,"doc.forms.modify"),(T((n=t.draft).actions)||(n.widgets??[]).some(e=>T(e.actions)))&&oQ(e.authority,"doc.forms.script"),o7(e.authority,ee(t.draft));let{field:r,calculationOrder:i}=new Et(e.runtime,e.session,e.fonts).createField(t.draft,e.signal,e.authority.identity,{...void 0!==t.objectNumber?{objectNumber:t.objectNumber}:{},...t.widgetObjectNumbers?{widgetObjectNumbers:t.widgetObjectNumbers}:{}});return{item:{type:"forms.create",...EX(e,r),...EC(i)},reverse:[ES(e,r)]}}(e,t);case"forms.copy":let P,D;return oQ(e.authority,"doc.forms.modify"),D=(P=new Eu(e.runtime,e.session,e.fonts).copy({fields:t.fields,...t.widgets?{widgets:t.widgets}:{},...t.page?{page:t.page}:{},...t.offset?{offset:t.offset}:{},values:t.values??!0,...t.objectNumbers?{objectNumbers:t.objectNumbers}:{},actor:e.authority.identity,mayScript:oX(e.authority,"doc.forms.script"),assignmentOf:t=>Ev(e,t),limits:e.limits},e.signal)).fields.map(t=>ES(e,t)),{item:{type:"forms.copy",...P},reverse:D.reverse()};case"forms.repeat":return function(e,t){oQ(e.authority,"doc.forms.modify");let n=new Ec(e.runtime,e.session,e.fonts),r=n.plan({field:t.field,pages:t.pages,...t.as?{as:t.as}:{},...t.objectNumbers?{objectNumbers:t.objectNumbers}:{},mayScript:oX(e.authority,"doc.forms.script"),limits:e.limits},e.signal),i=[...r.dropped];if(0===r.pages.length){let t=y4(e.session.writeStamp(),[],[]);return{item:{type:"forms.repeat",as:r.as,fields:[],widgets:[],dropped:i,meta:t},reverse:[]}}if("fields"===r.as){let o=n.createFields(r,{...t.objectNumbers?{objectNumbers:t.objectNumbers}:{},actor:e.authority.identity,assignmentOf:t=>Ev(e,t)},e.signal);return{item:{type:"forms.repeat",as:"fields",...o,dropped:i},reverse:[{kind:"fields.repeat",direction:"remove",left:o.fields,guards:o.fields.map(t=>EP(e,t.widgets)),captures:[]}]}}let o=E$(e,t.field),{split:a,mergedEntry:s}=Eh(e,o),l=yJ(e.runtime,e.session,[{objectNumber:o.objectNumber,deep:Ef}]),{added:u,split:d}=n.addBoxes(r,t.objectNumbers,e.signal),c=EF(e,"forms.repeat",o.objectNumber,l,u,{merged:a,mergedEntry:s,widget:d[0]??null});return{item:Ey(e,o.objectNumber,[...Eg(c),...u],i),reverse:[c]}}(e,t);case"forms.update":let b,y;return oQ(e.authority,"doc.forms.modify"),T(t.patch.actions)&&oQ(e.authority,"doc.forms.script"),b=E$(e,t.field),y=et(t.patch,b.field),r=b.field.assignment,(Y(y)!==Y(r)||y.kind!==r.kind)&&o7(e.authority,y),yK(n,EZ(b.field),t.expect),EO(e,b,t.patch);case"forms.delete":let w;return oQ(e.authority,"doc.forms.modify"),yK(n,(w=E$(e,t.field)).field,t.expect),ET(e,w);case"forms.addWidget":return function(e,t){oQ(e.authority,"doc.forms.modify"),T(t.placement.actions)&&oQ(e.authority,"doc.forms.script");let n=E$(e,t.field),{split:r,mergedEntry:i}=Eh(e,n),o=yJ(e.runtime,e.session,[{objectNumber:n.objectNumber,deep:Ef}]),{field:a,widget:s}=new Et(e.runtime,e.session,e.fonts).addWidget(t.field,t.placement,e.signal,{...void 0!==t.objectNumber?{objectNumber:t.objectNumber}:{},...void 0!==t.splitObjectNumber?{splitObjectNumber:t.splitObjectNumber}:{}}),l=new Set(n.field.widgets.map(e=>e.objectNumber)),u=a.widgets.filter(e=>!l.has(e.objectNumber)),d=u.find(e=>e.objectNumber!==s.objectNumber)??null,c=EF(e,"forms.addWidget",n.objectNumber,o,u.filter(e=>e.objectNumber===s.objectNumber),{merged:r,mergedEntry:i,widget:d});return{item:{type:"forms.addWidget",...E0(e,{field:a,meta:y4(e.session.writeStamp(),[a.ref],u)})},reverse:[c]}}(e,t);case"forms.removeWidget":let E,A,v,S,k;return oQ(e.authority,"doc.forms.modify"),E=E$(e,t.field),A="objectNumber"===t.widget.kind?t.widget.objectNumber:0,v=yJ(e.runtime,e.session,[{objectNumber:E.objectNumber,deep:[]},{objectNumber:A,deep:[]}]),S=new Et(e.runtime,e.session,e.fonts).detachWidget(t.field,t.widget,e.signal),k=yQ(e.runtime,e.session,v),{item:{type:"forms.removeWidget",...E0(e,{field:S.field,meta:y4(e.session.writeStamp(),[S.field.ref],[S.widget])})},reverse:[EL("forms.addWidget",k,[E.objectNumber])]};case"forms.deleteWidget":oQ(e.authority,"doc.forms.modify");let x=wd(e,t.widget);if("widget"!==x.subtype)throw new N(G.InvalidArg,`${x.subtype} is not a widget: delete it with page.annotations.delete`,{details:{field:"widget"}});return yK(n,x,t.expect),Ek(e,x);case"forms.updateWidget":oQ(e.authority,"doc.forms.modify"),T(t.patch.actions)&&oQ(e.authority,"doc.forms.script");let O=wd(e,t.widget);if("widget"!==O.subtype)throw new N(G.InvalidArg,`${O.subtype} is not a widget: change it with doc.annotations.update`,{details:{field:"widget"}});return yK(n,O,t.expect),wt(e,O,t.patch.nm),wa(e,t.widget,{...t.patch,subtype:"widget"},"forms.updateWidget");case"forms.reorderWidgets":let I;return oQ(e.authority,"doc.forms.modify"),I=y6(y3(e.runtime,e.session,t.page),"widgets",t.widgets,t.position),y5(e.runtime,e.session,I),wn(e,I,t.widgets);case"forms.reorderCalculations":return function(e,t){oQ(e.authority,"doc.forms.modify");let{before:n,after:r,moved:i}=new Et(e.runtime,e.session,e.fonts).reorderCalculations(t.fields,t.position,e.signal);return{item:Ew(e,r,i),reverse:[Ej({before:n,after:r})]}}(e,t);case"forms.setSignatureAppearance":let C;return C=E$(e,t.field),o4(e.authority,C.field.assignment,"sign"),ER(e,C,"forms.setSignatureAppearance",()=>new Et(e.runtime,e.session,e.fonts).setSignatureAppearance(t.field,iE(t.appearance),e.signal));case"forms.setButtonImage":let j;return j=E$(e,t.field),o4(e.authority,j.field.assignment,"fill"),ER(e,j,"forms.setButtonImage",()=>new Et(e.runtime,e.session,e.fonts).setButtonImage(t.field,function(e){if(null===e)return null;if(ArrayBuffer.isView(e))return e;throw new N(G.InvalidArg,"a push button\'s image reaches a write as bytes, never as a Blob")}(t.image),e.signal));case"forms.import":let M,R,B;return oQ(e.authority,"doc.forms.modify"),M=function(e,t){if("restore"===t.attribution)return oQ(e.authority,"doc.forms.import"),"import"}(e,t),B=(R=new Ed(e.runtime,e.session,e.fonts).import({bundle:t.bundle,...void 0!==t.pages?{pages:t.pages}:{},attribution:t.attribution,values:t.values??!0,actor:t.actor??{},limits:t.limits,mayScript:(t.mayScript??!1)&&oX(e.authority,"doc.forms.script"),assignmentOf:t=>M?t:Ev(e,t)},e.signal)).fields.map(t=>ES(e,t,M)),{item:{type:"forms.import",...R},reverse:B.reverse()};case"forms.importValues":return function(e,t){EA(e);let n=new Ed(e.runtime,e.session,e.fonts),r=n.planValues(t.bundle,t.limits,e.signal,t=>o8(e.authority,t.assignment,"fill")),i=[],o=[];for(let t of r.writes){let r={objectNumber:EK(t.target.ref),field:t.target},a=yJ(e.runtime,e.session,EH(r)),s=n.writeValue(t,e.signal),l=yQ(e.runtime,e.session,a);i.push(s),o.push({...EL("forms.setValue",l,[r.objectNumber]),fallback:{kind:"value",fields:[{objectNumber:r.objectNumber,before:EQ(t.target),left:EQ(s)}]}})}return{item:{type:"forms.importValues",...E0(e,{fields:i,dropped:[...r.dropped],meta:y4(e.session.writeStamp(),i.map(e=>e.ref),i.flatMap(e=>e.widgets))})},reverse:o.reverse()}}(e,t);case"metadata.update":let L,$;return oQ(e.authority,"doc.metadata.modify"),yK(n,L=new FF(e.runtime,e.session).read(e.signal),t.expect),{item:{type:"metadata.update",...$=new FZ(e.runtime,e.session).update(t.patch,e.signal)},reverse:[E2("metadata.update",Object.keys(t.patch),L,$.metadata)]};case"metadata.updateCustom":let z,U;return oQ(e.authority,"doc.metadata.modify"),z=new FF(e.runtime,e.session).readCustom(e.signal),{item:{type:"metadata.updateCustom",...U=new FZ(e.runtime,e.session).updateCustom(t.patch,e.signal)},reverse:[E2("metadata.updateCustom",Object.keys(t.patch),z,U.custom)]};case"outline.create":oQ(e.authority,"doc.outline.modify");let V=Au(e).create(t.parent,t.position??"end",t.data,t.objectNumber);return{item:{type:"outline.create",...V},reverse:[{kind:"outline.remove",ref:V.item.ref,left:Am(e,[V.item.ref])}]};case"outline.update":oQ(e.authority,"doc.outline.modify");let W=Ap(e,t.ref);return yK(n,W,t.expect),Ad(e,t.ref,t.patch,W);case"outline.move":let q,H,K,Z,J,Q,X;return o=e,a=t,oQ(o.authority,"doc.outline.modify"),H=(q=Au(o)).tree(),K=a.refs.map(e=>e.objectNumber),Z=q.placementsOf(K,H),J=Af(o,H,K),Q=q.move(a.refs,a.parent,a.position),X=a.parent?.objectNumber??0,{item:{type:"outline.move",...Q},reverse:[{kind:"outline.move",placements:Z,left:K.map(e=>({item:e,parent:X}))},...J]};case"outline.delete":return oQ(e.authority,"doc.outline.modify"),yK(n,Ap(e,t.ref),t.expect),Ac(e,t.ref);case"pages.rotate":return Ag(e,()=>{var n,r;let i,o,a;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),i=AN(AI(n)),o=A_(n).rotate([...r.pages],r.rotation,n.signal),a=r.pages.map(e=>e.objectNumber),{item:{type:"pages.rotate",pages:[...r.pages],rotation:r.rotation,...o},reverse:function(e,t,n){let r=new Map;for(let n of e){let e=t.get(n);r.set(e,[...r.get(e)??[],n])}return[...r].map(([e,t])=>({kind:"pages.rotate",pages:t,rotation:e,left:n}))}(a,i,r.rotation)}});case"pages.setScale":return function(e,t){oQ(e.authority,"doc.annotate.modify");let n=t.pages.map(e=>e.objectNumber);if(new Set(n).size!==n.length)throw new N(G.InvalidArg,"pages.setScale names a page twice",{details:{field:"pages"}});let r=n.map(n=>{let r=AB(e,n),i=AT(e,n);return AM(e,n,t.measure&&nY(t.measure,r)),{page:n,box:r,before:i,left:AT(e,n)}}),i=new Map;for(let{page:e,box:t,before:n,left:o}of r){let r=JSON.stringify([n,o,t]),a=i.get(r)??{pages:[],measure:n,left:o};a.pages.push(e),i.set(r,a)}return{item:{type:"pages.setScale",pages:[...t.pages],measure:t.measure,...AR(e,t.pages[0])},reverse:[...i.values()].map(e=>({kind:"pages.setScale",...e}))}}(e,t);case"pages.reorder":return Ag(e,()=>{var n,r;let i,o,a,s,l,u,d;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),i=r.pages.map(e=>e.objectNumber),o=AO(n),a=Aw(n),s=Ax(o,i),l=A_(n).reorder([...r.pages],r.position,n.signal),u=AO(n),d=AA(n,a,Av(a,o,u,i)),{item:{type:"pages.reorder",...l,...AS(n,d)},reverse:[{kind:"pages.reorder",placements:s,left:Ax(u,i),...d?{labels:d}:{}}]}});case"pages.delete":return Ag(e,()=>{var n,r;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),Ab(n,AG(AO(n),n.session.resolvePageRefs(r.pages)))});case"pages.insertBlank":return Ag(e,()=>{var n,r;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),AD(n,"pages.insertBlank",()=>AP(n).insertBlank(r.spec,r.position??"end",n.signal,r.objectNumbers))});case"pages.insert":return Ag(e,()=>{var n,r;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),AD(n,"pages.insert",()=>{var e;return AP(n).insert(0===(e=r.source).byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.slice().buffer,r.position??"end",n.signal,r.objectNumbers)})});case"pages.copy":return Ag(e,()=>{var n,r;return n=e,r=t,oQ(n.authority,"doc.pages.assemble"),AD(n,"pages.copy",()=>AP(n).copy(r.pages,r.position??"end",n.signal,r.objectNumbers))});case"attachments.create":oQ(e.authority,"doc.attachments.modify");let en=wF(e).create(t.file,t.resources.file,e.signal);return{item:{type:"attachments.create",...en},reverse:[w_(e,en.attachment.ref)]};case"attachments.delete":return oQ(e.authority,"doc.attachments.modify"),wg(e,t.ref)}})(i,r.opInFileSpace(e),t)),r,n)}undo(e,t,n,r){let i=this.context(t,n,t=>e.steps.some(e=>"objects.revert"===e.kind&&("forms.setValue"===e.reports||"forms.setAppearanceText"===e.reports)&&"fields"in e.subject&&e.subject.fields.some(e=>{let n=EW(t,e);return null!==n&&o8(t.authority,n.field.assignment,"fill")})));return Az(this.session,t,e.steps.map(e=>()=>(function(e,t){var n,r,i,o;switch(t.kind){case"objects.revert":if("annotation"in t.subject)return function(e,t){var n,r,i;let o=t.subject.annotation,a=t.reports,s=(n=e,r=o,wf(n,r.page)?.find(e=>K(e.ref)===K(r))??null);if(!s)return yH(e,a);if(oY(e.authority,o0(s.subtype)),yX(e.runtime,e.session,t.objects)){o6(e.authority,s,void 0);let n=yY(e.runtime,e.session,t.objects);return{item:ws(e,a,o,{annotation:wd(e,o),appearance:{action:"restored",changed:t.appearanceChanged??!0},meta:yP(e.session.writeStamp(),o.page.objectNumber,[o])}),reverse:[{...t,objects:n,...(i=t.fallback,i?.kind!=="annotation"?i?{fallback:i}:{}:{fallback:{kind:"annotation",restore:i.left,left:i.restore}})}]}}let l=t.fallback;if(l?.kind!=="annotation")return yH(e,a);let u=l.left,d=l.restore,c=Object.keys(u),f=c.filter(e=>yV(s[e],u[e]));if(0===f.length)return yH(e,a);let m=wa(e,o,Object.fromEntries(f.map(e=>{let t;return[e,(t=d[e],"actions"===e&&"widget"===s.subtype?function(e){let t={};for(let n of z){let r=e?.[n];if(!r){t[n]=null;continue}let i=B(r);i&&(t[n]=i)}return t}(t):t)]})),a),p=c.filter(e=>!f.includes(e)),h=m.item;return 0===p.length||iA(h)||h.type!==a?m:{...m,item:{...h,skipped:p}}}(e,{...t,subject:t.subject});if("outlineItem"in t.subject)return function(e,t){let n=t.subject.outlineItem,r=Au(e),i=r.find(n);if(!i)return yH(e,"outline.update");if(oQ(e.authority,"doc.outline.modify"),yX(e.runtime,e.session,t.objects)){var o;let i=yY(e.runtime,e.session,t.objects);r.countAgain(n);let a=yQ(e.runtime,e.session,i);return{item:{type:"outline.update",...r.updated(n)},reverse:[{...t,objects:a,...(o=t.fallback,o?.kind!=="outline"?o?{fallback:o}:{}:{fallback:{kind:"outline",restore:o.left,left:o.restore}})}]}}let a=t.fallback;if(a?.kind!=="outline")return yH(e,"outline.update");let s=a.left,l=a.restore,u=Object.keys(s),d=u.filter(t=>yV(i[t],s[t])&&function(e,t,n){if("target"!==t||null===n)return!0;if("goto"===n.kind){let t=n.destination?.page.objectNumber;return e.session.allRecords().some(e=>e.pageObjectNumber===t)}return"uri"===n.kind||"named"===n.kind&&["NextPage","PrevPage","FirstPage","LastPage"].includes(n.name??"")}(e,t,l[t]));if(0===d.length)return yH(e,"outline.update");let c=Ad(e,n,Object.fromEntries(d.map(e=>[e,l[e]])),i),f=u.filter(e=>!d.includes(e));return 0===f.length||"outline.update"!==c.item.type?c:{...c,item:{...c.item,skipped:f}}}(e,{...t,subject:t.subject});return function(e,t){if(Ep.has(t.reports)){let n="forms.setSignatureAppearance"===t.reports?"sign":"fill";for(let r of(oY(e.authority,"sign"===n?"doc.sign":"doc.forms.fill"),t.subject.fields)){let t=EW(e,r);t&&("sign"===n?o4(e.authority,t.field.assignment,"sign"):EE(e,t))}}else oQ(e.authority,"doc.forms.modify");if(t.rights&&oQ(e.authority,"doc.forms.import"),yX(e.runtime,e.session,t.objects)){let n=yY(e.runtime,e.session,t.objects),r=t.subject.fields.map(t=>EU(e,t).field);return{item:E3(e,t.reports,r),reverse:[{...t,objects:n,...function(e){switch(e?.kind){case"value":return{fallback:{kind:"value",fields:e.fields.map(({objectNumber:e,before:t,left:n})=>({objectNumber:e,before:n,left:t}))}};case"properties":return{fallback:{...e,restore:e.left,left:e.restore}};default:return{}}}(t.fallback)}]}}if(t.fallback?.kind==="properties")return function(e,t){let n=EW(e,t.objectNumber);if(!n)return yH(e,"forms.update");let r=EZ(n.field),i=t.left,o=t.restore,a=Object.keys(i),s=a.filter(t=>{var a,s,l,u;let d;return yV(r[t],i[t])&&("name"!==t||(a=e,s=n.field.name,l=String(o.name),null===EV(a,{kind:"fqn",name:s.slice(0,s.lastIndexOf(".")+1)+l})))&&("actions"!==t||(u=i.actions,d=o.actions??{},Object.keys(u??{}).every(e=>void 0!==d[e])))&&("takesImage"!==t||!0!==o.takesImage||function(e,t){let n=e.session.requireDocPtr(),r=Pz(e.runtime,n,t.field.widgets,new PR(e.runtime,n)),i=r.filter(e=>null!==e);try{return rJ(i,r.length-i.length),!0}catch(e){if(N.is(e)&&e.code===G.InvalidArg)return!1;throw e}}(e,n))});if(0===s.length)return yH(e,"forms.update");let l=EO(e,n,EJ(o,s)),u=a.filter(e=>!s.includes(e)),d=l.item;return 0===u.length||iA(d)||"forms.update"!==d.type?l:{...l,item:{...d,skipped:u}}}(e,t.fallback);if(t.fallback?.kind!=="value")return yH(e,t.reports);let n=[],r=[];for(let{objectNumber:i,before:o,left:a}of t.fallback.fields){let t=EW(e,i);t&&yV(EQ(t.field),a)?n.push(Ex(e,t,o)):t&&r.push(t.field.name)}return 0===n.length?yH(e,t.reports):"forms.setValue"===t.reports&&1===n.length?n[0]:{item:{...E1(e,n.map(({item:e})=>e.field)),...r.length>0?{skipped:r}:{}},reverse:n.flatMap(e=>e.reverse)}}(e,{...t,subject:t.subject});case"annotation.remove":let a=wf(e,t.ref.page);if(!a)return yH(e,"annotations.delete");let s=tG(a,t.ref),l=new Map(t.left.map(e=>[K(e.ref),e]));if(!(s.length>0&&s.length===l.size&&s.every(e=>{let t=l.get(K(e.ref));return void 0!==t&&yV(e,t)})))return yH(e,"annotations.delete");for(let t of o1(s))oY(e.authority,t);return t.rights&&we(e.authority),wl(e,t.ref,t.rights);case"annotation.restore":return function(e,t){let n=wf(e,t.page),r=t.members[0];if(!n||!r||n.some(e=>K(e.ref)===K(r)))return yH(e,"annotations.restore");let{pageIndex:i,pageObjectNumber:o}=e.session.resolvePageRef(t.page);yj(e.runtime,e.session.requireDocPtr(),i,t.capture),e.session.invalidateDerived(),t.unlinked.length>0&&yX(e.runtime,e.session,t.unlinked)&&yY(e.runtime,e.session,t.unlinked);let a=wc(e,o),s=t.members.map(e=>{let t=a.find(t=>K(t.ref)===K(e));if(!t)throw Error(`a restored annotation is missing: ${K(e)}`);return t});for(let t of o1(s))oY(e.authority,t);return t.rights?we(e.authority):o5(e.authority,s),{item:{type:"annotations.restore",page:t.page,annotations:s,meta:yP(e.session.writeStamp(),o,t.members)},reverse:[{kind:"annotation.remove",ref:r,left:s,...t.rights?{rights:t.rights}:{}}]}}(e,t);case"annotation.reorder":return function(e,t){let n="annotations"===t.family?"annotations.reorder":"forms.reorderWidgets",r=function(e,t){try{return y3(e.runtime,e.session,t)}catch{return null}}(e,t.page);if(!r)return yH(e,n);let i=y2(r,t.family),o=t.refs.filter(e=>{let n=wr(i,e);return void 0!==n&&n===wr(t.after,e)});if(0===o.length)return yH(e,n);wi(e,t.family,o);let a=new Set(o.map(K)),s=new Set(i.map(K).filter(e=>!a.has(e))),l=r;for(let n of t.before.filter(e=>a.has(K(e)))){let r=t.before.findIndex(e=>K(e)===K(n)),i=t.before.slice(0,r).reverse().find(e=>s.has(K(e))),o=y6(l,t.family,[n],i?{after:i}:"start");y5(e.runtime,e.session,o),s.add(K(n)),l=y3(e.runtime,e.session,t.page)}let u=y2(l,t.family);return{item:wo(e,t.family,t.page,u,o),reverse:[{...t,refs:o,before:i,after:u}]}}(e,t);case"field.remove":let u;return oQ(e.authority,"doc.forms.modify"),t.rights&&oQ(e.authority,"doc.forms.import"),(u=EW(e,t.objectNumber))&&yV(u.field,t.left)&&yX(e.runtime,e.session,t.widgets??[])?ET(e,u,t.rights):yH(e,"forms.delete");case"field.restore":return function(e,t){if(oQ(e.authority,"doc.forms.modify"),t.rights&&oQ(e.authority,"doc.forms.import"),ac(Eb(e),t.name))return yH(e,"forms.restore");for(let n of t.pages)try{e.session.resolvePageRef(n)}catch{return yH(e,"forms.restore")}yL(e.runtime,e.session.requireDocPtr(),t.capture),e.session.invalidateDerived();let{field:n}=EU(e,t.objectNumber);return{item:{type:"forms.restore",...EX(e,n)},reverse:[ES(e,n,t.rights)]}}(e,t);case"widget.restore":let d;oQ(e.authority,"doc.forms.modify");try{d=e.session.resolvePageRef(t.page).pageIndex}catch{return yH(e,"forms.restoreWidget")}if(Ez(e,t.widget))return yH(e,"forms.restoreWidget");let c=t.detached.filter(e=>e.objectNumber===t.fieldObjectNumber);if(!yX(e.runtime,e.session,c))return yH(e,"forms.restoreWidget");yj(e.runtime,e.session.requireDocPtr(),d,t.capture),e.session.invalidateDerived(),t.detached.length>0&&yY(e.runtime,e.session,t.detached);let f=function(e,t){let n=wd(e,t);if("widget"!==n.subtype)throw Error(`${K(t)} reads as no widget`);return n}(e,t.widget),m=null===t.fieldObjectNumber?null:EU(e,t.fieldObjectNumber).field;return{item:{type:"forms.restoreWidget",field:m,widgets:[f],meta:y4(e.session.writeStamp(),m?[m.ref]:[],[(n=e,{ref:r=t.widget,objectNumber:wm(n,r),page:r.page})])},reverse:[{kind:"widget.delete",widget:t.widget,left:f}]};case"widget.delete":let p;return oQ(e.authority,"doc.forms.modify"),(p=Ez(e,t.widget))&&yV(p,t.left)?Ek(e,p):yH(e,"forms.deleteWidget");case"widgets.added":return function(e,t){let n,r,i,o;oQ(e.authority,"doc.forms.modify");let a="remove"===t.direction,s="forms.addWidget"===t.reports?"forms.removeWidget":"forms.repeat",l=a?s:t.reports;if(!yX(e.runtime,e.session,t.objects)||!yX(e.runtime,e.session,t.guards)||(i=ED(e,t.fieldObjectNumber),o=t.kids,!(null!==i&&i.length===o.length&&i.every((e,t)=>e===o[t]))))return yH(e,l);let{fn:u,mem:d}=e.runtime,c=e.session.requireDocPtr(),f=t=>{try{return e.session.resolvePageRef(t).pageIndex}catch{return null}},m=(e,t)=>u.EPDFPage_GetAnnotIndexByObjectNumberRaw(c,e,t),p=(e,t,n)=>{if(!u.EPDFPage_RemoveAnnotRaw(c,e,t))throw new N(G.Unknown,`${n} could not leave its page`)},h=(e,t,n)=>{let r=m(e,t);if(!(r<0)&&!(n<0)&&r!==n&&!hY(d,4,t=>(d.poke(t,"i32",r,0),u.EPDFPage_MoveAnnotsRaw(c,e,t,1,n))))throw new N(G.Unknown,"an annotation could not move")},F=t.fieldObjectNumber,{split:g}=t,_=E_(t),P=g?.merged.page?f(g.merged.page):null,D=[],b=[];if(a){for(let t of(b=_.map(t=>({objectNumber:t.objectNumber,capture:yM(e.runtime,c,t.objectNumber,Ef)})),_))if(!u.EPDFForm_DetachWidget(c,F,t.objectNumber))throw new N(G.Unknown,"a widget could not leave its field");let i=new Map;for(let e of t.added){if(!e.page)continue;let t=i.get(e.page.objectNumber)??[];t.push(e),i.set(e.page.objectNumber,t)}for(let[t,n]of i){let r=n[0].page;if(null===f(r))continue;gx(e.runtime,e.session,t);let i=f(r),o=n.map(e=>m(i,e.objectNumber)).filter(e=>e>=0).sort((e,t)=>e-t);if(0!==o.length)for(let t of(D.push({page:r,capture:yC(e.runtime,c,i,o)}),[...o].reverse()))p(i,t,"a widget")}if(g&&null!==P){let t=m(P,g.widget.objectNumber);t>=0&&(n=yC(e.runtime,c,P,[t]),p(P,t,"the split widget")),yj(e.runtime,c,P,g.mergedEntry),h(P,g.merged.objectNumber,t)}e.session.invalidateDerived(),r=yY(e.runtime,e.session,t.objects)}else{let n=t.captures.map(({page:e,capture:t})=>({pageIndex:f(e),capture:t}));if(n.some(({pageIndex:e})=>null===e)||g&&(null===P||!g.widgetEntry))return yH(e,l);if(g&&null!==P&&g.widgetEntry){let t=m(P,g.merged.objectNumber);t>=0&&(p(P,t,"the field"),function(e,t){try{yR(e.runtime,e.session.requireDocPtr(),t,[])}catch{throw new N(G.Unknown,`object ${t} went with its entry on the page`)}}(e,g.merged.objectNumber)),yj(e.runtime,c,P,g.widgetEntry),h(P,g.widget.objectNumber,t)}for(let{pageIndex:t,capture:r}of n)yj(e.runtime,c,t,r);e.session.invalidateDerived();let i=yY(e.runtime,e.session,t.objects);for(let{capture:n}of(_.forEach((e,n)=>{let r,i=t.values[n]??"",o=""!==i?d.writeU16String(i):0n;try{r=u.EPDFForm_AttachWidget(c,F,e.objectNumber,t.states[n]??"",o,0)}finally{0n!==o&&d.free(o)}if(!r)throw new N(G.Unknown,"a widget could not join its field again")}),t.widgets))yT(e.runtime,c,n);e.session.invalidateDerived(),r=i.map(t=>({...t,after:yR(e.runtime,c,t.objectNumber,[])}))}let y=[...Eg(t),...t.added];return{item:"forms.repeat"===t.reports?Ey(e,F,y,[],a):function(e,t,n,r){let{field:i}=EU(e,n);return{type:t,...E0(e,{field:i,meta:y4(e.session.writeStamp(),[i.ref],[...r])})}}(e,l,F,y),reverse:[{...t,direction:a?"restore":"remove",objects:r,guards:a?[]:EP(e,_),kids:ED(e,F)??[],widgets:a?b:[],captures:a?D:[],split:g?{merged:g.merged,mergedEntry:g.mergedEntry,widget:g.widget,...a&&n?{widgetEntry:n}:{}}:null}]}}(e,t);case"fields.repeat":return function(e,t){oQ(e.authority,"doc.forms.modify");let n=e.session.requireDocPtr();if("remove"===t.direction){let r=t.left.flatMap((n,r)=>{let i=EW(e,EK(n.ref));return i&&yV(i.field,n)&&yX(e.runtime,e.session,t.guards[r]??[])?[i]:[]});if(0===r.length)return yH(e,"forms.repeat");let i=r.map(({objectNumber:t,field:r})=>({objectNumber:t,name:r.name,pages:r.widgets.flatMap(e=>e.page?[e.page]:[]),capture:yB(e.runtime,n,t)})),{removedWidgets:o,calculationOrder:a}=new Et(e.runtime,e.session).deleteFields(r.map(({objectNumber:e})=>EM(e)),e.signal),s=r.map(({field:e})=>e);return{item:{type:"forms.repeat",as:"fields",undone:!0,fields:s,widgets:[],dropped:[],...EC(a),meta:y4(e.session.writeStamp(),s.map(e=>e.ref),o,[])},reverse:[{kind:"fields.repeat",direction:"restore",left:[],guards:[],captures:i},...a?[Ej(a)]:[]]}}let r=Eb(e),i=t.captures.filter(({name:t,pages:n})=>{if(ac(r,t))return!1;try{for(let t of n)e.session.resolvePageRef(t)}catch{return!1}return r.add(t),!0});if(0===i.length)return yH(e,"forms.repeat");for(let{capture:t}of i)yL(e.runtime,n,t);e.session.invalidateDerived();let o=i.map(({objectNumber:t})=>EU(e,t).field);return{item:{type:"forms.repeat",as:"fields",...E0(e,{fields:o,meta:y4(e.session.writeStamp(),o.map(e=>e.ref),o.flatMap(e=>e.widgets))}),dropped:[]},reverse:[{kind:"fields.repeat",direction:"remove",left:o,guards:o.map(t=>EP(e,t.widgets)),captures:[]}]}}(e,t);case"calculations.restore":let h,F;return oQ(e.authority,"doc.forms.modify"),F=function(e,{before:t,after:n},r){let i=n.filter(e=>!t.includes(e)),o=e.filter(e=>!i.includes(e));for(let i of t){if(n.includes(i)){if(wQ(t,i)===wQ(n,i)||wQ(e,i)!==wQ(n,i))continue;o=o.filter(e=>e!==i)}else if(o.includes(i)||!r(i))continue;let a=t.indexOf(i),s=t.slice(0,a).reverse().find(e=>o.includes(e)),l=void 0===s?0:o.indexOf(s)+1;o=[...o.slice(0,l),i,...o.slice(l)]}return o}(h=wK(e.runtime,gv(e.runtime,e.session)),t,t=>null!==EW(e,t)),wJ(h,F)?yH(e,"forms.reorderCalculations"):(wZ(e.runtime,e.session.requireDocPtr(),F),e.session.invalidateDerived(),{item:Ew(e,F,[...new Set([...h,...F])].filter(e=>h.indexOf(e)!==F.indexOf(e))),reverse:[Ej({before:h,after:F})]});case"metadata.revert":return function(e,t){oQ(e.authority,"doc.metadata.modify");let n=new FF(e.runtime,e.session),r="metadata.update"===t.op?n.read(e.signal):n.readCustom(e.signal),i=t.left,o=Object.keys(i),a=o.filter(e=>yV(E6(r,e),i[e]));if(0===a.length)return yH(e,t.op);let s=E5(t.restore,a),l=new FZ(e.runtime,e.session),u=o.filter(e=>!a.includes(e)),d={kind:"metadata.revert",op:t.op,restore:E5(t.left,a),left:s};return"metadata.update"===t.op?{item:{type:"metadata.update",...l.update(s,e.signal),...u.length>0?{skipped:u}:{}},reverse:[d]}:{item:{type:"metadata.updateCustom",...l.updateCustom(s,e.signal),...u.length>0?{skipped:u}:{}},reverse:[d]}}(e,t);case"outline.remove":let g=Au(e).tree();if(!g.has(t.ref.objectNumber))return yH(e,"outline.delete");return(oQ(e.authority,"doc.outline.modify"),yV(g.subtreeOf(t.ref.objectNumber),t.left.map(e=>e.objectNumber))&&yX(e.runtime,e.session,t.left))?Ac(e,t.ref):yH(e,"outline.delete");case"outline.restore":return function(e,t){var n,r,i;let o=Au(e),a=o.tree();if(a.has(t.ref.objectNumber)||t.parent&&!a.has(t.parent.objectNumber))return yH(e,"outline.restore");oQ(e.authority,"doc.outline.modify"),n=e.runtime,r=e.session.requireDocPtr(),yU(n,i=t.capture,e=>{if(!n.fn.EPDFOutline_ImportItemRaw(r,e,i.byteLength))throw new N(G.Unknown,"EPDFOutline_ImportItemRaw refused a capture")});let s=o.restored(t.ref.objectNumber);return{item:{type:"outline.restore",...s},reverse:[{kind:"outline.remove",ref:t.ref,left:Am(e,s.items.map(e=>e.ref))}]}}(e,t);case"outline.move":return function(e,t){let n=Au(e),r=n.tree(),i=new Map(t.left.map(({item:e,parent:t})=>[e,t])),o=t.placements.filter(({item:e,parent:t})=>r.parentOf(e)===i.get(e)&&(0===t||r.has(t))&&!r.isAtOrUnder(t,e));if(0===o.length)return yH(e,"outline.move");oQ(e.authority,"doc.outline.modify");let a=o.map(({item:e})=>e),s=n.placementsOf(a,r),l=Af(e,r,a);return{item:{type:"outline.move",...n.place(o,r)},reverse:[{kind:"outline.move",placements:s,left:o.map(({item:e,parent:t})=>({item:e,parent:t}))},...l]}}(e,t);case"outline.reopen":let _,P,D,b,y;return i=e,o=t,P=(_=Au(i)).tree(),D=_.find(o.ref,P),y=(b=P.childrenOf(o.ref.objectNumber)).length===o.children.length&&b.every(e=>o.children.includes(e)),D&&!D.open&&y?(oQ(i.authority,"doc.outline.modify"),{item:{type:"outline.update",..._.update(o.ref,{open:!0})},reverse:[]}):yH(i,"outline.update");case"pages.rotate":return Ag(e,()=>(function(e,t){let n=AN(AI(e)),r=t.pages.filter(e=>n.get(e)===t.left);if(0===r.length)return yH(e,"pages.rotate");oQ(e.authority,"doc.pages.assemble");let i=r.map(q),o=A_(e).rotate(i,t.rotation,e.signal);return{item:{type:"pages.rotate",pages:i,rotation:t.rotation,...o},reverse:[{kind:"pages.rotate",pages:r,rotation:t.left,left:t.rotation}]}})(e,t));case"pages.setScale":let w=t.pages.filter(n=>{let r,i;return r=AT(e,n),i=t.left,JSON.stringify(r)===JSON.stringify(i)});if(0===w.length)return yH(e,"pages.setScale");for(let n of(oQ(e.authority,"doc.annotate.modify"),w))AM(e,n,t.measure);let E=w.map(q);return{item:{type:"pages.setScale",pages:E,measure:t.measure&&nX(t.measure,AB(e,w[0])),...AR(e,E[0])},reverse:[{kind:"pages.setScale",pages:w,measure:t.left,left:t.measure}]};case"pages.reorder":return Ag(e,()=>(function(e,t){let n=AO(e),r=new Map(t.left.map(({page:e,after:t})=>[e,t])),i=t.placements.filter(({page:e,after:t})=>{let i=n.indexOf(e);return i>=0&&(n[i-1]??0)===r.get(e)&&(0===t||n.includes(t))});if(0===i.length)return yH(e,"pages.reorder");oQ(e.authority,"doc.pages.assemble");let o=i.map(({page:e})=>e),a=Ax(n,o),s=Aw(e),l=A_(e),u=null,d=s,c=n;for(let{page:t,after:n}of i){let r=0===n?"start":{after:q(n)};({layout:u}=l.reorder([q(t)],r,e.signal));let i=AO(e);d=Av(d,c,i,[t]),c=i}let f=AA(e,s,AE(s,d,t.labels));return{item:{type:"pages.reorder",pages:o.map(q),layout:f?AI(e):u,meta:AC(e)},reverse:[{kind:"pages.reorder",placements:a,left:Ax(AO(e),o),...f?{labels:f}:{}}]}})(e,t));case"pages.restore":return Ag(e,()=>(function(e,t){let n=AO(e),r=t.pages.filter(({page:e})=>!n.includes(e));if(0===r.length)return yH(e,"pages.restore");oQ(e.authority,"doc.pages.assemble");let i=Aw(e),o=e.session.requireDocPtr();for(let{capture:t}of r)!function(e,t,n){yU(e,n,r=>{if(!e.fn.EPDFPage_ImportRaw(t,r,n.byteLength))throw new N(G.Unknown,"EPDFPage_ImportRaw refused a capture")})}(e.runtime,o,t);e.session.refreshPageRegistry(),e.session.invalidateDerived();let a=AO(e),s=AG(a,r.map(({page:e})=>e)),l=AA(e,i,AE(i,s.reduce((e,t)=>r0(e,a.indexOf(t),1),i),t.labels));return{item:{type:"pages.restore",pages:s.map(q),layout:AI(e),meta:AC(e)},reverse:[Ay(e,s,l)]}})(e,t));case"pages.remove":return Ag(e,()=>(function(e,t){let n=AO(e),r=t.pages.filter(({page:t,left:r})=>n.includes(t)&&Ak(e,t)===r).map(({page:e})=>e);if(0===r.length||r.length>=n.length)return yH(e,"pages.delete");oQ(e.authority,"doc.pages.assemble");let i=function(e,t,n){let r=[];for(let i of t){let t=EW(e,i);t&&t.field.widgets.every(e=>e.page&&n.has(e.page.objectNumber))&&r.push(...ET(e,t).reverse)}return r}(e,t.fields??[],new Set(r)),o=Ab(e,AG(n,r),t.labels);return{item:o.item,reverse:[...o.reverse,...i]}})(e,t));case"attachments.remove":let A=y$(e.runtime,e.session.requireDocPtr(),t.ref.key);if(!A||!yZ(A,t.left))return yH(e,"attachments.delete");return oQ(e.authority,"doc.attachments.modify"),wg(e,t.ref);case"attachments.restore":return function(e,t){var n,r,i;let o=wF(e);if(o.find(t.ref))return yH(e,"attachments.restore");oQ(e.authority,"doc.attachments.modify"),n=e.runtime,r=e.session.requireDocPtr(),yU(n,i=t.capture,e=>{if(!n.fn.EPDFAttachment_ImportRaw(r,e,i.byteLength))throw new N(G.Unknown,"EPDFAttachment_ImportRaw refused a capture")});let a=o.find(t.ref);if(!a)throw new N(G.Unknown,`attachment \'${t.ref.key}\' did not come back`);return{item:{type:"attachments.restore",attachment:a,meta:o.meta(t.ref)},reverse:[w_(e,t.ref)]}}(e,t)}})(i,e)),r,n)}context(e,t,n){let r,i={runtime:this.runtime,session:this.session,...this.fonts?{fonts:this.fonts}:{},authority:e,signal:t,limits:this.limits,fillsOwnField:()=>r??(r=n(i))};return i}};function Az(e,t,n,r,i){let o=[],a=[];for(let t of n){hW(i),e.clearMissingCharacters();let n=t(),s=e.missingCharacters(),l=0===s.length?n.item:{...n.item,meta:{...n.item.meta,missingCharacters:s}};o.push(r.itemOut(l)),a.push(n.reverse)}return{items:o,record:{userId:t.identity.userId??null,steps:a.reverse().flat()}}}var AU=class{constructor(){hJ(this,"entries",new Map),hJ(this,"bytes",0)}outcome(e){return this.entries.get(e)?.outcome}record(e){let t=this.entries.get(e);if(t)return t.unavailable?{unavailable:t.unavailable}:{record:t.record}}keepApplied(e,t,n,r){let i=r?function(e){let t=0,n=e=>{for(let n of e)t+=(n.before?.byteLength??0)+n.after.byteLength};for(let r of e.steps)switch(r.kind){case"objects.revert":n(r.objects);break;case"annotation.restore":t+=r.capture.byteLength,n(r.unlinked);break;case"field.restore":case"outline.restore":case"attachments.restore":t+=r.capture.byteLength;break;case"widgets.added":for(let{capture:e}of(n(r.objects),n(r.guards),r.widgets))t+=e.byteLength;for(let{capture:e}of r.captures)t+=e.byteLength;t+=(r.split?.mergedEntry.byteLength??0)+(r.split?.widgetEntry?.byteLength??0);break;case"fields.repeat":for(let e of r.guards)n(e);for(let{capture:e}of r.captures)t+=e.byteLength;break;case"field.remove":n(r.widgets??[]);break;case"outline.remove":n(r.left);break;case"pages.restore":for(let{capture:e}of r.pages)t+=e.byteLength;break;case"attachments.remove":t+=r.left.byteLength}return t}(r):0;this.add(e,{outcome:{kind:"applied",fingerprint:t,result:n},record:r,bytes:i}),this.bytes+=i,this.trimCaptures()}keepRefused(e,t,n){this.add(e,{outcome:{kind:"refused",fingerprint:t,error:n},record:null,bytes:0})}endUndo(){for(let e of this.entries.values())"applied"!==e.outcome.kind||e.unavailable||this.drop(e,"final-change")}add(e,t){for(let[n,r]of(this.entries.set(e,t),this.entries)){if(this.entries.size<=4096)break;this.drop(r,"expired"),this.entries.delete(n)}}trimCaptures(){for(let e of this.entries.values()){if(this.bytes<=0x4000000)break;e.bytes>0&&this.drop(e,"expired")}}drop(e,t){this.bytes-=e.bytes,e.record=null,e.bytes=0,e.unavailable=t}},AV=new WeakMap;function AW(e){let t=AV.get(e);return t||(t=new AU,AV.set(e,t)),t}function Aq(e){let t="none"!==e.openedAs;return{encryptionState:t?"encrypted":"none",encryptionRequiresPassword:!1,securityHandlerRevision:t?e.securityHandlerRevision:null,pdfPermissionsBits:e.permissionsBits,pdfPermissionsAllAllowed:(0xfffffffc&e.permissionsBits>>>0)>>>0==0xfffffffc,pdfOpenedAs:e.openedAs,securityProbedAt:e.probedAt}}var AH=class{constructor(e){this.runtime=e,hV(this.runtime)}probeFile(e,t=null){let n=Date.now(),r=null,i=null;try{if(r=this.runtime.fileAccess.fromNodeFile(e),!(i=this.runtime.fn.FPDF_LoadCustomDocument(r.ptr,t??""))){var o;let e=this.runtime.fn.FPDF_GetLastError();if(4===e)return{encryptionState:"encrypted",encryptionRequiresPassword:!0,securityHandlerRevision:null,pdfPermissionsBits:null,pdfPermissionsAllAllowed:null,pdfOpenedAs:null,securityProbedAt:n};if(5===e)return{encryptionState:"unsupported",encryptionRequiresPassword:null,securityHandlerRevision:null,pdfPermissionsBits:null,pdfPermissionsAllAllowed:null,pdfOpenedAs:null,securityProbedAt:n};return o=n,{encryptionState:"unknown",encryptionRequiresPassword:null,securityHandlerRevision:null,pdfPermissionsBits:null,pdfPermissionsAllAllowed:null,pdfOpenedAs:null,securityProbedAt:o}}let a=this.runtime.fn.EPDF_IsEncrypted(i),s=this.runtime.fn.FPDF_GetDocPermissions(i)>>>0;return Aq({openedAs:a?this.runtime.fn.EPDF_IsOwnerUnlocked(i)?"owner":"user":"none",permissionsBits:s,securityHandlerRevision:a?this.runtime.fn.FPDF_GetSecurityHandlerRevision(i):null,probedAt:n})}finally{i&&this.runtime.fn.FPDF_CloseDocument(i),r?.close()}}readLiveSecurityInfo(e){let{fn:t}=this.runtime,n=e.requireDocPtr(),r=t.EPDF_IsEncrypted(n),i=t.FPDF_GetDocUserPermissions(n)>>>0;return Aq({openedAs:r?t.EPDF_IsOwnerUnlocked(n)?"owner":"user":"none",permissionsBits:i,securityHandlerRevision:r?t.FPDF_GetSecurityHandlerRevision(n):null,probedAt:Date.now()})}checkPasswordPermissions(e,t,n="any"){let r=e.requireDocPtr(),{mem:i,fn:o}=this.runtime,a=i.alloc(4),s=i.alloc(4),l=i.alloc(4),u=i.alloc(4);try{var d;if(i.poke(a,"i32",0),i.poke(s,"i32",0),i.poke(l,"i32",0),i.poke(u,"i32",0),!o.EPDF_CheckPasswordPermissions(r,t,a,s,l,u))throw new N(G.DocPasswordIncorrect,"incorrect document password");let e=(d=Number(i.peek(a,"i32")),3===d?"owner":2===d?"user":"none");if("owner"===n&&"owner"!==e)throw new N(G.DocPasswordIncorrect,"owner password required");return Aq({openedAs:e,permissionsBits:Number(i.peek(l,"i32"))>>>0,securityHandlerRevision:Number(i.peek(u,"i32")),probedAt:Date.now()})}finally{i.free(u),i.free(l),i.free(s),i.free(a)}}};function AK(e){return"incremental"===e?1:2}function AZ(e){return 1===e?new N(G.DocOpenFailed,"layer artifact cannot be saved because append-only offsets exceed the supported range"):new N(G.DocOpenFailed,"failed to save layer artifact")}function AJ(e,t,n){let r=e.readBytes(t,n);return r.buffer instanceof ArrayBuffer&&0===r.byteOffset&&r.byteLength===r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer}var AQ=class{constructor(e,t){this.runtime=e,this.session=t}snapshot(){if(!this.session.hasUnsavedEdits())return{bytes:this.loadedBytes(),source:"loaded"};let e=this.saveStandaloneToBufferEx("incremental");return e.unchangedSinceLoad?{bytes:this.loadedBytes(),source:"loaded"}:{bytes:e.bytes,source:"working-copy"}}loadedBytes(){return new wR(this.runtime,this.session).loadedBytes()}copyLoadedBytesToFile(e){let t=new wR(this.runtime,this.session),n=Number(this.runtime.fn.EPDFDoc_GetLoadedBytesSize(this.session.requireDocPtr()));this.runtime.fileWrite.removeFile(e);for(let r=0;r{Ft(n,i,0),Ft(n,o,0),Ft(n,a,0);let s=r.EPDFSig_SaveCandidateToOwnedBuffer(e,t,i,o,a);if(!s)throw new N(G.Unknown,"failed to save the signing candidate");try{let e=Fn(n,i);return{kind:"memory",bytes:AX(n.readBytes(s,e)),size:e,objectOffset:Fn(n,o),objectLength:Fn(n,a)}}finally{r.EPDF_FreeBuffer(s)}})}seal(e,t){if("memory"!==e.kind)throw new N(G.InvalidArg,"not a memory candidate");let{mem:n,fn:r}=this.runtime,i=n.alloc(e.bytes.byteLength);try{return n.writeBytes(i,e.bytes),h0(n,[32,8,8,64,8],([o,a,s,l,u])=>{for(let e=0;e<4;e++)Ft(n,o,0,8*e);if(Ft(n,a,0),Ft(n,s,0),Ft(n,u,64),!r.EPDFSig_Seal(i,BigInt(e.bytes.byteLength),BigInt(e.objectOffset),BigInt(e.objectLength),wj[t],o,a,s,l,u))throw new N(G.Unknown,"failed to seal the signing candidate");e.bytes=AX(n.readBytes(i,e.bytes.byteLength));let d=Number(n.peek(u,"i32"));return{byteRange:[Fn(n,o,0),Fn(n,o,8),Fn(n,o,16),Fn(n,o,24)],contentsOffset:Fn(n,a),contentsHexLength:Fn(n,s),digest:AX(n.readBytes(l,d))}})}finally{n.free(i)}}writeContents(e,t,n){if("memory"!==e.kind)throw new N(G.InvalidArg,"not a memory candidate");let{mem:r}=this.runtime,i=r.alloc(e.bytes.byteLength);try{r.writeBytes(i,e.bytes),AY(this.runtime,i,e.bytes.byteLength,0,t,n),e.bytes=AX(r.readBytes(i,e.bytes.byteLength))}finally{r.free(i)}}openSealed(e,t){if("memory"!==e.kind)throw new N(G.InvalidArg,"not a memory candidate");let n=this.baseDocuments.acquireMemoryBase({key:`signed:${iX()}`,bytes:e.bytes,password:t});return h9(this.runtime,n,{kind:"fresh"},t)}discard(){}},A1=class{constructor(e,t,n,r=A3){this.runtime=e,this.baseDocuments=t,this.basePath=n,this.candidatePath=r}save(e,t,n){let{mem:r,fn:i}=this.runtime,o=this.candidatePath(this.basePath,n);this.runtime.fileWrite.removeFile(o);let a=this.runtime.fileWrite.toNodeFile(o);try{return h0(r,[8,8,8],([n,s,l])=>{if(Ft(r,n,0),Ft(r,s,0),Ft(r,l,0),!i.EPDFSig_SaveCandidate(e,t,a.ptr,n,s,l))throw new N(G.Unknown,"failed to save the signing candidate");return{kind:"file",path:o,size:Fn(r,n),objectOffset:Fn(r,s),objectLength:Fn(r,l)}})}catch(e){throw a.close(),this.runtime.fileWrite.removeFile(o),e}finally{a.close()}}seal(e,t){let n;if("file"!==e.kind)throw new N(G.InvalidArg,"not a file candidate");let{mem:r,fn:i}=this.runtime,o=this.runtime.fileAccess.readRange(e.path,e.objectOffset,e.objectLength);if(o.byteLength!==e.objectLength)throw new N(G.Unknown,"the signing candidate file is shorter than its object span");let a=r.alloc(o.byteLength);try{r.writeBytes(a,o),n=function(e,t,n,r,i){let{fn:o,mem:a}=e;return h0(a,[32,8,8],([e,s,l])=>{for(let t=0;t<4;t++)Ft(a,e,0,8*t);if(Ft(a,s,0),Ft(a,l,0),!o.EPDFSig_SealSpan(t,BigInt(n),BigInt(r),BigInt(i),e,s,l))throw new N(G.Unknown,"failed to seal the signing candidate");return{byteRange:[Fn(a,e,0),Fn(a,e,8),Fn(a,e,16),Fn(a,e,24)],contentsOffset:Fn(a,s),contentsHexLength:Fn(a,l)}})}(this.runtime,a,o.byteLength,e.objectOffset,e.size),this.runtime.fileWrite.writeRange(e.path,e.objectOffset,r.readBytes(a,o.byteLength))}finally{r.free(a)}let s=this.runtime.fileAccess.fromNodeFile(e.path);try{let e=h0(r,[32,64,8],([e,o,a])=>{for(let t=0;t<4;t++)Ft(r,e,n.byteRange[t],8*t);if(Ft(r,a,64),!i.EPDFSig_DigestFileRange(s.ptr,e,wj[t],o,a))throw new N(G.Unknown,"failed to digest the signing candidate file");return AX(r.readBytes(o,Number(r.peek(a,"i32"))))});return{...n,digest:e}}finally{s.close()}}writeContents(e,t,n){if("file"!==e.kind)throw new N(G.InvalidArg,"not a file candidate");let{mem:r}=this.runtime,i=this.runtime.fileAccess.readRange(e.path,e.objectOffset,e.objectLength),o=r.alloc(i.byteLength);try{r.writeBytes(o,i),AY(this.runtime,o,i.byteLength,e.objectOffset,t,n),this.runtime.fileWrite.writeRange(e.path,e.objectOffset,r.readBytes(o,i.byteLength))}finally{r.free(o)}}openSealed(e,t){if("file"!==e.kind)throw new N(G.InvalidArg,"not a file candidate");let n=this.baseDocuments.acquireFileBase({key:`signed:${e.path}`,path:e.path,password:t});return h9(this.runtime,n,{kind:"fresh"},t)}discard(e){"file"===e.kind&&this.runtime.fileWrite.removeFile(e.path)}};function A3(e,t){return`${e}.signing-${t}.pdf`}function A2(e,t,n,r){return`${e}.${t}-${n}.${r}`}function A6(e,t,n,r){var i,o;let a=e=>new N(G.SignatureRefused,`the sealed bytes ${e}`),s=wS(e,n),l=s.find(e=>"objectNumber"===e.field.kind&&e.field.objectNumber===r.fieldObjectNumber);if(!l)throw a("lost the signature field");if(!l.signed||"whole-revision"!==l.coverage||!l.byteRange)throw a("do not carry a whole-revision signature on the field");if(i=l.byteRange,o=r.byteRange,i[0]!==o[0]||i[1]!==o[1]||i[2]!==o[2]||i[3]!==o[3])throw a(`carry /ByteRange [${l.byteRange.join(" ")}] where [${r.byteRange.join(" ")}] was sealed`);if(!e.fn.EPDFSig_IsRevisionChainValid(n))throw a("have a broken cross-reference chain");let u=wx(e,t,s);if(l.revisionIndex!==u.length-1)throw a("seal an earlier revision than the candidate");if(!yZ(wk(e,n,l.index),r.cms))throw a("carry /Contents that are not the CMS installed");return l}function A5(e,t,n){let r=gv(e,t),i=e.fn.EPDFForm_GetFieldIndexByObjNum(r,n);return i<0?null:PY(e,r,i)}var A4={"adbe.pkcs7.detached":0,"ETSI.CAdES.detached":1,"ETSI.RFC3161":2},A8={all:1,include:2,exclude:3},A7={bytes:52,ptrBytes:4,subfilter:0,digest:4,contentsSize:8,name:12,reason:16,location:20,contactInfo:24,signingTime:28,docmdpPermission:32,fieldmdpAction:36,fieldmdpFields:40,fieldmdpFieldCount:44,lockPermission:48},A9={bytes:80,ptrBytes:8,subfilter:0,digest:4,contentsSize:8,name:16,reason:24,location:32,contactInfo:40,signingTime:48,docmdpPermission:56,fieldmdpAction:60,fieldmdpFields:64,fieldmdpFieldCount:72,lockPermission:76},ve=class{constructor(e,t,n,r){this.runtime=e,this.session=t,this.baseDocuments=n,this.candidatePath=r}prepare(e,t){if(this.session.pendingSigning)throw new N(G.SigningPending,`a signing is pending (${this.session.pendingSigning.prepared.signingId}); complete or cancel it first`);if(!e.field&&(e.kind??"signature")!=="timestamp")throw new N(G.InvalidArg,"a signature needs a `field`: only a document timestamp (`kind: \'timestamp\'`) can be given one by the engine",{details:{field:"field"}});let n=new wR(this.runtime,this.session),r=e.field?n.resolveField(e.field):null,i=r?A5(this.runtime,this.session,r.fieldObjectNumber):null;r?o4(t,i,"sign"):oQ(t,"doc.sign");let o=e.lock??this.defaultLock(i,(e.kind??"signature")==="signature",r?.lock??null);if(r?.signed)throw new N(G.SignatureRefused,"the signature field is already signed");if(e.appearance&&!r?.widget)throw new N(G.SignatureRefused,r?"the signature field has no widget to carry an appearance":"a timestamp with a field of its own shows nowhere, so it carries no appearance");let a=e.digest??"sha256";if(!(a in wj)||"sha1"===a)throw new N(G.SignatureRefused,`unsupported digest \'${a}\'`);let s=(e.kind??"signature")==="timestamp"?"ETSI.RFC3161":e.subFilter??"ETSI.CAdES.detached";if(!(s in A4))throw new N(G.SignatureRefused,`unsupported subFilter \'${s}\'`);let l=e.contentsSizeBytes??8192;if(!Number.isInteger(l)||l<256||l>4194304)throw new N(G.SignatureRefused,"contentsSize must be an integer in [256, 4194304]");let u=this.session.versionRef(n.version().sha256),d=iX(),c=new h8;try{let t,n=this.openCandidate(d,c);c.push(()=>n.close());let i=r?null:function(e,t){let{fn:n,mem:r}=e;for(let i=1;i<=64;i++){let o,a,s=`Timestamp${i}`,l=r.writeU16String(s);try{o=n.EPDFForm_CreateField(t,7,l,0)}finally{r.free(l)}if(o<=0)continue;let u=n.EPDFPage_CreateAnnotRaw(t,0,20,0);if(0n===u)throw new N(G.SignatureRefused,"the document has no first page to put the timestamp field on");try{Dx(n,r,u,{left:0,top:0,right:0,bottom:0}),Dk(n,u,{print:!0,locked:!0}),a=n.EPDFAnnot_GetObjectNumber(u)}finally{n.FPDFPage_CloseAnnot(u)}if(a<=0||!n.EPDFForm_AttachWidget(t,o,a,"",0n,0))throw new N(G.Unknown,"the timestamp field could not be given its widget");return function(e,t,n){let{fn:r}=e,i=r.EPDFPage_GetAnnotIndexByObjectNumberRaw(t,0,n),o=i<0?0n:r.EPDFPage_GetAnnotRaw(t,0,i);if(0n===o)throw new N(G.Unknown,"the timestamp widget is not on its page");try{if(!r.FPDFAnnot_SetAP(o,0,0n))throw new N(G.Unknown,"the timestamp widget kept its appearance")}finally{r.FPDFPage_CloseAnnot(o)}}(e,t,a),{fieldObjectNumber:o,name:s}}throw new N(G.SignatureRefused,"the engine could not make a field for the timestamp: no name from Timestamp1 to Timestamp64 could be used")}(this.runtime,n.docPtr),f=r?r.fieldObjectNumber:i.fieldObjectNumber,m=e.signer,p=this.callPrepare(n.docPtr,f,{subfilter:A4[s],digest:wj[a],contentsSize:l,name:m?.name??null,reason:m?.reason??null,location:m?.location??null,contactInfo:m?.contactInfo??null,signingTime:m?.signedAt!==void 0?hH(m.signedAt):null,docmdpPermission:e.certify?.permission??0,fieldmdpAction:o?A8[o.action]:0,fieldmdpFields:o?.action==="all"?[]:o?.fields??[],lockPermission:o?.permission??0});if(0===p)throw new N(G.SignatureRefused,"the engine refused to author the signature (the field is signed, read-only or locked, a certification is not allowed here, the seed value requires what is not implemented, or the request is inconsistent)");let h=iE(e.appearance??null);h&&r?.widget&&w3(this.runtime,n.docPtr,new hQ,r.widget,h);let F=this.storeFor(),g=F.save(n.docPtr,p,d);try{t=F.seal(g,a)}catch(e){throw F.discard(g),e}let _={signingId:d,digest:t.digest,algorithm:a,byteRange:t.byteRange,contentsSizeBytes:l,subFilter:s,expectedVersion:u,expiresAt:null,...i?{field:{kind:"fqn",name:i.name}}:{}};return this.session.pendingSigning={prepared:_,fieldObjectNumber:f,madeField:null!==i,saved:g,contentsOffset:t.contentsOffset,contentsHexLength:t.contentsHexLength},_}finally{c.close()}}complete(e,t,n){var r,i;let o=this.session.pendingSigning;if(!o||o.prepared.signingId!==e.signingId){let t=this.session.lastCompletion;if(t&&t.signingId===e.signingId){if(!yZ(t.cms,e.cms))throw new N(G.SignatureRefused,"this signing already completed with a different CMS");return{...t.result,status:"already-completed"}}throw new N(G.NotFound,`no pending signing \'${e.signingId}\'`)}if(o.madeField?oQ(n,"doc.sign"):o4(n,A5(this.runtime,this.session,o.fieldObjectNumber),"sign"),r=o.prepared.expectedVersion,i=e.expectedVersion,r.baseSha256!==i.baseSha256||r.editsVersion!==i.editsVersion)throw new N(G.SigningVersionMismatch,"expectedVersion is not the version the candidate was prepared on");if(0===e.cms.byteLength||48!==e.cms[0])throw new N(G.SignatureRefused,"the CMS is not a DER SEQUENCE");if(e.cms.byteLength>o.prepared.contentsSizeBytes)throw new N(G.SignatureRefused,`the CMS (${e.cms.byteLength} bytes) does not fit the reserved ${o.prepared.contentsSizeBytes} bytes`);let a=this.storeFor(),s={byteRange:o.prepared.byteRange,contentsOffset:o.contentsOffset,contentsHexLength:o.contentsHexLength,digest:o.prepared.digest};a.writeContents(o.saved,s,e.cms);let l=a.openSealed(o.saved,this.session.password);this.verifySealed(l,{fieldObjectNumber:o.fieldObjectNumber,byteRange:o.prepared.byteRange,cms:e.cms}),this.session.install(l),gS(this.runtime,this.session),wC(this.runtime,this.session);let u=new wR(this.runtime,this.session),d=u.readSnapshot(),c=d.signatures.find(e=>"objectNumber"===e.field.kind&&e.field.objectNumber===o.fieldObjectNumber);if(!c)throw new N(G.Unknown,"the installed document lost the signature field");let f={status:"completed",signature:c,version:u.version(),previous:o.prepared.expectedVersion,protection:d.protection,meta:{affectedPages:this.session.allRecords().map(e=>q(e.pageObjectNumber)),cacheDelta:null,opId:t,undoable:!1}};return this.session.lastCompletion={signingId:e.signingId,cms:e.cms.slice(),result:f},f}cancel(e){let t=this.session.pendingSigning;return t&&t.prepared.signingId===e?(this.session.pendingSigning=null,this.storeFor().discard(t.saved),{status:"cancelled"}):this.session.lastCompletion?.signingId===e?{status:"already-completed"}:{status:"unknown"}}defaultLock(e,t,n){if(n)return;let r=t?function(e,t){let{fn:n,mem:r}=e,i=gv(e,t),o=t.requireDocPtr(),a=new PR(e,o),s=[],l=n.EPDFForm_CountFields(i);for(let t=0;tn.EPDFForm_GetFieldName(i,t,e,r));l&&s.push(l)}return s}(this.runtime,this.session):[];if(null!==e||0!==r.length)return{action:"include",fields:[...null===e?[]:function(e,t,n){let{fn:r,mem:i}=e,o=gv(e,t),a=[],s=r.EPDFForm_CountFields(o);for(let t=0;tr.EPDFForm_GetFieldName(o,t,e,n));s&&a.push(s)}return a}(this.runtime,this.session,e),...r]}}callPrepare(e,t,n){let{mem:r,fn:i}=this.runtime,o="wasm"===this.runtime.kind?A7:A9,a=[],s=e=>{if(null===e)return 0n;let t=r.writeU16String(e);return a.push(t),t};try{return gf(this.runtime,n.fieldmdpFields,(l,u)=>hY(r,o.bytes,d=>{for(let e=0;e{4===o.ptrBytes?r.poke(d,"i32",Number(t),e):r.poke(d,"i64",t,e)};return r.poke(d,"i32",n.subfilter,o.subfilter),r.poke(d,"i32",n.digest,o.digest),r.poke(d,"i32",n.contentsSize,o.contentsSize),c(o.name,s(n.name)),c(o.reason,s(n.reason)),c(o.location,s(n.location)),c(o.contactInfo,s(n.contactInfo)),c(o.signingTime,(e=>{if(null===e)return 0n;let t=r.writeU8String(e);return a.push(t),t})(n.signingTime)),r.poke(d,"i32",n.docmdpPermission,o.docmdpPermission),r.poke(d,"i32",n.fieldmdpAction,o.fieldmdpAction),c(o.fieldmdpFields,u>0?l:0n),r.poke(d,"i32",u,o.fieldmdpFieldCount),r.poke(d,"i32",n.lockPermission,o.lockPermission),i.EPDFSig_Prepare(e,t,d)}))}finally{for(let e=a.length-1;e>=0;e--)r.free(a[e])}}storeFor(){let e=this.session.source.base;return e?.kind==="file"?new A1(this.runtime,this.baseDocuments,e.path,this.candidatePath):new A0(this.runtime,this.baseDocuments)}verifySealed(e,t){let{fn:n}=this.runtime;try{let r=n.EPDFSig_LoadModel(e.docPtr);if(!r)throw new N(G.Unknown,"the sealed bytes have no signature model");try{A6(this.runtime,e.docPtr,r,t)}finally{n.EPDFSig_CloseModel(r)}"layer"!==this.session.kind&&(this.session.persistLayerArtifact=!1)}catch(t){throw e.close(),t}}openCandidate(e,t){let n=this.session.password,r=this.session.source,i=new AQ(this.runtime,this.session),o=i.canWriteScratchFiles()&&r.base?.kind==="file"?r.base.path:null;if("layer"===this.session.kind&&r.base&&!this.loadedDeltaHoldsSignedBytes()){let a=this.baseDocuments.retainByKey(r.base.key);if(a){let s=r.layer??{kind:"fresh"};if(this.session.hasUnsavedEdits())if(o){let n=A2(o,"signing",e,"layer");t.push(()=>this.runtime.fileWrite.removeFile(n)),i.saveLayerArtifactToFileEx(n).changedSinceLoad&&(s={kind:"artifact-file",path:n})}else{let e=i.saveLayerArtifactEx();e.changedSinceLoad&&(s={kind:"artifact",bytes:e.bytes})}return h9(this.runtime,a,s,n)}}if(o){let r=A2(o,"signing",e,"base.pdf");t.push(()=>this.runtime.fileWrite.removeFile(r)),i.snapshotToFile(r);let a=this.baseDocuments.acquireFileBase({key:`candidate:${e}`,path:r,password:n});return h9(this.runtime,a,{kind:"fresh"},n)}let a=i.snapshot().bytes,s=this.baseDocuments.acquireMemoryBase({key:`candidate:${e}`,bytes:new Uint8Array(a),password:n});return h9(this.runtime,s,{kind:"fresh"},n)}loadedDeltaHoldsSignedBytes(){let e=this.session.source.layer;if(!e||"fresh"===e.kind)return!1;let t=Number(this.runtime.fn.EPDFDoc_GetBaseBytesSize(this.session.requireDocPtr()));return new wR(this.runtime,this.session).readSnapshot().signatures.some(e=>e.signed&&null!==e.byteRange&&e.byteRange[2]+e.byteRange[3]>t)}},vt={0:"added",1:"modified",2:"freed"},vn={0:"dictionary",1:"stream",2:"array",3:"scalar",4:"xref",5:"objstm",6:"trailer"},vr={0:"ok",1:"failed",2:"absent"};function vi(e,t){let n=new Set([0,e.root,e.pagesRoot,...e.pages,...t]);for(let t of(e.acroForm&&n.add(e.acroForm),e.fields))for(let e of(n.add(t.objectNumber),t.widgets))n.add(e);return n}var vo=class{constructor(e,t){this.runtime=e,this.session=t}readWorkingCopySnapshot(){let e=new h8;try{let t=this.openWorkingCopy(e);if("loaded"===t.source)return new wR(this.runtime,this.session).readSnapshot();let n=t.target;return wG(this.runtime,n,e=>{let t=this.runtime.fn.EPDFSig_IsRevisionChainValid(e),r=wS(this.runtime,e);return{chainValid:t,revisions:t?wx(this.runtime,n,r):[],signatures:r,protection:iM(r)}})}finally{e.close()}}analyze(e){let t,n=new wR(this.runtime,this.session),r=n.readSnapshot(),i=n.version(),o=e.exploratoryLevel?"exploratory":"authoritative",a=e.detail??"summary",s="persisted",l=this.session.editsSeq(),u=null;if("signatureIndex"in e.since){let n=r.signatures[e.since.signatureIndex];if(!n)throw new N(G.NotFound,`no signature ${e.since.signatureIndex}`);if(!n.signed||null===n.revisionIndex)throw new N(G.InvalidArg,`signature ${e.since.signatureIndex} seals no whole revision; nothing to analyze from`);t=n.revisionIndex,u=n.index}else t=e.since.revisionIndex;if(!r.chainValid){let e={verdict:"indeterminate",complete:!1,findings:[{rule:"revision-chain",verdict:"incomplete",objectNumber:0,detail:"the cross-reference chain is broken or was rebuilt: no revision can be told from another"}],method:"net-state"};return{mode:o,policyVersion:6,basis:{version:i,editsVersion:l,source:"persisted"},since:{revisionIndex:t,signatureIndex:u},until:{revisionIndex:t},restrictions:[],current:{...e,primary:e.findings[0]},later:{revisionCount:0,undoneObjectNumbers:[]},verdict:"indeterminate",steps:[]}}if(!Number.isInteger(t)||t<0||t>=r.revisions.length)throw new N(G.InvalidArg,`no revision ${t}`);let d=new h8;try{let n,c,f,m,p,h=this.session.requireDocPtr(),F=r.revisions,g="working-copy"===e.until?this.openWorkingCopy(d):null;if(g&&"working-copy"===g.source){s="working-copy",h=g.target;let e=wG(this.runtime,h,e=>wS(this.runtime,e));if(F=wx(this.runtime,h,e),0===F.length)throw new N(G.MalformedPdf,"the working copy has no valid revision chain")}let _=F.length-1;if("object"==typeof e.until&&(_=e.until.revisionIndex,!Number.isInteger(_)||_=F.length))throw new N(G.InvalidArg,`no revision ${_} at or after ${t}`);let P=new h8,D=[],b=[];try{let e=this.openPrefix(h,F,t,P),n=_===F.length-1?h:this.openPrefix(h,F,_,P);c=wO(this.runtime,e),f=_===t?c:wO(this.runtime,n),_>t&&({changes:D,unwritten:b,health:m}=this.compare(e,n,c,f))}finally{P.close()}let y=null===u?null:c.signatures[u]??null,w=function(e,t){let n=[],r=[],i=null,o=!1;for(let a of e.signatures){if(!a.signed||null===a.revisionIndex)continue;o=!0;let e=null!==t&&a.index===t.index,s=null!==t&&!e&&"timestamp"===t.kind&&1===a.docMdp;a.catalogCertification&&null!==a.docMdp&&!s&&(n.push({signatureIndex:a.index,revisionIndex:a.revisionIndex,source:"docmdp",own:e,permission:a.docMdp}),i=iI(i??"annotate",iO(a.docMdp))),a.lock?.permission!==void 0&&(i=iI(i??"annotate",iO(a.lock.permission))),(null===t||e)&&(a.fieldMdp&&(n.push({signatureIndex:a.index,revisionIndex:a.revisionIndex,source:"fieldmdp",own:e,fields:a.fieldMdp}),r.push({signatureIndex:a.index,source:"fieldmdp",spec:a.fieldMdp})),a.lock&&(n.push({signatureIndex:a.index,revisionIndex:a.revisionIndex,source:"lock",own:e,fields:a.lock}),r.push({signatureIndex:a.index,source:"lock",spec:a.lock})))}return{anchors:n,level:o?i??"annotate":"annotate",locks:r}}(c,y),E=e.exploratoryLevel,A=ow({older:t,newer:_,changes:D,unwritten:b,before:c,after:f,health:m,restrictions:{level:w.level,locks:w.locks},levelOverride:E}),v=w.anchors.some(e=>"docmdp"===e.source&&e.own),S=_-t;p=S<=1?1===S?[A]:[]:v||"full"===a?this.walkSteps(h,F,t,_,c,{level:w.level,locks:w.locks,levelOverride:E}):[];let k=v?{...function(e,t){let n=[...e.findings];for(let r of t)if(r!==e)for(let e of r.findings)"permitted"!==e.verdict&&n.push({...e,detail:`revision ${r.newer}: ${e.detail??e.rule}`});let r=oc(n,"unchanged"!==e.verdict||t.some(e=>"unchanged"!==e.verdict)),i=of(n);return{verdict:r,complete:!n.some(e=>"incomplete"===e.verdict),...i?{primary:i}:{},findings:n}}(A,p),method:"net-state+replay"}:{...(n=of(A.findings),{verdict:A.verdict,complete:!A.findings.some(e=>"incomplete"===e.verdict),...n?{primary:n}:{},findings:A.findings}),method:"net-state"};return{mode:o,policyVersion:6,basis:{version:i,editsVersion:l,source:s},since:{revisionIndex:t,signatureIndex:u},until:{revisionIndex:_},restrictions:w.anchors,current:k,later:{revisionCount:S,undoneObjectNumbers:D.filter(oE).map(e=>e.objectNumber)},verdict:k.verdict,steps:p}}finally{d.close()}}openPrefix(e,t,n,r){let i=this.runtime.fn.EPDFDoc_OpenRevision(e,BigInt(t[n].end));if(0n===i)throw new N(G.MalformedPdf,`revision ${n} does not open as a document`);return r.push(()=>this.runtime.fn.FPDF_CloseDocument(i)),i}walkSteps(e,t,n,r,i,o){let{fn:a}=this.runtime,s=[],l=this.openPrefix(e,t,n,new h8),u=i;try{for(let i=n+1;i<=r;i++){let n=i===t.length-1?e:this.openPrefix(e,t,i,new h8);try{let e=wO(this.runtime,n),{changes:t,unwritten:r,health:a}=this.compare(l,n,u,e);s.push(ow({older:i-1,newer:i,changes:t,unwritten:r,before:u,after:e,health:a,restrictions:{level:o.level,locks:o.locks},levelOverride:o.levelOverride})),u=e}finally{a.FPDF_CloseDocument(l),l=n}}}finally{l!==e&&a.FPDF_CloseDocument(l)}return s}openWorkingCopy(e){let{fn:t,mem:n}=this.runtime,r=this.session.requireDocPtr();if(!this.session.hasUnsavedEdits())return{target:r,source:"loaded"};let i=new AQ(this.runtime,this.session);if("layer"===this.session.kind){let o=this.session.source.base;if(i.canWriteScratchFiles()&&o?.kind==="file"){let a=A2(o.path,"working-copy",iX(),"delta");if(e.push(()=>this.runtime.fileWrite.removeFile(a)),!i.saveLayerDeltaToFileEx(a).changedSinceLoad)return{target:r,source:"loaded"};if(0===this.runtime.fileAccess.sizeOf(a))return this.freshLayerOverBase(e);let s=h4(n,a,e=>t.EPDFDoc_OpenBaseOverlayFromPath(r,e));if(0n===s)throw new N(G.MalformedPdf,"the working copy does not compose with its base");return e.push(()=>t.FPDF_CloseDocument(s)),{target:s,source:"working-copy"}}let a=i.saveLayerDeltaEx();if(!a.changedSinceLoad)return{target:r,source:"loaded"};if(0===a.size)return this.freshLayerOverBase(e);let s=new Uint8Array(a.bytes),l=n.alloc(s.byteLength);try{n.writeBytes(l,s);let i=t.EPDFDoc_OpenBaseOverlay(r,l,s.byteLength);if(0n===i)throw new N(G.MalformedPdf,"the working copy does not compose with its base");return e.push(()=>t.FPDF_CloseDocument(i)),{target:i,source:"working-copy"}}finally{n.free(l)}}let o=i.saveStandaloneToBufferEx("incremental");if(o.unchangedSinceLoad)return{target:r,source:"loaded"};let a=h7(this.runtime,new Uint8Array(o.bytes),this.session.password);return e.push(()=>a.close()),{target:a.docPtr,source:"working-copy"}}freshLayerOverBase(e){let{fn:t,mem:n}=this.runtime,r=t.EPDFLayer_GetBaseDocument(this.session.requireDocPtr()),i=n.alloc(4);try{n.poke(i,"i32",-1);let o=t.EPDFLayer_OpenLayer(r,0n,this.session.password??"",i);if(0n===o||0!==Number(n.peek(i,"i32")))throw new N(G.MalformedPdf,"the working copy could not be opened over its base");return e.push(()=>t.FPDF_CloseDocument(o)),{target:o,source:"working-copy"}}finally{n.free(i)}}compare(e,t,n,r){let{fn:i,mem:o}=this.runtime,a=i.EPDFDoc_CompareRevisions(e,t);if(0n===a)throw new N(G.MalformedPdf,"the revisions do not share a byte history");try{let t=i.EPDFObjectDiff_GetCount(a),s=[];return h0(o,[4,4,4,4,4,4],([e,n,r,l,u,d])=>{for(let c=0;c>>0,f=Number(o.peek(l,"i32")),m=Number(o.peek(u,"i32")),p=this.readValue(a,c,0),h=this.readValue(a,c,1),F=p.truncated||h.truncated,g=null,_=null;try{g=null===p.text||p.truncated?null:oi(p.text),_=null===h.text||h.truncated?null:oi(h.text)}catch{F=!0}let P=vt[Number(o.peek(n,"i32"))]??"modified";s.push({objectNumber:t,change:P,kind:vn[Number(o.peek(r,"i32"))]??"scalar",present:{old:"added"!==P,new:"freed"!==P},generation:{old:f<0?null:f,new:m<0?null:m},value:{old:g,new:_,truncated:F},raw:{old:p.text,new:h.text},read:{old:vr[i.EPDFObjectDiff_GetReadStatus(a,c,0)]??"failed",new:vr[i.EPDFObjectDiff_GetReadStatus(a,c,1)]??"failed"},streamDataChanged:0!==Number(o.peek(d,"i32")),usage:{old:[],new:[]}})}}),{changes:this.withAnchoredUsage(a,s,n,r),unwritten:(function(e){let t=new Set([...e.before.pages,...e.after.pages]),n=new Set(e.changes.map(e=>e.objectNumber)),r=new Set;for(let i of e.changes)if(t.has(i.objectNumber))for(let e of om){let t=ol(i.value[e])?.Annots;t?.t!=="ref"||n.has(t.num)||r.add(t.num)}return[...r].sort((e,t)=>e-t)})({changes:s,before:n,after:r}).map(t=>this.readUnwritten(e,t)),health:{old:this.readHealth(a,0),new:this.readHealth(a,1)}}}finally{i.EPDFObjectDiff_Close(a)}}readHealth(e,t){let{fn:n,mem:r}=this.runtime;return h0(r,[4,4,4],([i,o,a])=>{for(let e of[i,o,a])r.poke(e,"i32",0);if(!n.EPDFObjectDiff_GetRevisionHealth(e,t,i,o,a))throw new N(G.Unknown,"failed to read revision health");return{sparseXref:0!==Number(r.peek(i,"i32")),bareReferences:Number(r.peek(o,"i32"))>>>0,referrersComplete:0!==Number(r.peek(a,"i32"))}})}withAnchoredUsage(e,t,n,r){let i=new Set(t.map(e=>e.objectNumber)),o={old:new o$(t=>this.readReferrers(e,0,t),vi(n,i)),new:new o$(t=>this.readReferrers(e,1,t),vi(r,i))};return t.map(e=>{let t=e.present.old?o.old.resolve(e.objectNumber):[],n=e.present.new?o.new.resolve(e.objectNumber):[];return{...e,usage:{old:t===oL?[]:t,new:n===oL?[]:n},...t===oL||n===oL?{usageIncomplete:!0}:{}}})}readUnwritten(e,t){let{fn:n,mem:r}=this.runtime;return h0(r,[4,4],([i,o])=>{let a=(a,s)=>(r.poke(i,"i32",-1),r.poke(o,"i32",0),n.EPDFDoc_GetLoadedObjectValue(e,t,a,s,i,o)),s=e=>({objectNumber:t,value:null,read:e}),l=a(0n,0),u=vr[Number(r.peek(i,"i32"))]??"failed",d=0!==Number(r.peek(o,"i32"));return"ok"!==u||d||l<=0?s(u):hY(r,l,e=>{let n=a(e,l);if(n<=0||0!==Number(r.peek(o,"i32")))return s(u);let i=r.readBytes(e,n-1),d="";for(let e of i)d+=String.fromCharCode(e);try{return{objectNumber:t,value:oi(d),read:u}}catch{return s(u)}})})}readValue(e,t,n){let{fn:r,mem:i}=this.runtime;return hY(i,4,o=>{i.poke(o,"i32",0);let a=r.EPDFObjectDiff_GetValue(e,t,n,0n,0,o),s=0!==Number(i.peek(o,"i32"));return a<=0?{text:null,truncated:s}:hY(i,a,s=>{i.poke(o,"i32",0);let l=r.EPDFObjectDiff_GetValue(e,t,n,s,a,o),u=0!==Number(i.peek(o,"i32"));if(l<=0)return{text:null,truncated:u};let d=i.readBytes(s,l-1),c="";for(let e of d)c+=String.fromCharCode(e);return{text:c,truncated:u}})})}readReferrers(e,t,n){let{fn:r,mem:i}=this.runtime,o=r.EPDFObjectDiff_GetReferrerCount(e,t,n),a=[];return o<=0||hY(i,4,s=>{for(let l=0;l{let u=r.EPDFObjectDiff_GetReferrer(e,t,n,l,s,a,o);if(u<=0)return"";let d=i.readBytes(a,u-1),c="";for(let e of d)c+=String.fromCharCode(e);return c});a.push({parent:Number(i.peek(s,"i32"))>>>0,label:u})}}),a}},va={certificates:0,ocspResponses:1,crls:2};function vs(e,t){let n={certificates:[],ocspResponses:[],crls:[]};for(let r of on)n[r]=function(e,t,n){let{fn:r,mem:i}=e,o=r.EPDFDss_GetCount(t,va[n]),a=[];for(let e=0;e{if(r.EPDFDss_GetData(t,va[n],e,a,o)!==o)throw new N(G.Unknown,`failed to read entry ${e} of the document\'s ${n}`);return new Uint8Array(i.readBytes(a,o))}))}return a}(e,t,r);return n}var vl=class{constructor(e,t){this.runtime=e,this.session=t}read(){return vs(this.runtime,this.session.requireDocPtr())}},vu=class{constructor(e,t){this.runtime=e,this.session=t}add(e,t){for(let n of(hW(t),on))(e[n]??[]).forEach((e,t)=>{let r=function(e){if(0===e.length)return"it is empty";if(e.length>0x1000000)return"it is larger than 16777216 bytes";if(48!==e[0])return"it is not a DER SEQUENCE";let t=or(e,0,e.length);return t?t.end!==e.length?"bytes follow the object":!function e(t,n,r,i){if(i>64)return!1;let o=n;for(;oyZ(e,n))}(r,o,a)&&(!function(e,t,n,r){let{fn:i,mem:o}=e;if(0===hY(o,r.byteLength,e=>(o.writeBytes(e,r),i.EPDFDss_Add(t,va[n],e,r.byteLength))))throw new N(G.MalformedPdf,`the document\'s security store can\'t be extended: its /DSS or its list of ${n} is not what the PDF standard says it is`)}(this.runtime,n,o,a),r[o].push(a),i[o]+=1);return{added:i,meta:{affectedPages:[],cacheDelta:null,...this.session.writeStamp()}}}},vd=class{constructor(e,t){this.runtime=e,this.baseDocuments=t}finalize(e){let[t,n,r,i]=e.byteRange,o=this.runtime.fileAccess.sizeOf(e.path);if(!e.byteRange.every(e=>Number.isSafeInteger(e)&&e>=0)||0!==t||n>=r||r+i!==o)throw new N(G.InvalidArg,`byteRange [${e.byteRange.join(" ")}] does not span a ${o}-byte candidate`);let a=r-n-2;if(!Number.isSafeInteger(e.contentsSizeBytes)||a!==2*e.contentsSizeBytes)throw new N(G.InvalidArg,`the /Contents hole holds ${a} hex digits, not the ${2*e.contentsSizeBytes} of contentsSize`);if(0===e.cms.byteLength||48!==e.cms[0])throw new N(G.SignatureRefused,"the CMS is not a DER SEQUENCE");if(e.cms.byteLength>e.contentsSizeBytes)throw new N(G.SignatureRefused,`the CMS (${e.cms.byteLength} bytes) does not fit the reserved ${e.contentsSizeBytes} bytes`);!function(e,t,n,r){let{mem:i}=e,o=e.fileAccess.readRange(t,n.holeOffset,n.hexLength+2);if(o.byteLength!==n.hexLength+2||60!==o[0]||62!==o[o.byteLength-1])throw new N(G.InvalidArg,"the byteRange gap is not a <\\u2026> /Contents hole of the candidate");let a=i.alloc(o.byteLength);try{i.writeBytes(a,o),AY(e,a,o.byteLength,n.holeOffset,{byteRange:[0,0,0,0],contentsOffset:n.holeOffset+1,contentsHexLength:n.hexLength,digest:new Uint8Array},r),e.fileWrite.writeRange(t,n.holeOffset,i.readBytes(a,o.byteLength))}finally{i.free(a)}}(this.runtime,e.path,{holeOffset:n,hexLength:a},e.cms);let s=new Fu(this.runtime),l=this.baseDocuments.acquireFileBase({key:`finalize:${iX()}`,path:e.path,password:e.password});try{s.openFromHandle(h9(this.runtime,l,{kind:"fresh"},e.password));let t=wN(this.runtime,s);A6(this.runtime,s.requireDocPtr(),t,{fieldObjectNumber:e.fieldObjectNumber,byteRange:e.byteRange,cms:e.cms});let n=new wR(this.runtime,s),r=n.readSnapshot();return{signature:r.signatures.find(t=>"objectNumber"===t.field.kind&&t.field.objectNumber===e.fieldObjectNumber),protection:r.protection,version:n.version(),lastObjectNumber:s.lastObjectNumber()}}finally{s.close()}}},vc=class{constructor(e,t,n){this.runtime=e,this.session=t,this.fonts=n}export(e,t,n){hW(n);let{fields:r,widgets:i,calculationOrder:o}=function(e,t,n){let r=new Set;for(let n of t.fields??[]){let t=e.fields.find(e=>ae(e,n));if(!t)throw new N(G.NotFound,`export: the form has no field ${"fqn"===n.kind?n.name:eM(n)}`);r.add(t)}let i=new Set(n.map(H)),o=new Set;for(let e of t.pages??[]){if(!i.has(H(e)))throw new N(G.NotFound,`export: the document has no page ${H(e)}`);o.add(H(e))}for(let t of e.fields)t.widgets.some(e=>e.page&&o.has(H(e.page)))&&r.add(t);let a=!t.fields&&!t.pages,s=e.fields.filter(e=>a||r.has(e)),l=new Map(e.widgets.map(e=>[K(e.ref),e])),u=s.flatMap(e=>e.widgets.flatMap(e=>{let t=e.ref?l.get(K(e.ref)):void 0;return t?[t]:[]})),d=new Set(s.map(e=>eM(e.ref))),c=e.calculationOrder.filter(e=>null!==e&&d.has(eM(e)));return{fields:s.map(at),widgets:u,calculationOrder:c}}(i8(new wW(this.runtime,this.session,this.fonts).snapshot(n),gF(this.runtime,this.session)),e,this.session.allRecords().map(e=>q(e.pageObjectNumber)));nC("form",t,"items",r.length+i.length);let a=new vf(this.runtime,this.session,t),s=new Set(r.flatMap(e=>"pushbutton"!==e.kind||e.hasImage?[]:e.widgets.flatMap(e=>e.ref?[K(e.ref)]:[]))),l={pages:yk(this.runtime,this.session,i),fields:r.map(e=>({data:e})),widgets:i.map(e=>({data:e,resources:s.has(K(e.ref))?{}:a.of(e)})),calculationOrder:o};nC("form",t,"pages",l.pages.length);let u=nN(l);return nC("form",t,"manifestBytes",u),nC("form",t,"bundleBytes",u+a.totalBytes),{format:"embedpdf/form",version:1,...l,resources:a.byId}}},vf=class extends yx{constructor(e,t,n){super(e,"form",n),this.session=t,hJ(this,"drawings",new Map)}of(e){let t;if("pushbutton"!==e.fieldKind)return{};let n=PV(this.runtime,this.session,e.ref);if(0===n)return{};let r=this.drawings.get(n);if(r)return{image:r};let i=gj(this.runtime,this.session,e.ref);try{t=yA(this.runtime,this.session.requireDocPtr(),i,n)}finally{this.runtime.fn.FPDFPage_CloseAnnot(i)}if(!t)return{};let o=this.keep(t);return this.drawings.set(n,o),{image:o}}},vm=new WeakMap;async function vp(e,t,n,r,i){let o=t.cacheSeq(),a=vm.get(t);a||(a=new Map,vm.set(t,a));let s=a.get(n);if(s&&s.seq===o)return s;let l=await new gL(e,t).read(n,r,i),u={seq:o,folded:rp(l.text),snapshot:l};if(a.delete(n),a.set(n,u),a.size>512){let e=a.keys().next().value;void 0!==e&&a.delete(e)}return u}var vh=class{constructor(e,t){this.runtime=e,this.session=t}async query(e,t,n){hW(t);let r={text:e.text,...e.regex?{regex:!0}:{},...e.matchCase?{matchCase:!0}:{},...e.wholeWord?{wholeWord:!0}:{},...e.matchDiacritics?{matchDiacritics:!0}:{},...e.ignoreWhitespace?{ignoreWhitespace:!0}:{}},i=e.snippets??!1,o=rG(r);if(!o.ok)throw new N(G.InvalidArg,`invalid search query (${o.issue}): ${o.message}`);let a=this.session.allRecords(),s=a.length;if(!r.regex&&0===rp(r.text).folded.trim().length)return{matches:[],nextCursor:null,pagesSearched:0,pageCount:s};let l=this.session.cacheSeq(),u=JSON.stringify([r.regex?"r":"l",r.text,+!!r.matchCase,+!!r.matchDiacritics,+!!r.wholeWord,+!!r.ignoreWhitespace,i?"snippets":"matches"]),d=0,c=0;if(void 0!==e.cursor){let t=function(e,t,n,r){let i;try{i=JSON.parse(t)}catch{throw new N(G.InvalidArg,"malformed search cursor")}if(i?.v!==1||"number"!=typeof i.scanned||"string"!=typeof i.key)throw new N(G.InvalidArg,"malformed search cursor");if(i.key!==r)throw new N(G.InvalidArg,"search cursor belongs to a different query \\u2014 restart the search");if(i.seq!==n)throw new N(G.InvalidArg,"document changed since this search cursor was issued \\u2014 restart the search",{details:{cursorSeq:i.seq,currentSeq:n}});if(void 0!==e.from&&e.from.objectNumber!==i.start)throw new N(G.InvalidArg,"`from` conflicts with the cursor \\u2014 omit it when resuming");return i}(e,e.cursor,l,u);d=t.start,c=t.scanned}else void 0!==e.from&&(d=this.session.resolvePageRef(e.from).pageObjectNumber),void 0!==e.skip&&(c=Math.min(Math.max(0,Math.floor(e.skip)),s));let f=a;if(0!==d){let e=a.findIndex(e=>e.pageObjectNumber===d);f=a.slice(e).concat(a.slice(0,e))}let m=vF(e.limit?.pages,64,256),p=vF(e.limit?.matches,256,1024),h=[],F=0,g=new g$(n,t);for(;c=55296&&t<=56319?2:1;continue}t.wholeWord&&(rS(e,n.index)||rk(e,n.index+n[0].length))||o.push({start:n.index,count:n[0].length})}return o}(s,r):r.matchCase||r.matchDiacritics||r.ignoreWhitespace?rx(rp(s,rE(r)),r):rx(a.folded,r)).length>0){let r=function(e){let t=function(e){let t=[],n=[],r=[n9];for(let i of e.runs){if(!nS(i)){for(let e of i.glyphs)t.push({loose:e.loose,tight:e.tight,space:e.space,empty:e.empty});n.push({start:i.start,count:i.glyphs.length,rect:i.rect,fontSize:i.fontSize,frame:0});continue}let e=function(e,t){let n=t.glyphs.find(e=>!n7(e));if(!n)return 0;let r=n.loose,i=r.upperRight.x-r.upperLeft.x,o=r.upperRight.y-r.upperLeft.y,a=Math.hypot(i,o);if(a<=1e-6)return 0;let s={x:i/a,y:o/a},l=r.upperLeft.x-r.lowerLeft.x,u=r.upperLeft.y-r.lowerLeft.y,d=s.x*u-s.y*l>=0?1:-1,c={x:-s.y*d,y:s.x*d};for(let t=0;t0;if(r>=.9999621552387067&&i)return t}return e.push({baseline:s,ascent:c}),e.length-1}(r,i),o=r[e],a=null;for(let e of i.glyphs){if(n7(e)){t.push({loose:rn,space:e.space,empty:!0});continue}let n=rr(o,e.loose),r=e.tight?rr(o,e.tight):void 0;t.push({loose:n,tight:r,space:e.space}),a=a?{left:Math.min(a.left,n.left),bottom:Math.min(a.bottom,n.bottom),right:Math.max(a.right,n.right),top:Math.max(a.top,n.top)}:n}n.push({start:i.start,count:i.glyphs.length,rect:a??rn,fontSize:i.fontSize,frame:e})}return{glyphs:t,runs:n,frames:r}}(e),n=t.glyphs.length,r=e=>"number"!=typeof e?ro(t,e):Number.isInteger(e)&&e>=0&&e({start:e,count:t-e+1});return{charCount:n,runs:e.runs,charAt:e=>ro(t,e),wordAt:e=>{let n=r(e);return null===n?null:i(function(e,t){let n=e.glyphs.length;if(t<0||t>=n)return[t,t];let r=t;for(;r>0&&!n8(e.glyphs[r-1]);)r--;let i=t;for(;i{let n=r(e);return null===n?null:i(function(e,t){let n=e.runs.findIndex(e=>t>=e.start&&t=0;t--){let n=e.runs[t];if(!rs(n.rect)){if(n.frame!==r.frame||!rl(n.rect.bottom,n.rect.top,i,o))break;a=n.start}}for(let t=n+1;t(function(e,t,n){if(n<=0||0===e.glyphs.length)return[];let r=Math.max(0,t),i=Math.min(e.glyphs.length-1,t+n-1);if(ii)continue;let a=Math.max(r,t.start),s=Math.min(i,n),l=1/0,u=-1/0,d=1/0,c=-1/0,f=0,m=0,p=-1/0,h=0,F=0,g=()=>{f>0&&1/0!==l&&o.push({rect:{left:l,bottom:d,right:u,top:c},charCount:f,fontSize:t.fontSize,frame:t.frame,firstX:h,lastX:F}),l=1/0,u=-1/0,d=1/0,c=-1/0,f=0,m=0,p=-1/0};for(let t=a;t<=s;t++){let n=e.glyphs[t];if(n7(n))continue;let r=n.loose;if(f>0&&p>-1/0){let e=m/f;e>0&&Math.abs(r.left-p)>2.5*e&&g()}let i=(r.left+r.right)/2;0===f&&(h=i),F=i,l=Math.min(l,r.left),u=Math.max(u,r.right),d=Math.min(d,r.bottom),c=Math.max(c,r.top),f++,m+=r.right-r.left,p=r.right}g()}return(function(e){let t=[],n=null,r=null;for(let i of e)n&&r&&n.frame===i.frame&&function(e,t){if(null!=e.fontSize&&null!=t.fontSize&&e.fontSize>0&&t.fontSize>0&&Math.max(e.fontSize,t.fontSize)/Math.min(e.fontSize,t.fontSize)>1.5||.8>function(e,t){let n=e.top-e.bottom,r=t.top-t.bottom;if(n<=0||r<=0)return 0;let i=Math.max(e.top,t.top)-Math.min(e.bottom,t.bottom);return i===n||i===r?1:Math.max(0,Math.min(e.top,t.top)-Math.max(e.bottom,t.bottom))/i}(e.rect,t.rect))return!1;let n=(e.rect.right-e.rect.left)/e.charCount,r=(t.rect.right-t.rect.left)/t.charCount,i=e.rect.left-n,o=e.rect.right+n,a=t.rect.left-r;return ia}(n,i)?r={rect:{left:Math.min(r.rect.left,i.rect.left),bottom:Math.min(r.rect.bottom,i.rect.bottom),right:Math.max(r.rect.right,i.rect.right),top:Math.max(r.rect.top,i.rect.top)},frame:r.frame,firstX:r.firstX,lastX:i.lastX}:(r&&t.push(r),r={rect:i.rect,frame:i.frame,firstX:i.firstX,lastX:i.lastX}),n=i;return r&&r.rect.right>r.rect.left&&r.rect.top>r.rect.bottom&&t.push(r),t})(o).map(t=>(function(e,t){let n=ra(e.frames[t.frame],t.frame,t.rect);return{quad:n,rect:0===t.frame?t.rect:{left:Math.min(n.upperLeft.x,n.upperRight.x,n.lowerLeft.x,n.lowerRight.x),bottom:Math.min(n.upperLeft.y,n.upperRight.y,n.lowerLeft.y,n.lowerRight.y),right:Math.max(n.upperLeft.x,n.upperRight.x,n.lowerLeft.x,n.lowerRight.x),top:Math.max(n.upperLeft.y,n.upperRight.y,n.lowerLeft.y,n.lowerRight.y)},advance:t.lastX>=t.firstX?1:-1}})(e,t))})(t,e.start,e.count),charQuad:e=>(function(e,t){let n=e.glyphs[t];if(!n||n7(n))return null;let r=n.loose;if(r.right<=r.left||r.top<=r.bottom)return null;let i=e.runs.find(e=>t>=e.start&&t0){for(let n=i;n=r;t--)if(oW.test(e[t])){o=t;break}oH(e,o)&&o--}let a=(t,n)=>e.slice(t,n).replace(oq," ");return{before:a(i,t.start),match:a(t.start,r),after:a(r,o)}}(s,t)}:{}})}}c++,F++}return{matches:h,nextCursor:ct.FPDFJavaScriptAction_GetName(l,e,n))??""}finally{t.FPDFDoc_CloseJavaScriptAction(l)}i.reservePayloadBytes(o.length);let u=function(e,t,n){if(e)return e;throw new N(G.MalformedPdf,`failed to read ${t}`,{details:{index:n}})}(F8(t,n,r,t.EPDFDoc_GetNamedJavaScriptActionModel(r,s),i),"name-tree script",s);a.push({name:o,action:u})}let s=F8(t,n,r,t.EPDFDoc_GetOpenActionModel(r),i),l=s?0n:t.EPDFDoc_GetOpenActionDest(r),u=0n!==l?F2(t,n,r,l):null,d={};for(let[o,a]of vg){hW(e);let s=F8(t,n,r,t.EPDFDoc_GetAdditionalActionModel(r,a),i);s&&(d[o]=s)}return{nameTreeScripts:a,openAction:s,openDestination:u,...d}}};function vP(e,t){var n;let{target:r,...i}=e;return r?{...i,target:"rect"===r.kind?(n=t(),"rect"===r.kind?{...r,rect:nA(r.rect,n)}:r):r}:i}function vD(e,t,n){return n4({...e,subtype:"widget"},t,n)}var vb=class{constructor(e,t=0x8000000){this.runtime=e,this.budgetBytes=t,hJ(this,"enabled",void 0),hJ(this,"on",!1),this.enabled=t>0&&"function"==typeof e.fn.EPDF_SetDecodedImageBudget}beginJob(e){this.enabled&&e!==this.on&&(this.runtime.fn.EPDF_SetDecodedImageBudget(e?this.budgetBytes:0),this.on=e)}},vy=class{constructor(e,t){this.runtime=e,this.session=t}viewports(e,t){hW(t);let n=this.session.recordByObjectNumber(e).pageIndex;return gl(this.runtime.fn,this.runtime.mem,this.session.requireDocPtr(),n)}},vw=class{constructor(e,t,n){this.runtime=e,this.session=t,this.pageObjectNumber=n,void 0!==n&&t.recordByObjectNumber(n)}read(e,t){hW(t),vE(e);let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=this.pageObjectNumber;if(!(void 0===o?n.EPDFDoc_HasPieceInfoEntry(i,e):n.EPDFDoc_HasPagePieceInfoEntry(i,o,e)))return null;let a=void 0===o?n.EPDFDoc_GetPieceInfoKeyCount(i,e):n.EPDFDoc_GetPagePieceInfoKeyCount(i,o,e),s={};for(let l=0;lvoid 0===o?n.EPDFDoc_GetPieceInfoKeyAt(i,e,l,t,r):n.EPDFDoc_GetPagePieceInfoKeyAt(i,o,e,l,t,r));null!==a&&(s[a]=this.readEntry(e,a))}let l=h3(r,(t,r)=>void 0===o?n.EPDFDoc_GetPieceInfoLastModified(i,e,t,r):n.EPDFDoc_GetPagePieceInfoLastModified(i,o,e,t,r),null);return{entries:s,modifiedAt:l?hq(l):null}}update(e,t,n){hW(n),vE(e),function(e){if("object"!=typeof e||null===e||Array.isArray(e))throw new N(G.InvalidArg,"pieceInfo patch must be an object")}(t);let r=Object.keys(t);if(0===r.length)return;(function(e,t){for(let n of t){if(0===n.length)throw new N(G.InvalidArg,"pieceInfo keys must be non-empty");!function(e,t){if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t){if("number"==typeof t){if(!Number.isFinite(t))throw new N(G.InvalidArg,`pieceInfo number for \'${e}\' must be finite`);return}if(Array.isArray(t)){if(!t.every(e=>"string"==typeof e))throw new N(G.InvalidArg,`pieceInfo string array for \'${e}\' must contain only strings`);return}if("object"==typeof t&&null!==t&&"name"in t){if("string"!=typeof t.name||0===t.name.length)throw new N(G.InvalidArg,`pieceInfo PDF name for \'${e}\' must be a non-empty string`);return}throw new N(G.InvalidArg,`unsupported pieceInfo value for \'${e}\': string | number | boolean | string[] | { name } | null`)}}(n,e[n])}})(t,r),hW(n);let{mem:i}=this.runtime,o=hH(new Date),a=i.writeU16String(o);try{for(let n of r){let r=t[n];if(!this.writeEntry(e,n,r,a))throw new N(G.Unknown,`pieceInfo write rejected for key \'${n}\' after validation`)}}finally{i.free(a)}}applications(e){hW(e);let{fn:t,mem:n}=this.runtime,r=this.session.requireDocPtr(),i=this.pageObjectNumber,o=void 0===i?t.EPDFDoc_GetPieceInfoEntryCount(r):t.EPDFDoc_GetPagePieceInfoEntryCount(r,i),a=[];for(let e=0;evoid 0===i?t.EPDFDoc_GetPieceInfoEntryAt(r,e,n,o):t.EPDFDoc_GetPagePieceInfoEntryAt(r,i,e,n,o));null!==o&&a.push(o)}return a}delete(e,t){hW(t),vE(e);let{fn:n}=this.runtime,r=this.session.requireDocPtr(),i=this.pageObjectNumber;if(!(void 0===i?n.EPDFDoc_ClearPieceInfoEntry(r,e):n.EPDFDoc_ClearPagePieceInfoEntry(r,i,e)))throw new N(G.Unknown,`pieceInfo delete rejected for application \'${e}\'`)}readEntry(e,t){let{fn:n,mem:r}=this.runtime,i=this.session.requireDocPtr(),o=this.pageObjectNumber;switch(void 0===o?n.EPDFDoc_GetPieceInfoValueType(i,e,t):n.EPDFDoc_GetPagePieceInfoValueType(i,o,e,t)){case 3:{let a=h3(r,(r,a)=>void 0===o?n.EPDFDoc_GetPieceInfoString(i,e,t,r,a):n.EPDFDoc_GetPagePieceInfoString(i,o,e,t,r,a),"");return null===a?{type:"unknown"}:{type:"string",value:a}}case 4:{let a=h2(r,(r,a)=>void 0===o?n.EPDFDoc_GetPieceInfoName(i,e,t,r,a):n.EPDFDoc_GetPagePieceInfoName(i,o,e,t,r,a));return null===a?{type:"unknown"}:{type:"name",value:a}}case 2:{let a=r.alloc(4);try{if(!(void 0===o?n.EPDFDoc_GetPieceInfoNumber(i,e,t,a):n.EPDFDoc_GetPagePieceInfoNumber(i,o,e,t,a)))return{type:"unknown"};return{type:"number",value:Number(r.peek(a,"f32"))}}finally{r.free(a)}}case 1:{let a=r.alloc(4);try{if(!(void 0===o?n.EPDFDoc_GetPieceInfoBoolean(i,e,t,a):n.EPDFDoc_GetPagePieceInfoBoolean(i,o,e,t,a)))return{type:"unknown"};return{type:"boolean",value:0!==Number(r.peek(a,"i32"))}}finally{r.free(a)}}case 5:{let a=void 0===o?n.EPDFDoc_GetPieceInfoStringArrayCount(i,e,t):n.EPDFDoc_GetPagePieceInfoStringArrayCount(i,o,e,t);if(a<0)return{type:"unknown"};let s=[];for(let l=0;lvoid 0===o?n.EPDFDoc_GetPieceInfoStringArrayAt(i,e,t,l,r,a):n.EPDFDoc_GetPagePieceInfoStringArrayAt(i,o,e,t,l,r,a),"");if(null===a)return{type:"unknown"};s.push(a)}return{type:"string-array",value:s}}default:return{type:"unknown"}}}writeEntry(e,t,n,r){let{fn:i,mem:o}=this.runtime,a=this.session.requireDocPtr(),s=this.pageObjectNumber;if(null===n)return void 0===s?i.EPDFDoc_ClearPieceInfoKey(a,e,t,r):i.EPDFDoc_ClearPagePieceInfoKey(a,s,e,t,r);if("string"==typeof n)return h6(o,n,n=>void 0===s?i.EPDFDoc_SetPieceInfoString(a,e,t,n,r):i.EPDFDoc_SetPagePieceInfoString(a,s,e,t,n,r));if("number"==typeof n)return void 0===s?i.EPDFDoc_SetPieceInfoNumber(a,e,t,n,r):i.EPDFDoc_SetPagePieceInfoNumber(a,s,e,t,n,r);if("boolean"==typeof n)return void 0===s?i.EPDFDoc_SetPieceInfoBoolean(a,e,t,n,r):i.EPDFDoc_SetPagePieceInfoBoolean(a,s,e,t,n,r);if(Array.isArray(n))return gf(this.runtime,n,(n,o)=>void 0===s?i.EPDFDoc_SetPieceInfoStringArray(a,e,t,n,o,r):i.EPDFDoc_SetPagePieceInfoStringArray(a,s,e,t,n,o,r));if("object"==typeof n&&null!==n&&"name"in n)return void 0===s?i.EPDFDoc_SetPieceInfoName(a,e,t,n.name,r):i.EPDFDoc_SetPagePieceInfoName(a,s,e,t,n.name,r);throw new N(G.Unknown,`unvalidated pieceInfo value for \'${t}\'`)}};function vE(e){if("string"!=typeof e||0===e.length)throw new N(G.InvalidArg,"pieceInfo application must be non-empty")}function vA(e){return"pages.render"===e.kind||"pages.renderEncoded"===e.kind||"document.renderPageFile"===e.kind||"document.renderPageFileEncoded"===e.kind}var vv=class{constructor(e,t,n={}){this.runtime=e,this.post=t,this.options=n,hJ(this,"sessions",new Map),hJ(this,"baseDocuments",void 0),hJ(this,"aborts",new Map),hJ(this,"fontIds",new Map),hJ(this,"fonts",void 0),hJ(this,"residency",void 0),hJ(this,"decodedImages",void 0),hJ(this,"slices",void 0),hJ(this,"busy",!1),hJ(this,"held",[]),hJ(this,"destroyed",!1),hV(this.runtime),this.baseDocuments=new Fp(this.runtime),this.fonts=new y_(this.runtime,this.fontIds),this.residency=new Fo(this.runtime,{...Fr,budgetBytes:this.options.parsedPageBudgetBytes??Fr.budgetBytes},()=>this.busy),this.decodedImages=new vb(this.runtime,this.options.decodedImageBudgetBytes),this.slices={budgetMs:this.options.sliceMs??8,between:function(){if("function"==typeof setImmediate)return()=>new Promise(e=>setImmediate(e));if("function"==typeof MessageChannel){let e=new MessageChannel,t=[];return e.port1.onmessage=()=>t.shift()?.(),()=>new Promise(n=>{t.push(n),e.port2.postMessage(null)})}return()=>new Promise(e=>setTimeout(e,0))}()}}registerStartupFonts(e){this.fonts.registerStartup(e)}receive(e){"abort"===e.kind?this.abort(e.jobId):"pages.workingSet"===e.kind?this.setWorkingSet(e):this.busy||this.held.length>0?this.held.push(e):this.run(e)}setWorkingSet(e){let t=this.sessions.get(vN(e.docId,e.layerName));t?.isOpen()&&t.pagePool().setWorkingSet(e.view,e.pages.map(({page:e,role:t,pixels:n})=>({pageObjectNumber:e.objectNumber,role:t,pixels:n})))}abort(e){let t=this.held.findIndex(t=>t.jobId===e);if(t<0)return void this.aborts.get(e)?.abort();this.held.splice(t,1);let n=C(new ns("aborted before it ran"));this.post(aC({kind:"reject",jobId:e,error:n},aN))}drain(){for(;!this.busy;){let e=this.takeHeld();if(!e)return;this.run(e)}}takeHeld(){let e=this.held[0];if(!e||!vA(e))return this.held.shift();let t=0,n=e;for(let e=1;et(e.page))}:r}(e,t)}}(e,this.visibleBoxesFor(e))}catch(t){this.post(aC({kind:"reject",jobId:e.jobId,error:C(t)},aN));return}let o=this.slicedWork(n);if(o)return void this.runSliced(e,n,i,o);let a=new AbortController;this.aborts.set(n.jobId,a);let s=this.transactedSession(n);try{if(this.assertNoPendingSigning(n),this.options.reportEveryFontChange){let e=this.sessionWrittenBy(n);e&&ym(this.runtime,e)}switch(s&&vO(n)&&s.beginTransaction(n.opId),this.writingSession(n)?.clearMissingCharacters(),s&&"objectNumberFloor"in n&&void 0!==n.objectNumberFloor&&s.raiseLastObjectNumber(n.objectNumberFloor-1),n.kind){case"open.fatMem":case"open.layerMemBase":case"open.layerFileBase":r=this.handleOpen(n);break;case"metadata.read":r=this.handleMetadataRead(n,a.signal);break;case"metadata.update":r=this.handleMetadataUpdate(n,a.signal);break;case"metadata.readCustom":r=this.handleMetadataReadCustom(n,a.signal);break;case"metadata.updateCustom":r=this.handleMetadataUpdateCustom(n,a.signal);break;case"actions.read":r=this.handleActionsRead(n,a.signal);break;case"outline.read":r=this.handleOutlineRead(n,a.signal);break;case"annotations.list":r=this.handleAnnotationsList(n,a.signal);break;case"annotations.create":r=this.handleAnnotationsCreate(n,a.signal);break;case"annotations.update":r=this.handleAnnotationsUpdate(n,a.signal);break;case"annotations.delete":r=this.handleAnnotationsDelete(n,a.signal);break;case"annotations.reorder":r=this.handleAnnotationsReorder(n,a.signal);break;case"document.apply":r=this.handleDocumentApply(n,a.signal);break;case"document.applyChanges":r=this.handleDocumentApplyChanges(n,a.signal);break;case"signatures.list":r=this.handleSignaturesList(n);break;case"signatures.contents":r=this.handleSignaturesContents(n);break;case"signatures.digest":r=this.handleSignaturesDigest(n);break;case"signatures.revisionBytes":r=this.handleSignaturesRevisionBytes(n);break;case"document.version":r=this.handleDocumentVersion(n);break;case"signatures.prepare":r=this.handleSignaturesPrepare(n);break;case"signatures.complete":r=this.handleSignaturesComplete(n);break;case"signatures.cancel":r=this.handleSignaturesCancel(n);break;case"signatures.validationInfo":r=this.handleSignaturesValidationInfo(n);break;case"signatures.addValidationInfo":r=this.handleSignaturesAddValidationInfo(n,a.signal);break;case"signatures.analyze":r=this.handleSignaturesAnalyze(n);break;case"signatures.finalizeCandidate":r=this.handleSignaturesFinalizeCandidate(n);break;case"forms.list":r=this.handleFormsList(n,a.signal);break;case"forms.setValue":r=this.handleFormsSetValue(n,a.signal);break;case"forms.reset":r=this.handleFormsReset(n,a.signal);break;case"forms.export":r=this.handleFormsExport(n,a.signal);break;case"forms.import":r=this.handleFormsImport(n,a.signal);break;case"forms.importValues":r=this.handleFormsImportValues(n,a.signal);break;case"forms.repair":r=this.handleFormsRepair(n,a.signal);break;case"forms.createField":r=this.handleFormsCreateField(n,a.signal);break;case"forms.updateField":r=this.handleFormsUpdateField(n,a.signal);break;case"forms.setSignatureAppearance":r=this.handleFormsSetSignatureAppearance(n,a.signal);break;case"forms.deleteField":r=this.handleFormsDeleteField(n,a.signal);break;case"forms.addWidget":r=this.handleFormsAddWidget(n,a.signal);break;case"forms.detachWidget":r=this.handleFormsDetachWidget(n,a.signal);break;case"forms.updateWidget":r=this.handleFormsUpdateWidget(n,a.signal);break;case"forms.deleteWidget":r=this.handleFormsDeleteWidget(n,a.signal);break;case"forms.reorderWidgets":r=this.handleFormsReorderWidgets(n,a.signal);break;case"forms.reorderCalculations":r=this.handleFormsReorderCalculations(n,a.signal);break;case"pages.list":r=this.handlePagesList(n,a.signal);break;case"pages.setName":r=this.handlePagesSetName(n,a.signal);break;case"annotations.flatten":r=this.handleAnnotationsFlatten(n,a.signal);break;case"annotations.exportAppearance":r=this.handleAnnotationsExportAppearance(n,a.signal);break;case"annotations.readAppearance":r=this.handleAnnotationsReadAppearance(n,a.signal);break;case"annotations.export":r=this.handleAnnotationsExport(n,a.signal);break;case"annotations.import":r=this.handleAnnotationsImport(n,a.signal);break;case"pages.removeName":r=this.handlePagesRemoveName(n,a.signal);break;case"pages.flatten":r=this.handlePagesFlatten(n,a.signal);break;case"redaction.apply":r=this.handleRedactionApply(n,a.signal);break;case"pages.extract":r=this.handlePagesExtract(n,a.signal);break;case"attachments.list":r=this.handleAttachmentsList(n,a.signal);break;case"attachments.readFile":r=this.handleAttachmentsReadFile(n,a.signal);break;case"measure.setScale":r=this.handleMeasureSetScale(n,a.signal);break;case"pieceInfo.read":r=this.handlePieceInfoRead(n,a.signal);break;case"pieceInfo.update":r=this.handlePieceInfoUpdate(n,a.signal);break;case"pieceInfo.applications":r=this.handlePieceInfoApplications(n,a.signal);break;case"pieceInfo.delete":r=this.handlePieceInfoDelete(n,a.signal);break;case"document.saveBuffer":r=this.handleDocumentSaveBuffer(n);break;case"document.saveLayerBuffer":r=this.handleDocumentSaveLayerBuffer(n);break;case"document.saveFile":r=this.handleDocumentSaveFile(n);break;case"document.probeSecurityFile":r=this.handleDocumentProbeSecurityFile(n);break;case"document.checkPasswordPermissions":r=this.handleDocumentCheckPasswordPermissions(n);break;case"fonts.register":r=this.handleFontsRegister(n);break;case"fonts.addFallback":r=this.handleFontsAddFallback(n);break;case"fonts.clearFallbacks":r=this.handleFontsClearFallbacks(n);break;case"fonts.clear":r=this.handleFontsClear(n);break;case"fonts.authorizeEditing":r=this.handleFontsAuthorizeEditing(n);break;case"fonts.list":r=aC({tag:"fonts.list",engineFonts:this.fonts.engineFontFacts(),fallbacks:this.fonts.fallbackKeys()});break;case"fonts.program":r=this.handleFontsProgram(n);break;case"document.setFontSettings":r=this.handleDocumentSetFontSettings(n);break;case"document.fonts.list":r=this.handleDocumentFontsList(n);break;case"document.fonts.resolve":r=this.handleDocumentFontsResolve(n);break;case"document.fonts.program":r=this.handleDocumentFontsProgram(n);break;case"objectNumbers.reserve":r=aC({tag:"objectNumbers.reserve",range:this.requireSession(n).reserveObjectNumbers(n.count)});break;case"layer.close":r=this.handleLayerClose(n);break;case"close":r=this.handleClose(n);break;case"shutdown":r=this.handleShutdown(n);break;default:throw new N(G.InvalidArg,`unknown request kind: ${n.kind}`)}s?.inTransaction()&&s.commitTransaction(),this.resolve(n,r)}catch(t){s?.inTransaction()&&s.abortTransaction();let e=C(t);this.post(aC({kind:"reject",jobId:n.jobId,error:e},aN))}finally{this.aborts.delete(n.jobId),this.closePagesChangedBy(e,i)}}writingSession(e){if(!vO(e)||!("docId"in e))return;let t="layerName"in e?e.layerName:void 0,n=this.sessions.get(vN(e.docId,t));return n?.isOpen()?n:void 0}sessionWrittenBy(e){if(!("docId"in e)||"write"!==e.effect&&"contentWrite"!==e.effect)return;let t="layerName"in e?e.layerName:void 0,n=this.sessions.get(vN(e.docId,t));return n?.isOpen()?n:void 0}transactedSession(e){if(!vO(e))return;let t="layerName"in e?e.layerName:void 0,n=this.sessions.get(vN(e.docId,t));if(n?.isOpen()&&"layer"===n.kind)return n.assertUsable(),n}closePagesChangedBy(e,t){if("runtime"===t)return void this.residency.closeIdle();if("document"!==t||!("docId"in e))return;let n="layerName"in e?e.layerName:void 0;this.sessions.get(vN(e.docId,n))?.pagePool().closeIdle()}resolve(e,t){let n=function(e,t){var n,r,i,o;let a=e=>n6(e,t(e.page),t),s=e=>e.map(e=>i4(e,t));switch(e.tag){case"pages.list":return{...e,snapshot:i1(e.snapshot)};case"pages.setName":case"pages.removeName":case"measure.setScale":return{...e,result:{...e.result,layout:i1(e.result.layout)}};case"pages.geometry":return{...e,snapshot:(n=e.snapshot,r=t(e.page),{...n,runs:n.runs.map(e=>{let t=e.glyphs.some(e=>!e.empty)?nE(e.rect,r):ru;return nS(e)?{...e,rect:t,glyphs:e.glyphs.map(({loose:e,tight:t,...n})=>({...n,loose:n.empty?rd:nv(e,r),...t?{tight:nv(t,r)}:{}}))}:{...e,rect:t,glyphs:e.glyphs.map(({loose:e,tight:t,...n})=>({...n,loose:n.empty?ru:nE(e,r),...t?{tight:nE(t,r)}:{}}))}})})};case"pages.render":return{...e,area:nE(e.area,t(e.page))};case"search.query":return{...e,slice:(i=e.slice,{...i,matches:i.matches.map(e=>{let n=t(e.page);return{...e,segments:e.segments.map(e=>({...e,quad:nv(e.quad,n),rect:nE(e.rect,n)}))}})})};case"annotations.renderAppearances":{let n=i3(e.result.appearances,t(e.page));return{...e,result:{...e.result,appearances:n}}}case"annotations.renderAppearancesEncoded":{let n=i3(e.result.appearances,t(e.page));return{...e,result:{...e.result,appearances:n}}}case"actions.read":return{...e,snapshot:function(e,t){let{nameTreeScripts:n,openAction:r,openDestination:i,...o}=e;return{...nJ(o,t),nameTreeScripts:n.map(e=>({...e,action:nK(e.action,t)})),openAction:r?nK(r,t):null,..."openDestination"in e?{openDestination:i?t(i):i}:{}}}(e.snapshot,e=>nW(e,t))};case"outline.read":return{...e,outline:(o=e.outline,{...o,items:o.items.map(e=>i9(e,t))})};case"annotations.list":return{...e,list:{...e.list,annotations:e.list.annotations.map(a)}};case"annotations.create":case"annotations.update":return{...e,result:{...e.result,annotation:a(e.result.annotation)}};case"document.apply":case"document.applyChanges":default:return e;case"annotations.import":return{...e,result:{...e.result,annotations:e.result.annotations.map(a)}};case"measure.viewports":return{...e,viewports:n0(e.viewports,t(e.page))};case"forms.list":return{...e,snapshot:i8(e.snapshot,t)};case"forms.import":return{...e,result:{...e.result,fields:e.result.fields.map(e=>i5(e,t)),widgets:s(e.result.widgets)}};case"forms.importValues":return{...e,result:{...e.result,fields:e.result.fields.map(e=>i5(e,t)),widgets:s(e.result.widgets)}};case"forms.setValue":case"forms.createField":case"forms.updateField":case"forms.setSignatureAppearance":case"forms.addWidget":case"forms.detachWidget":return{...e,result:{...e.result,field:i5(e.result.field,t),widgets:s(e.result.widgets)}};case"forms.reset":return{...e,result:{...e.result,fields:e.result.fields.map(e=>i5(e,t)),widgets:s(e.result.widgets)}};case"forms.updateWidget":return{...e,result:{...e.result,widget:i4(e.result.widget,t)}};case"forms.deleteWidget":return{...e,result:{...e.result,field:e.result.field&&i5(e.result.field,t)}}}}(t.payload,this.visibleBoxesFor(e));this.post(aC({kind:"resolve",jobId:e.jobId,result:n},t.transfer))}visibleBoxesFor(e){let t=null;return n=>{if(!("docId"in e))throw new N(G.InvalidArg,`${e.kind} has no document`);return t??(t=gF(this.runtime,this.requireSession(e))),t(n)}}handleOpen(e){let t,n=vN(e.docId,"open.fatMem"===e.kind?void 0:e.layerName);if(this.sessions.has(n))throw new N(G.InvalidArg,`document session already open: ${n}`);let r=new Fu(this.runtime);if(r.residency=this.residency,r.signedDocumentPolicy=e.signedDocumentPolicy??"protect",r.password=e.password,r.objectNumberAuthority=e.objectNumbers??"session","open.fatMem"===e.kind){let n=new Uint8Array(e.bytes);t=e=>this.openBytesAsLayer(r,n,e)}else if("open.layerMemBase"===e.kind){let n=new Uint8Array(e.baseBytes);t=t=>{let i=this.baseDocuments.acquireMemoryBase({key:e.baseKey,bytes:n,password:t,knownSha256:e.baseSha256});r.openFromHandle(h9(this.runtime,i,e.layer,t))}}else{if("native"!==this.runtime.kind)throw new N(G.NotImplemented,"\'layerFile\' needs the native Node runtime; open the file\'s bytes instead");t=t=>{let n=this.baseDocuments.acquireFileBase({key:e.baseKey,path:e.basePath,password:t,knownSha256:e.baseSha256});r.openFromHandle(h9(this.runtime,n,e.layer,t))}}try{t(e.password)}catch(o){var i;if(!((i=o)instanceof N&&(i.code===G.DocPasswordRequired||i.code===G.DocPasswordIncorrect)))throw o;return r.parkLocked(t),this.sessions.set(n,r),aC({tag:"open",docId:e.docId,security:{encryptionState:"encrypted",encryptionRequiresPassword:!0,securityHandlerRevision:null,pdfPermissionsBits:null,pdfPermissionsAllAllowed:null,pdfOpenedAs:null,securityProbedAt:Date.now()},...e.password?{passwordRejected:!0}:{}})}return this.sessions.set(n,r),aC({tag:"open",docId:e.docId,security:new AH(this.runtime).checkPasswordPermissions(r,e.password??""),protection:this.probeProtection(r),...e.reserveObjectNumbers?{objectNumbers:r.reserveObjectNumbers(e.reserveObjectNumbers)}:{},lastObjectNumber:r.lastObjectNumber()})}openBytesAsLayer(e,t,n){let r=this.baseDocuments.acquireMemoryBase({key:`bytes-open:${iX()}`,bytes:t,password:n});e.openFromHandle(h9(this.runtime,r,{kind:"fresh"},n)),e.persistLayerArtifact=!1}probeProtection(e){try{return new wR(this.runtime,e).readProtection()}catch{return null}}handleSignaturesList(e){let t=this.requireSession(e);return aC({tag:"signatures.list",snapshot:e.workingCopy?new vo(this.runtime,t).readWorkingCopySnapshot():new wR(this.runtime,t).readSnapshot()})}handleSignaturesContents(e){let t=this.requireSession(e),n=new wR(this.runtime,t).readContents(e.ref);return aC({tag:"signatures.contents",bytes:n},[n])}handleSignaturesDigest(e){let t=this.requireSession(e),n=new wR(this.runtime,t).digest(e.ref,e.algorithm);return aC({tag:"signatures.digest",digest:n},[n])}handleSignaturesRevisionBytes(e){let t=this.requireSession(e),n=new wR(this.runtime,t).revisionBytes(e.revisionIndex);return aC({tag:"signatures.revisionBytes",bytes:n,size:n.byteLength},[n])}handleDocumentVersion(e){let t=this.requireSession(e);return aC({tag:"document.version",version:new wR(this.runtime,t).version()})}handleSignaturesPrepare(e){let t=this.requireSession(e);return aC({tag:"signatures.prepare",result:new ve(this.runtime,t,this.baseDocuments,this.options.signingCandidatePath).prepare(e.input,e.authority),fieldObjectNumber:t.pendingSigning.fieldObjectNumber})}handleSignaturesComplete(e){let t=this.requireSession(e),n=new ve(this.runtime,t,this.baseDocuments,this.options.signingCandidatePath).complete(e.input,e.opId,e.authority);return"already-completed"===n.status?aC({tag:"signatures.complete",result:n}):this.finishMutation(t,{tag:"signatures.complete",result:n},e.artifactPath)}handleSignaturesValidationInfo(e){let t=this.requireSession(e),n=new vl(this.runtime,t).read(),r=e=>e.buffer,i=n.certificates.map(r),o=n.ocspResponses.map(r),a=n.crls.map(r);return aC({tag:"signatures.validationInfo",certificates:i,ocspResponses:o,crls:a},[...i,...o,...a])}handleSignaturesAddValidationInfo(e,t){let n=this.requireSession(e),r=new vu(this.runtime,n).add({certificates:e.certificates.map(e=>new Uint8Array(e)),ocspResponses:e.ocspResponses.map(e=>new Uint8Array(e)),crls:e.crls.map(e=>new Uint8Array(e))},t),i={tag:"signatures.addValidationInfo",result:r};return Object.values(r.added).some(e=>e>0)?this.finishMutation(n,i,e.artifactPath):aC(i)}handleSignaturesAnalyze(e){let t=this.requireSession(e);return aC({tag:"signatures.analyze",analysis:new vo(this.runtime,t).analyze(e.input)})}handleSignaturesFinalizeCandidate(e){return aC({tag:"signatures.finalizeCandidate",...new vd(this.runtime,this.baseDocuments).finalize({path:e.path,byteRange:e.byteRange,contentsSizeBytes:e.contentsSizeBytes,fieldObjectNumber:e.fieldObjectNumber,cms:new Uint8Array(e.cms),password:e.password??null})})}handleSignaturesCancel(e){let t=this.requireSession(e);return aC({tag:"signatures.cancel",result:new ve(this.runtime,t,this.baseDocuments,this.options.signingCandidatePath).cancel(e.signingId)})}assertNoPendingSigning(e){if(!vO(e))return;let t="layerName"in e?e.layerName:void 0,n=this.sessions.get(vN(e.docId,t));if(n?.pendingSigning)throw new N(G.SigningPending,`a signing is pending (${n.pendingSigning.prepared.signingId}); complete or cancel it before mutating the document`)}handleMetadataRead(e,t){let n=this.requireSession(e);return aC({tag:"metadata.read",metadata:new FF(this.runtime,n).read(t)})}handleMetadataUpdate(e,t){let n=this.requireSession(e),{type:r,skipped:i,...o}=this.applyOne(n,e.opId,{type:"metadata.update",patch:e.patch},vk(),t);return this.finishMutation(n,{tag:"metadata.update",result:o},e.artifactPath)}handleMetadataReadCustom(e,t){let n=this.requireSession(e);return aC({tag:"metadata.readCustom",custom:new FF(this.runtime,n).readCustom(t)})}handleMetadataUpdateCustom(e,t){let n=this.requireSession(e),{type:r,skipped:i,...o}=this.applyOne(n,e.opId,{type:"metadata.updateCustom",patch:e.patch},vk(),t);return this.finishMutation(n,{tag:"metadata.updateCustom",result:o},e.artifactPath)}handleActionsRead(e,t){let n=this.requireSession(e);return aC({tag:"actions.read",snapshot:new v_(this.runtime,n).read(t)})}handleOutlineRead(e,t){let n=this.requireSession(e);return aC({tag:"outline.read",outline:new E9(this.runtime,n).read(t)})}handleAnnotationsList(e,t){let n=this.requireSession(e),r=e.pages?.map(e=>n.resolvePageRef(e).pageObjectNumber);return aC({tag:"annotations.list",list:new DP(this.runtime,n,this.fonts).list(r,t,"annotations")})}async handleAnnotationsRenderAppearances(e,t){let n=this.requireSession(e),r=n.resolvePageRef(e.page).pageObjectNumber,i=await new DF(this.runtime,n).render(r,e.family,e.options??{},t,this.slices),o=i.appearances.map(e=>e.raster.data);return aC({tag:"annotations.renderAppearances",page:e.page,result:i},o)}handleAnnotationsCreate(e,t){let n=this.requireSession(e),{type:r,page:i,...o}=this.applyOne(n,e.opId,{type:"annotations.create",page:e.page,data:e.draft,...e.resources?{resources:e.resources}:{},...void 0!==e.objectNumber?{objectNumber:e.objectNumber}:{}},vk(e.actor),t);return this.finishMutation(n,{tag:"annotations.create",result:o},e.artifactPath)}handleAnnotationsUpdate(e,t){let n=this.requireSession(e),{type:r,page:i,skipped:o,...a}=this.applyOne(n,e.opId,{type:"annotations.update",ref:e.ref,patch:e.patch,...e.resources?{resources:e.resources}:{}},{...e.authority,protection:null},t);return this.finishMutation(n,{tag:"annotations.update",result:a},e.artifactPath)}handleAnnotationsDelete(e,t){let n=this.requireSession(e),{type:r,page:i,...o}=this.applyOne(n,e.opId,{type:"annotations.delete",ref:e.ref},{...e.authority,protection:null},t);return this.finishMutation(n,{tag:"annotations.delete",result:o},e.artifactPath)}handleAnnotationsFlatten(e,t){let n=this.requireSession(e),r=n.resolvePageRef(e.page).pageObjectNumber,i=new yE(this.runtime,n).flatten(r,e.refs,e.usage,t),o=i.meta.affectedPages.length>0;return o?this.finishMutation(n,{tag:"annotations.flatten",result:i,wrote:o},e.artifactPath):aC({tag:"annotations.flatten",result:i,wrote:o})}handleAnnotationsExportAppearance(e,t){let n=this.requireSession(e),r=n.resolvePageRef(e.page).pageObjectNumber,i=new yE(this.runtime,n).exportAppearance(r,e.refs,t);return aC({tag:"annotations.exportAppearance",bytes:i.bytes,size:i.size},[i.bytes])}handleAnnotationsExport(e,t){let n=this.requireSession(e),r=new yG(this.runtime,n,this.fonts).export(e.selection,e.limits??nI,t);return aC({tag:"annotations.export",bundle:r},Object.values(r.resources))}handleAnnotationsImport(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"annotations.import",bundle:e.bundle,...void 0!==e.pages?{pages:e.pages}:{},attribution:e.attribution,...e.actor?{actor:e.actor}:{},limits:e.limits??nI},vk(e.actor),t);return 0===i.annotations.length?aC({tag:"annotations.import",result:i}):this.finishMutation(n,{tag:"annotations.import",result:i},e.artifactPath)}handleAnnotationsReadAppearance(e,t){let n=this.requireSession(e),r=n.resolvePageRef(e.page).pageObjectNumber,i=new yE(this.runtime,n).readAppearance(r,e.ref,t);return aC({tag:"annotations.readAppearance",bytes:i.bytes,size:i.size},[i.bytes])}handleAnnotationsReorder(e,t){let n=this.requireSession(e),{type:r,page:i,...o}=this.applyOne(n,e.opId,{type:"annotations.reorder",page:e.page,refs:e.refs,position:e.position},{...e.authority,protection:null},t);return this.finishMutation(n,{tag:"annotations.reorder",result:o},e.artifactPath)}handleDocumentApply(e,t){let n=this.requireSession(e);!function(e){if(iS(e))return;let t={"annotations.import":"doc.annotations.import","forms.import":"doc.forms.import","forms.importValues":"doc.forms.importValues"},n=e.ops.find(({type:e})=>e in t);if(n)throw new N(G.InvalidArg,`doc.apply takes no import: import a bundle with ${t[n.type]}`)}(e.change);let r=oZ(e.change),i=AW(n).outcome(e.opId);if(i)return aC({tag:"document.apply",result:this.replayed(i,r,e.opId),replayed:!0});let o=this.recorded(n,e.opId,r,()=>this.runChange(n,e,t)),a={tag:"document.apply",result:o,replayed:!1};return o.items.some(iv)?this.finishMutation(n,a,e.artifactPath):aC(a)}applyOne(e,t,n,r,i){let o={ops:[n]},a=AW(e),s=oZ(o),l=a.outcome(t),u=(l?this.replayed(l,s,t):this.recorded(e,t,s,()=>new A$(this.runtime,e,this.fonts).apply(o.ops,r,i,AL))).items[0];if(!u||iA(u))throw new N(G.Unknown,`${n.type} wrote nothing`);return u}replayed(e,t,n){if(e.fingerprint!==t)throw new N(G.IdempotencyKeyReused,`opId ${n} already answered a different change`);if("refused"===e.kind){var r;throw new N((r=e.error).code,r.message,{details:r.details})}return e.result}recorded(e,t,n,r){let i=AW(e);try{let o=r(),a=vG(e,o);return i.keepApplied(t,n,a,a.meta.undoable?o.record:null),a}catch(e){var o;throw N.is(e)&&(o=e.code,oK.has(o))&&i.keepRefused(t,n,C(e)),e}}handleDocumentApplyChanges(e,t){let n=this.requireSession(e);n.assertUsable(),void 0!==e.objectNumberFloor&&n.raiseLastObjectNumber(e.objectNumberFloor-1);let r=new A$(this.runtime,n,this.fonts,e.limits),i=this.pageSpaceOf(n),o=new Map,a=[];for(let l of e.changes){n.beginTransaction(l.opId);try{let e=function(e,t,n,r,i){let{change:o,authority:a}=t;if(!iS(o))return e.apply(o.ops,a,r,i);let s=a.identity.userId??null,l=n.has(o.undoOf)?n.get(o.undoOf):t.record;if(void 0===l)throw new N(G.UndoUnavailable,`change ${o.undoOf} can no longer be undone`,{details:{reason:"expired"}});return l?e.undo(l,a,r,i):{items:[],record:{userId:s,steps:[]}}}(r,l,o,t,i),s=vG(n,e);n.commitTransaction();let u=s.meta.undoable?e.record:null;o.set(l.opId,u),a.push({opId:l.opId,status:"applied",result:s,record:u})}catch(e){var s;if(n.inTransaction()&&n.abortTransaction(),!N.is(e)||(s=e.code,!oK.has(s)))throw e;o.set(l.opId,null),a.push({opId:l.opId,status:"refused",error:C(e)})}}let l={tag:"document.applyChanges",outcomes:a};return a.some(e=>"applied"===e.status&&e.result.items.some(iv))?this.finishMutation(n,l,e.artifactPath):aC(l)}pageSpaceOf(e){return{opInFileSpace:t=>(function(e,t){switch(e.type){case"annotations.import":case"forms.import":case"forms.importValues":case"annotations.copy":case"forms.copy":case"forms.repeat":case"pages.setScale":default:return e;case"annotations.create":return{...e,data:n5(e.data,t(e.page),t)};case"annotations.update":{let n=t(e.ref.page),{expect:r,...i}=e;return{...i,patch:n4(e.patch,n,t),...r?{expect:n4(r,n,t)}:{}}}case"annotations.delete":{let{expect:n,...r}=e;return n?{...r,expect:n4(n,t(e.ref.page),t)}:r}case"forms.create":return{...e,draft:i6(e.draft,t)};case"forms.addWidget":return{...e,placement:i2(e.placement,t)};case"forms.updateWidget":{let n=t(e.widget.page),{expect:r,...i}=e;return{...i,patch:vD(e.patch,n,t),...r?{expect:vD(r,n,t)}:{}}}case"forms.deleteWidget":{let{expect:n,...r}=e;return n?{...r,expect:vD(n,t(e.widget.page),t)}:r}case"outline.create":var n;return{...e,data:(n=e.data,i7(n,e=>nq(e,t)))};case"outline.update":{let{expect:n,...r}=e;return{...r,patch:oe(e.patch,t),...n?{expect:oe(n,t)}:{}}}case"outline.delete":{let{expect:n,...r}=e;return n?{...r,expect:oe(n,t)}:r}}})(t,gF(this.runtime,e)),itemOut:t=>(function(e,t){if(iA(e))return e;let n=e=>n6(e,t(e.page),t),r=e=>e.map(e=>i4(e,t));switch(e.type){case"annotations.create":case"annotations.update":return{...e,annotation:n(e.annotation)};case"annotations.restore":case"annotations.import":case"annotations.copy":return{...e,annotations:e.annotations.map(n)};case"forms.setValue":case"forms.setDisplay":case"forms.setAppearanceText":case"forms.setSignatureAppearance":case"forms.setButtonImage":case"forms.create":case"forms.update":case"forms.restore":case"forms.addWidget":case"forms.removeWidget":return{...e,field:i5(e.field,t),widgets:r(e.widgets)};case"forms.reset":case"forms.import":case"forms.importValues":case"forms.copy":case"forms.repeat":return{...e,fields:e.fields.map(e=>i5(e,t)),widgets:r(e.widgets)};case"forms.updateWidget":return{...e,widget:i4(e.widget,t)};case"forms.deleteWidget":return{...e,field:e.field&&i5(e.field,t)};case"forms.restoreWidget":return{...e,field:e.field&&i5(e.field,t),widgets:r(e.widgets)};case"outline.create":case"outline.update":return{...e,item:i9(e.item,t)};case"outline.restore":return{...e,items:e.items.map(e=>i9(e,t))};case"pages.rotate":case"pages.setScale":case"pages.reorder":case"pages.delete":case"pages.insertBlank":case"pages.insert":case"pages.copy":case"pages.restore":return{...e,layout:i1(e.layout)};default:return e}})(t,gF(this.runtime,e))}}runChange(e,t,n){let r=new A$(this.runtime,e,this.fonts),i=this.pageSpaceOf(e),o=t.authority.identity.userId??null;if(!iS(t.change))return r.apply(t.change.ops,t.authority,n,i);let a=AW(e).record(t.change.undoOf);if(!a||"unavailable"in a)throw new N(G.UndoUnavailable,`change ${t.change.undoOf} can no longer be undone`,{details:{reason:a?a.unavailable:"expired"}});if(!a.record)return{items:[],record:{userId:o,steps:[]}};if(null!==a.record.userId&&a.record.userId!==o)throw new na("changes:undo","target");return r.undo(a.record,t.authority,n,i)}handlePagesList(e,t){let n=this.requireSession(e);return aC({tag:"pages.list",snapshot:new gh(this.runtime,n).read(t)})}handlePagesSetName(e,t){let n=this.requireSession(e),r=new gw(this.runtime,n).setName({name:e.name,page:e.page,...void 0!==e.replace?{replace:e.replace}:{}},t);return this.finishMutation(n,{tag:"pages.setName",result:r},e.artifactPath)}handlePagesRemoveName(e,t){let n=this.requireSession(e),r=new gw(this.runtime,n).removeName({name:e.name},t);return this.finishMutation(n,{tag:"pages.removeName",result:r},e.artifactPath)}handlePagesFlatten(e,t){let n=this.requireSession(e),r=new gO(this.runtime,n).flatten(e.pages,e.usage,t),i=r.meta.affectedPages.length>0;return i?this.finishMutation(n,{tag:"pages.flatten",result:r,wrote:i},e.artifactPath):aC({tag:"pages.flatten",result:r,wrote:i})}handleRedactionApply(e,t){let n=this.requireSession(e),r=new gB(this.runtime,n).apply(e.scope,t),i=r.meta.affectedPages.length>0;return i?this.finishMutation(n,{tag:"redaction.apply",result:r,wrote:i},e.artifactPath):aC({tag:"redaction.apply",result:r,wrote:i})}handlePagesExtract(e,t){let n=this.requireSession(e),r=new gE(this.runtime,n).extract(e.pages,e.flatten,t);return aC({tag:"pages.extract",bytes:r.bytes,size:r.size},[r.bytes])}handleDocumentFontsList(e){let t=this.requireSession(e);return ym(this.runtime,t),aC({tag:"document.fonts.list",facts:new yl(this.runtime,t,this.fonts).facts()})}handleDocumentFontsResolve(e){let t=new yl(this.runtime,this.requireSession(e),this.fonts),n=t.facts(),{runs:r,missingCharacters:i}=t.resolve(e.annotation,e.runs,n);return aC({tag:"document.fonts.resolve",runs:r,missingCharacters:i,facts:n})}handleDocumentFontsProgram(e){let t=new yl(this.runtime,this.requireSession(e),this.fonts).program(e.displaySha256,"data"===e.part),n=t.bytes?t.bytes.buffer.slice(t.bytes.byteOffset,t.bytes.byteOffset+t.bytes.byteLength):null;return aC({tag:"document.fonts.program",covers:t.covers,ascent:t.ascent,descent:t.descent,bytes:n},n?[n]:[])}handleAttachmentsList(e,t){let n=this.requireSession(e);return aC({tag:"attachments.list",attachments:new wp(this.runtime,n).list(t)})}handleAttachmentsReadFile(e,t){let n=this.requireSession(e),r=new wp(this.runtime,n).readFile(e.ref,e.path,e.maxDecodedBytes,t);return aC({tag:"attachments.readFile",content:r},void 0!==r.bytes?[r.bytes]:[])}async handleAnnotationsReadFile(e,t){let n=this.requireSession(e),r=await new wp(this.runtime,n).readAnnotationFile(n.resolvePageRef(e.page).pageObjectNumber,e.ref,e.path,e.maxDecodedBytes,t,this.slices);return aC({tag:"annotations.readFile",content:r},void 0!==r.bytes?[r.bytes]:[])}async handleMeasureViewports(e,t){let n=this.requireSession(e),r=new vy(this.runtime,n).viewports(n.resolvePageRef(e.page).pageObjectNumber,t);return aC({tag:"measure.viewports",page:e.page,viewports:r})}handleMeasureSetScale(e,t){let n=this.requireSession(e);return new Aj(this.runtime,n).setScale(n.resolvePageRef(e.page).pageObjectNumber,e.measure,t),this.finishMutation(n,{tag:"measure.setScale",result:{page:e.page,layout:new gh(this.runtime,n).read(t),meta:{affectedPages:[],cacheDelta:null,...n.writeStamp()}}},e.artifactPath)}handlePieceInfoRead(e,t){let n=this.requireSession(e);return aC({tag:"pieceInfo.read",snapshot:new vw(this.runtime,n,e.page?n.resolvePageRef(e.page).pageObjectNumber:void 0).read(e.application,t)})}handlePieceInfoUpdate(e,t){let n=this.requireSession(e),r=new vw(this.runtime,n,e.page?n.resolvePageRef(e.page).pageObjectNumber:void 0);r.update(e.application,e.patch,t);let i={pieceInfo:r.read(e.application,t),meta:{affectedPages:[],cacheDelta:null,...n.writeStamp()}};return this.finishMutation(n,{tag:"pieceInfo.update",result:i},e.artifactPath)}handlePieceInfoApplications(e,t){let n=this.requireSession(e);return aC({tag:"pieceInfo.applications",applications:new vw(this.runtime,n,e.page?n.resolvePageRef(e.page).pageObjectNumber:void 0).applications(t)})}handlePieceInfoDelete(e,t){let n=this.requireSession(e);new vw(this.runtime,n,e.page?n.resolvePageRef(e.page).pageObjectNumber:void 0).delete(e.application,t);let r={meta:{affectedPages:[],cacheDelta:null,...n.writeStamp()}};return this.finishMutation(n,{tag:"pieceInfo.delete",result:r},e.artifactPath)}async handlePagesText(e,t){let n=this.requireSession(e),r=new gL(this.runtime,n),i=n.resolvePageRef(e.page).pageObjectNumber;return aC({tag:"pages.text",snapshot:await r.read(i,t,this.slices)})}async handlePagesGeometry(e,t){let n=this.requireSession(e),r=new gz(this.runtime,n),i=n.resolvePageRef(e.page).pageObjectNumber,o=await r.read(i,t,this.slices);return aC({tag:"pages.geometry",page:e.page,snapshot:o})}async handleSearchQuery(e,t){let n=this.requireSession(e);return aC({tag:"search.query",slice:await new vh(this.runtime,n).query(e.request,t,this.slices)})}async handlePagesRender(e,t){let n=this.requireSession(e),{raster:r,area:i}=await new gZ(this.runtime,n).render(n.resolvePageRef(e.page).pageObjectNumber,e.options??{},t,this.slices);return aC({tag:"pages.render",page:e.page,area:i,raster:r},[r.data])}slicedWork(e){switch(e.kind){case"pages.render":return{pdfium:t=>this.handlePagesRender(e,t)};case"pages.renderEncoded":return{pdfium:t=>this.handlePagesRender({...e,kind:"pages.render"},t),encode:(t,n)=>this.encodeRendered(t,e.encode,n)};case"document.renderPageFile":return{pdfium:t=>this.handleDocumentRenderPageFile(e,t)};case"document.renderPageFileEncoded":return{pdfium:t=>this.handleDocumentRenderPageFile({...e,kind:"document.renderPageFile"},t),encode:(t,n)=>this.encodeRendered(t,e.encode,n)};case"annotations.renderAppearances":return{pdfium:t=>this.handleAnnotationsRenderAppearances(e,t)};case"annotations.renderAppearancesEncoded":return{pdfium:t=>this.handleAnnotationsRenderAppearances({...e,kind:"annotations.renderAppearances"},t),encode:(t,n)=>this.encodeAppearances(t,e.page,e.encode,n)};case"pages.text":return{pdfium:t=>this.handlePagesText(e,t)};case"pages.geometry":return{pdfium:t=>this.handlePagesGeometry(e,t)};case"measure.viewports":return{pdfium:t=>this.handleMeasureViewports(e,t)};case"annotations.readFile":return{pdfium:t=>this.handleAnnotationsReadFile(e,t)};case"search.query":return{pdfium:t=>this.handleSearchQuery(e,t)};default:return null}}async runSliced(e,t,n,r){if(r.encode&&!this.options.imageEncoder)return void this.post(aC({kind:"reject",jobId:t.jobId,error:C(new N(G.NotImplemented,vC))},aN));let i=new AbortController;this.aborts.set(t.jobId,i),this.busy=!0;try{let e;try{e=await r.pdfium(i.signal)}finally{this.busy=!1,queueMicrotask(()=>this.drain())}this.resolve(t,r.encode?await r.encode(e,i.signal):e)}catch(e){this.post(aC({kind:"reject",jobId:t.jobId,error:C(e)},aN))}finally{this.aborts.delete(t.jobId),this.closePagesChangedBy(e,n)}}async encodeRaster(e,t,n){let r=this.options.imageEncoder;if(!r)throw new N(G.NotImplemented,vC);let{bytes:i,mimeType:o}=await r.encode(e,t);if(n.aborted)throw new N(G.Aborted,"aborted during image encode");return{mimeType:o,width:e.width,height:e.height,bytes:i}}async encodeRendered(e,t,n){let{payload:r}=e;if("pages.render"===r.tag){let e=await this.encodeRaster(r.raster,t,n);return aC({tag:"pages.renderEncoded",image:e},[e.bytes.buffer])}if("document.renderPageFile"===r.tag){let e=await this.encodeRaster(r.raster,t,n);return aC({tag:"document.renderPageFileEncoded",page:r.page,pageCount:r.pageCount,image:e},[e.bytes.buffer])}throw new N(G.WireFormat,`unexpected ${r.tag}`)}async encodeAppearances(e,t,n,r){if("annotations.renderAppearances"!==e.payload.tag)throw new N(G.WireFormat,`unexpected ${e.payload.tag}`);let{appearances:i}=e.payload.result,o=[];for(let e of i)o.push({ref:e.ref,mode:e.mode,state:e.state,rect:e.rect,image:await this.encodeRaster(e.raster,n,r)});return aC({tag:"annotations.renderAppearancesEncoded",page:t,result:{page:e.payload.result.page,appearances:o}},o.map(e=>e.image.bytes.buffer))}assertRewriteKeepsSignatures(e,t){if("rewrite"!==t||"protect"!==e.signedDocumentPolicy)return;let n=this.probeProtection(e);if(n&&null!==n.judged)throw new N(G.ProtectedDocument,"the document is signed: a rewrite save would void every signature (use an incremental save)")}handleDocumentSaveBuffer(e){let t=this.requireSession(e);if(this.assertRewriteKeepsSignatures(t,e.mode),"incremental"===e.mode){let e=new AQ(this.runtime,t).snapshot();return aC({tag:"document.saveBuffer",bytes:e.bytes,size:e.bytes.byteLength},[e.bytes])}let n=new AQ(this.runtime,t).saveStandaloneToBuffer(e.mode);return aC({tag:"document.saveBuffer",bytes:n.bytes,size:n.size},[n.bytes])}handleDocumentSaveFile(e){let t=this.requireSession(e);return(this.assertRewriteKeepsSignatures(t,e.mode),"incremental"===e.mode&&(!t.hasUnsavedEdits()||new AQ(this.runtime,t).saveStandaloneToFileEx(e.path,e.mode).unchangedSinceLoad))?(new AQ(this.runtime,t).copyLoadedBytesToFile(e.path),aC({tag:"document.saveFile",path:e.path})):"incremental"===e.mode?aC({tag:"document.saveFile",path:e.path}):aC({tag:"document.saveFile",path:new AQ(this.runtime,t).saveStandaloneToFile(e.path,e.mode).path})}handleDocumentSaveLayerBuffer(e){let t=this.requireSession(e);if("layer"!==t.kind)throw new N(G.InvalidArg,"document has no layer to export (opened without a layer)");let n=new AQ(this.runtime,t).saveLayerArtifact();return aC({tag:"document.saveLayerBuffer",bytes:n.bytes,size:n.size},[n.bytes])}handleDocumentProbeSecurityFile(e){return aC({tag:"document.probeSecurityFile",security:new AH(this.runtime).probeFile(e.path,e.password)})}async handleDocumentRenderPageFile(e,t){let n=new Fu(this.runtime),r=this.baseDocuments.acquireFileBase({key:`adhoc-file:${e.path}`,path:e.path,password:e.password});try{n.openFromHandle(h9(this.runtime,r,{kind:"fresh"},e.password));let i=new gh(this.runtime,n).read(t),o=i.pages[e.pageIndex];if(!o)throw new N(G.NotFound,`renderPageFile: no page at index ${e.pageIndex} (pageCount=${i.pageCount})`);let{raster:a}=await new gZ(this.runtime,n).render(o.ref.objectNumber,vP(e.options??{},()=>o.pdfCropBox),t,this.slices);return aC({tag:"document.renderPageFile",page:o.ref,pageCount:i.pageCount,raster:a},[a.data])}finally{n.close()}}handleDocumentCheckPasswordPermissions(e){let t,n=this.sessions.get(vN(e.docId));return n?.isLocked()?(n.unlockWith(e.password),n.password=e.password,t=n):t=this.requireSession(e),aC({tag:"document.checkPasswordPermissions",security:new AH(this.runtime).checkPasswordPermissions(t,e.password,e.mode??"any"),protection:this.probeProtection(t)})}handleFontsRegister(e){return this.fonts.register(e.fontKey,e.familyName,e.weight,e.italic,new Uint8Array(e.data),e.builtIn??!1),aC({tag:"fonts.register",fontKey:e.fontKey,identity:this.fonts.describe(e.fontKey)})}handleFontsAuthorizeEditing(e){return aC({tag:"fonts.authorizeEditing",identity:this.fonts.authorizeEditing(e.fontKey)})}handleDocumentSetFontSettings(e){let t=this.requireSession(e).requireDocPtr(),{fn:n}=this.runtime;if(void 0!==e.embeddingPolicy){let r={default:0,subset:1,full:2}[e.embeddingPolicy];if(!n.EPDFDoc_SetFontEmbeddingPolicy(t,r))throw new N(G.InvalidArg,"EPDFDoc_SetFontEmbeddingPolicy failed")}if(void 0!==e.typographicFeatures&&!n.EPDFDoc_SetTypographicFeatures(t,e.typographicFeatures))throw new N(G.InvalidArg,"EPDFDoc_SetTypographicFeatures failed");return aC({tag:"document.setFontSettings"})}handleFontsAddFallback(e){return this.fonts.addFallback(e.fontKey,e.tier),aC({tag:"fonts.addFallback"})}handleFontsClearFallbacks(e){return this.fonts.clearFallbacks(),aC({tag:"fonts.clearFallbacks"})}handleFontsProgram(e){let t=this.fonts.engineFontFacts().some(t=>t.sha256===e.sha256&&t.served)?this.fonts.programFor(e.sha256):void 0;if(!t)throw new N(G.NotFound,`no served font has the program ${e.sha256}`);let n=t.bytes(),r=n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength);return aC({tag:"fonts.program",bytes:r},[r])}handleFontsClear(e){return this.fonts.clear(),aC({tag:"fonts.clear"})}handleLayerClose(e){let t=vN(e.docId,e.layerName),n=this.sessions.get(t);return n&&(gS(this.runtime,n),wC(this.runtime,n),n.close(),this.sessions.delete(t)),aC({tag:"close"})}handleClose(e){for(let[r,i]of Array.from(this.sessions.entries())){var t,n;((t=r)===vN(n=e.docId)||t.startsWith(`${n}::layer:`))&&(gS(this.runtime,i),wC(this.runtime,i),i.close(),this.sessions.delete(r))}return aC({tag:"close"})}handleShutdown(e){if(!this.destroyed){var t;for(let e of(this.destroyed=!0,this.sessions.values()))gS(this.runtime,e),wC(this.runtime,e),e.close();this.sessions.clear(),this.residency.closeIdle(),this.baseDocuments.releaseAll(),t=this.runtime,hU.has(t)&&(t.fn.EPDF_ShutdownThread(),hU.delete(t))}return aC({tag:"shutdown"})}requireSession(e){let t=vN(e.docId,e.layerName),n=this.sessions.get(t);if(n?.isLocked())throw new N(G.DocPasswordRequired,`document session is password-locked: ${t}`);if(!n||!n.isOpen())throw new N(G.DocNotOpen,`document session not open: ${t}`);return n.assertUsable(),n}handleFormsList(e,t){let n=this.requireSession(e);return aC({tag:"forms.list",snapshot:new wW(this.runtime,n,this.fonts).snapshot(t)})}handleFormsSetValue(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.setValue",field:e.ref,value:e.value},e.authority,t);return this.finishMutation(n,{tag:"forms.setValue",result:i},e.artifactPath)}handleFormsReset(e,t){let n=this.requireSession(e),{type:r,skipped:i,...o}=this.applyOne(n,e.opId,{type:"forms.reset",...e.refs?{fields:e.refs}:{}},e.authority,t);return this.finishMutation(n,{tag:"forms.reset",result:o},e.artifactPath)}handleFormsExport(e,t){let n=this.requireSession(e),r=new vc(this.runtime,n,this.fonts).export(e.selection,e.limits??nI,t);return aC({tag:"forms.export",bundle:r},Object.values(r.resources))}handleFormsImport(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.import",bundle:e.bundle,...void 0!==e.pages?{pages:e.pages}:{},attribution:e.attribution,values:e.values,actor:vx(e.authority),limits:e.limits??nI,mayScript:e.mayScript},e.authority,t);return 0===i.fields.length?aC({tag:"forms.import",result:i}):this.finishMutation(n,{tag:"forms.import",result:i},e.artifactPath)}handleFormsImportValues(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.importValues",bundle:e.bundle,attribution:e.attribution,actor:vx(e.authority),limits:e.limits??nI},e.authority,t);return 0===i.fields.length?aC({tag:"forms.importValues",result:i}):this.finishMutation(n,{tag:"forms.importValues",result:i},e.artifactPath)}handleFormsRepair(e,t){let n=this.requireSession(e),r=new Et(this.runtime,n,this.fonts).repair(e.bakeAppearances??!1,t);return this.finishMutation(n,{tag:"forms.repair",result:r},e.artifactPath)}handleFormsCreateField(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.create",draft:e.draft,...void 0!==e.objectNumber?{objectNumber:e.objectNumber}:{},...e.widgetObjectNumbers?{widgetObjectNumbers:e.widgetObjectNumbers}:{}},e.authority,t);return this.finishMutation(n,{tag:"forms.createField",result:i},e.artifactPath)}handleFormsUpdateField(e,t){let n=this.requireSession(e),{type:r,skipped:i,...o}=this.applyOne(n,e.opId,{type:"forms.update",field:e.ref,patch:e.patch},e.authority,t);return this.finishMutation(n,{tag:"forms.updateField",result:o},e.artifactPath)}handleFormsSetSignatureAppearance(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.setSignatureAppearance",field:e.ref,appearance:function(e){if(void 0!==e.appearance)return e.appearance&&new Uint8Array(e.appearance);if(void 0!==e.pdf)return{pdf:new Uint8Array(e.pdf)};throw new N(G.InvalidArg,"a signature appearance request carries \'appearance\' (the mark\'s bytes, or null for no mark) or \'pdf\'")}(e)},e.authority,t);return this.finishMutation(n,{tag:"forms.setSignatureAppearance",result:i},e.artifactPath)}handleFormsDeleteField(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.delete",field:e.ref},vk(),t);return this.finishMutation(n,{tag:"forms.deleteField",result:i},e.artifactPath)}handleFormsAddWidget(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.addWidget",field:e.ref,placement:e.placement,...void 0!==e.objectNumber?{objectNumber:e.objectNumber}:{},...void 0!==e.splitObjectNumber?{splitObjectNumber:e.splitObjectNumber}:{}},vk(),t);return this.finishMutation(n,{tag:"forms.addWidget",result:i},e.artifactPath)}handleFormsDetachWidget(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.removeWidget",field:e.ref,widget:e.widget},vk(),t);return this.finishMutation(n,{tag:"forms.detachWidget",result:i},e.artifactPath)}handleFormsUpdateWidget(e,t){let n=this.requireSession(e),{type:r,skipped:i,...o}=this.applyOne(n,e.opId,{type:"forms.updateWidget",widget:e.widget,patch:e.patch},vk(),t);return this.finishMutation(n,{tag:"forms.updateWidget",result:o},e.artifactPath)}handleFormsDeleteWidget(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.deleteWidget",widget:e.widget},vk(),t);return this.finishMutation(n,{tag:"forms.deleteWidget",result:i},e.artifactPath)}handleFormsReorderCalculations(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.reorderCalculations",fields:e.fields,position:e.position},vk(),t);return this.finishMutation(n,{tag:"forms.reorderCalculations",result:i},e.artifactPath)}handleFormsReorderWidgets(e,t){let n=this.requireSession(e),{type:r,...i}=this.applyOne(n,e.opId,{type:"forms.reorderWidgets",page:e.page,widgets:e.widgets,position:e.position},vk(),t);return this.finishMutation(n,{tag:"forms.reorderWidgets",result:i},e.artifactPath)}finishMutation(e,t,n){e.inTransaction()&&e.commitTransaction(),vI.has(t.tag)&&AW(e).endUndo(),t.tag.startsWith("forms.")||"pages.flatten"===t.tag||"redaction.apply"===t.tag||"signatures.complete"===t.tag||e.invalidateDerived(),"signatures.complete"!==t.tag&&e.noteEdit();let r=function(e,t){if(0===t.length||!("result"in e))return e;let n=e.result;if("object"!=typeof n||null===n||!("meta"in n))return e;let{meta:r}=n;return"object"!=typeof r||null===r||"missingCharacters"in r?e:{...e,result:{...n,meta:{...r,missingCharacters:t}}}}(t,e.missingCharacters()),i=!function(e,t){let n=yd.get(t);if(!n)return!1;let r=yc(e,t);if(r===n.fingerprint)return!1;let i=yf(e,t);return yd.set(t,{fingerprint:r,documentFonts:i}),i!==n.documentFonts}(this.runtime,e)?r:{...r,fontsChanged:!0};if("layer"!==e.kind||!e.persistLayerArtifact)return aC(i);let o=this.saveLayerArtifact(e,n);return aC({...i,...o.payload},o.transfer)}saveLayerArtifact(e,t){let n=new AQ(this.runtime,e),r=e.lastObjectNumber();if(t)return{payload:{artifactFile:{...n.saveLayerArtifactToFile(t),lastObjectNumber:r}},transfer:[]};let i={...n.saveLayerArtifact(),lastObjectNumber:r};return{payload:{artifact:i},transfer:[i.bytes]}}},vS={read:"none",snapshot:"none",session:"none",open:"none",close:"none",write:"keepsPages",contentWrite:"document",runtimeWrite:"runtime"};function vk(e){return{identity:e??{},grants:null,protection:null}}function vx({identity:e}){return{...void 0!==e.userId?{userId:e.userId}:{},...void 0!==e.groupId?{groupId:e.groupId}:{},...void 0!==e.displayName?{displayName:e.displayName}:{}}}function vG(e,t){let n=t.record.steps.length>0;n&&e.markUndoable();let r=t.items.map(e=>({...e,meta:{...e.meta,undoable:n}})),i=[...new Set(r.flatMap(e=>e.meta.missingCharacters??[]))];return{items:r,meta:{affectedPages:function(e){let t=new Map;for(let n of e)for(let e of n.meta.affectedPages)t.set(e.objectNumber,e);return[...t.values()]}(r),cacheDelta:null,...e.writeStamp(),...i.length>0?{missingCharacters:i}:{}}}}function vO(e){return"shutdown"!==e.kind&&"signatures.complete"!==e.kind&&"document.applyChanges"!==e.kind&&("write"===e.effect||"contentWrite"===e.effect)&&"docId"in e}var vI=new Set(["redaction.apply","pages.flatten","annotations.flatten","forms.repair","signatures.complete"]);function vN(e,t){return`${e}::${t?`layer:${t}`:"__base__"}`}var vC="this engine has no image encoder (the *.renderEncoded kinds are cloud-server surface)";(g=self).onmessage=e=>{var t,n;let r=e.data;r&&"object"==typeof r&&"init"===r.kind&&(t=g,n=r,(async()=>{var e;let r={wasmUrl:(e=n).wasmUrl,wasmBinary:e.wasmBinary},i=new vv(await a$({prefer:"wasm",wasmUrl:r.wasmUrl,wasmBinary:r.wasmBinary}),e=>{t.postMessage(e.payload,e.transfer)});t.onmessage=e=>{i.receive(e.data)},t.postMessage({kind:"ready"})})().catch(e=>{t.postMessage({kind:"init-error",error:function(e,t){let n=String(e?.stack??e);if(t.wasmBinary)return n;let r=t.wasmUrl?`failed to load embedpdf.wasm from ${t.wasmUrl}`:"failed to load embedpdf.wasm (resolved relative to the worker script)";return`${r}. Your build did not ship the wasm at that location \\u2014 either import \\`localEngine\\` from \\`@embedpdf/engine/portable\\` (the wasm travels inside your build), or self-host the file and pass \\`assetsUrl\\`/\\`wasmUrl\\` to localEngine(), or provide the bytes via \\`wasmBinary\\`. See https://www.embedpdf.com/docs/viewer/self-hosting \\u2014 ${n}`}(e,n)})}))}})();'; +export { + e as default +}; +//# sourceMappingURL=embedpdf-worker.source-Z0o39l7i-qFIWKZ_I.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/form-design-panel-B4qGH4r--T0yv-8g7.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/form-design-panel-B4qGH4r--CLCbLmeD.js similarity index 98% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/form-design-panel-B4qGH4r--T0yv-8g7.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/form-design-panel-B4qGH4r--CLCbLmeD.js index 4ed3e361..251a4e0c 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/form-design-panel-B4qGH4r--T0yv-8g7.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/form-design-panel-B4qGH4r--CLCbLmeD.js @@ -1,5 +1,5 @@ -import { a4 as k, ax as g, a8 as v, h as e, u as C, j as y, av as z, n as _, C as B, ay as K, az as P, aA as I, x as G, aB as W, g as O, r as j, i as V } from "./wasm-url-asset-sqnq1cad.js"; -import { u as J } from "./labels-C6_i87Oj-BpJCC3cf.js"; +import { a4 as k, ax as g, a8 as v, h as e, u as C, j as y, av as z, n as _, C as B, ay as K, az as P, aA as I, x as G, aB as W, g as O, r as j, i as V } from "./wasm-url-asset-Dc0HnHB_.js"; +import { u as J } from "./labels-C6_i87Oj-xAdFtKWd.js"; const M = "border-border bg-surface text-fg w-full rounded-md border px-2 py-1.5 text-sm", U = Object.freeze([]), Y = /* @__PURE__ */ new Set([ "purpose", "format", @@ -489,4 +489,4 @@ function se({ field: o }) { export { ie as FormDesignPanel }; -//# sourceMappingURL=form-design-panel-B4qGH4r--T0yv-8g7.js.map +//# sourceMappingURL=form-design-panel-B4qGH4r--CLCbLmeD.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/grant-prompt-Co4bzHaR-ibAjp4kO.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/grant-prompt-Co4bzHaR-EijIs4Sr.js similarity index 98% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/grant-prompt-Co4bzHaR-ibAjp4kO.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/grant-prompt-Co4bzHaR-EijIs4Sr.js index 9d7d522f..1f3ab268 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/grant-prompt-Co4bzHaR-ibAjp4kO.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/grant-prompt-Co4bzHaR-EijIs4Sr.js @@ -1,4 +1,4 @@ -import { $ as k, aN as F, h as e, aO as T, aL as v, u as x, aB as y, g as p, Z as $, j as E } from "./wasm-url-asset-sqnq1cad.js"; +import { $ as k, aN as F, h as e, aO as T, aL as v, u as x, aB as y, g as p, Z as $, j as E } from "./wasm-url-asset-Dc0HnHB_.js"; const N = [ "displayName", "email", @@ -288,4 +288,4 @@ export { _ as GrantPrompt, M as VisitorIdentityDialog }; -//# sourceMappingURL=grant-prompt-Co4bzHaR-ibAjp4kO.js.map +//# sourceMappingURL=grant-prompt-Co4bzHaR-EijIs4Sr.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-BCXWVSWX.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-BCXWVSWX.js deleted file mode 100644 index 74aee656..00000000 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-BCXWVSWX.js +++ /dev/null @@ -1,1482 +0,0 @@ -var Te = Object.defineProperty; -var Se = (e, t, n) => t in e ? Te(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; -var j = (e, t, n) => Se(e, typeof t != "symbol" ? t + "" : t, n); -import { readCmsParts as ne, withSignerCertificate as Ie, parseCmsInternal as K, certDer as C, certificateFromDer as D } from "./parse-Cv_kCMGz.js"; -import { parseDetachedCms as Xt } from "./parse-Cv_kCMGz.js"; -import { r as Re, c as xe, v as De, a as se, b as Ee } from "./timestamp-DdhyGESj.js"; -import { aR as x, b0 as _, t as E, b8 as R, bz as I, bA as $e, aW as v, bB as k, bC as b, f as M, bD as Oe, bE as Pe, bF as Be, b5 as Ve, bG as Ne, bH as Ue, O as je, bI as Fe, b1 as Me, b2 as Le, aS as qe } from "./wasm-url-asset-sqnq1cad.js"; -import { bJ as Zt, bK as Jt, bL as Qt, bM as en, bN as tn, bO as nn, bP as sn, bQ as rn, bR as an, bS as on, bT as cn } from "./wasm-url-asset-sqnq1cad.js"; -import { C as P } from "./error-CbfoSMwv.js"; -import { certificateCommonName as U } from "./self-signed-DIdbaT2K.js"; -import { selfSignedCertificate as dn } from "./self-signed-DIdbaT2K.js"; -import { a as _e, e as X, r as ze, c as Ke } from "./splice-DZQMGiQI.js"; -function H(e) { - return new Uint8Array(e.signature.getValue()); -} -async function $(e) { - const t = x(); - let n, s; - try { - n = ne(e.token, "tst-info", { certificates: e.certificates }), s = Re(n.eContent); - } catch (h) { - return { verdict: "unsupported", problem: "unreadable", detail: h instanceof P ? h.message : String(h), info: null, token: null }; - } - const r = Ie(n), i = (h, f, u) => ({ verdict: h, problem: f, detail: u, info: s, token: r }), { stamped: a } = e; - if (a.kind === "digest" && s.imprintAlgorithm !== a.algorithm) - return i( - "invalid", - "imprint-algorithm", - `the token stamps a ${s.imprintAlgorithm} digest, not the ${a.algorithm} digest it was given` - ); - const o = a.kind === "digest" ? a.digest : a.kind === "digest-with" ? await a.digest(s.imprintAlgorithm) : new Uint8Array( - await t.digest( - _[s.imprintAlgorithm], - E(a.bytes) - ) - ); - if (!R(s.imprint, o)) - return i("invalid", "imprint", "the token's message imprint is not the stamped digest"); - const d = new Uint8Array( - await t.digest(_[n.digestAlgorithm], E(n.eContent)) - ); - if (!R(d, n.messageDigest)) - return i( - "invalid", - "message-digest", - "the token's message digest does not cover its TSTInfo" - ); - if (!r) - return i( - "unsupported", - "no-certificate", - "the token's authority certificate is not carried by the token or by the signature it is in" - ); - const c = await xe(r); - if (c === "invalid") - return i( - "invalid", - "binding", - "the token's certificate binding names another certificate than the one that signed it" - ); - const l = await De(r); - return l === "invalid" ? i("invalid", "signature", "the token signature does not verify") : l === "unsupported" ? i( - "unsupported", - "unsupported-algorithm", - "the token's signature algorithm is not supported" - ) : c === "absent" ? i( - "unsupported", - "no-binding", - "the token does not bind its authority's certificate, which RFC 3161 requires" - ) : c === "unsupported" ? i( - "unsupported", - "unsupported-algorithm", - "the token's certificate binding uses a hash that is not supported" - ) : { verdict: "valid", problem: null, detail: null, info: s, token: r }; -} -const Y = 4096, He = 4 * 1024 * 1024; -async function We(e) { - const { cms: t, prepared: n, profile: s } = e; - if (t.byteLength > n.contentsSizeBytes) - return { - ok: !1, - reason: "too-large", - detail: `the signature is ${t.byteLength} bytes and ${n.contentsSizeBytes} were reserved: ${Ge(t.byteLength)}` - }; - if (s === "timestamp") return Xe(t, n); - let r; - try { - r = K(t); - } catch (d) { - return { - ok: !1, - reason: "malformed", - detail: d instanceof P ? d.message : String(d) - }; - } - const i = r.parsed; - if (i.digestAlgorithm !== n.algorithm) - return { - ok: !1, - reason: "algorithm-mismatch", - detail: `the CMS digests with ${i.digestAlgorithm}, the document was prepared with ${n.algorithm}` - }; - if (!R(i.messageDigest, n.digest)) - return { - ok: !1, - reason: "digest-mismatch", - detail: "the CMS message digest is not the prepared digest" - }; - if (s === "cades-b") { - if (!i.signingCertificateV2) - return { - ok: !1, - reason: "profile-violation", - detail: "CAdES requires the ESS signing-certificate-v2 attribute" - }; - if (i.signingTime) - return { - ok: !1, - reason: "profile-violation", - detail: "PAdES forbids the CMS signing-time attribute" - }; - } - const a = await se(r); - if (a !== "valid") - return { - ok: !1, - reason: "signature-invalid", - detail: a === "unsupported" ? "the signature or its certificate binding uses an algorithm that is not supported" : "the signature does not verify" - }; - const o = H(r.signerInfo); - for (const d of r.timestampTokens) { - const c = await $({ - token: d, - stamped: { kind: "bytes", bytes: o }, - certificates: r.certificates - }); - if (c.verdict === "invalid") - return { - ok: !1, - reason: c.problem === "imprint" ? "digest-mismatch" : "signature-invalid", - detail: `the signature's timestamp does not belong to it: ${c.detail}` - }; - } - return { ok: !0 }; -} -function Ge(e) { - const t = Math.ceil(e / Y) * Y; - return t > He ? "that is more than a signature may reserve" : `pass \`contentsSizeBytes: ${t}\``; -} -async function Xe(e, t) { - const n = await $({ - token: e, - stamped: { kind: "digest", digest: t.digest, algorithm: t.algorithm } - }); - if (n.verdict === "valid") return { ok: !0 }; - switch (n.problem) { - case "unreadable": - return { ok: !1, reason: "malformed", detail: n.detail }; - case "no-certificate": - return { - ok: !1, - reason: "malformed", - detail: "the token does not carry its authority's certificate" - }; - case "imprint-algorithm": - return { - ok: !1, - reason: "algorithm-mismatch", - detail: `the token stamps a ${n.info.imprintAlgorithm} digest, the document was prepared with ${t.algorithm}` - }; - case "imprint": - return { - ok: !1, - reason: "digest-mismatch", - detail: "the token's message imprint is not the prepared digest" - }; - default: - return { ok: !1, reason: "signature-invalid", detail: n.detail }; - } -} -async function Lt(e, t, n = { kind: "now" }) { - return ie(e, t, n, []); -} -async function ie(e, t, n, s) { - if (!t) return { status: "unknown", reason: "no trust anchors configured" }; - const r = await t.anchors(); - if (r.length === 0) return { status: "unknown", reason: "no trust anchors configured" }; - x(); - let i; - try { - i = e instanceof Uint8Array ? K(e) : e; - } catch (a) { - return { status: "untrusted", reason: a.message }; - } - return oe({ - target: i.signerCertificate, - candidates: [...i.certificates, ...s], - anchors: r, - at: V(n) - }); -} -async function re(e) { - const { token: t, trust: n, genTime: s } = e; - if (!n) return { status: "unknown", reason: "no trust anchors configured" }; - const r = n.timestampAnchors ? await n.timestampAnchors() : await n.anchors(); - if (r.length === 0) - return { - status: "unknown", - reason: n.timestampAnchors ? "no timestamp anchors configured" : "no trust anchors configured" - }; - x(); - const i = t.signerCertificate, a = Ze(i); - if (a) return { status: "untrusted", reason: a }; - if (!Z(i, s)) - return { - status: "untrusted", - reason: "the token is dated outside its authority certificate's validity" - }; - const o = V(e.at ?? { kind: "now" }), d = C(i); - return r.some((c) => R(c, d)) ? Z(i, o) ? { status: "trusted", path: [d] } : { - status: "untrusted", - reason: "the authority's certificate is not valid at the time it is judged" - } : oe({ - target: i, - candidates: [...t.certificates, ...e.certificates ?? []], - anchors: r, - at: o - }); -} -function V(e) { - return e.kind === "now" ? /* @__PURE__ */ new Date() : new Date(ae(e)); -} -function Ye(e) { - if (e.kind === "now") return { kind: "now" }; - const t = ae(e); - return { kind: "timestamp", stampedAt: t, genTime: t, tokenVerified: !0 }; -} -function ae(e) { - return e.stampedAt === void 0 ? e.genTime : e.stampedAt; -} -function Z(e, t) { - return e.notBefore.value <= t && t <= e.notAfter.value; -} -function Ze(e) { - const t = e.extensions?.find( - (s) => s.extnID === v.extendedKeyUsage - ); - if (!t) - return "the authority's certificate has no extended key usage, so it is not made for timestamping"; - const n = t.parsedValue?.keyPurposes ?? []; - return n.includes(v.timeStamping) ? n.length > 1 ? "the authority's certificate allows other uses besides timestamping" : t.critical ? null : "the authority's certificate does not mark its timestamping purpose as critical" : "the authority's certificate does not allow timestamping"; -} -async function oe(e) { - const { target: t, at: n } = e, s = C(t), r = (d) => R(d, s), i = /* @__PURE__ */ new Map(); - for (const d of e.candidates) { - const c = C(d), l = I(c); - !r(c) && !i.has(l) && i.set(l, d); - } - const a = [...i.values()], o = e.anchors.some(r); - try { - const d = e.anchors.filter((f) => !r(f)).map(D), l = await new $e({ - certs: o ? [t] : [...a, t], - trustedCerts: o ? [...d, t] : d, - checkDate: n - }).verify(); - if (!l.result) { - const f = Je(t, [...a, ...d]); - return { - status: "untrusted", - reason: f ? `no certificate was found that issued "${Qe(f)}"` : l.resultMessage || `chain validation code ${l.resultCode}`, - ...f ? { withoutIssuer: C(f) } : {} - }; - } - const h = l.certificatePath ?? []; - return h.length === 0 || !r(C(h[0])) ? { - status: "untrusted", - reason: "the validated path does not begin with the certificate that signed" - } : { status: "trusted", path: h.map(C) }; - } catch (d) { - return { status: "untrusted", reason: d.message }; - } -} -function Je(e, t) { - const n = /* @__PURE__ */ new Set(); - let s = e; - for (; !n.has(s); ) { - if (n.add(s), s.issuer.isEqual(s.subject)) return null; - const r = t.find((i) => i.subject.isEqual(s.issuer)); - if (!r) return s; - s = r; - } - return null; -} -function Qe(e) { - return U(C(e)) ?? "a certificate without a common name"; -} -function N(e, t) { - return new k( - b.SignatureRefused, - `signing refused (${e}): ${t}`, - { details: { reason: e } } - ); -} -const et = new Uint8Array([ - 6, - 11, - 42, - 134, - 72, - 134, - 247, - 13, - 1, - 9, - 16, - 2, - 14 -]); -async function tt(e) { - const { cms: t, authority: n } = e; - let s; - try { - s = ne(t); - } catch (d) { - throw N("malformed", d instanceof P ? d.message : String(d)); - } - if (s.timestampTokens.length > 0) - throw new k( - b.InvalidArg, - "the signature already carries a timestamp, from the service that signed it; leave out `timestampAuthority`", - { details: { field: "timestampAuthority" } } - ); - const r = n.hash ?? "sha256", i = new Uint8Array( - await x().digest( - _[r], - E(H(s.signerInfo)) - ) - ), a = await n.sign({ digest: i, algorithm: r, subFilter: "ETSI.RFC3161" }), o = await $({ - token: a, - stamped: { kind: "digest", digest: i, algorithm: r }, - certificates: s.certificates - }); - if (o.verdict !== "valid") - throw N(st(o.problem), `the timestamp: ${it(o)}`); - e.trust && await ce(o, e.trust, s.certificates); - try { - return _e(t, nt(a)); - } catch (d) { - throw N("malformed", d instanceof P ? d.message : String(d)); - } -} -async function ce(e, t, n = []) { - const s = await re({ - token: e.token, - certificates: n, - trust: t, - genTime: e.info.genTime - }); - if (s.status === "trusted") return; - const r = U(e.token.parsed.signerCertificate); - throw new k( - b.SignatureRefused, - `the timestamp's authority${r ? ` ("${r}")` : ""} isn't trusted: ${s.reason ?? "no path to a timestamp anchor"}. Add its root to \`timestampAnchors\``, - { details: { trust: s.status, trustReason: s.reason ?? null } } - ); -} -function nt(e) { - return X( - 48, - new Uint8Array([...et, ...X(49, e)]) - ); -} -function st(e) { - switch (e) { - case "unreadable": - return "malformed"; - case "imprint": - return "digest-mismatch"; - case "imprint-algorithm": - return "algorithm-mismatch"; - default: - return "signature-invalid"; - } -} -function it(e) { - return e.problem === "unreadable" ? `\`timestampAuthority\` didn't return an RFC 3161 token (${e.detail}): is it a signing service?` : e.detail; -} -const rt = 16384; -function ue(e) { - switch (e) { - case "adbe.pkcs7.detached": - return "pkcs7"; - case "ETSI.CAdES.detached": - return "cades-b"; - case "ETSI.RFC3161": - return "timestamp"; - default: - throw new k( - b.InvalidArg, - `unknown subFilter '${String(e)}'`, - { - details: { field: "subFilter" } - } - ); - } -} -async function qt(e, t) { - const { key: n, timestampAuthority: s, timestampTrust: r, afterPrepare: i, ...a } = t, o = a.kind === "timestamp"; - if (o && n.kind !== "cms") - throw new k( - b.InvalidArg, - "a document timestamp needs a timestamp authority: a CMS key that returns an RFC 3161 token", - { details: { field: "key" } } - ); - de(o, s, r); - const d = o ? "ETSI.RFC3161" : a.subFilter ?? "ETSI.CAdES.detached", c = ue(d), l = await e.signatures.prepare({ - ...a, - ...o ? {} : { subFilter: d }, - digest: a.digest ?? n.hash ?? "sha256", - // A token is commonly 1.5 to 6 KB: the default reserve would fail late, after the key signed. - ...s && a.contentsSizeBytes === void 0 ? { contentsSizeBytes: rt } : {} - }); - try { - await i?.(l); - const h = await at(n, l, d, c); - return await le(e, { prepared: l, cms: h, timestampAuthority: s, timestampTrust: r }); - } catch (h) { - throw await e.signatures.cancel(l.signingId).catch(() => { - }), h; - } -} -async function _t(e, t) { - de( - t.prepared.subFilter === "ETSI.RFC3161", - t.timestampAuthority, - t.timestampTrust - ); - try { - return await le(e, t); - } catch (n) { - throw k.is(n, b.SignatureRefused) ? new k( - b.SignatureRefused, - `${n.message}. The signing stays prepared, and this CMS will be refused again: cancel it and prepare again`, - { details: n.details, cause: n } - ) : n; - } -} -function de(e, t, n) { - if (e && t) - throw new k( - b.InvalidArg, - "a document timestamp is already a timestamp; leave out `timestampAuthority`", - { details: { field: "timestampAuthority" } } - ); - if (n && !t && !e) - throw new k( - b.InvalidArg, - "`timestampTrust` judges a timestamp's authority; pass `timestampAuthority` too", - { details: { field: "timestampTrust" } } - ); -} -async function le(e, t) { - const { prepared: n, timestampAuthority: s } = t, r = ue(n.subFilter), i = async (o) => { - const d = await We({ cms: o, prepared: n, profile: r }); - if (!d.ok) throw N(d.reason, d.detail); - }; - let a = t.cms; - if (await i(a), r === "timestamp" && t.timestampTrust) { - const o = await $({ - token: a, - stamped: { kind: "digest", digest: n.digest, algorithm: n.algorithm } - }); - if (o.verdict !== "valid") throw N("malformed", "the timestamp token"); - await ce(o, t.timestampTrust); - } - return s && (a = await tt({ - cms: a, - authority: s, - trust: t.timestampTrust - }), await i(a)), e.signatures.complete({ - signingId: n.signingId, - cms: a, - expectedVersion: n.expectedVersion - }); -} -async function at(e, t, n, s) { - if (e.kind === "cms") - return e.sign({ digest: t.digest, algorithm: t.algorithm, subFilter: n }); - if (s === "timestamp") - throw new k(b.InvalidArg, "a raw key cannot make a timestamp token"); - return Ee({ - digest: t.digest, - hash: t.algorithm, - profile: s, - signer: e, - signingTime: s === "pkcs7" ? (/* @__PURE__ */ new Date()).toISOString() : void 0 - }); -} -const ot = 6; -function J(e) { - const t = { ocsp: [], crl: [], issuer: [] }, n = (i) => e.extensions?.find((a) => a.extnID === i)?.parsedValue, s = n(v.authorityInfoAccess); - for (const i of s?.accessDescriptions ?? []) { - const a = Q(i.accessLocation); - a && (i.accessMethod === v.accessOcsp && t.ocsp.push(a), i.accessMethod === v.accessIssuers && t.issuer.push(a)); - } - const r = n(v.crlDistributionPoints); - for (const i of r?.distributionPoints ?? []) { - if (i.reasons || i.cRLIssuer) continue; - const a = Array.isArray(i.distributionPoint) ? i.distributionPoint : []; - for (const o of a) { - const d = Q(o); - d && t.crl.push(d); - } - } - return t; -} -function ct(e) { - const t = (i) => e.extensions?.find((a) => a.extnID === i); - if (t(v.basicConstraints)?.parsedValue?.cA) return !1; - if (t(v.validityAssuredShortTerm)) return !0; - if (!t(v.noRevAvail)) return !1; - const s = t(v.authorityInfoAccess)?.parsedValue; - return !(t(v.crlDistributionPoints) !== void 0 || t(v.freshestCrl) !== void 0 || (s?.accessDescriptions ?? []).some( - (i) => i.accessMethod === v.accessOcsp - )); -} -function Q(e) { - return e.type !== ot || typeof e.value != "string" ? null : /^https?:\/\//i.test(e.value) ? e.value : null; -} -const fe = { - 0: "unspecified", - 1: "key-compromise", - 2: "ca-compromise", - 3: "affiliation-changed", - 4: "superseded", - 5: "cessation-of-operation", - 6: "certificate-hold", - 8: "remove-from-crl", - 9: "privilege-withdrawn", - 10: "aa-compromise" -}; -async function me(e) { - x(); - const { answer: t, certificate: n, issuer: s } = e, r = (i, a) => ({ - says: "nothing", - kind: t.kind, - problem: i, - detail: a - }); - if (!n.issuer.isEqual(s.subject)) - return r("other-certificate", "the certificate was not issued by the issuer given"); - try { - return t.kind === "ocsp" ? await dt(t.der, n, s, r) : await ht(t.der, n, s, r); - } catch (i) { - return r("unreadable", i.message); - } -} -const ut = { - 1: "malformed request", - 2: "internal error", - 3: "try later", - 5: "a signed request is required", - 6: "unauthorized" -}; -async function dt(e, t, n, s) { - const r = x(), i = M(E(e)); - if (i.offset === -1) return s("unreadable", "the OCSP response is not valid DER"); - const a = new Oe({ schema: i.result }), o = a.responseStatus.valueBlock.valueDec; - if (o !== 0) - return s( - "not-successful", - `the responder answered "${ut[o] ?? `status ${o}`}"` - ); - const d = a.responseBytes; - if (!d) return s("unreadable", "the OCSP response carries no answer"); - if (d.responseType !== v.ocspBasic) - return s("unsupported", `OCSP response type ${d.responseType}`); - const c = M(d.response.valueBlock.valueHexView); - if (c.offset === -1) return s("unreadable", "the OCSP answer is not valid DER"); - const l = new Pe({ schema: c.result }), h = l.tbsResponseData; - let f = null, u = null; - for (const w of h.responses) { - const A = r.getAlgorithmByOID(w.certID.hashAlgorithm.algorithmId, !1); - if (!("name" in A) || typeof A.name != "string") { - u = w.certID.hashAlgorithm.algorithmId; - continue; - } - const S = new Be(); - if (await S.createForCertificate(t, { - hashAlgorithm: A.name, - issuerCertificate: n - }), w.certID.isEqual(S)) { - f = w; - break; - } - } - if (!f) - return u ? s("unsupported", `the answer identifies its certificate with hash ${u}`) : s("other-certificate", "the OCSP response is about another certificate"); - const m = await lt(h.responderID, [n, ...l.certs ?? []]); - if (!m) - return s("wrong-signer", "the responder's certificate is not in the response"); - const g = ft(m, n); - if (!g) { - const w = await mt(m, n, h.producedAt); - if (w) return s("wrong-signer", w); - } - const p = await he( - h.tbsView, - l.signature, - m.subjectPublicKeyInfo, - l.signatureAlgorithm - ); - if (p === "unsupported") - return s( - "unsupported", - `signature algorithm ${l.signatureAlgorithm.algorithmId} of the OCSP response` - ); - if (p === "invalid") - return s("signature", "the OCSP response's signature does not verify"); - const y = { - kind: "ocsp", - thisUpdate: f.thisUpdate, - nextUpdate: f.nextUpdate ?? null, - responder: g ? null : C(m) - }, T = f.certStatus; - switch (T.idBlock.tagNumber) { - case 0: - return { says: "good", ...y }; - case 1: { - const [w, A] = T.valueBlock.value; - if (!(w instanceof Ve)) - return s("unreadable", "the OCSP response names no revocation time"); - const S = A?.valueBlock.value[0]?.valueBlock.valueDec; - return { - says: "revoked", - revokedAt: w.toDate(), - reason: S === void 0 ? null : fe[S] ?? null, - ...y - }; - } - default: - return s("unknown-status", "the responder does not know the certificate"); - } -} -async function lt(e, t) { - const n = x(); - for (const s of t) - if (e instanceof Ue) { - if (s.subject.isEqual(e)) return s; - } else if (e instanceof je) { - const r = s.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView, i = new Uint8Array(await n.digest("SHA-1", E(r))); - if (R(i, new Uint8Array(e.valueBlock.valueHexView))) return s; - } - return null; -} -function ft(e, t) { - return R(C(e), C(t)); -} -async function mt(e, t, n) { - if (!e.issuer.isEqual(t.subject)) - return "the responder's certificate was not issued by the certificate's issuer"; - let s = !1; - try { - s = await e.verify(t); - } catch { - s = !1; - } - return s ? (e.extensions?.find( - (a) => a.extnID === v.extendedKeyUsage - )?.parsedValue?.keyPurposes ?? []).includes(v.ocspSigning) ? n < e.notBefore.value || n > e.notAfter.value ? "the responder's certificate was outside its dates when it answered" : null : "the responder's certificate is not made for answering about certificates" : "the responder's certificate is not signed by the certificate's issuer"; -} -async function ht(e, t, n, s) { - const r = M(E(e)); - if (r.offset === -1) return s("unreadable", "the CRL is not valid DER"); - const i = new Ne({ schema: r.result }); - if (!i.issuer.isEqual(n.subject)) - return s("other-certificate", "the CRL is not from the certificate's issuer"); - for (const f of i.crlExtensions?.extensions ?? []) { - if (f.extnID === v.deltaCrlIndicator) - return s("delta-crl", "the CRL lists only what changed since another list"); - if (f.extnID === v.issuingDistributionPoint) { - const u = f.parsedValue; - if (!u) return s("unreadable", "the CRL's scope cannot be read"); - if (u.indirectCRL) - return s("indirect-crl", "the CRL lists certificates of other issuers"); - const m = pt(t); - if (u.onlyContainsAttributeCerts || u.onlyContainsUserCerts && m || u.onlyContainsCACerts && !m || u.onlySomeReasons !== void 0) - return s("out-of-scope", "the CRL does not cover this kind of certificate"); - } else if (f.critical && !gt.has(f.extnID)) - return s("unsupported", `critical CRL extension ${f.extnID}`); - } - if (!wt(n)) - return s("wrong-signer", "the issuer's certificate is not made for signing CRLs"); - const a = await he( - i.tbsView, - i.signatureValue, - n.subjectPublicKeyInfo, - i.signatureAlgorithm - ); - if (a === "unsupported") - return s("unsupported", `signature algorithm ${i.signatureAlgorithm.algorithmId}`); - if (a === "invalid") return s("signature", "the CRL's signature does not verify"); - const o = { - kind: "crl", - thisUpdate: i.thisUpdate.value, - nextUpdate: i.nextUpdate?.value ?? null, - responder: null - }, d = ee(t.serialNumber), c = (i.revokedCertificates ?? []).find( - (f) => R(ee(f.userCertificate), d) - ); - if (!c) return { says: "good", ...o }; - const h = c.crlEntryExtensions?.extensions.find( - (f) => f.extnID === v.crlReason - )?.parsedValue?.valueBlock.valueDec; - return { - says: "revoked", - revokedAt: c.revocationDate.value, - reason: h === void 0 ? null : fe[h] ?? null, - ...o - }; -} -const gt = /* @__PURE__ */ new Set([ - v.crlNumber, - v.authorityKeyIdentifier, - v.authorityInfoAccess, - v.freshestCrl -]); -function pt(e) { - return e.extensions?.find( - (n) => n.extnID === v.basicConstraints - )?.parsedValue?.cA === !0; -} -function wt(e) { - const t = e.extensions?.find((s) => s.extnID === v.keyUsage); - if (!t) return !0; - const n = t.parsedValue?.valueBlock.valueHexView; - return n !== void 0 && n.length > 0 && (n[0] & 2) !== 0; -} -function ee(e) { - const t = new Uint8Array(e.valueBlock.valueHexView); - let n = 0; - for (; n < t.length - 1 && t[n] === 0; ) n++; - return t.subarray(n); -} -async function he(e, t, n, s) { - try { - return await x().verifyWithPublicKey( - E(e), - t, - n, - s - ) ? "valid" : "invalid"; - } catch (r) { - const i = r.message ?? ""; - return /unsupported|unknown|not supported|not implemented|incorrect/i.test(i) ? "unsupported" : "invalid"; - } -} -const vt = 300 * 1e3; -function yt(e, t) { - const n = t.getTime(); - let s = null, r = null; - for (const i of e) { - if (i.says === "nothing") continue; - if (i.says === "revoked") { - i.revokedAt.getTime() <= n ? (!r || i.revokedAt < r.revokedAt) && (r = i) : s ?? (s = i); - continue; - } - const a = i.thisUpdate.getTime(), o = i.nextUpdate ? i.nextUpdate.getTime() : a + vt; - (a >= n || n <= o) && (s ?? (s = i)); - } - return r ? { status: "revoked", answer: r } : s ? { status: "good", answer: s } : { status: "unknown", answer: null }; -} -class ge { - constructor() { - j(this, "certificateByDer", /* @__PURE__ */ new Map()); - j(this, "answerByDer", /* @__PURE__ */ new Map()); - /** What each answer says about one certificate, in the order the answers were offered. */ - j(this, "checked", /* @__PURE__ */ new Map()); - } - /** Every certificate offered, each once. */ - get certificates() { - return [...this.certificateByDer.values()].map((t) => t.certificate); - } - /** - * Offer a certificate. Bytes that are not a certificate are left out, and false comes back. - * `inFile` is false for one that came from outside the file. - */ - addCertificate(t, n = !0) { - try { - const s = t instanceof Uint8Array ? t : C(t), r = I(s); - return this.certificateByDer.has(r) || this.certificateByDer.set(r, { - certificate: t instanceof Uint8Array ? D(t) : t, - inFile: n - }), !0; - } catch { - return !1; - } - } - /** - * Offer an answer as it was stored or sent. It is checked when it is asked about a - * certificate. `inFile` is false for one that came from outside the file. - */ - addAnswer(t, n, s = !0) { - const r = `${t}:${I(n)}`; - let i = this.answerByDer.get(r); - return i || (i = { kind: t, der: n, inFile: s }, this.answerByDer.set(r, i)), i; - } - /** Offer what a CMS carries itself: its certificates and its answers. */ - addCarried(t, n) { - for (const s of t) this.addCertificate(s); - for (const s of n.ocspResponses) this.addAnswer("ocsp", s); - for (const s of n.crls) this.addAnswer("crl", s); - } - /** - * What each answer says about `certificate`, which `issuer` issued. Each answer is checked - * once, also when more answers are offered between two calls. - */ - async checksFor(t, n) { - const s = `${I(C(t))}:${I(C(n))}`, r = [...this.answerByDer.values()], i = this.checked.get(s) ?? []; - for (let o = i.length; o < r.length; o++) - i.push(me({ answer: r[o], certificate: t, issuer: n })); - this.checked.set(s, i); - const a = await Promise.all(i); - return r.map((o, d) => ({ answer: o, check: a[d] })); - } -} -async function pe(e) { - const t = new ge(); - if (typeof e.signatures?.getValidationInfo != "function") return t; - try { - const n = await e.signatures.getValidationInfo(); - for (const s of n.certificates) t.addCertificate(s); - for (const s of n.ocspResponses) t.addAnswer("ocsp", s); - for (const s of n.crls) t.addAnswer("crl", s); - } catch (n) { - if (!k.is(n, b.NotImplemented)) throw n; - } - return t; -} -async function O(e, t, n, s = "anywhere") { - const r = t.filter((o, d) => d === 0 || !R(o, t[d - 1])), i = r.map(D), a = []; - for (let o = 0; o + 1 < i.length; o++) { - if (ct(i[o])) continue; - const d = (await e.checksFor(i[o], i[o + 1])).filter( - (l) => s === "anywhere" || l.answer.inFile - ), c = yt( - d.map((l) => l.check), - n - ); - a.push({ - certificate: r[o], - name: U(r[o]), - issuer: r[o + 1], - evidence: d.find((l) => l.check === c.answer)?.answer ?? null, - ...c - }); - } - return a; -} -function we(e, t) { - const n = (i) => `"${i.name ?? "a certificate without a name"}"`, s = e.find((i) => i.status === "revoked"); - if (s) { - const i = s.answer, a = i?.says === "revoked" ? ` on ${i.revokedAt.toISOString()}` : "", o = i?.says === "revoked" && i.reason ? ` (${i.reason})` : ""; - return { status: "revoked", reason: `${n(s)} was withdrawn${a}${o}` }; - } - const r = e.find((i) => i.status === "unknown"); - return r ? { status: "unknown", reason: `no answer about ${n(r)} speaks for ${t}` } : { status: "good", reason: null }; -} -const F = { kind: "now" }, B = { kind: "earliest-timestamp" }; -async function L(e, t, n, s) { - const r = s.kind === "earliest-timestamp", i = [], a = (c) => !r || c === null ? null : i.filter((l) => l.revisionIndex > c).reduce( - (l, h) => !l || h.genTime < l.genTime ? h : l, - null - ), o = /* @__PURE__ */ new Map(), d = e.filter((c) => c.kind === "timestamp").sort((c, l) => (l.signature.revisionIndex ?? -1) - (c.signature.revisionIndex ?? -1)); - for (const c of d) { - const l = a(c.signature.revisionIndex), h = l ? q(l.genTime) : F, f = c.token ? await z(c.token, t, h, n) : null, u = f?.verdict ?? null, m = c.signature.revisionIndex, g = f && c.integrity === "valid" ? te(f) : null; - g && m !== null && i.push({ ...g, revisionIndex: m }), o.set(c, { - trust: u?.trust ?? "unknown", - trustReason: u?.trustReason ?? void 0, - validationTime: h, - path: f?.path ?? null, - revocation: u?.revocation ?? "unknown", - revocationReason: u?.revocationReason ?? void 0, - timestamp: u, - reliesOn: g, - // A sound token over these bytes whose authority isn't trusted proves no time to you. - withoutTime: u && c.integrity === "valid" && u.cryptography === "valid" ? "untrusted" : "no-timestamp", - timestampPath: null, - withoutIssuer: f?.withoutIssuer ? [f.withoutIssuer] : [] - }); - } - for (const c of e) { - if (c.kind === "timestamp") continue; - const l = a(c.signature.revisionIndex), h = []; - for (const w of c.tokens) - h.push( - await z( - w, - t, - l ? q(l.genTime) : F, - n, - c.internal?.certificates - ) - ); - const f = Ct(h), u = (f ?? h[0])?.verdict ?? null, m = f ? te(f) : null, g = r ? m && l ? m.genTime <= l.genTime ? m : l : m ?? l : null, p = r ? g ? q(g.genTime) : F : Ye(s), y = c.internal ? await ie(c.internal, t, p, n.certificates) : { - status: "unknown", - reason: void 0, - path: void 0, - withoutIssuer: void 0 - }, T = y.status === "trusted" && y.path ? we(await O(n, y.path, V(p)), ye(p)) : { status: "unknown", reason: kt }; - o.set(c, { - trust: y.status, - trustReason: y.reason, - validationTime: p, - path: y.status === "trusted" ? y.path ?? null : null, - revocation: T.status, - revocationReason: T.reason ?? void 0, - timestamp: u, - reliesOn: g, - withoutTime: "no-timestamp", - timestampPath: (f ?? h[0])?.path ?? null, - withoutIssuer: [ - ...y.withoutIssuer ? [y.withoutIssuer] : [], - ...h.flatMap((w) => w.withoutIssuer ? [w.withoutIssuer] : []) - ] - }); - } - return { judgements: o, documentTimestamps: i }; -} -const kt = "the signer is not trusted, so there is no issuer to check an answer against"; -function ve(e, t, n, s, r) { - return { - kind: e.kind, - revisionIndex: e.signature.revisionIndex, - subject: e.cms ? U(e.cms.signerCertificate) : null, - reliesOn: t.reliesOn, - withoutTime: t.withoutTime, - signer: { trusted: t.trust === "trusted", path: t.path }, - documentTimestamps: n, - pool: s, - answersFrom: r - }; -} -function ye(e) { - return e.kind === "now" ? "now" : e.stampedAt; -} -function te(e) { - const { verdict: t, path: n } = e; - return t.summary !== "valid" || !n ? null : { genTime: t.stampedAt, path: n, authorityCertificate: t.authorityCertificate }; -} -async function ke(e, t, n, s) { - const r = { - signature: n, - kind: n.kind, - integrity: "indeterminate", - cryptography: "unsupported", - internal: null, - cms: null, - tokens: [], - token: null - }; - if (!t.chainValid || n.coverage === "malformed") - return r.integrity = t.chainValid ? "invalid" : "indeterminate", r; - const i = n.kind === "timestamp" ? await At(e, n, r) : await bt(e, n, r); - i.internal && s.addCarried(i.internal.certificates, i.internal.revocation); - for (const a of [...i.tokens, ...i.token ? [i.token] : []]) - a.token && s.addCarried(a.token.certificates, a.token.revocation); - return i; -} -async function bt(e, t, n) { - let s; - try { - const i = await e.signatures.getContents(t.field); - s = K(i), n.cms = s.parsed; - const a = await e.signatures.getDigest(t.field, s.digestAlgorithm), o = R(a, s.messageDigest); - n.integrity = t.coverage === "whole-revision" && o ? "valid" : "invalid"; - } catch (i) { - return n.integrity = i instanceof P && i.reason === "unsupported" ? "indeterminate" : "invalid", i instanceof P || (n.integrity = "indeterminate"), n; - } - n.internal = s, n.cryptography = await se(s); - const r = H(s.signerInfo); - for (const i of s.timestampTokens) - n.tokens.push( - await $({ - token: i, - stamped: { kind: "bytes", bytes: r }, - certificates: s.certificates - }) - ); - return n; -} -async function At(e, t, n) { - let s; - try { - s = await e.signatures.getContents(t.field); - } catch { - return n; - } - const r = await $({ - token: s, - stamped: { - kind: "digest-with", - digest: (a) => e.signatures.getDigest(t.field, a) - } - }).catch(() => null); - if (!r || (n.token = r, n.cms = r.token?.parsed ?? null, r.problem === "unreadable")) return n; - const i = r.problem !== "imprint"; - return n.integrity = t.coverage === "whole-revision" && i ? "valid" : "invalid", n.cryptography = i ? r.verdict : (await $({ - token: s, - stamped: { - kind: "digest", - digest: r.info.imprint, - algorithm: r.info.imprintAlgorithm - } - })).verdict, n; -} -async function z(e, t, n, s, r = []) { - const i = e.info ? e.info.genTime.toISOString() : null, a = e.token ? e.token.parsed.signerCertificate : null; - let o = "unknown", d = e.detail, c = null, l = null; - if (e.token && e.info) { - const m = await re({ - token: e.token, - certificates: [...r, ...s.certificates], - trust: t, - at: n, - genTime: e.info.genTime - }); - o = m.status, d = m.reason ?? null, c = m.status === "trusted" ? m.path ?? null : null, l = m.withoutIssuer ?? null; - } - const h = c ? we(await O(s, c, V(n)), ye(n)) : { - status: "unknown", - reason: "the authority is not trusted, so there is no issuer to check an answer against" - }, f = { - cryptography: e.verdict, - trust: o, - trustReason: d, - validationTime: n, - revocation: h.status, - revocationReason: h.reason, - authorityName: a ? U(a) : null - }, u = o === "trusted" && h.status === "revoked"; - return e.verdict === "valid" && !u && i !== null && a !== null ? { - verdict: { - ...f, - summary: o === "trusted" ? "valid" : "valid-untrusted", - stampedAt: i, - authorityCertificate: a - }, - path: c, - withoutIssuer: l - } : { - verdict: { - ...f, - summary: e.verdict === "invalid" || u ? "invalid" : "indeterminate", - stampedAt: i, - authorityCertificate: a - }, - path: c, - withoutIssuer: l - }; -} -function q(e) { - return { kind: "timestamp", stampedAt: e, genTime: e, tokenVerified: !0 }; -} -function Ct(e) { - let t = null; - for (const n of e) - n.verdict.summary === "valid" && (!t || n.verdict.stampedAt < t.verdict.stampedAt) && (t = n); - return t; -} -async function Tt(e) { - return (await be(e)).verdict; -} -async function be(e) { - const t = e.revisionIndex === null ? [] : e.documentTimestamps.filter((f) => f.revisionIndex > e.revisionIndex), n = (f) => f.reduce( - (u, m) => !u || m.genTime > u.genTime ? m : u, - null - ), s = n(t)?.genTime ?? null, r = (f, u, m = []) => ({ - verdict: { - enabled: !1, - provenAt: f, - expiresAt: null, - documentTimestampedAt: s, - missing: u.map(({ certificate: g, reason: p }) => ({ certificate: g, reason: p })) - }, - rows: m, - gaps: u - }), i = e.reliesOn; - if (!i) - return r(null, [{ certificate: e.subject, reason: e.withoutTime, der: null }]); - if (e.kind === "signature" && (!e.signer.trusted || !e.signer.path)) - return r(i.genTime, [ - { certificate: e.subject, reason: "untrusted", der: null } - ]); - const a = new Date(i.genTime), o = [ - ...e.kind === "signature" ? await O(e.pool, e.signer.path, a, e.answersFrom) : [], - ...await O(e.pool, i.path, a, e.answersFrom) - ], d = /* @__PURE__ */ new Set(), c = o.filter((f) => { - const u = I(f.certificate); - return d.has(u) ? !1 : (d.add(u), !0); - }), l = c.filter((f) => f.status !== "good").map((f) => ({ - certificate: f.name, - reason: f.status === "revoked" ? "revoked" : "no-answer", - der: f.certificate - })); - if (l.length > 0) return r(i.genTime, l, c); - const h = n([i, ...t]); - return { - verdict: { - enabled: !0, - provenAt: i.genTime, - expiresAt: D(h.authorityCertificate).notAfter.value.toISOString(), - documentTimestampedAt: s, - missing: [] - }, - rows: c, - gaps: [] - }; -} -async function St(e, t) { - x(); - const n = new Fe(); - return await n.createForCertificate(e, { - hashAlgorithm: "SHA-1", - issuerCertificate: t - }), new Uint8Array(n.toSchema(!0).toBER(!1)); -} -const Ae = 1024 * 1024, It = 8; -async function Ce(e) { - const { readings: t, trust: n, pool: s, source: r, maxCrlBytes: i } = e, a = /* @__PURE__ */ new Map(); - if (!n) return a; - const o = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), c = async (f, u) => { - try { - return await r.fetch(f); - } catch (m) { - const g = k.is(m, b.Network); - return u({ - detail: m.message, - // No answer came. Whoever reports it needs the address that was asked. - network: g ? new k(b.Network, m.message, { - details: { ...m.details, source: f.url }, - cause: m - }) : k.is(m) ? null : new k( - b.Network, - `${f.url} did not answer: ${m.message}`, - { details: { source: f.url }, cause: m } - ) - }), null; - } - }, l = async (f) => { - const u = I(f.certificate); - if (o.has(u)) return !1; - if (o.add(u), !r) - return a.set(u, { detail: "no `revocation` source was given to ask with", network: null }), !1; - const m = D(f.certificate), g = D(f.issuer), p = J(m); - let y = null; - const T = (A) => { - y?.network || (y = A); - }, w = []; - for (const A of p.ocsp) - w.push({ kind: "ocsp", url: A, body: await St(m, g) }); - for (const A of p.crl) w.push({ kind: "crl", url: A }); - if (w.length === 0) - return a.set(u, { detail: "the certificate names no address to ask at", network: null }), !1; - for (const A of w) { - const S = await c(A, T); - if (!S) continue; - if (A.kind === "crl" && S.byteLength > i) { - T({ - detail: `the list at ${A.url} is ${S.byteLength} bytes, over maxCrlBytes (${i})`, - network: null - }); - continue; - } - const W = A.kind === "ocsp" ? "ocsp" : "crl", G = await me({ answer: { kind: W, der: S }, certificate: m, issuer: g }); - if (G.says === "nothing") { - T({ - detail: `the answer from ${A.url} says nothing: ${G.detail}`, - network: null - }); - continue; - } - return s.addAnswer(W, S, !1), a.delete(u), !0; - } - return y && a.set(u, y), !1; - }, h = async (f) => { - const u = I(f); - if (d.has(u) || !r) return !1; - d.add(u); - const m = s.certificates.length; - for (const g of J(D(f)).issuer) { - const p = await c({ kind: "issuer", url: g }, () => { - }); - if (p) { - for (const y of xt(p)) s.addCertificate(y, !1); - if (s.certificates.length > m) return !0; - } - } - return !1; - }; - for (let f = 0; f < It; f++) { - let u = !1; - for (const m of e.times) { - const g = await L(t, n, s, m); - for (const p of t) { - if (e.wanted && !e.wanted(p)) continue; - const y = g.judgements.get(p); - for (const w of y.withoutIssuer) - await h(w) && (u = !0); - const T = await Rt( - p, - y, - s, - m.kind === "earliest-timestamp" - ); - for (const w of T) - w.status === "unknown" && await l(w) && (u = !0); - } - } - if (!u) break; - } - return a; -} -async function Rt(e, t, n, s) { - const r = []; - if (t.path && r.push(...await O(n, t.path, V(t.validationTime))), e.kind === "signature" && t.timestampPath && t.timestamp && r.push( - ...await O( - n, - t.timestampPath, - V(t.timestamp.validationTime) - ) - ), s && t.reliesOn) { - const i = t.reliesOn; - r.push(...await O(n, i.path, new Date(i.genTime))); - } - return r; -} -function xt(e) { - try { - return [D(e)]; - } catch { - } - try { - const t = M(E(e)); - if (t.offset === -1) return []; - const n = new Me({ schema: t.result }); - return (new Le({ schema: n.content }).certificates ?? []).filter( - (r) => r instanceof qe - ); - } catch { - return []; - } -} -async function Dt(e, t = {}) { - if (!e.signatures) throw new Error("this engine does not implement signatures"); - const n = await e.signatures.list(), s = t.trust ?? null, r = await pe(e), i = []; - for (const l of n.signatures) - l.signed && i.push(await ke(e, n, l, r)); - const a = t.validationTime ?? B; - t.revocation && s && await Ce({ - readings: i, - trust: s, - pool: r, - source: t.revocation, - maxCrlBytes: Ae, - times: a.kind === "earliest-timestamp" ? [B] : [B, a] - }); - const o = await L(i, s, r, B), d = a.kind === "earliest-timestamp" ? o : await L(i, s, r, a), c = []; - for (const l of i) { - const h = d.judgements.get(l), f = o.judgements.get(l), u = await Et( - e, - n, - l.signature, - t.until ?? "persisted" - ), m = h.trust === "trusted" && h.revocation === "revoked"; - let g; - l.integrity === "invalid" || l.cryptography === "invalid" || u.verdict === "forbidden" ? g = "invalid" : l.integrity === "indeterminate" || l.cryptography === "unsupported" || u.verdict === "indeterminate" ? g = "indeterminate" : m ? g = "invalid" : g = h.trust === "trusted" ? "valid" : "valid-untrusted", c.push({ - signature: l.signature, - integrity: l.integrity, - cryptography: l.cryptography, - trust: h.trust, - trustReason: h.trustReason, - validationTime: h.validationTime, - revocation: h.revocation, - ...h.revocationReason ? { revocationReason: h.revocationReason } : {}, - modifications: u, - summary: g, - cms: l.cms, - timestamp: h.timestamp, - longTerm: await Tt( - // What the file holds: an answer that was only asked for is not in it. - ve(l, f, o.documentTimestamps, r, "file") - ) - }); - } - return c; -} -async function zt(e) { - const t = await $({ - token: e.token, - stamped: { kind: "digest", digest: e.digest, algorithm: e.algorithm } - }), n = new ge(); - return t.token && n.addCarried(t.token.certificates, t.token.revocation), (await z(t, e.trust ?? null, F, n)).verdict; -} -async function Et(e, t, n, s) { - if (n.revisionIndex === null) - return { - verdict: "indeterminate", - detail: "the signature seals no whole revision", - basis: "persisted" - }; - if (s === "persisted" && n.revisionIndex === t.revisions.length - 1) - return { verdict: "unchanged", basis: "persisted" }; - try { - const r = await e.signatures.analyze({ - since: { signatureIndex: n.index }, - until: s - }), i = r.current.primary, a = i && i.verdict === "forbidden" ? `object ${i.objectNumber}, ${i.rule}${i.detail ? `: ${i.detail}` : ""}` : i && i.verdict === "incomplete" ? `object ${i.objectNumber}: ${i.detail ?? "incomplete evidence"}` : void 0; - return { - verdict: r.current.verdict, - detail: a, - basis: r.basis.source, - ...r.later.revisionCount > 0 ? { laterRevisions: r.later.revisionCount } : {}, - ...r.later.undoneObjectNumbers.length > 0 ? { undone: !0 } : {} - }; - } catch (r) { - return { - verdict: "indeterminate", - detail: `analysis failed: ${r.message}`, - basis: "persisted" - }; - } -} -const $t = { "P-256": 32, "P-384": 48, "P-521": 66 }; -function Kt(e, t) { - const n = $t[t], s = (a) => new k(b.InvalidArg, `not a DER ECDSA signature: ${a}`, { - details: { field: "der" } - }); - let r; - try { - const a = ze(e, 0, e.byteLength); - if (a.tag !== 48) throw s("it is not a sequence"); - r = Ke(e, a); - } catch (a) { - throw a instanceof P ? s("it does not parse") : a; - } - if (r.length !== 2 || r.some((a) => a.tag !== 2)) - throw s("it does not hold two integers"); - const i = new Uint8Array(n * 2); - return r.forEach((a, o) => { - let d = a.contentStart; - for (; d < a.contentEnd - 1 && e[d] === 0; ) d++; - const c = a.contentEnd - d; - if (c > n) throw s(`a number is ${c} bytes, ${t} takes ${n}`); - i.set(e.subarray(d, a.contentEnd), (o + 1) * n - c); - }), i; -} -async function Ht(e, t) { - if (!e.signatures) throw new Error("this engine does not implement signatures"); - if (!t?.trust) - throw new k( - b.InvalidArg, - "addValidationInfo() needs `trust`: the answers kept are the ones for paths you trust", - { details: { field: "trust" } } - ); - const { trust: n } = t; - await e.signatures.addValidationInfo({}); - const s = await e.signatures.list(), r = await pe(e), i = []; - for (const u of s.signatures) - u.signed && i.push(await ke(e, s, u, r)); - const a = Ot(i, t.fields); - for (const u of t.known?.certificates ?? []) r.addCertificate(u, !1); - for (const u of t.known?.ocspResponses ?? []) r.addAnswer("ocsp", u, !1); - for (const u of t.known?.crls ?? []) r.addAnswer("crl", u, !1); - const o = await Ce({ - readings: i, - wanted: (u) => a.has(u), - trust: n, - pool: r, - source: t.revocation ?? null, - maxCrlBytes: t.maxCrlBytes ?? Ae, - times: [B] - }), d = await L(i, n, r, B), c = { - certificates: /* @__PURE__ */ new Map(), - ocspResponses: /* @__PURE__ */ new Map(), - crls: /* @__PURE__ */ new Map() - }, l = (u, m) => u.set(I(m), m); - for (const u of i) { - if (!a.has(u)) continue; - const m = d.judgements.get(u), g = await be( - // With what is about to be stored: what a reader will find afterwards. - ve(u, m, d.documentTimestamps, r, "anywhere") - ); - if (!g.verdict.enabled && !t.partial) - throw Pt(u, g, o); - for (const p of [m.path, m.reliesOn?.path]) - for (const y of p ?? []) l(c.certificates, y); - for (const p of g.rows) - p.evidence && !p.evidence.inFile && l(p.evidence.kind === "ocsp" ? c.ocspResponses : c.crls, p.evidence.der), p.answer && p.answer.says !== "nothing" && p.answer.responder && l(c.certificates, p.answer.responder); - } - let h = { certificates: 0, ocspResponses: 0, crls: 0 }; - c.certificates.size + c.ocspResponses.size + c.crls.size > 0 && (h = (await e.signatures.addValidationInfo({ - certificates: [...c.certificates.values()], - ocspResponses: [...c.ocspResponses.values()], - crls: [...c.crls.values()] - })).added); - const f = await Dt(e, { trust: n }); - if (!t.partial) - for (const u of i) { - if (!a.has(u)) continue; - const m = f.find((g) => g.signature.index === u.signature.index); - if (!m?.longTerm.enabled) - throw new k( - b.Unknown, - `the validation data was stored, and the signature in "${u.signature.fieldName}" still does not read as complete`, - { details: { field: u.signature.fieldName, missing: m?.longTerm.missing } } - ); - } - return { added: h, verdicts: f }; -} -function Ot(e, t) { - if (!t) return new Set(e); - const n = /* @__PURE__ */ new Set(); - for (const s of t) { - const r = e.find( - ({ signature: i }) => s.kind === "fqn" ? i.fieldName === s.name : i.field.kind === "objectNumber" && i.field.objectNumber === s.objectNumber - ); - if (!r) - throw new k( - b.NotFound, - `no signature in field ${s.kind === "fqn" ? `"${s.name}"` : `object ${s.objectNumber}`}`, - { details: { field: "fields" } } - ); - n.add(r); - } - return n; -} -function Pt(e, t, n) { - const s = t.gaps[0], r = e.signature.fieldName, i = s.der ? n.get(I(s.der)) : void 0; - if (s.reason === "no-answer" && i?.network) return i.network; - const a = s.certificate ? `"${s.certificate}"` : "a certificate", o = { - "no-timestamp": `the signature in "${r}" has no timestamp you trust, so no time is proven to judge its certificates at`, - untrusted: `${a} does not lead to a certificate in \`trust\``, - revoked: `${a} was withdrawn by the time of the signature's timestamp`, - "no-answer": `no answer that checks out says ${a} was good at the signature's timestamp${i ? `: ${i.detail}` : ""}` - }; - return new k( - b.SignatureRefused, - `validation data not added: ${o[s.reason]}`, - { details: { reason: s.reason, certificate: s.certificate, field: r } } - ); -} -export { - P as CmsError, - Ht as addValidationInfo, - tt as attachSignatureTimestamp, - Ee as buildDetachedCms, - U as certificateCommonName, - _t as completeSignature, - Zt as createTestCertificateAuthority, - Jt as createTestSigner, - Qt as createTestTimestampAuthority, - Kt as ecdsaRawFromDer, - en as generateSigningKeyPair, - tn as httpRevocationSource, - nn as httpTimestampAuthority, - sn as indexedDbKeyStore, - rn as memoryKeyStore, - Xt as parseDetachedCms, - an as personalSigner, - ue as profileFor, - on as remoteSigner, - dn as selfSignedCertificate, - qt as sign, - Lt as validateChain, - Dt as validateSignatures, - se as verifyCmsSignature, - We as verifyForCompletion, - zt as verifyTimestampToken, - cn as webCryptoSigner -}; -//# sourceMappingURL=index-BCXWVSWX.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-gudfJIGx.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-CRnA8aVz.js similarity index 98% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-gudfJIGx.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-CRnA8aVz.js index 602f5fa2..2e3ac1d1 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-gudfJIGx.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-CRnA8aVz.js @@ -1,4 +1,4 @@ -import { bx as m, by as w } from "./wasm-url-asset-sqnq1cad.js"; +import { bx as m, by as w } from "./wasm-url-asset-Dc0HnHB_.js"; async function x(e) { let t = p(await e), [s, r, { QuickJSWASMModule: n }] = await Promise.all([t.importModuleLoader().then(p), t.importFFI(), import("./module-6F3E5H7Y-CZSA4oPd.js").then(p)]), o = await s(); o.type = "sync"; @@ -164,4 +164,4 @@ export { l as QuickJsSandbox, N as createQuickJsSandbox }; -//# sourceMappingURL=index-gudfJIGx.js.map +//# sourceMappingURL=index-CRnA8aVz.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-Cp6ojw-X.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-Cp6ojw-X.js new file mode 100644 index 00000000..386476f4 --- /dev/null +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/index-Cp6ojw-X.js @@ -0,0 +1,1572 @@ +var $e = Object.defineProperty; +var Ee = (t, e, n) => e in t ? $e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; +var F = (t, e, n) => Ee(t, typeof e != "symbol" ? e + "" : e, n); +import { readCmsParts as ie, withSignerCertificate as De, parseCmsInternal as H, certDer as C, certificateFromDer as E } from "./parse-BNZey3Fv.js"; +import { parseDetachedCms as dn } from "./parse-BNZey3Fv.js"; +import { r as Oe, c as Be, v as Pe, d as Ve, a as re, b as Ne } from "./timestamp-YjVubp40.js"; +import { aR as $, b0 as K, t as x, b8 as T, bz as k, bA as b, aS as ae, bB as Ue, bC as Me, bD as Fe, bE as R, bF as je, aW as v, f as L, bG as Le, bH as ze, bI as _e, b5 as Ke, bJ as qe, bK as He, O as We, bL as Ge, b1 as Xe, b2 as Ye } from "./wasm-url-asset-Dc0HnHB_.js"; +import { bM as fn, bN as mn, bO as hn, bP as gn, bQ as pn, bR as wn, bS as vn, bT as yn, bU as kn, bV as bn, bW as An } from "./wasm-url-asset-Dc0HnHB_.js"; +import { C as P } from "./error-CbfoSMwv.js"; +import { certificateCommonName as M } from "./self-signed-BsJCIg7s.js"; +import { selfSignedCertificate as Tn } from "./self-signed-BsJCIg7s.js"; +import { a as Je, e as Y, r as Qe, c as Ze } from "./splice-DZQMGiQI.js"; +function W(t) { + return new Uint8Array(t.signature.getValue()); +} +async function D(t) { + const e = $(); + let n, s; + try { + n = ie(t.token, "tst-info", { certificates: t.certificates }), s = Oe(n.eContent); + } catch (m) { + return { verdict: "unsupported", problem: "unreadable", detail: m instanceof P ? m.message : String(m), info: null, token: null }; + } + const r = De(n), i = (m, f, d) => ({ verdict: m, problem: f, detail: d, info: s, token: r }), { stamped: a } = t; + if (a.kind === "digest" && s.imprintAlgorithm !== a.algorithm) + return i( + "invalid", + "imprint-algorithm", + `the token stamps a ${s.imprintAlgorithm} digest, not the ${a.algorithm} digest it was given` + ); + const c = a.kind === "digest" ? a.digest : a.kind === "digest-with" ? await a.digest(s.imprintAlgorithm) : new Uint8Array( + await e.digest( + K[s.imprintAlgorithm], + x(a.bytes) + ) + ); + if (!T(s.imprint, c)) + return i("invalid", "imprint", "the token's message imprint is not the stamped digest"); + const u = new Uint8Array( + await e.digest(K[n.digestAlgorithm], x(n.eContent)) + ); + if (!T(u, n.messageDigest)) + return i( + "invalid", + "message-digest", + "the token's message digest does not cover its TSTInfo" + ); + if (!r) + return i( + "unsupported", + "no-certificate", + "the token's authority certificate is not carried by the token or by the signature it is in" + ); + const o = await Be(r); + if (o === "invalid") + return i( + "invalid", + "binding", + "the token's certificate binding names another certificate than the one that signed it" + ); + const l = await Pe(r); + return l === "invalid" ? i("invalid", "signature", "the token signature does not verify") : l === "unsupported" ? i( + "unsupported", + "unsupported-algorithm", + "the token's signature algorithm is not supported" + ) : o === "absent" ? i( + "unsupported", + "no-binding", + "the token does not bind its authority's certificate, which RFC 3161 requires" + ) : o === "unsupported" ? i( + "unsupported", + "unsupported-algorithm", + "the token's certificate binding uses a hash that is not supported" + ) : { verdict: "valid", problem: null, detail: null, info: s, token: r }; +} +function O(t, e) { + return new k( + b.SignatureRefused, + `signing refused (${t}): ${e}`, + { details: { reason: t } } + ); +} +const et = 8192, tt = 16384, nt = 10240, st = 64, J = 4096, U = 4 * 1024 * 1024; +function it(t) { + const { key: e, profile: n, timestampAuthority: s } = t, r = e.kind === "cms" ? Q(e) : n === "timestamp" ? void 0 : rt(e, n), i = s ? Q(s) : void 0, a = t.contentsSizeBytes; + if (e.kind === "raw" && r !== void 0) { + const l = oe(r); + if (a !== void 0 && r > a) + throw O( + "too-large", + `the key's signature takes up to ${r} bytes and ${a} were asked for: ${l}` + ); + if (r > U) + throw O( + "too-large", + `the key's signature takes up to ${r} bytes: ${l}` + ); + } + if (a !== void 0) return a; + const c = s ? tt : void 0; + if (r === void 0) return c; + const u = s ? r + (i ?? nt) + st : r, o = Math.min(U, ce(u)); + return o > (c ?? et) ? o : c; +} +function oe(t) { + const e = ce(t); + return e > U ? "that is more than a signature may reserve" : `pass \`contentsSizeBytes: ${e}\``; +} +function ce(t) { + return Math.ceil(t / J) * J; +} +function Q(t) { + const e = t.maxCmsBytes; + if (e !== void 0) { + if (!Number.isInteger(e) || e < 1 || e > U) + throw new k( + b.InvalidArg, + `maxCmsBytes must be a whole number of bytes from 1 to ${U}`, + { details: { field: "maxCmsBytes" } } + ); + return e; + } +} +function rt(t, e) { + const n = at(t); + if (n !== void 0) + return Ve({ + hash: t.hash, + profile: e, + signer: t, + signatureLength: n, + signingTime: e === "pkcs7" ? (/* @__PURE__ */ new Date()).toISOString() : void 0 + }); +} +function at(t) { + const e = t.certificateChain[0]; + if (!e) return; + const n = ae.fromBER(x(e)).subjectPublicKeyInfo.parsedKey; + if (n instanceof Ue) { + const s = n.modulus.valueBlock.valueHexView; + return s[0] === 0 ? s.byteLength - 1 : s.byteLength; + } + if (n instanceof Me) { + const s = Fe.find(n.namedCurve); + return s ? s.size * 2 : void 0; + } +} +async function ot(t) { + const { cms: e, prepared: n, profile: s } = t; + if (e.byteLength > n.contentsSizeBytes) + return { + ok: !1, + reason: "too-large", + detail: `the signature is ${e.byteLength} bytes and ${n.contentsSizeBytes} were reserved: ${oe(e.byteLength)}` + }; + if (s === "timestamp") return ct(e, n); + let r; + try { + r = H(e); + } catch (u) { + return { + ok: !1, + reason: "malformed", + detail: u instanceof P ? u.message : String(u) + }; + } + const i = r.parsed; + if (i.digestAlgorithm !== n.algorithm) + return { + ok: !1, + reason: "algorithm-mismatch", + detail: `the CMS digests with ${i.digestAlgorithm}, the document was prepared with ${n.algorithm}` + }; + if (!T(i.messageDigest, n.digest)) + return { + ok: !1, + reason: "digest-mismatch", + detail: "the CMS message digest is not the prepared digest" + }; + if (s === "cades-b") { + if (!i.signingCertificateV2) + return { + ok: !1, + reason: "profile-violation", + detail: "CAdES requires the ESS signing-certificate-v2 attribute" + }; + if (i.signingTime) + return { + ok: !1, + reason: "profile-violation", + detail: "PAdES forbids the CMS signing-time attribute" + }; + } + const a = await re(r); + if (a !== "valid") + return { + ok: !1, + reason: "signature-invalid", + detail: a === "unsupported" ? "the signature or its certificate binding uses an algorithm that is not supported" : "the signature does not verify" + }; + const c = W(r.signerInfo); + for (const u of r.timestampTokens) { + const o = await D({ + token: u, + stamped: { kind: "bytes", bytes: c }, + certificates: r.certificates + }); + if (o.verdict === "invalid") + return { + ok: !1, + reason: o.problem === "imprint" ? "digest-mismatch" : "signature-invalid", + detail: `the signature's timestamp does not belong to it: ${o.detail}` + }; + } + return { ok: !0 }; +} +async function ct(t, e) { + const n = await D({ + token: t, + stamped: { kind: "digest", digest: e.digest, algorithm: e.algorithm } + }); + if (n.verdict === "valid") return { ok: !0 }; + switch (n.problem) { + case "unreadable": + return { ok: !1, reason: "malformed", detail: n.detail }; + case "no-certificate": + return { + ok: !1, + reason: "malformed", + detail: "the token does not carry its authority's certificate" + }; + case "imprint-algorithm": + return { + ok: !1, + reason: "algorithm-mismatch", + detail: `the token stamps a ${n.info.imprintAlgorithm} digest, the document was prepared with ${e.algorithm}` + }; + case "imprint": + return { + ok: !1, + reason: "digest-mismatch", + detail: "the token's message imprint is not the prepared digest" + }; + default: + return { ok: !1, reason: "signature-invalid", detail: n.detail }; + } +} +async function tn(t, e, n = { kind: "now" }) { + return ue(t, e, n, []); +} +async function ue(t, e, n, s) { + if (!e) return { status: "unknown", reason: "no trust anchors configured" }; + const r = await e.anchors(); + if (r.length === 0) return { status: "unknown", reason: "no trust anchors configured" }; + $(); + let i; + try { + i = t instanceof Uint8Array ? H(t) : t; + } catch (a) { + return { status: "untrusted", reason: a.message }; + } + return fe({ + target: i.signerCertificate, + candidates: [...i.certificates, ...s], + anchors: r, + at: N(n) + }); +} +async function de(t) { + const { token: e, trust: n, genTime: s } = t; + if (!n) return { status: "unknown", reason: "no trust anchors configured" }; + const r = n.timestampAnchors ? await n.timestampAnchors() : await n.anchors(); + if (r.length === 0) + return { + status: "unknown", + reason: n.timestampAnchors ? "no timestamp anchors configured" : "no trust anchors configured" + }; + $(); + const i = e.signerCertificate, a = dt(i); + if (a) return { status: "untrusted", reason: a }; + if (!Z(i, s)) + return { + status: "untrusted", + reason: "the token is dated outside its authority certificate's validity" + }; + const c = N(t.at ?? { kind: "now" }), u = C(i); + return r.some((o) => T(o, u)) ? Z(i, c) ? { status: "trusted", path: [u] } : { + status: "untrusted", + reason: "the authority's certificate is not valid at the time it is judged" + } : fe({ + target: i, + candidates: [...e.certificates, ...t.certificates ?? []], + anchors: r, + at: c + }); +} +function N(t) { + return t.kind === "now" ? /* @__PURE__ */ new Date() : new Date(le(t)); +} +function ut(t) { + if (t.kind === "now") return { kind: "now" }; + const e = le(t); + return { kind: "timestamp", stampedAt: e, genTime: e, tokenVerified: !0 }; +} +function le(t) { + return t.stampedAt === void 0 ? t.genTime : t.stampedAt; +} +function Z(t, e) { + return t.notBefore.value <= e && e <= t.notAfter.value; +} +function dt(t) { + const e = t.extensions?.find( + (s) => s.extnID === v.extendedKeyUsage + ); + if (!e) + return "the authority's certificate has no extended key usage, so it is not made for timestamping"; + const n = e.parsedValue?.keyPurposes ?? []; + return n.includes(v.timeStamping) ? n.length > 1 ? "the authority's certificate allows other uses besides timestamping" : e.critical ? null : "the authority's certificate does not mark its timestamping purpose as critical" : "the authority's certificate does not allow timestamping"; +} +async function fe(t) { + const { target: e, at: n } = t, s = C(e), r = (u) => T(u, s), i = /* @__PURE__ */ new Map(); + for (const u of t.candidates) { + const o = C(u), l = R(o); + !r(o) && !i.has(l) && i.set(l, u); + } + const a = [...i.values()], c = t.anchors.some(r); + try { + const u = t.anchors.filter((d) => !r(d)).map(E), o = c ? [...u, e] : u, m = await new je({ + certs: c ? [e] : [...a, e], + trustedCerts: o, + checkDate: n, + findIssuer: lt(e) + }).verify(); + if (!m.result) { + const d = mt(e, o, a); + return { + status: "untrusted", + reason: d ? `no certificate was found that issued "${ht(d)}"` : m.resultMessage || `chain validation code ${m.resultCode}`, + ...d ? { withoutIssuer: C(d) } : {} + }; + } + const f = m.certificatePath ?? []; + return f.length === 0 || !r(C(f[0])) ? { + status: "untrusted", + reason: "the validated path does not begin with the certificate that signed" + } : { status: "trusted", path: f.map(C) }; + } catch (u) { + return { status: "untrusted", reason: u.message }; + } +} +function lt(t) { + let e; + return async (n, s, r) => { + e ?? (e = ft(t, s, r)); + const { issuers: i, steps: a } = await e, c = a.get(n); + return c === void 0 ? [] : (i.get(n) ?? []).filter((u) => a.get(u) === c - 1); + }; +} +async function ft(t, e, n) { + const s = (u) => e.trustedCerts.some((o) => T(o.tbsView, u.tbsView)), r = /* @__PURE__ */ new Map(), i = [t]; + for (; i.length > 0; ) { + const u = i.pop(); + if (r.has(u)) continue; + const l = (s(u) ? [] : await e.defaultFindIssuer(u, e, n)).filter((m) => !T(m.tbsView, u.tbsView)); + r.set(u, l), i.push(...l); + } + const a = /* @__PURE__ */ new Map(); + let c = [...r.keys()].filter(s); + for (let u = 0; c.length > 0; u++) { + for (const o of c) a.set(o, u); + c = [...r].filter( + ([o, l]) => !a.has(o) && l.some((m) => a.has(m)) + ).map(([o]) => o); + } + return { issuers: r, steps: a }; +} +function mt(t, e, n) { + const s = [...e, ...n], r = /* @__PURE__ */ new Set(); + let i = t; + for (; !r.has(i); ) { + if (r.add(i), e.includes(i) || i.issuer.isEqual(i.subject)) return null; + const a = s.find((c) => c.subject.isEqual(i.issuer)); + if (!a) return i; + i = a; + } + return null; +} +function ht(t) { + return M(C(t)) ?? "a certificate without a common name"; +} +const gt = new Uint8Array([ + 6, + 11, + 42, + 134, + 72, + 134, + 247, + 13, + 1, + 9, + 16, + 2, + 14 +]); +async function pt(t) { + const { cms: e, authority: n } = t; + let s; + try { + s = ie(e); + } catch (u) { + throw O("malformed", u instanceof P ? u.message : String(u)); + } + if (s.timestampTokens.length > 0) + throw new k( + b.InvalidArg, + "the signature already carries a timestamp, from the service that signed it; leave out `timestampAuthority`", + { details: { field: "timestampAuthority" } } + ); + const r = n.hash ?? "sha256", i = new Uint8Array( + await $().digest( + K[r], + x(W(s.signerInfo)) + ) + ), a = await n.sign({ digest: i, algorithm: r, subFilter: "ETSI.RFC3161" }), c = await D({ + token: a, + stamped: { kind: "digest", digest: i, algorithm: r }, + certificates: s.certificates + }); + if (c.verdict !== "valid") + throw O(vt(c.problem), `the timestamp: ${yt(c)}`); + t.trust && await me(c, t.trust, s.certificates); + try { + return Je(e, wt(a)); + } catch (u) { + throw O("malformed", u instanceof P ? u.message : String(u)); + } +} +async function me(t, e, n = []) { + const s = await de({ + token: t.token, + certificates: n, + trust: e, + genTime: t.info.genTime + }); + if (s.status === "trusted") return; + const r = M(t.token.parsed.signerCertificate); + throw new k( + b.SignatureRefused, + `the timestamp's authority${r ? ` ("${r}")` : ""} isn't trusted: ${s.reason ?? "no path to a timestamp anchor"}. Add its root to \`timestampAnchors\``, + { details: { trust: s.status, trustReason: s.reason ?? null } } + ); +} +function wt(t) { + return Y( + 48, + new Uint8Array([...gt, ...Y(49, t)]) + ); +} +function vt(t) { + switch (t) { + case "unreadable": + return "malformed"; + case "imprint": + return "digest-mismatch"; + case "imprint-algorithm": + return "algorithm-mismatch"; + default: + return "signature-invalid"; + } +} +function yt(t) { + return t.problem === "unreadable" ? `\`timestampAuthority\` didn't return an RFC 3161 token (${t.detail}): is it a signing service?` : t.detail; +} +function he(t) { + switch (t) { + case "adbe.pkcs7.detached": + return "pkcs7"; + case "ETSI.CAdES.detached": + return "cades-b"; + case "ETSI.RFC3161": + return "timestamp"; + default: + throw new k( + b.InvalidArg, + `unknown subFilter '${String(t)}'`, + { + details: { field: "subFilter" } + } + ); + } +} +async function nn(t, e) { + const { key: n, timestampAuthority: s, timestampTrust: r, afterPrepare: i, ...a } = e, c = a.kind === "timestamp"; + if (c && n.kind !== "cms") + throw new k( + b.InvalidArg, + "a document timestamp needs a timestamp authority: a CMS key that returns an RFC 3161 token", + { details: { field: "key" } } + ); + ge(c, s, r); + const u = c ? "ETSI.RFC3161" : a.subFilter ?? "ETSI.CAdES.detached", o = he(u), l = it({ + key: n, + profile: o, + timestampAuthority: s, + contentsSizeBytes: a.contentsSizeBytes + }), m = await t.signatures.prepare({ + ...a, + ...c ? {} : { subFilter: u }, + digest: a.digest ?? n.hash ?? "sha256", + ...l !== void 0 ? { contentsSizeBytes: l } : {} + }); + try { + await i?.(m); + const f = await kt(n, m, u, o); + return await pe(t, { prepared: m, cms: f, timestampAuthority: s, timestampTrust: r }); + } catch (f) { + throw await t.signatures.cancel(m.signingId).catch(() => { + }), f; + } +} +async function sn(t, e) { + ge( + e.prepared.subFilter === "ETSI.RFC3161", + e.timestampAuthority, + e.timestampTrust + ); + try { + return await pe(t, e); + } catch (n) { + throw k.is(n, b.SignatureRefused) ? new k( + b.SignatureRefused, + `${n.message}. The signing stays prepared, and this CMS will be refused again: cancel it and prepare again`, + { details: n.details, cause: n } + ) : n; + } +} +function ge(t, e, n) { + if (t && e) + throw new k( + b.InvalidArg, + "a document timestamp is already a timestamp; leave out `timestampAuthority`", + { details: { field: "timestampAuthority" } } + ); + if (n && !e && !t) + throw new k( + b.InvalidArg, + "`timestampTrust` judges a timestamp's authority; pass `timestampAuthority` too", + { details: { field: "timestampTrust" } } + ); +} +async function pe(t, e) { + const { prepared: n, timestampAuthority: s } = e, r = he(n.subFilter), i = async (c) => { + const u = await ot({ cms: c, prepared: n, profile: r }); + if (!u.ok) throw O(u.reason, u.detail); + }; + let a = e.cms; + if (await i(a), r === "timestamp" && e.timestampTrust) { + const c = await D({ + token: a, + stamped: { kind: "digest", digest: n.digest, algorithm: n.algorithm } + }); + if (c.verdict !== "valid") throw O("malformed", "the timestamp token"); + await me(c, e.timestampTrust); + } + return s && (a = await pt({ + cms: a, + authority: s, + trust: e.timestampTrust + }), await i(a)), t.signatures.complete({ + signingId: n.signingId, + cms: a, + expectedVersion: n.expectedVersion + }); +} +async function kt(t, e, n, s) { + if (t.kind === "cms") + return t.sign({ digest: e.digest, algorithm: e.algorithm, subFilter: n }); + if (s === "timestamp") + throw new k(b.InvalidArg, "a raw key cannot make a timestamp token"); + return Ne({ + digest: e.digest, + hash: e.algorithm, + profile: s, + signer: t, + signingTime: s === "pkcs7" ? (/* @__PURE__ */ new Date()).toISOString() : void 0 + }); +} +const bt = 6; +function ee(t) { + const e = { ocsp: [], crl: [], issuer: [] }, n = (i) => t.extensions?.find((a) => a.extnID === i)?.parsedValue, s = n(v.authorityInfoAccess); + for (const i of s?.accessDescriptions ?? []) { + const a = te(i.accessLocation); + a && (i.accessMethod === v.accessOcsp && e.ocsp.push(a), i.accessMethod === v.accessIssuers && e.issuer.push(a)); + } + const r = n(v.crlDistributionPoints); + for (const i of r?.distributionPoints ?? []) { + if (i.reasons || i.cRLIssuer) continue; + const a = Array.isArray(i.distributionPoint) ? i.distributionPoint : []; + for (const c of a) { + const u = te(c); + u && e.crl.push(u); + } + } + return e; +} +function At(t) { + const e = (i) => t.extensions?.find((a) => a.extnID === i); + if (e(v.basicConstraints)?.parsedValue?.cA) return !1; + if (e(v.validityAssuredShortTerm)) return !0; + if (!e(v.noRevAvail)) return !1; + const s = e(v.authorityInfoAccess)?.parsedValue; + return !(e(v.crlDistributionPoints) !== void 0 || e(v.freshestCrl) !== void 0 || (s?.accessDescriptions ?? []).some( + (i) => i.accessMethod === v.accessOcsp + )); +} +function te(t) { + return t.type !== bt || typeof t.value != "string" ? null : /^https?:\/\//i.test(t.value) ? t.value : null; +} +const we = { + 0: "unspecified", + 1: "key-compromise", + 2: "ca-compromise", + 3: "affiliation-changed", + 4: "superseded", + 5: "cessation-of-operation", + 6: "certificate-hold", + 8: "remove-from-crl", + 9: "privilege-withdrawn", + 10: "aa-compromise" +}; +async function ve(t) { + $(); + const { answer: e, certificate: n, issuer: s } = t, r = (i, a) => ({ + says: "nothing", + kind: e.kind, + problem: i, + detail: a + }); + if (!n.issuer.isEqual(s.subject)) + return r("other-certificate", "the certificate was not issued by the issuer given"); + try { + return e.kind === "ocsp" ? await Tt(e.der, n, s, r) : await xt(e.der, n, s, r); + } catch (i) { + return r("unreadable", i.message); + } +} +const Ct = { + 1: "malformed request", + 2: "internal error", + 3: "try later", + 5: "a signed request is required", + 6: "unauthorized" +}; +async function Tt(t, e, n, s) { + const r = $(), i = L(x(t)); + if (i.offset === -1) return s("unreadable", "the OCSP response is not valid DER"); + const a = new Le({ schema: i.result }), c = a.responseStatus.valueBlock.valueDec; + if (c !== 0) + return s( + "not-successful", + `the responder answered "${Ct[c] ?? `status ${c}`}"` + ); + const u = a.responseBytes; + if (!u) return s("unreadable", "the OCSP response carries no answer"); + if (u.responseType !== v.ocspBasic) + return s("unsupported", `OCSP response type ${u.responseType}`); + const o = L(u.response.valueBlock.valueHexView); + if (o.offset === -1) return s("unreadable", "the OCSP answer is not valid DER"); + const l = new ze({ schema: o.result }), m = l.tbsResponseData; + let f = null, d = null; + for (const w of m.responses) { + const A = r.getAlgorithmByOID(w.certID.hashAlgorithm.algorithmId, !1); + if (!("name" in A) || typeof A.name != "string") { + d = w.certID.hashAlgorithm.algorithmId; + continue; + } + const I = new _e(); + if (await I.createForCertificate(e, { + hashAlgorithm: A.name, + issuerCertificate: n + }), w.certID.isEqual(I)) { + f = w; + break; + } + } + if (!f) + return d ? s("unsupported", `the answer identifies its certificate with hash ${d}`) : s("other-certificate", "the OCSP response is about another certificate"); + const h = await St(m.responderID, [n, ...l.certs ?? []]); + if (!h) + return s("wrong-signer", "the responder's certificate is not in the response"); + const g = It(h, n); + if (!g) { + const w = await Rt(h, n, m.producedAt); + if (w) return s("wrong-signer", w); + } + const p = await ye( + m.tbsView, + l.signature, + h.subjectPublicKeyInfo, + l.signatureAlgorithm + ); + if (p === "unsupported") + return s( + "unsupported", + `signature algorithm ${l.signatureAlgorithm.algorithmId} of the OCSP response` + ); + if (p === "invalid") + return s("signature", "the OCSP response's signature does not verify"); + const y = { + kind: "ocsp", + thisUpdate: f.thisUpdate, + nextUpdate: f.nextUpdate ?? null, + responder: g ? null : C(h) + }, S = f.certStatus; + switch (S.idBlock.tagNumber) { + case 0: + return { says: "good", ...y }; + case 1: { + const [w, A] = S.valueBlock.value; + if (!(w instanceof Ke)) + return s("unreadable", "the OCSP response names no revocation time"); + const I = A?.valueBlock.value[0]?.valueBlock.valueDec; + return { + says: "revoked", + revokedAt: w.toDate(), + reason: I === void 0 ? null : we[I] ?? null, + ...y + }; + } + default: + return s("unknown-status", "the responder does not know the certificate"); + } +} +async function St(t, e) { + const n = $(); + for (const s of e) + if (t instanceof He) { + if (s.subject.isEqual(t)) return s; + } else if (t instanceof We) { + const r = s.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView, i = new Uint8Array(await n.digest("SHA-1", x(r))); + if (T(i, new Uint8Array(t.valueBlock.valueHexView))) return s; + } + return null; +} +function It(t, e) { + return T(C(t), C(e)); +} +async function Rt(t, e, n) { + if (!t.issuer.isEqual(e.subject)) + return "the responder's certificate was not issued by the certificate's issuer"; + let s = !1; + try { + s = await t.verify(e); + } catch { + s = !1; + } + return s ? (t.extensions?.find( + (a) => a.extnID === v.extendedKeyUsage + )?.parsedValue?.keyPurposes ?? []).includes(v.ocspSigning) ? n < t.notBefore.value || n > t.notAfter.value ? "the responder's certificate was outside its dates when it answered" : null : "the responder's certificate is not made for answering about certificates" : "the responder's certificate is not signed by the certificate's issuer"; +} +async function xt(t, e, n, s) { + const r = L(x(t)); + if (r.offset === -1) return s("unreadable", "the CRL is not valid DER"); + const i = new qe({ schema: r.result }); + if (!i.issuer.isEqual(n.subject)) + return s("other-certificate", "the CRL is not from the certificate's issuer"); + for (const f of i.crlExtensions?.extensions ?? []) { + if (f.extnID === v.deltaCrlIndicator) + return s("delta-crl", "the CRL lists only what changed since another list"); + if (f.extnID === v.issuingDistributionPoint) { + const d = f.parsedValue; + if (!d) return s("unreadable", "the CRL's scope cannot be read"); + if (d.indirectCRL) + return s("indirect-crl", "the CRL lists certificates of other issuers"); + const h = Et(e); + if (d.onlyContainsAttributeCerts || d.onlyContainsUserCerts && h || d.onlyContainsCACerts && !h || d.onlySomeReasons !== void 0) + return s("out-of-scope", "the CRL does not cover this kind of certificate"); + } else if (f.critical && !$t.has(f.extnID)) + return s("unsupported", `critical CRL extension ${f.extnID}`); + } + if (!Dt(n)) + return s("wrong-signer", "the issuer's certificate is not made for signing CRLs"); + const a = await ye( + i.tbsView, + i.signatureValue, + n.subjectPublicKeyInfo, + i.signatureAlgorithm + ); + if (a === "unsupported") + return s("unsupported", `signature algorithm ${i.signatureAlgorithm.algorithmId}`); + if (a === "invalid") return s("signature", "the CRL's signature does not verify"); + const c = { + kind: "crl", + thisUpdate: i.thisUpdate.value, + nextUpdate: i.nextUpdate?.value ?? null, + responder: null + }, u = ne(e.serialNumber), o = (i.revokedCertificates ?? []).find( + (f) => T(ne(f.userCertificate), u) + ); + if (!o) return { says: "good", ...c }; + const m = o.crlEntryExtensions?.extensions.find( + (f) => f.extnID === v.crlReason + )?.parsedValue?.valueBlock.valueDec; + return { + says: "revoked", + revokedAt: o.revocationDate.value, + reason: m === void 0 ? null : we[m] ?? null, + ...c + }; +} +const $t = /* @__PURE__ */ new Set([ + v.crlNumber, + v.authorityKeyIdentifier, + v.authorityInfoAccess, + v.freshestCrl +]); +function Et(t) { + return t.extensions?.find( + (n) => n.extnID === v.basicConstraints + )?.parsedValue?.cA === !0; +} +function Dt(t) { + const e = t.extensions?.find((s) => s.extnID === v.keyUsage); + if (!e) return !0; + const n = e.parsedValue?.valueBlock.valueHexView; + return n !== void 0 && n.length > 0 && (n[0] & 2) !== 0; +} +function ne(t) { + const e = new Uint8Array(t.valueBlock.valueHexView); + let n = 0; + for (; n < e.length - 1 && e[n] === 0; ) n++; + return e.subarray(n); +} +async function ye(t, e, n, s) { + try { + return await $().verifyWithPublicKey( + x(t), + e, + n, + s + ) ? "valid" : "invalid"; + } catch (r) { + const i = r.message ?? ""; + return /unsupported|unknown|not supported|not implemented|incorrect/i.test(i) ? "unsupported" : "invalid"; + } +} +const Ot = 300 * 1e3; +function Bt(t, e) { + const n = e.getTime(); + let s = null, r = null; + for (const i of t) { + if (i.says === "nothing") continue; + if (i.says === "revoked") { + i.revokedAt.getTime() <= n ? (!r || i.revokedAt < r.revokedAt) && (r = i) : s ?? (s = i); + continue; + } + const a = i.thisUpdate.getTime(), c = i.nextUpdate ? i.nextUpdate.getTime() : a + Ot; + (a >= n || n <= c) && (s ?? (s = i)); + } + return r ? { status: "revoked", answer: r } : s ? { status: "good", answer: s } : { status: "unknown", answer: null }; +} +class ke { + constructor() { + F(this, "certificateByDer", /* @__PURE__ */ new Map()); + F(this, "answerByDer", /* @__PURE__ */ new Map()); + /** What each answer says about one certificate, in the order the answers were offered. */ + F(this, "checked", /* @__PURE__ */ new Map()); + } + /** Every certificate offered, each once. */ + get certificates() { + return [...this.certificateByDer.values()].map((e) => e.certificate); + } + /** + * Offer a certificate. Bytes that are not a certificate are left out, and false comes back. + * `inFile` is false for one that came from outside the file. + */ + addCertificate(e, n = !0) { + try { + const s = e instanceof Uint8Array ? e : C(e), r = R(s); + return this.certificateByDer.has(r) || this.certificateByDer.set(r, { + certificate: e instanceof Uint8Array ? E(e) : e, + inFile: n + }), !0; + } catch { + return !1; + } + } + /** + * Offer an answer as it was stored or sent. It is checked when it is asked about a + * certificate. `inFile` is false for one that came from outside the file. + */ + addAnswer(e, n, s = !0) { + const r = `${e}:${R(n)}`; + let i = this.answerByDer.get(r); + return i || (i = { kind: e, der: n, inFile: s }, this.answerByDer.set(r, i)), i; + } + /** Offer what a CMS carries itself: its certificates and its answers. */ + addCarried(e, n) { + for (const s of e) this.addCertificate(s); + for (const s of n.ocspResponses) this.addAnswer("ocsp", s); + for (const s of n.crls) this.addAnswer("crl", s); + } + /** + * What each answer says about `certificate`, which `issuer` issued. Each answer is checked + * once, also when more answers are offered between two calls. + */ + async checksFor(e, n) { + const s = `${R(C(e))}:${R(C(n))}`, r = [...this.answerByDer.values()], i = this.checked.get(s) ?? []; + for (let c = i.length; c < r.length; c++) + i.push(ve({ answer: r[c], certificate: e, issuer: n })); + this.checked.set(s, i); + const a = await Promise.all(i); + return r.map((c, u) => ({ answer: c, check: a[u] })); + } +} +async function be(t) { + const e = new ke(); + if (typeof t.signatures?.getValidationInfo != "function") return e; + try { + const n = await t.signatures.getValidationInfo(); + for (const s of n.certificates) e.addCertificate(s); + for (const s of n.ocspResponses) e.addAnswer("ocsp", s); + for (const s of n.crls) e.addAnswer("crl", s); + } catch (n) { + if (!k.is(n, b.NotImplemented)) throw n; + } + return e; +} +async function B(t, e, n, s = "anywhere") { + const r = e.filter((c, u) => u === 0 || !T(c, e[u - 1])), i = r.map(E), a = []; + for (let c = 0; c + 1 < i.length; c++) { + if (At(i[c])) continue; + const u = (await t.checksFor(i[c], i[c + 1])).filter( + (l) => s === "anywhere" || l.answer.inFile + ), o = Bt( + u.map((l) => l.check), + n + ); + a.push({ + certificate: r[c], + name: M(r[c]), + issuer: r[c + 1], + evidence: u.find((l) => l.check === o.answer)?.answer ?? null, + ...o + }); + } + return a; +} +function Ae(t, e) { + const n = (i) => `"${i.name ?? "a certificate without a name"}"`, s = t.find((i) => i.status === "revoked"); + if (s) { + const i = s.answer, a = i?.says === "revoked" ? ` on ${i.revokedAt.toISOString()}` : "", c = i?.says === "revoked" && i.reason ? ` (${i.reason})` : ""; + return { status: "revoked", reason: `${n(s)} was withdrawn${a}${c}` }; + } + const r = t.find((i) => i.status === "unknown"); + return r ? { status: "unknown", reason: `no answer about ${n(r)} speaks for ${e}` } : { status: "good", reason: null }; +} +const j = { kind: "now" }, V = { kind: "earliest-timestamp" }; +async function z(t, e, n, s) { + const r = s.kind === "earliest-timestamp", i = [], a = (o) => !r || o === null ? null : i.filter((l) => l.revisionIndex > o).reduce( + (l, m) => !l || m.genTime < l.genTime ? m : l, + null + ), c = /* @__PURE__ */ new Map(), u = t.filter((o) => o.kind === "timestamp").sort((o, l) => (l.signature.revisionIndex ?? -1) - (o.signature.revisionIndex ?? -1)); + for (const o of u) { + const l = a(o.signature.revisionIndex), m = l ? _(l.genTime) : j, f = o.token ? await q(o.token, e, m, n) : null, d = f?.verdict ?? null, h = o.signature.revisionIndex, g = f && o.integrity === "valid" ? se(f) : null; + g && h !== null && i.push({ ...g, revisionIndex: h }), c.set(o, { + trust: d?.trust ?? "unknown", + trustReason: d?.trustReason ?? void 0, + validationTime: m, + path: f?.path ?? null, + revocation: d?.revocation ?? "unknown", + revocationReason: d?.revocationReason ?? void 0, + timestamp: d, + reliesOn: g, + // A sound token over these bytes whose authority isn't trusted proves no time to you. + withoutTime: d && o.integrity === "valid" && d.cryptography === "valid" ? "untrusted" : "no-timestamp", + timestampPath: null, + withoutIssuer: f?.withoutIssuer ? [f.withoutIssuer] : [] + }); + } + for (const o of t) { + if (o.kind === "timestamp") continue; + const l = a(o.signature.revisionIndex), m = []; + for (const w of o.tokens) + m.push( + await q( + w, + e, + l ? _(l.genTime) : j, + n, + o.internal?.certificates + ) + ); + const f = Ut(m), d = (f ?? m[0])?.verdict ?? null, h = f ? se(f) : null, g = r ? h && l ? h.genTime <= l.genTime ? h : l : h ?? l : null, p = r ? g ? _(g.genTime) : j : ut(s), y = o.internal ? await ue(o.internal, e, p, n.certificates) : { + status: "unknown", + reason: void 0, + path: void 0, + withoutIssuer: void 0 + }, S = y.status === "trusted" && y.path ? Ae(await B(n, y.path, N(p)), Te(p)) : { status: "unknown", reason: Pt }; + c.set(o, { + trust: y.status, + trustReason: y.reason, + validationTime: p, + path: y.status === "trusted" ? y.path ?? null : null, + revocation: S.status, + revocationReason: S.reason ?? void 0, + timestamp: d, + reliesOn: g, + withoutTime: "no-timestamp", + timestampPath: (f ?? m[0])?.path ?? null, + withoutIssuer: [ + ...y.withoutIssuer ? [y.withoutIssuer] : [], + ...m.flatMap((w) => w.withoutIssuer ? [w.withoutIssuer] : []) + ] + }); + } + return { judgements: c, documentTimestamps: i }; +} +const Pt = "the signer is not trusted, so there is no issuer to check an answer against"; +function Ce(t, e, n, s, r) { + return { + kind: t.kind, + revisionIndex: t.signature.revisionIndex, + subject: t.cms ? M(t.cms.signerCertificate) : null, + reliesOn: e.reliesOn, + withoutTime: e.withoutTime, + signer: { trusted: e.trust === "trusted", path: e.path }, + documentTimestamps: n, + pool: s, + answersFrom: r + }; +} +function Te(t) { + return t.kind === "now" ? "now" : t.stampedAt; +} +function se(t) { + const { verdict: e, path: n } = t; + return e.summary !== "valid" || !n ? null : { genTime: e.stampedAt, path: n, authorityCertificate: e.authorityCertificate }; +} +async function Se(t, e, n, s) { + const r = { + signature: n, + kind: n.kind, + integrity: "indeterminate", + cryptography: "unsupported", + internal: null, + cms: null, + tokens: [], + token: null + }; + if (!e.chainValid || n.coverage === "malformed") + return r.integrity = e.chainValid ? "invalid" : "indeterminate", r; + const i = n.kind === "timestamp" ? await Nt(t, n, r) : await Vt(t, n, r); + i.internal && s.addCarried(i.internal.certificates, i.internal.revocation); + for (const a of [...i.tokens, ...i.token ? [i.token] : []]) + a.token && s.addCarried(a.token.certificates, a.token.revocation); + return i; +} +async function Vt(t, e, n) { + let s; + try { + const i = await t.signatures.getContents(e.field); + s = H(i), n.cms = s.parsed; + const a = await t.signatures.getDigest(e.field, s.digestAlgorithm), c = T(a, s.messageDigest); + n.integrity = e.coverage === "whole-revision" && c ? "valid" : "invalid"; + } catch (i) { + return n.integrity = i instanceof P && i.reason === "unsupported" ? "indeterminate" : "invalid", i instanceof P || (n.integrity = "indeterminate"), n; + } + n.internal = s, n.cryptography = await re(s); + const r = W(s.signerInfo); + for (const i of s.timestampTokens) + n.tokens.push( + await D({ + token: i, + stamped: { kind: "bytes", bytes: r }, + certificates: s.certificates + }) + ); + return n; +} +async function Nt(t, e, n) { + let s; + try { + s = await t.signatures.getContents(e.field); + } catch { + return n; + } + const r = await D({ + token: s, + stamped: { + kind: "digest-with", + digest: (a) => t.signatures.getDigest(e.field, a) + } + }).catch(() => null); + if (!r || (n.token = r, n.cms = r.token?.parsed ?? null, r.problem === "unreadable")) return n; + const i = r.problem !== "imprint"; + return n.integrity = e.coverage === "whole-revision" && i ? "valid" : "invalid", n.cryptography = i ? r.verdict : (await D({ + token: s, + stamped: { + kind: "digest", + digest: r.info.imprint, + algorithm: r.info.imprintAlgorithm + } + })).verdict, n; +} +async function q(t, e, n, s, r = []) { + const i = t.info ? t.info.genTime.toISOString() : null, a = t.token ? t.token.parsed.signerCertificate : null; + let c = "unknown", u = t.detail, o = null, l = null; + if (t.token && t.info) { + const h = await de({ + token: t.token, + certificates: [...r, ...s.certificates], + trust: e, + at: n, + genTime: t.info.genTime + }); + c = h.status, u = h.reason ?? null, o = h.status === "trusted" ? h.path ?? null : null, l = h.withoutIssuer ?? null; + } + const m = o ? Ae(await B(s, o, N(n)), Te(n)) : { + status: "unknown", + reason: "the authority is not trusted, so there is no issuer to check an answer against" + }, f = { + cryptography: t.verdict, + trust: c, + trustReason: u, + validationTime: n, + revocation: m.status, + revocationReason: m.reason, + authorityName: a ? M(a) : null + }, d = c === "trusted" && m.status === "revoked"; + return t.verdict === "valid" && !d && i !== null && a !== null ? { + verdict: { + ...f, + summary: c === "trusted" ? "valid" : "valid-untrusted", + stampedAt: i, + authorityCertificate: a + }, + path: o, + withoutIssuer: l + } : { + verdict: { + ...f, + summary: t.verdict === "invalid" || d ? "invalid" : "indeterminate", + stampedAt: i, + authorityCertificate: a + }, + path: o, + withoutIssuer: l + }; +} +function _(t) { + return { kind: "timestamp", stampedAt: t, genTime: t, tokenVerified: !0 }; +} +function Ut(t) { + let e = null; + for (const n of t) + n.verdict.summary === "valid" && (!e || n.verdict.stampedAt < e.verdict.stampedAt) && (e = n); + return e; +} +async function Mt(t) { + return (await Ie(t)).verdict; +} +async function Ie(t) { + const e = t.revisionIndex === null ? [] : t.documentTimestamps.filter((f) => f.revisionIndex > t.revisionIndex), n = (f) => f.reduce( + (d, h) => !d || h.genTime > d.genTime ? h : d, + null + ), s = n(e)?.genTime ?? null, r = (f, d, h = []) => ({ + verdict: { + enabled: !1, + provenAt: f, + expiresAt: null, + documentTimestampedAt: s, + missing: d.map(({ certificate: g, reason: p }) => ({ certificate: g, reason: p })) + }, + rows: h, + gaps: d + }), i = t.reliesOn; + if (!i) + return r(null, [{ certificate: t.subject, reason: t.withoutTime, der: null }]); + if (t.kind === "signature" && (!t.signer.trusted || !t.signer.path)) + return r(i.genTime, [ + { certificate: t.subject, reason: "untrusted", der: null } + ]); + const a = new Date(i.genTime), c = [ + ...t.kind === "signature" ? await B(t.pool, t.signer.path, a, t.answersFrom) : [], + ...await B(t.pool, i.path, a, t.answersFrom) + ], u = /* @__PURE__ */ new Set(), o = c.filter((f) => { + const d = R(f.certificate); + return u.has(d) ? !1 : (u.add(d), !0); + }), l = o.filter((f) => f.status !== "good").map((f) => ({ + certificate: f.name, + reason: f.status === "revoked" ? "revoked" : "no-answer", + der: f.certificate + })); + if (l.length > 0) return r(i.genTime, l, o); + const m = n([i, ...e]); + return { + verdict: { + enabled: !0, + provenAt: i.genTime, + expiresAt: E(m.authorityCertificate).notAfter.value.toISOString(), + documentTimestampedAt: s, + missing: [] + }, + rows: o, + gaps: [] + }; +} +async function Ft(t, e) { + $(); + const n = new Ge(); + return await n.createForCertificate(t, { + hashAlgorithm: "SHA-1", + issuerCertificate: e + }), new Uint8Array(n.toSchema(!0).toBER(!1)); +} +const Re = 1024 * 1024, jt = 8; +async function xe(t) { + const { readings: e, trust: n, pool: s, source: r, maxCrlBytes: i } = t, a = /* @__PURE__ */ new Map(); + if (!n) return a; + const c = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), o = async (f, d) => { + try { + return await r.fetch(f); + } catch (h) { + const g = k.is(h, b.Network); + return d({ + detail: h.message, + // No answer came. Whoever reports it needs the address that was asked. + network: g ? new k(b.Network, h.message, { + details: { ...h.details, source: f.url }, + cause: h + }) : k.is(h) ? null : new k( + b.Network, + `${f.url} did not answer: ${h.message}`, + { details: { source: f.url }, cause: h } + ) + }), null; + } + }, l = async (f) => { + const d = R(f.certificate); + if (c.has(d)) return !1; + if (c.add(d), !r) + return a.set(d, { detail: "no `revocation` source was given to ask with", network: null }), !1; + const h = E(f.certificate), g = E(f.issuer), p = ee(h); + let y = null; + const S = (A) => { + y?.network || (y = A); + }, w = []; + for (const A of p.ocsp) + w.push({ kind: "ocsp", url: A, body: await Ft(h, g) }); + for (const A of p.crl) w.push({ kind: "crl", url: A }); + if (w.length === 0) + return a.set(d, { detail: "the certificate names no address to ask at", network: null }), !1; + for (const A of w) { + const I = await o(A, S); + if (!I) continue; + if (A.kind === "crl" && I.byteLength > i) { + S({ + detail: `the list at ${A.url} is ${I.byteLength} bytes, over maxCrlBytes (${i})`, + network: null + }); + continue; + } + const G = A.kind === "ocsp" ? "ocsp" : "crl", X = await ve({ answer: { kind: G, der: I }, certificate: h, issuer: g }); + if (X.says === "nothing") { + S({ + detail: `the answer from ${A.url} says nothing: ${X.detail}`, + network: null + }); + continue; + } + return s.addAnswer(G, I, !1), a.delete(d), !0; + } + return y && a.set(d, y), !1; + }, m = async (f) => { + const d = R(f); + if (u.has(d) || !r) return !1; + u.add(d); + const h = s.certificates.length; + for (const g of ee(E(f)).issuer) { + const p = await o({ kind: "issuer", url: g }, () => { + }); + if (p) { + for (const y of zt(p)) s.addCertificate(y, !1); + if (s.certificates.length > h) return !0; + } + } + return !1; + }; + for (let f = 0; f < jt; f++) { + let d = !1; + for (const h of t.times) { + const g = await z(e, n, s, h); + for (const p of e) { + if (t.wanted && !t.wanted(p)) continue; + const y = g.judgements.get(p); + for (const w of y.withoutIssuer) + await m(w) && (d = !0); + const S = await Lt( + p, + y, + s, + h.kind === "earliest-timestamp" + ); + for (const w of S) + w.status === "unknown" && await l(w) && (d = !0); + } + } + if (!d) break; + } + return a; +} +async function Lt(t, e, n, s) { + const r = []; + if (e.path && r.push(...await B(n, e.path, N(e.validationTime))), t.kind === "signature" && e.timestampPath && e.timestamp && r.push( + ...await B( + n, + e.timestampPath, + N(e.timestamp.validationTime) + ) + ), s && e.reliesOn) { + const i = e.reliesOn; + r.push(...await B(n, i.path, new Date(i.genTime))); + } + return r; +} +function zt(t) { + try { + return [E(t)]; + } catch { + } + try { + const e = L(x(t)); + if (e.offset === -1) return []; + const n = new Xe({ schema: e.result }); + return (new Ye({ schema: n.content }).certificates ?? []).filter( + (r) => r instanceof ae + ); + } catch { + return []; + } +} +async function _t(t, e = {}) { + if (!t.signatures) throw new Error("this engine does not implement signatures"); + const n = await t.signatures.list(), s = e.trust ?? null, r = await be(t), i = []; + for (const l of n.signatures) + l.signed && i.push(await Se(t, n, l, r)); + const a = e.validationTime ?? V; + e.revocation && s && await xe({ + readings: i, + trust: s, + pool: r, + source: e.revocation, + maxCrlBytes: Re, + times: a.kind === "earliest-timestamp" ? [V] : [V, a] + }); + const c = await z(i, s, r, V), u = a.kind === "earliest-timestamp" ? c : await z(i, s, r, a), o = []; + for (const l of i) { + const m = u.judgements.get(l), f = c.judgements.get(l), d = await Kt( + t, + n, + l.signature, + e.until ?? "persisted" + ), h = m.trust === "trusted" && m.revocation === "revoked"; + let g; + l.integrity === "invalid" || l.cryptography === "invalid" || d.verdict === "forbidden" ? g = "invalid" : l.integrity === "indeterminate" || l.cryptography === "unsupported" || d.verdict === "indeterminate" ? g = "indeterminate" : h ? g = "invalid" : g = m.trust === "trusted" ? "valid" : "valid-untrusted", o.push({ + signature: l.signature, + integrity: l.integrity, + cryptography: l.cryptography, + trust: m.trust, + trustReason: m.trustReason, + validationTime: m.validationTime, + revocation: m.revocation, + ...m.revocationReason ? { revocationReason: m.revocationReason } : {}, + modifications: d, + summary: g, + cms: l.cms, + timestamp: m.timestamp, + longTerm: await Mt( + // What the file holds: an answer that was only asked for is not in it. + Ce(l, f, c.documentTimestamps, r, "file") + ) + }); + } + return o; +} +async function rn(t) { + const e = await D({ + token: t.token, + stamped: { kind: "digest", digest: t.digest, algorithm: t.algorithm } + }), n = new ke(); + return e.token && n.addCarried(e.token.certificates, e.token.revocation), (await q(e, t.trust ?? null, j, n)).verdict; +} +async function Kt(t, e, n, s) { + if (n.revisionIndex === null) + return { + verdict: "indeterminate", + detail: "the signature seals no whole revision", + basis: "persisted" + }; + if (s === "persisted" && n.revisionIndex === e.revisions.length - 1) + return { verdict: "unchanged", basis: "persisted" }; + try { + const r = await t.signatures.analyze({ + since: { signatureIndex: n.index }, + until: s + }), i = r.current.primary, a = i && i.verdict === "forbidden" ? `object ${i.objectNumber}, ${i.rule}${i.detail ? `: ${i.detail}` : ""}` : i && i.verdict === "incomplete" ? `object ${i.objectNumber}: ${i.detail ?? "incomplete evidence"}` : void 0; + return { + verdict: r.current.verdict, + detail: a, + basis: r.basis.source, + ...r.later.revisionCount > 0 ? { laterRevisions: r.later.revisionCount } : {}, + ...r.later.undoneObjectNumbers.length > 0 ? { undone: !0 } : {} + }; + } catch (r) { + return { + verdict: "indeterminate", + detail: `analysis failed: ${r.message}`, + basis: "persisted" + }; + } +} +const qt = { "P-256": 32, "P-384": 48, "P-521": 66 }; +function an(t, e) { + const n = qt[e], s = (a) => new k(b.InvalidArg, `not a DER ECDSA signature: ${a}`, { + details: { field: "der" } + }); + let r; + try { + const a = Qe(t, 0, t.byteLength); + if (a.tag !== 48) throw s("it is not a sequence"); + r = Ze(t, a); + } catch (a) { + throw a instanceof P ? s("it does not parse") : a; + } + if (r.length !== 2 || r.some((a) => a.tag !== 2)) + throw s("it does not hold two integers"); + const i = new Uint8Array(n * 2); + return r.forEach((a, c) => { + let u = a.contentStart; + for (; u < a.contentEnd - 1 && t[u] === 0; ) u++; + const o = a.contentEnd - u; + if (o > n) throw s(`a number is ${o} bytes, ${e} takes ${n}`); + i.set(t.subarray(u, a.contentEnd), (c + 1) * n - o); + }), i; +} +async function on(t, e) { + if (!t.signatures) throw new Error("this engine does not implement signatures"); + if (!e?.trust) + throw new k( + b.InvalidArg, + "addValidationInfo() needs `trust`: the answers kept are the ones for paths you trust", + { details: { field: "trust" } } + ); + const { trust: n } = e; + await t.signatures.addValidationInfo({}); + const s = await t.signatures.list(), r = await be(t), i = []; + for (const d of s.signatures) + d.signed && i.push(await Se(t, s, d, r)); + const a = Ht(i, e.fields); + for (const d of e.known?.certificates ?? []) r.addCertificate(d, !1); + for (const d of e.known?.ocspResponses ?? []) r.addAnswer("ocsp", d, !1); + for (const d of e.known?.crls ?? []) r.addAnswer("crl", d, !1); + const c = await xe({ + readings: i, + wanted: (d) => a.has(d), + trust: n, + pool: r, + source: e.revocation ?? null, + maxCrlBytes: e.maxCrlBytes ?? Re, + times: [V] + }), u = await z(i, n, r, V), o = { + certificates: /* @__PURE__ */ new Map(), + ocspResponses: /* @__PURE__ */ new Map(), + crls: /* @__PURE__ */ new Map() + }, l = (d, h) => d.set(R(h), h); + for (const d of i) { + if (!a.has(d)) continue; + const h = u.judgements.get(d), g = await Ie( + // With what is about to be stored: what a reader will find afterwards. + Ce(d, h, u.documentTimestamps, r, "anywhere") + ); + if (!g.verdict.enabled && !e.partial) + throw Wt(d, g, c); + for (const p of [h.path, h.reliesOn?.path]) + for (const y of p ?? []) l(o.certificates, y); + for (const p of g.rows) + p.evidence && !p.evidence.inFile && l(p.evidence.kind === "ocsp" ? o.ocspResponses : o.crls, p.evidence.der), p.answer && p.answer.says !== "nothing" && p.answer.responder && l(o.certificates, p.answer.responder); + } + let m = { certificates: 0, ocspResponses: 0, crls: 0 }; + o.certificates.size + o.ocspResponses.size + o.crls.size > 0 && (m = (await t.signatures.addValidationInfo({ + certificates: [...o.certificates.values()], + ocspResponses: [...o.ocspResponses.values()], + crls: [...o.crls.values()] + })).added); + const f = await _t(t, { trust: n }); + if (!e.partial) + for (const d of i) { + if (!a.has(d)) continue; + const h = f.find((g) => g.signature.index === d.signature.index); + if (!h?.longTerm.enabled) + throw new k( + b.Unknown, + `the validation data was stored, and the signature in "${d.signature.fieldName}" still does not read as complete`, + { details: { field: d.signature.fieldName, missing: h?.longTerm.missing } } + ); + } + return { added: m, verdicts: f }; +} +function Ht(t, e) { + if (!e) return new Set(t); + const n = /* @__PURE__ */ new Set(); + for (const s of e) { + const r = t.find( + ({ signature: i }) => s.kind === "fqn" ? i.fieldName === s.name : i.field.kind === "objectNumber" && i.field.objectNumber === s.objectNumber + ); + if (!r) + throw new k( + b.NotFound, + `no signature in field ${s.kind === "fqn" ? `"${s.name}"` : `object ${s.objectNumber}`}`, + { details: { field: "fields" } } + ); + n.add(r); + } + return n; +} +function Wt(t, e, n) { + const s = e.gaps[0], r = t.signature.fieldName, i = s.der ? n.get(R(s.der)) : void 0; + if (s.reason === "no-answer" && i?.network) return i.network; + const a = s.certificate ? `"${s.certificate}"` : "a certificate", c = { + "no-timestamp": `the signature in "${r}" has no timestamp you trust, so no time is proven to judge its certificates at`, + untrusted: `${a} does not lead to a certificate in \`trust\``, + revoked: `${a} was withdrawn by the time of the signature's timestamp`, + "no-answer": `no answer that checks out says ${a} was good at the signature's timestamp${i ? `: ${i.detail}` : ""}` + }; + return new k( + b.SignatureRefused, + `validation data not added: ${c[s.reason]}`, + { details: { reason: s.reason, certificate: s.certificate, field: r } } + ); +} +export { + P as CmsError, + on as addValidationInfo, + pt as attachSignatureTimestamp, + Ne as buildDetachedCms, + M as certificateCommonName, + sn as completeSignature, + fn as createTestCertificateAuthority, + mn as createTestSigner, + hn as createTestTimestampAuthority, + an as ecdsaRawFromDer, + gn as generateSigningKeyPair, + pn as httpRevocationSource, + wn as httpTimestampAuthority, + vn as indexedDbKeyStore, + yn as memoryKeyStore, + dn as parseDetachedCms, + kn as personalSigner, + he as profileFor, + bn as remoteSigner, + Tn as selfSignedCertificate, + nn as sign, + tn as validateChain, + _t as validateSignatures, + re as verifyCmsSignature, + ot as verifyForCompletion, + rn as verifyTimestampToken, + An as webCryptoSigner +}; +//# sourceMappingURL=index-Cp6ojw-X.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/inline-transport-GZ5fBXix.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/inline-transport-DLWGAv7G.js similarity index 99% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/inline-transport-GZ5fBXix.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/inline-transport-DLWGAv7G.js index e357e23a..aa1a77c3 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/inline-transport-GZ5fBXix.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/inline-transport-DLWGAv7G.js @@ -20,7 +20,7 @@ var oA = (po = { "../runtime/npm/wasm32/lib/embedpdf.browser.js"() { var n, r, i, o, a, s, l, u, d, f, h, p, F, b, D, A, O, G, N, E, w = new Promise((m, g) => { n = m, r = g; }); - ["_EPDF_CheckPasswordPermissions", "_EPDF_DigestBuffer", "_EPDF_FreeBuffer", "_EPDF_GetDecodedImageBytes", "_EPDF_GetMetaKeyCount", "_EPDF_GetMetaKeyName", "_EPDF_GetMetaTrapped", "_EPDF_GetPageBoxByIndex", "_EPDF_GetPageRotateByIndex", "_EPDF_GetPageTabOrderByIndex", "_EPDF_GetPageUserUnitByIndex", "_EPDF_HasMetaText", "_EPDF_InitThread", "_EPDF_IsEncrypted", "_EPDF_IsOwnerUnlocked", "_EPDF_LoadBaseDocument", "_EPDF_LoadMemBaseDocument", "_EPDF_LoadMemBaseDocument64", "_EPDF_LoadPageNormalized", "_EPDF_PNG_EncodeRGBA", "_EPDF_ReleaseBaseDocument", "_EPDF_RemoveEncryption", "_EPDF_RenderAnnotBitmap", "_EPDF_RenderAnnotBitmapUnrotated", "_EPDF_RenderPage_Continue", "_EPDF_RenderPageBitmapWithMatrix_Start", "_EPDF_SaveAsCopyEx", "_EPDF_SaveDocumentToOwnedBuffer", "_EPDF_SaveDocumentToOwnedBufferEx", "_EPDF_SaveDocumentToOwnedBufferWithVersion", "_EPDF_SetBaseDocumentSha256", "_EPDF_SetDecodedImageBudget", "_EPDF_SetEncryption", "_EPDF_SetMetaText", "_EPDF_SetMetaTrapped", "_EPDF_SetRuntimeOwnerPermissions", "_EPDF_ShutdownThread", "_EPDF_UnlockOwnerPermissions", "_EPDFAction_CloseModel", "_EPDFAction_CreateGoTo", "_EPDFAction_CreateGoToNamed", "_EPDFAction_CreateHide", "_EPDFAction_CreateJavaScript", "_EPDFAction_CreateLaunch", "_EPDFAction_CreateNamed", "_EPDFAction_CreateRemoteGoToByName", "_EPDFAction_CreateRemoteGoToDest", "_EPDFAction_CreateResetForm", "_EPDFAction_CreateSubmitForm", "_EPDFAction_CreateURI", "_EPDFAction_GetNextAt", "_EPDFAction_GetNextCount", "_EPDFAction_GetNodeCount", "_EPDFAction_GetNodeDest", "_EPDFAction_GetNodeFilePath", "_EPDFAction_GetNodeHideFlag", "_EPDFAction_GetNodeJavaScript", "_EPDFAction_GetNodeName", "_EPDFAction_GetNodeResetForm", "_EPDFAction_GetNodeSubmitForm", "_EPDFAction_GetNodeSubmitFormCharSet", "_EPDFAction_GetNodeSubmitFormURL", "_EPDFAction_GetNodeSubtype", "_EPDFAction_GetNodeTargetCount", "_EPDFAction_GetNodeTargetName", "_EPDFAction_GetNodeTargetObjectNumber", "_EPDFAction_GetNodeType", "_EPDFAction_GetNodeURI", "_EPDFAction_GetNodeURIIsMap", "_EPDFAction_GetRootNode", "_EPDFAction_GetWarningFlags", "_EPDFAction_IsComplete", "_EPDFAction_LoadModel", "_EPDFAction_NodeHasJavaScript", "_EPDFAction_SetNext", "_EPDFAnnot_AddMeasure", "_EPDFAnnot_ClearBorderEffect", "_EPDFAnnot_ClearColor", "_EPDFAnnot_ClearEmbedMetadata", "_EPDFAnnot_ClearEmbedMetadataKey", "_EPDFAnnot_ClearMKColor", "_EPDFAnnot_ClearMKIcon", "_EPDFAnnot_ClearRectangleDifferences", "_EPDFAnnot_ExportAppearance", "_EPDFAnnot_GenerateAppearance", "_EPDFAnnot_GenerateAppearanceWithBlend", "_EPDFAnnot_GenerateFormFieldAP", "_EPDFAnnot_GetActionModel", "_EPDFAnnot_GetAPMatrix", "_EPDFAnnot_GetAppearanceState", "_EPDFAnnot_GetAppearanceStateCount", "_EPDFAnnot_GetAppearanceStateName", "_EPDFAnnot_GetAppearanceTransform", "_EPDFAnnot_GetAvailableAppearanceModes", "_EPDFAnnot_GetBlendMode", "_EPDFAnnot_GetBooleanValue", "_EPDFAnnot_GetBorderDashPattern", "_EPDFAnnot_GetBorderDashPatternCount", "_EPDFAnnot_GetBorderEffect", "_EPDFAnnot_GetBorderStyle", "_EPDFAnnot_GetCalloutLine", "_EPDFAnnot_GetCalloutLineCount", "_EPDFAnnot_GetColor", "_EPDFAnnot_GetDefaultAppearance", "_EPDFAnnot_GetDefaultAppearanceFontFace", "_EPDFAnnot_GetDefaultAppearanceFontPostScriptName", "_EPDFAnnot_GetDrawing", "_EPDFAnnot_GetDrawingRect", "_EPDFAnnot_GetEmbedMetadataBoolean", "_EPDFAnnot_GetEmbedMetadataJSON", "_EPDFAnnot_GetEmbedMetadataNumber", "_EPDFAnnot_GetEmbedMetadataRect", "_EPDFAnnot_GetEmbedMetadataString", "_EPDFAnnot_GetFileAttachmentForWrite", "_EPDFAnnot_GetIntent", "_EPDFAnnot_GetLineCaption", "_EPDFAnnot_GetLineEndings", "_EPDFAnnot_GetLineLeader", "_EPDFAnnot_GetMeasure", "_EPDFAnnot_GetMKColor", "_EPDFAnnot_GetMKIcon", "_EPDFAnnot_GetMKRotation", "_EPDFAnnot_GetMKText", "_EPDFAnnot_GetMKTextPosition", "_EPDFAnnot_GetName", "_EPDFAnnot_GetObjectNumber", "_EPDFAnnot_GetOpacity", "_EPDFAnnot_GetOverlayText", "_EPDFAnnot_GetOverlayTextRepeat", "_EPDFAnnot_GetRect", "_EPDFAnnot_GetRectangleDifferences", "_EPDFAnnot_GetReplyType", "_EPDFAnnot_GetRichContent", "_EPDFAnnot_GetRichTextJSON", "_EPDFAnnot_GetRotate", "_EPDFAnnot_GetShapeCaption", "_EPDFAnnot_GetStructurePosition", "_EPDFAnnot_GetTextAlignment", "_EPDFAnnot_HasAppearanceStream", "_EPDFAnnot_HasEmbedMetadata", "_EPDFAnnot_HasMKIcon", "_EPDFAnnot_IsValid", "_EPDFAnnot_RemoveAction", "_EPDFAnnot_RemoveDest", "_EPDFAnnot_RemoveKey", "_EPDFAnnot_RemoveMeasure", "_EPDFAnnot_SetAction", "_EPDFAnnot_SetAPMatrix", "_EPDFAnnot_SetAppearanceFromPage", "_EPDFAnnot_SetBooleanValue", "_EPDFAnnot_SetBorderDashPattern", "_EPDFAnnot_SetBorderEffect", "_EPDFAnnot_SetBorderStyle", "_EPDFAnnot_SetCalloutLine", "_EPDFAnnot_SetColor", "_EPDFAnnot_SetDefaultAppearance", "_EPDFAnnot_SetDefaultAppearanceDocumentFont", "_EPDFAnnot_SetDefaultAppearanceRegisteredFont", "_EPDFAnnot_SetDrawing", "_EPDFAnnot_SetEmbedMetadataBoolean", "_EPDFAnnot_SetEmbedMetadataJSON", "_EPDFAnnot_SetEmbedMetadataNumber", "_EPDFAnnot_SetEmbedMetadataRect", "_EPDFAnnot_SetEmbedMetadataString", "_EPDFAnnot_SetEventAction", "_EPDFAnnot_SetIntent", "_EPDFAnnot_SetLine", "_EPDFAnnot_SetLineCaption", "_EPDFAnnot_SetLineEndings", "_EPDFAnnot_SetLineLeader", "_EPDFAnnot_SetLinkedAnnot", "_EPDFAnnot_SetMKColor", "_EPDFAnnot_SetMKIcon", "_EPDFAnnot_SetMKRotation", "_EPDFAnnot_SetMKText", "_EPDFAnnot_SetMKTextPosition", "_EPDFAnnot_SetName", "_EPDFAnnot_SetNoColor", "_EPDFAnnot_SetNumberValue", "_EPDFAnnot_SetOpacity", "_EPDFAnnot_SetOverlayText", "_EPDFAnnot_SetOverlayTextRepeat", "_EPDFAnnot_SetRect", "_EPDFAnnot_SetReplyType", "_EPDFAnnot_SetRichTextJSON", "_EPDFAnnot_SetRichTextXHTML", "_EPDFAnnot_SetRotate", "_EPDFAnnot_SetShapeCaption", "_EPDFAnnot_SetStampOpacity", "_EPDFAnnot_SetSubtype", "_EPDFAnnot_SetTextAlignment", "_EPDFAnnot_SetVertices", "_EPDFAnnot_UpdateAppearanceToRect", "_EPDFAttachment_ExportCanonicalToOwnedBuffer", "_EPDFAttachment_ExportRawToOwnedBuffer", "_EPDFAttachment_ExtractFile", "_EPDFAttachment_ExtractFileToOwnedBuffer", "_EPDFAttachment_GetDescription", "_EPDFAttachment_GetIntegerValue", "_EPDFAttachment_ImportRaw", "_EPDFAttachment_SetDescription", "_EPDFAttachment_SetName", "_EPDFAttachment_SetSubtype", "_EPDFCatalog_GetLanguage", "_EPDFCatalog_GetMetadata", "_EPDFCatalog_SetMetadata", "_EPDFDest_CreateRemoteView", "_EPDFDest_CreateRemoteXYZ", "_EPDFDest_CreateView", "_EPDFDest_CreateViewByObjectNumber", "_EPDFDest_CreateXYZ", "_EPDFDest_CreateXYZByObjectNumber", "_EPDFDest_GetPageObjectNumber", "_EPDFDest_GetViewNullParams", "_EPDFDoc_CanonicalDrawing", "_EPDFDoc_ClearMissingCharacters", "_EPDFDoc_ClearPagePieceInfoEntry", "_EPDFDoc_ClearPagePieceInfoKey", "_EPDFDoc_ClearPieceInfoEntry", "_EPDFDoc_ClearPieceInfoKey", "_EPDFDoc_CompareRevisions", "_EPDFDoc_CountMissingCharacters", "_EPDFDoc_DeletePageByObjectNumber", "_EPDFDoc_ExportDictCanonicalToOwnedBuffer", "_EPDFDoc_ExportDictRawToOwnedBuffer", "_EPDFDoc_ExportDrawing", "_EPDFDoc_ExportPagesFlattened", "_EPDFDoc_GetAdditionalActionModel", "_EPDFDoc_GetAttachmentIndexByKey", "_EPDFDoc_GetAttachmentKey", "_EPDFDoc_GetBaseBytesSize", "_EPDFDoc_GetDrawings", "_EPDFDoc_GetFontDisplayProgramCoverage", "_EPDFDoc_GetFontDisplayProgramData", "_EPDFDoc_GetFontEmbeddingPolicy", "_EPDFDoc_GetFontProgramData", "_EPDFDoc_GetFontsFingerprint", "_EPDFDoc_GetImportFieldRoots", "_EPDFDoc_GetLastModified", "_EPDFDoc_GetLoadedBytesSize", "_EPDFDoc_GetLoadedObjectValue", "_EPDFDoc_GetMissingCharacter", "_EPDFDoc_GetNamedJavaScriptActionModel", "_EPDFDoc_GetNamedPageAt", "_EPDFDoc_GetNamedPageCount", "_EPDFDoc_GetOpenActionDest", "_EPDFDoc_GetOpenActionModel", "_EPDFDoc_GetPageActionModel", "_EPDFDoc_GetPageLabelSectionAt", "_EPDFDoc_GetPageLabelSectionCount", "_EPDFDoc_GetPageLastModified", "_EPDFDoc_GetPageObjectNumberByIndex", "_EPDFDoc_GetPagePieceInfoBoolean", "_EPDFDoc_GetPagePieceInfoEntryAt", "_EPDFDoc_GetPagePieceInfoEntryCount", "_EPDFDoc_GetPagePieceInfoKeyAt", "_EPDFDoc_GetPagePieceInfoKeyCount", "_EPDFDoc_GetPagePieceInfoLastModified", "_EPDFDoc_GetPagePieceInfoName", "_EPDFDoc_GetPagePieceInfoNumber", "_EPDFDoc_GetPagePieceInfoString", "_EPDFDoc_GetPagePieceInfoStringArrayAt", "_EPDFDoc_GetPagePieceInfoStringArrayCount", "_EPDFDoc_GetPagePieceInfoValueType", "_EPDFDoc_GetPieceInfoBoolean", "_EPDFDoc_GetPieceInfoEntryAt", "_EPDFDoc_GetPieceInfoEntryCount", "_EPDFDoc_GetPieceInfoKeyAt", "_EPDFDoc_GetPieceInfoKeyCount", "_EPDFDoc_GetPieceInfoLastModified", "_EPDFDoc_GetPieceInfoName", "_EPDFDoc_GetPieceInfoNumber", "_EPDFDoc_GetPieceInfoString", "_EPDFDoc_GetPieceInfoStringArrayAt", "_EPDFDoc_GetPieceInfoStringArrayCount", "_EPDFDoc_GetPieceInfoValueType", "_EPDFDoc_GetRevision", "_EPDFDoc_GetRevisionCount", "_EPDFDoc_GetStructureObjectNumbers", "_EPDFDoc_GetTypographicFeatures", "_EPDFDoc_HasPagePieceInfoEntry", "_EPDFDoc_HasPieceInfoEntry", "_EPDFDoc_ImportDictRaw", "_EPDFDoc_ImportDrawing", "_EPDFDoc_ImportPages", "_EPDFDoc_LoadPageByObjectNumber", "_EPDFDoc_LoadPageByObjectNumberNormalized", "_EPDFDoc_OpenBaseOverlay", "_EPDFDoc_OpenBaseOverlayFromPath", "_EPDFDoc_OpenRevision", "_EPDFDoc_ReadLoadedBytes", "_EPDFDoc_RemoveNamedPage", "_EPDFDoc_RemoveNamedPagesForPage", "_EPDFDoc_ResolveFonts", "_EPDFDoc_SetFontEmbeddingPolicy", "_EPDFDoc_SetNamedPage", "_EPDFDoc_SetPageLabelSections", "_EPDFDoc_SetPagePieceInfoBoolean", "_EPDFDoc_SetPagePieceInfoName", "_EPDFDoc_SetPagePieceInfoNumber", "_EPDFDoc_SetPagePieceInfoString", "_EPDFDoc_SetPagePieceInfoStringArray", "_EPDFDoc_SetPageRotationByObjectNumber", "_EPDFDoc_SetPieceInfoBoolean", "_EPDFDoc_SetPieceInfoName", "_EPDFDoc_SetPieceInfoNumber", "_EPDFDoc_SetPieceInfoString", "_EPDFDoc_SetPieceInfoStringArray", "_EPDFDoc_SetTypographicFeatures", "_EPDFDoc_StartLoadPageByObjectNumber", "_EPDFDocument_ClearEmbedMetadata", "_EPDFDss_Add", "_EPDFDss_GetCount", "_EPDFDss_GetData", "_EPDFFont_AddFallbackFont", "_EPDFFont_AuthorizeEditing", "_EPDFFont_ClearFallbackFonts", "_EPDFFont_ClearRegisteredFonts", "_EPDFFont_GetCoverage", "_EPDFFont_GetEmbeddingPermission", "_EPDFFont_GetFallbackOrder", "_EPDFFont_GetFamilyName", "_EPDFFont_GetLastResortFont", "_EPDFFont_GetMetrics", "_EPDFFont_GetPostScriptName", "_EPDFFont_GetProgramData", "_EPDFFont_GetProgramFormat", "_EPDFFont_GetProgramHash", "_EPDFFont_GetWeight", "_EPDFFont_IsEditingAuthorized", "_EPDFFont_IsInstanced", "_EPDFFont_IsItalic", "_EPDFFont_RegisterFont", "_EPDFFont_RegisterMemFont", "_EPDFFont_RegisterMemFont64", "_EPDFFont_SetLastResortFont", "_EPDFFontFaces_Close", "_EPDFFontFaces_Count", "_EPDFFontFaces_CountPrograms", "_EPDFFontFaces_GetFamily", "_EPDFFontFaces_GetProgramDisplayHash", "_EPDFFontFaces_GetProgramEmbedded", "_EPDFFontFaces_GetProgramEmbeddingPermission", "_EPDFFontFaces_GetProgramFormat", "_EPDFFontFaces_GetProgramHash", "_EPDFFontFaces_GetProgramMetrics", "_EPDFFontFaces_GetProgramObjNum", "_EPDFFontFaces_GetProgramPostScriptName", "_EPDFFontFaces_GetWeight", "_EPDFFontFaces_IsItalic", "_EPDFFontFaces_Load", "_EPDFFontFaces_ProgramMapsUnicode", "_EPDFFontResolution_Close", "_EPDFFontResolution_CountMissingCharacters", "_EPDFFontResolution_GetBaseFontName", "_EPDFFontResolution_GetFallbacks", "_EPDFFontResolution_GetFamily", "_EPDFFontResolution_GetMissingCharacter", "_EPDFFontResolution_GetProgramDisplayHash", "_EPDFFontResolution_GetProgramObjNum", "_EPDFFontResolution_GetRegisteredFont", "_EPDFFontResolution_GetSource", "_EPDFFontResolution_GetWeight", "_EPDFFontResolution_IsDegraded", "_EPDFFontResolution_IsItalic", "_EPDFForm_AttachWidget", "_EPDFForm_ClearFieldEmbedMetadata", "_EPDFForm_ClearFieldEmbedMetadataKey", "_EPDFForm_CloseModel", "_EPDFForm_CountCalculationOrder", "_EPDFForm_CountFieldDefaultValues", "_EPDFForm_CountFieldOptions", "_EPDFForm_CountFields", "_EPDFForm_CountFieldValues", "_EPDFForm_CountFieldWidgets", "_EPDFForm_CreateField", "_EPDFForm_DeleteField", "_EPDFForm_DetachWidget", "_EPDFForm_ExportFDF", "_EPDFForm_ExportFieldRawToOwnedBuffer", "_EPDFForm_ExportXFDF", "_EPDFForm_GetCalculationOrderFieldIndex", "_EPDFForm_GetFieldActionModel", "_EPDFForm_GetFieldAlternateName", "_EPDFForm_GetFieldDefaultValueAt", "_EPDFForm_GetFieldDefaultValueKind", "_EPDFForm_GetFieldEmbedMetadataBoolean", "_EPDFForm_GetFieldEmbedMetadataJSON", "_EPDFForm_GetFieldEmbedMetadataNumber", "_EPDFForm_GetFieldEmbedMetadataString", "_EPDFForm_GetFieldFamily", "_EPDFForm_GetFieldFlags", "_EPDFForm_GetFieldIndexByObjNum", "_EPDFForm_GetFieldIndexForWidget", "_EPDFForm_GetFieldMappingName", "_EPDFForm_GetFieldMaxLen", "_EPDFForm_GetFieldName", "_EPDFForm_GetFieldObjNum", "_EPDFForm_GetFieldOptionLabel", "_EPDFForm_GetFieldOptionValue", "_EPDFForm_GetFieldOrigin", "_EPDFForm_GetFieldPartialName", "_EPDFForm_GetFieldTopIndex", "_EPDFForm_GetFieldValueAt", "_EPDFForm_GetFieldValueKind", "_EPDFForm_GetFieldWidgetExportValue", "_EPDFForm_GetFieldWidgetObjNum", "_EPDFForm_GetFieldWidgetOnState", "_EPDFForm_GetFieldWidgetPageObjNum", "_EPDFForm_GetFieldWidgetRect", "_EPDFForm_GetFormKind", "_EPDFForm_GetNeedAppearances", "_EPDFForm_HasFieldEmbedMetadata", "_EPDFForm_HasFieldValuesList", "_EPDFForm_ImportFieldRaw", "_EPDFForm_IsFieldOptionSelected", "_EPDFForm_IsFieldWidgetChecked", "_EPDFForm_LoadModel", "_EPDFForm_RedrawFieldWidgets", "_EPDFForm_Repair", "_EPDFForm_SetCalculationOrder", "_EPDFForm_SetFieldAlternateName", "_EPDFForm_SetFieldAppearanceText", "_EPDFForm_SetFieldDefaultValue", "_EPDFForm_SetFieldDisplay", "_EPDFForm_SetFieldEmbedMetadataBoolean", "_EPDFForm_SetFieldEmbedMetadataJSON", "_EPDFForm_SetFieldEmbedMetadataNumber", "_EPDFForm_SetFieldEmbedMetadataString", "_EPDFForm_SetFieldEventAction", "_EPDFForm_SetFieldFlags", "_EPDFForm_SetFieldMappingName", "_EPDFForm_SetFieldMaxLen", "_EPDFForm_SetFieldName", "_EPDFForm_SetFieldOptions", "_EPDFForm_SetFieldSelectedIndices", "_EPDFForm_SetFieldValue", "_EPDFForm_SetFieldWidgetsChecked", "_EPDFImageObj_SetJpeg", "_EPDFImageObj_SetPng", "_EPDFLayer_AbortTransaction", "_EPDFLayer_BeginTransaction", "_EPDFLayer_CommitTransaction", "_EPDFLayer_GetBaseDocument", "_EPDFLayer_GetBaseSha256", "_EPDFLayer_GetBirthName", "_EPDFLayer_GetBirthObjectNumber", "_EPDFLayer_GetLastObjectNumber", "_EPDFLayer_GetPromotedObjectCount", "_EPDFLayer_IsInTransaction", "_EPDFLayer_IsObjectPromoted", "_EPDFLayer_IsPagePromoted", "_EPDFLayer_OpenLayer", "_EPDFLayer_OpenLayerArtifact", "_EPDFLayer_OpenLayerArtifactFromPath", "_EPDFLayer_RaiseLastObjectNumber", "_EPDFLayer_SaveDelta", "_EPDFLayer_SaveDeltaEx", "_EPDFLayer_SaveDeltaToOwnedBuffer", "_EPDFLayer_SaveDeltaToOwnedBufferEx", "_EPDFLayer_SaveLayerArtifact", "_EPDFLayer_SaveLayerArtifactEx", "_EPDFLayer_SaveLayerArtifactToOwnedBuffer", "_EPDFLayer_SaveLayerArtifactToOwnedBufferEx", "_EPDFMeasure_AddFormat", "_EPDFMeasure_CountFormats", "_EPDFMeasure_GetCYX", "_EPDFMeasure_GetFormat", "_EPDFMeasure_GetOrigin", "_EPDFMeasure_GetRatio", "_EPDFMeasure_GetSubtype", "_EPDFMeasure_RemoveFormats", "_EPDFMeasure_SetCYX", "_EPDFMeasure_SetOrigin", "_EPDFMeasure_SetRatio", "_EPDFNamedDest_Remove", "_EPDFNamedDest_SetDest", "_EPDFNumberFormat_GetConversion", "_EPDFNumberFormat_GetFixedDenominator", "_EPDFNumberFormat_GetFraction", "_EPDFNumberFormat_GetLabelPosition", "_EPDFNumberFormat_GetPrecision", "_EPDFNumberFormat_GetText", "_EPDFNumberFormat_GetUnit", "_EPDFNumberFormat_SetConversion", "_EPDFNumberFormat_SetFixedDenominator", "_EPDFNumberFormat_SetFraction", "_EPDFNumberFormat_SetLabelPosition", "_EPDFNumberFormat_SetPrecision", "_EPDFNumberFormat_SetText", "_EPDFNumberFormat_SetUnit", "_EPDFObjectDiff_Close", "_EPDFObjectDiff_GetCount", "_EPDFObjectDiff_GetEntry", "_EPDFObjectDiff_GetReadStatus", "_EPDFObjectDiff_GetReferrer", "_EPDFObjectDiff_GetReferrerCount", "_EPDFObjectDiff_GetRevisionHealth", "_EPDFObjectDiff_GetValue", "_EPDFOutline_CreateItem", "_EPDFOutline_DeleteItem", "_EPDFOutline_ExportItemRawToOwnedBuffer", "_EPDFOutline_GetItem", "_EPDFOutline_GetObjectNumber", "_EPDFOutline_ImportItemRaw", "_EPDFOutline_MoveItem", "_EPDFOutline_SetAction", "_EPDFOutline_SetColor", "_EPDFOutline_SetOpen", "_EPDFOutline_SetStyle", "_EPDFOutline_SetTitle", "_EPDFPage_AddViewport", "_EPDFPage_AddViewportRaw", "_EPDFPage_ApplyRedactions", "_EPDFPage_ContinueLoad", "_EPDFPage_CountViewports", "_EPDFPage_CountViewportsRaw", "_EPDFPage_CreateAnnot", "_EPDFPage_CreateAnnotRaw", "_EPDFPage_ExportAnnotationsAsDocument", "_EPDFPage_ExportAnnotsRawToOwnedBuffer", "_EPDFPage_ExportRawToOwnedBuffer", "_EPDFPage_FindViewport", "_EPDFPage_Flatten", "_EPDFPage_FlattenAnnotations", "_EPDFPage_GetAnnotByName", "_EPDFPage_GetAnnotByObjectNumber", "_EPDFPage_GetAnnotCountRaw", "_EPDFPage_GetAnnotIndexByNameRaw", "_EPDFPage_GetAnnotIndexByObjectNumberRaw", "_EPDFPage_GetAnnotRaw", "_EPDFPage_GetObjectNumber", "_EPDFPage_GetParsedSize", "_EPDFPage_GetViewport", "_EPDFPage_GetViewportRaw", "_EPDFPage_ImportAnnotsRaw", "_EPDFPage_ImportRaw", "_EPDFPage_InsertBlankRaw", "_EPDFPage_IsContentCurrent", "_EPDFPage_IsValid", "_EPDFPage_MoveAnnots", "_EPDFPage_MoveAnnotsRaw", "_EPDFPage_PromoteInlineAnnotsRaw", "_EPDFPage_RemoveAnnot", "_EPDFPage_RemoveAnnotByName", "_EPDFPage_RemoveAnnotByObjectNumber", "_EPDFPage_RemoveAnnotRaw", "_EPDFPage_RemoveViewport", "_EPDFPage_RemoveViewportRaw", "_EPDFPage_ResetRenderCache", "_EPDFSig_CloseModel", "_EPDFSig_Count", "_EPDFSig_DigestByteRange", "_EPDFSig_DigestFileRange", "_EPDFSig_GetByteRange", "_EPDFSig_GetContents", "_EPDFSig_GetCoverage", "_EPDFSig_GetDocMDPPermission", "_EPDFSig_GetFieldMDPAction", "_EPDFSig_GetFieldName", "_EPDFSig_GetFieldNameAt", "_EPDFSig_GetFieldNameCount", "_EPDFSig_GetFieldObjNum", "_EPDFSig_GetIndexByFieldObjNum", "_EPDFSig_GetKind", "_EPDFSig_GetLockAction", "_EPDFSig_GetLockPermission", "_EPDFSig_GetRevisionIndex", "_EPDFSig_GetSeedValueFilter", "_EPDFSig_GetSeedValueListAt", "_EPDFSig_GetSeedValueListCount", "_EPDFSig_GetSeedValueMDP", "_EPDFSig_GetSeedValuePresentFlags", "_EPDFSig_GetSeedValueRequiredFlags", "_EPDFSig_GetSeedValueVersion", "_EPDFSig_GetString", "_EPDFSig_GetValueObjNum", "_EPDFSig_GetWidgetObjNum", "_EPDFSig_GetWidgetPageObjNum", "_EPDFSig_HasSeedValue", "_EPDFSig_IsCatalogCertification", "_EPDFSig_IsRevisionChainValid", "_EPDFSig_IsSigned", "_EPDFSig_LoadModel", "_EPDFSig_Prepare", "_EPDFSig_SaveCandidate", "_EPDFSig_SaveCandidateToOwnedBuffer", "_EPDFSig_Seal", "_EPDFSig_SealSpan", "_EPDFSig_SetFieldLock", "_EPDFSig_WriteContents", "_EPDFText_GetCharGeometry", "_EPDFText_GetCharToTextMap", "_EPDFText_GetPageGeometry", "_EPDFText_GetTextFull", "_EPDFText_RedactInQuads", "_EPDFText_RedactInRect", "_EPDFViewport_AddMeasure", "_EPDFViewport_Close", "_EPDFViewport_GetBBox", "_EPDFViewport_GetMeasure", "_EPDFViewport_GetName", "_EPDFViewport_RemoveMeasure", "_EPDFViewport_SetBBox", "_EPDFViewport_SetName", "_FORM_CanRedo", "_FORM_CanUndo", "_FORM_DoDocumentAAction", "_FORM_DoDocumentJSAction", "_FORM_DoDocumentOpenAction", "_FORM_DoPageAAction", "_FORM_ForceToKillFocus", "_FORM_GetFocusedAnnot", "_FORM_GetFocusedText", "_FORM_GetSelectedText", "_FORM_GetTextDirection", "_FORM_IsIndexSelected", "_FORM_OnAfterLoadPage", "_FORM_OnBeforeClosePage", "_FORM_OnChar", "_FORM_OnFocus", "_FORM_OnKeyDown", "_FORM_OnKeyUp", "_FORM_OnLButtonDoubleClick", "_FORM_OnLButtonDown", "_FORM_OnLButtonUp", "_FORM_OnMouseMove", "_FORM_OnMouseWheel", "_FORM_OnRButtonDown", "_FORM_OnRButtonUp", "_FORM_Redo", "_FORM_ReplaceAndKeepSelection", "_FORM_ReplaceSelection", "_FORM_SelectAllText", "_FORM_SetFocusedAnnot", "_FORM_SetIndexSelected", "_FORM_SetTextDirection", "_FORM_Undo", "_FPDF_AddInstalledFont", "_FPDF_CloseDocument", "_FPDF_ClosePage", "_FPDF_CloseXObject", "_FPDF_CopyViewerPreferences", "_FPDF_CountNamedDests", "_FPDF_CreateClipPath", "_FPDF_CreateNewDocument", "_FPDF_DestroyClipPath", "_FPDF_DestroyLibrary", "_FPDF_DeviceToPage", "_FPDF_DocumentHasValidCrossReferenceTable", "_FPDF_FFLDraw", "_FPDF_FreeDefaultSystemFontInfo", "_FPDF_GetDefaultSystemFontInfo", "_FPDF_GetDefaultTTFMap", "_FPDF_GetDefaultTTFMapCount", "_FPDF_GetDefaultTTFMapEntry", "_FPDF_GetDocPermissions", "_FPDF_GetDocUserPermissions", "_FPDF_GetFileIdentifier", "_FPDF_GetFileVersion", "_FPDF_GetFormType", "_FPDF_GetLastError", "_FPDF_GetMetaText", "_FPDF_GetNamedDest", "_FPDF_GetNamedDestByName", "_FPDF_GetPageAAction", "_FPDF_GetPageBoundingBox", "_FPDF_GetPageCount", "_FPDF_GetPageHeight", "_FPDF_GetPageHeightF", "_FPDF_GetPageLabel", "_FPDF_GetPageSizeByIndex", "_FPDF_GetPageSizeByIndexF", "_FPDF_GetPageWidth", "_FPDF_GetPageWidthF", "_FPDF_GetSecurityHandlerRevision", "_FPDF_GetSignatureCount", "_FPDF_GetSignatureObject", "_FPDF_GetTrailerEnds", "_FPDF_GetXFAPacketContent", "_FPDF_GetXFAPacketCount", "_FPDF_GetXFAPacketName", "_FPDF_ImportNPagesToOne", "_FPDF_ImportPages", "_FPDF_ImportPagesByIndex", "_FPDF_InitLibrary", "_FPDF_InitLibraryWithConfig", "_FPDF_LoadCustomDocument", "_FPDF_LoadDocument", "_FPDF_LoadMemDocument", "_FPDF_LoadMemDocument64", "_FPDF_LoadPage", "_FPDF_LoadXFA", "_FPDF_MovePages", "_FPDF_NewFormObjectFromXObject", "_FPDF_NewXObjectFromPage", "_FPDF_PageToDevice", "_FPDF_RemoveFormFieldHighlight", "_FPDF_RenderPage_Close", "_FPDF_RenderPage_Continue", "_FPDF_RenderPageBitmap", "_FPDF_RenderPageBitmap_Start", "_FPDF_RenderPageBitmapWithColorScheme_Start", "_FPDF_RenderPageBitmapWithMatrix", "_FPDF_SaveAsCopy", "_FPDF_SaveWithVersion", "_FPDF_SetFormFieldHighlightAlpha", "_FPDF_SetFormFieldHighlightColor", "_FPDF_SetSandBoxPolicy", "_FPDF_SetSystemFontInfo", "_FPDF_StructElement_Attr_CountChildren", "_FPDF_StructElement_Attr_GetBlobValue", "_FPDF_StructElement_Attr_GetBooleanValue", "_FPDF_StructElement_Attr_GetChildAtIndex", "_FPDF_StructElement_Attr_GetCount", "_FPDF_StructElement_Attr_GetName", "_FPDF_StructElement_Attr_GetNumberValue", "_FPDF_StructElement_Attr_GetStringValue", "_FPDF_StructElement_Attr_GetType", "_FPDF_StructElement_Attr_GetValue", "_FPDF_StructElement_CountChildren", "_FPDF_StructElement_GetActualText", "_FPDF_StructElement_GetAltText", "_FPDF_StructElement_GetAttributeAtIndex", "_FPDF_StructElement_GetAttributeCount", "_FPDF_StructElement_GetChildAtIndex", "_FPDF_StructElement_GetChildMarkedContentID", "_FPDF_StructElement_GetExpansion", "_FPDF_StructElement_GetID", "_FPDF_StructElement_GetLang", "_FPDF_StructElement_GetMarkedContentID", "_FPDF_StructElement_GetMarkedContentIdAtIndex", "_FPDF_StructElement_GetMarkedContentIdCount", "_FPDF_StructElement_GetObjType", "_FPDF_StructElement_GetParent", "_FPDF_StructElement_GetRawType", "_FPDF_StructElement_GetStringAttribute", "_FPDF_StructElement_GetTitle", "_FPDF_StructElement_GetType", "_FPDF_StructTree_Close", "_FPDF_StructTree_CountChildren", "_FPDF_StructTree_GetChildAtIndex", "_FPDF_StructTree_GetForPage", "_FPDF_VIEWERREF_GetDuplex", "_FPDF_VIEWERREF_GetName", "_FPDF_VIEWERREF_GetNumCopies", "_FPDF_VIEWERREF_GetPrintPageRange", "_FPDF_VIEWERREF_GetPrintPageRangeCount", "_FPDF_VIEWERREF_GetPrintPageRangeElement", "_FPDF_VIEWERREF_GetPrintScaling", "_FPDFAction_GetDest", "_FPDFAction_GetFilePath", "_FPDFAction_GetType", "_FPDFAction_GetURIPath", "_FPDFAnnot_AddFileAttachment", "_FPDFAnnot_AddInkStroke", "_FPDFAnnot_AppendAttachmentPoints", "_FPDFAnnot_AppendObject", "_FPDFAnnot_CountAttachmentPoints", "_FPDFAnnot_GetAP", "_FPDFAnnot_GetAttachmentPoints", "_FPDFAnnot_GetBorder", "_FPDFAnnot_GetColor", "_FPDFAnnot_GetFileAttachment", "_FPDFAnnot_GetFlags", "_FPDFAnnot_GetFocusableSubtypes", "_FPDFAnnot_GetFocusableSubtypesCount", "_FPDFAnnot_GetFontColor", "_FPDFAnnot_GetFontSize", "_FPDFAnnot_GetFormAdditionalActionJavaScript", "_FPDFAnnot_GetFormControlCount", "_FPDFAnnot_GetFormControlIndex", "_FPDFAnnot_GetFormFieldAlternateName", "_FPDFAnnot_GetFormFieldAtPoint", "_FPDFAnnot_GetFormFieldExportValue", "_FPDFAnnot_GetFormFieldFlags", "_FPDFAnnot_GetFormFieldName", "_FPDFAnnot_GetFormFieldType", "_FPDFAnnot_GetFormFieldValue", "_FPDFAnnot_GetInkListCount", "_FPDFAnnot_GetInkListPath", "_FPDFAnnot_GetLine", "_FPDFAnnot_GetLink", "_FPDFAnnot_GetLinkedAnnot", "_FPDFAnnot_GetNumberValue", "_FPDFAnnot_GetObject", "_FPDFAnnot_GetObjectCount", "_FPDFAnnot_GetOptionCount", "_FPDFAnnot_GetOptionLabel", "_FPDFAnnot_GetRect", "_FPDFAnnot_GetStringValue", "_FPDFAnnot_GetSubtype", "_FPDFAnnot_GetValueType", "_FPDFAnnot_GetVertices", "_FPDFAnnot_HasAttachmentPoints", "_FPDFAnnot_HasKey", "_FPDFAnnot_IsChecked", "_FPDFAnnot_IsObjectSupportedSubtype", "_FPDFAnnot_IsOptionSelected", "_FPDFAnnot_IsSupportedSubtype", "_FPDFAnnot_RemoveInkList", "_FPDFAnnot_RemoveObject", "_FPDFAnnot_SetAP", "_FPDFAnnot_SetAttachmentPoints", "_FPDFAnnot_SetBorder", "_FPDFAnnot_SetColor", "_FPDFAnnot_SetFlags", "_FPDFAnnot_SetFocusableSubtypes", "_FPDFAnnot_SetFontColor", "_FPDFAnnot_SetFormFieldFlags", "_FPDFAnnot_SetRect", "_FPDFAnnot_SetStringValue", "_FPDFAnnot_SetURI", "_FPDFAnnot_UpdateObject", "_FPDFAttachment_GetAFRelationship", "_FPDFAttachment_GetDescription", "_FPDFAttachment_GetFile", "_FPDFAttachment_GetName", "_FPDFAttachment_GetStringValue", "_FPDFAttachment_GetSubtype", "_FPDFAttachment_GetValueType", "_FPDFAttachment_HasKey", "_FPDFAttachment_SetDescription", "_FPDFAttachment_SetFile", "_FPDFAttachment_SetStringValue", "_FPDFAvail_Create", "_FPDFAvail_Destroy", "_FPDFAvail_GetDocument", "_FPDFAvail_GetFirstPageNum", "_FPDFAvail_IsDocAvail", "_FPDFAvail_IsFormAvail", "_FPDFAvail_IsLinearized", "_FPDFAvail_IsPageAvail", "_FPDFBitmap_Create", "_FPDFBitmap_CreateEx", "_FPDFBitmap_Destroy", "_FPDFBitmap_FillRect", "_FPDFBitmap_GetBuffer", "_FPDFBitmap_GetFormat", "_FPDFBitmap_GetHeight", "_FPDFBitmap_GetStride", "_FPDFBitmap_GetWidth", "_FPDFBookmark_Find", "_FPDFBookmark_GetAction", "_FPDFBookmark_GetColor", "_FPDFBookmark_GetCount", "_FPDFBookmark_GetDest", "_FPDFBookmark_GetFirstChild", "_FPDFBookmark_GetNextSibling", "_FPDFBookmark_GetStyle", "_FPDFBookmark_GetTitle", "_FPDFCatalog_GetLanguage", "_FPDFCatalog_IsTagged", "_FPDFCatalog_SetLanguage", "_FPDFClipPath_CountPaths", "_FPDFClipPath_CountPathSegments", "_FPDFClipPath_GetPathSegment", "_FPDFDest_GetDestPageIndex", "_FPDFDest_GetLocationInPage", "_FPDFDest_GetView", "_FPDFDoc_AddAttachment", "_FPDFDoc_CloseJavaScriptAction", "_FPDFDoc_DeleteAttachment", "_FPDFDOC_ExitFormFillEnvironment", "_FPDFDoc_GetAttachment", "_FPDFDoc_GetAttachmentCount", "_FPDFDoc_GetJavaScriptAction", "_FPDFDoc_GetJavaScriptActionCount", "_FPDFDoc_GetPageMode", "_FPDFDOC_InitFormFillEnvironment", "_FPDFFont_Close", "_FPDFFont_GetAscent", "_FPDFFont_GetBaseFontName", "_FPDFFont_GetDescent", "_FPDFFont_GetFamilyName", "_FPDFFont_GetFlags", "_FPDFFont_GetFontData", "_FPDFFont_GetGlyphPath", "_FPDFFont_GetGlyphWidth", "_FPDFFont_GetIsEmbedded", "_FPDFFont_GetItalicAngle", "_FPDFFont_GetWeight", "_FPDFFormObj_CountObjects", "_FPDFFormObj_GetObject", "_FPDFFormObj_RemoveObject", "_FPDFGlyphPath_CountGlyphSegments", "_FPDFGlyphPath_GetGlyphPathSegment", "_FPDFImageObj_GetBitmap", "_FPDFImageObj_GetIccProfileDataDecoded", "_FPDFImageObj_GetImageDataDecoded", "_FPDFImageObj_GetImageDataRaw", "_FPDFImageObj_GetImageFilter", "_FPDFImageObj_GetImageFilterCount", "_FPDFImageObj_GetImageMetadata", "_FPDFImageObj_GetImagePixelSize", "_FPDFImageObj_GetRenderedBitmap", "_FPDFImageObj_LoadJpegFile", "_FPDFImageObj_LoadJpegFileInline", "_FPDFImageObj_SetBitmap", "_FPDFImageObj_SetMatrix", "_FPDFJavaScriptAction_GetName", "_FPDFJavaScriptAction_GetScript", "_FPDFLink_CloseWebLinks", "_FPDFLink_CountQuadPoints", "_FPDFLink_CountRects", "_FPDFLink_CountWebLinks", "_FPDFLink_Enumerate", "_FPDFLink_GetAction", "_FPDFLink_GetAnnot", "_FPDFLink_GetAnnotRect", "_FPDFLink_GetDest", "_FPDFLink_GetLinkAtPoint", "_FPDFLink_GetLinkZOrderAtPoint", "_FPDFLink_GetQuadPoints", "_FPDFLink_GetRect", "_FPDFLink_GetTextRange", "_FPDFLink_GetURL", "_FPDFLink_LoadWebLinks", "_FPDFPage_CloseAnnot", "_FPDFPage_CountObjects", "_FPDFPage_CreateAnnot", "_FPDFPage_Delete", "_FPDFPage_Flatten", "_FPDFPage_FormFieldZOrderAtPoint", "_FPDFPage_GenerateContent", "_FPDFPage_GetAnnot", "_FPDFPage_GetAnnotCount", "_FPDFPage_GetAnnotIndex", "_FPDFPage_GetArtBox", "_FPDFPage_GetBleedBox", "_FPDFPage_GetCropBox", "_FPDFPage_GetDecodedThumbnailData", "_FPDFPage_GetMediaBox", "_FPDFPage_GetObject", "_FPDFPage_GetRawThumbnailData", "_FPDFPage_GetRotation", "_FPDFPage_GetThumbnailAsBitmap", "_FPDFPage_GetTrimBox", "_FPDFPage_HasFormFieldAtPoint", "_FPDFPage_HasTransparency", "_FPDFPage_InsertClipPath", "_FPDFPage_InsertObject", "_FPDFPage_InsertObjectAtIndex", "_FPDFPage_New", "_FPDFPage_RemoveAnnot", "_FPDFPage_RemoveObject", "_FPDFPage_SetArtBox", "_FPDFPage_SetBleedBox", "_FPDFPage_SetCropBox", "_FPDFPage_SetMediaBox", "_FPDFPage_SetRotation", "_FPDFPage_SetTrimBox", "_FPDFPage_TransformAnnots", "_FPDFPage_TransFormWithClip", "_FPDFPageObj_AddExistingMark", "_FPDFPageObj_AddMark", "_FPDFPageObj_CountMarks", "_FPDFPageObj_CreateNewPath", "_FPDFPageObj_CreateNewRect", "_FPDFPageObj_CreateTextObj", "_FPDFPageObj_Destroy", "_FPDFPageObj_GetBounds", "_FPDFPageObj_GetClipPath", "_FPDFPageObj_GetDashArray", "_FPDFPageObj_GetDashCount", "_FPDFPageObj_GetDashPhase", "_FPDFPageObj_GetFillColor", "_FPDFPageObj_GetIsActive", "_FPDFPageObj_GetLineCap", "_FPDFPageObj_GetLineJoin", "_FPDFPageObj_GetMark", "_FPDFPageObj_GetMarkedContentID", "_FPDFPageObj_GetMatrix", "_FPDFPageObj_GetRenderedFillPattern", "_FPDFPageObj_GetRenderedStrokePattern", "_FPDFPageObj_GetRotatedBounds", "_FPDFPageObj_GetStrokeColor", "_FPDFPageObj_GetStrokeWidth", "_FPDFPageObj_GetType", "_FPDFPageObj_HasTransparency", "_FPDFPageObj_NewImageObj", "_FPDFPageObj_NewTextObj", "_FPDFPageObj_RemoveMark", "_FPDFPageObj_SetBlendMode", "_FPDFPageObj_SetDashArray", "_FPDFPageObj_SetDashPhase", "_FPDFPageObj_SetFillColor", "_FPDFPageObj_SetIsActive", "_FPDFPageObj_SetLineCap", "_FPDFPageObj_SetLineJoin", "_FPDFPageObj_SetMatrix", "_FPDFPageObj_SetStrokeColor", "_FPDFPageObj_SetStrokeWidth", "_FPDFPageObj_Transform", "_FPDFPageObj_TransformClipPath", "_FPDFPageObj_TransformF", "_FPDFPageObjMark_CountParams", "_FPDFPageObjMark_GetName", "_FPDFPageObjMark_GetParamBlobValue", "_FPDFPageObjMark_GetParamFloatValue", "_FPDFPageObjMark_GetParamIntValue", "_FPDFPageObjMark_GetParamKey", "_FPDFPageObjMark_GetParamStringValue", "_FPDFPageObjMark_GetParamValueType", "_FPDFPageObjMark_RemoveParam", "_FPDFPageObjMark_SetBlobParam", "_FPDFPageObjMark_SetFloatParam", "_FPDFPageObjMark_SetIntParam", "_FPDFPageObjMark_SetStringParam", "_FPDFPath_BezierTo", "_FPDFPath_Close", "_FPDFPath_CountSegments", "_FPDFPath_GetBezierControlPoints", "_FPDFPath_GetDrawMode", "_FPDFPath_GetPathSegment", "_FPDFPath_LineTo", "_FPDFPath_MoveTo", "_FPDFPath_SetDrawMode", "_FPDFPathSegment_GetClose", "_FPDFPathSegment_GetPoint", "_FPDFPathSegment_GetType", "_FPDFSignatureObj_GetByteRange", "_FPDFSignatureObj_GetContents", "_FPDFSignatureObj_GetDocMDPPermission", "_FPDFSignatureObj_GetReason", "_FPDFSignatureObj_GetSubFilter", "_FPDFSignatureObj_GetTime", "_FPDFText_ClosePage", "_FPDFText_CountChars", "_FPDFText_CountRects", "_FPDFText_FindClose", "_FPDFText_FindNext", "_FPDFText_FindPrev", "_FPDFText_FindStart", "_FPDFText_GetBoundedText", "_FPDFText_GetCharAngle", "_FPDFText_GetCharBox", "_FPDFText_GetCharIndexAtPos", "_FPDFText_GetCharIndexFromTextIndex", "_FPDFText_GetCharOrigin", "_FPDFText_GetFillColor", "_FPDFText_GetFontInfo", "_FPDFText_GetFontSize", "_FPDFText_GetFontWeight", "_FPDFText_GetLooseCharBox", "_FPDFText_GetMatrix", "_FPDFText_GetRect", "_FPDFText_GetSchCount", "_FPDFText_GetSchResultIndex", "_FPDFText_GetStrokeColor", "_FPDFText_GetText", "_FPDFText_GetTextIndexFromCharIndex", "_FPDFText_GetTextObject", "_FPDFText_GetUnicode", "_FPDFText_HasUnicodeMapError", "_FPDFText_IsGenerated", "_FPDFText_IsHyphen", "_FPDFText_LoadCidType2Font", "_FPDFText_LoadFont", "_FPDFText_LoadPage", "_FPDFText_LoadStandardFont", "_FPDFText_SetCharcodes", "_FPDFText_SetPositions", "_FPDFText_SetText", "_FPDFTextObj_GetFont", "_FPDFTextObj_GetFontSize", "_FPDFTextObj_GetRenderedBitmap", "_FPDFTextObj_GetText", "_FPDFTextObj_GetTextRenderMode", "_FPDFTextObj_SetFontSize", "_FPDFTextObj_SetTextRenderMode", "_malloc", "_free", "_memory", "___indirect_function_table", "onRuntimeInitialized"].forEach((m) => { + ["_EPDF_CheckPasswordPermissions", "_EPDF_DigestBuffer", "_EPDF_FreeBuffer", "_EPDF_GetDecodedImageBytes", "_EPDF_GetMetaKeyCount", "_EPDF_GetMetaKeyName", "_EPDF_GetMetaTrapped", "_EPDF_GetPageBoxByIndex", "_EPDF_GetPageRotateByIndex", "_EPDF_GetPageTabOrderByIndex", "_EPDF_GetPageUserUnitByIndex", "_EPDF_HasMetaText", "_EPDF_InitThread", "_EPDF_IsEncrypted", "_EPDF_IsOwnerUnlocked", "_EPDF_LoadBaseDocument", "_EPDF_LoadMemBaseDocument", "_EPDF_LoadMemBaseDocument64", "_EPDF_LoadPageNormalized", "_EPDF_PNG_EncodeRGBA", "_EPDF_ReleaseBaseDocument", "_EPDF_RemoveEncryption", "_EPDF_RenderAnnotBitmap", "_EPDF_RenderAnnotBitmapUnrotated", "_EPDF_RenderPage_Continue", "_EPDF_RenderPageBitmapWithMatrix_Start", "_EPDF_SaveAsCopyEx", "_EPDF_SaveDocumentToOwnedBuffer", "_EPDF_SaveDocumentToOwnedBufferEx", "_EPDF_SaveDocumentToOwnedBufferWithVersion", "_EPDF_SetBaseDocumentSha256", "_EPDF_SetDecodedImageBudget", "_EPDF_SetEncryption", "_EPDF_SetMetaText", "_EPDF_SetMetaTrapped", "_EPDF_SetRuntimeOwnerPermissions", "_EPDF_ShutdownThread", "_EPDF_UnlockOwnerPermissions", "_EPDFAction_CloseModel", "_EPDFAction_CreateGoTo", "_EPDFAction_CreateGoToNamed", "_EPDFAction_CreateHide", "_EPDFAction_CreateJavaScript", "_EPDFAction_CreateLaunch", "_EPDFAction_CreateNamed", "_EPDFAction_CreateRemoteGoToByName", "_EPDFAction_CreateRemoteGoToDest", "_EPDFAction_CreateResetForm", "_EPDFAction_CreateSubmitForm", "_EPDFAction_CreateURI", "_EPDFAction_GetNextAt", "_EPDFAction_GetNextCount", "_EPDFAction_GetNodeCount", "_EPDFAction_GetNodeDest", "_EPDFAction_GetNodeFilePath", "_EPDFAction_GetNodeHideFlag", "_EPDFAction_GetNodeJavaScript", "_EPDFAction_GetNodeName", "_EPDFAction_GetNodeResetForm", "_EPDFAction_GetNodeSubmitForm", "_EPDFAction_GetNodeSubmitFormCharSet", "_EPDFAction_GetNodeSubmitFormURL", "_EPDFAction_GetNodeSubtype", "_EPDFAction_GetNodeTargetCount", "_EPDFAction_GetNodeTargetName", "_EPDFAction_GetNodeTargetObjectNumber", "_EPDFAction_GetNodeType", "_EPDFAction_GetNodeURI", "_EPDFAction_GetNodeURIIsMap", "_EPDFAction_GetRootNode", "_EPDFAction_GetWarningFlags", "_EPDFAction_IsComplete", "_EPDFAction_LoadModel", "_EPDFAction_NodeHasJavaScript", "_EPDFAction_SetNext", "_EPDFAnnot_AddMeasure", "_EPDFAnnot_ClearBorderEffect", "_EPDFAnnot_ClearColor", "_EPDFAnnot_ClearEmbedMetadata", "_EPDFAnnot_ClearEmbedMetadataKey", "_EPDFAnnot_ClearMKColor", "_EPDFAnnot_ClearMKIcon", "_EPDFAnnot_ClearRectangleDifferences", "_EPDFAnnot_ExportAppearance", "_EPDFAnnot_GenerateAppearance", "_EPDFAnnot_GenerateAppearanceWithBlend", "_EPDFAnnot_GenerateFormFieldAP", "_EPDFAnnot_GetActionModel", "_EPDFAnnot_GetAPMatrix", "_EPDFAnnot_GetAppearanceState", "_EPDFAnnot_GetAppearanceStateCount", "_EPDFAnnot_GetAppearanceStateName", "_EPDFAnnot_GetAppearanceTransform", "_EPDFAnnot_GetAvailableAppearanceModes", "_EPDFAnnot_GetBlendMode", "_EPDFAnnot_GetBooleanValue", "_EPDFAnnot_GetBorderDashPattern", "_EPDFAnnot_GetBorderDashPatternCount", "_EPDFAnnot_GetBorderEffect", "_EPDFAnnot_GetBorderStyle", "_EPDFAnnot_GetCalloutLine", "_EPDFAnnot_GetCalloutLineCount", "_EPDFAnnot_GetColor", "_EPDFAnnot_GetDefaultAppearance", "_EPDFAnnot_GetDefaultAppearanceFontFace", "_EPDFAnnot_GetDefaultAppearanceFontPostScriptName", "_EPDFAnnot_GetDrawing", "_EPDFAnnot_GetDrawingRect", "_EPDFAnnot_GetEmbedMetadataBoolean", "_EPDFAnnot_GetEmbedMetadataJSON", "_EPDFAnnot_GetEmbedMetadataNumber", "_EPDFAnnot_GetEmbedMetadataRect", "_EPDFAnnot_GetEmbedMetadataString", "_EPDFAnnot_GetFileAttachmentForWrite", "_EPDFAnnot_GetIntent", "_EPDFAnnot_GetLineCaption", "_EPDFAnnot_GetLineEndings", "_EPDFAnnot_GetLineLeader", "_EPDFAnnot_GetMeasure", "_EPDFAnnot_GetMKColor", "_EPDFAnnot_GetMKIcon", "_EPDFAnnot_GetMKRotation", "_EPDFAnnot_GetMKText", "_EPDFAnnot_GetMKTextPosition", "_EPDFAnnot_GetName", "_EPDFAnnot_GetObjectNumber", "_EPDFAnnot_GetOpacity", "_EPDFAnnot_GetOverlayText", "_EPDFAnnot_GetOverlayTextRepeat", "_EPDFAnnot_GetRect", "_EPDFAnnot_GetRectangleDifferences", "_EPDFAnnot_GetReplyType", "_EPDFAnnot_GetRichContent", "_EPDFAnnot_GetRichTextJSON", "_EPDFAnnot_GetRotate", "_EPDFAnnot_GetShapeCaption", "_EPDFAnnot_GetStructurePosition", "_EPDFAnnot_GetTextAlignment", "_EPDFAnnot_HasAppearanceStream", "_EPDFAnnot_HasEmbedMetadata", "_EPDFAnnot_HasMKIcon", "_EPDFAnnot_IsValid", "_EPDFAnnot_RemoveAction", "_EPDFAnnot_RemoveDest", "_EPDFAnnot_RemoveKey", "_EPDFAnnot_RemoveMeasure", "_EPDFAnnot_SetAction", "_EPDFAnnot_SetAPMatrix", "_EPDFAnnot_SetAppearanceFromPage", "_EPDFAnnot_SetBooleanValue", "_EPDFAnnot_SetBorderDashPattern", "_EPDFAnnot_SetBorderEffect", "_EPDFAnnot_SetBorderStyle", "_EPDFAnnot_SetCalloutLine", "_EPDFAnnot_SetColor", "_EPDFAnnot_SetDefaultAppearance", "_EPDFAnnot_SetDefaultAppearanceDocumentFont", "_EPDFAnnot_SetDefaultAppearanceRegisteredFont", "_EPDFAnnot_SetDrawing", "_EPDFAnnot_SetEmbedMetadataBoolean", "_EPDFAnnot_SetEmbedMetadataJSON", "_EPDFAnnot_SetEmbedMetadataNumber", "_EPDFAnnot_SetEmbedMetadataRect", "_EPDFAnnot_SetEmbedMetadataString", "_EPDFAnnot_SetEventAction", "_EPDFAnnot_SetIntent", "_EPDFAnnot_SetLine", "_EPDFAnnot_SetLineCaption", "_EPDFAnnot_SetLineEndings", "_EPDFAnnot_SetLineLeader", "_EPDFAnnot_SetLinkedAnnot", "_EPDFAnnot_SetMKColor", "_EPDFAnnot_SetMKIcon", "_EPDFAnnot_SetMKRotation", "_EPDFAnnot_SetMKText", "_EPDFAnnot_SetMKTextPosition", "_EPDFAnnot_SetName", "_EPDFAnnot_SetNoColor", "_EPDFAnnot_SetNumberValue", "_EPDFAnnot_SetOpacity", "_EPDFAnnot_SetOverlayText", "_EPDFAnnot_SetOverlayTextRepeat", "_EPDFAnnot_SetRect", "_EPDFAnnot_SetReplyType", "_EPDFAnnot_SetRichTextJSON", "_EPDFAnnot_SetRichTextXHTML", "_EPDFAnnot_SetRotate", "_EPDFAnnot_SetShapeCaption", "_EPDFAnnot_SetStampOpacity", "_EPDFAnnot_SetSubtype", "_EPDFAnnot_SetTextAlignment", "_EPDFAnnot_SetVertices", "_EPDFAnnot_UpdateAppearanceToRect", "_EPDFAttachment_ExportCanonicalToOwnedBuffer", "_EPDFAttachment_ExportRawToOwnedBuffer", "_EPDFAttachment_ExtractFile", "_EPDFAttachment_ExtractFileToOwnedBuffer", "_EPDFAttachment_GetDescription", "_EPDFAttachment_GetIntegerValue", "_EPDFAttachment_ImportRaw", "_EPDFAttachment_SetDescription", "_EPDFAttachment_SetName", "_EPDFAttachment_SetSubtype", "_EPDFCatalog_GetLanguage", "_EPDFCatalog_GetMetadata", "_EPDFCatalog_SetMetadata", "_EPDFDest_CreateRemoteView", "_EPDFDest_CreateRemoteXYZ", "_EPDFDest_CreateView", "_EPDFDest_CreateViewByObjectNumber", "_EPDFDest_CreateXYZ", "_EPDFDest_CreateXYZByObjectNumber", "_EPDFDest_GetPageObjectNumber", "_EPDFDest_GetViewNullParams", "_EPDFDoc_CanonicalDrawing", "_EPDFDoc_ClearMissingCharacters", "_EPDFDoc_ClearPagePieceInfoEntry", "_EPDFDoc_ClearPagePieceInfoKey", "_EPDFDoc_ClearPieceInfoEntry", "_EPDFDoc_ClearPieceInfoKey", "_EPDFDoc_CompareRevisions", "_EPDFDoc_CountMissingCharacters", "_EPDFDoc_DeletePageByObjectNumber", "_EPDFDoc_ExportDictCanonicalToOwnedBuffer", "_EPDFDoc_ExportDictRawToOwnedBuffer", "_EPDFDoc_ExportDrawing", "_EPDFDoc_ExportPagesFlattened", "_EPDFDoc_GetAdditionalActionModel", "_EPDFDoc_GetAttachmentIndexByKey", "_EPDFDoc_GetAttachmentKey", "_EPDFDoc_GetBaseBytesSize", "_EPDFDoc_GetDrawings", "_EPDFDoc_GetFontDisplayProgramCoverage", "_EPDFDoc_GetFontDisplayProgramData", "_EPDFDoc_GetFontEmbeddingPolicy", "_EPDFDoc_GetFontProgramData", "_EPDFDoc_GetFontsFingerprint", "_EPDFDoc_GetImportFieldRoots", "_EPDFDoc_GetLastModified", "_EPDFDoc_GetLoadedBytesSize", "_EPDFDoc_GetLoadedObjectValue", "_EPDFDoc_GetMissingCharacter", "_EPDFDoc_GetNamedJavaScriptActionModel", "_EPDFDoc_GetNamedPageAt", "_EPDFDoc_GetNamedPageCount", "_EPDFDoc_GetOpenActionDest", "_EPDFDoc_GetOpenActionModel", "_EPDFDoc_GetPageActionModel", "_EPDFDoc_GetPageLabelSectionAt", "_EPDFDoc_GetPageLabelSectionCount", "_EPDFDoc_GetPageLastModified", "_EPDFDoc_GetPageObjectNumberByIndex", "_EPDFDoc_GetPagePieceInfoBoolean", "_EPDFDoc_GetPagePieceInfoEntryAt", "_EPDFDoc_GetPagePieceInfoEntryCount", "_EPDFDoc_GetPagePieceInfoKeyAt", "_EPDFDoc_GetPagePieceInfoKeyCount", "_EPDFDoc_GetPagePieceInfoLastModified", "_EPDFDoc_GetPagePieceInfoName", "_EPDFDoc_GetPagePieceInfoNumber", "_EPDFDoc_GetPagePieceInfoString", "_EPDFDoc_GetPagePieceInfoStringArrayAt", "_EPDFDoc_GetPagePieceInfoStringArrayCount", "_EPDFDoc_GetPagePieceInfoValueType", "_EPDFDoc_GetPieceInfoBoolean", "_EPDFDoc_GetPieceInfoEntryAt", "_EPDFDoc_GetPieceInfoEntryCount", "_EPDFDoc_GetPieceInfoKeyAt", "_EPDFDoc_GetPieceInfoKeyCount", "_EPDFDoc_GetPieceInfoLastModified", "_EPDFDoc_GetPieceInfoName", "_EPDFDoc_GetPieceInfoNumber", "_EPDFDoc_GetPieceInfoString", "_EPDFDoc_GetPieceInfoStringArrayAt", "_EPDFDoc_GetPieceInfoStringArrayCount", "_EPDFDoc_GetPieceInfoValueType", "_EPDFDoc_GetRevision", "_EPDFDoc_GetRevisionCount", "_EPDFDoc_GetStructureObjectNumbers", "_EPDFDoc_GetTypographicFeatures", "_EPDFDoc_HasPagePieceInfoEntry", "_EPDFDoc_HasPieceInfoEntry", "_EPDFDoc_ImportDictRaw", "_EPDFDoc_ImportDrawing", "_EPDFDoc_ImportPages", "_EPDFDoc_LoadPageByObjectNumber", "_EPDFDoc_LoadPageByObjectNumberNormalized", "_EPDFDoc_OpenBaseOverlay", "_EPDFDoc_OpenBaseOverlayFromPath", "_EPDFDoc_OpenRevision", "_EPDFDoc_ReadLoadedBytes", "_EPDFDoc_RemoveNamedPage", "_EPDFDoc_RemoveNamedPagesForPage", "_EPDFDoc_ResolveFonts", "_EPDFDoc_SetFontEmbeddingPolicy", "_EPDFDoc_SetNamedPage", "_EPDFDoc_SetPageLabelSections", "_EPDFDoc_SetPagePieceInfoBoolean", "_EPDFDoc_SetPagePieceInfoName", "_EPDFDoc_SetPagePieceInfoNumber", "_EPDFDoc_SetPagePieceInfoString", "_EPDFDoc_SetPagePieceInfoStringArray", "_EPDFDoc_SetPageRotationByObjectNumber", "_EPDFDoc_SetPieceInfoBoolean", "_EPDFDoc_SetPieceInfoName", "_EPDFDoc_SetPieceInfoNumber", "_EPDFDoc_SetPieceInfoString", "_EPDFDoc_SetPieceInfoStringArray", "_EPDFDoc_SetTypographicFeatures", "_EPDFDoc_StartLoadPageByObjectNumber", "_EPDFDocument_ClearEmbedMetadata", "_EPDFDss_Add", "_EPDFDss_GetCount", "_EPDFDss_GetData", "_EPDFFont_AddFallbackFont", "_EPDFFont_AuthorizeEditing", "_EPDFFont_ClearFallbackFonts", "_EPDFFont_ClearRegisteredFonts", "_EPDFFont_GetCoverage", "_EPDFFont_GetEmbeddingPermission", "_EPDFFont_GetFallbackOrder", "_EPDFFont_GetFamilyName", "_EPDFFont_GetLastResortFont", "_EPDFFont_GetMetrics", "_EPDFFont_GetPostScriptName", "_EPDFFont_GetProgramData", "_EPDFFont_GetProgramFormat", "_EPDFFont_GetProgramHash", "_EPDFFont_GetWeight", "_EPDFFont_IsEditingAuthorized", "_EPDFFont_IsInstanced", "_EPDFFont_IsItalic", "_EPDFFont_RegisterFont", "_EPDFFont_RegisterMemFont", "_EPDFFont_RegisterMemFont64", "_EPDFFont_SetLastResortFont", "_EPDFFontFaces_Close", "_EPDFFontFaces_Count", "_EPDFFontFaces_CountPrograms", "_EPDFFontFaces_GetFamily", "_EPDFFontFaces_GetProgramDisplayHash", "_EPDFFontFaces_GetProgramEmbedded", "_EPDFFontFaces_GetProgramEmbeddingPermission", "_EPDFFontFaces_GetProgramFormat", "_EPDFFontFaces_GetProgramHash", "_EPDFFontFaces_GetProgramMetrics", "_EPDFFontFaces_GetProgramObjNum", "_EPDFFontFaces_GetProgramPostScriptName", "_EPDFFontFaces_GetWeight", "_EPDFFontFaces_IsItalic", "_EPDFFontFaces_Load", "_EPDFFontFaces_ProgramMapsUnicode", "_EPDFFontResolution_Close", "_EPDFFontResolution_CountMissingCharacters", "_EPDFFontResolution_GetBaseFontName", "_EPDFFontResolution_GetFallbacks", "_EPDFFontResolution_GetFamily", "_EPDFFontResolution_GetMissingCharacter", "_EPDFFontResolution_GetProgramDisplayHash", "_EPDFFontResolution_GetProgramObjNum", "_EPDFFontResolution_GetRegisteredFont", "_EPDFFontResolution_GetSource", "_EPDFFontResolution_GetWeight", "_EPDFFontResolution_IsDegraded", "_EPDFFontResolution_IsItalic", "_EPDFForm_AttachWidget", "_EPDFForm_ClearFieldEmbedMetadata", "_EPDFForm_ClearFieldEmbedMetadataKey", "_EPDFForm_CloseModel", "_EPDFForm_CountCalculationOrder", "_EPDFForm_CountFieldDefaultValues", "_EPDFForm_CountFieldOptions", "_EPDFForm_CountFields", "_EPDFForm_CountFieldValues", "_EPDFForm_CountFieldWidgets", "_EPDFForm_CreateField", "_EPDFForm_DeleteField", "_EPDFForm_DetachWidget", "_EPDFForm_ExportFDF", "_EPDFForm_ExportFieldRawToOwnedBuffer", "_EPDFForm_ExportXFDF", "_EPDFForm_GetCalculationOrderFieldIndex", "_EPDFForm_GetFieldActionModel", "_EPDFForm_GetFieldAlternateName", "_EPDFForm_GetFieldDefaultValueAt", "_EPDFForm_GetFieldDefaultValueKind", "_EPDFForm_GetFieldEmbedMetadataBoolean", "_EPDFForm_GetFieldEmbedMetadataJSON", "_EPDFForm_GetFieldEmbedMetadataNumber", "_EPDFForm_GetFieldEmbedMetadataString", "_EPDFForm_GetFieldFamily", "_EPDFForm_GetFieldFlags", "_EPDFForm_GetFieldIndexByObjNum", "_EPDFForm_GetFieldIndexForWidget", "_EPDFForm_GetFieldMappingName", "_EPDFForm_GetFieldMaxLen", "_EPDFForm_GetFieldName", "_EPDFForm_GetFieldObjNum", "_EPDFForm_GetFieldOptionLabel", "_EPDFForm_GetFieldOptionValue", "_EPDFForm_GetFieldOrigin", "_EPDFForm_GetFieldPartialName", "_EPDFForm_GetFieldTopIndex", "_EPDFForm_GetFieldValueAt", "_EPDFForm_GetFieldValueKind", "_EPDFForm_GetFieldWidgetExportValue", "_EPDFForm_GetFieldWidgetObjNum", "_EPDFForm_GetFieldWidgetOnState", "_EPDFForm_GetFieldWidgetPageObjNum", "_EPDFForm_GetFieldWidgetRect", "_EPDFForm_GetFormKind", "_EPDFForm_GetNeedAppearances", "_EPDFForm_HasFieldEmbedMetadata", "_EPDFForm_HasFieldValuesList", "_EPDFForm_ImportFieldRaw", "_EPDFForm_IsFieldOptionSelected", "_EPDFForm_IsFieldWidgetChecked", "_EPDFForm_LoadModel", "_EPDFForm_RedrawFieldWidgets", "_EPDFForm_Repair", "_EPDFForm_SetCalculationOrder", "_EPDFForm_SetFieldAlternateName", "_EPDFForm_SetFieldAppearanceText", "_EPDFForm_SetFieldDefaultValue", "_EPDFForm_SetFieldDisplay", "_EPDFForm_SetFieldEmbedMetadataBoolean", "_EPDFForm_SetFieldEmbedMetadataJSON", "_EPDFForm_SetFieldEmbedMetadataNumber", "_EPDFForm_SetFieldEmbedMetadataString", "_EPDFForm_SetFieldEventAction", "_EPDFForm_SetFieldFlags", "_EPDFForm_SetFieldMappingName", "_EPDFForm_SetFieldMaxLen", "_EPDFForm_SetFieldName", "_EPDFForm_SetFieldOptions", "_EPDFForm_SetFieldSelectedIndices", "_EPDFForm_SetFieldValue", "_EPDFForm_SetFieldWidgetsChecked", "_EPDFImageObj_SetJpeg", "_EPDFImageObj_SetPng", "_EPDFLayer_AbortTransaction", "_EPDFLayer_BeginTransaction", "_EPDFLayer_CommitTransaction", "_EPDFLayer_GetBaseDocument", "_EPDFLayer_GetBaseSha256", "_EPDFLayer_GetBirthName", "_EPDFLayer_GetBirthObjectNumber", "_EPDFLayer_GetLastObjectNumber", "_EPDFLayer_GetPromotedObjectCount", "_EPDFLayer_IsInTransaction", "_EPDFLayer_IsObjectPromoted", "_EPDFLayer_IsPagePromoted", "_EPDFLayer_OpenLayer", "_EPDFLayer_OpenLayerArtifact", "_EPDFLayer_OpenLayerArtifactFromPath", "_EPDFLayer_RaiseLastObjectNumber", "_EPDFLayer_SaveDelta", "_EPDFLayer_SaveDeltaEx", "_EPDFLayer_SaveDeltaToOwnedBuffer", "_EPDFLayer_SaveDeltaToOwnedBufferEx", "_EPDFLayer_SaveLayerArtifact", "_EPDFLayer_SaveLayerArtifactEx", "_EPDFLayer_SaveLayerArtifactToOwnedBuffer", "_EPDFLayer_SaveLayerArtifactToOwnedBufferEx", "_EPDFMeasure_AddFormat", "_EPDFMeasure_CountFormats", "_EPDFMeasure_GetCYX", "_EPDFMeasure_GetFormat", "_EPDFMeasure_GetOrigin", "_EPDFMeasure_GetRatio", "_EPDFMeasure_GetSubtype", "_EPDFMeasure_RemoveFormats", "_EPDFMeasure_SetCYX", "_EPDFMeasure_SetOrigin", "_EPDFMeasure_SetRatio", "_EPDFNamedDest_Remove", "_EPDFNamedDest_SetDest", "_EPDFNumberFormat_GetConversion", "_EPDFNumberFormat_GetFixedDenominator", "_EPDFNumberFormat_GetFraction", "_EPDFNumberFormat_GetLabelPosition", "_EPDFNumberFormat_GetPrecision", "_EPDFNumberFormat_GetText", "_EPDFNumberFormat_GetUnit", "_EPDFNumberFormat_SetConversion", "_EPDFNumberFormat_SetFixedDenominator", "_EPDFNumberFormat_SetFraction", "_EPDFNumberFormat_SetLabelPosition", "_EPDFNumberFormat_SetPrecision", "_EPDFNumberFormat_SetText", "_EPDFNumberFormat_SetUnit", "_EPDFObjectDiff_Close", "_EPDFObjectDiff_GetCount", "_EPDFObjectDiff_GetEntry", "_EPDFObjectDiff_GetReadStatus", "_EPDFObjectDiff_GetReferrer", "_EPDFObjectDiff_GetReferrerCount", "_EPDFObjectDiff_GetRevisionHealth", "_EPDFObjectDiff_GetValue", "_EPDFOutline_CreateItem", "_EPDFOutline_DeleteItem", "_EPDFOutline_ExportItemRawToOwnedBuffer", "_EPDFOutline_GetItem", "_EPDFOutline_GetObjectNumber", "_EPDFOutline_ImportItemRaw", "_EPDFOutline_MoveItem", "_EPDFOutline_SetAction", "_EPDFOutline_SetColor", "_EPDFOutline_SetOpen", "_EPDFOutline_SetStyle", "_EPDFOutline_SetTitle", "_EPDFPage_AddViewport", "_EPDFPage_AddViewportRaw", "_EPDFPage_ApplyRedactions", "_EPDFPage_ContinueLoad", "_EPDFPage_CountViewports", "_EPDFPage_CountViewportsRaw", "_EPDFPage_CreateAnnot", "_EPDFPage_CreateAnnotRaw", "_EPDFPage_ExportAnnotationsAsDocument", "_EPDFPage_ExportAnnotsRawToOwnedBuffer", "_EPDFPage_ExportRawToOwnedBuffer", "_EPDFPage_FindViewport", "_EPDFPage_Flatten", "_EPDFPage_FlattenAnnotations", "_EPDFPage_GetAnnotByName", "_EPDFPage_GetAnnotByObjectNumber", "_EPDFPage_GetAnnotCountRaw", "_EPDFPage_GetAnnotIndexByNameRaw", "_EPDFPage_GetAnnotIndexByObjectNumberRaw", "_EPDFPage_GetAnnotRaw", "_EPDFPage_GetObjectNumber", "_EPDFPage_GetParsedSize", "_EPDFPage_GetViewport", "_EPDFPage_GetViewportRaw", "_EPDFPage_ImportAnnotsRaw", "_EPDFPage_ImportRaw", "_EPDFPage_InsertBlankRaw", "_EPDFPage_IsContentCurrent", "_EPDFPage_IsValid", "_EPDFPage_MoveAnnots", "_EPDFPage_MoveAnnotsRaw", "_EPDFPage_PromoteInlineAnnotsRaw", "_EPDFPage_RemoveAnnot", "_EPDFPage_RemoveAnnotByName", "_EPDFPage_RemoveAnnotByObjectNumber", "_EPDFPage_RemoveAnnotRaw", "_EPDFPage_RemoveViewport", "_EPDFPage_RemoveViewportRaw", "_EPDFPage_ResetRenderCache", "_EPDFSig_CloseModel", "_EPDFSig_Count", "_EPDFSig_DigestByteRange", "_EPDFSig_DigestFileRange", "_EPDFSig_GetByteRange", "_EPDFSig_GetContents", "_EPDFSig_GetCoverage", "_EPDFSig_GetDocMDPPermission", "_EPDFSig_GetFieldMDPAction", "_EPDFSig_GetFieldName", "_EPDFSig_GetFieldNameAt", "_EPDFSig_GetFieldNameCount", "_EPDFSig_GetFieldObjNum", "_EPDFSig_GetIndexByFieldObjNum", "_EPDFSig_GetKind", "_EPDFSig_GetLockAction", "_EPDFSig_GetLockPermission", "_EPDFSig_GetRevisionIndex", "_EPDFSig_GetSeedValueFilter", "_EPDFSig_GetSeedValueListAt", "_EPDFSig_GetSeedValueListCount", "_EPDFSig_GetSeedValueMDP", "_EPDFSig_GetSeedValuePresentFlags", "_EPDFSig_GetSeedValueRequiredFlags", "_EPDFSig_GetSeedValueVersion", "_EPDFSig_GetString", "_EPDFSig_GetValueObjNum", "_EPDFSig_GetWidgetObjNum", "_EPDFSig_GetWidgetPageObjNum", "_EPDFSig_HasSeedValue", "_EPDFSig_IsCatalogCertification", "_EPDFSig_IsRevisionChainValid", "_EPDFSig_IsSigned", "_EPDFSig_LoadModel", "_EPDFSig_Prepare", "_EPDFSig_SaveCandidate", "_EPDFSig_SaveCandidateToOwnedBuffer", "_EPDFSig_Seal", "_EPDFSig_SealSpan", "_EPDFSig_SetFieldLock", "_EPDFSig_WriteContents", "_EPDFText_GetCharGeometry", "_EPDFText_GetCharToTextMap", "_EPDFText_GetPageGeometry", "_EPDFText_GetTextFull", "_EPDFText_RedactInQuads", "_EPDFText_RedactInRect", "_EPDFViewport_AddMeasure", "_EPDFViewport_Close", "_EPDFViewport_GetBBox", "_EPDFViewport_GetMeasure", "_EPDFViewport_GetName", "_EPDFViewport_RemoveMeasure", "_EPDFViewport_SetBBox", "_EPDFViewport_SetName", "_FORM_CanRedo", "_FORM_CanUndo", "_FORM_DoDocumentAAction", "_FORM_DoDocumentJSAction", "_FORM_DoDocumentOpenAction", "_FORM_DoPageAAction", "_FORM_ForceToKillFocus", "_FORM_GetFocusedAnnot", "_FORM_GetFocusedText", "_FORM_GetSelectedText", "_FORM_GetTextDirection", "_FORM_IsIndexSelected", "_FORM_OnAfterLoadPage", "_FORM_OnBeforeClosePage", "_FORM_OnChar", "_FORM_OnFocus", "_FORM_OnKeyDown", "_FORM_OnKeyUp", "_FORM_OnLButtonDoubleClick", "_FORM_OnLButtonDown", "_FORM_OnLButtonUp", "_FORM_OnMouseMove", "_FORM_OnMouseWheel", "_FORM_OnRButtonDown", "_FORM_OnRButtonUp", "_FORM_Redo", "_FORM_ReplaceAndKeepSelection", "_FORM_ReplaceSelection", "_FORM_SelectAllText", "_FORM_SetFocusedAnnot", "_FORM_SetIndexSelected", "_FORM_SetTextDirection", "_FORM_Undo", "_FPDF_AddInstalledFont", "_FPDF_CloseDocument", "_FPDF_ClosePage", "_FPDF_CloseXObject", "_FPDF_CopyViewerPreferences", "_FPDF_CountNamedDests", "_FPDF_CreateClipPath", "_FPDF_CreateNewDocument", "_FPDF_DestroyClipPath", "_FPDF_DestroyLibrary", "_FPDF_DeviceToPage", "_FPDF_DocumentHasValidCrossReferenceTable", "_FPDF_FFLDraw", "_FPDF_FreeDefaultSystemFontInfo", "_FPDF_GetDefaultSystemFontInfo", "_FPDF_GetDefaultTTFMap", "_FPDF_GetDefaultTTFMapCount", "_FPDF_GetDefaultTTFMapEntry", "_FPDF_GetDocPermissions", "_FPDF_GetDocUserPermissions", "_FPDF_GetFileIdentifier", "_FPDF_GetFileVersion", "_FPDF_GetFormType", "_FPDF_GetLastError", "_FPDF_GetMetaText", "_FPDF_GetNamedDest", "_FPDF_GetNamedDestByName", "_FPDF_GetPageAAction", "_FPDF_GetPageBoundingBox", "_FPDF_GetPageCount", "_FPDF_GetPageHeight", "_FPDF_GetPageHeightF", "_FPDF_GetPageLabel", "_FPDF_GetPageSizeByIndex", "_FPDF_GetPageSizeByIndexF", "_FPDF_GetPageWidth", "_FPDF_GetPageWidthF", "_FPDF_GetSecurityHandlerRevision", "_FPDF_GetSignatureCount", "_FPDF_GetSignatureObject", "_FPDF_GetTrailerEnds", "_FPDF_GetXFAPacketContent", "_FPDF_GetXFAPacketCount", "_FPDF_GetXFAPacketName", "_FPDF_ImportNPagesToOne", "_FPDF_ImportPages", "_FPDF_ImportPagesByIndex", "_FPDF_InitLibrary", "_FPDF_InitLibraryWithConfig", "_FPDF_LoadCustomDocument", "_FPDF_LoadDocument", "_FPDF_LoadMemDocument", "_FPDF_LoadMemDocument64", "_FPDF_LoadPage", "_FPDF_LoadXFA", "_FPDF_MovePages", "_FPDF_NewFormObjectFromXObject", "_FPDF_NewXObjectFromPage", "_FPDF_PageToDevice", "_FPDF_RemoveFormFieldHighlight", "_FPDF_RenderPage_Close", "_FPDF_RenderPage_Continue", "_FPDF_RenderPageBitmap", "_FPDF_RenderPageBitmap_Start", "_FPDF_RenderPageBitmapWithColorScheme_Start", "_FPDF_RenderPageBitmapWithMatrix", "_FPDF_SaveAsCopy", "_FPDF_SaveWithVersion", "_FPDF_SetFormFieldHighlightAlpha", "_FPDF_SetFormFieldHighlightColor", "_FPDF_SetSandBoxPolicy", "_FPDF_SetSystemFontInfo", "_FPDF_StructElement_Attr_CountChildren", "_FPDF_StructElement_Attr_GetBlobValue", "_FPDF_StructElement_Attr_GetBooleanValue", "_FPDF_StructElement_Attr_GetChildAtIndex", "_FPDF_StructElement_Attr_GetCount", "_FPDF_StructElement_Attr_GetName", "_FPDF_StructElement_Attr_GetNumberValue", "_FPDF_StructElement_Attr_GetStringValue", "_FPDF_StructElement_Attr_GetType", "_FPDF_StructElement_Attr_GetValue", "_FPDF_StructElement_CountChildren", "_FPDF_StructElement_GetActualText", "_FPDF_StructElement_GetAltText", "_FPDF_StructElement_GetAttributeAtIndex", "_FPDF_StructElement_GetAttributeCount", "_FPDF_StructElement_GetChildAtIndex", "_FPDF_StructElement_GetChildMarkedContentID", "_FPDF_StructElement_GetExpansion", "_FPDF_StructElement_GetID", "_FPDF_StructElement_GetLang", "_FPDF_StructElement_GetMarkedContentID", "_FPDF_StructElement_GetMarkedContentIdAtIndex", "_FPDF_StructElement_GetMarkedContentIdCount", "_FPDF_StructElement_GetObjType", "_FPDF_StructElement_GetParent", "_FPDF_StructElement_GetRawType", "_FPDF_StructElement_GetStringAttribute", "_FPDF_StructElement_GetTitle", "_FPDF_StructElement_GetType", "_FPDF_StructTree_Close", "_FPDF_StructTree_CountChildren", "_FPDF_StructTree_GetChildAtIndex", "_FPDF_StructTree_GetForPage", "_FPDF_VIEWERREF_GetDuplex", "_FPDF_VIEWERREF_GetName", "_FPDF_VIEWERREF_GetNumCopies", "_FPDF_VIEWERREF_GetPrintPageRange", "_FPDF_VIEWERREF_GetPrintPageRangeCount", "_FPDF_VIEWERREF_GetPrintPageRangeElement", "_FPDF_VIEWERREF_GetPrintScaling", "_FPDFAction_GetDest", "_FPDFAction_GetFilePath", "_FPDFAction_GetType", "_FPDFAction_GetURIPath", "_FPDFAnnot_AddFileAttachment", "_FPDFAnnot_AddInkStroke", "_FPDFAnnot_AppendAttachmentPoints", "_FPDFAnnot_AppendObject", "_FPDFAnnot_CountAttachmentPoints", "_FPDFAnnot_GetAP", "_FPDFAnnot_GetAttachmentPoints", "_FPDFAnnot_GetBorder", "_FPDFAnnot_GetColor", "_FPDFAnnot_GetFileAttachment", "_FPDFAnnot_GetFlags", "_FPDFAnnot_GetFocusableSubtypes", "_FPDFAnnot_GetFocusableSubtypesCount", "_FPDFAnnot_GetFontColor", "_FPDFAnnot_GetFontSize", "_FPDFAnnot_GetFormAdditionalActionJavaScript", "_FPDFAnnot_GetFormControlCount", "_FPDFAnnot_GetFormControlIndex", "_FPDFAnnot_GetFormFieldAlternateName", "_FPDFAnnot_GetFormFieldAtPoint", "_FPDFAnnot_GetFormFieldExportValue", "_FPDFAnnot_GetFormFieldFlags", "_FPDFAnnot_GetFormFieldName", "_FPDFAnnot_GetFormFieldType", "_FPDFAnnot_GetFormFieldValue", "_FPDFAnnot_GetInkListCount", "_FPDFAnnot_GetInkListPath", "_FPDFAnnot_GetLine", "_FPDFAnnot_GetLink", "_FPDFAnnot_GetLinkedAnnot", "_FPDFAnnot_GetNumberValue", "_FPDFAnnot_GetObject", "_FPDFAnnot_GetObjectCount", "_FPDFAnnot_GetOptionCount", "_FPDFAnnot_GetOptionLabel", "_FPDFAnnot_GetRect", "_FPDFAnnot_GetStringValue", "_FPDFAnnot_GetSubtype", "_FPDFAnnot_GetValueType", "_FPDFAnnot_GetVertices", "_FPDFAnnot_HasAttachmentPoints", "_FPDFAnnot_HasKey", "_FPDFAnnot_IsChecked", "_FPDFAnnot_IsObjectSupportedSubtype", "_FPDFAnnot_IsOptionSelected", "_FPDFAnnot_IsSupportedSubtype", "_FPDFAnnot_RemoveInkList", "_FPDFAnnot_RemoveObject", "_FPDFAnnot_SetAP", "_FPDFAnnot_SetAttachmentPoints", "_FPDFAnnot_SetBorder", "_FPDFAnnot_SetColor", "_FPDFAnnot_SetFlags", "_FPDFAnnot_SetFocusableSubtypes", "_FPDFAnnot_SetFontColor", "_FPDFAnnot_SetFormFieldFlags", "_FPDFAnnot_SetRect", "_FPDFAnnot_SetStringValue", "_FPDFAnnot_SetURI", "_FPDFAnnot_UpdateObject", "_FPDFAttachment_GetAFRelationship", "_FPDFAttachment_GetDescription", "_FPDFAttachment_GetFile", "_FPDFAttachment_GetName", "_FPDFAttachment_GetStringValue", "_FPDFAttachment_GetSubtype", "_FPDFAttachment_GetValueType", "_FPDFAttachment_HasKey", "_FPDFAttachment_SetDescription", "_FPDFAttachment_SetFile", "_FPDFAttachment_SetStringValue", "_FPDFAvail_Create", "_FPDFAvail_Destroy", "_FPDFAvail_GetDocument", "_FPDFAvail_GetFirstPageNum", "_FPDFAvail_IsDocAvail", "_FPDFAvail_IsFormAvail", "_FPDFAvail_IsLinearized", "_FPDFAvail_IsPageAvail", "_FPDFBitmap_Create", "_FPDFBitmap_CreateEx", "_FPDFBitmap_Destroy", "_FPDFBitmap_FillRect", "_FPDFBitmap_GetBuffer", "_FPDFBitmap_GetFormat", "_FPDFBitmap_GetHeight", "_FPDFBitmap_GetStride", "_FPDFBitmap_GetWidth", "_FPDFBookmark_Find", "_FPDFBookmark_GetAction", "_FPDFBookmark_GetColor", "_FPDFBookmark_GetCount", "_FPDFBookmark_GetDest", "_FPDFBookmark_GetFirstChild", "_FPDFBookmark_GetNextSibling", "_FPDFBookmark_GetStyle", "_FPDFBookmark_GetTitle", "_FPDFCatalog_GetLanguage", "_FPDFCatalog_IsTagged", "_FPDFCatalog_SetLanguage", "_FPDFClipPath_CountPaths", "_FPDFClipPath_CountPathSegments", "_FPDFClipPath_GetPathSegment", "_FPDFDest_GetDestPageIndex", "_FPDFDest_GetLocationInPage", "_FPDFDest_GetView", "_FPDFDoc_AddAttachment", "_FPDFDoc_CloseJavaScriptAction", "_FPDFDoc_DeleteAttachment", "_FPDFDOC_ExitFormFillEnvironment", "_FPDFDoc_GetAttachment", "_FPDFDoc_GetAttachmentCount", "_FPDFDoc_GetJavaScriptAction", "_FPDFDoc_GetJavaScriptActionCount", "_FPDFDoc_GetPageMode", "_FPDFDOC_InitFormFillEnvironment", "_FPDFFont_Close", "_FPDFFont_GetAscent", "_FPDFFont_GetBaseFontName", "_FPDFFont_GetDescent", "_FPDFFont_GetFamilyName", "_FPDFFont_GetFlags", "_FPDFFont_GetFontData", "_FPDFFont_GetGlyphPath", "_FPDFFont_GetGlyphWidth", "_FPDFFont_GetIsEmbedded", "_FPDFFont_GetItalicAngle", "_FPDFFont_GetWeight", "_FPDFFormObj_CountObjects", "_FPDFFormObj_GetObject", "_FPDFFormObj_RemoveObject", "_FPDFGlyphPath_CountGlyphSegments", "_FPDFGlyphPath_GetGlyphPathSegment", "_FPDFImageObj_GetBitmap", "_FPDFImageObj_GetIccProfileDataDecoded", "_FPDFImageObj_GetImageDataDecoded", "_FPDFImageObj_GetImageDataRaw", "_FPDFImageObj_GetImageFilter", "_FPDFImageObj_GetImageFilterCount", "_FPDFImageObj_GetImageMetadata", "_FPDFImageObj_GetImagePixelSize", "_FPDFImageObj_GetRenderedBitmap", "_FPDFImageObj_LoadJpegFile", "_FPDFImageObj_LoadJpegFileInline", "_FPDFImageObj_SetBitmap", "_FPDFImageObj_SetMatrix", "_FPDFJavaScriptAction_GetName", "_FPDFJavaScriptAction_GetScript", "_FPDFLink_CloseWebLinks", "_FPDFLink_CountQuadPoints", "_FPDFLink_CountRects", "_FPDFLink_CountWebLinks", "_FPDFLink_Enumerate", "_FPDFLink_GetAction", "_FPDFLink_GetAnnot", "_FPDFLink_GetAnnotRect", "_FPDFLink_GetDest", "_FPDFLink_GetLinkAtPoint", "_FPDFLink_GetLinkZOrderAtPoint", "_FPDFLink_GetQuadPoints", "_FPDFLink_GetRect", "_FPDFLink_GetTextRange", "_FPDFLink_GetURL", "_FPDFLink_LoadWebLinks", "_FPDFPage_CloseAnnot", "_FPDFPage_CountObjects", "_FPDFPage_CreateAnnot", "_FPDFPage_Delete", "_FPDFPage_Flatten", "_FPDFPage_FormFieldZOrderAtPoint", "_FPDFPage_GenerateContent", "_FPDFPage_GetAnnot", "_FPDFPage_GetAnnotCount", "_FPDFPage_GetAnnotIndex", "_FPDFPage_GetArtBox", "_FPDFPage_GetBleedBox", "_FPDFPage_GetCropBox", "_FPDFPage_GetDecodedThumbnailData", "_FPDFPage_GetMediaBox", "_FPDFPage_GetObject", "_FPDFPage_GetRawThumbnailData", "_FPDFPage_GetRotation", "_FPDFPage_GetThumbnailAsBitmap", "_FPDFPage_GetTrimBox", "_FPDFPage_HasFormFieldAtPoint", "_FPDFPage_HasTransparency", "_FPDFPage_InsertClipPath", "_FPDFPage_InsertObject", "_FPDFPage_InsertObjectAtIndex", "_FPDFPage_New", "_FPDFPage_RemoveAnnot", "_FPDFPage_RemoveObject", "_FPDFPage_SetArtBox", "_FPDFPage_SetBleedBox", "_FPDFPage_SetCropBox", "_FPDFPage_SetMediaBox", "_FPDFPage_SetRotation", "_FPDFPage_SetTrimBox", "_FPDFPage_TransformAnnots", "_FPDFPage_TransFormWithClip", "_FPDFPageObj_AddExistingMark", "_FPDFPageObj_AddMark", "_FPDFPageObj_CountMarks", "_FPDFPageObj_CreateNewPath", "_FPDFPageObj_CreateNewRect", "_FPDFPageObj_CreateTextObj", "_FPDFPageObj_Destroy", "_FPDFPageObj_GetBounds", "_FPDFPageObj_GetClipPath", "_FPDFPageObj_GetDashArray", "_FPDFPageObj_GetDashCount", "_FPDFPageObj_GetDashPhase", "_FPDFPageObj_GetFillColor", "_FPDFPageObj_GetIsActive", "_FPDFPageObj_GetLineCap", "_FPDFPageObj_GetLineJoin", "_FPDFPageObj_GetMark", "_FPDFPageObj_GetMarkedContentID", "_FPDFPageObj_GetMatrix", "_FPDFPageObj_GetRenderedFillPattern", "_FPDFPageObj_GetRenderedStrokePattern", "_FPDFPageObj_GetRotatedBounds", "_FPDFPageObj_GetStrokeColor", "_FPDFPageObj_GetStrokeWidth", "_FPDFPageObj_GetType", "_FPDFPageObj_HasTransparency", "_FPDFPageObj_NewImageObj", "_FPDFPageObj_NewTextObj", "_FPDFPageObj_RemoveMark", "_FPDFPageObj_SetBlendMode", "_FPDFPageObj_SetDashArray", "_FPDFPageObj_SetDashPhase", "_FPDFPageObj_SetFillColor", "_FPDFPageObj_SetIsActive", "_FPDFPageObj_SetLineCap", "_FPDFPageObj_SetLineJoin", "_FPDFPageObj_SetMatrix", "_FPDFPageObj_SetStrokeColor", "_FPDFPageObj_SetStrokeWidth", "_FPDFPageObj_Transform", "_FPDFPageObj_TransformClipPath", "_FPDFPageObj_TransformF", "_FPDFPageObjMark_CountParams", "_FPDFPageObjMark_GetName", "_FPDFPageObjMark_GetParamBlobValue", "_FPDFPageObjMark_GetParamFloatValue", "_FPDFPageObjMark_GetParamIntValue", "_FPDFPageObjMark_GetParamKey", "_FPDFPageObjMark_GetParamStringValue", "_FPDFPageObjMark_GetParamValueType", "_FPDFPageObjMark_RemoveParam", "_FPDFPageObjMark_SetBlobParam", "_FPDFPageObjMark_SetFloatParam", "_FPDFPageObjMark_SetIntParam", "_FPDFPageObjMark_SetStringParam", "_FPDFPath_BezierTo", "_FPDFPath_Close", "_FPDFPath_CountSegments", "_FPDFPath_GetBezierControlPoints", "_FPDFPath_GetDrawMode", "_FPDFPath_GetPathSegment", "_FPDFPath_LineTo", "_FPDFPath_MoveTo", "_FPDFPath_SetDrawMode", "_FPDFPathSegment_GetClose", "_FPDFPathSegment_GetPoint", "_FPDFPathSegment_GetType", "_FPDFSignatureObj_GetByteRange", "_FPDFSignatureObj_GetContents", "_FPDFSignatureObj_GetDocMDPPermission", "_FPDFSignatureObj_GetReason", "_FPDFSignatureObj_GetSubFilter", "_FPDFSignatureObj_GetTime", "_FPDFText_ClosePage", "_FPDFText_CountChars", "_FPDFText_CountRects", "_FPDFText_FindClose", "_FPDFText_FindNext", "_FPDFText_FindPrev", "_FPDFText_FindStart", "_FPDFText_GetBoundedText", "_FPDFText_GetCharAngle", "_FPDFText_GetCharBox", "_FPDFText_GetCharIndexAtPos", "_FPDFText_GetCharIndexFromTextIndex", "_FPDFText_GetCharOrigin", "_FPDFText_GetFillColor", "_FPDFText_GetFontInfo", "_FPDFText_GetFontSize", "_FPDFText_GetFontWeight", "_FPDFText_GetLooseCharBox", "_FPDFText_GetMatrix", "_FPDFText_GetRect", "_FPDFText_GetSchCount", "_FPDFText_GetSchResultIndex", "_FPDFText_GetStrokeColor", "_FPDFText_GetText", "_FPDFText_GetTextIndexFromCharIndex", "_FPDFText_GetTextObject", "_FPDFText_GetUnicode", "_FPDFText_HasUnicodeMapError", "_FPDFText_IsGenerated", "_FPDFText_IsHyphen", "_FPDFText_LoadCidType2Font", "_FPDFText_LoadFont", "_FPDFText_LoadPage", "_FPDFText_LoadStandardFont", "_FPDFText_SetCharcodes", "_FPDFText_SetPositions", "_FPDFText_SetText", "_FPDFTextObj_GetFont", "_FPDFTextObj_GetFontSize", "_FPDFTextObj_GetRenderedBitmap", "_FPDFTextObj_GetText", "_FPDFTextObj_GetTextRenderMode", "_FPDFTextObj_SetFontSize", "_FPDFTextObj_SetTextRenderMode", "_malloc", "_free", "_memory", "_EPDF_FillFromHostCrypto", "___indirect_function_table", "onRuntimeInitialized"].forEach((m) => { Object.getOwnPropertyDescriptor(w, m) || Object.defineProperty(w, m, { get: () => te("You are getting " + m + " on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"), set: () => te("You are setting " + m + " on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js") }); }); var x = typeof window == "object", j = "u" > typeof WorkerGlobalScope, R = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && process.type != "renderer", T = !x && !R && !j, $ = Object.assign({}, t), M = "./this.program", I = ""; @@ -1059,7 +1059,17 @@ var oA = (po = { "../runtime/npm/wasm32/lib/embedpdf.browser.js"() { else throw `Loading data file "${y}" failed.`; }), De && ge(De)) : qe(y); }, k.staticInit(); - var Wp = { __assert_fail: function(m, g, y, v) { + var Wp = { EPDF_FillFromHostCrypto: function(m, g) { + var y = globalThis.crypto; + if (!y || typeof y.getRandomValues != "function") return 0; + m >>>= 0, g >>>= 0; + try { + y.getRandomValues(l.subarray(m >>> 0, m + g >>> 0)); + } catch { + return 0; + } + return 1; + }, __assert_fail: function(m, g, y, v) { m >>>= 0, g >>>= 0, v >>>= 0, te(`Assertion failed: ${Xe(m)}, at: ` + [g ? Xe(g) : "unknown filename", y, v ? Xe(v) : "unknown function"]); }, __syscall_fcntl64: function(m, g, y) { st.varargs = y >>>= 0; @@ -1496,14 +1506,6 @@ var oA = (po = { "../runtime/npm/wasm32/lib/embedpdf.browser.js"() { if (Jt(De), pe !== pe + 0) throw pe; pn(1, 0); } - }, random_get: function(m, g) { - m >>>= 0, g >>>= 0; - try { - return Ke(l.subarray(m >>> 0, m + g >>> 0)), 0; - } catch (y) { - if (k === void 0 || y.name !== "ErrnoError") throw y; - return y.errno; - } } }, nn = (function() { function m(Z, J) { var X, Fe, ve, De; @@ -19241,4 +19243,4 @@ async function UG(e = {}, t) { export { UG as createInlineTransport }; -//# sourceMappingURL=inline-transport-GZ5fBXix.js.map +//# sourceMappingURL=inline-transport-DLWGAv7G.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/labels-C6_i87Oj-BpJCC3cf.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/labels-C6_i87Oj-xAdFtKWd.js similarity index 50% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/labels-C6_i87Oj-BpJCC3cf.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/labels-C6_i87Oj-xAdFtKWd.js index d09adc04..da3ac5dc 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/labels-C6_i87Oj-BpJCC3cf.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/labels-C6_i87Oj-xAdFtKWd.js @@ -1,4 +1,4 @@ -import { u as l } from "./wasm-url-asset-sqnq1cad.js"; +import { u as l } from "./wasm-url-asset-Dc0HnHB_.js"; function o() { const e = l(); return (a) => e(a.labelKey, { fallback: a.label }); @@ -6,4 +6,4 @@ function o() { export { o as u }; -//# sourceMappingURL=labels-C6_i87Oj-BpJCC3cf.js.map +//# sourceMappingURL=labels-C6_i87Oj-xAdFtKWd.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/link-editor-BQl5WwML-BMgM601I.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/link-editor-BQl5WwML-7K8D2W_R.js similarity index 96% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/link-editor-BQl5WwML-BMgM601I.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/link-editor-BQl5WwML-7K8D2W_R.js index c7c89b0d..8aee0ee6 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/link-editor-BQl5WwML-BMgM601I.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/link-editor-BQl5WwML-7K8D2W_R.js @@ -1,4 +1,4 @@ -import { u as h, c as x, d as v, e as y, g as d, h as e, i as N, j as E, k as w, S as C } from "./wasm-url-asset-sqnq1cad.js"; +import { u as h, c as x, d as v, e as y, g as d, h as e, i as N, j as E, k as w, S as C } from "./wasm-url-asset-Dc0HnHB_.js"; function b({ active: r, title: t, onClick: l, children: i }) { const o = w({ label: t }); return /* @__PURE__ */ e(C, { children: [/* @__PURE__ */ e("button", { @@ -91,4 +91,4 @@ function T({ onClose: r }) { export { T as LinkEditorCard }; -//# sourceMappingURL=link-editor-BQl5WwML-BMgM601I.js.map +//# sourceMappingURL=link-editor-BQl5WwML-7K8D2W_R.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/measurement-6M_KEsFK-ARa1M4UB.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/measurement-6M_KEsFK-DhJ1Dnhv.js similarity index 99% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/measurement-6M_KEsFK-ARa1M4UB.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/measurement-6M_KEsFK-DhJ1Dnhv.js index ee591c7c..04c3aa16 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/measurement-6M_KEsFK-ARa1M4UB.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/measurement-6M_KEsFK-DhJ1Dnhv.js @@ -1,4 +1,4 @@ -import { u as M, U as O, V as R, X as f, Y as T, s as J, g as m, r as L, h as t, Z as V, _ as j, B as F, C as D, x as X, D as Y } from "./wasm-url-asset-sqnq1cad.js"; +import { u as M, U as O, V as R, X as f, Y as T, s as J, g as m, r as L, h as t, Z as V, _ as j, B as F, C as D, x as X, D as Y } from "./wasm-url-asset-Dc0HnHB_.js"; const b = "border-border bg-surface text-fg w-full rounded-md border px-2 py-1.5 text-sm disabled:opacity-50", w = "border-border text-fg hover:bg-hover rounded-md border px-3 py-1.5 text-sm disabled:opacity-50", Z = () => f(Y, (a) => a.getCurrentPage()); function $() { const a = M(), c = Z(), n = O(), i = R((e) => e.busy), A = f(T, (e) => e.canCalibrate()), o = j(c), u = F(D), y = X((e) => e.selected), h = f(D, (e) => e.selection.getSelected().filter((s) => (s.subtype === "polygon" || s.subtype === "polyline") && s.captionCenter && e.canUpdate(s.ref) && !s.lockedContents), (e, s) => e.length === s.length && e.every((q, B) => q === s[B])), v = f(T, (e) => u.selection.getSelected().map((s) => e.getReadout(s.ref)).filter((s) => !("unavailable" in s)), (e, s) => JSON.stringify(e) === JSON.stringify(s)), d = R((e) => e.lastReports), [N, x] = m(!1), [C, k] = m(!0), [p, P] = m(null), l = !c || i || !A || !o?.ready, r = o?.measure?.subtype === "rectilinear" ? o.measure : null, S = N ? "all" : c, U = { recalculate: C }, g = async (e) => { @@ -274,4 +274,4 @@ export { z as CalibrationDialog, $ as MeasurementSection }; -//# sourceMappingURL=measurement-6M_KEsFK-ARa1M4UB.js.map +//# sourceMappingURL=measurement-6M_KEsFK-DhJ1Dnhv.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-panel-BfusJ14a-CrwTtYxN.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-panel-BfusJ14a-awUDJM2i.js similarity index 99% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-panel-BfusJ14a-CrwTtYxN.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-panel-BfusJ14a-awUDJM2i.js index d1cb1d63..f9ffae79 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-panel-BfusJ14a-CrwTtYxN.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-panel-BfusJ14a-awUDJM2i.js @@ -1,4 +1,4 @@ -import { u as G, ba as we, bb as ve, bc as ke, m as Te, P as ce, bd as Ce, g as D, n as re, ag as Se, be as Me, r as B, h as g, aB as Re, s as K, bf as ae, k as De, j as Pe, S as Oe, Q as Ke } from "./wasm-url-asset-sqnq1cad.js"; +import { u as G, ba as we, bb as ve, bc as ke, m as Te, P as ce, bd as Ce, g as D, n as re, ag as Se, be as Me, r as B, h as g, aB as Re, s as K, bf as ae, k as De, j as Pe, S as Oe, Q as Ke } from "./wasm-url-asset-Dc0HnHB_.js"; function ue(e, i) { const r = e[i].depth; for (let l = i - 1; l >= 0; l -= 1) if (e[l].depth < r) return l; @@ -508,4 +508,4 @@ function Ge() { export { Ge as OutlinePanel }; -//# sourceMappingURL=outline-panel-BfusJ14a-CrwTtYxN.js.map +//# sourceMappingURL=outline-panel-BfusJ14a-awUDJM2i.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-properties-D2EBON1r-Lwj1vkS_.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-properties-D2EBON1r-CMs5r_jq.js similarity index 98% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-properties-D2EBON1r-Lwj1vkS_.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-properties-D2EBON1r-CMs5r_jq.js index 27e14b92..de528308 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-properties-D2EBON1r-Lwj1vkS_.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/outline-properties-D2EBON1r-CMs5r_jq.js @@ -1,4 +1,4 @@ -import { ag as D, aP as K, a4 as R, h as t, u as G, c as z, aB as U, g as o, Z as W, aQ as M } from "./wasm-url-asset-sqnq1cad.js"; +import { ag as D, aP as K, a4 as R, h as t, u as G, c as z, aB as U, g as o, Z as W, aQ as M } from "./wasm-url-asset-Dc0HnHB_.js"; const Q = [ "#000000", "#c92a2a", @@ -276,4 +276,4 @@ function Z({ outline: d, item: r, hasChildren: i, onClose: l }) { export { J as OutlinePropertiesDialog }; -//# sourceMappingURL=outline-properties-D2EBON1r-Lwj1vkS_.js.map +//# sourceMappingURL=outline-properties-D2EBON1r-CMs5r_jq.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/parse-Cv_kCMGz.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/parse-BNZey3Fv.js similarity index 98% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/parse-Cv_kCMGz.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/parse-BNZey3Fv.js index d99fcc8e..1a6c126d 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/parse-Cv_kCMGz.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/parse-BNZey3Fv.js @@ -1,4 +1,4 @@ -import { aS as S, t as $, f as q, b1 as j, aW as l, b2 as G, b3 as F, O as N, b4 as L, b5 as W, b6 as P, b7 as Y, b8 as M, b9 as z } from "./wasm-url-asset-sqnq1cad.js"; +import { aS as S, t as $, f as q, b1 as j, aW as l, b2 as G, b3 as F, O as N, b4 as L, b5 as W, b6 as P, b7 as Y, b8 as M, b9 as z } from "./wasm-url-asset-Dc0HnHB_.js"; import { C as a } from "./error-CbfoSMwv.js"; function oe(e) { return K(e).parsed; @@ -201,4 +201,4 @@ export { Q as readCmsParts, J as withSignerCertificate }; -//# sourceMappingURL=parse-Cv_kCMGz.js.map +//# sourceMappingURL=parse-BNZey3Fv.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/print-dialog-DPur4IlU-0p7zQEeK.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/print-dialog-DPur4IlU-D6FsF7fz.js similarity index 98% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/print-dialog-DPur4IlU-0p7zQEeK.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/print-dialog-DPur4IlU-D6FsF7fz.js index 26190940..474e6f54 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/print-dialog-DPur4IlU-0p7zQEeK.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/print-dialog-DPur4IlU-D6FsF7fz.js @@ -1,4 +1,4 @@ -import { ag as T, aK as q, h as n, u as G, aB as P, aL as J, $ as K, av as Q, aM as Z, g as N, s as w, r as L, S as _, Z as z } from "./wasm-url-asset-sqnq1cad.js"; +import { ag as T, aK as q, h as n, u as G, aB as P, aL as J, $ as K, av as Q, aM as Z, g as N, s as w, r as L, S as _, Z as z } from "./wasm-url-asset-Dc0HnHB_.js"; function E(t, e) { const s = t.split(/[,,、،]/).map((a) => a.trim()).filter((a) => a !== ""); if (s.length === 0) return null; @@ -209,4 +209,4 @@ function I({ name: t, checked: e, onChoose: s, label: l, controls: a }) { export { X as PrintDialog }; -//# sourceMappingURL=print-dialog-DPur4IlU-0p7zQEeK.js.map +//# sourceMappingURL=print-dialog-DPur4IlU-D6FsF7fz.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redact-confirm-C0AI8Tbt-DoYTi75M.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redact-confirm-C0AI8Tbt-BhOcPITJ.js similarity index 93% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redact-confirm-C0AI8Tbt-DoYTi75M.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redact-confirm-C0AI8Tbt-BhOcPITJ.js index e32c2def..bd9687b7 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redact-confirm-C0AI8Tbt-DoYTi75M.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redact-confirm-C0AI8Tbt-BhOcPITJ.js @@ -1,5 +1,5 @@ -import { u as b, ag as g, g as p, aB as y, h as e, Z as h } from "./wasm-url-asset-sqnq1cad.js"; -import { u as x } from "./redaction-T5ICfn86.js"; +import { u as b, ag as g, g as p, aB as y, h as e, Z as h } from "./wasm-url-asset-Dc0HnHB_.js"; +import { u as x } from "./redaction-CHJXJ8Tl.js"; function v() { const t = b(), r = g("redact-confirm"), a = x(), [s, n] = p(!1), [d, c] = p(null), i = y(); if (!r.isOpen) return null; @@ -59,4 +59,4 @@ function v() { export { v as RedactConfirmModal }; -//# sourceMappingURL=redact-confirm-C0AI8Tbt-DoYTi75M.js.map +//# sourceMappingURL=redact-confirm-C0AI8Tbt-BhOcPITJ.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-T5ICfn86.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-CHJXJ8Tl.js similarity index 86% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-T5ICfn86.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-CHJXJ8Tl.js index fc10016a..b1cee639 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-T5ICfn86.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-CHJXJ8Tl.js @@ -1,4 +1,4 @@ -import { bg as s, a5 as t, B as i, bh as o, bi as u, a2 as l } from "./wasm-url-asset-sqnq1cad.js"; +import { bg as s, a5 as t, B as i, bh as o, bi as u, a2 as l } from "./wasm-url-asset-Dc0HnHB_.js"; const p = s(t, { read: (e) => ({ pendingCount: e.getPendingCount(), @@ -26,4 +26,4 @@ export { R as b, g as u }; -//# sourceMappingURL=redaction-T5ICfn86.js.map +//# sourceMappingURL=redaction-CHJXJ8Tl.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-panel-Djm12Ydh-D9gDjih9.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-panel-Djm12Ydh-BY55F6C2.js similarity index 95% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-panel-Djm12Ydh-D9gDjih9.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-panel-Djm12Ydh-BY55F6C2.js index 34a4e93d..d571aa32 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-panel-Djm12Ydh-D9gDjih9.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/redaction-panel-Djm12Ydh-BY55F6C2.js @@ -1,5 +1,5 @@ -import { u as i, B as p, C as m, ag as x, h as e, j as s, i as f, E as u } from "./wasm-url-asset-sqnq1cad.js"; -import { u as g, a as h, b } from "./redaction-T5ICfn86.js"; +import { u as i, B as p, C as m, ag as x, h as e, j as s, i as f, E as u } from "./wasm-url-asset-Dc0HnHB_.js"; +import { u as g, a as h, b } from "./redaction-CHJXJ8Tl.js"; function N() { const a = i(), d = g(), l = h((t) => t.applying), n = b(), o = p(m), c = x("redact-confirm"); return /* @__PURE__ */ e("div", { @@ -75,4 +75,4 @@ function N() { export { N as RedactionPanel }; -//# sourceMappingURL=redaction-panel-Djm12Ydh-D9gDjih9.js.map +//# sourceMappingURL=redaction-panel-Djm12Ydh-BY55F6C2.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/search-panel-BsY-2v13-ZjlYoC7t.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/search-panel-BsY-2v13-BzjGBsPo.js similarity index 98% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/search-panel-BsY-2v13-ZjlYoC7t.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/search-panel-BsY-2v13-BzjGBsPo.js index 4f40d68c..160981c4 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/search-panel-BsY-2v13-ZjlYoC7t.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/search-panel-BsY-2v13-BzjGBsPo.js @@ -1,4 +1,4 @@ -import { u as m, l as O, m as R, n as P, h as t, g as p, i as b, j as x, o as N, p as I, q as T, v as z, r as w, s as y, w as E, S as K } from "./wasm-url-asset-sqnq1cad.js"; +import { u as m, l as O, m as R, n as P, h as t, g as p, i as b, j as x, o as N, p as I, q as T, v as z, r as w, s as y, w as E, S as K } from "./wasm-url-asset-Dc0HnHB_.js"; const j = 300, B = (e, s) => e != null && e.text === s.text && !!e.regex == !!s.regex && !!e.matchCase == !!s.matchCase && !!e.wholeWord == !!s.wholeWord; function C() { const e = I(), s = T(), { query: a } = s, [n, h] = p(() => a?.text ?? ""), [r, f] = p(() => a?.matchCase ?? !1), [i, l] = p(() => a?.wholeWord ?? !1), [c, d] = p(() => a?.regex ?? !1), o = { @@ -275,4 +275,4 @@ export { $ as FindBar, q as SearchPanel }; -//# sourceMappingURL=search-panel-BsY-2v13-ZjlYoC7t.js.map +//# sourceMappingURL=search-panel-BsY-2v13-BzjGBsPo.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/self-signed-DIdbaT2K.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/self-signed-BsJCIg7s.js similarity index 95% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/self-signed-DIdbaT2K.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/self-signed-BsJCIg7s.js index 15d142a9..b0ed460e 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/self-signed-DIdbaT2K.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/self-signed-BsJCIg7s.js @@ -1,4 +1,4 @@ -import { aR as f, aS as y, I as p, t as x, aT as d, aU as b, aV as v, aW as a, aX as l, aY as A, aZ as m, a_ as c, a$ as B, b0 as h } from "./wasm-url-asset-sqnq1cad.js"; +import { aR as f, aS as y, I as p, t as x, aT as d, aU as b, aV as v, aW as a, aX as l, aY as A, aZ as m, a_ as c, a$ as B, b0 as h } from "./wasm-url-asset-Dc0HnHB_.js"; async function U(e) { return g(e, "signing"); } @@ -50,4 +50,4 @@ export { U as selfSignedCertificate, V as timestampAuthorityCertificate }; -//# sourceMappingURL=self-signed-DIdbaT2K.js.map +//# sourceMappingURL=self-signed-BsJCIg7s.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/sign-dialog-BZ-u3DaO-DUNRfJDM.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/sign-dialog-BZ-u3DaO-A_aSCrL7.js similarity index 98% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/sign-dialog-BZ-u3DaO-DUNRfJDM.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/sign-dialog-BZ-u3DaO-A_aSCrL7.js index 3a351894..d670a8e6 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/sign-dialog-BZ-u3DaO-DUNRfJDM.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/sign-dialog-BZ-u3DaO-A_aSCrL7.js @@ -1,4 +1,4 @@ -import { u as B, ag as T, an as j, g as i, aB as L, am as R, h as e, Z as w, aC as A } from "./wasm-url-asset-sqnq1cad.js"; +import { u as B, ag as T, an as j, g as i, aB as L, am as R, h as e, Z as w, aC as A } from "./wasm-url-asset-Dc0HnHB_.js"; import { l as E, v as D } from "./signature-result-CiEN5nQw-3Y00fjuW.js"; function P(t) { if (!A(t)) return null; @@ -161,4 +161,4 @@ function O() { export { O as SignDialog }; -//# sourceMappingURL=sign-dialog-BZ-u3DaO-DUNRfJDM.js.map +//# sourceMappingURL=sign-dialog-BZ-u3DaO-A_aSCrL7.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-inspector-DgkYwQHv-B4iHMa4u.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-inspector-DgkYwQHv-DecD2jME.js similarity index 98% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-inspector-DgkYwQHv-B4iHMa4u.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-inspector-DgkYwQHv-DecD2jME.js index 5c00d5dc..49b0cfe2 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-inspector-DgkYwQHv-B4iHMa4u.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-inspector-DgkYwQHv-DecD2jME.js @@ -1,4 +1,4 @@ -import { u as C, N as K, ag as P, an as j, aq as R, g as h, a4 as $, r as z, h as t, j as G, aJ as W, aC as q, al as B, ax as J } from "./wasm-url-asset-sqnq1cad.js"; +import { u as C, N as K, ag as P, an as j, aq as R, g as h, a4 as $, r as z, h as t, j as G, aJ as W, aC as q, al as B, ax as J } from "./wasm-url-asset-Dc0HnHB_.js"; const Y = (e) => e ? e.summary === "valid" ? "demo.verdictValid" : e.summary === "valid-untrusted" ? "demo.verdictValidUntrusted" : e.summary === "invalid" ? e.modifications.basis === "working-copy" ? "demo.verdictWillInvalidate" : "demo.verdictInvalid" : "demo.verdictIndeterminate" : "demo.verdictIndeterminate", _ = (e, r) => { const a = new Date(e); return Number.isNaN(a.getTime()) ? e : a.toLocaleDateString(r, { @@ -175,4 +175,4 @@ function Q({ field: e }) { export { Z as SignatureInspector }; -//# sourceMappingURL=signature-inspector-DgkYwQHv-B4iHMa4u.js.map +//# sourceMappingURL=signature-inspector-DgkYwQHv-DecD2jME.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-maker-Lp7uuutB-fK8F7XzG.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-maker-Lp7uuutB-qzUGKTPq.js similarity index 98% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-maker-Lp7uuutB-fK8F7XzG.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-maker-Lp7uuutB-qzUGKTPq.js index 4bbffee8..ae04a7a8 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-maker-Lp7uuutB-fK8F7XzG.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signature-maker-Lp7uuutB-qzUGKTPq.js @@ -1,4 +1,4 @@ -import { u as E, ag as j, ab as B, ao as U, g as s, aB as G, h as t, j as z, Z as K, s as P, r as R, aD as O, aE as H, aF as F, aG as W, aH as Y, aI as $ } from "./wasm-url-asset-sqnq1cad.js"; +import { u as E, ag as j, ab as B, ao as U, g as s, aB as G, h as t, j as z, Z as K, s as P, r as R, aD as O, aE as H, aF as F, aG as W, aH as Y, aI as $ } from "./wasm-url-asset-Dc0HnHB_.js"; const J = [], k = { width: 360, height: 120 @@ -268,4 +268,4 @@ function Z() { export { Z as SignatureMakerModal }; -//# sourceMappingURL=signature-maker-Lp7uuutB-fK8F7XzG.js.map +//# sourceMappingURL=signature-maker-Lp7uuutB-qzUGKTPq.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signatures-panel-smWbAS42-BS1McmH7.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signatures-panel-smWbAS42-C8ccrvhV.js similarity index 99% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signatures-panel-smWbAS42-BS1McmH7.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signatures-panel-smWbAS42-C8ccrvhV.js index bd6ec156..55e971b4 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signatures-panel-smWbAS42-BS1McmH7.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/signatures-panel-smWbAS42-C8ccrvhV.js @@ -1,4 +1,4 @@ -import { u as k, ab as w, an as C, ao as E, ap as L, aq as N, a0 as z, ag as P, g as y, ar as I, r as S, ah as R, h as e, j as p, i as v, X as $, as as q, al as B, am as D } from "./wasm-url-asset-sqnq1cad.js"; +import { u as k, ab as w, an as C, ao as E, ap as L, aq as N, a0 as z, ag as P, g as y, ar as I, r as S, ah as R, h as e, j as p, i as v, X as $, as as q, al as B, am as D } from "./wasm-url-asset-Dc0HnHB_.js"; import { l as M, v as U } from "./signature-result-CiEN5nQw-3Y00fjuW.js"; const F = (t) => t.kind === "fqn" ? t.name : `#${t.objectNumber}`; function X() { @@ -222,4 +222,4 @@ function O() { export { X as SignaturesPanel }; -//# sourceMappingURL=signatures-panel-smWbAS42-BS1McmH7.js.map +//# sourceMappingURL=signatures-panel-smWbAS42-C8ccrvhV.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/stamps-panel-BfRJ9uBl-Cs7BhHXt.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/stamps-panel-BfRJ9uBl-CcPfGL64.js similarity index 98% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/stamps-panel-BfRJ9uBl-Cs7BhHXt.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/stamps-panel-BfRJ9uBl-CcPfGL64.js index 8c46f1d4..d016f02a 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/stamps-panel-BfRJ9uBl-Cs7BhHXt.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/stamps-panel-BfRJ9uBl-CcPfGL64.js @@ -1,4 +1,4 @@ -import { u as B, ab as H, ac as O, ad as W, ae as q, a0 as D, af as F, ag as U, s as V, g as u, r as w, ah as G, ai as J, aj as K, ak as M, h as t, S as Q, i as b, j as d, W as X, al as Y, am as Z } from "./wasm-url-asset-sqnq1cad.js"; +import { u as B, ab as H, ac as O, ad as W, ae as q, a0 as D, af as F, ag as U, s as V, g as u, r as w, ah as G, ai as J, aj as K, ak as M, h as t, S as Q, i as b, j as d, W as X, al as Y, am as Z } from "./wasm-url-asset-Dc0HnHB_.js"; const c = "all"; function te() { const r = B(), s = H(), { standard: f, sidebar: m, libraries: S } = O(), l = W({ kind: m ?? ["stamps"] }), k = q(), { activeToolId: L } = D(), { locale: A } = F(), j = U("stamps"), I = V(null), [C, h] = u(null), [g, p] = u(null), [x, n] = u(null), [P, v] = u(c), y = j.props?.libraryId; @@ -155,4 +155,4 @@ function _({ asset: r, armed: s, onArm: f }) { export { te as StampsPanel }; -//# sourceMappingURL=stamps-panel-BfRJ9uBl-Cs7BhHXt.js.map +//# sourceMappingURL=stamps-panel-BfRJ9uBl-CcPfGL64.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-DdhyGESj.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-DdhyGESj.js deleted file mode 100644 index dafbe04f..00000000 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-DdhyGESj.js +++ /dev/null @@ -1,290 +0,0 @@ -import { bj as j, aR as v, b0 as p, t as i, b8 as V, A as o, bk as T, a as y, bl as q, bm as d, aW as a, bn as K, bo as Y, aS as E, bp as m, b6 as D, O as g, bq as z, br as H, bs as R, bt as B, b9 as u, bu as N, b7 as P, b2 as x, bv as k, b1 as O, bw as _, I as F, M as Z, aT as J, f as Q, b3 as X } from "./wasm-url-asset-sqnq1cad.js"; -import { d as ee } from "./splice-DZQMGiQI.js"; -import { parseCmsInternal as te } from "./parse-Cv_kCMGz.js"; -import { C as b } from "./error-CbfoSMwv.js"; -function C(e) { - const n = new j({ - value: (e.signedAttrs?.attributes ?? []).map((t) => t.toSchema()) - }); - return new Uint8Array(n.toBER(!1)); -} -async function ce(e) { - let n; - try { - n = e instanceof Uint8Array ? te(e) : e; - } catch (r) { - return r instanceof b && r.reason === "unsupported" ? "unsupported" : "invalid"; - } - const t = await ne(n); - if (t === "invalid") return "invalid"; - const s = await se(n); - return s !== "valid" ? s : t === "unsupported" ? "unsupported" : "valid"; -} -async function ne(e) { - if (e.bindings.length === 0) return "absent"; - const n = v(); - let t = !1; - for (const s of e.bindings) { - if (!s.algorithm) continue; - const r = new Uint8Array( - await n.digest( - p[s.algorithm], - i(e.parsed.signerCertificate) - ) - ); - if (!V(r, s.certHash)) return "invalid"; - t = !0; - } - return t ? "valid" : "unsupported"; -} -async function se(e) { - const n = v(), { signerInfo: t, signerCertificate: s, digestAlgorithm: r } = e; - try { - return await n.verifyWithPublicKey( - i(C(t)), - t.signature, - s.subjectPublicKeyInfo, - t.signatureAlgorithm, - p[r] - ) ? "valid" : "invalid"; - } catch (h) { - const c = h.message ?? ""; - return /unsupported|unknown|not supported|not implemented/i.test(c) ? "unsupported" : "invalid"; - } -} -function $(e) { - const n = e.map((t) => ({ attribute: t, der: new Uint8Array(t.toSchema().toBER(!1)) })).sort((t, s) => ee(t.der, s.der)).map(({ attribute: t }) => t); - return new K({ type: 0, attributes: n }); -} -async function le(e) { - const n = v(); - if (e.digest.byteLength !== d[e.hash]) - throw new Error( - `digest is ${e.digest.byteLength} bytes; ${e.hash} needs ${d[e.hash]}` - ); - if (e.signer.hash !== e.hash) - throw new Error( - `the signer hashes with ${e.signer.hash}, the document was prepared with ${e.hash}` - ); - if (e.signer.certificateChain.length === 0) - throw new Error("the signer carries no certificate"); - const t = e.signer.certificateChain.map( - (l) => E.fromBER(i(l)) - ), s = t[0], r = [ - new m({ - type: a.contentType, - values: [new D({ value: a.data })] - }), - new m({ - type: a.messageDigest, - values: [new g({ valueHex: i(e.digest) })] - }) - ]; - if (e.profile === "pkcs7" && e.signingTime && r.push( - new m({ - type: a.signingTime, - values: [z(new Date(e.signingTime))] - }) - ), e.profile === "cades-b") { - const l = await n.digest( - "SHA-256", - i(e.signer.certificateChain[0]) - ), A = new H({ - issuer: new R({ - names: [new B({ type: 4, value: s.issuer })] - }), - serialNumber: s.serialNumber - }), f = new u({ - value: [new g({ valueHex: l }), A.toSchema()] - }); - r.push( - new m({ - type: a.signingCertificateV2, - values: [new u({ value: [new u({ value: [f] })] })] - }) - ); - } - const h = new o({ algorithmId: y[e.hash] }), c = new N({ - version: 1, - sid: new P({ - issuer: s.issuer, - serialNumber: s.serialNumber - }), - digestAlgorithm: h, - signedAttrs: $(r), - signatureAlgorithm: L(e.signer.algorithm, e.hash) - }), S = await e.signer.sign(C(c)); - c.signature = new g({ - valueHex: U(e.signer.algorithm, S) - }); - const I = new x({ - version: 1, - digestAlgorithms: [h], - encapContentInfo: new k({ eContentType: a.data }), - certificates: t, - signerInfos: [c] - }), w = new O({ - contentType: a.signedData, - content: I.toSchema(!0) - }); - return new Uint8Array(w.toSchema().toBER(!1)); -} -function U(e, n) { - return e === "ECDSA" ? Y(i(n)) : i(n); -} -function L(e, n) { - switch (e) { - case "RSA-PKCS1-v1_5": - return new o({ - algorithmId: { - sha256: a.sha256WithRsa, - sha384: a.sha384WithRsa, - sha512: a.sha512WithRsa - }[n], - algorithmParams: new T() - }); - case "ECDSA": - return new o({ - algorithmId: { sha256: a.ecdsaSha256, sha384: a.ecdsaSha384, sha512: a.ecdsaSha512 }[n] - }); - case "RSA-PSS": { - const t = new o({ - algorithmId: y[n], - algorithmParams: new T() - }), s = new q({ - hashAlgorithm: t, - maskGenAlgorithm: new o({ - algorithmId: a.mgf1, - algorithmParams: t.toSchema() - }), - saltLength: d[n] - }); - return new o({ - algorithmId: a.rsaPss, - algorithmParams: s.toSchema() - }); - } - } -} -function ae(e) { - const n = Q(i(e)); - if (n.offset === -1) throw new b("malformed", "TSTInfo is not valid BER"); - let t; - try { - t = new _({ schema: n.result }); - } catch (r) { - throw new b("malformed", `TSTInfo does not parse: ${r.message}`); - } - const s = X[t.messageImprint.hashAlgorithm.algorithmId]; - if (!s) - throw new b( - "unsupported", - `message imprint algorithm ${t.messageImprint.hashAlgorithm.algorithmId}` - ); - return { - imprintAlgorithm: s, - imprint: new Uint8Array(t.messageImprint.hashedMessage.valueBlock.valueHexView), - genTime: t.genTime, - policy: t.policy, - nonce: t.nonce ? G(t.nonce.valueBlock.valueHexView) : null - }; -} -function G(e) { - let n = 0; - for (; n < e.byteLength - 1 && e[n] === 0; ) n++; - return new Uint8Array(e.subarray(n)); -} -async function re(e) { - const n = v(); - if (e.digest.byteLength !== d[e.hash]) - throw new Error( - `digest is ${e.digest.byteLength} bytes; ${e.hash} needs ${d[e.hash]}` - ); - const t = E.fromBER( - i(e.authority.certificateChain[0]) - ), r = new _({ - version: 1, - policy: "1.3.6.1.4.1.57264.1.1", - messageImprint: new Z({ - hashAlgorithm: new o({ algorithmId: y[e.hash] }), - hashedMessage: new g({ valueHex: i(e.digest) }) - }), - serialNumber: new F({ valueHex: i(J()) }), - genTime: e.genTime ?? /* @__PURE__ */ new Date() - }).toSchema().toBER(!1), h = await n.digest(p[e.authority.hash], r), c = await n.digest( - "SHA-256", - i(e.authority.certificateChain[0]) - ), S = new H({ - issuer: new R({ - names: [new B({ type: 4, value: t.issuer })] - }), - serialNumber: t.serialNumber - }), I = [ - new m({ - type: a.contentType, - values: [new D({ value: a.tstInfo })] - }), - new m({ - type: a.messageDigest, - values: [new g({ valueHex: h })] - }), - new m({ - type: a.signingCertificateV2, - values: [ - new u({ - value: [ - new u({ - value: [ - new u({ - value: [new g({ valueHex: c }), S.toSchema()] - }) - ] - }) - ] - }) - ] - }) - ], w = new o({ - algorithmId: y[e.authority.hash] - }), l = new N({ - version: 1, - sid: new P({ - issuer: t.issuer, - serialNumber: t.serialNumber - }), - digestAlgorithm: w, - signedAttrs: $(I), - signatureAlgorithm: L(e.authority.algorithm, e.authority.hash) - }), A = await e.authority.sign(C(l)); - l.signature = new g({ - valueHex: U(e.authority.algorithm, A) - }); - const f = new k({ eContentType: a.tstInfo }); - f.eContent = new g({ valueHex: r }); - const M = new x({ - version: 3, - digestAlgorithms: [w], - encapContentInfo: f, - certificates: [t], - signerInfos: [l] - }), W = new O({ - contentType: a.signedData, - content: M.toSchema(!0) - }); - return new Uint8Array(W.toSchema().toBER(!1)); -} -const me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ - __proto__: null, - buildTimestampToken: re, - readTimestampInfo: ae, - withoutLeadingZeros: G -}, Symbol.toStringTag, { value: "Module" })); -export { - ce as a, - le as b, - ne as c, - ae as r, - me as t, - se as v -}; -//# sourceMappingURL=timestamp-DdhyGESj.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-YjVubp40.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-YjVubp40.js new file mode 100644 index 00000000..78452196 --- /dev/null +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-YjVubp40.js @@ -0,0 +1,309 @@ +import { bj as V, aR as b, b0 as v, t as i, b8 as q, A as c, bk as p, a as w, bl as K, bm as u, aW as s, bn as Y, bo as z, aS as T, bp as l, b6 as E, O as g, bq as F, br as H, bs as D, bt as R, b9 as m, bu as B, b7 as N, b2 as P, bv as U, b1 as x, bw as k, I as Z, M as J, aT as Q, f as X, b3 as ee } from "./wasm-url-asset-Dc0HnHB_.js"; +import { d as te } from "./splice-DZQMGiQI.js"; +import { parseCmsInternal as ne } from "./parse-BNZey3Fv.js"; +import { C as f } from "./error-CbfoSMwv.js"; +function I(e) { + const n = new V({ + value: (e.signedAttrs?.attributes ?? []).map((t) => t.toSchema()) + }); + return new Uint8Array(n.toBER(!1)); +} +async function le(e) { + let n; + try { + n = e instanceof Uint8Array ? ne(e) : e; + } catch (r) { + return r instanceof f && r.reason === "unsupported" ? "unsupported" : "invalid"; + } + const t = await ae(n); + if (t === "invalid") return "invalid"; + const a = await se(n); + return a !== "valid" ? a : t === "unsupported" ? "unsupported" : "valid"; +} +async function ae(e) { + if (e.bindings.length === 0) return "absent"; + const n = b(); + let t = !1; + for (const a of e.bindings) { + if (!a.algorithm) continue; + const r = new Uint8Array( + await n.digest( + v[a.algorithm], + i(e.parsed.signerCertificate) + ) + ); + if (!q(r, a.certHash)) return "invalid"; + t = !0; + } + return t ? "valid" : "unsupported"; +} +async function se(e) { + const n = b(), { signerInfo: t, signerCertificate: a, digestAlgorithm: r } = e; + try { + return await n.verifyWithPublicKey( + i(I(t)), + t.signature, + a.subjectPublicKeyInfo, + t.signatureAlgorithm, + v[r] + ) ? "valid" : "invalid"; + } catch (h) { + const o = h.message ?? ""; + return /unsupported|unknown|not supported|not implemented/i.test(o) ? "unsupported" : "invalid"; + } +} +function O(e) { + const n = e.map((t) => ({ attribute: t, der: new Uint8Array(t.toSchema().toBER(!1)) })).sort((t, a) => te(t.der, a.der)).map(({ attribute: t }) => t); + return new Y({ type: 0, attributes: n }); +} +async function me(e) { + const n = b(); + if (e.digest.byteLength !== u[e.hash]) + throw new Error( + `digest is ${e.digest.byteLength} bytes; ${e.hash} needs ${u[e.hash]}` + ); + if (e.signer.hash !== e.hash) + throw new Error( + `the signer hashes with ${e.signer.hash}, the document was prepared with ${e.hash}` + ); + const t = e.profile === "cades-b" && e.signer.certificateChain[0] ? new Uint8Array( + await n.digest("SHA-256", i(e.signer.certificateChain[0])) + ) : null, a = _({ ...e, certificateHash: t }), r = await e.signer.sign(I(a.signerInfo)); + return a.withSignature(r); +} +function ue(e) { + return _({ + ...e, + digest: new Uint8Array(u[e.hash]), + certificateHash: e.profile === "cades-b" ? new Uint8Array(32) : null + }).withSignature(new Uint8Array(e.signatureLength).fill(255)).byteLength; +} +function _(e) { + if (e.signer.certificateChain.length === 0) + throw new Error("the signer carries no certificate"); + const n = e.signer.certificateChain.map( + (o) => T.fromBER(i(o)) + ), t = n[0], a = [ + new l({ + type: s.contentType, + values: [new E({ value: s.data })] + }), + new l({ + type: s.messageDigest, + values: [new g({ valueHex: i(e.digest) })] + }) + ]; + if (e.profile === "pkcs7" && e.signingTime && a.push( + new l({ + type: s.signingTime, + values: [F(new Date(e.signingTime))] + }) + ), e.profile === "cades-b" && e.certificateHash) { + const o = new H({ + issuer: new D({ + names: [new R({ type: 4, value: t.issuer })] + }), + serialNumber: t.serialNumber + }), d = new m({ + value: [ + new g({ valueHex: i(e.certificateHash) }), + o.toSchema() + ] + }); + a.push( + new l({ + type: s.signingCertificateV2, + values: [new m({ value: [new m({ value: [d] })] })] + }) + ); + } + const r = new c({ algorithmId: w[e.hash] }), h = new B({ + version: 1, + sid: new N({ + issuer: t.issuer, + serialNumber: t.serialNumber + }), + digestAlgorithm: r, + signedAttrs: O(a), + signatureAlgorithm: $(e.signer.algorithm, e.hash) + }); + return { + signerInfo: h, + withSignature(o) { + h.signature = new g({ + valueHex: L(e.signer.algorithm, o) + }); + const d = new P({ + version: 1, + digestAlgorithms: [r], + encapContentInfo: new U({ eContentType: s.data }), + certificates: n, + signerInfos: [h] + }), y = new x({ + contentType: s.signedData, + content: d.toSchema(!0) + }); + return new Uint8Array(y.toSchema().toBER(!1)); + } + }; +} +function L(e, n) { + return e === "ECDSA" ? z(i(n)) : i(n); +} +function $(e, n) { + switch (e) { + case "RSA-PKCS1-v1_5": + return new c({ + algorithmId: { + sha256: s.sha256WithRsa, + sha384: s.sha384WithRsa, + sha512: s.sha512WithRsa + }[n], + algorithmParams: new p() + }); + case "ECDSA": + return new c({ + algorithmId: { sha256: s.ecdsaSha256, sha384: s.ecdsaSha384, sha512: s.ecdsaSha512 }[n] + }); + case "RSA-PSS": { + const t = new c({ + algorithmId: w[n], + algorithmParams: new p() + }), a = new K({ + hashAlgorithm: t, + maskGenAlgorithm: new c({ + algorithmId: s.mgf1, + algorithmParams: t.toSchema() + }), + saltLength: u[n] + }); + return new c({ + algorithmId: s.rsaPss, + algorithmParams: a.toSchema() + }); + } + } +} +function re(e) { + const n = X(i(e)); + if (n.offset === -1) throw new f("malformed", "TSTInfo is not valid BER"); + let t; + try { + t = new k({ schema: n.result }); + } catch (r) { + throw new f("malformed", `TSTInfo does not parse: ${r.message}`); + } + const a = ee[t.messageImprint.hashAlgorithm.algorithmId]; + if (!a) + throw new f( + "unsupported", + `message imprint algorithm ${t.messageImprint.hashAlgorithm.algorithmId}` + ); + return { + imprintAlgorithm: a, + imprint: new Uint8Array(t.messageImprint.hashedMessage.valueBlock.valueHexView), + genTime: t.genTime, + policy: t.policy, + nonce: t.nonce ? G(t.nonce.valueBlock.valueHexView) : null + }; +} +function G(e) { + let n = 0; + for (; n < e.byteLength - 1 && e[n] === 0; ) n++; + return new Uint8Array(e.subarray(n)); +} +async function ie(e) { + const n = b(); + if (e.digest.byteLength !== u[e.hash]) + throw new Error( + `digest is ${e.digest.byteLength} bytes; ${e.hash} needs ${u[e.hash]}` + ); + const t = T.fromBER( + i(e.authority.certificateChain[0]) + ), r = new k({ + version: 1, + policy: "1.3.6.1.4.1.57264.1.1", + messageImprint: new J({ + hashAlgorithm: new c({ algorithmId: w[e.hash] }), + hashedMessage: new g({ valueHex: i(e.digest) }) + }), + serialNumber: new Z({ valueHex: i(Q()) }), + genTime: e.genTime ?? /* @__PURE__ */ new Date() + }).toSchema().toBER(!1), h = await n.digest(v[e.authority.hash], r), o = await n.digest( + "SHA-256", + i(e.authority.certificateChain[0]) + ), d = new H({ + issuer: new D({ + names: [new R({ type: 4, value: t.issuer })] + }), + serialNumber: t.serialNumber + }), y = [ + new l({ + type: s.contentType, + values: [new E({ value: s.tstInfo })] + }), + new l({ + type: s.messageDigest, + values: [new g({ valueHex: h })] + }), + new l({ + type: s.signingCertificateV2, + values: [ + new m({ + value: [ + new m({ + value: [ + new m({ + value: [new g({ valueHex: o }), d.toSchema()] + }) + ] + }) + ] + }) + ] + }) + ], A = new c({ + algorithmId: w[e.authority.hash] + }), S = new B({ + version: 1, + sid: new N({ + issuer: t.issuer, + serialNumber: t.serialNumber + }), + digestAlgorithm: A, + signedAttrs: O(y), + signatureAlgorithm: $(e.authority.algorithm, e.authority.hash) + }), M = await e.authority.sign(I(S)); + S.signature = new g({ + valueHex: L(e.authority.algorithm, M) + }); + const C = new U({ eContentType: s.tstInfo }); + C.eContent = new g({ valueHex: r }); + const W = new P({ + version: 3, + digestAlgorithms: [A], + encapContentInfo: C, + certificates: [t], + signerInfos: [S] + }), j = new x({ + contentType: s.signedData, + content: W.toSchema(!0) + }); + return new Uint8Array(j.toSchema().toBER(!1)); +} +const de = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + buildTimestampToken: ie, + readTimestampInfo: re, + withoutLeadingZeros: G +}, Symbol.toStringTag, { value: "Module" })); +export { + le as a, + me as b, + ae as c, + ue as d, + re as r, + de as t, + se as v +}; +//# sourceMappingURL=timestamp-YjVubp40.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-protocol-DQ1E-rny.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-protocol-C2RoyYm6.js similarity index 93% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-protocol-DQ1E-rny.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-protocol-C2RoyYm6.js index 4a67993b..6cef7173 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-protocol-DQ1E-rny.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/timestamp-protocol-C2RoyYm6.js @@ -1,4 +1,4 @@ -import { T as c, I as u, M as f, t as o, O as d, A as h, a as p, f as g, b as w } from "./wasm-url-asset-sqnq1cad.js"; +import { T as c, I as u, M as f, t as o, O as d, A as h, a as p, f as g, b as w } from "./wasm-url-asset-Dc0HnHB_.js"; import { C as I } from "./error-CbfoSMwv.js"; import { c as v, r as A } from "./splice-DZQMGiQI.js"; function B(e) { @@ -54,4 +54,4 @@ export { B as buildTimestampRequest, S as readTimestampResponse }; -//# sourceMappingURL=timestamp-protocol-DQ1E-rny.js.map +//# sourceMappingURL=timestamp-protocol-C2RoyYm6.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/wasm-url-asset-sqnq1cad.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/wasm-url-asset-Dc0HnHB_.js similarity index 84% rename from src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/wasm-url-asset-sqnq1cad.js rename to src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/wasm-url-asset-Dc0HnHB_.js index 61409730..a29e168a 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/wasm-url-asset-sqnq1cad.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/chunks/wasm-url-asset-Dc0HnHB_.js @@ -4,7 +4,7 @@ var M3 = (e) => { }; var oY = (e, t, n) => t in e ? rY(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var et = (e, t, n) => oY(e, typeof t != "symbol" ? t + "" : t, n), TE = (e, t, n) => t.has(e) || M3("Cannot " + n); -var rt = (e, t, n) => (TE(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Vn = (e, t, n) => t.has(e) ? M3("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), gn = (e, t, n, r) => (TE(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), mn = (e, t, n) => (TE(e, t, "access private method"), n); +var ot = (e, t, n) => (TE(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Vn = (e, t, n) => t.has(e) ? M3("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), gn = (e, t, n, r) => (TE(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), mn = (e, t, n) => (TE(e, t, "access private method"), n); const q = { Unknown: "Unknown", InvalidArg: "InvalidArg", @@ -229,7 +229,7 @@ function iY(e) { var t = sY(e, "string"); return b0(t) == "symbol" ? t : t + ""; } -function fr(e, t, n) { +function hr(e, t, n) { return (t = iY(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, @@ -239,7 +239,7 @@ function fr(e, t, n) { } var J = class BF extends Error { constructor(t, n, r = {}) { - super(n ?? t, r.cause === void 0 ? void 0 : { cause: r.cause }), fr(this, "name", "EngineError"), fr(this, "code", void 0), fr(this, "details", void 0), this.code = t, this.details = r.details; + super(n ?? t, r.cause === void 0 ? void 0 : { cause: r.cause }), hr(this, "name", "EngineError"), hr(this, "code", void 0), hr(this, "details", void 0), this.code = t, this.details = r.details; } static is(t, n) { return !(t instanceof BF) && t?.name !== "EngineError" ? !1 : n === void 0 ? !0 : t.code === n; @@ -301,7 +301,7 @@ function lY(e) { function LP(e) { return e.type === "javascript" || e.type === "submit-form" || e.type === "uri" || (e.next ?? []).some(LP); } -function Fd(e) { +function $d(e) { return Object.values(e ?? {}).some((t) => t != null && !("root" in t) && LP(t)); } function LF(e) { @@ -473,16 +473,16 @@ function $F(e) { function fY(e) { return typeof e == "number" && Number.isInteger(e) && e > 0; } -function Lt(e) { +function Ft(e) { return { kind: "objectNumber", objectNumber: e }; } -function Vf(e, t) { +function Uf(e, t) { return e.kind === t.kind && e.objectNumber === t.objectNumber; } -function Gt(e) { +function Yt(e) { if (!fY(e.objectNumber)) throw new RangeError(`encodePageKey: objectNumber must be a positive integer, got ${e.objectNumber}`); return `obj:${e.objectNumber}`; } @@ -494,7 +494,7 @@ function oe(e) { return `base:${e.page.objectNumber}:${e.baseIndex}`; } } -const Om = [ +const Pm = [ "courier", "courier-bold", "courier-bold-oblique", @@ -527,11 +527,11 @@ function iv(e) { groupId: e }; } -function nm(e) { +function rm(e) { return e.kind === "group" ? e.groupId : null; } function w0(e, t) { - return nm(e) === nm(t) && e.kind === t.kind; + return rm(e) === rm(t) && e.kind === t.kind; } function KF(e) { return WF(HF(e) ?? { kind: "unassigned" }, e.kind); @@ -793,7 +793,7 @@ function RY(e, t) { page: t }; } -const Ph = (e, t) => e.replace(/\B(?=(\d{3})+(?!\d))/g, () => t), tV = (e, t) => t ? tV(t, e % t) : e; +const Th = (e, t) => e.replace(/\B(?=(\d{3})+(?!\d))/g, () => t), tV = (e, t) => t ? tV(t, e % t) : e; function nS(e) { const t = Math.fround(e.conversion ?? NaN); if (!Number.isFinite(t) || t <= 0) return !1; @@ -802,17 +802,17 @@ function nS(e) { } function TY(e, t) { const n = t.fraction ?? "decimal", r = t.thousands ?? ","; - if (n === "round") return Ph(String(Math.round(e)), r); - if (n === "truncate") return Ph(String(Math.trunc(e)), r); + if (n === "round") return Th(String(Math.round(e)), r); + if (n === "truncate") return Th(String(Math.trunc(e)), r); if (n === "fraction") { const a = t.precision ?? 16; let c = Math.floor(e), l = Math.round((e - c) * a); - if (l === a && (c++, l = 0), !l) return Ph(String(c), r); + if (l === a && (c++, l = 0), !l) return Th(String(c), r); const u = t.fixed ? 1 : tV(l, a); - return `${c ? `${Ph(String(c), r)} ` : ""}${l / u}/${a / u}`; + return `${c ? `${Th(String(c), r)} ` : ""}${l / u}/${a / u}`; } const o = Math.log10(t.precision ?? 100), [s, i = ""] = e.toFixed(o).split("."); - return Ph(s, r) + (i ? (t.decimal || ".") + i : ""); + return Th(s, r) + (i ? (t.decimal || ".") + i : ""); } function j3(e, t) { if (!Number.isFinite(e) || !t.length || !t.every(nS)) throw new J(q.InvalidArg, "Measurement requires a finite value and valid number formats"); @@ -820,8 +820,8 @@ function j3(e, t) { const r = []; for (const [o, s] of t.entries()) { if (n *= Math.fround(s.conversion), !Number.isFinite(n)) throw new J(q.InvalidArg, "Measurement overflow"); - const i = Math.floor(n), a = n - i, c = o === t.length - 1, l = c || a === 0, u = c ? TY(n, s) : Ph(String(i), s.thousands ?? ","), d = s.labelPosition === "prefix", f = s.prefixSpacing ?? (d && o === 0 ? "" : " "), h = s.suffixSpacing ?? (!d && l ? "" : " "), g = f + s.unit + h; - if (r.push(d ? g + u : u + g), l) break; + const i = Math.floor(n), a = n - i, c = o === t.length - 1, l = c || a === 0, u = c ? TY(n, s) : Th(String(i), s.thousands ?? ","), f = s.labelPosition === "prefix", d = s.prefixSpacing ?? (f && o === 0 ? "" : " "), h = s.suffixSpacing ?? (!f && l ? "" : " "), g = d + s.unit + h; + if (r.push(f ? g + u : u + g), l) break; n = a; } return (e < 0 ? "-" : "") + r.join(""); @@ -897,7 +897,7 @@ const ui = { weight: 400, italic: !1 } -}, gs = (e) => Om.includes(e); +}, gs = (e) => Pm.includes(e); function VP(e, t) { if (gs(e)) { const r = ui[e]; @@ -914,7 +914,7 @@ function VP(e, t) { italic: n.italic } : { family: e }; } -function Cf(e) { +function Nf(e) { return e.toLowerCase().replace(/[\s\-_'"]/g, ""); } const nV = { @@ -936,19 +936,19 @@ const nV = { dingbats: "ZapfDingbats" }; function $P(e) { - return nV[Cf(e)]; + return nV[Nf(e)]; } function UP(e, t) { const n = t?.(e.family, e.weight, e.italic); if (n !== void 0) return n; - const r = nV[Cf(e.family)]; + const r = nV[Nf(e.family)]; if (r) { const o = Object.entries(ui), s = e.weight >= 600, i = o.find(([, a]) => a.family === r && a.weight >= 600 === s && a.italic === e.italic) ?? o.find(([, a]) => a.family === r); if (i) return i[0]; } return e.family; } -function cl(e) { +function ll(e) { const t = UP({ family: $P(e.family) ?? "Helvetica", weight: e.weight ?? 400, @@ -996,12 +996,12 @@ function MY(e) { function oV(e, t) { const n = KP(t); if (n !== null) return HP(e, n); - const r = t * Math.PI / 180, o = Math.abs(Math.cos(r)), s = Math.abs(Math.sin(r)), i = e.right - e.left, a = e.top - e.bottom, c = (i * o + a * s) / 2, l = (i * s + a * o) / 2, u = (e.left + e.right) / 2, d = (e.bottom + e.top) / 2; + const r = t * Math.PI / 180, o = Math.abs(Math.cos(r)), s = Math.abs(Math.sin(r)), i = e.right - e.left, a = e.top - e.bottom, c = (i * o + a * s) / 2, l = (i * s + a * o) / 2, u = (e.left + e.right) / 2, f = (e.bottom + e.top) / 2; return { left: u - c, - bottom: d - l, + bottom: f - l, right: u + c, - top: d + l + top: f + l }; } function KP(e) { @@ -1094,7 +1094,7 @@ const k0 = { align: "left", dir: "ltr" }; -function rm(e) { +function om(e) { return aV(e.paragraphs.map((t) => t.runs.map((n) => n.text).join("")).join(` `), ` `); @@ -2199,9 +2199,9 @@ function qP(e) { function Ha(e) { return Object.prototype.hasOwnProperty.call(rS, e) ? rS[e] : null; } -const Pm = qP((e) => Object.keys(e.owners)); +const Rm = qP((e) => Object.keys(e.owners)); qP((e) => e.resources); -const om = qP((e) => e.spaces), VY = Object.assign({}, ...Object.values(om)), $Y = [[ +const sm = qP((e) => e.spaces), VY = Object.assign({}, ...Object.values(sm)), $Y = [[ "highlight", "underline", "squiggly", @@ -2293,14 +2293,14 @@ const uV = /* @__PURE__ */ new Set(["link", "widget"]), UY = 1e-3, KY = /* @__PU link: ["rect"], widget: ["box"] }, JP = (e, t) => Math.abs(e - t) <= UY, F3 = (e) => typeof e == "number" ? (e % 360 + 360) % 360 : 0; -function Fo(e, t) { +function Vo(e, t) { if (e == null || t == null) return e == null && t == null; if (typeof e == "number" && typeof t == "number") return JP(e, t); if (Array.isArray(e) || Array.isArray(t)) - return !Array.isArray(e) || !Array.isArray(t) || e.length !== t.length ? !1 : e.every((n, r) => Fo(n, t[r])); + return !Array.isArray(e) || !Array.isArray(t) || e.length !== t.length ? !1 : e.every((n, r) => Vo(n, t[r])); if (typeof e == "object" && typeof t == "object") { const n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]); - for (const r of n) if (!Fo(e[r], t[r])) return !1; + for (const r of n) if (!Vo(e[r], t[r])) return !1; return !0; } return e === t; @@ -2342,8 +2342,8 @@ function WY(e, t, n, r) { if (!JP(F3(e.rotation), F3(l))) return null; } for (const l of r) { - const u = e[l], d = t[l]; - if (!(u == null && d == null) && (u == null || d == null || !zI(u, d, a, c))) + const u = e[l], f = t[l]; + if (!(u == null && f == null) && (u == null || f == null || !zI(u, f, a, c))) return null; } return { @@ -2372,11 +2372,11 @@ function fV(e, t) { "polygon", "polyline" ].includes(o) && s === !0, a = []; - for (const [d, f] of Object.entries(r)) - f === void 0 || KY.has(d) || d === "contents" && !i || Fo(f, n[d]) || a.push(d); + for (const [f, d] of Object.entries(r)) + d === void 0 || KY.has(f) || f === "contents" && !i || Vo(d, n[f]) || a.push(f); if (a.length === 0) return GY; const c = dV[o], l = c && (o === "polygon" || o === "polyline") && n.captionCenter ? [...c, "captionCenter"] : c; - if (!l || !a.every((d) => l.includes(d))) return a1; + if (!l || !a.every((f) => l.includes(f))) return a1; const u = WY(n, r, o, l); return u ? { impact: "translation", @@ -2389,21 +2389,21 @@ function JY(e) { function Dx(e, t) { const n = new Map(e.map((u) => [oe(u.ref), u])), r = n.get(oe(t)); if (!r) return []; - const o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i = (u, d, f) => u.set(d, [...u.get(d) ?? [], f]); + const o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i = (u, f, d) => u.set(f, [...u.get(f) ?? [], d]); for (const u of e) { - const d = u.reply ? n.get(oe(u.reply.to)) : void 0; - d && d !== u && i(o, d, u); - const f = u.subtype === "popup" && u.parent ? n.get(oe(u.parent)) : void 0; - f && f !== u && i(s, f, u); + const f = u.reply ? n.get(oe(u.reply.to)) : void 0; + f && f !== u && i(o, f, u); + const d = u.subtype === "popup" && u.parent ? n.get(oe(u.parent)) : void 0; + d && d !== u && i(s, d, u); const h = u.popup ? n.get(oe(u.popup)) : void 0; h && h !== u && h.subtype === "popup" && i(s, u, h); } const a = [], c = /* @__PURE__ */ new Set(), l = (u) => { if (!c.has(u)) { c.add(u); - for (const d of o.get(u) ?? []) l(d); - for (const d of s.get(u) ?? []) - c.has(d) || (c.add(d), a.push(d)); + for (const f of o.get(u) ?? []) l(f); + for (const f of s.get(u) ?? []) + c.has(f) || (c.add(f), a.push(f)); a.push(u); } }; @@ -2434,23 +2434,23 @@ function ZY(e, t = {}) { if (!l.reply) continue; const u = r.get(oe(l.reply.to)); if (!u) continue; - const d = oe(u.ref), f = s.get(d); - f ? f.push(l) : s.set(d, [l]); + const f = oe(u.ref), d = s.get(f); + d ? d.push(l) : s.set(f, [l]); } const i = /* @__PURE__ */ new Set(), a = [], c = (l) => { - const u = [], d = [], f = []; + const u = [], f = [], d = []; i.add(oe(l.ref)); const h = [...s.get(oe(l.ref)) ?? []]; for (; h.length > 0; ) { const g = h.pop(), p = oe(g.ref); - i.has(p) || (i.add(p), BE(g) ? f.push(g) : JY(g) === "grouped-subordinate" ? d.push(g) : u.push(g), h.push(...s.get(p) ?? [])); + i.has(p) || (i.add(p), BE(g) ? d.push(g) : JY(g) === "grouped-subordinate" ? f.push(g) : u.push(g), h.push(...s.get(p) ?? [])); } - u.sort(o), f.sort(o), a.push({ + u.sort(o), d.sort(o), a.push({ root: l, page: l.page, replies: u, - groupedParts: d, - review: tQ(f, t) + groupedParts: f, + review: tQ(d, t) }); }; for (const l of n) !l.reply && !BE(l) && c(l); @@ -2532,15 +2532,15 @@ const jx = /* @__PURE__ */ new Set([ "calloutLine" ]); function QP(e) { - return [...Object.entries(om[e]).filter(([t, n]) => t !== "rect" && rQ.has(n)).map(([t]) => t), "rotation"]; + return [...Object.entries(sm[e]).filter(([t, n]) => t !== "rect" && rQ.has(n)).map(([t]) => t), "rotation"]; } function oQ(e, t) { const n = e.subtype; if (!jx.has(n)) return { rect: t }; - const r = $w(t), o = $w(e.rect), s = r.right - r.left, i = r.top - r.bottom, a = o.right - o.left, c = o.top - o.bottom, l = Fo(s, a), u = Fo(i, c); + const r = $w(t), o = $w(e.rect), s = r.right - r.left, i = r.top - r.bottom, a = o.right - o.left, c = o.top - o.bottom, l = Vo(s, a), u = Vo(i, c); if (!l && s <= 0 || !u && i <= 0) throw LE(n, "a rect needs a width and a height"); - const d = e.rotation ?? 0, f = om[n], h = f.box === "box" ? KP(d) : null; - if (!Fo((d % 360 + 360) % 360, 0) && h === null && (!l || !u)) + const f = e.rotation ?? 0, d = sm[n], h = d.box === "box" ? KP(f) : null; + if (!Vo((f % 360 + 360) % 360, 0) && h === null && (!l || !u)) throw LE(n, "a turned drawing's rect can only move; resize its shape instead"); if (!l && a <= 0 || !u && c <= 0) throw LE(n, "its rect has no width or height to stretch; it can only move"); const g = l ? 1 : s / a, p = u ? 1 : i / c, m = (k) => ({ @@ -2578,7 +2578,7 @@ function oQ(e, t) { calloutLine: (k) => k.map(m) }, C = {}; for (const k of QP(n)) { - const N = e[k], w = f[k]; + const N = e[k], w = d[k]; N != null && w && (C[k] = S[w](N)); } return C; @@ -2600,13 +2600,13 @@ function sQ(e) { sy: o } : null; } -const If = (e) => ({ +const Of = (e) => ({ x: Math.fround(e.x), y: Math.fround(e.y) }); function V3(e, t, n) { let r = 0; - const o = e.map(If); + const o = e.map(Of); for (let s = 0; s < (t ? o.length : o.length - 1); s++) { const i = o[s], a = o[(s + 1) % o.length]; r += Math.hypot((a.x - i.x) * n.sx, (a.y - i.y) * n.sy); @@ -2615,7 +2615,7 @@ function V3(e, t, n) { } function hV(e, t) { if (e.length < 3) return 0; - const n = e.map(If), r = n[0]; + const n = e.map(Of), r = n[0]; let o = 0; for (let s = 1; s < n.length - 1; s++) { const i = n[s], a = n[s + 1]; @@ -2624,7 +2624,7 @@ function hV(e, t) { return Math.abs(o * t.sx * t.sy) / 2; } function iQ(e) { - const t = e.map(If), n = (s, i) => s.x === i.x && s.y === i.y; + const t = e.map(Of), n = (s, i) => s.x === i.x && s.y === i.y; if (t.length > 1 && n(t[0], t[t.length - 1]) && t.pop(), t.length < 3 || hV(t, { sx: 1, sy: 1 @@ -2637,18 +2637,18 @@ function iQ(e) { if (r(i, a, c) === 0 && l) return !1; for (let u = s + 1; u < t.length; u++) { if (u === s + 1 || s === 0 && u === t.length - 1) continue; - const d = t[u], f = t[(u + 1) % t.length]; - if (o(i, a, d) || o(i, a, f) || o(d, f, i) || o(d, f, a) || Math.sign(r(i, a, d)) !== Math.sign(r(i, a, f)) && Math.sign(r(d, f, i)) !== Math.sign(r(d, f, a))) return !1; + const f = t[u], d = t[(u + 1) % t.length]; + if (o(i, a, f) || o(i, a, d) || o(f, d, i) || o(f, d, a) || Math.sign(r(i, a, f)) !== Math.sign(r(i, a, d)) && Math.sign(r(f, d, i)) !== Math.sign(r(f, d, a))) return !1; } } return !0; } -function sm(e) { +function im(e) { return e.subtype === "line" && e.intent === "line-dimension" || e.subtype === "polyline" && e.intent === "polyline-dimension" || e.subtype === "polygon" && e.intent === "polygon-dimension"; } -const Rm = (e) => !("unavailable" in e); +const Tm = (e) => !("unavailable" in e); function Ba(e) { - if (!sm(e)) return { unavailable: "not-dimension" }; + if (!im(e)) return { unavailable: "not-dimension" }; if (!e.measure) return { unavailable: "no-measure" }; if (e.measure.subtype !== "rectilinear") return { unavailable: "foreign-measure" }; const t = e.measure, n = sQ(t); @@ -2674,7 +2674,7 @@ function Ba(e) { } function aQ(e) { const t = Ba(e); - return Rm(t) && e.contents !== t.label ? { + return Tm(t) && e.contents !== t.label ? { ...e, contents: t.label } : e; @@ -2760,7 +2760,7 @@ function GI(e, t) { } function dQ(e, t, n) { if (e.length !== t.length || e.length < 2) return; - const r = e[0], o = t[0], s = e.findIndex((f) => Math.hypot(f.x - r.x, f.y - r.y) > 1e-6); + const r = e[0], o = t[0], s = e.findIndex((d) => Math.hypot(d.x - r.x, d.y - r.y) > 1e-6); if (s < 0) return; const i = { x: e[s].x - r.x, @@ -2770,15 +2770,15 @@ function dQ(e, t, n) { y: t[s].y - o.y }, c = i.x * i.x + i.y * i.y, l = (i.x * a.x + i.y * a.y) / c, u = (i.x * a.y - i.y * a.x) / c; if (Math.abs(l * l + u * u - 1) > 1e-5) return; - const d = (f) => ({ - x: o.x + l * (f.x - r.x) - u * (f.y - r.y), - y: o.y + u * (f.x - r.x) + l * (f.y - r.y) + const f = (d) => ({ + x: o.x + l * (d.x - r.x) - u * (d.y - r.y), + y: o.y + u * (d.x - r.x) + l * (d.y - r.y) }); - if (e.every((f, h) => { - const g = d(f); + if (e.every((d, h) => { + const g = f(d); return Math.hypot(g.x - t[h].x, g.y - t[h].y) <= 1e-3; })) - return d(n); + return f(n); } function fQ(e) { if (!uQ(e.subtype)) return e; @@ -2840,7 +2840,7 @@ function hQ(e, t) { ...e, ...r }); - Rm(o) && (r = { + Tm(o) && (r = { ...r, contents: o.label }); @@ -2849,18 +2849,18 @@ function hQ(e, t) { } function pV(e) { if (!(e.richText === void 0 || e.richText === null) && !(e.contents === void 0 || e.contents === null) && aV(e.contents, ` -`) !== rm(e.richText)) +`) !== om(e.richText)) throw new J(q.InvalidArg, `${e.subtype ?? "annotation"}: \`contents\` must equal the plain projection of \`richText\` when both are given`); } function gV(e) { - return e === void 0 || e === "free-text" ? !1 : Pm[e]?.includes("richText") ?? !1; + return e === void 0 || e === "free-text" ? !1 : Rm[e]?.includes("richText") ?? !1; } function pQ(e) { if (!gV(e.subtype)) return e; const { richText: t } = e; return t ? { ...e, - contents: rm(t) + contents: om(t) } : e; } function gQ(e, t) { @@ -2868,7 +2868,7 @@ function gQ(e, t) { const { richText: n } = t; if (n) return { ...t, - contents: rm(n) + contents: om(n) }; if (n === null || t.contents === void 0 || !e.richText) return t; if (t.contents === null) return { @@ -2879,10 +2879,10 @@ function gQ(e, t) { return { ...t, richText: r, - contents: rm(r) + contents: om(r) }; } -const JI = "#ff0000", Dk = "#000000", DE = "#ffff00", Eo = { +const JI = "#ff0000", Dk = "#000000", DE = "#ffff00", Co = { invisible: !1, hidden: !1, print: !0, @@ -2894,8 +2894,8 @@ const JI = "#ff0000", Dk = "#000000", DE = "#ffff00", Eo = { toggleNoView: !1, lockedContents: !1, blendMode: "normal" -}, oh = { - ...Eo, +}, ih = { + ...Co, color: JI, opacity: 1, strokeWidth: 1, @@ -2904,26 +2904,26 @@ const JI = "#ff0000", Dk = "#000000", DE = "#ffff00", Eo = { start: "none", end: "none" }, jE = { - ...Eo, + ...Co, color: Dk, opacity: 1 }, mQ = { - square: oh, - circle: oh, + square: ih, + circle: ih, line: { - ...oh, + ...ih, lineEndings: $3, captionEnabled: !1, captionPosition: "inline" }, - polygon: oh, + polygon: ih, polyline: { - ...oh, + ...ih, lineEndings: $3 }, - ink: oh, + ink: ih, highlight: { - ...Eo, + ...Co, blendMode: "multiply", color: DE, opacity: 1 @@ -2932,12 +2932,12 @@ const JI = "#ff0000", Dk = "#000000", DE = "#ffff00", Eo = { squiggly: jE, strikeout: jE, caret: { - ...Eo, + ...Co, color: JI, opacity: 1 }, "free-text": { - ...Eo, + ...Co, contents: "", intent: "free-text", fontFamily: "helvetica", @@ -2951,21 +2951,21 @@ const JI = "#ff0000", Dk = "#000000", DE = "#ffff00", Eo = { borderStyle: "solid" }, text: { - ...Eo, + ...Co, icon: "note", open: !1, color: DE, opacity: 1 }, "file-attachment": { - ...Eo, + ...Co, icon: "paperclip", color: DE, opacity: 1 }, - link: Eo, + link: Co, redact: { - ...Eo, + ...Co, quadPoints: [], color: JI, opacity: 1, @@ -2976,18 +2976,18 @@ const JI = "#ff0000", Dk = "#000000", DE = "#ffff00", Eo = { textAlign: "left" }, stamp: { - ...Eo, + ...Co, fit: "contain", opacity: 1 }, widget: { - ...Eo, + ...Co, strokeWidth: 1, borderStyle: "solid", textAlign: "left" }, popup: { - ...Eo, + ...Co, print: !1, open: !1 } @@ -3067,7 +3067,7 @@ function kQ(e, t, n) { ...r, ...vQ(i, e, r), richText: a, - ...s ? { contents: rm(a) } : {} + ...s ? { contents: om(a) } : {} }; } function AQ(e, t) { @@ -3096,17 +3096,17 @@ function SQ(e, t) { ...e, intent: n, richText: r, - contents: rm(r) + contents: om(r) }; } function kV(e, t) { const { rect: n, ...r } = t; if (n === void 0 || !jx.has(e.subtype)) return t; if (!rV(n)) throw new J(q.InvalidArg, `${e.subtype} update field 'rect': not a rect of finite numbers`, { details: { field: "rect" } }); - if (Fo($w(n), e.rect)) return r; + if (Vo($w(n), e.rect)) return r; const o = e, s = QP(e.subtype).find((u) => { - const d = t[u]; - return d !== void 0 && !Fo(d, o[u]); + const f = t[u]; + return f !== void 0 && !Vo(f, o[u]); }); if (s) throw new J(q.InvalidArg, `${e.subtype} update field 'rect': a new rect moves the shape, so it can't come with a new '${s}'`, { details: { field: "rect" } }); const { left: i, bottom: a, right: c, top: l } = n; @@ -3133,7 +3133,7 @@ function xQ(e, t) { } function EQ(e, t) { const n = e; - return AV(t, (r, o) => o !== void 0 && Fo(o, n[r])); + return AV(t, (r, o) => o !== void 0 && Vo(o, n[r])); } function SV(e) { return new J(q.InvalidArg, `text: the custom state '${e}' needs a stateModel`, { details: { field: "stateModel" } }); @@ -3158,7 +3158,7 @@ function IQ(e, t) { return t; } function xV(e, t) { - const n = Pm[e], r = Object.keys(t).filter((o) => o !== "subtype" && !n.includes(o)); + const n = Rm[e], r = Object.keys(t).filter((o) => o !== "subtype" && !n.includes(o)); if (r.length > 0) throw new J(q.InvalidArg, `${e} has no field ${r.map((o) => `'${o}'`).join(", ")}`); } function NQ(e) { @@ -3194,7 +3194,7 @@ function MQ(e, t, n = {}) { return TQ(e, RQ(e, t), n); } function BQ(e) { - if (om[e.subtype]?.box !== "box") return e; + if (sm[e.subtype]?.box !== "box") return e; const t = e; if (t.box !== void 0) return e; if (t.rect === void 0) throw new J(q.InvalidArg, `${e.subtype} create: give its \`box\`, or its \`rect\` with a quarter turn`, { details: { field: "box" } }); @@ -3231,29 +3231,29 @@ function DQ(e, t = {}) { function jQ(e, t = {}) { return DQ(LQ(e), t); } -var Lo = class extends J { +var Do = class extends J { constructor(e, t) { super(q.InvalidArg, `invalid scope "${e}": ${t}`, { details: { scope: e, reason: t - } }), this.scope = e, fr(this, "name", "InvalidScope"); + } }), this.scope = e, hr(this, "name", "InvalidScope"); } -}, po = class extends J { +}, go = class extends J { constructor(e, t, n, r) { super(q.Forbidden, `permission denied${t ? ` (${t})` : ""}: ${n ? `one of ${n.join(", ")}` : e}${r ? ` for ${r.length} annotation${r.length === 1 ? "" : "s"}` : ""}`, { details: { required: e, ...t === void 0 ? {} : { context: t }, ...n === void 0 ? {} : { anyOf: [...n] }, ...r === void 0 ? {} : { refs: [...r] } - } }), this.required = e, this.context = t, this.anyOf = n, this.refs = r, fr(this, "name", "PermissionDenied"); + } }), this.required = e, this.context = t, this.anyOf = n, this.refs = r, hr(this, "name", "PermissionDenied"); } }, FQ = class extends J { constructor(e) { - super(q.InvalidArg, `scope "${e}" requires an identity (userId and/or groups)`, { details: { scope: e } }), this.scope = e, fr(this, "name", "MissingIdentity"); + super(q.InvalidArg, `scope "${e}" requires an identity (userId and/or groups)`, { details: { scope: e } }), this.scope = e, hr(this, "name", "MissingIdentity"); } }, Kw = class extends J { constructor(e) { - super(q.Aborted, VQ(e)), fr(this, "name", "AbortError"), fr(this, "reason", void 0), this.reason = e; + super(q.Aborted, VQ(e)), hr(this, "name", "AbortError"), hr(this, "reason", void 0), this.reason = e; } }; function VQ(e) { @@ -3276,18 +3276,18 @@ var se = class jk extends Promise { const n = new AbortController(), r = /* @__PURE__ */ new Set(), o = { settled: !1 }; let s; super((i, a) => { - s = a, t((d) => { - o.settled || (o.settled = !0, i(d)); - }, (d) => { - o.settled || (o.settled = !0, a(d)); - }, (d) => { + s = a, t((f) => { + o.settled || (o.settled = !0, i(f)); + }, (f) => { + o.settled || (o.settled = !0, a(f)); + }, (f) => { if (!o.settled) - for (const f of r) try { - f(d); + for (const d of r) try { + d(f); } catch { } }, n.signal); - }), fr(this, "signal", void 0), fr(this, "_ctrl", void 0), fr(this, "_progressCbs", void 0), fr(this, "_state", void 0), fr(this, "_internalReject", void 0), this._ctrl = n, this.signal = n.signal, this._progressCbs = r, this._state = o, this._internalReject = s; + }), hr(this, "signal", void 0), hr(this, "_ctrl", void 0), hr(this, "_progressCbs", void 0), hr(this, "_state", void 0), hr(this, "_internalReject", void 0), this._ctrl = n, this.signal = n.signal, this._progressCbs = r, this._state = o, this._internalReject = s; } /** * Abort the underlying operation. @@ -3360,8 +3360,8 @@ var se = class jk extends Promise { }; function e6(e, t) { const { includeAnnotations: n, includeFormFields: r } = e ?? {}; - if (n === !0 && !t.annotations) throw new po("doc.annotate.read", "includeAnnotations"); - if (r === !0 && !t.formFields) throw new po("doc.forms.read", "includeFormFields"); + if (n === !0 && !t.annotations) throw new go("doc.annotate.read", "includeAnnotations"); + if (r === !0 && !t.formFields) throw new go("doc.forms.read", "includeFormFields"); return { includeAnnotations: n ?? t.annotations, includeFormFields: r ?? (n === !1 ? !1 : t.formFields) @@ -3371,10 +3371,10 @@ function $Q(e, t) { const { usage: n, viewport: r } = e ?? {}; if (n === void 0 || n === "display") { if (r?.kind === "dpi" && cy("viewport", 'a dpi viewport is only for a print picture (usage: "print")'), r?.kind === "thumbnail") { - if (e?.target !== void 0 && e.target.kind !== "page" && cy("target", "a thumbnail is the whole page: it takes no target"), t !== null && !t.thumbnail) throw new po("doc.render.thumbnail", "viewport"); + if (e?.target !== void 0 && e.target.kind !== "page" && cy("target", "a thumbnail is the whole page: it takes no target"), t !== null && !t.thumbnail) throw new go("doc.render.thumbnail", "viewport"); return; } - if (t !== null && !t.render) throw new po("doc.render", "usage"); + if (t !== null && !t.render) throw new go("doc.render", "usage"); return; } n !== "print" && cy("usage", 'usage must be "display" or "print"'), (r?.kind !== "dpi" || r.dpi !== 150 && r.dpi !== 300) && cy("viewport", "a print picture needs viewport: { kind: 'dpi', dpi: 150 or 300 }"); @@ -3384,8 +3384,8 @@ function $Q(e, t) { "background" ]) e?.[o] !== void 0 && cy(o, `a print picture takes no ${o}: it is the whole page, upright, on white`); if (t !== null) { - if (!t.print) throw new po("doc.print", "usage"); - if (r.dpi === 300 && !t.printHigh) throw new po("doc.print.high", "viewport"); + if (!t.print) throw new go("doc.print", "usage"); + if (r.dpi === 300 && !t.printHigh) throw new go("doc.print.high", "viewport"); } } function cy(e, t) { @@ -3578,7 +3578,7 @@ function GQ([e, t, n, r, o, s]) { (t * o - e * s) / i ]; } -function hu(e, { x: t, y: n }) { +function pu(e, { x: t, y: n }) { return { x: e[0] * t + e[2] * n + e[4], y: e[1] * t + e[3] * n + e[5] @@ -3586,13 +3586,13 @@ function hu(e, { x: t, y: n }) { } function K3(e, t) { if ("upperLeft" in t) return { - upperLeft: hu(e, t.upperLeft), - upperRight: hu(e, t.upperRight), - lowerLeft: hu(e, t.lowerLeft), - lowerRight: hu(e, t.lowerRight) + upperLeft: pu(e, t.upperLeft), + upperRight: pu(e, t.upperRight), + lowerLeft: pu(e, t.lowerLeft), + lowerRight: pu(e, t.lowerRight) }; if ("width" in t) { - const n = hu(e, t), r = hu(e, { + const n = pu(e, t), r = pu(e, { x: t.x + t.width, y: t.y + t.height }); @@ -3603,7 +3603,7 @@ function K3(e, t) { height: Math.abs(r.y - n.y) }; } - return hu(e, t); + return pu(e, t); } function ns(e, t) { return { @@ -3653,7 +3653,7 @@ function YQ(e, t) { const ms = (e) => ({ x: e.x, y: -e.y -}), Nd = (e) => ({ +}), Pd = (e) => ({ x: e.x, y: -e.y }), Hw = (e) => ({ @@ -3672,10 +3672,10 @@ const ms = (e) => ({ lowerLeft: ms(e.lowerLeft), lowerRight: ms(e.lowerRight) }), H3 = (e) => ({ - upperLeft: Nd(e.upperLeft), - upperRight: Nd(e.upperRight), - lowerLeft: Nd(e.lowerLeft), - lowerRight: Nd(e.lowerRight) + upperLeft: Pd(e.upperLeft), + upperRight: Pd(e.upperRight), + lowerLeft: Pd(e.lowerLeft), + lowerRight: Pd(e.lowerRight) }); function LV(e) { return "rotation" in e; @@ -3693,7 +3693,7 @@ function z3(e) { const t = new ArrayBuffer(e.byteLength); return new Uint8Array(t).set(e), t; } -async function Vo(e) { +async function $o(e) { if (e instanceof Uint8Array) return { bytes: z3(e) }; if (QQ(e)) { const i = QI(e); @@ -3722,7 +3722,7 @@ function QI(e) { const t = e.name; return typeof t == "string" && t.length > 0 ? t : void 0; } -function im(e) { +function am(e) { if (e.byteLength < 4) return null; const t = new Uint8Array(e); return t[0] === 137 && t[1] === 80 && t[2] === 78 && t[3] === 71 ? XQ(e) : t[0] === 255 && t[1] === 216 && t[2] === 255 ? ZQ(e) : t[0] === 37 && t[1] === 80 && t[2] === 68 && t[3] === 70 ? { mimeType: "application/pdf" } : null; @@ -3761,7 +3761,7 @@ function ZQ(e) { return null; } const Fk = ["appearance", "file"]; -async function cg(e) { +async function lg(e) { if (!e) return {}; for (const n of Object.keys(e)) if (!Fk.includes(n)) throw new J(q.InvalidArg, `unknown annotation resource '${n}'; expected ${Fk.join(" or ")}`); const t = {}; @@ -3773,7 +3773,7 @@ async function cg(e) { } async function DV(e, t) { const n = await VV(e); - if (!im(n)) throw new J(q.InvalidArg, `${t} must be PNG, JPEG or one-page PDF bytes`); + if (!am(n)) throw new J(q.InvalidArg, `${t} must be PNG, JPEG or one-page PDF bytes`); return n; } function jV(e, t) { @@ -3927,13 +3927,13 @@ function W3(e, t) { }; } case "fitR": { - const { left: i, bottom: a, right: c, top: l, ...u } = e, d = Math.min(a, l), f = Math.max(a, l); + const { left: i, bottom: a, right: c, top: l, ...u } = e, f = Math.min(a, l), d = Math.max(a, l); return { ...u, x: Math.min(i, c) - n, - y: r - f, + y: r - d, width: Math.abs(c - i), - height: f - d + height: d - f }; } case "fit": @@ -3969,13 +3969,13 @@ function q3(e, t) { }; } case "fitR": { - const { x: i, y: a, width: c, height: l, ...u } = e, d = r - a; + const { x: i, y: a, width: c, height: l, ...u } = e, f = r - a; return { ...u, left: i + n, - bottom: d - l, + bottom: f - l, right: i + n + c, - top: d + top: f }; } case "fit": @@ -4059,7 +4059,7 @@ const QV = { measure: (e, { visible: t }) => iX(e, t), linkTarget: (e, { boxOf: t }) => WV(e, (n) => q3(n, t)), actions: (e, { boxOf: t }) => JV(e, (n) => q3(n, t)) -}, aX = (e) => e === void 0 ? VY : om[e] ?? om.unsupported; +}, aX = (e) => e === void 0 ? VY : sm[e] ?? sm.unsupported; function lv(e, t, n, r) { const o = aX(e); return Object.fromEntries(Object.entries(t).map(([s, i]) => { @@ -4107,7 +4107,7 @@ function t7(e, t, n) { boxOf: n }, QV); } -const G3 = (e) => !!(e.space || e.empty), Tm = (e) => !!e.empty, dX = 2.5, fX = 1.5, hX = 0.8, pX = 0.5, gX = Math.cos(87e-4), n7 = 1e-6; +const G3 = (e) => !!(e.space || e.empty), Mm = (e) => !!e.empty, dX = 2.5, fX = 1.5, hX = 0.8, pX = 0.5, gX = Math.cos(87e-4), n7 = 1e-6; function mX(e) { const t = wX(e), n = t.glyphs.length, r = (s) => typeof s != "number" ? X3(t, s) : Number.isInteger(s) && s >= 0 && s < n ? s : null, o = ([s, i]) => ({ start: s, @@ -4165,24 +4165,24 @@ function Y3(e, t) { }; } function bX(e, t) { - const n = t.glyphs.find((f) => !Tm(f)); + const n = t.glyphs.find((d) => !Mm(d)); if (!n) return 0; const r = n.loose, o = r.upperRight.x - r.upperLeft.x, s = r.upperRight.y - r.upperLeft.y, i = Math.hypot(o, s); if (i <= n7) return 0; const a = { x: o / i, y: s / i - }, c = r.upperLeft.x - r.lowerLeft.x, l = r.upperLeft.y - r.lowerLeft.y, u = a.x * l - a.y * c >= 0 ? 1 : -1, d = { + }, c = r.upperLeft.x - r.lowerLeft.x, l = r.upperLeft.y - r.lowerLeft.y, u = a.x * l - a.y * c >= 0 ? 1 : -1, f = { x: -a.y * u, y: a.x * u }; - for (let f = 0; f < e.length; f++) { - const h = e[f], g = h.baseline.x * a.x + h.baseline.y * a.y, p = h.ascent.x * d.x + h.ascent.y * d.y > 0; - if (g >= gX && p) return f; + for (let d = 0; d < e.length; d++) { + const h = e[d], g = h.baseline.x * a.x + h.baseline.y * a.y, p = h.ascent.x * f.x + h.ascent.y * f.y > 0; + if (g >= gX && p) return d; } return e.push({ baseline: a, - ascent: d + ascent: f }), e.length - 1; } function wX(e) { @@ -4207,7 +4207,7 @@ function wX(e) { const s = bX(r, o), i = r[s]; let a = null; for (const c of o.glyphs) { - if (Tm(c)) { + if (Mm(c)) { t.push({ loose: J3, space: c.space, @@ -4245,7 +4245,7 @@ const Q3 = (e, t) => t.x >= e.left && t.x <= e.right && t.y >= e.bottom && t.y < function vX(e) { let t = 0, n = 0; for (const r of e.glyphs) - Tm(r) || (t += r.loose.top - r.loose.bottom, n++); + Mm(r) || (t += r.loose.top - r.loose.bottom, n++); return n === 0 ? 0 : t / n; } function kX(e, t) { @@ -4268,11 +4268,11 @@ function X3(e, t, n = 1.5) { const c = r[a.frame], l = a.rect; if (!(c.x < l.left - o || c.x > l.right + o || c.y < l.bottom - o || c.y > l.top + o)) for (let u = 0; u < a.count; u++) { - const d = e.glyphs[a.start + u]; - if (Tm(d)) continue; - const f = d.tight ?? d.loose; - if (c.x < f.left - o || c.x > f.right + o || c.y < f.bottom - o || c.y > f.top + o) continue; - const h = Math.min(Math.abs(c.x - f.left), Math.abs(c.x - f.right)), g = Math.min(Math.abs(c.y - f.bottom), Math.abs(c.y - f.top)); + const f = e.glyphs[a.start + u]; + if (Mm(f)) continue; + const d = f.tight ?? f.loose; + if (c.x < d.left - o || c.x > d.right + o || c.y < d.bottom - o || c.y > d.top + o) continue; + const h = Math.min(Math.abs(c.x - d.left), Math.abs(c.x - d.right)), g = Math.min(Math.abs(c.y - d.bottom), Math.abs(c.y - d.top)); h + g < i - n7 && (i = h + g, s = a.start + u); } } @@ -4310,7 +4310,7 @@ function SX(e, t) { } function xX(e, t) { const n = e.glyphs[t]; - if (!n || Tm(n)) return null; + if (!n || Mm(n)) return null; const r = n.loose; if (r.right <= r.left || r.top <= r.bottom) return null; const o = e.runs.find((i) => t >= i.start && t < i.start + i.count), s = e.frames[o?.frame ?? 0]; @@ -4325,13 +4325,13 @@ function EX(e, t, n) { const a = i.start + i.count - 1; if (a < r || i.start > o) continue; const c = Math.max(r, i.start), l = Math.min(o, a); - let u = 1 / 0, d = -1 / 0, f = 1 / 0, h = -1 / 0, g = 0, p = 0, m = -1 / 0, v = 0, S = 0; + let u = 1 / 0, f = -1 / 0, d = 1 / 0, h = -1 / 0, g = 0, p = 0, m = -1 / 0, v = 0, S = 0; const C = () => { g > 0 && u !== 1 / 0 && s.push({ rect: { left: u, - bottom: f, - right: d, + bottom: d, + right: f, top: h }, charCount: g, @@ -4339,18 +4339,18 @@ function EX(e, t, n) { frame: i.frame, firstX: v, lastX: S - }), u = 1 / 0, d = -1 / 0, f = 1 / 0, h = -1 / 0, g = 0, p = 0, m = -1 / 0; + }), u = 1 / 0, f = -1 / 0, d = 1 / 0, h = -1 / 0, g = 0, p = 0, m = -1 / 0; }; for (let k = c; k <= l; k++) { const N = e.glyphs[k]; - if (Tm(N)) continue; + if (Mm(N)) continue; const w = N.loose; if (g > 0 && m > -1 / 0) { const x = p / g; x > 0 && Math.abs(w.left - m) > dX * x && C(); } const y = (w.left + w.right) / 2; - g === 0 && (v = y), S = y, u = Math.min(u, w.left), d = Math.max(d, w.right), f = Math.min(f, w.bottom), h = Math.max(h, w.top), g++, p += w.right - w.left, m = w.right; + g === 0 && (v = y), S = y, u = Math.min(u, w.left), f = Math.max(f, w.right), d = Math.min(d, w.bottom), h = Math.max(h, w.top), g++, p += w.right - w.left, m = w.right; } C(); } @@ -4539,8 +4539,8 @@ const s7 = (e) => ({ center: ms(e.center) }), i7 = (e) => ({ degrees: e.degrees, - center: Nd(e.center) -}), a7 = (e, t) => Nd(v0(ms(e), s7(t))), c7 = (e, t) => Nd(sV(ms(e), s7(t))), DX = (e, t) => i7(_Y(e.map(ms), t)), jX = (e, t) => i7(LY(e.map(ms), t)), FX = (e) => _V(MY(YI(e))); + center: Pd(e.center) +}), a7 = (e, t) => Pd(v0(ms(e), s7(t))), c7 = (e, t) => Pd(sV(ms(e), s7(t))), DX = (e, t) => i7(_Y(e.map(ms), t)), jX = (e, t) => i7(LY(e.map(ms), t)), FX = (e) => _V(MY(YI(e))); function VX(e) { return tX({ ...e, @@ -4559,14 +4559,14 @@ const _a = { function $X(e, t) { const n = t; if (n.rect === void 0 || !jx.has(e.subtype)) return t; - const r = e, o = QP(e.subtype), s = (d, f) => Object.fromEntries(f.filter((h) => d[h] !== void 0).map((h) => [h, d[h]])), { subtype: i, ...a } = t7(kV(ZV({ + const r = e, o = QP(e.subtype), s = (f, d) => Object.fromEntries(d.filter((h) => f[h] !== void 0).map((h) => [h, f[h]])), { subtype: i, ...a } = t7(kV(ZV({ subtype: e.subtype, ...s(r, ["rect", ...o]) }, _a, FE), e7({ subtype: e.subtype, ...s(n, ["rect", ...o]) }, _a, FE)), _a, FE), { rect: c, ...l } = n, u = { ...l }; - for (const [d, f] of Object.entries(a)) u[d] = n[d] !== void 0 && Fo(f, n[d]) ? n[d] : f; + for (const [f, d] of Object.entries(a)) u[f] = n[f] !== void 0 && Vo(d, n[f]) ? n[f] : d; return u; } const Ww = () => _a; @@ -4575,7 +4575,7 @@ function $x(e, t, n = {}) { ...t, subtype: t.subtype ?? e.subtype }, _a, Ww), n), _a, Ww), o = t; - for (const s of Object.keys(r)) o[s] !== void 0 && Fo(r[s], o[s]) && (r[s] = o[s]); + for (const s of Object.keys(r)) o[s] !== void 0 && Vo(r[s], o[s]) && (r[s] = o[s]); return r; } function l7(e, t, n = {}) { @@ -4583,13 +4583,13 @@ function l7(e, t, n = {}) { } function UX(e, t = {}) { const n = uX(jQ(lX(e, _a, Ww), t), _a, Ww), r = e; - for (const o of Object.keys(n)) r[o] !== void 0 && Fo(n[o], r[o]) && (n[o] = r[o]); + for (const o of Object.keys(n)) r[o] !== void 0 && Vo(n[o], r[o]) && (n[o] = r[o]); return n; } function u7(e, t) { return LX(UX(e, { describeFont: t.describeFont }), t); } -const Do = { +const jo = { pt: 0.0254 / 72, mm: 1e-3, cm: 0.01, @@ -4601,17 +4601,17 @@ const Do = { mi: 1609.344 }, s6 = (e) => `${e}2`; function i6(e) { - return e === "ha" ? 1e4 : e === "acre" ? 4046.8564224 : Do[e.slice(0, -1)] ** 2; + return e === "ha" ? 1e4 : e === "acre" ? 4046.8564224 : jo[e.slice(0, -1)] ** 2; } const a6 = (e) => e.endsWith("2") ? e.slice(0, -1) + "²" : e; function XI(e) { return new J(q.InvalidArg, e); } -function lg(e) { +function ug(e) { if (!Number.isFinite(e) || e <= 0) throw XI("Calibration requires finite positive lengths and scales"); } function d7(e, t, n, r) { - lg(Math.fround(e)); + ug(Math.fround(e)); const o = r.precision ?? 100; if (!Number.isInteger(Math.log10(o)) || o < 1 || o > 1e9) throw XI("Invalid decimal precision"); const s = r.areaUnit ?? s6(t), i = { @@ -4619,7 +4619,7 @@ function d7(e, t, n, r) { ...r.fixed === void 0 ? {} : { fixed: r.fixed } }, a = r.imperialFeetInches ? [{ unit: "ft", - conversion: Math.fround(Do[t] / Do.ft) + conversion: Math.fround(jo[t] / jo.ft) }, { unit: "in", conversion: 12, @@ -4643,20 +4643,20 @@ function d7(e, t, n, r) { distance: a, area: [{ unit: a6(s), - conversion: Math.fround(Do[t] ** 2 / i6(s)), + conversion: Math.fround(jo[t] ** 2 / i6(s)), ...i }] }; return XP(c), c; } function KX(e, t, n = {}) { - lg(e), lg(t.value); + ug(e), ug(t.value); const r = t.value / e; return d7(r, t.unit, `1 in = ${Number((r * 72).toPrecision(8))} ${t.unit}`, n); } function f7(e, t, n, r = {}) { const { userUnit: o = 1, ...s } = r; - return lg(e), lg(t), lg(o), d7(o / 72 * 0.0254 * (t / e) / Do[n], n, `${e}:${t}`, s); + return ug(e), ug(t), ug(o), d7(o / 72 * 0.0254 * (t / e) / jo[n], n, `${e}:${t}`, s); } function HX(e, t) { if (J.is(e, q.GrantPassphraseRequired)) return { @@ -4858,37 +4858,37 @@ function p7(e) { } function g7(e, t, n = () => !1) { const r = /* @__PURE__ */ new Map(); - e.forEach((f, h) => { - f.subtype === "unsupported" ? r.set(h, "unsupported-kind") : f.subtype === "widget" ? r.set(h, "widget") : n(h) && r.set(h, "unsupported-value"); + e.forEach((d, h) => { + d.subtype === "unsupported" ? r.set(h, "unsupported-kind") : d.subtype === "widget" ? r.set(h, "widget") : n(h) && r.set(h, "unsupported-value"); }); const o = /* @__PURE__ */ new Map(); - e.forEach((f, h) => { - const g = oe(f.ref); + e.forEach((d, h) => { + const g = oe(d.ref); o.has(g) || o.set(g, h); }); - const s = (f) => t.page ?? e[f].ref.page, i = (f, h) => { - const g = o.get(oe(f)); + const s = (d) => t.page ?? e[d].ref.page, i = (d, h) => { + const g = o.get(oe(d)); if (!(g === void 0 || r.has(g))) - return Gt(s(g)) === Gt(s(h)) ? g : void 0; + return Yt(s(g)) === Yt(s(h)) ? g : void 0; }, a = /* @__PURE__ */ new Set(); - e.forEach((f, h) => { - if (r.has(h) || f.subtype !== "popup") return; - const g = f.parent ? o.get(oe(f.parent)) : void 0, p = f.parent ? i(f.parent, h) : void 0; + e.forEach((d, h) => { + if (r.has(h) || d.subtype !== "popup") return; + const g = d.parent ? o.get(oe(d.parent)) : void 0, p = d.parent ? i(d.parent, h) : void 0; p === void 0 ? r.set(h, g !== void 0 && r.has(g) ? "parent-dropped" : "parent-missing") : a.has(p) ? r.set(h, "popup-taken") : a.add(p); }); const c = /* @__PURE__ */ new Map(); - e.forEach((f, h) => { + e.forEach((d, h) => { r.has(h) || c.set(h, c.size); }); const l = t.offset ?? { x: 0, y: 0 - }, u = [...c.keys()].map((f) => { - const h = e[f], g = h.reply ? i(h.reply.to, f) : void 0, p = h.subtype === "popup" && h.parent ? i(h.parent, f) : void 0, { nm: m, groupId: v, reply: S, popup: C, ...k } = h; + }, u = [...c.keys()].map((d) => { + const h = e[d], g = h.reply ? i(h.reply.to, d) : void 0, p = h.subtype === "popup" && h.parent ? i(h.parent, d) : void 0, { nm: m, groupId: v, reply: S, popup: C, ...k } = h; for (const { field: N } of QX(h)) delete k[N]; return { - source: f, - page: s(f), + source: d, + page: s(d), data: qY(k, l), ...g !== void 0 ? { replyTo: { copy: c.get(g), @@ -4896,16 +4896,16 @@ function g7(e, t, n = () => !1) { } } : {}, ...p !== void 0 ? { parent: c.get(p) } : {} }; - }), d = []; - return e.forEach((f, h) => { + }), f = []; + return e.forEach((d, h) => { const g = r.get(h); - g && d.push({ - ref: f.ref, + g && f.push({ + ref: d.ref, reason: g }); }), { copies: u, - dropped: d + dropped: f }; } function tZ(e, t) { @@ -4919,16 +4919,16 @@ const rZ = "event.target.buttonImportIcon();", oZ = /^\s*event\s*\.\s*target\s*\ function sZ(e) { return oZ.test(e); } -const Mm = ["activate", "mouseUp"]; +const Bm = ["activate", "mouseUp"]; function iZ(e) { const t = jP(e); return t !== null && sZ(t); } function aZ(e) { - return Mm.some((t) => e?.[t] != null); + return Bm.some((t) => e?.[t] != null); } function lS(e) { - const t = Mm.flatMap((n) => { + const t = Bm.flatMap((n) => { const r = e?.[n]; return r == null ? [] : [r]; }); @@ -4944,7 +4944,7 @@ function m7() { }; } function y7(e) { - return Mm.some((t) => e?.[t] !== void 0) ? e ?? {} : { + return Bm.some((t) => e?.[t] !== void 0) ? e ?? {} : { ...e, activate: m7() }; @@ -4959,7 +4959,7 @@ function l6(e, t) { } function cZ(e, t) { if (e !== void 0) { - for (const n of t) for (const r of Mm) if (n.actions?.[r] !== void 0) throw new J(q.InvalidArg, `'takesImage' writes each widget's press: name it or a widget's actions.${r}, not both`, { details: { field: "takesImage" } }); + for (const n of t) for (const r of Bm) if (n.actions?.[r] !== void 0) throw new J(q.InvalidArg, `'takesImage' writes each widget's press: name it or a widget's actions.${r}, not both`, { details: { field: "takesImage" } }); if (e && t.length === 0) throw w7(); } } @@ -5137,7 +5137,7 @@ function vZ(e, t) { const o = new Set(n.map(Or)); for (const { page: s, after: i } of t) { if (o.has(Or(s))) continue; - const a = i ? n.findIndex((c) => Or(c) === Gt(i)) : -1; + const a = i ? n.findIndex((c) => Or(c) === Yt(i)) : -1; n.splice(a + 1, 0, s), r = u6(r, a + 1, 1), o.add(Or(s)); } return n.length === e.pages.length ? e : uv(n, r, e); @@ -5146,7 +5146,7 @@ function kZ(e, t) { return Kx(t, e.labels) ? e : uv(e.pages, t, e); } function S7(e, t) { - const n = new Set(t.map(Gt)); + const n = new Set(t.map(Yt)); return e.flatMap((r, o) => n.has(Or(r)) ? [{ page: r, after: o > 0 ? e[o - 1].ref : null @@ -5162,7 +5162,7 @@ function AZ(e, t) { function SZ(e, t) { const n = new Map(e.map((o) => [Or(o), o.rotation])), r = /* @__PURE__ */ new Map(); for (const o of t) { - const s = n.get(Gt(o)); + const s = n.get(Yt(o)); s !== void 0 && r.set(s, [...r.get(s) ?? [], o]); } return [...r].map(([o, s]) => ({ @@ -5174,7 +5174,7 @@ function SZ(e, t) { function xZ(e, t) { const n = new Map(e.map((o) => [Or(o), EZ(o)])), r = /* @__PURE__ */ new Map(); for (const o of t) { - const s = n.get(Gt(o)); + const s = n.get(Yt(o)); if (s === void 0) continue; const i = JSON.stringify(s), a = r.get(i) ?? { measure: s, @@ -5194,7 +5194,7 @@ function EZ(e) { } function CZ(e, t, n) { if (!bZ.includes(n) || !d6(e.pages, t)) return e; - const r = new Set(t.map(Gt)); + const r = new Set(t.map(Yt)); let o = !1; const s = e.pages.map((i) => !r.has(Or(i)) || i.rotation === n ? i : (o = !0, { ...i, @@ -5207,7 +5207,7 @@ function CZ(e, t, n) { } function IZ(e, t, n) { if (!d6(e.pages, t)) return e; - const r = new Set(t.map(Gt)); + const r = new Set(t.map(Yt)); return { pages: e.pages.map((o) => { if (!r.has(Or(o))) return o; @@ -5226,19 +5226,19 @@ function NZ(e, t, n) { const o = new Map(r.map((c) => [Or(c), c])); let s; try { - s = iS(r.map((c) => c.ref), t, n, Gt); + s = iS(r.map((c) => c.ref), t, n, Yt); } catch { return e; } - const i = s.map((c) => o.get(Gt(c))); + const i = s.map((c) => o.get(Yt(c))); if (i.every((c, l) => c === r[l])) return e; - const a = Gt(t[0]); + const a = Yt(t[0]); return uv(i, gZ(e.labels, r.length, E7(r, t), i.findIndex((c) => Or(c) === a)), e); } function OZ(e, t) { const { pages: n } = e; if (!d6(n, t) || t.length >= n.length) return e; - const r = new Set(t.map(Gt)); + const r = new Set(t.map(Yt)); return uv(n.filter((o) => !r.has(Or(o))), A7(e.labels, n.length, E7(n, t)), e); } function PZ(e, t) { @@ -5246,7 +5246,7 @@ function PZ(e, t) { return !Number.isInteger(r) || r < 1 || r > 100 || !(Number.isFinite(n.width) && n.width > 0) || !(Number.isFinite(n.height) && n.height > 0) ? e : x7(e, t.position, t.objectNumbers, r, (o) => TZ(o, n.width, n.height)); } function RZ(e, t) { - const n = new Map(e.pages.map((s) => [Or(s), s])), r = t.pages.map((s) => n.get(Gt(s))); + const n = new Map(e.pages.map((s) => [Or(s), s])), r = t.pages.map((s) => n.get(Yt(s))); if (r.length === 0 || r.some((s) => !s)) return e; let o = 0; return x7(e, t.position, t.objectNumbers, r.length, (s) => ({ @@ -5261,25 +5261,25 @@ function x7(e, t, n, r, o) { if (new Set(n).size !== n.length || n.some((l) => i.has(l))) return e; let a; try { - a = n6(s.map((l) => l.ref), t ?? "end", Gt); + a = n6(s.map((l) => l.ref), t ?? "end", Yt); } catch { return e; } - const c = n.map((l) => o(Lt(l))); + const c = n.map((l) => o(Ft(l))); return uv([ ...s.slice(0, a), ...c, ...s.slice(a) ], u6(e.labels, a, r), e); } -const Or = (e) => Gt(e.ref); +const Or = (e) => Yt(e.ref); function d6(e, t) { if (t.length === 0) return !1; - const n = new Set(e.map(Or)), r = new Set(t.map(Gt)); + const n = new Set(e.map(Or)), r = new Set(t.map(Yt)); return r.size === t.length && [...r].every((o) => n.has(o)); } function E7(e, t) { - const n = new Set(t.map(Gt)); + const n = new Set(t.map(Yt)); return e.flatMap((r, o) => n.has(Or(r)) ? [o] : []); } function uv(e, t, n) { @@ -5398,7 +5398,7 @@ function C7(e, t) { state: null }; const n = e.widgets[0]; - if (!n) throw bl(`'${e.name}' has no widget to check`); + if (!n) throw wl(`'${e.name}' has no widget to check`); return { kind: "toggle", state: n.onState @@ -5412,7 +5412,7 @@ function C7(e, t) { case "radio": if ("value" in t) { const n = iM(e, t.value); - if (n === null && e.noToggleToOff) throw bl(`'${e.name}' must keep a choice: it can't be cleared`); + if (n === null && e.noToggleToOff) throw wl(`'${e.name}' must keep a choice: it can't be cleared`); return { kind: "toggle", state: n @@ -5426,9 +5426,9 @@ function C7(e, t) { if ("selectedValues" in t) return aM(e, t.selectedValues); break; default: - throw bl(`${e.kind} fields hold no value you can set`); + throw wl(`${e.kind} fields hold no value you can set`); } - throw bl(`a ${e.kind} field takes ${LZ[e.kind]}, not ${DZ(t)}`); + throw wl(`a ${e.kind} field takes ${LZ[e.kind]}, not ${DZ(t)}`); } function I7(e, t) { const n = (i) => new J(q.InvalidArg, i, { details: { field: "defaultValue" } }); @@ -5440,14 +5440,14 @@ function I7(e, t) { function iM(e, t) { if (t === null || t === "Off") return null; const n = e.widgets.find((r) => r.exportValue === t); - if (!n) throw bl(`no widget of '${e.name}' has the export value '${t}'`); + if (!n) throw wl(`no widget of '${e.name}' has the export value '${t}'`); return n.onState; } function aM(e, t) { - if (new Set(t).size !== t.length) throw bl("the values must not repeat"); - if (e.kind === "listbox" && !e.multiSelect && t.length > 1) throw bl(`'${e.name}' takes one value (it has no multiSelect)`); + if (new Set(t).size !== t.length) throw wl("the values must not repeat"); + if (e.kind === "listbox" && !e.multiSelect && t.length > 1) throw wl(`'${e.name}' takes one value (it has no multiSelect)`); const n = new Set(e.options.map((s) => s.value)), r = e.kind === "combobox" && e.edit && t.length === 1, o = t.find((s) => !n.has(s)); - if (!r && o !== void 0) throw bl(`'${o}' is not an option value of '${e.name}'`); + if (!r && o !== void 0) throw wl(`'${o}' is not an option value of '${e.name}'`); return { kind: "choice", values: t @@ -5456,7 +5456,7 @@ function aM(e, t) { function DZ(e) { return "checked" in e ? "{ checked }" : "selectedValues" in e ? "{ selectedValues }" : "{ value }"; } -function bl(e) { +function wl(e) { return new J(q.InvalidArg, e, { details: { field: "value" } }); } function jZ(e, t) { @@ -5527,7 +5527,7 @@ function FZ(e) { const { field: t } = e, n = t.defaultValueEntry; switch (t.kind) { case "text": { - if (n.kind === "array" || n.kind === "unsupported") throw sh(t); + if (n.kind === "array" || n.kind === "unsupported") throw ah(t); const r = n.kind === "scalar" ? n.value : "", o = n.kind === "scalar" ? n : { kind: "none" }; return A0({ ...t, @@ -5537,22 +5537,22 @@ function FZ(e) { } case "checkbox": case "radio": { - if (n.kind === "array" || n.kind === "unsupported") throw sh(t); + if (n.kind === "array" || n.kind === "unsupported") throw ah(t); const r = n.kind === "scalar" ? n.value : null; if (r === null || r === "Off") return ZI(e, -1); const o = WZ(t.widgets, r); - if (o < 0) throw sh(t); + if (o < 0) throw ah(t); return ZI(e, o); } case "combobox": case "listbox": { - if (n.kind === "unsupported") throw sh(t); + if (n.kind === "unsupported") throw ah(t); let r = n.kind === "scalar" ? [n.value] : n.kind === "array" ? [...n.values] : []; - if (r.length === 1 && r[0] === "" && !uS(t, r) && (r = []), !uS(t, r) && !qZ(t, r)) throw sh(t); + if (r.length === 1 && r[0] === "" && !uS(t, r) && (r = []), !uS(t, r) && !qZ(t, r)) throw ah(t); return A0(h6(t, r), e); } default: - throw sh(t); + throw ah(t); } } function VZ(e, t) { @@ -5598,7 +5598,7 @@ function $E(e) { switch (e.kind) { case "text": case "combobox": - return e.defaultValue !== void 0 ? am(e.defaultValue) : S0(); + return e.defaultValue !== void 0 ? cm(e.defaultValue) : S0(); case "listbox": return p6(g6((e.options ?? []).map(m6), e.defaultValue ?? [])); default: @@ -5608,14 +5608,14 @@ function $E(e) { function f6(e, t) { const n = e.widgets ?? [], r = l6(e, e.kind); cZ(r, n); - const o = n.map((f, h) => QZ(e, r ? { - ...f, - actions: y7(f.actions) - } : f, { + const o = n.map((d, h) => QZ(e, r ? { + ...d, + actions: y7(d.actions) + } : d, { ref: t.widgets[h], field: t.objectNumber, nm: t.widgetNames?.[h] - })), s = o.map((f) => RY(y6(f.ref), f.page)), i = (e.kind === "combobox" || e.kind === "listbox" ? e.options ?? [] : []).map(m6), a = KF(e), c = { + })), s = o.map((d) => RY(y6(d.ref), d.page)), i = (e.kind === "combobox" || e.kind === "listbox" ? e.options ?? [] : []).map(m6), a = KF(e), c = { ref: { kind: "objectNumber", objectNumber: t.objectNumber @@ -5629,7 +5629,7 @@ function f6(e, t) { mappingName: e.mappingName ?? null, valueEntry: { kind: "none" }, defaultValueEntry: { kind: "none" }, - groupId: nm(a), + groupId: rm(a), assignment: a, lockedBy: null, purpose: Ux(e.purpose), @@ -5644,17 +5644,17 @@ function f6(e, t) { format: l, ...l ? { actions: R7(void 0, l) } : {} }; - let d; + let f; switch (e.kind) { case "text": { - const f = e.defaultValue ?? ""; - d = { + const d = e.defaultValue ?? ""; + f = { ...c, ...u, kind: "text", defaultValueEntry: $E(e), value: "", - defaultValue: f, + defaultValue: d, maxLength: e.maxLength ?? null, multiline: e.multiline ?? !1, password: e.password ?? !1, @@ -5664,32 +5664,32 @@ function f6(e, t) { break; } case "checkbox": { - const f = n.map((h, g) => lM(s[g], h.exportValue ?? "Yes")); - d = { + const d = n.map((h, g) => lM(s[g], h.exportValue ?? "Yes")); + f = { ...c, kind: "checkbox", checked: !1, - exportValue: f[0]?.exportValue ?? "Yes", + exportValue: d[0]?.exportValue ?? "Yes", hasValuesList: !1, - widgets: f + widgets: d }; break; } case "radio": { - const f = n.map((h, g) => lM(s[g], h.exportValue ?? "")); - d = { + const d = n.map((h, g) => lM(s[g], h.exportValue ?? "")); + f = { ...c, kind: "radio", value: "Off", radiosInUnison: e.radiosInUnison ?? !1, noToggleToOff: e.noToggleToOff ?? !1, hasValuesList: !1, - widgets: f + widgets: d }; break; } case "combobox": - d = { + f = { ...c, ...u, kind: "combobox", @@ -5702,13 +5702,13 @@ function f6(e, t) { }; break; case "listbox": { - const f = e.defaultValue ?? []; - d = { + const d = e.defaultValue ?? []; + f = { ...c, kind: "listbox", defaultValueEntry: $E(e), selectedValues: [], - defaultValue: g6(i, f), + defaultValue: g6(i, d), multiSelect: e.multiSelect ?? !1, options: i, topIndex: 0, @@ -5717,23 +5717,23 @@ function f6(e, t) { break; } case "pushbutton": - d = { + f = { ...c, kind: "pushbutton", hasImage: !1, - takesImage: c6(o.map((f) => f.actions)), + takesImage: c6(o.map((d) => d.actions)), widgets: s }; break; default: - d = { + f = { ...c, kind: e.kind, widgets: s }; } return { - field: d, + field: f, widgets: o }; } @@ -5745,7 +5745,7 @@ function UZ(e, t) { r.name = a < 0 ? t.name : `${r.name.slice(0, a + 1)}${t.name}`; } for (const a of HZ) typeof n[a] == "boolean" && a in r && (r[a] = n[a]); - if (t.alternateName !== void 0 && (r.alternateName = t.alternateName || null), t.mappingName !== void 0 && (r.mappingName = t.mappingName || null), r.assignment = hY(t, r), r.groupId = nm(r.assignment), t.purpose !== void 0 && (r.purpose = Ux(t.purpose)), t.placeholder !== void 0 && (r.placeholder = Lx(t.placeholder)), r.kind === "text" || r.kind === "combobox") { + if (t.alternateName !== void 0 && (r.alternateName = t.alternateName || null), t.mappingName !== void 0 && (r.mappingName = t.mappingName || null), r.assignment = hY(t, r), r.groupId = rm(r.assignment), t.purpose !== void 0 && (r.purpose = Ux(t.purpose)), t.placeholder !== void 0 && (r.placeholder = Lx(t.placeholder)), r.kind === "text" || r.kind === "combobox") { const a = _x(t, r.kind); if (a !== void 0 && !EY(a, r.format)) { const c = R7(r.actions, a); @@ -5754,7 +5754,7 @@ function UZ(e, t) { } if (r.kind === "text" && ("maxLength" in t && t.maxLength !== void 0 && (r.maxLength = t.maxLength), "defaultValue" in t && t.defaultValue !== void 0)) { const a = t.defaultValue; - r.defaultValue = a ?? "", r.defaultValueEntry = a === null ? S0() : am(a); + r.defaultValue = a ?? "", r.defaultValueEntry = a === null ? S0() : cm(a); } let o = !1; if ((r.kind === "combobox" || r.kind === "listbox") && ("options" in t && t.options && (r = GZ(r, t.options.map(m6)), o = !0), "defaultValue" in t && t.defaultValue !== void 0)) { @@ -5831,12 +5831,12 @@ function ZI(e, t) { const n = e.field; if (n.kind !== "checkbox" && n.kind !== "radio") return e; const r = n.kind === "checkbox" || n.radiosInUnison, o = t >= 0 ? n.widgets[t] : null, s = n.widgets.map((l, u) => { - const d = o !== null && (r ? l.exportValue === o.exportValue && l.onState === o.onState : u === t); - return l.checked === d ? l : { + const f = o !== null && (r ? l.exportValue === o.exportValue && l.onState === o.onState : u === t); + return l.checked === f ? l : { ...l, - checked: d + checked: f }; - }), i = am(o ? o.onState : "Off"), a = n.kind === "checkbox" ? { + }), i = cm(o ? o.onState : "Off"), a = n.kind === "checkbox" ? { ...n, widgets: s, valueEntry: i, @@ -5888,7 +5888,7 @@ function h6(e, t) { }; } function p6(e) { - return e.length === 0 ? S0() : e.length === 1 ? am(e[0]) : { + return e.length === 0 ? S0() : e.length === 1 ? cm(e[0]) : { kind: "array", values: [...e] }; @@ -5919,7 +5919,7 @@ function M7(e, t, n = !1) { const i = n ? e.kind === "listbox" && e.multiSelect ? { kind: "array", values: [] - } : am("") : S0(); + } : cm("") : S0(); return e.kind === "combobox" ? { ...e, defaultValueEntry: i, @@ -5930,7 +5930,7 @@ function M7(e, t, n = !1) { defaultValue: [] }; } - const r = uS(e, t), o = r ? g6(e.options, t) : [...t], s = r ? p6(o) : am(t[0]); + const r = uS(e, t), o = r ? g6(e.options, t) : [...t], s = r ? p6(o) : cm(t[0]); return e.kind === "combobox" ? { ...e, defaultValueEntry: s, @@ -5980,11 +5980,11 @@ const m6 = (e) => ({ label: e.label, value: e.value, selected: !1 -}), y6 = (e) => e.kind === "objectNumber" ? e.objectNumber : 0, am = (e) => ({ +}), y6 = (e) => e.kind === "objectNumber" ? e.objectNumber : 0, cm = (e) => ({ kind: "scalar", value: e }), S0 = () => ({ kind: "none" }); -function sh(e) { +function ah(e) { return new J(q.Unknown, `'${e.name}' could not be reset`); } function qw(e) { @@ -6019,7 +6019,7 @@ function qw(e) { async function b6(e) { if (e === null) return null; if (B7(e)) return { pdf: e.pdf.slice() }; - const { appearance: t } = await cg({ appearance: e }); + const { appearance: t } = await lg({ appearance: e }); return new Uint8Array(t); } function w6(e) { @@ -6096,7 +6096,7 @@ async function nee(e) { const t = [], n = []; for (const r of e.ops) switch (r.type) { case "annotations.create": { - const { resources: o, ...s } = r, i = await cg(o); + const { resources: o, ...s } = r, i = await lg(o); t.push(...zw(i)), n.push({ ...s, data: jV(r.data, o), @@ -6105,7 +6105,7 @@ async function nee(e) { break; } case "annotations.update": { - const { resources: o, ...s } = r, i = await cg(o); + const { resources: o, ...s } = r, i = await lg(o); t.push(...zw(i)), n.push({ ...s, ...aS(i) ? { resources: i } : {} @@ -6137,7 +6137,7 @@ async function nee(e) { break; } case "attachments.create": { - const o = await cg(r.resources); + const o = await lg(r.resources); t.push(...zw(o)), n.push({ ...r, resources: o @@ -6278,13 +6278,13 @@ function uee(e) { } function dee(e) { const t = e.indexOf(":"), n = e.indexOf(":", t + 1); - if (t === -1 || n === -1) throw new Lo(e, "collab scope requires entity:action:filter"); + if (t === -1 || n === -1) throw new Do(e, "collab scope requires entity:action:filter"); const r = e.slice(0, t), o = e.slice(t + 1, n), s = e.slice(n + 1); if (r === "fields") return fee(e, o, s); - if (r !== "annotations") throw new Lo(e, `unknown collab entity: ${r}`); - if (o !== "create" && o !== "update" && o !== "delete" && o !== "set-group" && o !== "*") throw new Lo(e, `unknown collab action: ${o}`); + if (r !== "annotations") throw new Do(e, `unknown collab entity: ${r}`); + if (o !== "create" && o !== "update" && o !== "delete" && o !== "set-group" && o !== "*") throw new Do(e, `unknown collab action: ${o}`); const i = L7(s, e); - if (o === "set-group" && (i.kind === "self" || i.kind === "createdBy")) throw new Lo(e, `set-group only supports :all or :group= filters (got :${i.kind})`); + if (o === "set-group" && (i.kind === "self" || i.kind === "createdBy")) throw new Do(e, `set-group only supports :all or :group= filters (got :${i.kind})`); return { kind: "collab", entity: r, @@ -6293,9 +6293,9 @@ function dee(e) { }; } function fee(e, t, n) { - if (t !== "fill" && t !== "sign" && t !== "set-group" && t !== "*") throw new Lo(e, `unknown fields action: ${t}`); + if (t !== "fill" && t !== "sign" && t !== "set-group" && t !== "*") throw new Do(e, `unknown fields action: ${t}`); const r = L7(n, e); - if (r.kind !== "all" && r.kind !== "group") throw new Lo(e, `fields only support :all or :group= filters (got :${r.kind})`); + if (r.kind !== "all" && r.kind !== "group") throw new Do(e, `fields only support :all or :group= filters (got :${r.kind})`); return { kind: "collab", entity: "fields", @@ -6308,7 +6308,7 @@ function L7(e, t) { if (e === "self") return { kind: "self" }; if (e.startsWith("createdBy=")) { const n = e.slice(10); - if (!n) throw new Lo(t, "createdBy= requires a value"); + if (!n) throw new Do(t, "createdBy= requires a value"); return { kind: "createdBy", userId: n @@ -6316,17 +6316,17 @@ function L7(e, t) { } if (e.startsWith("group=")) { const n = e.slice(6); - if (!n) throw new Lo(t, "group= requires a value"); + if (!n) throw new Do(t, "group= requires a value"); return { kind: "group", groupId: n }; } - throw new Lo(t, `unknown filter: ${e}`); + throw new Do(t, `unknown filter: ${e}`); } const hee = /^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$/, pee = /^[a-z][a-z0-9]*(-[a-z0-9]+)*(\.[a-z][a-z0-9]*(-[a-z0-9]+)*)+$/; function gee(e, t) { - if (!pee.test(e)) throw new Lo(e, "invalid plugin permission shape (expected .)"); + if (!pee.test(e)) throw new Do(e, "invalid plugin permission shape (expected .)"); return { kind: "plugin", name: e, @@ -6334,8 +6334,8 @@ function gee(e, t) { }; } function mee(e) { - if (!hee.test(e)) throw new Lo(e, "invalid capability name shape"); - if (!cee.has(e)) throw new Lo(e, `unknown capability: ${e}`); + if (!hee.test(e)) throw new Do(e, "invalid capability name shape"); + if (!cee.has(e)) throw new Do(e, `unknown capability: ${e}`); return { kind: "capability", name: e @@ -6350,7 +6350,7 @@ function yee(e) { function v6(e, t, n, r = null) { if (di(r).has(e)) return !1; const o = t.map(Si); - return o.some((s) => s.kind === "wildcard") ? !0 : Bm(o, n, r).has(e); + return o.some((s) => s.kind === "wildcard") ? !0 : _m(o, n, r).has(e); } function bee(e, t, n, r = null) { return e.some((o) => v6(o, t, n, r)); @@ -6359,9 +6359,9 @@ function wee(e, t, n, r, o) { const s = n.map(Si); if (s.some((a) => a.kind === "wildcard")) return !0; const i = s.filter((a) => a.kind === "collab" && a.entity === "annotations" && (a.action === e || a.action === "*")); - return i.length > 0 ? i.some((a) => Cee(a.filter, t, r)) : Bm(s, o).has("doc.annotate.modify"); + return i.length > 0 ? i.some((a) => Cee(a.filter, t, r)) : _m(s, o).has("doc.annotate.modify"); } -function Bm(e, t, n = null) { +function _m(e, t, n = null) { const r = /* @__PURE__ */ new Set(); let o = !1, s = !1; for (const i of e) i.kind === "capability" ? r.add(i.name) : i.kind === "virtual" && i.name === "pdf.permissions" ? Iee(r, t) : i.kind === "collab" && i.entity === "annotations" ? o = !0 : i.kind === "collab" && i.entity === "fields" && (s = !0); @@ -6380,7 +6380,7 @@ function kee(e, t, n = D7) { return vee(t, n).has(e); } function Aee(e, t, n = null) { - return Bm(e.map(Si), t, n); + return _m(e.map(Si), t, n); } function pM(e, t, n, r) { if (t === n) return !0; @@ -6402,25 +6402,25 @@ function xee(e, t, n, r, o = null) { const c = n.map(Si); if (c.some((u) => u.kind === "wildcard")) return !0; const l = c.filter((u) => u.kind === "collab" && u.entity === "fields" && (u.action === e || u.action === "*")); - return l.length > 0 ? l.some((u) => u.filter.kind === "all" || i !== null && u.filter.groupId === i) : Bm(c, r, o).has(a); + return l.length > 0 ? l.some((u) => u.filter.kind === "all" || i !== null && u.filter.groupId === i) : _m(c, r, o).has(a); } function Eee(e, t, n, r) { - const o = e.map(Si), s = o.some((d) => d.kind === "wildcard"), i = (d) => o.filter((f) => f.kind === "collab" && f.entity === "fields" && (f.action === d || f.action === "*")), a = (d, f = []) => { - if (d.some((g) => g.filter.kind === "all")) return { all: !0 }; - const h = d.flatMap((g) => g.filter.kind === "group" ? [g.filter.groupId] : []); + const o = e.map(Si), s = o.some((f) => f.kind === "wildcard"), i = (f) => o.filter((d) => d.kind === "collab" && d.entity === "fields" && (d.action === f || d.action === "*")), a = (f, d = []) => { + if (f.some((g) => g.filter.kind === "all")) return { all: !0 }; + const h = f.flatMap((g) => g.filter.kind === "group" ? [g.filter.groupId] : []); return { all: !1, - groups: [.../* @__PURE__ */ new Set([...h, ...f])] + groups: [.../* @__PURE__ */ new Set([...h, ...d])] }; }, c = { all: !1, groups: [] - }, l = (d) => { - const f = d === "fill" ? "doc.forms.fill" : "doc.sign"; - if (di(n).has(f)) return c; + }, l = (f) => { + const d = f === "fill" ? "doc.forms.fill" : "doc.sign"; + if (di(n).has(d)) return c; if (s) return { all: !0 }; - const h = i(d); - return h.length > 0 ? a(h) : Bm(o, t, n).has(f) ? { all: !0 } : c; + const h = i(f); + return h.length > 0 ? a(h) : _m(o, t, n).has(d) ? { all: !0 } : c; }, u = r !== void 0 ? [r] : []; return { fill: l("fill"), @@ -6432,7 +6432,7 @@ function j7(e, t, n, r = null) { const o = e === "fill" ? "doc.forms.fill" : "doc.sign"; if (di(r).has(o)) return !1; const s = t.map(Si); - return s.some((i) => i.kind === "wildcard") || s.some((i) => i.kind === "collab" && i.entity === "fields" && (i.action === e || i.action === "*")) ? !0 : Bm(s, n, r).has(o); + return s.some((i) => i.kind === "wildcard") || s.some((i) => i.kind === "collab" && i.entity === "fields" && (i.action === e || i.action === "*")) ? !0 : _m(s, n, r).has(o); } function Cee(e, t, n) { switch (e.kind) { @@ -6453,12 +6453,12 @@ function Nee(e, t) { const n = e?.flatten; if (n === void 0) { for (const o of ["includeAnnotations", "includeFormFields"]) if (e?.[o] !== void 0) throw new J(q.InvalidArg, `${o} takes flatten`, { details: { field: o } }); - if (!t.download) throw new po("doc.download"); + if (!t.download) throw new go("doc.download"); return null; } const r = n.usage ?? "display"; if (r !== "display" && r !== "print") throw new J(q.InvalidArg, 'usage must be "display" or "print"', { details: { field: "flatten.usage" } }); - if (!t.download && !t.downloadFlattened) throw new po("doc.download", "flatten", ["doc.download", "doc.download.flattened"]); + if (!t.download && !t.downloadFlattened) throw new go("doc.download", "flatten", ["doc.download", "doc.download.flattened"]); return { usage: r, ...e6(e, t) @@ -6481,7 +6481,7 @@ function F7(e) { return `${t.slice(0, 8)}-${t.slice(8, 12)}-${t.slice(12, 16)}-${t.slice(16, 20)}-${t.slice(20)}`; } async function Pee(e, t) { - const n = await Vo(e.data instanceof ArrayBuffer ? new Uint8Array(e.data) : e.data), r = e.name ?? n.name; + const n = await $o(e.data instanceof ArrayBuffer ? new Uint8Array(e.data) : e.data), r = e.name ?? n.name; if (!r) throw new J(q.InvalidArg, "attachment file requires a name — pass { data, name } or a File whose name is set"); const o = e.mimeType ?? n.mimeType; return { @@ -6523,7 +6523,7 @@ function Ree(e, t) { return HV(e, t); } function U7(e) { - return Fd(e.actions) || (e.widgets ?? []).some((t) => Fd(t.actions)); + return $d(e.actions) || (e.widgets ?? []).some((t) => $d(t.actions)); } const Tee = /^[\x21-\x7e]{1,255}$/; function Nr(e) { @@ -6535,7 +6535,7 @@ function Nr(e) { function Mee(e) { return e.meta.changedRefs; } -const lc = { +const uc = { /** Bit 3 — print the document. */ PRINT: 4, /** Bit 4 — modify content streams. */ @@ -6564,14 +6564,14 @@ function Hx(e) { assemble: !1, printHighQuality: !1 } : { - print: (e & lc.PRINT) !== 0, - modifyContents: (e & lc.MODIFY) !== 0, - copy: (e & lc.COPY) !== 0, - modifyAnnotations: (e & lc.ANNOTATE_FILL) !== 0, - fillForms: (e & lc.FILL_FORMS) !== 0, - copyForAccessibility: (e & lc.ACCESSIBILITY) !== 0, - assemble: (e & lc.ASSEMBLE) !== 0, - printHighQuality: (e & lc.PRINT_HIGH) !== 0 + print: (e & uc.PRINT) !== 0, + modifyContents: (e & uc.MODIFY) !== 0, + copy: (e & uc.COPY) !== 0, + modifyAnnotations: (e & uc.ANNOTATE_FILL) !== 0, + fillForms: (e & uc.FILL_FORMS) !== 0, + copyForAccessibility: (e & uc.ACCESSIBILITY) !== 0, + assemble: (e & uc.ASSEMBLE) !== 0, + printHighQuality: (e & uc.PRINT_HIGH) !== 0 }; } function Bee(e, t, n) { @@ -6697,14 +6697,14 @@ function q7(e, t, n, r, o) { const s = {}, i = !r && e.kind === "pushbutton" && e.takesImage && lS(t.actions); for (const l of FF) { const u = t.actions?.[l]; - if (!u || i && Mm.includes(l)) continue; - const d = LF(u), f = (h) => o.push({ + if (!u || i && Bm.includes(l)) continue; + const f = LF(u), d = (h) => o.push({ ref: e.ref, widget: t.ref, field: `actions.${l}`, reason: h }); - d ? !r && LP(d) ? f("script-not-allowed") : s[l] = tZ(d, n) : f("unsupported-action"); + f ? !r && LP(f) ? d("script-not-allowed") : s[l] = tZ(f, n) : d("unsupported-action"); } const a = e.kind === "checkbox" || e.kind === "radio" ? e.widgets.find((l) => l.ref && oe(l.ref) === oe(t.ref)) : void 0, c = { color: t.color, @@ -6745,9 +6745,9 @@ function Vee(e, t, n, r, o) { ...OY(e.placeholder) ? { placeholder: e.placeholder } : {}, ...Object.keys(n).length > 0 ? { actions: n } : {}, widgets: r - }, i = n.format === void 0 ? W7(e) : null, a = i ? { format: i } : {}, c = e.defaultValueEntry.kind !== "none", l = (u) => u.map(({ label: d, value: f }) => ({ - label: d, - value: f + }, i = n.format === void 0 ? W7(e) : null, a = i ? { format: i } : {}, c = e.defaultValueEntry.kind !== "none", l = (u) => u.map(({ label: f, value: d }) => ({ + label: f, + value: d })); switch (e.kind) { case "text": @@ -6786,11 +6786,11 @@ function Vee(e, t, n, r, o) { ...c ? { defaultValue: e.defaultValue } : {} }; case "pushbutton": { - const u = r.every((f) => Mm.every((h) => f.actions?.[h] === void 0)), d = e.takesImage && r.length > 0 && u; + const u = r.every((d) => Bm.every((h) => d.actions?.[h] === void 0)), f = e.takesImage && r.length > 0 && u; return { ...s, kind: "pushbutton", - ...d ? { takesImage: !0 } : {} + ...f ? { takesImage: !0 } : {} }; } case "checkbox": @@ -6841,7 +6841,7 @@ function A6(e) { x: h.rect.x + a.x, y: h.rect.y + a.y } } : {} - }), l = [], u = [], d = [], f = /* @__PURE__ */ new Set(); + }), l = [], u = [], f = [], d = /* @__PURE__ */ new Set(); e.fields.forEach((h, g) => { const p = t.fields.find((w) => eN(w, h)); if (!p) throw new J(q.NotFound, `copy: no form field ${eV(h)}`, { details: { item: g } }); @@ -6849,7 +6849,7 @@ function A6(e) { const y = w.ref ? o.get(oe(w.ref)) : void 0; return y && (!s || s.has(oe(y.ref))) ? [y] : []; }), v = Fee(p, m); - for (const w of m) f.add(oe(w.ref)); + for (const w of m) d.add(oe(w.ref)); if (s && m.length === 0) throw new J(q.InvalidArg, `copy: 'widgets' names no widget of field ${g}`, { details: { item: g, field: "widgets" @@ -6864,7 +6864,7 @@ function A6(e) { const S = Uee(v.name, (w) => $ee(i, w)); i.add(S); const C = jee(v, n, l), k = m.map((w) => c(q7(v, w, (y) => y, n, l))), N = e.values && v.kind !== "signature" && Dee(v) ? J7(v) : null; - d.push(p), u.push({ + f.push(p), u.push({ source: g, draft: Vee(v, S, C, k, `copy: field ${g}`), widgets: m.map((w) => w.ref), @@ -6872,10 +6872,10 @@ function A6(e) { ...N ? { value: N } : {} }); }); - for (const h of s ?? []) if (!f.has(h)) throw new J(q.InvalidArg, `copy: widget ${h} is a widget of none of the fields`, { details: { field: "widgets" } }); + for (const h of s ?? []) if (!d.has(h)) throw new J(q.InvalidArg, `copy: widget ${h} is a widget of none of the fields`, { details: { field: "widgets" } }); return { creates: u, - calculationOrder: t.calculationOrder.flatMap((h) => h ? u.flatMap((g, p) => eN(d[p], h) && g.draft.actions?.calculate ? [p] : []) : []), + calculationOrder: t.calculationOrder.flatMap((h) => h ? u.flatMap((g, p) => eN(f[p], h) && g.draft.actions?.calculate ? [p] : []) : []), dropped: l }; } @@ -6905,23 +6905,23 @@ function mM(e, t, n) { } }); } function Kee(e) { - const { form: t, limits: n } = e, r = t.fields.find((f) => eN(f, e.field)); + const { form: t, limits: n } = e, r = t.fields.find((d) => eN(d, e.field)); if (!r) throw new J(q.NotFound, `repeat: no form field ${eV(e.field)}`); const o = e.as ?? X7(r), s = Q7(t, r, o); if (s) throw new J(q.InvalidArg, `repeat: ${s}`, { details: { field: "field" } }); const i = Y7(t, r), a = i[0].page, c = e.pageOf(a); if (!c) throw new J(q.NotFound, `repeat: no page ${a.objectNumber}`); - const l = new Set(o === "boxes" ? r.widgets.flatMap((f) => f.page?.objectNumber ?? []) : [a.objectNumber]), u = []; - for (const f of e.pages) - l.has(f.ref.objectNumber) || (l.add(f.ref.objectNumber), u.push(f)); - const d = u.length * (o === "boxes" ? i.length : 1 + i.length); - return mM(n, "pages", u.length), mM(n, "items", d), { + const l = new Set(o === "boxes" ? r.widgets.flatMap((d) => d.page?.objectNumber ?? []) : [a.objectNumber]), u = []; + for (const d of e.pages) + l.has(d.ref.objectNumber) || (l.add(d.ref.objectNumber), u.push(d)); + const f = u.length * (o === "boxes" ? i.length : 1 + i.length); + return mM(n, "pages", u.length), mM(n, "items", f), { as: o, field: r, template: i, from: c, targets: u, - count: d + count: f }; } const zx = Symbol.for("@embedpdf/engine/local"); @@ -6997,7 +6997,7 @@ function qee(e) { } function Gee(e) { const t = UP(Jee(e)); - return Om.includes(t) ? t : void 0; + return Pm.includes(t) ? t : void 0; } function Jee(e) { const [t = "", n = ""] = e.split(/[-,]/, 2); @@ -7073,7 +7073,7 @@ function bM(e, t) { const n = (o) => o.programs.some((s) => s.sha256 === t.lastResortDisplayHash), r = qee(e.faces).filter((o) => !Yee(o) && !n(o)).map(Qee); return { fonts: [ - ...Om.map((o) => Zee(o, t)), + ...Pm.map((o) => Zee(o, t)), ...e.engineFonts.map(Xee), ...r ], @@ -7114,44 +7114,44 @@ function nte(e, t, n, r) { const u = l.fallbacks.flatMap((g) => { const p = o.get(g); return p ? [p] : []; - }), d = { + }), f = { weight: l.weight, italic: l.italic, substituted: l.degraded, fallbacks: u - }, f = l.baseFontName ? Gee(l.baseFontName) : void 0; - if (l.source === "standard" || l.source === "document-font" && f && !l.objectNumber) { - const g = f ?? "helvetica"; + }, d = l.baseFontName ? Gee(l.baseFontName) : void 0; + if (l.source === "standard" || l.source === "document-font" && d && !l.objectNumber) { + const g = d ?? "helvetica"; return { - ...d, + ...f, font: g, program: r.standardDisplayHash(g) }; } if (l.source === "engine" && l.engineFont) return { - ...d, + ...f, font: l.engineFont, program: o.get(l.engineFont) ?? null }; const h = i.get(s(l.objectNumber, l.displaySha256)); return h ? { - ...d, + ...f, font: n$(h.face, h.program.postScriptName), program: x6(h.program) ? h.program.displaySha256 : null } : { - ...d, + ...f, font: l.baseFontName ?? l.familyName, program: null }; }, c = (l) => { - const u = a(l), d = r.standardDisplayHash(cl({ + const u = a(l), f = r.standardDisplayHash(ll({ family: l.familyName, weight: l.weight, italic: l.italic })); - return u.program === d ? u : { + return u.program === f ? u : { ...u, - fallbacks: [...u.fallbacks, d] + fallbacks: [...u.fallbacks, f] }; }; return { @@ -7183,7 +7183,7 @@ var ite = class { throw t; }); }) { - this.onListenerError = e, fr(this, "listeners", /* @__PURE__ */ new Set()), fr(this, "latestSequence", null); + this.onListenerError = e, hr(this, "listeners", /* @__PURE__ */ new Set()), hr(this, "latestSequence", null); } subscribe(e) { return this.listeners.add(e), () => { @@ -7213,7 +7213,7 @@ var ite = class { } }, ate = class { constructor(e, t, n = null) { - this.hub = e, this.sessionId = t, this.sub = n, fr(this, "fontsChangedBy", /* @__PURE__ */ new Set()); + this.hub = e, this.sessionId = t, this.sub = n, hr(this, "fontsChangedBy", /* @__PURE__ */ new Set()); } /** * The write `opId` changed the fonts that can be named in the document (the @@ -7337,10 +7337,10 @@ function lte(e) { const c = tN({ ...s }); - return o ? c.map(({ field: l, widgets: u, ...d }) => ({ + return o ? c.map(({ field: l, widgets: u, ...f }) => ({ type: "forms.deleted", deleted: l.ref, - ...d + ...f })) : c.map((l) => ({ type: "forms.created", ...l @@ -7711,8 +7711,8 @@ function wte(e, t) { const n = (r, o) => se.run(async (s) => { const i = await t({ ops: [r] }, o?.opId === void 0 ? {} : { opId: o.opId }).abortWith(s), a = r.type, c = i.items[0]; if (!c || c.type !== a) throw new J(q.Unknown, `${a} wrote nothing`); - const { type: l, skipped: u, ...d } = c; - return d; + const { type: l, skipped: u, ...f } = c; + return f; }); return { get: e, @@ -7831,8 +7831,8 @@ function kte(e, t) { ...c === void 0 ? {} : { objectNumbers: c } }] }, s === void 0 ? {} : { opId: s }).abortWith(o)).items[0]; if (!l || l.type !== "annotations.copy") throw new J(q.Unknown, "annotations.copy wrote nothing"); - const { type: u, ...d } = l; - return d; + const { type: u, ...f } = l; + return f; }) }; } @@ -7857,7 +7857,7 @@ function Ate(e, t) { reorderCalculations: (n, r, o) => e.reorderCalculations(n, r, o), repair: (n) => e.repair(n), copy: (n, r = {}) => se.run(async (o) => { - const { opId: s, widgets: i, page: a, offset: c, values: l, objectNumbers: u } = r, d = await KE(t, { + const { opId: s, widgets: i, page: a, offset: c, values: l, objectNumbers: u } = r, f = await KE(t, { type: "forms.copy", fields: n, ...i === void 0 ? {} : { widgets: i }, @@ -7866,8 +7866,8 @@ function Ate(e, t) { ...l === void 0 ? {} : { values: l }, ...u === void 0 ? {} : { objectNumbers: u } }, s).abortWith(o); - if (d.type !== "forms.copy") throw Vk(d.type); - const { type: f, ...h } = d; + if (f.type !== "forms.copy") throw Vk(f.type); + const { type: d, ...h } = f; return h; }), repeat: (n, r) => se.run(async (o) => { @@ -7879,8 +7879,8 @@ function Ate(e, t) { ...c === void 0 ? {} : { objectNumbers: c } }, s).abortWith(o); if (l.type !== "forms.repeat") throw Vk(l.type); - const { type: u, ...d } = l; - return d; + const { type: u, ...f } = l; + return f; }), setButtonImage: (n, r, o = {}) => se.run(async (s) => { const i = await KE(t, { @@ -7985,10 +7985,10 @@ var Ite = class { } const o = this.guard.actorForCreate(), s = this.docId; return se.run(async (i) => { - const a = rN(e.resources), c = this.queue.enqueue({ buildPack: (d) => Pe({ + const a = rN(e.resources), c = this.queue.enqueue({ buildPack: (f) => Pe({ kind: "annotations.import", effect: "write", - jobId: d, + jobId: f, opId: r, docId: s, bundle: { @@ -8002,9 +8002,9 @@ var Ite = class { i.aborted ? l() : i.addEventListener("abort", l, { once: !0 }); const u = await c; if (u.tag !== "annotations.import") throw new J(q.WireFormat, `unexpected payload tag: ${u.tag}`); - return this.publisher.publishWrite(r, ...p7(u.result).map((d) => ({ + return this.publisher.publishWrite(r, ...p7(u.result).map((f) => ({ type: "annotations.created", - ...d + ...f }))), u.result; }); } @@ -8430,7 +8430,7 @@ var Tte = class { }), i.result)); } update(e, t, n) { - const r = this.beginDesign(n, Fd(t.actions)); + const r = this.beginDesign(n, $d(t.actions)); if (r.rejected) return r.rejected; const o = this.docId, s = this.queue.enqueue({ buildPack: (i) => Pe({ kind: "forms.updateField", @@ -8465,7 +8465,7 @@ var Tte = class { }), s.result)); } addWidget(e, t, n = {}) { - const r = this.beginDesign(n, Fd(t.actions)); + const r = this.beginDesign(n, $d(t.actions)); if (r.rejected) return r.rejected; const o = this.docId, s = this.queue.enqueue({ buildPack: (i) => Pe({ kind: "forms.addWidget", @@ -8517,7 +8517,7 @@ var Tte = class { }), s.result)); } updateWidget(e, t, n) { - const r = this.beginDesign(n, Fd(t.actions)); + const r = this.beginDesign(n, $d(t.actions)); if (r.rejected) return r.rejected; const o = this.docId, s = this.queue.enqueue({ buildPack: (i) => Pe({ kind: "forms.updateWidget", @@ -8890,7 +8890,7 @@ function Fte(e) { var t = jte(e, "string"); return I0(t) == "symbol" ? t : t + ""; } -function je(e, t, n) { +function Ve(e, t, n) { return (t = Fte(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, @@ -8915,7 +8915,7 @@ const Vte = { var $te = class { constructor(e, t, n, r, o = null, s = () => { }) { - this.docId = t, this.queue = n, this.view = r, this.guard = o, this.onUnlocked = s, je(this, "securityState", void 0), je(this, "passwordRejected", !1), this.securityState = wM(e); + this.docId = t, this.queue = n, this.view = r, this.guard = o, this.onUnlocked = s, Ve(this, "securityState", void 0), Ve(this, "passwordRejected", !1), this.securityState = wM(e); } get state() { return this.securityState; @@ -9282,7 +9282,7 @@ var Kte = class { } }, Hte = class { constructor(e, t, n, r, o) { - this.publisher = o, je(this, "custom", void 0), je(this, "deps", void 0), this.deps = { + this.publisher = o, Ve(this, "custom", void 0), Ve(this, "deps", void 0), this.deps = { docId: e, queue: t, view: n, @@ -9322,7 +9322,7 @@ var Kte = class { const zte = 32; var Wte = class { constructor(e, t, n, r) { - this.docId = e, this.queue = t, je(this, "numbers", []), je(this, "refilling", !1), je(this, "lostListeners", /* @__PURE__ */ new Set()), r && (this.numbers = rM([r])), n.on("document.versioned", () => { + this.docId = e, this.queue = t, Ve(this, "numbers", []), Ve(this, "refilling", !1), Ve(this, "lostListeners", /* @__PURE__ */ new Set()), r && (this.numbers = rM([r])), n.on("document.versioned", () => { const o = this.numbers; this.numbers = [], o.length > 0 && this.notifyLost({ numbers: o, @@ -9451,15 +9451,15 @@ function c$(e, t, n, r = {}) { if (o.aborted) throw new J(q.Aborted, "appearance render aborted"); const u = await t.encode(l.raster, r, o); if (u.source.kind !== "bytes") throw new J(q.WireFormat, "local appearance image handle expected a byte source"); - const d = u.source.bytes, f = IV(u, { async blob() { - return new Blob([Qte(d)], { type: u.mimeType }); + const f = u.source.bytes, d = IV(u, { async blob() { + return new Blob([Qte(f)], { type: u.mimeType }); } }); c.push({ ref: l.ref, mode: l.mode, state: l.state, rect: l.rect, - image: f + image: d }); } return { @@ -9553,8 +9553,8 @@ var Xte = class { let r; try { r = Nr(t), n !== void 0 && n !== this.guard.identity().groupId && this.guard.assertSetGroup(n), this.guard.assertCollab("create", this.guard.targetForSelfCreate(n)); - } catch (d) { - return se.rejectReason(d); + } catch (f) { + return se.rejectReason(f); } const o = this.guard.actorForCreate(n), { resources: s, objectNumber: i } = t, a = jV(e, s), c = this.docId, l = this.ref, u = this.queue.enqueue({ line: { @@ -9562,25 +9562,25 @@ var Xte = class { docId: c, page: l }, - buildPack: async (d) => { - const f = await cg(s); + buildPack: async (f) => { + const d = await lg(s); return Pe({ kind: "annotations.create", effect: "write", - jobId: d, + jobId: f, opId: r, docId: c, page: l, draft: a, ...i !== void 0 ? { objectNumber: i } : {}, - ...aS(f) ? { resources: f } : {}, + ...aS(d) ? { resources: d } : {}, ...o ? { actor: o } : {} - }, zw(f)); + }, zw(d)); } }); - return se.run(async (d) => { - const f = () => u.abort(d.reason); - d.aborted ? f() : d.addEventListener("abort", f, { once: !0 }); + return se.run(async (f) => { + const d = () => u.abort(f.reason); + f.aborted ? d() : f.addEventListener("abort", d, { once: !0 }); const h = await u; if (h.tag !== "annotations.create") throw new J(q.WireFormat, `unexpected payload tag: ${h.tag}`); return this.publisher.publishWrite(r, { @@ -9604,7 +9604,7 @@ var Xte = class { docId: i }, buildPack: async (c) => { - const l = await cg(s); + const l = await lg(s); return Pe({ kind: "annotations.update", effect: "write", @@ -9746,7 +9746,7 @@ var Xte = class { } }, Zte = class { constructor(e, t, n, r, o, s, i = za) { - this.encoder = o, je(this, "batch", void 0), this.batch = { + this.encoder = o, Ve(this, "batch", void 0), this.batch = { docId: e, page: t, queue: n, @@ -9800,10 +9800,10 @@ var Xte = class { a.aborted ? c() : a.addEventListener("abort", c, { once: !0 }); const l = await i; if (l.tag !== "pages.render") throw new J(q.WireFormat, `unexpected payload tag: ${l.tag}`); - const { raster: u, area: d } = l; + const { raster: u, area: f } = l; return { ...u, - transform: qQ(d, e?.rotation ?? 0, u.width, u.height) + transform: qQ(f, e?.rotation ?? 0, u.width, u.height) }; }); } @@ -10011,13 +10011,13 @@ var nne = class { } }, one = class { constructor(e, t, n, r, o, s, i, a, c = za) { - this.ref = e, je(this, zx, !0), je(this, "annotations", void 0), je(this, "forms", void 0), je(this, "text", void 0), je(this, "render", void 0), je(this, "pieceInfo", void 0), je(this, "measure", void 0), this.annotations = new Xte(t, e, n, r, o, s, i, c), this.forms = new Zte(t, e, n, r, o, s, c), this.text = new nne(t, e, n, r, s), this.render = new ene(t, e, n, r, o, s, c), this.pieceInfo = new l$(t, n, r, s, e), this.measure = new rne(t, e, n, r, s, a); + this.ref = e, Ve(this, zx, !0), Ve(this, "annotations", void 0), Ve(this, "forms", void 0), Ve(this, "text", void 0), Ve(this, "render", void 0), Ve(this, "pieceInfo", void 0), Ve(this, "measure", void 0), this.annotations = new Xte(t, e, n, r, o, s, i, c), this.forms = new Zte(t, e, n, r, o, s, c), this.text = new nne(t, e, n, r, s), this.render = new ene(t, e, n, r, o, s, c), this.pieceInfo = new l$(t, n, r, s, e), this.measure = new rne(t, e, n, r, s, a); } }, sne = class oN { /** A newly opened document's handle, its calls carrying no facts. */ static open(t, n, r, o, s, i, a = za, c, l) { let u = !1; - const d = () => u, f = new ite(), h = new Wte(t, n, f, c), g = new ate(f, i), p = () => g.publishFact({ type: "fonts.changed" }); + const f = () => u, d = new ite(), h = new Wte(t, n, d, c), g = new ate(d, i), p = () => g.publishFact({ type: "fonts.changed" }); l?.add(p); const m = { id: t, @@ -10026,11 +10026,11 @@ var nne = class { guard: s, renderPolicy: a, publisher: g, - events: f, - security: new $te(o, t, n, { isClosed: d }, s, () => h.topUp()), + events: d, + security: new $te(o, t, n, { isClosed: f }, s, () => h.topUp()), objectNumbers: h, render: { getPolicy: () => se.resolveValue(a) }, - isClosed: d, + isClosed: f, close: () => { u = !0, l?.delete(p); }, @@ -10039,7 +10039,7 @@ var nne = class { return new oN(m, {}); } constructor(t, n) { - this.doc = t, this.facts = n, je(this, zx, !0), je(this, "metadata", void 0), je(this, "pieceInfo", void 0), je(this, "annotations", void 0), je(this, "attachments", void 0), je(this, "actions", void 0), je(this, "outline", void 0), je(this, "forms", void 0), je(this, "fonts", void 0), je(this, "search", void 0), je(this, "pages", void 0), je(this, "redaction", void 0), je(this, "security", void 0), je(this, "signatures", void 0), je(this, "render", void 0), je(this, "events", void 0), je(this, "objectNumbers", void 0), je(this, "id", void 0), je(this, "queue", void 0), je(this, "changes", void 0); + this.doc = t, this.facts = n, Ve(this, zx, !0), Ve(this, "metadata", void 0), Ve(this, "pieceInfo", void 0), Ve(this, "annotations", void 0), Ve(this, "attachments", void 0), Ve(this, "actions", void 0), Ve(this, "outline", void 0), Ve(this, "forms", void 0), Ve(this, "fonts", void 0), Ve(this, "search", void 0), Ve(this, "pages", void 0), Ve(this, "redaction", void 0), Ve(this, "security", void 0), Ve(this, "signatures", void 0), Ve(this, "render", void 0), Ve(this, "events", void 0), Ve(this, "objectNumbers", void 0), Ve(this, "id", void 0), Ve(this, "queue", void 0), Ve(this, "changes", void 0); const { id: r, guard: o, publisher: s } = t, i = Pte(t.queue.withFacts(n), s), a = { isClosed: t.isClosed }; this.id = r, this.queue = i, this.render = t.render, this.events = t.events, this.objectNumbers = t.objectNumbers, this.security = t.security, this.metadata = new Hte(r, i, a, o, s), this.pieceInfo = new l$(r, i, a, o), this.annotations = kte(new Ite(r, i, a, o, s), (c, l) => this.apply(c, l)), this.attachments = bte(new Nte(r, i, a, o), (c, l) => this.apply(c, l)), this.actions = new Cte(r, i, a, o), this.outline = wte(() => Bte(r, i, a, o), (c, l) => this.apply(c, l)), this.forms = Ate(new Mte(r, i, a, o, s), (c, l) => this.apply(c, l)), this.fonts = new Tte(r, i, a, o), this.search = new Dte(r, i, a, o), this.pages = vte(new _te(r, i, a, o, s), (c, l) => this.apply(c, l)), this.redaction = new Lte(r, i, a, o, s), this.signatures = new Ute(r, i, a, o, s), this.changes = new Ote(r, i, a, o, s); } @@ -10189,38 +10189,38 @@ var nne = class { }, ine = class { constructor(e, t = () => { }) { - this.queue = e, this.onChange = t, je(this, "fonts", /* @__PURE__ */ new Map()), je(this, "fallbacks", []); + this.queue = e, this.onChange = t, Ve(this, "fonts", /* @__PURE__ */ new Map()), Ve(this, "fallbacks", []); } register(e) { const t = e.key; - if (!t || Om.includes(t)) return se.rejectReason(new J(q.InvalidArg, t ? `'${t}' is a standard font's name; register the font under a key of its own` : "a font needs a key", { details: { field: "key" } })); + if (!t || Pm.includes(t)) return se.rejectReason(new J(q.InvalidArg, t ? `'${t}' is a standard font's name; register the font under a key of its own` : "a font needs a key", { details: { field: "key" } })); const n = AM(e.data), r = this.fonts.get(t); if (r) return se.resolveValue(r.handle); const o = e.familyName ?? "", s = e.weight ?? 0, i = e.italic === void 0 ? -1 : e.italic ? 1 : 0; return se.run(async (a) => { - const c = n.slice(0), l = this.queue.enqueue({ buildPack: (f) => Pe({ + const c = n.slice(0), l = this.queue.enqueue({ buildPack: (d) => Pe({ kind: "fonts.register", effect: "runtimeWrite", - jobId: f, + jobId: d, fontKey: t, familyName: o, weight: s, italic: i, data: n }, [n]) }); - ih(a, l); - const u = await l, d = { + ch(a, l); + const u = await l, f = { key: t, ...u.identity }; return this.fonts.set(t, { - handle: d, + handle: f, italic: i, weight: s, familyName: o, bytes: c, builtIn: !1 - }), this.onChange(), d; + }), this.onChange(), f; }); } /** @@ -10271,7 +10271,7 @@ var nne = class { const n = []; for (const r of e) { const o = this.register(r); - ih(t, o), n.push(await o); + ch(t, o), n.push(await o); } return n; }); @@ -10288,7 +10288,7 @@ var nne = class { fontKey: t, tier: n }) }); - ih(r, o), await o, this.noteFallback(t, n), this.onChange(); + ch(r, o), await o, this.noteFallback(t, n), this.onChange(); }); } /** Record a fallback as the worker has it: adding one again changes its tier only. */ @@ -10308,7 +10308,7 @@ var nne = class { jobId: i, fontKey: t }) }); - ih(r, o); + ch(r, o); const s = await o; return n.handle = { key: t, @@ -10323,7 +10323,7 @@ var nne = class { effect: "runtimeWrite", jobId: n }) }); - ih(e, t), await t, this.fallbacks.length = 0, this.onChange(); + ch(e, t), await t, this.fallbacks.length = 0, this.onChange(); }); } clear() { @@ -10333,7 +10333,7 @@ var nne = class { effect: "runtimeWrite", jobId: n }) }); - ih(e, t), await t, this.fonts.clear(), this.fallbacks.length = 0, this.onChange(); + ch(e, t), await t, this.fonts.clear(), this.fallbacks.length = 0, this.onChange(); }); } list() { @@ -10375,7 +10375,7 @@ var nne = class { }) }); } }; -function ih(e, t) { +function ch(e, t) { const n = () => t.abort(e.reason); e.aborted ? n() : e.addEventListener("abort", n, { once: !0 }); } @@ -10395,7 +10395,7 @@ function qx(e) { function cne(e) { Wx().allowed.delete(e); } -function ug(e, t) { +function dg(e, t) { const n = lne(e); return new Worker(n, t); } @@ -10545,7 +10545,7 @@ self.onmessage = async (event) => { `, zE = { type: "module" }; var y$ = class { constructor(e = {}) { - this.options = e, je(this, "pending", /* @__PURE__ */ new Map()), je(this, "workers", []), je(this, "blob", null), je(this, "configuredUrl", void 0), je(this, "nextWorker", 0), je(this, "nextId", 1), je(this, "disabledWorkerPath", !1), je(this, "poolVerified", !1); + this.options = e, Ve(this, "pending", /* @__PURE__ */ new Map()), Ve(this, "workers", []), Ve(this, "blob", null), Ve(this, "configuredUrl", void 0), Ve(this, "nextWorker", 0), Ve(this, "nextId", 1), Ve(this, "disabledWorkerPath", !1), Ve(this, "poolVerified", !1); const t = e.worker; this.configuredUrl = typeof t == "string" && t !== "inline" ? N0(t) : null, this.configuredUrl !== null && qx(this.configuredUrl); } @@ -10603,11 +10603,11 @@ var y$ = class { c(), a(new J(q.Aborted, "image encoding aborted")); }; if (this.pending.set(s, { - resolve: (d) => { - this.poolVerified = !0, c(), i(d); + resolve: (f) => { + this.poolVerified = !0, c(), i(f); }, - reject: (d) => { - c(), a(d); + reject: (f) => { + c(), a(f); } }), r.aborted) { l(); @@ -10644,9 +10644,9 @@ var y$ = class { createWorker() { const e = this.options.worker; if (typeof e == "function") return e(); - if (this.configuredUrl !== null) return ug(this.configuredUrl, zE); + if (this.configuredUrl !== null) return dg(this.configuredUrl, zE); const t = e === void 0 ? mne() : null; - return t !== null ? ug(t, zE) : (this.blob ?? (this.blob = u$(kne)), ug(this.blob.url, zE)); + return t !== null ? dg(t, zE) : (this.blob ?? (this.blob = u$(kne)), dg(this.blob.url, zE)); } }; let EM = !1; @@ -10722,12 +10722,12 @@ async function xne(e, t, n, r = t * 4) { 10, 26, 10 - ]), d = new Uint8Array(u.length + l.reduce((h, g) => h + g.length, 0)); - d.set(u, 0); - let f = u.length; + ]), f = new Uint8Array(u.length + l.reduce((h, g) => h + g.length, 0)); + f.set(u, 0); + let d = u.length; for (const h of l) - d.set(h, f), f += h.length; - return d; + f.set(h, d), d += h.length; + return f; } async function Ene(e) { const t = new Blob([e]).stream().pipeThrough(new CompressionStream("deflate")); @@ -10755,7 +10755,7 @@ function Cne(e) { } var Ine = class { constructor(e) { - this.ctx = e, je(this, "protection", void 0), je(this, "documentProtection", void 0), this.protection = e.signedDocumentPolicy === "protect" ? e.protection : null, this.documentProtection = e.protection; + this.ctx = e, Ve(this, "protection", void 0), Ve(this, "documentProtection", void 0), this.protection = e.signedDocumentPolicy === "protect" ? e.protection : null, this.documentProtection = e.protection; } /** * Replace the file's own permission bits after an unlock loaded it with @@ -10823,7 +10823,7 @@ var Ine = class { */ assertCapability(e) { if (!this.can(e)) - throw di(this.protection).has(e) ? new J(q.ProtectedDocument, hM(e, this.protection)) : new po(e, "engine-local"); + throw di(this.protection).has(e) ? new J(q.ProtectedDocument, hM(e, this.protection)) : new go(e, "engine-local"); } /** * Throws `PermissionDenied` if the scope grants none of `caps`. Used @@ -10832,7 +10832,7 @@ var Ine = class { * like `/text` which the cloud gates on `doc.text.copy OR doc.text.search`). */ assertAnyCapability(e) { - if (!bee(e, this.ctx.scope, this.ctx.permissionFlags, this.protection)) throw new po(e[0] ?? "doc.open", "engine-local", e); + if (!bee(e, this.ctx.scope, this.ctx.permissionFlags, this.protection)) throw new go(e[0] ?? "doc.open", "engine-local", e); } /** * Throws `PermissionDenied` if the scope doesn't grant the collab @@ -10873,7 +10873,7 @@ var Ine = class { _ee(this.changeAuthority(), e) || this.assertCapability(e === "fill" ? "doc.forms.fill" : "doc.sign"); } assertCollab(e, t) { - if (this.assertAnnotationsUnprotected(), !this.canCollab(e, t)) throw new po(`annotations:${e}`, "engine-local"); + if (this.assertAnnotationsUnprotected(), !this.canCollab(e, t)) throw new go(`annotations:${e}`, "engine-local"); } /** * What an annotation write carries for the worker to check against the @@ -10912,7 +10912,7 @@ var Ine = class { */ assertSetGroup(e) { if (e !== void 0 && !this.canSetGroup(e)) - throw new po(`annotations:set-group:group=${e}`, "engine-local"); + throw new go(`annotations:set-group:group=${e}`, "engine-local"); } /** * Build the actor that the worker stamps onto a newly created @@ -11040,7 +11040,7 @@ function IM(e, t) { } var Lne = class { constructor(e, t = {}) { - this.transport = e, je(this, "jobs", []), je(this, "byId", /* @__PURE__ */ new Map()), je(this, "workingSets", /* @__PURE__ */ new Map()), je(this, "unsubscribe", void 0), je(this, "maxConcurrency", void 0), je(this, "inFlight", 0), je(this, "destroyed", !1), this.maxConcurrency = Math.max(1, t.concurrency ?? 1), this.unsubscribe = e.onMessage((n) => this.handleResponse(n)); + this.transport = e, Ve(this, "jobs", []), Ve(this, "byId", /* @__PURE__ */ new Map()), Ve(this, "workingSets", /* @__PURE__ */ new Map()), Ve(this, "unsubscribe", void 0), Ve(this, "maxConcurrency", void 0), Ve(this, "inFlight", 0), Ve(this, "destroyed", !1), this.maxConcurrency = Math.max(1, t.concurrency ?? 1), this.unsubscribe = e.onMessage((n) => this.handleResponse(n)); } /** The same queue, every job queued through it carrying `facts` (see `DocumentHandle.with`). */ withFacts(e) { @@ -11061,7 +11061,7 @@ var Lne = class { } const s = o instanceof Promise ? null : o, i = s ? NM(s.payload) : t.line; return i ? new se((a, c, l, u) => { - const d = { + const f = { jobId: r, pack: s, built: s !== null, @@ -11081,20 +11081,20 @@ var Lne = class { aborted: !1, abortReason: void 0 }; - this.jobs.splice(e, 0, d), this.byId.set(r, d); - const f = () => { + this.jobs.splice(e, 0, f), this.byId.set(r, f); + const d = () => { if (this.byId.has(r)) { - if (!d.sent) { - this.remove(d), d.reject(new Kw(u.reason)), this.tick(); + if (!f.sent) { + this.remove(f), f.reject(new Kw(u.reason)), this.tick(); return; } - d.aborted = !0, d.abortReason = u.reason, this.transport.send(Pe({ + f.aborted = !0, f.abortReason = u.reason, this.transport.send(Pe({ kind: "abort", jobId: r })); } }; - u.aborted ? f() : u.addEventListener("abort", f, { once: !0 }), o instanceof Promise && o.then((h) => this.built(d, h, i), (h) => this.failedToBuild(d, h)), this.tick(); + u.aborted ? d() : u.addEventListener("abort", d, { once: !0 }), o instanceof Promise && o.then((h) => this.built(f, h, i), (h) => this.failedToBuild(f, h)), this.tick(); }) : se.rejectReason(new J(q.Unknown, "a job built later must state its line")); } /** An async request is ready: the job may be sent when its turn comes. */ @@ -11270,7 +11270,7 @@ var Fne = class k$ { return new k$(t.transport, t.concurrency ?? 1, t.imageEncoder, t.renderPolicy, t.signedDocumentPolicy ?? "protect"); } constructor(t, n, r, o, s) { - this.transport = t, this.signedDocumentPolicy = s, je(this, zx, !0), je(this, "canOpenFiles", !0), je(this, "queue", void 0), je(this, "imageEncoder", void 0), je(this, "renderPolicy", void 0), je(this, "destroyed", !1), je(this, "fonts", void 0), je(this, "engineFontListeners", /* @__PURE__ */ new Set()), this.queue = new Lne(t, { concurrency: n }), this.imageEncoder = r ?? (typeof document > "u" && typeof OffscreenCanvas > "u" ? new Sne() : new y$()), this.renderPolicy = o ?? za, this.fonts = new ine(this.queue, () => { + this.transport = t, this.signedDocumentPolicy = s, Ve(this, zx, !0), Ve(this, "canOpenFiles", !0), Ve(this, "queue", void 0), Ve(this, "imageEncoder", void 0), Ve(this, "renderPolicy", void 0), Ve(this, "destroyed", !1), Ve(this, "fonts", void 0), Ve(this, "engineFontListeners", /* @__PURE__ */ new Set()), this.queue = new Lne(t, { concurrency: n }), this.imageEncoder = r ?? (typeof document > "u" && typeof OffscreenCanvas > "u" ? new Sne() : new y$()), this.renderPolicy = o ?? za, this.fonts = new ine(this.queue, () => { for (const i of this.engineFontListeners) i(); }); } @@ -11286,7 +11286,7 @@ var Fne = class k$ { open(t, n) { if (this.destroyed) return se.rejectReason(new J(q.RuntimeUnavailable, "engine destroyed")); try { - if (n?.scope && !v6("doc.open", n.scope, Hx(null))) return se.rejectReason(new po("doc.open", "engine-local")); + if (n?.scope && !v6("doc.open", n.scope, Hx(null))) return se.rejectReason(new go("doc.open", "engine-local")); } catch (r) { return se.rejectReason(r); } @@ -11300,7 +11300,7 @@ var Fne = class k$ { } : a === void 0 ? { kind: "fresh" } : { kind: "artifact", bytes: a - }, l = a ? [a] : [], u = this.signedDocumentPolicy, d = t.baseSha256, f = r.enqueue({ buildPack: (h) => Pe({ + }, l = a ? [a] : [], u = this.signedDocumentPolicy, f = t.baseSha256, d = r.enqueue({ buildPack: (h) => Pe({ kind: "open.layerFileBase", effect: "open", jobId: h, @@ -11310,10 +11310,10 @@ var Fne = class k$ { layer: c, password: o, signedDocumentPolicy: u, - ...d ? { baseSha256: d } : {}, + ...f ? { baseSha256: f } : {}, reserveObjectNumbers: 64 }, l) }); - return this.openResult(f, n); + return this.openResult(d, n); } openBytes(t, n) { const r = this.queue, o = n?.password ?? null, s = f1(t.bytes), i = t.id ?? Dy(), a = this.signedDocumentPolicy, c = r.enqueue({ buildPack: (l) => Pe({ @@ -11332,7 +11332,7 @@ var Fne = class k$ { const r = this.queue, o = n?.password ?? null, s = t.id ?? Dy(), i = t.baseKey ?? s, a = f1(t.baseBytes), c = t.layer?.kind === "artifact" ? f1(t.layer.bytes) : void 0, l = c === void 0 ? { kind: "fresh" } : { kind: "artifact", bytes: c - }, u = c ? [a, c] : [a], d = this.signedDocumentPolicy, f = t.baseSha256, h = r.enqueue({ buildPack: (g) => Pe({ + }, u = c ? [a, c] : [a], f = this.signedDocumentPolicy, d = t.baseSha256, h = r.enqueue({ buildPack: (g) => Pe({ kind: "open.layerMemBase", effect: "open", jobId: g, @@ -11341,8 +11341,8 @@ var Fne = class k$ { baseBytes: a, layer: l, password: o, - signedDocumentPolicy: d, - ...f ? { baseSha256: f } : {}, + signedDocumentPolicy: f, + ...d ? { baseSha256: d } : {}, reserveObjectNumbers: 64 }, u) }); return this.openResult(h, n); @@ -11404,7 +11404,7 @@ var qE = class S$ { return await (n ?? sN(t)), r; } constructor(t) { - this.worker = t, je(this, "listeners", /* @__PURE__ */ new Set()), je(this, "onMessageBound", void 0), this.onMessageBound = (n) => this.handleMessage(n), t.addEventListener("message", this.onMessageBound); + this.worker = t, Ve(this, "listeners", /* @__PURE__ */ new Set()), Ve(this, "onMessageBound", void 0), this.onMessageBound = (n) => this.handleMessage(n), t.addEventListener("message", this.onMessageBound); } send(t) { this.worker.postMessage(t.payload, t.transfer); @@ -11427,7 +11427,7 @@ var qE = class S$ { } }, Vne = class { constructor(e, t = {}) { - this.boot = e, this.options = t, je(this, "listeners", /* @__PURE__ */ new Set()), je(this, "pendingPacks", []), je(this, "inner", void 0), je(this, "innerUnsubscribe", void 0), je(this, "bootPromise", void 0), je(this, "bootError", void 0), je(this, "terminated", !1); + this.boot = e, this.options = t, Ve(this, "listeners", /* @__PURE__ */ new Set()), Ve(this, "pendingPacks", []), Ve(this, "inner", void 0), Ve(this, "innerUnsubscribe", void 0), Ve(this, "bootPromise", void 0), Ve(this, "bootError", void 0), Ve(this, "terminated", !1); } /** * Trigger the boot without sending anything — used by `Engine.warmup()` so @@ -11560,7 +11560,7 @@ async function Une(e, t) { file: null }; if (t !== null) return { - worker: ug(t, { type: "module" }), + worker: dg(t, { type: "module" }), destroy: () => { }, file: null @@ -11568,21 +11568,21 @@ async function Une(e, t) { e === void 0 && await h$(); const n = e === void 0 ? gne() : null; if (n !== null) return { - worker: ug(n, { type: "module" }), + worker: dg(n, { type: "module" }), destroy: () => { }, file: n }; let r; try { - r = (await import("./embedpdf-worker.source-CCHXFWYh-CTEHza5m.js")).default; + r = (await import("./embedpdf-worker.source-Z0o39l7i-qFIWKZ_I.js")).default; } catch (s) { throw new Error("[embedpdf] could not load the inline engine worker module (@embedpdf/engine/worker-source). If your bundler cannot resolve it, pass a worker explicitly: `localEngine({ worker: () => new Worker(...) })`.", { cause: s }); } const o = u$(r); try { return { - worker: ug(o.url, { type: "module" }), + worker: dg(o.url, { type: "module" }), destroy: o.revoke, file: null }; @@ -11615,7 +11615,7 @@ function Kne(e = {}) { return r; } async function Hne(e = {}, t = {}) { - const { createInlineTransport: n } = await import("./inline-transport-GZ5fBXix.js"); + const { createInlineTransport: n } = await import("./inline-transport-DLWGAv7G.js"); return n(e, () => g$(t)); } function zne(e) { @@ -11713,7 +11713,7 @@ function Qne(e) { return new Uint8Array(t).set(e), t; } const x$ = "" + new URL("../embedpdf.wasm", import.meta.url).href; -var dv, We, E$, rl, PM, C$, I$, JE, Uk, Jw, N$, N6, iN, aN, O$, pS = {}, gS = [], Xne = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, fv = Array.isArray; +var dv, He, E$, ol, PM, C$, I$, JE, Uk, Jw, N$, N6, iN, aN, O$, pS = {}, gS = [], Xne = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, fv = Array.isArray; function ai(e, t) { for (var n in t) e[n] = t[n]; return e; @@ -11721,7 +11721,7 @@ function ai(e, t) { function O6(e) { e && e.parentNode && e.parentNode.removeChild(e); } -function mo(e, t, n) { +function yo(e, t, n) { var r, o, s, i = {}; for (s in t) s == "key" ? r = t[s] : s == "ref" ? o = t[s] : i[s] = t[s]; if (arguments.length > 2 && (i.children = arguments.length > 3 ? dv.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (s in e.defaultProps) i[s] === void 0 && (i[s] = e.defaultProps[s]); @@ -11729,7 +11729,7 @@ function mo(e, t, n) { } function Yw(e, t, n, r, o) { var s = { type: e, props: t, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: o ?? ++E$, __i: -1, __u: 0 }; - return o == null && We.vnode != null && We.vnode(s), s; + return o == null && He.vnode != null && He.vnode(s), s; } function Zne() { return { current: null }; @@ -11740,15 +11740,15 @@ function nt(e) { function Rr(e, t) { this.props = e, this.context = t; } -function cm(e, t) { - if (t == null) return e.__ ? cm(e.__, e.__i + 1) : null; +function lm(e, t) { + if (t == null) return e.__ ? lm(e.__, e.__i + 1) : null; for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e; - return typeof e.type == "function" ? cm(e) : null; + return typeof e.type == "function" ? lm(e) : null; } function ere(e) { if (e.__P && e.__d) { var t = e.__v, n = t.__e, r = [], o = [], s = ai({}, t); - s.__v = t.__v + 1, We.vnode && We.vnode(s), P6(e.__P, s, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? cm(t), !!(32 & t.__u), o), s.__v = t.__v, s.__.__k[s.__i] = s, B$(r, s, o), t.__e = t.__ = null, s.__e != n && P$(s); + s.__v = t.__v + 1, He.vnode && He.vnode(s), P6(e.__P, s, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? lm(t), !!(32 & t.__u), o), s.__v = t.__v, s.__.__k[s.__i] = s, B$(r, s, o), t.__e = t.__ = null, s.__e != n && P$(s); } } function P$(e) { @@ -11757,24 +11757,24 @@ function P$(e) { }), P$(e); } function cN(e) { - (!e.__d && (e.__d = !0) && rl.push(e) && !mS.__r++ || PM != We.debounceRendering) && ((PM = We.debounceRendering) || C$)(mS); + (!e.__d && (e.__d = !0) && ol.push(e) && !mS.__r++ || PM != He.debounceRendering) && ((PM = He.debounceRendering) || C$)(mS); } function mS() { try { - for (var e, t = 1; rl.length; ) rl.length > t && rl.sort(I$), e = rl.shift(), t = rl.length, ere(e); + for (var e, t = 1; ol.length; ) ol.length > t && ol.sort(I$), e = ol.shift(), t = ol.length, ere(e); } finally { - rl.length = mS.__r = 0; + ol.length = mS.__r = 0; } } function R$(e, t, n, r, o, s, i, a, c, l, u) { - var d, f, h, g, p, m, v, S = r && r.__k || gS, C = t.length; - for (c = tre(n, t, S, c, C), d = 0; d < C; d++) (h = n.__k[d]) != null && (f = h.__i != -1 && S[h.__i] || pS, h.__i = d, m = P6(e, h, f, o, s, i, a, c, l, u), g = h.__e, h.ref && f.ref != h.ref && (f.ref && R6(f.ref, null, h), u.push(h.ref, h.__c || g, h)), p == null && g != null && (p = g), (v = !!(4 & h.__u)) || f.__k === h.__k ? (c = T$(h, c, e, v), v && f.__e && (f.__e = null)) : typeof h.type == "function" && m !== void 0 ? c = m : g && (c = g.nextSibling), h.__u &= -7); + var f, d, h, g, p, m, v, S = r && r.__k || gS, C = t.length; + for (c = tre(n, t, S, c, C), f = 0; f < C; f++) (h = n.__k[f]) != null && (d = h.__i != -1 && S[h.__i] || pS, h.__i = f, m = P6(e, h, d, o, s, i, a, c, l, u), g = h.__e, h.ref && d.ref != h.ref && (d.ref && R6(d.ref, null, h), u.push(h.ref, h.__c || g, h)), p == null && g != null && (p = g), (v = !!(4 & h.__u)) || d.__k === h.__k ? (c = T$(h, c, e, v), v && d.__e && (d.__e = null)) : typeof h.type == "function" && m !== void 0 ? c = m : g && (c = g.nextSibling), h.__u &= -7); return n.__e = p, c; } function tre(e, t, n, r, o) { - var s, i, a, c, l, u = n.length, d = u, f = 0; - for (e.__k = new Array(o), s = 0; s < o; s++) (i = t[s]) != null && typeof i != "boolean" && typeof i != "function" ? (typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? i = e.__k[s] = Yw(null, i, null, null, null) : fv(i) ? i = e.__k[s] = Yw(nt, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? i = e.__k[s] = Yw(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : e.__k[s] = i, c = s + f, i.__ = e, i.__b = e.__b + 1, a = null, (l = i.__i = nre(i, n, c, d)) != -1 && (d--, (a = n[l]) && (a.__u |= 2)), a == null || a.__v == null ? (l == -1 && (o > u ? f-- : o < u && f++), typeof i.type != "function" && (i.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, i.__u |= 4))) : e.__k[s] = null; - if (d) for (s = 0; s < u; s++) (a = n[s]) != null && (2 & a.__u) == 0 && (a.__e == r && (r = cm(a)), L$(a, a)); + var s, i, a, c, l, u = n.length, f = u, d = 0; + for (e.__k = new Array(o), s = 0; s < o; s++) (i = t[s]) != null && typeof i != "boolean" && typeof i != "function" ? (typeof i == "string" || typeof i == "number" || typeof i == "bigint" || i.constructor == String ? i = e.__k[s] = Yw(null, i, null, null, null) : fv(i) ? i = e.__k[s] = Yw(nt, { children: i }, null, null, null) : i.constructor === void 0 && i.__b > 0 ? i = e.__k[s] = Yw(i.type, i.props, i.key, i.ref ? i.ref : null, i.__v) : e.__k[s] = i, c = s + d, i.__ = e, i.__b = e.__b + 1, a = null, (l = i.__i = nre(i, n, c, f)) != -1 && (f--, (a = n[l]) && (a.__u |= 2)), a == null || a.__v == null ? (l == -1 && (o > u ? d-- : o < u && d++), typeof i.type != "function" && (i.__u |= 4)) : l != c && (l == c - 1 ? d-- : l == c + 1 ? d++ : (l > c ? d-- : d++, i.__u |= 4))) : e.__k[s] = null; + if (f) for (s = 0; s < u; s++) (a = n[s]) != null && (2 & a.__u) == 0 && (a.__e == r && (r = lm(a)), L$(a, a)); return r; } function T$(e, t, n, r) { @@ -11783,15 +11783,15 @@ function T$(e, t, n, r) { for (o = e.__k, s = 0; o && s < o.length; s++) o[s] && (o[s].__ = e, t = T$(o[s], t, n, r)); return t; } - e.__e != t && (r && (t && e.type && !t.parentNode && (t = cm(e)), n.insertBefore(e.__e, t || null)), t = e.__e); + e.__e != t && (r && (t && e.type && !t.parentNode && (t = lm(e)), n.insertBefore(e.__e, t || null)), t = e.__e); do t = t && t.nextSibling; while (t != null && t.nodeType == 8); return t; } -function $o(e, t) { +function Uo(e, t) { return t = t || [], e == null || typeof e == "boolean" || (fv(e) ? e.some(function(n) { - $o(n, t); + Uo(n, t); }) : t.push(e)), t; } function nre(e, t, n, r) { @@ -11829,58 +11829,58 @@ function TM(e) { var n = this.l[t.type + e]; if (t[Uk] == null) t[Uk] = N6++; else if (t[Uk] < n[Jw]) return; - return n(We.event ? We.event(t) : t); + return n(He.event ? He.event(t) : t); } }; } function P6(e, t, n, r, o, s, i, a, c, l) { - var u, d, f, h, g, p, m, v, S, C, k, N, w, y, x, A, b = t.type; + var u, f, d, h, g, p, m, v, S, C, k, N, w, y, x, A, b = t.type; if (t.constructor !== void 0) return null; - 128 & n.__u && (c = !!(32 & n.__u), s = [a = t.__e = n.__e]), (u = We.__b) && u(t); + 128 & n.__u && (c = !!(32 & n.__u), s = [a = t.__e = n.__e]), (u = He.__b) && u(t); e: if (typeof b == "function") { - d = i.length; + f = i.length; try { - if (S = t.props, C = b.prototype && b.prototype.render, k = (u = b.contextType) && r[u.__c], N = u ? k ? k.props.value : u.__ : r, n.__c ? v = (f = t.__c = n.__c).__ = f.__E : (C ? t.__c = f = new b(S, N) : (t.__c = f = new Rr(S, N), f.constructor = b, f.render = ore), k && k.sub(f), f.state || (f.state = {}), f.__n = r, h = f.__d = !0, f.__h = [], f._sb = []), C && f.__s == null && (f.__s = f.state), C && b.getDerivedStateFromProps != null && (f.__s == f.state && (f.__s = ai({}, f.__s)), ai(f.__s, b.getDerivedStateFromProps(S, f.__s))), g = f.props, p = f.state, f.__v = t, h) C && b.getDerivedStateFromProps == null && f.componentWillMount != null && f.componentWillMount(), C && f.componentDidMount != null && f.__h.push(f.componentDidMount); + if (S = t.props, C = b.prototype && b.prototype.render, k = (u = b.contextType) && r[u.__c], N = u ? k ? k.props.value : u.__ : r, n.__c ? v = (d = t.__c = n.__c).__ = d.__E : (C ? t.__c = d = new b(S, N) : (t.__c = d = new Rr(S, N), d.constructor = b, d.render = ore), k && k.sub(d), d.state || (d.state = {}), d.__n = r, h = d.__d = !0, d.__h = [], d._sb = []), C && d.__s == null && (d.__s = d.state), C && b.getDerivedStateFromProps != null && (d.__s == d.state && (d.__s = ai({}, d.__s)), ai(d.__s, b.getDerivedStateFromProps(S, d.__s))), g = d.props, p = d.state, d.__v = t, h) C && b.getDerivedStateFromProps == null && d.componentWillMount != null && d.componentWillMount(), C && d.componentDidMount != null && d.__h.push(d.componentDidMount); else { - if (C && b.getDerivedStateFromProps == null && S !== g && f.componentWillReceiveProps != null && f.componentWillReceiveProps(S, N), t.__v == n.__v || !f.__e && f.shouldComponentUpdate != null && f.shouldComponentUpdate(S, f.__s, N) === !1) { - t.__v != n.__v && (f.props = S, f.state = f.__s, f.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(E) { + if (C && b.getDerivedStateFromProps == null && S !== g && d.componentWillReceiveProps != null && d.componentWillReceiveProps(S, N), t.__v == n.__v || !d.__e && d.shouldComponentUpdate != null && d.shouldComponentUpdate(S, d.__s, N) === !1) { + t.__v != n.__v && (d.props = S, d.state = d.__s, d.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(E) { E && (E.__ = t); - }), gS.push.apply(f.__h, f._sb), f._sb = [], f.__h.length && i.push(f); + }), gS.push.apply(d.__h, d._sb), d._sb = [], d.__h.length && i.push(d); break e; } - f.componentWillUpdate != null && f.componentWillUpdate(S, f.__s, N), C && f.componentDidUpdate != null && f.__h.push(function() { - f.componentDidUpdate(g, p, m); + d.componentWillUpdate != null && d.componentWillUpdate(S, d.__s, N), C && d.componentDidUpdate != null && d.__h.push(function() { + d.componentDidUpdate(g, p, m); }); } - if (f.context = N, f.props = S, f.__P = e, f.__e = !1, w = We.__r, y = 0, C) f.state = f.__s, f.__d = !1, w && w(t), u = f.render(f.props, f.state, f.context), gS.push.apply(f.__h, f._sb), f._sb = []; + if (d.context = N, d.props = S, d.__P = e, d.__e = !1, w = He.__r, y = 0, C) d.state = d.__s, d.__d = !1, w && w(t), u = d.render(d.props, d.state, d.context), gS.push.apply(d.__h, d._sb), d._sb = []; else do - f.__d = !1, w && w(t), u = f.render(f.props, f.state, f.context), f.state = f.__s; - while (f.__d && ++y < 25); - f.state = f.__s, f.getChildContext != null && (r = ai(ai({}, r), f.getChildContext())), C && !h && f.getSnapshotBeforeUpdate != null && (m = f.getSnapshotBeforeUpdate(g, p)), x = u != null && u.type === nt && u.key == null ? _$(u.props.children) : u, a = R$(e, fv(x) ? x : [x], t, n, r, o, s, i, a, c, l), f.base = t.__e, t.__u &= -161, f.__h.length && i.push(f), v && (f.__E = f.__ = null); + d.__d = !1, w && w(t), u = d.render(d.props, d.state, d.context), d.state = d.__s; + while (d.__d && ++y < 25); + d.state = d.__s, d.getChildContext != null && (r = ai(ai({}, r), d.getChildContext())), C && !h && d.getSnapshotBeforeUpdate != null && (m = d.getSnapshotBeforeUpdate(g, p)), x = u != null && u.type === nt && u.key == null ? _$(u.props.children) : u, a = R$(e, fv(x) ? x : [x], t, n, r, o, s, i, a, c, l), d.base = t.__e, t.__u &= -161, d.__h.length && i.push(d), v && (d.__E = d.__ = null); } catch (E) { - if (i.length = d, t.__v = null, c || s != null) { + if (i.length = f, t.__v = null, c || s != null) { if (E.then) { for (t.__u |= c ? 160 : 128; a && a.nodeType == 8 && a.nextSibling; ) a = a.nextSibling; s != null && (s[s.indexOf(a)] = null), t.__e = a; } else if (s != null) for (A = s.length; A--; ) O6(s[A]); } else t.__e = n.__e; - t.__k == null && (t.__k = n.__k || []), E.then || M$(t), We.__e(E, t, n); + t.__k == null && (t.__k = n.__k || []), E.then || M$(t), He.__e(E, t, n); } } else s == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : a = t.__e = rre(n.__e, t, n, r, o, s, i, c, l); - return (u = We.diffed) && u(t), 128 & t.__u ? void 0 : a; + return (u = He.diffed) && u(t), 128 & t.__u ? void 0 : a; } function M$(e) { e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(M$)); } function B$(e, t, n) { for (var r = 0; r < n.length; r++) R6(n[r], n[++r], n[++r]); - We.__c && We.__c(t, e), e.some(function(o) { + He.__c && He.__c(t, e), e.some(function(o) { try { e = o.__h, o.__h = [], e.some(function(s) { s.call(o); }); } catch (s) { - We.__e(s, o.__v); + He.__e(s, o.__v); } }); } @@ -11888,7 +11888,7 @@ function _$(e) { return typeof e != "object" || e == null || e.__b > 0 ? e : fv(e) ? e.map(_$) : e.constructor !== void 0 ? null : ai({}, e); } function rre(e, t, n, r, o, s, i, a, c) { - var l, u, d, f, h, g, p, m = n.props || pS, v = t.props, S = t.type; + var l, u, f, d, h, g, p, m = n.props || pS, v = t.props, S = t.type; if (S == "svg" ? o = "http://www.w3.org/2000/svg" : S == "math" ? o = "http://www.w3.org/1998/Math/MathML" : o || (o = "http://www.w3.org/1999/xhtml"), s != null) { for (l = 0; l < s.length; l++) if ((h = s[l]) && "setAttribute" in h == !!S && (S ? h.localName == S : h.nodeType == 3)) { e = h, s[l] = null; @@ -11897,15 +11897,15 @@ function rre(e, t, n, r, o, s, i, a, c) { } if (e == null) { if (S == null) return document.createTextNode(v); - e = document.createElementNS(o, S, v.is && v), a && (We.__m && We.__m(t, s), a = !1), s = null; + e = document.createElementNS(o, S, v.is && v), a && (He.__m && He.__m(t, s), a = !1), s = null; } if (S == null) m === v || a && e.data == v || (e.data = v); else { if (s = S == "textarea" && v.defaultValue != null ? null : s && dv.call(e.childNodes), !a && s != null) for (m = {}, l = 0; l < e.attributes.length; l++) m[(h = e.attributes[l]).name] = h.value; - for (l in m) h = m[l], l == "dangerouslySetInnerHTML" ? d = h : l == "children" || l in v || l == "value" && "defaultValue" in v || l == "checked" && "defaultChecked" in v || h1(e, l, null, h, o); - for (l in v) h = v[l], l == "children" ? f = h : l == "dangerouslySetInnerHTML" ? u = h : l == "value" ? g = h : l == "checked" ? p = h : a && typeof h != "function" || m[l] === h || h1(e, l, h, m[l], o); - if (u) a || d && (u.__html == d.__html || u.__html == e.innerHTML) || (e.innerHTML = u.__html), t.__k = []; - else if (d && (e.innerHTML = ""), R$(t.type == "template" ? e.content : e, fv(f) ? f : [f], t, n, r, S == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, s, i, s ? s[0] : n.__k && cm(n, 0), a, c), s != null) for (l = s.length; l--; ) O6(s[l]); + for (l in m) h = m[l], l == "dangerouslySetInnerHTML" ? f = h : l == "children" || l in v || l == "value" && "defaultValue" in v || l == "checked" && "defaultChecked" in v || h1(e, l, null, h, o); + for (l in v) h = v[l], l == "children" ? d = h : l == "dangerouslySetInnerHTML" ? u = h : l == "value" ? g = h : l == "checked" ? p = h : a && typeof h != "function" || m[l] === h || h1(e, l, h, m[l], o); + if (u) a || f && (u.__html == f.__html || u.__html == e.innerHTML) || (e.innerHTML = u.__html), t.__k = []; + else if (f && (e.innerHTML = ""), R$(t.type == "template" ? e.content : e, fv(d) ? d : [d], t, n, r, S == "foreignObject" ? "http://www.w3.org/1999/xhtml" : o, s, i, s ? s[0] : n.__k && lm(n, 0), a, c), s != null) for (l = s.length; l--; ) O6(s[l]); a && S != "textarea" || (l = "value", S == "progress" && g == null ? e.removeAttribute("value") : g != null && (g !== e[l] || S == "progress" && !g || S == "option" && g != m[l]) && h1(e, l, g, m[l], o), l = "checked", p != null && p != e[l] && h1(e, l, p, m[l], o)); } return e; @@ -11917,16 +11917,16 @@ function R6(e, t, n) { r && e.__u(), r && t == null || (e.__u = e(t)); } else e.current = t; } catch (o) { - We.__e(o, n); + He.__e(o, n); } } function L$(e, t, n) { var r, o; - if (We.unmount && We.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || R6(r, null, t)), (r = e.__c) != null) { + if (He.unmount && He.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || R6(r, null, t)), (r = e.__c) != null) { if (r.componentWillUnmount) try { r.componentWillUnmount(); } catch (s) { - We.__e(s, t); + He.__e(s, t); } r.base = r.__P = r.__n = null; } @@ -11936,12 +11936,12 @@ function L$(e, t, n) { function ore(e, t, n) { return this.constructor(e, n); } -function Nf(e, t, n) { +function Pf(e, t, n) { var r, o, s, i; - t == document && (t = document.documentElement), We.__ && We.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, s = [], i = [], P6(t, e = (!r && n || t).__k = mo(nt, null, [e]), o || pS, pS, t.namespaceURI, !r && n ? [n] : o ? null : t.firstChild ? dv.call(t.childNodes) : null, s, !r && n ? n : o ? o.__e : t.firstChild, r, i), B$(s, e, i), e.props.children = null; + t == document && (t = document.documentElement), He.__ && He.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, s = [], i = [], P6(t, e = (!r && n || t).__k = yo(nt, null, [e]), o || pS, pS, t.namespaceURI, !r && n ? [n] : o ? null : t.firstChild ? dv.call(t.childNodes) : null, s, !r && n ? n : o ? o.__e : t.firstChild, r, i), B$(s, e, i), e.props.children = null; } function D$(e, t) { - Nf(e, t, D$); + Pf(e, t, D$); } function sre(e, t, n) { var r, o, s, i, a = ai({}, e.props); @@ -11971,7 +11971,7 @@ function Fn(e) { return n.children(r); }).contextType = t, t; } -dv = gS.slice, We = { __e: function(e, t, n, r) { +dv = gS.slice, He = { __e: function(e, t, n, r) { for (var o, s, i; t = t.__; ) if ((o = t.__c) && !o.__) try { if ((s = o.constructor) && s.getDerivedStateFromError != null && (o.setState(s.getDerivedStateFromError(e)), i = o.__d), o.componentDidCatch != null && (o.componentDidCatch(e, r || {}), i = o.__d), i) return o.__E = o; } catch (a) { @@ -11983,66 +11983,66 @@ dv = gS.slice, We = { __e: function(e, t, n, r) { n = this.__s != null && this.__s != this.state ? this.__s : this.__s = ai({}, this.state), typeof e == "function" && (e = e(ai({}, n), this.props)), e && ai(n, e), e != null && this.__v && (t && this._sb.push(t), cN(this)); }, Rr.prototype.forceUpdate = function(e) { this.__v && (this.__e = !0, e && this.__h.push(e), cN(this)); -}, Rr.prototype.render = nt, rl = [], C$ = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, I$ = function(e, t) { +}, Rr.prototype.render = nt, ol = [], C$ = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, I$ = function(e, t) { return e.__v.__b - t.__v.__b; }, mS.__r = 0, JE = Math.random().toString(8), Uk = "__d" + JE, Jw = "__a" + JE, N$ = /(PointerCapture)$|Capture$/i, N6 = 0, iN = TM(!1), aN = TM(!0), O$ = 0; -var zl, Jt, YE, MM, lm = 0, j$ = [], un = We, BM = un.__b, _M = un.__r, LM = un.diffed, DM = un.__c, jM = un.unmount, FM = un.__; -function _m(e, t) { - un.__h && un.__h(Jt, e, lm || t), lm = 0; - var n = Jt.__H || (Jt.__H = { __: [], __h: [] }); +var Wl, Qt, YE, MM, um = 0, j$ = [], dn = He, BM = dn.__b, _M = dn.__r, LM = dn.diffed, DM = dn.__c, jM = dn.unmount, FM = dn.__; +function Lm(e, t) { + dn.__h && dn.__h(Qt, e, um || t), um = 0; + var n = Qt.__H || (Qt.__H = { __: [], __h: [] }); return e >= n.__.length && n.__.push({}), n.__[e]; } -function De(e) { - return lm = 1, Wl(V$, e); +function je(e) { + return um = 1, ql(V$, e); } -function Wl(e, t, n) { - var r = _m(zl++, 2); +function ql(e, t, n) { + var r = Lm(Wl++, 2); if (r.t = e, !r.__c && (r.__ = [n ? n(t) : V$(void 0, t), function(a) { var c = r.__N ? r.__N[0] : r.__[0], l = r.t(c, a); c !== l && (r.__N = [l, r.__[1]], r.__c.setState({})); - }], r.__c = Jt, !Jt.__f)) { + }], r.__c = Qt, !Qt.__f)) { var o = function(a, c, l) { if (!r.__c.__H) return !0; - var u = !1, d = r.__c.props !== a; + var u = !1, f = r.__c.props !== a; if (r.__c.__H.__.some(function(h) { if (h.__N) { u = !0; var g = h.__[0]; - h.__ = h.__N, h.__N = void 0, g !== h.__[0] && (d = !0); + h.__ = h.__N, h.__N = void 0, g !== h.__[0] && (f = !0); } }), s) { - var f = s.call(this, a, c, l); - return u ? f || d : f; + var d = s.call(this, a, c, l); + return u ? d || f : d; } - return !u || d; + return !u || f; }; - Jt.__f = !0; - var s = Jt.shouldComponentUpdate, i = Jt.componentWillUpdate; - Jt.componentWillUpdate = function(a, c, l) { + Qt.__f = !0; + var s = Qt.shouldComponentUpdate, i = Qt.componentWillUpdate; + Qt.componentWillUpdate = function(a, c, l) { if (this.__e) { var u = s; s = void 0, o(a, c, l), s = u; } i && i.call(this, a, c, l); - }, Jt.shouldComponentUpdate = o; + }, Qt.shouldComponentUpdate = o; } return r.__N || r.__; } function Ke(e, t) { - var n = _m(zl++, 3); - !un.__s && M6(n.__H, t) && (n.__ = e, n.u = t, Jt.__H.__h.push(n)); + var n = Lm(Wl++, 3); + !dn.__s && M6(n.__H, t) && (n.__ = e, n.u = t, Qt.__H.__h.push(n)); } function Ze(e, t) { - var n = _m(zl++, 4); - !un.__s && M6(n.__H, t) && (n.__ = e, n.u = t, Jt.__h.push(n)); + var n = Lm(Wl++, 4); + !dn.__s && M6(n.__H, t) && (n.__ = e, n.u = t, Qt.__h.push(n)); } function Re(e) { - return lm = 5, ft(function() { + return um = 5, ft(function() { return { current: e }; }, []); } function T6(e, t, n) { - lm = 6, Ze(function() { + um = 6, Ze(function() { if (typeof e == "function") { var r = e(t()); return function() { @@ -12055,25 +12055,25 @@ function T6(e, t, n) { }, n == null ? n : n.concat(e)); } function ft(e, t) { - var n = _m(zl++, 7); + var n = Lm(Wl++, 7); return M6(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__; } function fi(e, t) { - return lm = 8, ft(function() { + return um = 8, ft(function() { return e; }, t); } -function Et(e) { - var t = Jt.context[e.__c], n = _m(zl++, 9); - return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(Jt)), t.props.value) : e.__; +function Ct(e) { + var t = Qt.context[e.__c], n = Lm(Wl++, 9); + return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(Qt)), t.props.value) : e.__; } function F$(e, t) { - un.useDebugValue && un.useDebugValue(t ? t(e) : e); + dn.useDebugValue && dn.useDebugValue(t ? t(e) : e); } function xi() { - var e = _m(zl++, 11); + var e = Lm(Wl++, 11); if (!e.__) { - for (var t = Jt.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__; + for (var t = Qt.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__; var n = t.__m || (t.__m = [0, 0]); e.__ = "P" + n[0] + "-" + n[1]++; } @@ -12085,27 +12085,27 @@ function ire() { if (e.__P && t) try { t.__h.some(Kk), t.__h.some(lN), t.__h = []; } catch (n) { - t.__h = [], un.__e(n, e.__v); + t.__h = [], dn.__e(n, e.__v); } } } -un.__b = function(e) { - Jt = null, BM && BM(e); -}, un.__ = function(e, t) { +dn.__b = function(e) { + Qt = null, BM && BM(e); +}, dn.__ = function(e, t) { e && t.__k && t.__k.__m && (e.__m = t.__k.__m), FM && FM(e, t); -}, un.__r = function(e) { - _M && _M(e), zl = 0; - var t = (Jt = e.__c).__H; - t && (YE === Jt ? (t.__h = [], Jt.__h = [], t.__.some(function(n) { +}, dn.__r = function(e) { + _M && _M(e), Wl = 0; + var t = (Qt = e.__c).__H; + t && (YE === Qt ? (t.__h = [], Qt.__h = [], t.__.some(function(n) { n.__N && (n.__ = n.__N), n.u = n.__N = void 0; - })) : (t.__h.some(Kk), t.__h.some(lN), t.__h = [], zl = 0)), YE = Jt; -}, un.diffed = function(e) { + })) : (t.__h.some(Kk), t.__h.some(lN), t.__h = [], Wl = 0)), YE = Qt; +}, dn.diffed = function(e) { LM && LM(e); var t = e.__c; - t && t.__H && (t.__H.__h.length && (j$.push(t) !== 1 && MM === un.requestAnimationFrame || ((MM = un.requestAnimationFrame) || are)(ire)), t.__H.__.some(function(n) { + t && t.__H && (t.__H.__h.length && (j$.push(t) !== 1 && MM === dn.requestAnimationFrame || ((MM = dn.requestAnimationFrame) || are)(ire)), t.__H.__.some(function(n) { n.u && (n.__H = n.u, n.u = void 0); - })), YE = Jt = null; -}, un.__c = function(e, t) { + })), YE = Qt = null; +}, dn.__c = function(e, t) { t.some(function(n) { try { n.__h.some(Kk), n.__h = n.__h.filter(function(r) { @@ -12114,10 +12114,10 @@ un.__b = function(e) { } catch (r) { t.some(function(o) { o.__h && (o.__h = []); - }), t = [], un.__e(r, n.__v); + }), t = [], dn.__e(r, n.__v); } }), DM && DM(e, t); -}, un.unmount = function(e) { +}, dn.unmount = function(e) { jM && jM(e); var t, n = e.__c; n && n.__H && (n.__H.__.some(function(r) { @@ -12126,7 +12126,7 @@ un.__b = function(e) { } catch (o) { t = o; } - }), n.__H = void 0, t && un.__e(t, n.__v)); + }), n.__H = void 0, t && dn.__e(t, n.__v)); }; var VM = typeof requestAnimationFrame == "function"; function are(e) { @@ -12136,12 +12136,12 @@ function are(e) { VM && (t = requestAnimationFrame(n)); } function Kk(e) { - var t = Jt, n = e.__c; - typeof n == "function" && (e.__c = void 0, n()), Jt = t; + var t = Qt, n = e.__c; + typeof n == "function" && (e.__c = void 0, n()), Qt = t; } function lN(e) { - var t = Jt; - e.__c = e.__(), Jt = t; + var t = Qt; + e.__c = e.__(), Qt = t; } function M6(e, t) { return !e || e.length !== t.length || t.some(function(n, r) { @@ -12161,7 +12161,7 @@ function uN(e, t) { return !1; } function wi(e, t) { - var n = t(), r = De({ t: { __: n, u: t } }), o = r[0].t, s = r[1]; + var n = t(), r = je({ t: { __: n, u: t } }), o = r[0].t, s = r[1]; return Ze(function() { o.__ = n, o.u = t, QE(o) && s({ t: o }); }, [e, n, t]), Ke(function() { @@ -12197,15 +12197,15 @@ function Ei(e, t) { return s != o.ref && s && (typeof s == "function" ? s(null) : s.current = null), t ? !t(this.props, o) || s != o.ref : uN(this.props, o); } function r(o) { - return this.shouldComponentUpdate = n, mo(e, o); + return this.shouldComponentUpdate = n, yo(e, o); } return r.displayName = "Memo(" + (e.displayName || e.name) + ")", r.__f = r.prototype.isReactComponent = !0, r.type = e, r; } (dN.prototype = new Rr()).isPureReactComponent = !0, dN.prototype.shouldComponentUpdate = function(e, t) { return uN(this.props, e) || uN(this.state, t); }; -var $M = We.__b; -We.__b = function(e) { +var $M = He.__b; +He.__b = function(e) { e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), $M && $M(e); }; var cre = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911; @@ -12217,21 +12217,21 @@ function z$(e) { return t.$$typeof = cre, t.render = e, t.prototype.isReactComponent = t.__f = !0, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t; } var UM = function(e, t) { - return e == null ? null : $o($o(e).map(t)); + return e == null ? null : Uo(Uo(e).map(t)); }, lre = { map: UM, forEach: UM, count: function(e) { - return e ? $o(e).length : 0; + return e ? Uo(e).length : 0; }, only: function(e) { - var t = $o(e); + var t = Uo(e); if (t.length !== 1) throw "Children.only"; return t[0]; -}, toArray: $o }, ure = We.__e; -We.__e = function(e, t, n, r) { +}, toArray: Uo }, ure = He.__e; +He.__e = function(e, t, n, r) { if (e.then) { for (var o, s = t; s = s.__; ) if ((o = s.__c) && o.__c) return t.__e == null && (t.__e = n.__e, t.__k = n.__k || []), o.__c(e, t); } ure(e, t, n, r); }; -var KM = We.unmount; +var KM = He.unmount; function W$(e, t, n) { return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) { typeof r.__c == "function" && r.__c(); @@ -12260,14 +12260,14 @@ function J$(e) { n = a, r = !0; }), n) throw n; if (!r) throw t; - return o ? mo(o, i) : null; + return o ? yo(o, i) : null; } return s.displayName = "Lazy", s.__f = !0, s; } function jy() { this.i = null, this.l = null; } -We.unmount = function(e) { +He.unmount = function(e) { var t = e.__c; t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), KM && KM(e); }, (Qw.prototype = new Rr()).__c = function(e, t) { @@ -12300,8 +12300,8 @@ We.unmount = function(e) { } this.__b = null; } - var o = t.__a && mo(nt, null, e.fallback); - return o && (o.__u &= -33), [mo(nt, null, t.__a ? null : e.children), o]; + var o = t.__a && yo(nt, null, e.fallback); + return o && (o.__u &= -33), [yo(nt, null, t.__a ? null : e.children), o]; }; var HM = function(e, t, n) { if (++n[1] === n[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (n = e.i; n; ) { @@ -12318,7 +12318,7 @@ function dre(e) { function fre(e) { var t = this, n = e.h; if (t.componentWillUnmount = function() { - Nf(null, t.v), t.v = null, t.h = null; + Pf(null, t.v), t.v = null, t.h = null; }, t.h && t.h !== n && t.componentWillUnmount(), !t.v) { for (var r = t.__v; r !== null && !r.__m && r.__ !== null; ) r = r.__; t.h = n, t.v = { nodeType: 1, parentNode: n, childNodes: [], __k: { __m: r.__m }, contains: function() { @@ -12329,10 +12329,10 @@ function fre(e) { this.childNodes.splice(this.childNodes.indexOf(o) >>> 1, 1), t.h.removeChild(o); } }; } - Nf(mo(dre, { context: t.context }, e.__v), t.v); + Pf(yo(dre, { context: t.context }, e.__v), t.v); } function _6(e, t) { - var n = mo(fre, { __v: e, h: t }); + var n = yo(fre, { __v: e, h: t }); return n.containerInfo = t, n; } (jy.prototype = new Rr()).__a = function(e) { @@ -12345,7 +12345,7 @@ function _6(e, t) { }; }, jy.prototype.render = function(e) { this.i = null, this.l = /* @__PURE__ */ new Map(); - var t = $o(e.children); + var t = Uo(e.children); e.revealOrder && e.revealOrder[0] === "b" && t.reverse(); for (var n = t.length; n--; ) this.l.set(t[n], this.i = [1, 0, this.i]); return e.children; @@ -12359,7 +12359,7 @@ var Y$ = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 601 return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e); }; function bre(e, t, n) { - return t.__k == null && (t.textContent = ""), Nf(e, t), typeof n == "function" && n(), e ? e.__c : null; + return t.__k == null && (t.textContent = ""), Pf(e, t), typeof n == "function" && n(), e ? e.__c : null; } function wre(e, t, n) { return D$(e, t), typeof n == "function" && n(), e ? e.__c : null; @@ -12371,8 +12371,8 @@ Rr.prototype.isReactComponent = !0, ["componentWillMount", "componentWillReceive Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t }); } }); }); -var zM = We.event; -We.event = function(e) { +var zM = He.event; +He.event = function(e) { return zM && (e = zM(e)), e.persist = function() { }, e.isPropagationStopped = function() { return this.cancelBubble; @@ -12382,8 +12382,8 @@ We.event = function(e) { }; var L6, vre = { configurable: !0, get: function() { return this.class; -} }, WM = We.vnode; -We.vnode = function(e) { +} }, WM = He.vnode; +He.vnode = function(e) { typeof e.type == "string" && (function(t) { var n = t.props, r = t.type, o = {}, s = r.indexOf("-") == -1; for (var i in n) { @@ -12393,28 +12393,28 @@ We.vnode = function(e) { i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && a === !0 ? a = "" : c === "translate" && a === "no" ? a = !1 : c[0] === "o" && c[1] === "n" ? c === "ondoubleclick" ? i = "ondblclick" : c !== "onchange" || r !== "input" && r !== "textarea" || yre(n.type) ? c === "onfocus" ? i = "onfocusin" : c === "onblur" ? i = "onfocusout" : pre.test(i) && (i = c) : c = i = "oninput" : s && hre.test(i) ? i = i.replace(gre, "-$&").toLowerCase() : a === null && (a = void 0), c === "oninput" && o[i = c] && (i = "oninputCapture"), o[i] = a; } } - r == "select" && (o.multiple && Array.isArray(o.value) && (o.value = $o(n.children).forEach(function(l) { + r == "select" && (o.multiple && Array.isArray(o.value) && (o.value = Uo(n.children).forEach(function(l) { l.props.selected = o.value.indexOf(l.props.value) != -1; - })), o.defaultValue != null && (o.value = $o(n.children).forEach(function(l) { + })), o.defaultValue != null && (o.value = Uo(n.children).forEach(function(l) { l.props.selected = o.multiple ? o.defaultValue.indexOf(l.props.value) != -1 : o.defaultValue == l.props.value; }))), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", vre)) : n.className && (o.class = o.className = n.className), t.props = o; })(e), e.$$typeof = Y$, WM && WM(e); }; -var qM = We.__r; -We.__r = function(e) { +var qM = He.__r; +He.__r = function(e) { qM && qM(e), L6 = e.__c; }; -var GM = We.diffed; -We.diffed = function(e) { +var GM = He.diffed; +He.diffed = function(e) { GM && GM(e); var t = e.props, n = e.__e; n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), L6 = null; }; var kre = { ReactCurrentDispatcher: { current: { readContext: function(e) { return L6.__n[e.__c].props.value; -}, useCallback: fi, useContext: Et, useDebugValue: F$, useDeferredValue: K$, useEffect: Ke, useId: xi, useImperativeHandle: T6, useInsertionEffect: B6, useLayoutEffect: Ze, useMemo: ft, useReducer: Wl, useRef: Re, useState: De, useSyncExternalStore: wi, useTransition: H$ } } }, Are = "18.3.1"; +}, useCallback: fi, useContext: Ct, useDebugValue: F$, useDeferredValue: K$, useEffect: Ke, useId: xi, useImperativeHandle: T6, useInsertionEffect: B6, useLayoutEffect: Ze, useMemo: ft, useReducer: ql, useRef: Re, useState: je, useSyncExternalStore: wi, useTransition: H$ } } }, Are = "18.3.1"; function Sre(e) { - return mo.bind(null, e); + return yo.bind(null, e); } function Gx(e) { return !!e && e.$$typeof === Y$; @@ -12429,7 +12429,7 @@ function Cre(e) { return Gx(e) ? sre.apply(null, arguments) : e; } function Ire(e) { - return !!e.__k && (Nf(null, e), !0); + return !!e.__k && (Pf(null, e), !0); } function Nre(e) { return e && (e.base || e.nodeType === 1 && e) || null; @@ -12437,13 +12437,13 @@ function Nre(e) { var Ore = function(e, t) { return e(t); }, Pre = function(e, t) { - var n = We.debounceRendering; - We.debounceRendering = function(o) { + var n = He.debounceRendering; + He.debounceRendering = function(o) { return o(); }; var r = e(t); - return We.debounceRendering = n, r; -}, Rre = Gx, Tre = { useState: De, useId: xi, useReducer: Wl, useEffect: Ke, useLayoutEffect: Ze, useInsertionEffect: B6, useTransition: H$, useDeferredValue: K$, useSyncExternalStore: wi, startTransition: U$, useRef: Re, useImperativeHandle: T6, useMemo: ft, useCallback: fi, useContext: Et, useDebugValue: F$, version: "18.3.1", Children: lre, render: bre, hydrate: wre, unmountComponentAtNode: Ire, createPortal: _6, createElement: mo, createContext: Fn, createFactory: Sre, cloneElement: Cre, createRef: Zne, Fragment: nt, isValidElement: Gx, isElement: Rre, isFragment: xre, isMemo: Ere, findDOMNode: Nre, Component: Rr, PureComponent: dN, memo: Ei, forwardRef: z$, flushSync: Pre, unstable_batchedUpdates: Ore, StrictMode: nt, Suspense: Qw, SuspenseList: jy, lazy: J$, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: kre }; + return He.debounceRendering = n, r; +}, Rre = Gx, Tre = { useState: je, useId: xi, useReducer: ql, useEffect: Ke, useLayoutEffect: Ze, useInsertionEffect: B6, useTransition: H$, useDeferredValue: K$, useSyncExternalStore: wi, startTransition: U$, useRef: Re, useImperativeHandle: T6, useMemo: ft, useCallback: fi, useContext: Ct, useDebugValue: F$, version: "18.3.1", Children: lre, render: bre, hydrate: wre, unmountComponentAtNode: Ire, createPortal: _6, createElement: yo, createContext: Fn, createFactory: Sre, cloneElement: Cre, createRef: Zne, Fragment: nt, isValidElement: Gx, isElement: Rre, isFragment: xre, isMemo: Ere, findDOMNode: Nre, Component: Rr, PureComponent: dN, memo: Ei, forwardRef: z$, flushSync: Pre, unstable_batchedUpdates: Ore, StrictMode: nt, Suspense: Qw, SuspenseList: jy, lazy: J$, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: kre }; function Mre(e, t) { for (var n in t) e[n] = t[n]; return e; @@ -12459,18 +12459,18 @@ function YM(e, t) { (YM.prototype = new Rr()).isPureReactComponent = !0, YM.prototype.shouldComponentUpdate = function(e, t) { return JM(this.props, e) || JM(this.state, t); }; -var QM = We.__b; -We.__b = function(e) { +var QM = He.__b; +He.__b = function(e) { e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), QM && QM(e); }; -var Bre = We.__e; -We.__e = function(e, t, n, r) { +var Bre = He.__e; +He.__e = function(e, t, n, r) { if (e.then) { for (var o, s = t; s = s.__; ) if ((o = s.__c) && o.__c) return t.__e == null && (t.__e = n.__e, t.__k = n.__k || []), o.__c(e, t); } Bre(e, t, n, r); }; -var XM = We.unmount; +var XM = He.unmount; function Q$(e, t, n) { return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r) { typeof r.__c == "function" && r.__c(); @@ -12493,7 +12493,7 @@ function Z$(e) { function p1() { this.i = null, this.l = null; } -We.unmount = function(e) { +He.unmount = function(e) { var t = e.__c; t && (t.__z = !0), t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), XM && XM(e); }, (XE.prototype = new Rr()).__c = function(e, t) { @@ -12526,8 +12526,8 @@ We.unmount = function(e) { } this.__b = null; } - var o = t.__a && mo(nt, null, e.fallback); - return o && (o.__u &= -33), [mo(nt, null, t.__a ? null : e.children), o]; + var o = t.__a && yo(nt, null, e.fallback); + return o && (o.__u &= -33), [yo(nt, null, t.__a ? null : e.children), o]; }; var ZM = function(e, t, n) { if (++n[1] === n[0] && e.l.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (n = e.i; n; ) { @@ -12546,7 +12546,7 @@ var ZM = function(e, t, n) { }; }, p1.prototype.render = function(e) { this.i = null, this.l = /* @__PURE__ */ new Map(); - var t = $o(e.children); + var t = Uo(e.children); e.revealOrder && e.revealOrder[0] === "b" && t.reverse(); for (var n = t.length; n--; ) this.l.set(t[n], this.i = [1, 0, this.i]); return e.children; @@ -12560,7 +12560,7 @@ var _re = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60 return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e); }; function $re(e, t, n) { - return t.__k == null && (t.textContent = ""), Nf(e, t), typeof n == "function" && n(), e ? e.__c : null; + return t.__k == null && (t.textContent = ""), Pf(e, t), typeof n == "function" && n(), e ? e.__c : null; } Rr.prototype.isReactComponent = !0, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) { Object.defineProperty(Rr.prototype, e, { configurable: !0, get: function() { @@ -12569,8 +12569,8 @@ Rr.prototype.isReactComponent = !0, ["componentWillMount", "componentWillReceive Object.defineProperty(this, e, { configurable: !0, writable: !0, value: t }); } }); }); -var eB = We.event; -We.event = function(e) { +var eB = He.event; +He.event = function(e) { return eB && (e = eB(e)), e.persist = function() { }, e.isPropagationStopped = function() { return this.cancelBubble; @@ -12580,8 +12580,8 @@ We.event = function(e) { }; var Ure = { configurable: !0, get: function() { return this.class; -} }, tB = We.vnode; -We.vnode = function(e) { +} }, tB = He.vnode; +He.vnode = function(e) { typeof e.type == "string" && (function(t) { var n = t.props, r = t.type, o = {}, s = r.indexOf("-") == -1; for (var i in n) { @@ -12591,25 +12591,25 @@ We.vnode = function(e) { i === "defaultValue" && "value" in n && n.value == null ? i = "value" : i === "download" && a === !0 ? a = "" : c === "translate" && a === "no" ? a = !1 : c[0] === "o" && c[1] === "n" ? c === "ondoubleclick" ? i = "ondblclick" : c !== "onchange" || r !== "input" && r !== "textarea" || Vre(n.type) ? c === "onfocus" ? i = "onfocusin" : c === "onblur" ? i = "onfocusout" : Dre.test(i) && (i = c) : c = i = "oninput" : s && Lre.test(i) ? i = i.replace(jre, "-$&").toLowerCase() : a === null && (a = void 0), c === "oninput" && o[i = c] && (i = "oninputCapture"), o[i] = a; } } - r == "select" && (o.multiple && Array.isArray(o.value) && (o.value = $o(n.children).forEach(function(l) { + r == "select" && (o.multiple && Array.isArray(o.value) && (o.value = Uo(n.children).forEach(function(l) { l.props.selected = o.value.indexOf(l.props.value) != -1; - })), o.defaultValue != null && (o.value = $o(n.children).forEach(function(l) { + })), o.defaultValue != null && (o.value = Uo(n.children).forEach(function(l) { l.props.selected = o.multiple ? o.defaultValue.indexOf(l.props.value) != -1 : o.defaultValue == l.props.value; }))), n.class && !n.className ? (o.class = n.class, Object.defineProperty(o, "className", Ure)) : n.className && (o.class = o.className = n.className), t.props = o; })(e), e.$$typeof = _re, tB && tB(e); }; -var nB = We.__r; -We.__r = function(e) { +var nB = He.__r; +He.__r = function(e) { nB && nB(e), e.__c; }; -var rB = We.diffed; -We.diffed = function(e) { +var rB = He.diffed; +He.diffed = function(e) { rB && rB(e); var t = e.props, n = e.__e; n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value); }; function Kre(e) { - return !!e.__k && (Nf(null, e), !0); + return !!e.__k && (Pf(null, e), !0); } function Hre(e) { return { @@ -12630,9 +12630,9 @@ function P(e, t, n, r, o, s) { if ("ref" in c) for (a in c = {}, t) a == "ref" ? i = t[a] : c[a] = t[a]; var l = { type: e, props: c, key: n, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --zre, __i: -1, __u: 0, __source: o, __self: s }; if (typeof e == "function" && (i = e.defaultProps)) for (a in i) c[a] === void 0 && (c[a] = i[a]); - return We.vnode && We.vnode(l), l; + return He.vnode && He.vnode(l), l; } -const It = { name: "documents" }, oB = (e) => "origin" in e ? e.origin.transaction : void 0; +const Pt = { name: "documents" }, oB = (e) => "origin" in e ? e.origin.transaction : void 0; function Wre(e) { let t = null; const n = () => { @@ -12651,12 +12651,12 @@ function Wre(e) { close: n }; } -class kc extends Error { +class Ac extends Error { constructor(t) { super(`[kernel] cancelled: ${t}`), this.name = "CancelledError"; } } -const Rh = (e) => e instanceof kc; +const Mh = (e) => e instanceof Ac; function sB(e) { const t = []; let n = null; @@ -12679,7 +12679,7 @@ function sB(e) { } }; } -class re extends Error { +class te extends Error { constructor(t, n, r, o = {}) { super(r), this.name = "PluginError", o.cause !== void 0 && (this.cause = o.cause), this.code = t, this.capability = n, this.permission = o.permission ?? null, this.details = o.details; } @@ -12692,8 +12692,8 @@ function Br(e) { permission: e.permission }; } -function pr(e, t) { - return e instanceof re ? t === void 0 || e.code === t : !1; +function Xn(e, t) { + return e instanceof te ? t === void 0 || e.code === t : !1; } const qre = { InvalidArg: "invalid-input", @@ -12728,24 +12728,24 @@ function Gre(e) { const t = e.details?.required; return typeof t == "string" ? t : null; } -function qe(e, t) { - if (t instanceof re) return t; - if (Rh(t) || t instanceof Error && t.name === "AbortError") - return new re("operation-cancelled", e, "operation cancelled", { +function ze(e, t) { + if (t instanceof te) return t; + if (Mh(t) || t instanceof Error && t.name === "AbortError") + return new te("operation-cancelled", e, "operation cancelled", { cause: t }); if (J.is(t)) { const r = qre[String(t.code)] ?? "operation-failed"; - return new re(r, e, t.message, { + return new te(r, e, t.message, { cause: t, details: t.details, permission: r === "permission-denied" ? Gre(t) : null }); } const n = t instanceof Error ? t.message : String(t); - return new re("operation-failed", e, n, { cause: t }); + return new te("operation-failed", e, n, { cause: t }); } -function lo(e) { +function uo(e) { let t = /* @__PURE__ */ new Set(); return { on(n, r) { @@ -12772,15 +12772,15 @@ function lo(e) { const ZE = (e) => e.undoOf !== null ? { undoOf: e.undoOf } : { ops: e.ops ?? [] }; function Jre(e) { let t = [], n = 0, r = 0, o = null, s = !1; - const i = lo(e.report), a = lo(e.report), c = (y) => { + const i = uo(e.report), a = uo(e.report), c = (y) => { const x = e.handle(); - if (!x) throw new re("not-ready", y, "the document has not opened yet"); + if (!x) throw new te("not-ready", y, "the document has not opened yet"); return x; }, l = (y) => { - if (s) throw new re("instance-closed", y, "the document closed"); + if (s) throw new te("instance-closed", y, "the document closed"); }, u = () => { n += 1, e.notify(); - }, d = (y) => { + }, f = (y) => { let x, A; const b = new Promise((E, I) => { x = E, A = I; @@ -12798,19 +12798,19 @@ function Jre(e) { resolve: x, reject: A }; - }, f = (y) => { + }, d = (y) => { t = t.filter((x) => x !== y); }, h = (y, x) => { - y.answered || (y.answered = !0, f(y), u(), y.resolve(x), a.emit({ change: y, status: "applied", result: x })); + y.answered || (y.answered = !0, d(y), u(), y.resolve(x), a.emit({ change: y, status: "applied", result: x })); }, g = (y, x) => { - y.answered || (y.answered = !0, f(y), y.reject(x), a.emit({ change: y, status: "refused", error: x }), p(y), u()); + y.answered || (y.answered = !0, d(y), y.reject(x), a.emit({ change: y, status: "refused", error: x }), p(y), u()); }, p = (y) => { const x = new Set(eee(ZE(y))); if (x.size !== 0) for (const A of t) A.seq < y.seq || A.answered || tee(ZE(A)).some((b) => x.has(b)) && (A.abort?.(), g( A, - new re( + new te( "conflict", A.capability, `a change it depends on (${y.label.key}) was refused`, @@ -12824,15 +12824,15 @@ function Jre(e) { const A = c(y.capability); x = y.verb ? y.verb(A, { opId: y.opId }) : A.apply(ZE(y), { opId: y.opId }); } catch (A) { - g(y, qe(y.capability, A)); + g(y, ze(y.capability, A)); return; } typeof x.abort == "function" && (y.abort = (A) => x.abort(A)), x.then( (A) => h(y, A), - (A) => g(y, qe(y.capability, A)) + (A) => g(y, ze(y.capability, A)) ); }, v = (y, x) => { - y.answered || (y.answered = !0, f(y), y.reject(new re("operation-cancelled", x, "the change was cancelled")), u()); + y.answered || (y.answered = !0, d(y), y.reject(new te("operation-cancelled", x, "the change was cancelled")), u()); }, S = (y = 1 / 0) => { for (const x of t) if (!(!x.held || x.seq >= y)) { @@ -12842,9 +12842,9 @@ function Jre(e) { } i.emit(x), m(x); } - }, C = (y, x) => new re("invalid-input", y, x), k = (y, x) => { + }, C = (y, x) => new te("invalid-input", y, x), k = (y, x) => { const A = y.entry; - return A ? (A.ops = [...A.ops ?? [], ...x.ops], A.shows = A.ops, A.undo = [...x.undo ?? [], ...A.undo], A.history = A.history || x.history !== !1, u(), A) : (y.entry = d({ + return A ? (A.ops = [...A.ops ?? [], ...x.ops], A.shows = A.ops, A.undo = [...x.undo ?? [], ...A.undo], A.history = A.history || x.history !== !1, u(), A) : (y.entry = f({ label: y.label, ops: x.ops, undoOf: null, @@ -12873,7 +12873,7 @@ function Jre(e) { return k(o, x); } S(); - const A = "undoOf" in x ? d({ + const A = "undoOf" in x ? f({ label: x.label, ops: null, undoOf: x.undoOf, @@ -12882,7 +12882,7 @@ function Jre(e) { history: !1, held: !1, capability: y - }) : "send" in x ? d({ + }) : "send" in x ? f({ label: x.label, ops: null, undoOf: null, @@ -12893,7 +12893,7 @@ function Jre(e) { history: x.history !== !1, held: !1, capability: y - }) : d({ + }) : f({ label: x.label, ops: x.ops, undoOf: null, @@ -12917,7 +12917,7 @@ function Jre(e) { return b; }, set(O, T = []) { - I() && (b ? (b.ops = O, b.shows = O, b.undo = T) : (b = d({ + I() && (b ? (b.ops = O, b.shows = O, b.undo = T) : (b = f({ label: x, ops: O, undoOf: null, @@ -12956,7 +12956,7 @@ function Jre(e) { try { await c(y).objectNumbers.reserve(x); } catch (A) { - throw qe(y, A); + throw ze(y, A); } }, listPending: () => t, @@ -12981,7 +12981,7 @@ function Jre(e) { const y = t; t = [], n += 1; for (const x of y) - x.answered = !0, x.reject(new re("instance-closed", x.capability, "the document closed")); + x.answered = !0, x.reject(new te("instance-closed", x.capability, "the document closed")); i.destroy(), a.destroy(); } }; @@ -12990,7 +12990,7 @@ const D6 = Symbol("mirror.reload"); function os(e) { return { [D6]: e?.pages ?? "all" }; } -const eC = (e) => typeof e == "object" && e !== null && D6 in e, eU = (e) => e.type === "stream.desynced" || e.type === "document.versioned", tU = (e) => pr(e, "permission-denied") ? "forbidden" : "error", nU = (e) => "origin" in e ? e.origin.transaction?.id ?? null : null, Yre = (e) => { +const eC = (e) => typeof e == "object" && e !== null && D6 in e, eU = (e) => e.type === "stream.desynced" || e.type === "document.versioned", tU = (e) => Xn(e, "permission-denied") ? "forbidden" : "error", nU = (e) => "origin" in e ? e.origin.transaction?.id ?? null : null, Yre = (e) => { const t = "origin" in e ? e.origin.transaction : void 0; return t && t.index === t.count - 1 ? t.id : null; }; @@ -13030,20 +13030,20 @@ function Qre(e, t) { status: "idle" }); let r = !1, o = null, s = null, i = !1, a = null, c = null, l = null, u = 0; - const d = /* @__PURE__ */ new Map(); - let f = null; + const f = /* @__PURE__ */ new Map(); + let d = null; const h = /* @__PURE__ */ new Map(); let g = 0; - const p = j6(t.changes), m = { has: (j) => p.has(j) || d.has(j) }, v = (j) => { + const p = j6(t.changes), m = { has: (j) => p.has(j) || f.has(j) }, v = (j) => { const H = nU(j); if (!(H === null || !e.predict)) - return t.changes.find(H) ?? d.get(H)?.change ?? h.get(H)?.change; + return t.changes.find(H) ?? f.get(H)?.change ?? h.get(H)?.change; }, S = (j) => { const H = v(j); - !H || d.has(H.opId) || (h.set(H.opId, { change: H, after: u - 1 }), g += 1); + !H || f.has(H.opId) || (h.set(H.opId, { change: H, after: u - 1 }), g += 1); }, C = (j) => { const H = h.size; - for (const [Y, ue] of h) ue.after < j && h.delete(Y); + for (const [Y, le] of h) le.after < j && h.delete(Y); h.size !== H && (g += 1, t.notify()); }, k = (j, H) => yS(j, [H], e.predict, t.report), N = (j, H) => { try { @@ -13057,16 +13057,16 @@ function Qre(e, t) { const y = () => { const j = n.read().value; if (!e.predict) return j; - const H = f ? f.value : j, Y = t.changes.version(); + const H = d ? d.value : j, Y = t.changes.version(); if (w && w.from === H && w.version === Y && w.kept === g) return w.view; - const ue = yS( + const le = yS( H, F6(t.changes, h.values(), m), e.predict, t.report ); - return w = { from: H, version: Y, kept: g, view: ue }, ue; + return w = { from: H, version: Y, kept: g, view: le }, le; }, x = (j) => { try { e.onChanged?.(j); @@ -13082,25 +13082,25 @@ function Qre(e, t) { }, E = (j, H) => { if (s !== "all") { s ?? (s = { pages: /* @__PURE__ */ new Map(), keptFor: [] }); - for (const Y of j) s.pages.set(Gt(Y), Y); + for (const Y of j) s.pages.set(Yt(Y), Y); H !== null && s.keptFor.push(H); } $(); }, I = (j, H) => { const Y = v(H) ?? null; - Y && (d.set(Y.opId, { change: Y, after: u }), h.delete(Y.opId), g += 1); - const ue = j[D6]; - return ue === "all" || !e.loadPages ? b() : E(ue, Y?.opId ?? null), Y; + Y && (f.set(Y.opId, { change: Y, after: u }), h.delete(Y.opId), g += 1); + const le = j[D6]; + return le === "all" || !e.loadPages ? b() : E(le, Y?.opId ?? null), Y; }, O = async (j) => { - const H = [...j.pages.values()], Y = n.read().value, le = [...d.keys()].some((he) => !j.keptFor.includes(he)) ? f : null, pe = []; + const H = [...j.pages.values()], Y = n.read().value, ie = [...f.keys()].some((he) => !j.keptFor.includes(he)) ? d : null, pe = []; l = pe; - let ge, Me; + let ve, _e; try { const he = await e.loadPages(t.doc, H, t.lifetime); if (l = null, !n.live) return; - ge = he(Y), Me = le && { value: he(le.value) }; + ve = he(Y), _e = ie && { value: he(ie.value) }; } catch (he) { - if (l = null, pr(he, "instance-closed") || !n.live) return; + if (l = null, Xn(he, "instance-closed") || !n.live) return; t.report(he), D(); return; } @@ -13108,45 +13108,45 @@ function Qre(e, t) { for (const he of pe) { let Te; try { - Te = e.fold(ge, he); - } catch (ze) { - t.report(ze), D(); + Te = e.fold(ve, he); + } catch (We) { + t.report(We), D(); continue; } if (eC(Te)) { - const ze = I(Te, he); - if (!ze) continue; - Be.add(ze.opId), Me = { value: k(Me ? Me.value : ge, ze) }; + const We = I(Te, he); + if (!We) continue; + Be.add(We.opId), _e = { value: k(_e ? _e.value : ve, We) }; continue; } - ge = Te, Me && (Me = { value: N(Me.value, he) }); + ve = Te, _e && (_e = { value: N(_e.value, he) }); } - for (const he of j.keptFor) Be.has(he) || d.delete(he); - const te = n.read().value; - f = d.size > 0 ? Me : null, g += 1, n.write({ ...n.read(), value: ge }), x({ cause: "load", event: null, pages: H, previous: te, next: ge }), t.notify(); + for (const he of j.keptFor) Be.has(he) || f.delete(he); + const ee = n.read().value; + d = f.size > 0 ? _e : null, g += 1, n.write({ ...n.read(), value: ve }), x({ cause: "load", event: null, pages: H, previous: ee, next: ve }), t.notify(); }, T = (j) => { let H; try { H = e.fold(n.read().value, j); - } catch (le) { - t.report(le), (!e.onDemand || r) && b(); + } catch (ie) { + t.report(ie), (!e.onDemand || r) && b(); return; } if (eC(H)) { if (e.onDemand && !r) return; - const le = I(H, j); - if (!le) return; - f = { value: k(f ? f.value : n.read().value, le) }, g += 1, t.notify(); + const ie = I(H, j); + if (!ie) return; + d = { value: k(d ? d.value : n.read().value, ie) }, g += 1, t.notify(); return; } e.predict && p.add(j) && (g += 1); let Y = !1; - if (f) { - const le = N(f.value, j); - Y = le !== f.value, f = { value: le }, g += 1; + if (d) { + const ie = N(d.value, j); + Y = ie !== d.value, d = { value: ie }, g += 1; } - const ue = A(H, { cause: "event", event: j, pages: null }); - Y && !ue && t.notify(); + const le = A(H, { cause: "event", event: j, pages: null }); + Y && !le && t.notify(); }; t.onDocumentEvent((j) => { if (n.live) { @@ -13161,8 +13161,8 @@ function Qre(e, t) { const H = c ?? []; try { for (let Y = 0; Y < H.length; Y += 1) { - const ue = H[Y]; - j(ue) || T(ue); + const le = H[Y]; + j(le) || T(le); } } finally { c = null; @@ -13178,23 +13178,23 @@ function Qre(e, t) { let H; try { H = await e.load(t.doc, t.lifetime); - } catch (le) { - if (!n.live || pr(le, "instance-closed")) { + } catch (ie) { + if (!n.live || Xn(ie, "instance-closed")) { c = null; return; } - throw n.write({ ...n.read(), status: tU(le) }), R(() => !1), C(j + 1), le; + throw n.write({ ...n.read(), status: tU(ie) }), R(() => !1), C(j + 1), ie; } if (!n.live) { c = null; return; } const Y = n.read().value; - d.clear(), f = null, g += 1, n.write({ value: H.value, status: "ready" }), x({ cause: "load", event: null, pages: "all", previous: Y, next: H.value }); - const ue = H.cursor ?? null; - R((le) => { - const pe = "origin" in le ? le.origin.serverSequence : null; - return ue !== null && pe !== null && pe <= ue; + f.clear(), d = null, g += 1, n.write({ value: H.value, status: "ready" }), x({ cause: "load", event: null, pages: "all", previous: Y, next: H.value }); + const le = H.cursor ?? null; + R((ie) => { + const pe = "origin" in ie ? ie.origin.serverSequence : null; + return le !== null && pe !== null && pe <= le; }), C(j); }, F = async () => { i = !0; @@ -13207,7 +13207,7 @@ function Qre(e, t) { if (i = !1, s === "all" && n.live) return; const H = a; a = null, j ? H?.reject(j.error) : H?.resolve(); - }, B = async () => { + }, _ = async () => { try { for (; s !== null; ) { const j = s; @@ -13222,21 +13222,21 @@ function Qre(e, t) { function $() { if (o) return; let j; - o = new Promise((H) => j = H), B().then(j, j); + o = new Promise((H) => j = H), _().then(j, j); } function D() { r = !0, s = "all"; } - function _() { + function B() { if (!a) { let j; - a = { promise: new Promise((Y, ue) => j = { resolve: Y, reject: ue }), ...j }; + a = { promise: new Promise((Y, le) => j = { resolve: Y, reject: le }), ...j }; } return a.promise; } function L() { D(); - const j = _(); + const j = B(); return $(), j; } return { @@ -13244,7 +13244,7 @@ function Qre(e, t) { get: () => n.read().value, view: y, getStatus: () => n.read().status, - ensureLoaded: () => i || s === "all" ? _() : n.read().status === "ready" ? Promise.resolve() : L(), + ensureLoaded: () => i || s === "all" ? B() : n.read().status === "ready" ? Promise.resolve() : L(), refresh: L, async settled() { for (; o; ) await o; @@ -13260,13 +13260,13 @@ const Wa = (e) => { const t = Object.getPrototypeOf(e); return t === Object.prototype || t === null; }, V6 = (e, t) => Object.prototype.hasOwnProperty.call(e, t); -function Of(e, t) { +function Rf(e, t) { if (Object.is(e, t)) return !0; if (Array.isArray(e) && Array.isArray(t)) - return e.length === t.length && e.every((n, r) => Of(n, t[r])); + return e.length === t.length && e.every((n, r) => Rf(n, t[r])); if (Wa(e) && Wa(t)) { const n = Object.keys(e); - return n.length === Object.keys(t).length && n.every((r) => V6(t, r) && Of(e[r], t[r])); + return n.length === Object.keys(t).length && n.every((r) => V6(t, r) && Rf(e[r], t[r])); } return !1; } @@ -13313,12 +13313,12 @@ function toe(e) { r.add(u); }, refresh: () => { - const u = c(), d = yS(s, u, eoe, n); - if (d === i) return null; - i = d; - const f = noe(a.pages, d.pages), h = Kx(a.labels, d.labels) ? a.labels : d.labels, g = roe(a.pending, ooe(f, s.pages, u)); - if (f === a.pages && h === a.labels && g === a.pending) return null; - a = { pages: f, labels: h, pending: g }; + const u = c(), f = yS(s, u, eoe, n); + if (f === i) return null; + i = f; + const d = noe(a.pages, f.pages), h = Kx(a.labels, f.labels) ? a.labels : f.labels, g = roe(a.pending, ooe(d, s.pages, u)); + if (d === a.pages && h === a.labels && g === a.pending) return null; + a = { pages: d, labels: h, pending: g }; for (const p of [...o]) try { p(); @@ -13329,7 +13329,7 @@ function toe(e) { }, current: () => a, getPending: (u) => a.pending.get(u.objectNumber) ?? null, - has: (u) => a.pages.some((d) => d.ref.objectNumber === u.objectNumber), + has: (u) => a.pages.some((f) => f.ref.objectNumber === u.objectNumber), onChange(u) { return o.add(u), () => void o.delete(u); } @@ -13339,14 +13339,14 @@ function noe(e, t) { const n = new Map(e.map((s) => [s.ref.objectNumber, s])); let r = e.length === t.length; const o = t.map((s, i) => { - const a = n.get(s.ref.objectNumber), c = a !== void 0 && Of(a, s) ? a : s; + const a = n.get(s.ref.objectNumber), c = a !== void 0 && Rf(a, s) ? a : s; return c !== e[i] && (r = !1), c; }); return r ? e : o; } function roe(e, t) { if (e.size !== t.size) return t; - for (const [n, r] of t) if (!Of(e.get(n), r)) return t; + for (const [n, r] of t) if (!Rf(e.get(n), r)) return t; return e; } function ooe(e, t, n) { @@ -13418,10 +13418,10 @@ function coe(e = console.error) { e(m); } }; - let a = 0, c = !1, l = !1, u = 0, d = !1; - const f = () => { + let a = 0, c = !1, l = !1, u = 0, f = !1; + const d = () => { if (u > 0) { - d = !0; + f = !0; return; } if (c) { @@ -13437,11 +13437,11 @@ function coe(e = console.error) { c = !1; } }, h = () => { - a += 1, f(); + a += 1, d(); }; function g(p, m, v = `${p}#${++s}`) { r.get(p)?.revoke(); - const S = { live: !0, state: m }, C = lo(e); + const S = { live: !0, state: m }, C = uo(e); n[p] = m; const k = { key: p, @@ -13476,7 +13476,7 @@ function coe(e = console.error) { u += 1; let p = !1; return () => { - p || (p = !0, u -= 1, !(u > 0 || !d) && (d = !1, f())); + p || (p = !0, u -= 1, !(u > 0 || !f) && (f = !1, d())); }; }, subscribe(p) { @@ -13499,41 +13499,41 @@ function loe() { } const rU = (e) => e !== null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function", uoe = (e) => e !== null && typeof e == "object" && !rU(e) && !(e instanceof ArrayBuffer) && !ArrayBuffer.isView(e) && !(e instanceof Date) && !(e instanceof RegExp) && !(e instanceof Map) && !(e instanceof Set) && !Array.isArray(e); function doe(e, t, n) { - const r = /* @__PURE__ */ new WeakMap(), o = () => new re( + const r = /* @__PURE__ */ new WeakMap(), o = () => new te( "instance-closed", n, `document instance ${t.instanceId} was closed` ), s = (l) => { - const u = l, d = new Promise((f, h) => { + const u = l, f = new Promise((d, h) => { const g = () => { u.abort?.(t.signal.reason), h(o()); }; t.signal.aborted ? g() : t.signal.addEventListener("abort", g, { once: !0 }), Promise.resolve(l).then( (p) => { - t.signal.removeEventListener("abort", g), t.signal.aborted || f(p); + t.signal.removeEventListener("abort", g), t.signal.aborted || d(p); }, (p) => { - t.signal.removeEventListener("abort", g), t.signal.aborted || h(qe(n, p)); + t.signal.removeEventListener("abort", g), t.signal.aborted || h(ze(n, p)); } ); }); - return typeof u.abort == "function" && Object.defineProperty(d, "abort", { - value: (f) => u.abort(f), + return typeof u.abort == "function" && Object.defineProperty(f, "abort", { + value: (d) => u.abort(d), enumerable: !1 - }), d; - }, i = (l, u) => function(...f) { + }), f; + }, i = (l, u) => function(...d) { let h; try { - h = l.apply(u, f); + h = l.apply(u, d); } catch (g) { - throw qe(n, g); + throw ze(n, g); } return rU(h) ? s(h) : a(h, u); }, a = (l, u) => typeof l == "function" ? i(l, u) : uoe(l) ? c(l) : l, c = (l) => { let u = r.get(l); return u || (u = new Proxy(l, { - get(d, f) { - return a(Reflect.get(d, f, d), d); + get(f, d) { + return a(Reflect.get(f, d, f), f); } }), r.set(l, u)), u; }; @@ -13541,7 +13541,7 @@ function doe(e, t, n) { } function foe(e, t, n) { let r = 0, o = null; - const s = () => new re("instance-closed", t, `${n}: instance closed`), i = (a, c) => new re("operation-cancelled", t, `${n}: ${c}`, { + const s = () => new te("instance-closed", t, `${n}: instance closed`), i = (a, c) => new te("operation-cancelled", t, `${n}: ${c}`, { details: { runId: a, reason: c } }); return { @@ -13555,13 +13555,13 @@ function foe(e, t, n) { if (e.aborted) throw s(); if (c?.signal?.aborted) throw i(`${n}#${r + 1}`, "cancelled before start"); - const l = ++r, u = `${n}#${l}`, d = new AbortController(), f = o; - o = d; - const h = () => d.abort("instance-closed"), g = () => d.abort("cancelled"); + const l = ++r, u = `${n}#${l}`, f = new AbortController(), d = o; + o = f; + const h = () => f.abort("instance-closed"), g = () => f.abort("cancelled"); e.addEventListener("abort", h, { once: !0 }), c?.signal?.addEventListener("abort", g, { once: !0 }); - const p = () => l === r && !d.signal.aborted, m = { + const p = () => l === r && !f.signal.aborted, m = { id: u, - signal: d.signal, + signal: f.signal, get superseded() { return l !== r; }, @@ -13570,14 +13570,14 @@ function foe(e, t, n) { } }; try { - if (f?.abort("superseded"), !p()) throw i(u, "superseded"); + if (d?.abort("superseded"), !p()) throw i(u, "superseded"); const v = await a(m); - if (!p()) throw i(u, String(d.signal.reason ?? "superseded")); + if (!p()) throw i(u, String(f.signal.reason ?? "superseded")); return v; } catch (v) { - throw e.aborted ? s() : p() ? qe(t, v) : i(u, String(d.signal.reason ?? "superseded")); + throw e.aborted ? s() : p() ? ze(t, v) : i(u, String(f.signal.reason ?? "superseded")); } finally { - e.removeEventListener("abort", h), c?.signal?.removeEventListener("abort", g), o === d && (o = null); + e.removeEventListener("abort", h), c?.signal?.removeEventListener("abort", g), o === f && (o = null); } } }; @@ -13612,10 +13612,10 @@ function poe(e, t) { const A = x.size; for (const [b, E] of x) E.epoch < y && x.delete(b); x.size === 0 && i.delete(w), x.size !== A && (a += 1, t.notify()); - }, d = /* @__PURE__ */ new Map(), f = (w) => { - const y = Gt(w), x = h(y)?.value; + }, f = /* @__PURE__ */ new Map(), d = (w) => { + const y = Yt(w), x = h(y)?.value; if (x === void 0 || !e.predict) return x; - const A = t.changes.version(), b = d.get(y); + const A = t.changes.version(), b = f.get(y); if (b && b.value === x && b.version === A && b.kept === a) return b.view; const E = e.predict, I = yS( @@ -13624,7 +13624,7 @@ function poe(e, t) { (O, T) => E(O, T, w), t.report ); - return d.set(y, { value: x, version: A, kept: a, view: I }), I; + return f.set(y, { value: x, version: A, kept: a, view: I }), I; }, h = (w) => n.get(w), g = (w, y) => r.live ? (y ? n.set(w, y) : n.delete(w), r.write(r.read() + 1)) : !1, p = (w) => { if (!(w.cause !== "load" && w.previous === w.next)) try { @@ -13642,7 +13642,7 @@ function poe(e, t) { }), v = (w) => t.pages.getPending(w) ? m(w).then( (y) => y ? e.load(t.doc, w, t.lifetime) : aB ) : e.load(t.doc, w, t.lifetime), S = (w) => { - const y = Gt(w), x = (o.get(y) ?? 0) + 1; + const y = Yt(w), x = (o.get(y) ?? 0) + 1; o.set(y, x); const A = h(y); A?.status !== "ready" && g(y, { page: w, status: "loading", value: A?.value }); @@ -13657,7 +13657,7 @@ function poe(e, t) { g(y, { page: w, status: "ready", value: I }), p({ page: w, cause: "load", event: null, previous: O, next: I }), i.has(y) && u(y, x); }, (I) => { - if (!(!b() || pr(I, "instance-closed"))) + if (!(!b() || Xn(I, "instance-closed"))) throw g(y, { page: w, status: tU(I), value: h(y)?.value }), I; } ).finally(() => { @@ -13678,8 +13678,8 @@ function poe(e, t) { } if (w.type === "pages.deleted") { for (const A of w.pages) { - const b = Gt(A), E = h(b); - E && (o.set(b, (o.get(b) ?? 0) + 1), i.delete(b), d.delete(b), g(b, null), p({ page: A, cause: "drop", event: w, previous: E.value, next: void 0 })); + const b = Yt(A), E = h(b); + E && (o.set(b, (o.get(b) ?? 0) + 1), i.delete(b), f.delete(b), g(b, null), p({ page: A, cause: "drop", event: w, previous: E.value, next: void 0 })); } return; } @@ -13687,7 +13687,7 @@ function poe(e, t) { if (y === null) return; const x = y === "all" ? k() : y; for (const A of x) { - const b = Gt(A), E = h(b); + const b = Yt(A), E = h(b); if (!E || E.status === tC) continue; if (!e.fold || E.status !== "ready") { l(b, w), C(A); @@ -13707,11 +13707,11 @@ function poe(e, t) { } } return { - get: (w) => h(Gt(w))?.value, - view: f, - getStatus: (w) => h(Gt(w))?.status ?? tC, + get: (w) => h(Yt(w))?.value, + view: d, + getStatus: (w) => h(Yt(w))?.status ?? tC, ensureLoaded(w) { - const y = Gt(w), x = s.get(y); + const y = Yt(w), x = s.get(y); return x || (h(y)?.status === "ready" ? Promise.resolve() : S(w)); }, refresh(w) { @@ -13724,7 +13724,7 @@ function goe(e) { let t = Promise.resolve(); return Object.assign((r, o) => { const s = () => o?.signal?.aborted ? Promise.reject( - new re("operation-cancelled", e, "cancelled before it started", { + new te("operation-cancelled", e, "cancelled before it started", { cause: o.signal.reason }) ) : r(), i = t.then(s, s); @@ -13736,34 +13736,50 @@ function goe(e) { ), i; }, { idle: () => t }); } -function Th(e, t, n) { - if (!t) return n; - const r = n; - return new Promise((o, s) => { - const i = () => { - r.abort?.(t.reason), s( - new re("operation-cancelled", e, "operation cancelled", { - cause: t.reason - }) - ); - }; - n.then( - (a) => { - t.removeEventListener("abort", i), o(a); +function Id(e, t, n, r) { + if (!t && !r) return n; + const o = n; + let s; + const i = new Promise((a, c) => { + let l = !1; + const u = () => { + l = !0, t?.removeEventListener("abort", d), r?.removeEventListener("abort", h); + }, f = (g, p) => { + l || (u(), o.abort?.(g), c(p)); + }, d = () => f( + t?.reason, + new te("operation-cancelled", e, "operation cancelled", { + cause: t?.reason + }) + ), h = () => f( + r?.reason, + new te("instance-closed", e, "the instance closed during the call", { + cause: r?.reason + }) + ); + s = (g) => f( + g, + new te("operation-cancelled", e, "operation cancelled", { + cause: g + }) + ), n.then( + (g) => { + u(), a(g); }, - (a) => { - t.removeEventListener("abort", i), s(qe(e, a)); + (g) => { + u(), c(ze(e, g)); } - ), t.aborted ? i() : t.addEventListener("abort", i, { once: !0 }); + ), r?.aborted ? h() : t?.aborted ? d() : (t?.addEventListener("abort", d, { once: !0 }), r?.addEventListener("abort", h, { once: !0 })); }); + return Object.assign(i, { abort: s }); } function bS(e, t) { - return typeof t == "number" ? e[t] ?? null : e.find((n) => Vf(n.ref, t)) ?? null; + return typeof t == "number" ? e[t] ?? null : e.find((n) => Uf(n.ref, t)) ?? null; } function moe(e, t, n) { const r = bS(e, t); if (r) return r; - throw new re( + throw new te( "not-found", n, typeof t == "number" ? `there is no page ${t} in this document` : `page ${t.objectNumber} is not in this document` @@ -13773,20 +13789,20 @@ function fN(e, t) { return t === "annotations:create" ? e.allowsAnnotation("create") : e.allows(t); } function hN(e, t, n) { - return new re("permission-denied", e, `${n} requires ${t}`, { + return new te("permission-denied", e, `${n} requires ${t}`, { permission: t }); } function yoe(e, t, n, r) { const o = n.assignment ?? iv(n.groupId), s = o.kind === "group" ? `fields:${t}:group=${o.groupId}` : t === "fill" ? "doc.forms.fill" : "doc.sign"; - return new re("permission-denied", e, `${r} requires ${s}`, { + return new te("permission-denied", e, `${r} requires ${s}`, { permission: s }); } const oU = (e, t) => t ? `${e}::${t}` : e, cB = (e, t) => e.reduceRight((n, r) => () => r(n), t)(); function boe(e) { const t = /* @__PURE__ */ new Set([ - It, + Pt, ...e.requires ?? [], ...e.optional ?? [] ]); @@ -13802,8 +13818,8 @@ function uB(e, t, n, r, o) { throw new Error( `[kernel] no state lease for plugin "${t.id}" (${a ?? "workspace"})` ); - const d = boe(t), f = (b) => { - if (loe() && !t.resolvesAnyCapability && !d.has(b)) + const f = boe(t), d = (b) => { + if (loe() && !t.resolvesAnyCapability && !f.has(b)) throw new Error( `[kernel] plugin "${t.id}" resolved capability "${b.name}" without declaring it; add the token to its \`requires\` or \`optional\` list.` ); @@ -13811,7 +13827,7 @@ function uB(e, t, n, r, o) { let h = !1; const g = (b) => { h || (h = !0, e.report( - new re( + new te( "instance-closed", t.id, `${b} after the instance closed (${u.instanceId}); dropped` @@ -13825,13 +13841,13 @@ function uB(e, t, n, r, o) { `[kernel] workspace plugin "${t.id}" has no bound document; use ctx.forDocument(token, documentId).` ); if (!n.handle) - throw new re( + throw new te( "not-ready", l, `document ${n.id} has no engine handle yet` ); return p ?? (p = doe(n.handle, { signal: r, instanceId: c }, l)); - }, v = () => n ? i.getCore().documents[n.id] ?? n.stagedMeta : null, S = (b) => new re("not-found", l, `page ${b.objectNumber} is not in this document`), C = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(); + }, v = () => n ? i.getCore().documents[n.id] ?? n.stagedMeta : null, S = (b) => new te("not-found", l, `page ${b.objectNumber} is not in this document`), C = /* @__PURE__ */ new Map(), k = /* @__PURE__ */ new Map(); let N = null, w = null; const y = [], x = () => ({ doc: m(), @@ -13867,7 +13883,7 @@ function uB(e, t, n, r, o) { getPage: (b) => bS(v()?.pages ?? [], b), pageOf: (b) => moe(v()?.pages ?? [], b, l), assertPageRef: (b) => { - if (!v()?.pages.some((E) => Vf(E.ref, b))) + if (!v()?.pages.some((E) => Uf(E.ref, b))) throw S(b); }, // Both read the bound document through `doc()`, so a workspace context @@ -13882,10 +13898,10 @@ function uB(e, t, n, r, o) { if (!m().security.allowsField(b, E)) throw yoe(l, b, E, I); }, - get: (b) => (f(b), e.resolveCapability(b, a)), - tryGet: (b) => (f(b), e.tryResolveCapability(b, a)), - forDocument: (b, E) => (f(b), e.resolveCapability(b, E)), - tryForDocument: (b, E) => (f(b), e.tryResolveCapability(b, E)), + get: (b) => (d(b), e.resolveCapability(b, a)), + tryGet: (b) => (d(b), e.tryResolveCapability(b, a)), + forDocument: (b, E) => (d(b), e.resolveCapability(b, E)), + tryForDocument: (b, E) => (d(b), e.tryResolveCapability(b, E)), state: { get: () => u.read(), update: (b, ...E) => { @@ -13922,22 +13938,22 @@ function uB(e, t, n, r, o) { const R = (D) => { T || (T = !0, $(), r.removeEventListener("abort", M), E?.signal?.removeEventListener("abort", F), D()); }, M = () => R( - () => O(new re("instance-closed", l, "closed while waiting")) + () => O(new te("instance-closed", l, "closed while waiting")) ), F = () => R( - () => O(new re("operation-cancelled", l, "cancelled while waiting")) - ), B = () => { + () => O(new te("operation-cancelled", l, "cancelled while waiting")) + ), _ = () => { let D = !1; try { D = b(); - } catch (_) { - R(() => O(_)); + } catch (B) { + R(() => O(B)); return; } D && R(I); - }, $ = i.subscribe(B); + }, $ = i.subscribe(_); if (r.aborted) return M(); if (E?.signal?.aborted) return F(); - r.addEventListener("abort", M, { once: !0 }), E?.signal?.addEventListener("abort", F, { once: !0 }), B(); + r.addEventListener("abort", M, { once: !0 }), E?.signal?.addEventListener("abort", F, { once: !0 }), _(); }); }, mirror(b) { @@ -13947,7 +13963,7 @@ function uB(e, t, n, r, o) { pageMirror: (b) => poe(b, x()), events: { source() { - const b = lo(e.report); + const b = uo(e.report); return o.defer(() => b.destroy()), b; } }, @@ -13962,6 +13978,12 @@ function uB(e, t, n, r, o) { ); return w ?? (w = n.changes.forPlugin(t.id)); }, + // A document's close marks the session closing, hides the document, revokes the state lease + // and only then aborts `lifetime`, telling the store's subscribers of each step as it happens: + // one that asks in between must hear false already. The kernel's destroy aborts `lifetime` + // first for a workspace plugin. + isOpen: () => !r.aborted && u.live && n?.phase !== "closing", + whileOpen: (b) => Id(l, void 0, b, r), cleanup: (b) => o.defer(b), clock: aoe(e.clock, r), measurer: e.measurer && hoe(e.measurer, r), @@ -13997,10 +14019,10 @@ function uB(e, t, n, r, o) { async acquire(b, E) { const I = await b(r); if (r.aborted) - throw await E(I), new re("instance-closed", l, "closed while acquiring a resource"); + throw await E(I), new te("instance-closed", l, "closed while acquiring a resource"); return o.defer(() => E(I)), I; }, - cancellable: (b, E) => Th(l, b, E), + cancellable: (b, E) => Id(l, b, E), latest(b) { let E = k.get(b); return E || (E = foe(r, l, b), k.set(b, E)), E; @@ -14039,7 +14061,7 @@ async function fB(e, t, n) { async function woe(e, t) { let n; const r = new Promise((o, s) => { - n = () => s(new re("operation-cancelled", "documents", "settling was cancelled")), t.aborted ? n() : t.addEventListener("abort", n, { once: !0 }); + n = () => s(new te("operation-cancelled", "documents", "settling was cancelled")), t.aborted ? n() : t.addEventListener("abort", n, { once: !0 }); }); try { await Promise.race([e, r]); @@ -14050,9 +14072,9 @@ async function woe(e, t) { function hB({ defaults: e, registered: t, whole: n = [] }, r, o) { const s = pN(e, t, { defaults: e, whole: n }); let i = s; - const a = lo(o), c = (u) => { - const d = Aoe(i, u); - d.length !== 0 && (i = u, r(), a.emit({ settings: u, changedKeys: d })); + const a = uo(o), c = (u) => { + const f = Aoe(i, u); + f.length !== 0 && (i = u, r(), a.emit({ settings: u, changedKeys: f })); }, l = { getSettings: () => i, updateSettings: (u) => c(pN(i, u, { defaults: e, whole: n })), @@ -14062,10 +14084,10 @@ function hB({ defaults: e, registered: t, whole: n = [] }, r, o) { return { api: l, forInstance(u) { - const d = lo(o); - return u(a.on((f) => d.emit(f))), u(() => d.destroy()), { + const f = uo(o); + return u(a.on((d) => f.emit(d))), u(() => f.destroy()), { get: l.getSettings, - api: { ...l, onSettingsChanged: d.on } + api: { ...l, onSettingsChanged: f.on } }; }, destroy: () => a.destroy() @@ -14080,7 +14102,7 @@ function pN(e, t, n) { const a = Hk(t, i); if (a === void 0) continue; const c = koe(Hk(n?.defaults, i), a); - Of(Hk(s, i), c) || (s = U6(s, i, c)); + Rf(Hk(s, i), c) || (s = U6(s, i, c)); } return s; } @@ -14111,7 +14133,7 @@ function koe(e, t) { } function gN(e, t) { if (t === void 0) return e; - if (!Wa(t)) return Of(e, t) ? e : t; + if (!Wa(t)) return Rf(e, t) ? e : t; const n = Wa(e) ? e : {}; let r = null; for (const o of Object.keys(t)) { @@ -14122,11 +14144,11 @@ function gN(e, t) { } function Aoe(e, t) { const n = e, r = t; - return [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])].filter((s) => !Of(n[s], r[s])); + return [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])].filter((s) => !Rf(n[s], r[s])); } function Soe(e) { const t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map([ - [It, "workspace"] + [Pt, "workspace"] ]); for (const a of e) { const c = t.get(a.id); @@ -14145,7 +14167,7 @@ function Soe(e) { } for (const a of e) for (const c of a.requires ?? []) { - if (c !== It && !n.has(c)) + if (c !== Pt && !n.has(c)) throw new Error( `Plugin "${a.id}" requires capability "${c.name}", which no plugin provides` + (c.hint ? ` — ${c.hint}.` : ".") ); @@ -14212,7 +14234,7 @@ const Coe = (e) => Object.freeze({ pageCount: 0, hasUnsavedChanges: !1, ...e.status === "locked" ? { passwordProvided: e.passwordProvided ?? !1 } : {}, - ...e.status === "error" && e.error !== void 0 ? { error: Br(qe("documents", e.error)) } : {}, + ...e.status === "error" && e.error !== void 0 ? { error: Br(ze("documents", e.error)) } : {}, ...e.openRequest ? { openRequest: e.openRequest } : {} }); function Noe(e, t) { @@ -14223,7 +14245,7 @@ function Ooe(e, t, n) { const { passphrase: r, visitorIdentity: o } = n ?? {}; if (r === void 0 && o === void 0) return e; if (!t) - throw new re( + throw new te( "invalid-input", "documents", "only a document from a grant takes its passphrase or answers" @@ -14234,20 +14256,20 @@ const Poe = (e) => e.type !== "stream.desynced" && e.type !== "document.versione async function Toe(e, t, n) { const r = n ?? globalThis.fetch; if (!r) - throw new re("unsupported", "documents", `can't download ${e.url}: no fetch()`); + throw new te("unsupported", "documents", `can't download ${e.url}: no fetch()`); const o = await r(e.url, { signal: t }); if (!o.ok) - throw new re( + throw new te( Roe(o.status), "documents", `couldn't download ${e.url} (HTTP ${o.status})` ); const s = new Uint8Array(await o.arrayBuffer()); if (!iU(s)) - throw new re("invalid-input", "documents", `${e.url} isn't a PDF`); + throw new te("invalid-input", "documents", `${e.url} isn't a PDF`); return { kind: "bytes", ...e.id !== void 0 ? { id: e.id } : {}, bytes: s }; } -const Moe = (e) => e.kind === "url", mB = () => new re("unsupported", "documents", "only the local engine gives a layer to download"), Boe = Object.freeze({ kind: "images", dpi: 150 }), m1 = Object.freeze({ +const Moe = (e) => e.kind === "url", mB = () => new te("unsupported", "documents", "only the local engine gives a layer to download"), Boe = Object.freeze({ kind: "images", dpi: 150 }), m1 = Object.freeze({ kind: "images", dpi: 300 }), _oe = Object.freeze({ kind: "pdf" }), Loe = (e, t) => ({ @@ -14268,13 +14290,13 @@ const Moe = (e) => e.kind === "url", mB = () => new re("unsupported", "documents let Doe = 0; const y1 = (e) => e instanceof Error && e.name === "AbortError"; function joe(e) { - const { engine: t, plugins: n } = e, r = e.report ?? ((V) => console.error("[kernel]", V)), o = coe(r), s = Soe(n), i = s.ordered.filter(ly), a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = new AbortController(), d = sB(r), f = /* @__PURE__ */ new Map([ - [It, Loe] + const { engine: t, plugins: n } = e, r = e.report ?? ((V) => console.error("[kernel]", V)), o = coe(r), s = Soe(n), i = s.ordered.filter(ly), a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = new AbortController(), f = sB(r), d = /* @__PURE__ */ new Map([ + [Pt, Loe] ]); for (const V of s.ordered) - V.token && V.inScope && !ly(V) && f.set(V.token, V.inScope); - const h = lo(r), g = lo(r), p = lo(r), m = lo(r), v = lo(r), S = lo(r), C = lo(r); - d.defer(() => { + V.token && V.inScope && !ly(V) && d.set(V.token, V.inScope); + const h = uo(r), g = uo(r), p = uo(r), m = uo(r), v = uo(r), S = uo(r), C = uo(r); + f.defer(() => { for (const V of [ h, g, @@ -14298,39 +14320,39 @@ function joe(e) { throw new Error(`[kernel] ${V} on a ${w} kernel`); }, b = (V) => { if (V.cancel.signal.aborted) - throw new kc(`closed while opening: ${V.id}`); + throw new Ac(`closed while opening: ${V.id}`); }; async function E(V, G, Q) { - const be = G; - V.engineOp = typeof be.abort == "function" ? be : null; - const we = V.cancel.signal; - let ye; - const st = new Promise((Qe, At) => { - ye = () => At(new kc(`closed while opening: ${V.id}`)), we.aborted ? ye() : we.addEventListener("abort", ye, { once: !0 }); + const ye = G; + V.engineOp = typeof ye.abort == "function" ? ye : null; + const be = V.cancel.signal; + let me; + const it = new Promise((Qe, St) => { + me = () => St(new Ac(`closed while opening: ${V.id}`)), be.aborted ? me() : be.addEventListener("abort", me, { once: !0 }); }); try { - return await Promise.race([G, st]); + return await Promise.race([G, it]); } catch (Qe) { - throw Rh(Qe) && G.then( - (At) => { - Q && V.scope.defer(() => Q(At)); + throw Mh(Qe) && G.then( + (St) => { + Q && V.scope.defer(() => Q(St)); }, () => { } // the abandoned call's own rejection is not separately actionable ), Qe; } finally { - ye && we.removeEventListener("abort", ye), V.engineOp = null; + me && be.removeEventListener("abort", me), V.engineOp = null; } } function I(V, G) { - const Q = new AbortController(), be = Jre({ - handle: () => we.handle, + const Q = new AbortController(), ye = Jre({ + handle: () => be.handle, notify: () => { - H(we), o.notify(); + H(be), o.notify(); }, report: r - }), we = { + }), be = { id: V, instanceId: `${V}#${++Doe}`, name: G, @@ -14353,13 +14375,13 @@ function joe(e) { settleFlushes: /* @__PURE__ */ new Set(), downloadWraps: [], printWraps: [], - changes: be, - pageView: toe({ changes: be, report: r }), + changes: ye, + pageView: toe({ changes: ye, report: r }), changeCount: 0, changesSeen: 0, - close: () => M(we) + close: () => M(be) }; - return we.settleFlushes.add(() => we.changes.settle()), we.scope.defer(() => we.changes.close()), we; + return be.settleFlushes.add(() => be.changes.settle()), be.scope.defer(() => be.changes.close()), be; } function O(V, G) { if (V.operation) @@ -14372,17 +14394,17 @@ function joe(e) { function T(V, G) { const Q = V.id; if (Q === G) return; - const be = o.getCore(); - if (N.has(G) || be.documents[G] || be.pending[G]) - throw new re("conflict", "documents", `duplicate document id: ${G}`); + const ye = o.getCore(); + if (N.has(G) || ye.documents[G] || ye.pending[G]) + throw new te("conflict", "documents", `duplicate document id: ${G}`); N.delete(Q), V.id = G, N.set(G, V), V.views.clear(); - const we = be.pending[Q]; - if (we) { - const { [Q]: ye, ...st } = be.pending; + const be = ye.pending[Q]; + if (be) { + const { [Q]: me, ...it } = ye.pending; k({ - pending: { ...st, [G]: { ...we, id: G } }, - order: be.order.map((Qe) => Qe === Q ? G : Qe), - activeId: be.activeId === Q ? G : be.activeId + pending: { ...it, [G]: { ...be, id: G } }, + order: ye.order.map((Qe) => Qe === Q ? G : Qe), + activeId: ye.activeId === Q ? G : ye.activeId }); } } @@ -14391,21 +14413,21 @@ function joe(e) { const G = R.get(V); if (G) return G; const Q = (async () => { - V.phase = "closing", _(V.id); - for (const we of V.leases.values()) we.revoke(); - const be = new kc(`closed while opening: ${V.id}`); - V.cancel.abort(be), V.engineOp?.abort(be), await V.operation?.catch((we) => { - !Rh(we) && !y1(we) && r(we); + V.phase = "closing", B(V.id); + for (const be of V.leases.values()) be.revoke(); + const ye = new Ac(`closed while opening: ${V.id}`); + V.cancel.abort(ye), V.engineOp?.abort(ye), await V.operation?.catch((be) => { + !Mh(be) && !y1(be) && r(be); }), await V.scope.destroy(), N.get(V.id) === V && N.delete(V.id), V.views.clear(), m.emit({ documentId: V.id }); })(); return R.set(V, Q), Q; } function F(V, G) { if (V.activeId !== G) return V.activeId; - const Q = V.order.indexOf(G), be = V.order.filter((we) => we !== G); - return be.length === 0 ? null : be[Math.max(0, Q - 1)] ?? be[0]; + const Q = V.order.indexOf(G), ye = V.order.filter((be) => be !== G); + return ye.length === 0 ? null : ye[Math.max(0, Q - 1)] ?? ye[0]; } - function B(V, G) { + function _(V, G) { const Q = o.getCore(); k({ pending: { @@ -14427,7 +14449,7 @@ function joe(e) { }), p.emit({ documentId: V.id, passwordProvided: G }); } function D(V, G) { - const Q = o.getCore(), be = Noe(G, V.grantInput); + const Q = o.getCore(), ye = Noe(G, V.grantInput); k({ pending: { ...Q.pending, @@ -14436,390 +14458,390 @@ function joe(e) { name: V.name, status: "error", error: G, - ...be ? { openRequest: be } : {} + ...ye ? { openRequest: ye } : {} } } }), g.emit({ documentId: V.id, - error: Br(qe("documents", G)) + error: Br(ze("documents", G)) }); } - function _(V) { + function B(V) { const G = o.getCore(); if (!G.pending[V] && !G.documents[V]) return; - const { [V]: Q, ...be } = G.pending, { [V]: we, ...ye } = G.documents; + const { [V]: Q, ...ye } = G.pending, { [V]: be, ...me } = G.documents; k({ - pending: be, - documents: ye, - order: G.order.filter((st) => st !== V), + pending: ye, + documents: me, + order: G.order.filter((it) => it !== V), activeId: F(G, V) }); } function L(V) { V.phase = "ready", V.pageView.refresh(); - const G = j(V.stagedMeta, V.pageView.current()), Q = o.getCore(), { [V.id]: be, ...we } = Q.pending; - k({ documents: { ...Q.documents, [V.id]: G }, pending: we }); - const ye = V.handle?.grant; - ye && (V.scope.defer( - ye.onIdentityRequested((st) => le(V, st)) - ), V.scope.defer(ye.onOpenRequested((st) => Y(V, st)))), h.emit({ documentId: V.id, info: g1(G) }); + const G = j(V.stagedMeta, V.pageView.current()), Q = o.getCore(), { [V.id]: ye, ...be } = Q.pending; + k({ documents: { ...Q.documents, [V.id]: G }, pending: be }); + const me = V.handle?.grant; + me && (V.scope.defer( + me.onIdentityRequested((it) => ie(V, it)) + ), V.scope.defer(me.onOpenRequested((it) => Y(V, it)))), h.emit({ documentId: V.id, info: g1(G) }); } function j(V, G) { - const { pages: Q, labels: be, pending: we } = G; - return V.pages === Q && V.pageLabels === be && V.pendingPages === we ? V : { + const { pages: Q, labels: ye, pending: be } = G; + return V.pages === Q && V.pageLabels === ye && V.pendingPages === be ? V : { ...V, pageCount: Q.length, pages: Q, - pageLabels: be, - pendingPages: we, + pageLabels: ye, + pendingPages: be, pagesSequence: V.pages === Q ? V.pagesSequence : V.pagesSequence + 1 }; } function H(V) { const G = V.pageView.refresh(); if (!G) return; - const Q = o.getCore(), be = Q.documents[V.id]; - if (!be) return; - const we = j(be, G); - we !== be && (k({ documents: { ...Q.documents, [V.id]: we } }), we.pages !== be.pages && S.emit({ + const Q = o.getCore(), ye = Q.documents[V.id]; + if (!ye) return; + const be = j(ye, G); + be !== ye && (k({ documents: { ...Q.documents, [V.id]: be } }), be.pages !== ye.pages && S.emit({ documentId: V.id, - pagesSequence: we.pagesSequence, - pages: we.pages + pagesSequence: be.pagesSequence, + pages: be.pages })); } function Y(V, G) { - const Q = o.getCore(), be = Q.documents[V.id]; - if (!be || (be.openRequest ?? null) === G) return; - const { openRequest: we, ...ye } = be; + const Q = o.getCore(), ye = Q.documents[V.id]; + if (!ye || (ye.openRequest ?? null) === G) return; + const { openRequest: be, ...me } = ye; k({ documents: { ...Q.documents, - [V.id]: G ? { ...ye, openRequest: G } : ye + [V.id]: G ? { ...me, openRequest: G } : me } }); } - async function ue(V, G) { - const Q = V.handle.grant, { passphrase: be, visitorIdentity: we } = G ?? {}; + async function le(V, G) { + const Q = V.handle.grant, { passphrase: ye, visitorIdentity: be } = G ?? {}; try { await Q.resume({ - ...be !== void 0 ? { passphrase: be } : {}, - ...we !== void 0 ? { visitorIdentity: we } : {} + ...ye !== void 0 ? { passphrase: ye } : {}, + ...be !== void 0 ? { visitorIdentity: be } : {} }); - } catch (ye) { - throw Y(V, Q.openRequest), qe("documents", ye); + } catch (me) { + throw Y(V, Q.openRequest), ze("documents", me); } - return Y(V, Q.openRequest), { document: fu(V.id) }; + return Y(V, Q.openRequest), { document: hu(V.id) }; } - function le(V, G) { - const Q = o.getCore(), be = Q.documents[V.id]; - if (!be || (be.identityRequest ?? null) === G) return; - const { identityRequest: we, ...ye } = be; + function ie(V, G) { + const Q = o.getCore(), ye = Q.documents[V.id]; + if (!ye || (ye.identityRequest ?? null) === G) return; + const { identityRequest: be, ...me } = ye; k({ documents: { ...Q.documents, - [V.id]: G ? { ...ye, identityRequest: G } : ye + [V.id]: G ? { ...me, identityRequest: G } : me } }); } async function pe(V, G) { - const Q = he(V, "identify"), be = Q.handle.grant; - if (!be) - throw new re("invalid-input", "documents", `${V} isn't from a grant`); + const Q = he(V, "identify"), ye = Q.handle.grant; + if (!ye) + throw new te("invalid-input", "documents", `${V} isn't from a grant`); try { - await be.identify(G); - } catch (we) { - const ye = h7(we); - throw ye && le(Q, ye), qe("documents", we); + await ye.identify(G); + } catch (be) { + const me = h7(be); + throw me && ie(Q, me), ze("documents", be); } - le(Q, be.identityRequest); + ie(Q, ye.identityRequest); } - function ge(V) { + function ve(V) { const G = he(V, "decline"); - G.handle.grant?.decline(), le(G, null); + G.handle.grant?.decline(), ie(G, null); } - function Me(V, G) { - const Q = o.getCore(), be = Q.documents[V.id]; - if (!be) { + function _e(V, G) { + const Q = o.getCore(), ye = Q.documents[V.id]; + if (!ye) { V.stagedMeta && V.stagedMeta.hasUnsavedChanges !== G && (V.stagedMeta = { ...V.stagedMeta, hasUnsavedChanges: G }); return; } - be.hasUnsavedChanges !== G && (k({ - documents: { ...Q.documents, [V.id]: { ...be, hasUnsavedChanges: G } } + ye.hasUnsavedChanges !== G && (k({ + documents: { ...Q.documents, [V.id]: { ...ye, hasUnsavedChanges: G } } }), C.emit({ documentId: V.id, hasUnsavedChanges: G })); } const Be = (V) => { const G = V ?? o.getCore().activeId; return G ? N.get(G) ?? null : null; - }, te = (V) => { + }, ee = (V) => { const G = Be(V); return G && (G.phase === "bringup" || G.phase === "ready") ? G.handle : null; }; function he(V, G) { const Q = Be(V); - if (!Q || !te(Q.id)) - throw new re("not-ready", "documents", `no open document to ${G}`); + if (!Q || !ee(Q.id)) + throw new te("not-ready", "documents", `no open document to ${G}`); return Q; } const Te = (V, G) => { - const Q = te(V); + const Q = ee(V); return Q ? fN(Q.security, G) : !1; }; - async function ze(V, G, Q, be, we) { - const ye = he(V, Q); - if (!Te(ye.id, "doc.download")) + async function We(V, G, Q, ye, be) { + const me = he(V, Q); + if (!Te(me.id, "doc.download")) throw hN("documents", "doc.download", `documents.${Q}`); - const st = we?.(ye.handle); - if (st) throw st; + const it = be?.(me.handle); + if (it) throw it; try { - await fB(ye.settleFlushes, [G, ye.signal], r); - const Qe = te(ye.id); - if (!Qe) throw new re("not-ready", "documents", `no open document to ${Q}`); - let At = -1; - const Nn = () => (At = ye.changeCount, Th("documents", G, be(Qe))), mt = await cB(ye.downloadWraps, Nn); - return At === ye.changeCount && Me(ye, !1), mt; + await fB(me.settleFlushes, [G, me.signal], r); + const Qe = ee(me.id); + if (!Qe) throw new te("not-ready", "documents", `no open document to ${Q}`); + let St = -1; + const Nn = () => (St = me.changeCount, Id("documents", G, ye(Qe))), mt = await cB(me.downloadWraps, Nn); + return St === me.changeCount && _e(me, !1), mt; } catch (Qe) { - throw qe("documents", Qe); + throw ze("documents", Qe); } } - const ae = e.printer ?? null, me = (V) => ae !== null && Te(V, "doc.print"), W = (V) => me(V) ? Te(V, "doc.print.high") ? (Te(V, "doc.download") || Te(V, "doc.download.flattened")) && ae?.stagePdf ? _oe : m1 : Boe : null; + const ae = e.printer ?? null, ge = (V) => ae !== null && Te(V, "doc.print"), W = (V) => ge(V) ? Te(V, "doc.print.high") ? (Te(V, "doc.download") || Te(V, "doc.download.flattened")) && ae?.stagePdf ? _oe : m1 : Boe : null; function Se(V, G) { - const Q = Ao(V.id)?.pages ?? nC; + const Q = So(V.id)?.pages ?? nC; if (G === void 0) return Q; if (G.length === 0) - throw new re("invalid-input", "documents", "a print needs at least one page"); - const be = G.map((we) => { - const ye = bS(Q, we); - if (!ye) - throw new re( + throw new te("invalid-input", "documents", "a print needs at least one page"); + const ye = G.map((be) => { + const me = bS(Q, be); + if (!me) + throw new te( "not-found", "documents", - `page ${we.objectNumber} is not in this document` + `page ${be.objectNumber} is not in this document` ); - return ye; + return me; }); - if (new Set(be).size !== be.length) - throw new re("invalid-input", "documents", "a print names a page twice"); - return be; + if (new Set(ye).size !== ye.length) + throw new te("invalid-input", "documents", "a print names a page twice"); + return ye; } const Ae = (V, G) => ({ includeAnnotations: G.includeAnnotations ?? Te(V, "doc.annotate.read"), includeFormFields: Te(V, "doc.forms.read") }); - async function ce(V, G, Q, be) { - const { signal: we } = be; - await fB(V.settleFlushes, [we, V.signal], r); - const ye = te(V.id); - if (!ye) throw new re("not-ready", "documents", "no open document to print"); - const st = V.changesSeen, Qe = { - handle: ye, - pages: Se(V, be.pages), - layers: Ae(V.id, be), + async function ce(V, G, Q, ye) { + const { signal: be } = ye; + await fB(V.settleFlushes, [be, V.signal], r); + const me = ee(V.id); + if (!me) throw new te("not-ready", "documents", "no open document to print"); + const it = V.changesSeen, Qe = { + handle: me, + pages: Se(V, ye.pages), + layers: Ae(V.id, ye), name: V.name ?? "document", - options: be + options: ye }; - if (be.onProgress?.({ pagesRendered: 0, pageCount: Qe.pages.length }), Q.kind === "images") - return { staged: await K(Qe, G, Q.dpi), quality: Q, changesSeen: st }; + if (ye.onProgress?.({ pagesRendered: 0, pageCount: Qe.pages.length }), Q.kind === "images") + return { staged: await K(Qe, G, Q.dpi), quality: Q, changesSeen: it }; try { - return { staged: await Ne(Qe, G), quality: Q, changesSeen: st }; - } catch (At) { - if (we?.aborted) throw At; - return { staged: await K(Qe, G, m1.dpi), quality: m1, changesSeen: st }; + return { staged: await Ne(Qe, G), quality: Q, changesSeen: it }; + } catch (St) { + if (be?.aborted) throw St; + return { staged: await K(Qe, G, m1.dpi), quality: m1, changesSeen: it }; } } async function Ne(V, G) { - const { handle: Q, pages: be, layers: we, name: ye, options: st } = V, { signal: Qe } = st; + const { handle: Q, pages: ye, layers: be, name: me, options: it } = V, { signal: Qe } = it; if (!G.stagePdf) - throw new re("unsupported", "documents", "this printer prints no PDF"); - const At = await Th( + throw new te("unsupported", "documents", "this printer prints no PDF"); + const St = await Id( "documents", Qe, Q.pages.extract( - be.map((mt) => mt.ref), - { flatten: { usage: "print" }, ...we } + ye.map((mt) => mt.ref), + { flatten: { usage: "print" }, ...be } ) - ), Nn = await G.stagePdf(At, { name: ye, ...Qe ? { signal: Qe } : {} }); - return st.onProgress?.({ pagesRendered: be.length, pageCount: be.length }), Nn; + ), Nn = await G.stagePdf(St, { name: me, ...Qe ? { signal: Qe } : {} }); + return it.onProgress?.({ pagesRendered: ye.length, pageCount: ye.length }), Nn; } async function K(V, G, Q) { - const { handle: be, pages: we, layers: ye, name: st, options: Qe } = V, { signal: At } = Qe, Nn = []; - for (const mt of we) { - const On = await Th( + const { handle: ye, pages: be, layers: me, name: it, options: Qe } = V, { signal: St } = Qe, Nn = []; + for (const mt of be) { + const On = await Id( "documents", - At, - be.page(mt.ref).render.image({ + St, + ye.page(mt.ref).render.image({ usage: "print", viewport: { kind: "dpi", dpi: Q }, format: "png", - ...ye + ...me }) - ), Zn = await Th("documents", At, On.blob()); - Nn.push({ image: Zn, widthPt: mt.size.width, heightPt: mt.size.height }), Qe.onProgress?.({ pagesRendered: Nn.length, pageCount: we.length }); + ), er = await Id("documents", St, On.blob()); + Nn.push({ image: er, widthPt: mt.size.width, heightPt: mt.size.height }), Qe.onProgress?.({ pagesRendered: Nn.length, pageCount: be.length }); } - return G.stage(Nn, { name: st, ...At ? { signal: At } : {} }); + return G.stage(Nn, { name: it, ...St ? { signal: St } : {} }); } async function U(V, G = {}) { const Q = he(V, "preparePrint"); if (!Te(Q.id, "doc.print")) throw hN("documents", "doc.print", "documents.preparePrint"); - const be = W(Q.id); - if (!ae || !be) - throw new re( + const ye = W(Q.id); + if (!ae || !ye) + throw new te( "unsupported", "documents", "no printer: pass one to createKernel({ printer }), such as browserPrinter() from @embedpdf/web" ); - const we = Se(Q, G.pages).length; + const be = Se(Q, G.pages).length; try { let { - staged: ye, - changesSeen: st, + staged: me, + changesSeen: it, quality: Qe - } = await ce(Q, ae, be, G), At = !1; + } = await ce(Q, ae, ye, G), St = !1; const Nn = () => { - At || (At = !0, ye.destroy()); + St || (St = !0, me.destroy()); }; Q.scope.defer(Nn); - const mt = async (On, Zn) => { - const sc = await ce(Q, ae, On, { + const mt = async (On, er) => { + const ic = await ce(Q, ae, On, { ...G.pages ? { pages: G.pages } : {}, ...G.includeAnnotations !== void 0 ? { includeAnnotations: G.includeAnnotations } : {}, - ...Zn ? { signal: Zn } : {} + ...er ? { signal: er } : {} }); - ye.destroy(), { staged: ye, changesSeen: st, quality: Qe } = sc; + me.destroy(), { staged: me, changesSeen: it, quality: Qe } = ic; }; return { get quality() { return Qe; }, - pageCount: we, + pageCount: be, needsTap: ae.needsTap === !0, async print(On) { - if (At) - throw new re("invalid-input", "documents", "this print was disposed"); - const Zn = On?.signal, sc = async () => { - if (Q.changesSeen !== st && await mt(be, Zn), Zn?.aborted) - throw new re("operation-cancelled", "documents", "print cancelled", { - cause: Zn.reason + if (St) + throw new te("invalid-input", "documents", "this print was disposed"); + const er = On?.signal, ic = async () => { + if (Q.changesSeen !== it && await mt(ye, er), er?.aborted) + throw new te("operation-cancelled", "documents", "print cancelled", { + cause: er.reason }); try { - await ye.print(); - } catch (ic) { - if (Qe.kind !== "pdf") throw ic; - await mt(m1, Zn), await ye.print(); + await me.print(); + } catch (ac) { + if (Qe.kind !== "pdf") throw ac; + await mt(m1, er), await me.print(); } }; try { - await cB(Q.printWraps, sc); - } catch (ic) { - throw qe("documents", ic); + await cB(Q.printWraps, ic); + } catch (ac) { + throw ze("documents", ac); } }, destroy: Nn }; - } catch (ye) { - throw qe("documents", ye); + } catch (me) { + throw ze("documents", me); } } - const Z = (V, G) => G.building.has(V) && !G.capabilities.has(V); - function ne(V, G) { + const X = (V, G) => G.building.has(V) && !G.capabilities.has(V); + function re(V, G) { let Q = G.capabilities.get(V); if (!Q) { if (G.building.has(V)) - throw new re( + throw new te( "not-ready", V.id, `"${V.id}" was asked for while it is being created` ); - const be = uB(He, V, G, G.signal, G.scope); + const ye = uB(rt, V, G, G.signal, G.scope); G.building.add(V); - let we; + let be; try { - we = V.create(be); + be = V.create(ye); } finally { G.building.delete(V); } - const { api: ye, connect: st } = we; - Q = ye, G.connectors.set(V, () => { - st?.(), lB(be); + const { api: me, connect: it } = be; + Q = me, G.connectors.set(V, () => { + it?.(), lB(ye); }), G.capabilities.set(V, Q); } return Q; } function xe(V, G, Q) { - const be = f.get(V), we = Q === void 0 ? void 0 : N.get(Q); - if (!be || !we) return G; - let ye = we.views.get(V); - return ye === void 0 && (ye = be(G, we.id), we.views.set(V, ye)), ye; + const ye = d.get(V), be = Q === void 0 ? void 0 : N.get(Q); + if (!ye || !be) return G; + let me = be.views.get(V); + return me === void 0 && (me = ye(G, be.id), be.views.set(V, me)), me; } - function _e(V, G) { + function Le(V, G) { A(`capability("${V.name}")`); const Q = a.get(V); if (Q) return xe(V, Q, G); - const be = s.providerOf(V); - if (!be) throw new Error(`No capability "${V.name}".`); - const we = G ?? o.getCore().activeId; - if (!we) throw new Error(`Capability "${V.name}" requires an active document.`); - const ye = N.get(we); - if (!ye) throw new Error(`Capability "${V.name}" unavailable: no document "${we}".`); - if (ye.phase === "bringup" || ye.phase === "ready") - return ne(be, ye); - const st = ye.phase === "opening" ? "loading" : ye.phase; - throw new Error(`Capability "${V.name}" unavailable: document "${we}" is ${st}.`); + const ye = s.providerOf(V); + if (!ye) throw new Error(`No capability "${V.name}".`); + const be = G ?? o.getCore().activeId; + if (!be) throw new Error(`Capability "${V.name}" requires an active document.`); + const me = N.get(be); + if (!me) throw new Error(`Capability "${V.name}" unavailable: no document "${be}".`); + if (me.phase === "bringup" || me.phase === "ready") + return re(ye, me); + const it = me.phase === "opening" ? "loading" : me.phase; + throw new Error(`Capability "${V.name}" unavailable: document "${be}" is ${it}.`); } function Ie(V, G) { if (w === "destroying" || w === "destroyed") return null; const Q = a.get(V); if (Q) return xe(V, Q, G); - const be = s.providerOf(V); - if (!be) return null; - const we = Be(G); - return !we || we.phase !== "bringup" && we.phase !== "ready" || Z(be, we) ? null : ne(be, we); + const ye = s.providerOf(V); + if (!ye) return null; + const be = Be(G); + return !be || be.phase !== "bringup" && be.phase !== "ready" || X(ye, be) ? null : re(ye, be); } - function Le(V, G) { + function De(V, G) { if (w === "destroying" || w === "destroyed") return null; const Q = a.get(V); if (Q) return xe(V, Q, G); - const be = s.providerOf(V); - if (!be) return null; - const we = Be(G); - return !we || we.phase !== "ready" || Z(be, we) ? null : ne(be, we); + const ye = s.providerOf(V); + if (!ye) return null; + const be = Be(G); + return !be || be.phase !== "ready" || X(ye, be) ? null : re(ye, be); } - const X = hB( + const qe = hB( { defaults: mN, registered: e.settings, whole: xoe }, o.notify, r ); - d.defer(() => X.destroy()); - const ie = /* @__PURE__ */ new Map(); + f.defer(() => qe.destroy()); + const Me = /* @__PURE__ */ new Map(); for (const V of s.ordered) - V.settings && ie.set(V, hB(V.settings, o.notify, r)); - d.defer(() => { - for (const V of ie.values()) V.destroy(); + V.settings && Me.set(V, hB(V.settings, o.notify, r)); + f.defer(() => { + for (const V of Me.values()) V.destroy(); }); - function Fe(V) { + function It(V) { const G = s.providerOf(V); if (!G) throw new Error(`No capability "${V.name}".`); - const Q = ie.get(G); + const Q = Me.get(G); if (!Q) throw new Error(`Plugin "${G.id}" has no settings.`); return Q.api; } - const He = { + const rt = { engine: t, store: o, - workspaceScope: d, + workspaceScope: f, workspaceSignal: u.signal, workspaceLeases: c, report: r, clock: e.clock ?? ioe, measurer: e.measurer ?? null, - resolveCapability: _e, + resolveCapability: Le, tryResolveCapability: Ie, - documentHandle: te, - settingsStoreOf: (V) => ie.get(V) + documentHandle: ee, + settingsStoreOf: (V) => Me.get(V) }; - let ut = 0; - const $e = () => `pending:${++ut}`; - async function gt(V, G) { + let Z = 0; + const fe = () => `pending:${++Z}`; + async function Fe(V, G) { V.phase = "bringup"; let Q = za; try { @@ -14838,25 +14860,25 @@ function joe(e) { renderPolicy: Q, hasUnsavedChanges: !1 }; - const be = UE(V.handle), we = Wre(o); - V.scope.defer(we.close); - let ye = 0, st = 0; + const ye = UE(V.handle), be = Wre(o); + V.scope.defer(be.close); + let me = 0, it = 0; const Qe = () => { - const mt = ye, On = ++st; + const mt = me, On = ++it; V.handle.pages.list().then( - (Zn) => { - V.cancel.signal.aborted || ye !== mt || st !== On || (V.pageView.setEnginePages(Zn), H(V)); + (er) => { + V.cancel.signal.aborted || me !== mt || it !== On || (V.pageView.setEnginePages(er), H(V)); }, - (Zn) => { - V.cancel.signal.aborted || r(Zn); + (er) => { + V.cancel.signal.aborted || r(er); } ); - }, At = V.handle.events.subscribe((mt) => { - we.first(mt), Poe(mt) && (V.changesSeen += 1, be && (V.changeCount += 1, Me(V, !0))); + }, St = V.handle.events.subscribe((mt) => { + be.first(mt), Poe(mt) && (V.changesSeen += 1, ye && (V.changeCount += 1, _e(V, !0))); const On = Zre(mt); - On && (ye += 1, V.pageView.setEnginePages(On)), mt.type === "stream.desynced" && Qe(), V.pageView.fold(mt), H(V); + On && (me += 1, V.pageView.setEnginePages(On)), mt.type === "stream.desynced" && Qe(), V.pageView.fold(mt), H(V); }); - V.scope.defer(At); + V.scope.defer(St); for (const mt of i) { const On = o.lease( oU(mt.id, V.id), @@ -14868,108 +14890,108 @@ function joe(e) { const Nn = o.hold(); try { for (const mt of i) - ne(mt, V), V.connectors.get(mt)?.(); + re(mt, V), V.connectors.get(mt)?.(); } finally { Nn(); } - V.scope.defer(V.handle.events.subscribe((mt) => we.last(mt))), b(V); + V.scope.defer(V.handle.events.subscribe((mt) => be.last(mt))), b(V); } - function qt(V) { + function ht(V) { const G = o.getCore(), Q = G.documents[V.id] ?? G.pending[V.id]; - if (!Q) throw new re("instance-closed", "documents", `${V.id} was closed`); + if (!Q) throw new te("instance-closed", "documents", `${V.id} was closed`); return { document: g1(Q) }; } - async function $t(V, G, Q) { - const be = G?.signal; - if (be?.aborted) - throw new re("operation-cancelled", "documents", "the open was cancelled"); + async function At(V, G, Q) { + const ye = G?.signal; + if (ye?.aborted) + throw new te("operation-cancelled", "documents", "the open was cancelled"); try { - const { session: we, done: ye } = pn(V, G, Q), st = () => void we.close(); - be?.addEventListener("abort", st, { once: !0 }); + const { session: be, done: me } = $t(V, G, Q), it = () => void be.close(); + ye?.addEventListener("abort", it, { once: !0 }); try { - return qt(await ye); + return ht(await me); } finally { - be?.removeEventListener("abort", st); + ye?.removeEventListener("abort", it); } - } catch (we) { - throw qe("documents", we); + } catch (be) { + throw ze("documents", be); } } - function nn(V) { - const { activate: G, name: Q, signal: be, ...we } = V ?? {}, ye = X.api.getSettings(), st = we.scope ?? ye.scope ?? void 0, Qe = we.identity ?? ye.identity ?? void 0; + function Nt(V) { + const { activate: G, name: Q, signal: ye, ...be } = V ?? {}, me = qe.api.getSettings(), it = be.scope ?? me.scope ?? void 0, Qe = be.identity ?? me.identity ?? void 0; return { - ...we, - ...st !== void 0 ? { scope: st } : {}, + ...be, + ...it !== void 0 ? { scope: it } : {}, ...Qe !== void 0 ? { identity: Qe } : {} }; } - function pn(V, G, Q) { + function $t(V, G, Q) { A("documents.open()"); - const be = nn(G), we = Q ?? (typeof V == "function" ? $e() : rC(V) ?? $e()); - if (N.has(we)) - throw new re("conflict", "documents", `document already open: ${we}`); - const ye = I(we, G?.name); - ye.source = V, ye.openOptions = G, N.set(ye.id, ye), B(ye, G?.activate ?? !0); - const st = O(ye, async () => { + const ye = Nt(G), be = Q ?? (typeof V == "function" ? fe() : rC(V) ?? fe()); + if (N.has(be)) + throw new te("conflict", "documents", `document already open: ${be}`); + const me = I(be, G?.name); + me.source = V, me.openOptions = G, N.set(me.id, me), _(me, G?.activate ?? !0); + const it = O(me, async () => { try { - const Qe = typeof V == "function" ? await E(ye, Promise.resolve(V(ye.cancel.signal))) : V; - b(ye); - const At = Moe(Qe) ? await E(ye, Toe(Qe, ye.cancel.signal, e.fetch)) : Qe; - b(ye), ye.grantInput = At.kind === "grant" ? At : null; - const Nn = rC(At); - Nn && T(ye, Nn); + const Qe = typeof V == "function" ? await E(me, Promise.resolve(V(me.cancel.signal))) : V; + b(me); + const St = Moe(Qe) ? await E(me, Toe(Qe, me.cancel.signal, e.fetch)) : Qe; + b(me), me.grantInput = St.kind === "grant" ? St : null; + const Nn = rC(St); + Nn && T(me, Nn); const mt = await E( - ye, - t.open(At, be), - (sc) => sc.close() + me, + t.open(St, ye), + (ic) => ic.close() ); - ye.handle = mt, ye.scope.defer(() => mt.close()), b(ye), mt.id !== ye.id && T(ye, mt.id); + me.handle = mt, me.scope.defer(() => mt.close()), b(me), mt.id !== me.id && T(me, mt.id); const On = mt.security?.passwordPrompt; if (On?.state === "required") - return ye.phase = "locked", $(ye, On.incorrect), ye; - const Zn = await E(ye, mt.pages.list()); - return b(ye), await gt(ye, Zn), L(ye), ye; + return me.phase = "locked", $(me, On.incorrect), me; + const er = await E(me, mt.pages.list()); + return b(me), await Fe(me, er), L(me), me; } catch (Qe) { - throw Rh(Qe) ? Qe : ye.phase === "closing" || y1(Qe) ? new kc(`closed while opening: ${ye.id}`) : (await ye.scope.destroy(), ye.phase = "error", D(ye, Qe), Qe); + throw Mh(Qe) ? Qe : me.phase === "closing" || y1(Qe) ? new Ac(`closed while opening: ${me.id}`) : (await me.scope.destroy(), me.phase = "error", D(me, Qe), Qe); } }); - return { session: ye, done: st }; + return { session: me, done: it }; } - async function Jo(V, G) { + async function Fr(V, G) { A("documents.unlock()"); const Q = N.get(V); if (!Q || Q.phase !== "locked" || !Q.handle) - throw new re("invalid-input", "documents", `document is not locked: ${V}`); - const be = Q.handle; + throw new te("invalid-input", "documents", `document is not locked: ${V}`); + const ye = Q.handle; return O(Q, async () => { try { - await Th( + await Id( "documents", G.signal, - E(Q, be.security.unlock({ password: G.password })) + E(Q, ye.security.unlock({ password: G.password })) ); - } catch (we) { - throw Q.phase === "closing" || y1(we) ? new kc(`closed while opening: ${Q.id}`) : we; + } catch (be) { + throw Q.phase === "closing" || y1(be) ? new Ac(`closed while opening: ${Q.id}`) : be; } b(Q); try { - const we = await E(Q, be.pages.list()); - b(Q), await gt(Q, we), L(Q); - } catch (we) { - throw Rh(we) ? we : Q.phase === "closing" || y1(we) ? new kc(`closed while opening: ${Q.id}`) : (await Q.scope.destroy(), Q.phase = "error", D(Q, we), we); + const be = await E(Q, ye.pages.list()); + b(Q), await Fe(Q, be), L(Q); + } catch (be) { + throw Mh(be) ? be : Q.phase === "closing" || y1(be) ? new Ac(`closed while opening: ${Q.id}`) : (await Q.scope.destroy(), Q.phase = "error", D(Q, be), be); } - }).catch((we) => { - throw qe("documents", we); + }).catch((be) => { + throw ze("documents", be); }); } - async function Ym(V) { + async function sc(V) { const G = N.get(V); G && await G.close(); } - function du(V) { + function fu(V) { k({ order: V }); } - const Ao = (V) => { + const So = (V) => { const G = o.getCore(), Q = V ?? G.activeId; return Q ? G.documents[Q] ?? null : null; }; @@ -14977,30 +14999,30 @@ function joe(e) { const Mi = () => { const V = o.getCore(); if (kr?.core === V) return kr.value; - const G = V.order.map((ye) => g1(V.documents[ye] ?? V.pending[ye])), Q = kr?.value, we = Q !== void 0 && Q.length === G.length && Q.every((ye, st) => ye === G[st]) ? Q : Object.freeze(G); - return kr = { core: V, value: we }, we; - }, fu = (V) => { - const G = o.getCore(), Q = V ?? G.activeId, be = Q ? G.documents[Q] ?? G.pending[Q] : void 0; - return be ? g1(be) : null; + const G = V.order.map((me) => g1(V.documents[me] ?? V.pending[me])), Q = kr?.value, be = Q !== void 0 && Q.length === G.length && Q.every((me, it) => me === G[it]) ? Q : Object.freeze(G); + return kr = { core: V, value: be }, be; + }, hu = (V) => { + const G = o.getCore(), Q = V ?? G.activeId, ye = Q ? G.documents[Q] ?? G.pending[Q] : void 0; + return ye ? g1(ye) : null; }, Qm = { - open: $t, + open: At, // A file's bytes are the engine's to take or refuse: it says which. canOpenFiles: () => t.canOpenFiles, retry: async (V, G) => { const Q = N.get(V); if (Q?.phase === "ready" && Q.handle?.grant?.openRequest) - return ue(Q, G); + return le(Q, G); if (!Q || Q.phase !== "error" || Q.source === null) - throw new re( + throw new te( "invalid-input", "documents", `${V} didn't fail to open; nothing to retry` ); - const { source: be, grantInput: we, openOptions: ye } = Q, st = Ooe(be, we, G), Qe = G?.visitorIdentity !== void 0 ? { ...nn(ye).identity, ...G.visitorIdentity } : void 0; - return N.delete(V), $t( - st, + const { source: ye, grantInput: be, openOptions: me } = Q, it = Ooe(ye, be, G), Qe = G?.visitorIdentity !== void 0 ? { ...Nt(me).identity, ...G.visitorIdentity } : void 0; + return N.delete(V), At( + it, { - ...ye, + ...me, ...Qe !== void 0 ? { identity: Qe } : {}, activate: !1, signal: G?.signal @@ -15009,12 +15031,12 @@ function joe(e) { ); }, identify: pe, - declineIdentity: ge, + declineIdentity: ve, rename: (V, G) => { const Q = o.getCore(); Q.documents[V] ? k({ documents: { ...Q.documents, [V]: { ...Q.documents[V], name: G } } }) : Q.pending[V] && k({ pending: { ...Q.pending, [V]: { ...Q.pending[V], name: G } } }); - const be = N.get(V); - be && (be.name = G); + const ye = N.get(V); + ye && (ye.name = G); }, openAll: (V) => { A("documents.openAll()"); @@ -15022,32 +15044,32 @@ function joe(e) { 0, V.findIndex((Q) => Q.active) ); - return V.map(({ source: Q, active: be, ...we }, ye) => { + return V.map(({ source: Q, active: ye, ...be }, me) => { try { - const { session: st, done: Qe } = pn(Q, { - ...we, - activate: ye === G + const { session: it, done: Qe } = $t(Q, { + ...be, + activate: me === G }); return Qe.catch(() => { - }), st.id; + }), it.id; } catch { return typeof Q == "function" ? "" : rC(Q) ?? ""; } }); }, - unlock: Jo, - close: Ym, + unlock: Fr, + close: sc, closeAll: async () => { - for (const V of [...o.getCore().order]) await Ym(V); + for (const V of [...o.getCore().order]) await sc(V); }, setActive: (V) => { const G = o.getCore(); (G.documents[V] || G.pending[V]) && k({ activeId: V }); }, getActiveId: () => o.getCore().activeId, - getActive: () => fu(), + getActive: () => hu(), list: Mi, - get: fu, + get: hu, has: (V) => { const G = o.getCore(); return G.documents[V] !== void 0 || G.pending[V] !== void 0; @@ -15057,33 +15079,33 @@ function joe(e) { setOrder: (V) => { const G = o.getCore().order; if (!(V.length === G.length && [...V].sort().join("\0") === [...G].sort().join("\0"))) - throw new re( + throw new te( "invalid-input", "documents", "setOrder() needs a permutation of the current order" ); - du([...V]); + fu([...V]); }, move: (V, G) => { const Q = o.getCore(); if (!Q.documents[V] && !Q.pending[V]) return; - const be = Q.order.filter((ye) => ye !== V), we = Math.max(0, Math.min(G, be.length)); - be.splice(we, 0, V), du(be); + const ye = Q.order.filter((me) => me !== V), be = Math.max(0, Math.min(G, ye.length)); + ye.splice(be, 0, V), fu(ye); }, swap: (V, G) => { - const Q = o.getCore(), be = Q.order.indexOf(V), we = Q.order.indexOf(G); - if (be < 0 || we < 0) return; - const ye = [...Q.order]; - ye[be] = G, ye[we] = V, du(ye); + const Q = o.getCore(), ye = Q.order.indexOf(V), be = Q.order.indexOf(G); + if (ye < 0 || be < 0) return; + const me = [...Q.order]; + me[ye] = G, me[be] = V, fu(me); }, // Reading the file: download() and downloadLayer() (downloadFile above). - download: (V, G) => ze( + download: (V, G) => We( V, G?.signal, "download", (Q) => Q.download(G?.mode !== void 0 ? { mode: G.mode } : void 0) ), - downloadLayer: (V, G) => ze( + downloadLayer: (V, G) => We( V, G?.signal, "downloadLayer", @@ -15104,12 +15126,12 @@ function joe(e) { getPrintQuality: (V) => W(V), // The verbs that need them live here, so their checks do too (permissions.md). canDownload: (V) => Te(V, "doc.download"), - canPrint: (V) => me(V), + canPrint: (V) => ge(V), // The page registry, addressed by PageRef (durable) or display index. - listPages: (V) => Ao(V)?.pages ?? nC, - getPage: (V, G) => bS(Ao(G)?.pages ?? nC, V), - getPageIndex: (V, G) => Ao(G)?.pages.findIndex((Q) => Vf(Q.ref, V)) ?? -1, - getRevision: (V) => Ao(V)?.pagesSequence ?? -1, + listPages: (V) => So(V)?.pages ?? nC, + getPage: (V, G) => bS(So(G)?.pages ?? nC, V), + getPageIndex: (V, G) => So(G)?.pages.findIndex((Q) => Uf(Q.ref, V)) ?? -1, + getRevision: (V) => So(V)?.pagesSequence ?? -1, onOpened: h.on, onOpenFailed: g.on, onLocked: p.on, @@ -15118,30 +15140,30 @@ function joe(e) { onPagesChanged: S.on, onUnsavedChangesChanged: C.on }; - a.set(It, Qm); + a.set(Pt, Qm); for (const V of s.ordered) ly(V) || c.set(V, o.lease(V.id, pB(V))); for (const V of s.ordered) { if (ly(V)) continue; const G = uB( - He, + rt, V, void 0, u.signal, - d - ), { api: Q, connect: be } = V.create(G); + f + ), { api: Q, connect: ye } = V.create(G); V.token && a.set(V.token, Q), l.set(V, () => { - be?.(), lB(G); + ye?.(), lB(G); }); } return { - ...X.api, + ...qe.api, engine: t, documents: Qm, - capability: _e, - tryCapability: Le, + capability: Le, + tryCapability: De, scopeOf: s.scopeOf, - settingsOf: Fe, + settingsOf: It, subscribe: o.subscribe, getState: o.getState, getStatus: () => w, @@ -15154,18 +15176,18 @@ function joe(e) { } w = "started"; } catch (V) { - throw w = "failed", await d.destroy(), a.clear(), V; + throw w = "failed", await f.destroy(), a.clear(), V; } })()), destroy: () => x ?? (x = (async () => { const V = w === "failed"; - w = "destroying", u.abort(new kc("kernel destroyed")), await y?.catch((G) => { - !Rh(G) && !V && r(G); - }), await Promise.allSettled([...N.values()].map((G) => G.close())), N.clear(), await d.destroy(), a.clear(), o.destroy(), w = "destroyed"; + w = "destroying", u.abort(new Ac("kernel destroyed")), await y?.catch((G) => { + !Mh(G) && !V && r(G); + }), await Promise.allSettled([...N.values()].map((G) => G.close())), N.clear(), await f.destroy(), a.clear(), o.destroy(), w = "destroyed"; })()) }; } -function tu(e, t) { +function nu(e, t) { const n = /* @__PURE__ */ new Set(), r = {}; for (const o of t) for (const s of Object.keys(o)) { @@ -15227,10 +15249,10 @@ const yB = Object.freeze({ error: void 0, openRequest: void 0, identityRequest: void 0 -}), bB = wr(It, { +}), bB = wr(Pt, { read: (e) => e.get() ?? yB, empty: yB -}), wB = wr(It, { +}), wB = wr(Pt, { read: (e) => ({ documents: e.list(), activeId: e.getActiveId() @@ -15256,7 +15278,7 @@ function Koe(e, t) { return r || (r = Hoe(t, () => e.settingsOf(t)), n.set(t, r)), r; } function Hoe(e, t) { - const n = () => new re("not-ready", e.name, "no document is open"), r = (a) => () => { + const n = () => new te("not-ready", e.name, "no document is open"), r = (a) => () => { if ($oe(e, a)) return Promise.reject(n()); throw n(); }, o = (a) => (...c) => { @@ -15271,11 +15293,11 @@ function Hoe(e, t) { if (typeof c == "symbol" || c === "then" || c.startsWith("__")) return; const l = a ? `${a}.${c}` : c; let u = s.get(l); - return u || (u = !a && Uoe.has(c) ? o(c) : new Proxy(r(l), { get: (d, f) => i(l, f) }), s.set(l, u)), u; + return u || (u = !a && Uoe.has(c) ? o(c) : new Proxy(r(l), { get: (f, d) => i(l, d) }), s.set(l, u)), u; }; return new Proxy({}, { get: (a, c) => i("", c) }); } -function sn(e, t) { +function an(e, t) { return { name: e, hint: t?.hint, @@ -15423,9 +15445,9 @@ async function ese(e, t, n, r, o) { const l = a.contentWindow, u = a.contentDocument; if (!l || !u) throw new Error("the print frame did not load"); u.title = n; - const d = u.createElement("style"); - return d.textContent = `html, body { margin: 0; padding: 0; height: 100%; } -${s}`, u.head.append(d), u.body.append(...lU(u, t, i)), await fU(Array.from(u.querySelectorAll("img")), o), { + const f = u.createElement("style"); + return f.textContent = `html, body { margin: 0; padding: 0; height: 100%; } +${s}`, u.head.append(f), u.body.append(...lU(u, t, i)), await fU(Array.from(u.querySelectorAll("img")), o), { print: () => dU(l), destroy: () => { a.remove(), r(); @@ -15655,20 +15677,20 @@ function H6(e) { function bN(e) { return H6(e).filter((t) => t.tabIndex >= 0); } -function Gr(e) { +function Jr(e) { let t = e.activeElement; for (; t?.shadowRoot?.activeElement; ) t = t.shadowRoot.activeElement; return t === e.body ? null : t; } -function dg(e) { - let t = Gr(e.ownerDocument); +function fg(e) { + let t = Jr(e.ownerDocument); for (; t; ) { if (t === e) return !0; t = t.assignedSlot ?? t.parentNode ?? t.host ?? null; } return !1; } -function fg(e) { +function hg(e) { return bU.has(e.tagName) && e.disabled ? !0 : e.getAttribute("aria-disabled") === "true"; } const dse = /* @__PURE__ */ new Set(["", "text", "search", "url", "tel", "email", "password"]), fse = /* @__PURE__ */ new Set([ @@ -15707,7 +15729,7 @@ function wS(e) { } const gse = 150; function mse(e, t = {}) { - const n = t.target ?? document, r = n.ownerDocument ?? n, o = () => n === r || dg(n), s = t.prefetch ?? !0; + const n = t.target ?? document, r = n.ownerDocument ?? n, o = () => n === r || fg(n), s = t.prefetch ?? !0; let i = null, a = 0, c = null; const l = () => { if (i = null, !s || !e.hasSelection() || !e.canCopy()) return; @@ -15722,26 +15744,26 @@ function mse(e, t = {}) { ); }, u = e.onCommitted(() => { c && clearTimeout(c), c = null, l(); - }), d = e.onChanged(() => { + }), f = e.onChanged(() => { a++, i = null, c && clearTimeout(c), c = setTimeout(l, gse); - }), f = () => e.hasSelection() && !e.canCopy(), h = (m) => { + }), d = () => e.hasSelection() && !e.canCopy(), h = (m) => { m.preventDefault(), t.onRefused?.(); }, g = (m) => { if (!(!o() || wS(m))) { - if (f()) return h(m); + if (d()) return h(m); i == null || i === "" || !e.hasSelection() || (m.clipboardData?.setData("text/plain", i), m.preventDefault()); } }, p = (m) => { if (!(m.metaKey || m.ctrlKey) || m.key.toLowerCase() !== "c" || m.shiftKey || m.altKey || // A command shortcut for the same key took it already. m.defaultPrevented || !o() || wS(m)) return; - if (f()) return h(m); + if (d()) return h(m); if (!e.hasSelection() || !e.canCopy()) return; const v = yse(n); v && !v.isCollapsed || z6(e); }; return r.addEventListener("copy", g), r.addEventListener("keydown", p), () => { - u(), d(), c && clearTimeout(c), r.removeEventListener("copy", g), r.removeEventListener("keydown", p); + u(), f(), c && clearTimeout(c), r.removeEventListener("copy", g), r.removeEventListener("keydown", p); }; } function yse(e) { @@ -15780,8 +15802,8 @@ function bse(e, t, { placement: n, gap: r, pinned: o = !1 }, s) { if (!c) return null; const l = e.view(), u = Math.abs(r) + (s ? Math.max(s.size.width, s.size.height) : 0); if (l && !wse(c, l, u)) return null; - const d = t.avoid?.length ? e.toScreenPoint(t.page, t.avoid[0]) : null; - return s && !o ? kU(c, n, r, s, d) : Ase(c, n, r, d); + const f = t.avoid?.length ? e.toScreenPoint(t.page, t.avoid[0]) : null; + return s && !o ? kU(c, n, r, s, f) : Ase(c, n, r, f); } function wse(e, t, n) { return e.x - n < t.x + t.width && e.x + e.width + n > t.x && e.y - n < t.y + t.height && e.y + e.height + n > t.y; @@ -15870,19 +15892,19 @@ function kU(e, t, n, r, o) { const { side: p } = vS(g); return p === "top" ? e.y - i.y : p === "bottom" ? i.y + i.height - (e.y + e.height) : p === "left" ? e.x - i.x : i.x + i.width - (e.x + e.width); }; - let d = t, f = c(d); - if (!l(d, f)) { - const g = xse(d), p = c(g); - (l(g, p) || u(g) > u(d)) && (d = g, f = p); + let f = t, d = c(f); + if (!l(f, d)) { + const g = xse(f), p = c(g); + (l(g, p) || u(g) > u(f)) && (f = g, d = p); } if (e.x < i.x + i.width && e.x + e.width > i.x && e.y < i.y + i.height && e.y + e.height > i.y) { const g = (p, m, v) => Math.max(m, Math.min(p, v)); - f = { - x: g(f.x, a.left, a.right - s.width), - y: g(f.y, a.top, a.bottom - s.height) + d = { + x: g(d.x, a.left, a.right - s.width), + y: g(d.y, a.top, a.bottom - s.height) }; } - return { left: f.x, top: f.y, transform: "none", placement: d }; + return { left: d.x, top: d.y, transform: "none", placement: f }; } const AU = (e) => e ? `rotate(${e}deg)` : void 0; function kS(e, t) { @@ -16047,228 +16069,234 @@ function zk(e, t, n = 100) { return i < 10 ? null : { vx: (s.x - o.x) / i * 1e3, vy: (s.y - o.y) / i * 1e3 }; } function Dse(e, t, n) { - const r = n.zoomGestures ?? !0, o = n.wheelZoomFactor ?? Lse, s = n.sink ?? null, i = n.longPressMs ?? 450, a = n.tapSlopPx ?? 10, c = n.doubleTapMs ?? 300, l = 25, u = n.flingMinVelocity ?? 50, d = 20, f = 160, h = 0.12, g = /* @__PURE__ */ new Map(); - let p = "idle", m = !1, v = !1, S = !1, C = null, k = null, N = -1, w = !0, y = 0, x = { t: 0, x: 0, y: 0 }, A = -1 / 0, b = 0, E = !1, I = { x: 0, y: 0 }, O = 0, T = [], R = [], M = 0, F = 0, B = 0, $ = 0, D = 0, _ = 0, L = 0; - const j = (X) => { - const ie = Date.now(); - return L = ie - $ <= 400 && Math.hypot(X.clientX - D, X.clientY - _) <= 6 ? L + 1 : 1, $ = ie, D = X.clientX, _ = X.clientY, L; - }, H = (X, ie) => { + const r = n.zoomGestures ?? !0, o = n.wheelZoomFactor ?? Lse, s = n.sink ?? null, i = n.longPressMs ?? 450, a = n.tapSlopPx ?? 10, c = n.doubleTapMs ?? 300, l = 25, u = n.flingMinVelocity ?? 50, f = 20, d = 160, h = 0.12, g = /* @__PURE__ */ new Map(); + let p = "idle", m = !1, v = !1, S = !1, C = null, k = null, N = -1, w = !0, y = 0, x = { t: 0, x: 0, y: 0 }, A = -1 / 0, b = !1, E = 0, I = !1, O = { x: 0, y: 0 }, T = 0, R = [], M = [], F = 0, _ = 0, $ = 0, D = 0, B = 0, L = 0, j = 0; + const H = (Z) => { + const fe = Date.now(); + return j = fe - D <= 400 && Math.hypot(Z.clientX - B, Z.clientY - L) <= 6 ? j + 1 : 1, D = fe, B = Z.clientX, L = Z.clientY, j; + }, Y = (Z, fe) => { const Fe = e.getBoundingClientRect(); - return { x: X - Fe.left, y: ie - Fe.top }; - }, Y = () => { - const X = []; - return g.forEach((ie) => { - ie.kind === "touch" && X.push(ie); - }), X; - }, ue = () => { - k !== null && (clearTimeout(k), k = null); + return { x: Z - Fe.left, y: fe - Fe.top }; }, le = () => { - b && (cancelAnimationFrame(b), b = 0); - }, pe = (X = !1) => { - m || (m = !0, t.beginGesture(X ? { elastic: !0 } : void 0)); - }, ge = () => { + const Z = []; + return g.forEach((fe) => { + fe.kind === "touch" && Z.push(fe); + }), Z; + }, ie = () => { + k !== null && (clearTimeout(k), k = null); + }, pe = () => { + E && (cancelAnimationFrame(E), E = 0); + }, ve = (Z = !1) => { + m || (m = !0, t.beginGesture(Z ? { elastic: !0 } : void 0)); + }, _e = () => { m && (m = !1, t.endGesture()); - }, Me = () => { - p = "idle", C = null, S = !1, T = [], R = [], E = !1, N = -1, w = !0, y = 0, ue(), le(); - }, Be = (X, ie) => { - T.push({ t: performance.now(), x: X, y: ie }), T.length > 16 && T.shift(); - }, te = () => { - const X = zk(T, performance.now()); - X && Math.hypot(X.vx, X.vy) >= u && t.fling(X.vx, X.vy); - }, he = (X, ie) => { - const Fe = X - I.x, He = ie - I.y; - (Fe !== 0 || He !== 0) && t.panBy(Fe, He), I = { x: X, y: ie }, E = !1; - }, Te = (X, ie, Fe, He) => { - const ut = (X + Fe) / 2, $e = (ie + He) / 2, gt = Math.hypot(X - Fe, ie - He), qt = ut - I.x, $t = $e - I.y; - (qt !== 0 || $t !== 0) && t.panBy(qt, $t), r && gt > d && O > d && gt !== O && t.zoomAround(H(ut, $e), gt / O), Be(ut, $e), R.push({ t: performance.now(), x: gt, y: 0 }), R.length > 16 && R.shift(), I = { x: ut, y: $e }, O = gt, E = !1; - }, ze = () => { - if (b = 0, p === "pan" || p === "mousedrag") { - const X = g.get(N); - X && E && he(X.x, X.y), b = requestAnimationFrame(ze); + }, Be = () => { + p = "idle", C = null, S = !1, R = [], M = [], I = !1, N = -1, w = !0, y = 0, ie(), pe(); + }, ee = (Z, fe) => { + R.push({ t: performance.now(), x: Z, y: fe }), R.length > 16 && R.shift(); + }, he = () => { + const Z = zk(R, performance.now()); + Z && Math.hypot(Z.vx, Z.vy) >= u && t.fling(Z.vx, Z.vy); + }, Te = (Z, fe) => { + const Fe = Z - O.x, ht = fe - O.y; + (Fe !== 0 || ht !== 0) && t.panBy(Fe, ht), O = { x: Z, y: fe }, I = !1; + }, We = (Z, fe, Fe, ht) => { + const At = (Z + Fe) / 2, Nt = (fe + ht) / 2, $t = Math.hypot(Z - Fe, fe - ht), Fr = At - O.x, sc = Nt - O.y; + (Fr !== 0 || sc !== 0) && t.panBy(Fr, sc), r && $t > f && T > f && $t !== T && t.zoomAround(Y(At, Nt), $t / T), ee(At, Nt), M.push({ t: performance.now(), x: $t, y: 0 }), M.length > 16 && M.shift(), O = { x: At, y: Nt }, T = $t, I = !1; + }, ae = () => { + if (E = 0, p === "pan" || p === "mousedrag") { + const Z = g.get(N); + Z && I && Te(Z.x, Z.y), E = requestAnimationFrame(ae); } else if (p === "pinch") { - const [X, ie] = Y(); - X && ie && E && Te(X.x, X.y, ie.x, ie.y), b = requestAnimationFrame(ze); + const [Z, fe] = le(); + Z && fe && I && We(Z.x, Z.y, fe.x, fe.y), E = requestAnimationFrame(ae); } - }, ae = () => { - b || (b = requestAnimationFrame(ze)); - }, me = () => { - const [X, ie] = Y(); - !X || !ie || (p = "pinch", I = { x: (X.x + ie.x) / 2, y: (X.y + ie.y) / 2 }, O = Math.hypot(X.x - ie.x, X.y - ie.y), T = [], E = !1, ae()); + }, ge = () => { + E || (E = requestAnimationFrame(ae)); }, W = () => { - k = null, !(p !== "pending" || !C || !s) && (ge(), p = "tool", S = !0, s.longPress(C)); - }, Se = (X) => { - const ie = X.pointerType || "mouse"; - if (ie === "touch" && (A = performance.now()), ie !== "touch") { - if (ie === "mouse" && X.button !== 0 || p !== "idle") return; - g.set(X.pointerId, { - id: X.pointerId, - kind: ie, - x: X.clientX, - y: X.clientY, - downX: X.clientX, - downY: X.clientY - }), s ? (p = "tool", s.down(X, j(X))) : (p = "mousedrag", pe(), N = X.pointerId, I = { x: X.clientX, y: X.clientY }, ae()); + const [Z, fe] = le(); + !Z || !fe || (p = "pinch", O = { x: (Z.x + fe.x) / 2, y: (Z.y + fe.y) / 2 }, T = Math.hypot(Z.x - fe.x, Z.y - fe.y), R = [], I = !1, ge()); + }, Se = () => { + k = null, !(p !== "pending" || !C || !s) && (_e(), p = "tool", S = !0, s.longPress(C)); + }, Ae = (Z) => { + const fe = Z.pointerType || "mouse"; + if (fe === "touch" && (A = performance.now()), fe !== "touch") { + if (fe === "mouse" && Z.button !== 0 || p !== "idle") return; + g.set(Z.pointerId, { + id: Z.pointerId, + kind: fe, + x: Z.clientX, + y: Z.clientY, + downX: Z.clientX, + downY: Z.clientY + }), s ? (p = "tool", b = !1, s.down(Z, H(Z))) : (p = "mousedrag", ve(), N = Z.pointerId, O = { x: Z.clientX, y: Z.clientY }, ge()); return; } switch (p) { case "idle": { - g.set(X.pointerId, { - id: X.pointerId, - kind: ie, - x: X.clientX, - y: X.clientY, - downX: X.clientX, - downY: X.clientY + g.set(Z.pointerId, { + id: Z.pointerId, + kind: fe, + x: Z.clientX, + y: Z.clientY, + downX: Z.clientX, + downY: Z.clientY }); const Fe = t.isMoving(); - if (!Fe && s?.claimsPoint?.(X)) { - p = "tool", S = !0, s.down(X, 1); + if (!Fe && s?.claimsPoint?.(Z)) { + p = "tool", S = !0, s.down(Z, 1); break; } - p = "pending", C = X, v = Fe, pe(!0), T = [], Be(X.clientX, X.clientY), ue(), s && !v && (k = setTimeout(W, i)); + p = "pending", C = Z, v = Fe, ve(!0), R = [], ee(Z.clientX, Z.clientY), ie(), s && !v && (k = setTimeout(Se, i)); break; } case "pending": case "pan": { - g.set(X.pointerId, { - id: X.pointerId, - kind: ie, - x: X.clientX, - y: X.clientY, - downX: X.clientX, - downY: X.clientY - }), ue(), me(); + g.set(Z.pointerId, { + id: Z.pointerId, + kind: fe, + x: Z.clientX, + y: Z.clientY, + downX: Z.clientX, + downY: Z.clientY + }), ie(), W(); break; } case "tool": { if (!S) return; - s?.cancel(X), S = !1, g.set(X.pointerId, { - id: X.pointerId, - kind: ie, - x: X.clientX, - y: X.clientY, - downX: X.clientX, - downY: X.clientY - }), pe(!0), me(); + s?.cancel(Z), S = !1, g.set(Z.pointerId, { + id: Z.pointerId, + kind: fe, + x: Z.clientX, + y: Z.clientY, + downX: Z.clientX, + downY: Z.clientY + }), ve(!0), W(); break; } case "pinch": case "mousedrag": return; } - }, Ae = (X) => { - const ie = g.get(X.pointerId); - if (ie) - switch (ie.kind === "touch" && (A = performance.now()), ie.x = X.clientX, ie.y = X.clientY, p) { + }, ce = (Z) => { + const fe = g.get(Z.pointerId); + if (fe) + switch (fe.kind === "touch" && (A = performance.now()), fe.x = Z.clientX, fe.y = Z.clientY, p) { case "pending": { - Be(ie.x, ie.y), Math.hypot(ie.x - ie.downX, ie.y - ie.downY) > a && (ue(), p = "pan", N = ie.id, I = { x: ie.x, y: ie.y }, ae()); + ee(fe.x, fe.y), Math.hypot(fe.x - fe.downX, fe.y - fe.downY) > a && (ie(), p = "pan", N = fe.id, O = { x: fe.x, y: fe.y }, ge()); break; } case "pan": - if (ie.id !== N) break; + if (fe.id !== N) break; if (!w) { const Fe = performance.now(); if (Fe < y) { - const He = Fe - x.t; - if (He >= 8) { - const ut = Math.hypot(ie.x - x.x, ie.y - x.y) / He; - x = { t: Fe, x: ie.x, y: ie.y }, ut < h && (y = 0); + const ht = Fe - x.t; + if (ht >= 8) { + const At = Math.hypot(fe.x - x.x, fe.y - x.y) / ht; + x = { t: Fe, x: fe.x, y: fe.y }, At < h && (y = 0); } - ie.downX = ie.x, ie.downY = ie.y; + fe.downX = fe.x, fe.downY = fe.y; break; } - if (Math.hypot(ie.x - ie.downX, ie.y - ie.downY) <= a) break; - w = !0, I = { x: ie.x, y: ie.y }, T = [], R = []; + if (Math.hypot(fe.x - fe.downX, fe.y - fe.downY) <= a) break; + w = !0, O = { x: fe.x, y: fe.y }, R = [], M = []; } - Be(ie.x, ie.y), E = !0; + ee(fe.x, fe.y), I = !0; break; case "pinch": - E = !0; + I = !0; break; case "tool": - s?.move(X); + s?.move(Z); break; case "mousedrag": - ie.id === N && (E = !0); + fe.id === N && (I = !0); break; } - }, ce = (X) => { - p === "idle" && s && s.hover(X); - }, Ne = () => { - const X = Y(); - return X.length !== 1 ? !1 : (p = "pan", N = X[0].id, w = !1, y = performance.now() + f, x = { t: performance.now(), x: X[0].x, y: X[0].y }, X[0].downX = X[0].x, X[0].downY = X[0].y, I = { x: X[0].x, y: X[0].y }, T = [], E = !1, !0); - }, K = (X) => { - const ie = g.get(X.pointerId); - if (ie) - switch (ie.kind === "touch" && (A = performance.now()), g.delete(X.pointerId), p) { + }, Ne = (Z) => { + p === "idle" && s && s.hover(Z); + }, K = (Z) => { + Z.pointerType !== "touch" && (p === "idle" ? s?.leave?.(Z) : p === "tool" && g.has(Z.pointerId) && (b = !0)); + }, U = (Z) => { + p === "tool" && g.has(Z.pointerId) && (b = !1); + }, X = (Z) => { + b && (b = !1, s?.leave?.(Z)); + }, re = () => { + const Z = le(); + return Z.length !== 1 ? !1 : (p = "pan", N = Z[0].id, w = !1, y = performance.now() + d, x = { t: performance.now(), x: Z[0].x, y: Z[0].y }, Z[0].downX = Z[0].x, Z[0].downY = Z[0].y, O = { x: Z[0].x, y: Z[0].y }, R = [], I = !1, !0); + }, xe = (Z) => { + const fe = g.get(Z.pointerId); + if (fe) + switch (fe.kind === "touch" && (A = performance.now()), g.delete(Z.pointerId), p) { case "pending": { - ue(), ge(); - const Fe = performance.now(), He = Fe - M <= c && Math.hypot(X.clientX - F, X.clientY - B) <= l; - v ? M = 0 : r && He ? (M = 0, t.doubleTapZoom(H(X.clientX, X.clientY))) : (M = Fe, F = X.clientX, B = X.clientY, s && C && (s.down(C, 1), s.up(X))), Me(); + ie(), _e(); + const Fe = performance.now(), ht = Fe - F <= c && Math.hypot(Z.clientX - _, Z.clientY - $) <= l; + v ? F = 0 : r && ht ? (F = 0, t.doubleTapZoom(Y(Z.clientX, Z.clientY))) : (F = Fe, _ = Z.clientX, $ = Z.clientY, s && C && (s.down(C, 1), s.up(Z))), Be(); break; } case "pan": { if (!w) { - const Fe = performance.now(), He = zk(T, Fe), ut = zk(R, Fe); - if (ge(), He) { - const $e = Math.hypot(He.vx, He.vy); - $e >= u && $e > Math.abs(ut?.vx ?? 0) && t.fling(He.vx, He.vy); + const Fe = performance.now(), ht = zk(R, Fe), At = zk(M, Fe); + if (_e(), ht) { + const Nt = Math.hypot(ht.vx, ht.vy); + Nt >= u && Nt > Math.abs(At?.vx ?? 0) && t.fling(ht.vx, ht.vy); } - Me(); + Be(); break; } - he(X.clientX, X.clientY), Be(X.clientX, X.clientY), ge(), te(), Me(); + Te(Z.clientX, Z.clientY), ee(Z.clientX, Z.clientY), _e(), he(), Be(); break; } case "pinch": { - const Fe = Y(); + const Fe = le(); if (Fe.length === 1) { - p = "pan", N = Fe[0].id, w = !1, y = performance.now() + f, x = { t: performance.now(), x: Fe[0].x, y: Fe[0].y }, Fe[0].downX = Fe[0].x, Fe[0].downY = Fe[0].y, I = { x: Fe[0].x, y: Fe[0].y }, E = !1; + p = "pan", N = Fe[0].id, w = !1, y = performance.now() + d, x = { t: performance.now(), x: Fe[0].x, y: Fe[0].y }, Fe[0].downX = Fe[0].x, Fe[0].downY = Fe[0].y, O = { x: Fe[0].x, y: Fe[0].y }, I = !1; break; } - ge(), te(), Me(); + _e(), he(), Be(); break; } case "tool": { - s?.up(X), Me(); + s?.up(Z), Be(), X(Z); break; } case "mousedrag": { - if (ie.id !== N) break; - he(X.clientX, X.clientY), ge(), Me(); + if (fe.id !== N) break; + Te(Z.clientX, Z.clientY), _e(), Be(); break; } } - }, U = (X) => { - if (g.get(X.pointerId)) { - if (g.delete(X.pointerId), p === "tool") { - s?.cancel(X), Me(); + }, Le = (Z) => { + if (g.get(Z.pointerId)) { + if (g.delete(Z.pointerId), p === "tool") { + s?.cancel(Z), Be(), X(Z); return; } - p === "pinch" && Ne() || (ge(), Me()); + p === "pinch" && re() || (_e(), Be()); } - }, Z = (X, ie, Fe) => t.wheelBy ? t.wheelBy(X, ie, Fe) : (t.panBy(X, ie), !0), ne = (X) => { - if (!X.cancelable) return; - const ie = X.ctrlKey || X.metaKey; - if (ie && r) { - X.preventDefault(), t.zoomAround(H(X.clientX, X.clientY), o(X)); + }, Ie = (Z, fe, Fe) => t.wheelBy ? t.wheelBy(Z, fe, Fe) : (t.panBy(Z, fe), !0), De = (Z) => { + if (!Z.cancelable) return; + const fe = Z.ctrlKey || Z.metaKey; + if (fe && r) { + Z.preventDefault(), t.zoomAround(Y(Z.clientX, Z.clientY), o(Z)); return; } - const Fe = X.shiftKey ? X.deltaY : X.deltaX, He = X.shiftKey ? X.deltaX : X.deltaY; - (Z(-Fe, -He, X.timeStamp) || ie) && X.preventDefault(); + const Fe = Z.shiftKey ? Z.deltaY : Z.deltaX, ht = Z.shiftKey ? Z.deltaX : Z.deltaY; + (Ie(-Fe, -ht, Z.timeStamp) || fe) && Z.preventDefault(); }; - let xe = 1; - const _e = (X) => { - X.preventDefault(), xe = X.scale ?? 1; - }, Ie = (X) => { - if (X.preventDefault(), Y().length > 0 || performance.now() - A < 500) return; - const ie = X, Fe = ie.scale ?? 1; - r && Fe > 0 && t.zoomAround(H(ie.clientX, ie.clientY), Fe / xe), xe = Fe; + let qe = 1; + const Me = (Z) => { + Z.preventDefault(), qe = Z.scale ?? 1; + }, It = (Z) => { + if (Z.preventDefault(), le().length > 0 || performance.now() - A < 500) return; + const fe = Z, Fe = fe.scale ?? 1; + r && Fe > 0 && t.zoomAround(Y(fe.clientX, fe.clientY), Fe / qe), qe = Fe; }; - e.addEventListener("pointerdown", Se), e.addEventListener("pointermove", ce), window.addEventListener("pointermove", Ae), window.addEventListener("pointerup", K), window.addEventListener("pointercancel", U), e.addEventListener("wheel", ne, { passive: !1 }); - const Le = "GestureEvent" in window; - return Le && (e.addEventListener("gesturestart", _e), e.addEventListener("gesturechange", Ie), e.addEventListener("gestureend", _e)), () => { - e.removeEventListener("pointerdown", Se), e.removeEventListener("pointermove", ce), window.removeEventListener("pointermove", Ae), window.removeEventListener("pointerup", K), window.removeEventListener("pointercancel", U), e.removeEventListener("wheel", ne), Le && (e.removeEventListener("gesturestart", _e), e.removeEventListener("gesturechange", Ie), e.removeEventListener("gestureend", _e)), ue(), le(), ge(); + e.addEventListener("pointerdown", Ae), e.addEventListener("pointermove", Ne), e.addEventListener("pointerleave", K), e.addEventListener("pointerenter", U), window.addEventListener("pointermove", ce), window.addEventListener("pointerup", xe), window.addEventListener("pointercancel", Le), e.addEventListener("wheel", De, { passive: !1 }); + const rt = "GestureEvent" in window; + return rt && (e.addEventListener("gesturestart", Me), e.addEventListener("gesturechange", It), e.addEventListener("gestureend", Me)), () => { + e.removeEventListener("pointerdown", Ae), e.removeEventListener("pointermove", Ne), e.removeEventListener("pointerleave", K), e.removeEventListener("pointerenter", U), window.removeEventListener("pointermove", ce), window.removeEventListener("pointerup", xe), window.removeEventListener("pointercancel", Le), e.removeEventListener("wheel", De), rt && (e.removeEventListener("gesturestart", Me), e.removeEventListener("gesturechange", It), e.removeEventListener("gestureend", Me)), ie(), pe(), _e(); }; } function jse(e, t) { @@ -16336,19 +16364,22 @@ function Fse(e, t, n = {}) { ...m ? { gesture: m } : {}, ...n.source ? { source: n.source } : {} }; - }, d = (h, g, p = 1, m) => { + }, f = (h, g, p = 1, m) => { r?.dispatchPointer(u(h, g, p, m)); - }, f = r ? { - down: (h, g) => d("down", h, g), - move: (h) => d("move", h), - up: (h) => d("up", h), - cancel: (h) => d("cancel", h), - hover: (h) => d("move", h), + }, d = r ? { + down: (h, g) => f("down", h, g), + move: (h) => f("move", h), + up: (h) => f("up", h), + cancel: (h) => f("cancel", h), + hover: (h) => f("move", h), // no owner → the hub routes to onHover + // A hover over no page, whatever a hit test where the pointer left finds: + // a page can reach past the surface's edge, clipped from view. + leave: (h) => r.dispatchPointer({ ...u("move", h), page: void 0 }), // Touch long-press = a word-select down (clickCount 2 keeps the // word-selection contract; the `gesture` marker is the honest // long-press signal for haptics/pickup handlers). - longPress: (h) => d("down", h, 2, "long-press"), + longPress: (h) => f("down", h, 2, "long-press"), // Touch consent: an armed drawing/markup tool takes fingers wholesale; // otherwise per-point claims (a selected annotation's body or handles) // decide. A pure pre-flight — nothing captures. @@ -16358,7 +16389,7 @@ function Fse(e, t, n = {}) { Dse(e, t, { zoomGestures: n.zoomGestures, wheelZoomFactor: n.wheelZoomFactor, - sink: f + sink: d }) ), () => { for (const h of o) h(); @@ -16516,7 +16547,7 @@ function Yse(e, t, n, r) { } t.color !== void 0 && (e.color = t.color), t.script !== void 0 && t.script !== "normal" ? (e.verticalAlign = t.script, e.fontSize = "0.66em") : t.size !== void 0 && (e.fontSize = `${t.size * n}px`), PU(t) && (e.fontFamily = r.cssFontFamily(OU(t, r.body))), t.letterSpacing !== void 0 && (e.letterSpacing = `${t.letterSpacing * n}px`); } -function pu(e, t) { +function gu(e, t) { return { ...e, ...t }; } function RU(e, t) { @@ -16540,13 +16571,13 @@ function Qse(e, t, n) { a.align && (c.style.textAlign = a.align), a.dir && (c.style.direction = a.dir); let l = !1; for (const u of a.runs) { - let d = c; - u.style && Object.keys(u.style).length && (d = o.createElement("span"), Yse(d.style, u.style, n.scale, r), d.dataset && (d.dataset.family = u.style.family ?? ""), c.appendChild(d)); - const f = u.text.split(/\r\n|\r|\n/); - for (let h = 0; h < f.length; h++) { - h > 0 && (d.appendChild(o.createElement("br")), l = !0); - const g = f[h]; - g && (d.appendChild(o.createTextNode(g)), l = !1); + let f = c; + u.style && Object.keys(u.style).length && (f = o.createElement("span"), Yse(f.style, u.style, n.scale, r), f.dataset && (f.dataset.family = u.style.family ?? ""), c.appendChild(f)); + const d = u.text.split(/\r\n|\r|\n/); + for (let h = 0; h < d.length; h++) { + h > 0 && (f.appendChild(o.createElement("br")), l = !0); + const g = d[h]; + g && (f.appendChild(o.createTextNode(g)), l = !1); } } (l || !CU(c)) && c.appendChild(o.createElement("br")), s.push(c); @@ -16609,13 +16640,13 @@ function vN(e, t, n) { } const r = e.nodeName.toUpperCase(); let o = t; - (r === "B" || r === "STRONG") && (o = pu(o, { weight: 700 })), (r === "I" || r === "EM") && (o = pu(o, { italic: !0 })), r === "U" && (o = pu(o, { decoration: ["underline"] })), r === "SUB" && (o = pu(o, { script: "sub" })), r === "SUP" && (o = pu(o, { script: "super" })); + (r === "B" || r === "STRONG") && (o = gu(o, { weight: 700 })), (r === "I" || r === "EM") && (o = gu(o, { italic: !0 })), r === "U" && (o = gu(o, { decoration: ["underline"] })), r === "SUB" && (o = gu(o, { script: "sub" })), r === "SUP" && (o = gu(o, { script: "super" })); const s = e.dataset?.family, i = s !== void 0; - if (o = pu( + if (o = gu( o, NU(e.style, n.scale, i ? () => { } : n.familyOfCss) - ), s && (o = pu(o, { family: s })), Xx(e)) { + ), s && (o = gu(o, { family: s })), Xx(e)) { const a = { runs: [] }, c = e.style?.textAlign; (c === "left" || c === "center" || c === "right" || c === "justify") && (a.align = c), e.style?.direction === "rtl" && (a.dir = "rtl"), n.paragraphs.push(a), n.current = a; for (let l = 0; l < e.childNodes.length; l++) vN(e.childNodes[l], o, n); @@ -16741,8 +16772,8 @@ function oie(e, t, n) { } return A.rangeCount > 0 ? A.getRangeAt(0) : null; }; - let c = n, l = null, u = !1, d = []; - const f = 64, h = () => { + let c = n, l = null, u = !1, f = []; + const d = 64, h = () => { const A = a(); if (!A) return null; const b = A.startContainer, E = A.endContainer; @@ -16771,24 +16802,24 @@ function oie(e, t, n) { weight: A.fontWeight || "400", style: A.fontStyle || "normal" }, E = parseFloat(A.fontSize || "16") || 16, I = /* @__PURE__ */ new Map(), O = ($) => t.familyOfCss?.($) ?? $, T = ($) => (D) => { - const _ = JSON.stringify([D, $.weight, $.style]); - return I.has(_) || I.set(_, G6(D, o, $)), I.get(_); + const B = JSON.stringify([D, $.weight, $.style]); + return I.has(B) || I.set(B, G6(D, o, $)), I.get(B); }, R = Array.from(e.querySelectorAll("span, b, strong, i, em")).map( ($) => { - const D = o.defaultView?.getComputedStyle($) ?? $.style, _ = { + const D = o.defaultView?.getComputedStyle($) ?? $.style, B = { family: D.fontFamily || b.family, weight: D.fontWeight || b.weight, style: D.fontStyle || b.style }; return { node: $, - lineHeight: wN(_.family, T(_), O).lineHeight + lineHeight: wN(B.family, T(B), O).lineHeight }; } - ), M = T(b), F = wN(b.family, M, O).lineHeight, B = zse(b.family, E, M, O); + ), M = T(b), F = wN(b.family, M, O).lineHeight, _ = zse(b.family, E, M, O); e.style.lineHeight = String(F); for (const $ of R) $.node.style.lineHeight = String($.lineHeight); - Xse(r, B); + Xse(r, _); }, m = (A, b) => { const E = b ? h() : null; Qse(r, A, { @@ -16805,7 +16836,7 @@ function oie(e, t, n) { ); l = A; const b = t.onInput(A); - b && !sC(b, A) && m(b, !0), d.push(l), d.length > f && d.shift(); + b && !sC(b, A) && m(b, !0), f.push(l), f.length > d && f.shift(); }, S = () => { u || v(); }, C = () => { @@ -16829,11 +16860,11 @@ function oie(e, t, n) { update(A) { const b = A.scale !== c.scale; if (c = A, u) return; - const E = d.findIndex((O) => sC(A.document, O)); - E >= 0 && (d = d.slice(E + 1)); + const E = f.findIndex((O) => sC(A.document, O)); + E >= 0 && (f = f.slice(E + 1)); const I = E < 0 && (!l || !sC(A.document, l)); if (I || b) { - I && (d = []), m(I ? A.document : l, i() === e); + I && (f = []), m(I ? A.document : l, i() === e); return; } Zse(r, c.body ?? EU, (O) => t.cssFontFamily(O)), p(); @@ -16994,9 +17025,9 @@ const TB = { solid: "none", dashed: "4 3" }, mv = { "toolbar-active": { default: "rgb(0 0 0 / 0.12)" }, "font-mono": { default: "ui-monospace, monospace" } }; -function pt(e, t) { +function gt(e, t) { const n = mv[e], r = String(t), o = n.keywords?.[r] ?? r, s = n.accentPercent === void 0 ? n.follows : void 0; - return `var(--epdf-${e}, ${s ? pt(s, o) : o})`; + return `var(--epdf-${e}, ${s ? gt(s, o) : o})`; } const sie = new Map( Object.entries(mv).flatMap( @@ -17005,11 +17036,11 @@ const sie = new Map( ); function iie(e, t) { const n = e === void 0 ? void 0 : sie.get(e); - return n === void 0 ? String(t) : pt(n, t); + return n === void 0 ? String(t) : gt(n, t); } -function Lm(e, t) { +function Dm(e, t) { const { follows: n, accentPercent: r } = mv[e]; - return `color-mix(in srgb, ${pt(n, t)} ${r}%, transparent)`; + return `color-mix(in srgb, ${gt(n, t)} ${r}%, transparent)`; } function yv(e) { return `var(--epdf-${e}, ${mv[e].default})`; @@ -17017,18 +17048,18 @@ function yv(e) { const BU = "4 3"; function aie(e, t) { return { - fill: pt("zoom-box-fill", e.fill ?? Lm("zoom-box-fill", t)), - stroke: pt("zoom-box-stroke", e.stroke ?? t) + fill: gt("zoom-box-fill", e.fill ?? Dm("zoom-box-fill", t)), + stroke: gt("zoom-box-stroke", e.stroke ?? t) }; } const cie = BU; function lie(e, t) { return { - fill: pt("snapshot-box-fill", e.fill ?? Lm("snapshot-box-fill", t)), - stroke: pt("snapshot-box-stroke", e.stroke ?? t) + fill: gt("snapshot-box-fill", e.fill ?? Dm("snapshot-box-fill", t)), + stroke: gt("snapshot-box-stroke", e.stroke ?? t) }; } -function zo(e, t) { +function Wo(e, t) { const n = t.toPixels({ x: e.x, y: e.y }), r = t.toPixels({ x: e.x + e.width, y: e.y + e.height }); return { left: n.x, @@ -17204,7 +17235,7 @@ function vie(e) { return e.width <= 0 || e.height <= 0 ? null : `${e.x} ${e.y} ${e.width} ${e.height}`; } function Z6(e) { - return pt("ghost-opacity", e); + return gt("ghost-opacity", e); } const jU = 1; function kie(e) { @@ -17212,42 +17243,42 @@ function kie(e) { } function Aie(e, t) { const n = e.accent ?? t, r = { - strokeWidth: pt("annotation-guide-width", e.guides.width), - strokeDasharray: pt("annotation-guide-dash", e.guides.style) + strokeWidth: gt("annotation-guide-width", e.guides.width), + strokeDasharray: gt("annotation-guide-dash", e.guides.style) }; return { outline: { - stroke: pt("annotation-outline", e.outline.color ?? n), - strokeWidth: pt("annotation-outline-width", e.outline.width), - strokeDasharray: pt("annotation-outline-dash", e.outline.style) + stroke: gt("annotation-outline", e.outline.color ?? n), + strokeWidth: gt("annotation-outline-width", e.outline.width), + strokeDasharray: gt("annotation-outline-dash", e.outline.style) }, handle: { - fill: pt("annotation-handle-fill", e.handles.fill), - stroke: pt("annotation-handle-stroke", e.handles.stroke ?? n) + fill: gt("annotation-handle-fill", e.handles.fill), + stroke: gt("annotation-handle-stroke", e.handles.stroke ?? n) }, rotationHandle: { - fill: pt( + fill: gt( "annotation-rotation-handle-fill", e.rotationHandle.fill ?? e.handles.fill ), - stroke: pt( + stroke: gt( "annotation-rotation-handle-stroke", e.rotationHandle.stroke ?? e.handles.stroke ?? n ) }, - guide: { stroke: pt("annotation-guide", e.guides.color), ...r }, + guide: { stroke: gt("annotation-guide", e.guides.color), ...r }, rotationGuide: { - stroke: pt("annotation-rotation-guide", e.guides.rotationColor ?? n), + stroke: gt("annotation-rotation-guide", e.guides.rotationColor ?? n), ...r }, marquee: { - fill: pt( + fill: gt( "annotation-marquee-fill", - e.marquee.fill ?? Lm("annotation-marquee-fill", n) + e.marquee.fill ?? Dm("annotation-marquee-fill", n) ), - stroke: pt("annotation-marquee-stroke", e.marquee.stroke ?? n) + stroke: gt("annotation-marquee-stroke", e.marquee.stroke ?? n) }, - textOutline: pt("annotation-text-outline", e.textOutline ?? n) + textOutline: gt("annotation-text-outline", e.textOutline ?? n) }; } function Sie(e, t) { @@ -17286,9 +17317,9 @@ function Sie(e, t) { from: t.toPixels(n.from) }; case "marquee": - return { kind: "marquee", box: zo(n.rect, t) }; + return { kind: "marquee", box: Wo(n.rect, t) }; case "outline": - return { kind: "outline", box: zo(n.rect, t) }; + return { kind: "outline", box: Wo(n.rect, t) }; } }); } @@ -17352,7 +17383,7 @@ function Cie(e, t) { }; } function Iie(e, t, n) { - const r = zo(e.box, t), o = e.box.width > 0 ? r.width / e.box.width : 1, s = e.css.padding * o, i = Math.max(0, r.width - 2 * s), a = Math.max(0, r.height - 2 * s), c = FU(e.css.fontSize * o), l = o * c, u = e.rot ? `translate(${i / 2}px, ${a / 2}px) rotate(${e.rot}deg) translate(${-i / 2}px, ${-a / 2}px)` : null; + const r = Wo(e.box, t), o = e.box.width > 0 ? r.width / e.box.width : 1, s = e.css.padding * o, i = Math.max(0, r.width - 2 * s), a = Math.max(0, r.height - 2 * s), c = FU(e.css.fontSize * o), l = o * c, u = e.rot ? `translate(${i / 2}px, ${a / 2}px) rotate(${e.rot}deg) translate(${-i / 2}px, ${-a / 2}px)` : null; return { scale: l, style: { @@ -17386,7 +17417,7 @@ function Oie(e, t, n) { s || Wk.set(e, s = /* @__PURE__ */ new Map()); let i = s.get(o); if (!i) { - const c = o.id ?? `renderer:${++Nie}`, l = o.interactive, u = typeof l == "function" ? (d) => l({ annotation: d, toolId: n() }) : () => !0; + const c = o.id ?? `renderer:${++Nie}`, l = o.interactive, u = typeof l == "function" ? (f) => l({ annotation: f, toolId: n() }) : () => !0; i = { id: c, count: 0, @@ -17495,8 +17526,8 @@ function Lie(e, t, n, r) { const c = await t(o.signal), l = await Promise.all(c.map(a)); if (o.signal.aborted) return; const u = {}; - c.forEach((d, f) => { - u[n(d)] = { url: l[f], box: d.rect, version: d.version }; + c.forEach((f, d) => { + u[n(f)] = { url: l[d], box: f.rect, version: f.version }; }), r(u), e.replace(s), s = []; } catch { o.abort(), i(); @@ -17519,14 +17550,14 @@ function Die(e, t) { function jie(e, t) { const n = e.fields.required ?? null; return { - focus: pt("form-focus", e.focus.color ?? t), - border: pt( + focus: gt("form-focus", e.focus.color ?? t), + border: gt( "form-field-border", - e.fields.border ?? Lm("form-field-border", t) + e.fields.border ?? Dm("form-field-border", t) ), - background: pt("form-field-background", e.fields.background), - text: pt("form-field-color", e.fields.color), - required: n === null ? null : pt("form-field-required", n) + background: gt("form-field-background", e.fields.background), + text: gt("form-field-color", e.fields.color), + required: n === null ? null : gt("form-field-required", n) }; } function zU(e, t) { @@ -17540,7 +17571,7 @@ function Fie(e) { return e.required && e.kind === "checkbox"; } function nR(e) { - const t = pt("form-field-tint", e.strength), n = iie(e.setting, e.color); + const t = gt("form-field-tint", e.strength), n = iie(e.setting, e.color); return { fill: `color-mix(in srgb, ${n} calc(${t} * 100%), transparent)`, edge: n @@ -17551,7 +17582,7 @@ function Vie(e, t) { position: "absolute", inset: "0", boxSizing: "border-box", - boxShadow: `inset 0 0 0 1px ${pt("form-field-border", e.color ?? Lm("form-field-border", t))}`, + boxShadow: `inset 0 0 0 1px ${gt("form-field-border", e.color ?? Dm("form-field-border", t))}`, pointerEvents: "none" }; } @@ -17608,7 +17639,7 @@ function qU(e, t, n, r) { padding: e.multiline ? `${2 * n}px` : `0 ${2 * n}px`, overflow: "hidden", whiteSpace: "nowrap", - color: pt( + color: gt( "form-field-placeholder", r ?? mv["form-field-placeholder"].default ), @@ -17667,41 +17698,41 @@ function Gie(e, t, n) { } function Jie(e, t, n) { let r = { focused: !1, draft: n }, o = n, s = !1, i = !1, a = null; - const c = /* @__PURE__ */ new Set(), l = (d) => { - const f = { ...r, ...d }; - f.focused === r.focused && f.draft === r.draft || (r = f, c.forEach((h) => h())); - }, u = (d) => { - a = d; - const f = (h) => { - a === d && (a = null, r.focused || l({ draft: h ? d : o })); + const c = /* @__PURE__ */ new Set(), l = (f) => { + const d = { ...r, ...f }; + d.focused === r.focused && d.draft === r.draft || (r = d, c.forEach((h) => h())); + }, u = (f) => { + a = f; + const d = (h) => { + a === f && (a = null, r.focused || l({ draft: h ? f : o })); }; e.commitDraftText(t).then( - (h) => f(h?.status === "rejected"), - () => f(!1) + (h) => d(h?.status === "rejected"), + () => d(!1) ); }; return { getState: () => r, - subscribe(d) { - return c.add(d), () => c.delete(d); + subscribe(f) { + return c.add(f), () => c.delete(f); }, - setValue(d) { - o = d, !(r.focused || a !== null && d !== a) && (a = null, l({ draft: d })); + setValue(f) { + o = f, !(r.focused || a !== null && f !== a) && (a = null, l({ draft: f })); }, focus: () => l({ focused: !0 }), - input(d) { - i = !0, l({ draft: d }), e.draftText(t, d); + input(f) { + i = !0, l({ draft: f }), e.draftText(t, f); }, - keyDown(d, f) { - return d === "Escape" ? (s = !0, !0) : d === "Enter" && !f; + keyDown(f, d) { + return f === "Escape" ? (s = !0, !0) : f === "Enter" && !d; }, blur() { - const d = r.draft; - if (s || !i && d === o) { + const f = r.draft; + if (s || !i && f === o) { s = !1, i = !1, e.discardDraftText(t), l({ focused: !1, draft: o }); return; } - i = !1, u(d), l({ focused: !1, draft: d }); + i = !1, u(f), l({ focused: !1, draft: f }); } }; } @@ -17834,7 +17865,7 @@ function tae(e) { function nae(e, t, n) { return { link: e, - box: zo(e.bounds, t), + box: Wo(e.bounds, t), href: tae(e), label: n(e) }; @@ -17865,13 +17896,13 @@ function iae(e, t) { const i = r === t.active, a = i ? t.activeColor : t.color, c = `${r.start}:${s}`; if (!uie(o)) return { key: c, hit: r, active: i, fill: a, box: null, points: Q6(_U(o, n)) }; - const l = n.toPixels(o.upperLeft), u = n.toPixels(o.lowerRight), d = { + const l = n.toPixels(o.upperLeft), u = n.toPixels(o.lowerRight), f = { left: l.x, top: l.y, width: u.x - l.x, height: u.y - l.y }; - return { key: c, hit: r, active: i, fill: a, box: d, points: null }; + return { key: c, hit: r, active: i, fill: a, box: f, points: null }; }) ); } @@ -18042,10 +18073,10 @@ function gae(e) { pressTrack(i, a, c) { if (i.button !== 0 || i.target !== i.currentTarget) return; i.preventDefault(), i.stopPropagation(), UB(i.currentTarget, i.pointerId); - const l = r = A1(i, a), { layout: u, stage: d, vertical: f } = a; + const l = r = A1(i, a), { layout: u, stage: f, vertical: d } = a; if (c === "jump") { const m = u.travel > 0 ? $B((l - u.thumbLength / 2) / u.travel) * u.maxOffset : 0; - d.scrollTo(f ? { top: m } : { left: m }), s(u.thumbLength / 2, m, u); + f.scrollTo(d ? { top: m } : { left: m }), s(u.thumbLength / 2, m, u); return; } const h = l < u.thumbPosition ? -1 : 1, g = () => { @@ -18055,7 +18086,7 @@ function gae(e) { return; } const S = h * m.client * 0.9; - d.scrollBy(f ? { top: S } : { left: S }); + f.scrollBy(d ? { top: S } : { left: S }); }; g(), n = { timer: window.setTimeout(() => { n && (n.timer = window.setInterval(g, 80)); @@ -18081,7 +18112,7 @@ function mae(e, t) { o(), e.removeEventListener("pointermove", s), e.removeEventListener("pointerup", i), e.removeEventListener("pointercancel", i), n.release(); }; } -const ng = { +const rg = { /** A unit (`NormalizedUnit.key`) at one variant. */ unit: (e, t) => `u:${e}@${t}`, /** A group in its collapsed form. */ @@ -18104,10 +18135,10 @@ function yae() { metrics(t, n, r) { const o = e[t]; return { - unit: (s, i) => o.get(ng.unit(s, i)), - groupCollapsed: (s) => o.get(ng.group(s)), - groupTrigger: (s) => o.get(ng.groupTrigger(s)), - overflowTrigger: o.get(ng.overflowTrigger) ?? 32, + unit: (s, i) => o.get(rg.unit(s, i)), + groupCollapsed: (s) => o.get(rg.group(s)), + groupTrigger: (s) => o.get(rg.groupTrigger(s)), + overflowTrigger: o.get(rg.overflowTrigger) ?? 32, gap: n, separator: r + n }; @@ -18187,23 +18218,23 @@ function Aae(e, t) { const n = t.direction ?? (() => r2(e)), r = t.loop ?? !0; let o = null; const s = (l) => { - const d = o !== null && l.includes(o) && !fg(o) ? o : l.find((f) => !fg(f)) ?? null; - for (const f of l) { - const h = f === d ? 0 : -1; - f.tabIndex !== h && (f.tabIndex = h); + const f = o !== null && l.includes(o) && !hg(o) ? o : l.find((d) => !hg(d)) ?? null; + for (const d of l) { + const h = d === f ? 0 : -1; + d.tabIndex !== h && (d.tabIndex = h); } }, i = () => s(t.stops()), a = (l) => { if (l.defaultPrevented || l.altKey || l.ctrlKey || l.metaKey || l.shiftKey) return; - const u = t.stops(), d = l.target, f = u.indexOf(d); - if (f < 0 || pse(d, l.key)) return; + const u = t.stops(), f = l.target, d = u.indexOf(f); + if (d < 0 || pse(f, l.key)) return; const h = QU(l.key, t.orientation, n()); if (!h) return; const g = AN( h, - f, + d, u.length, - (m) => !fg(u[m]), + (m) => !hg(u[m]), r ); if (g < 0) return; @@ -18211,8 +18242,8 @@ function Aae(e, t) { const p = u[g]; o = p, s(u), p.focus(); }, c = (l) => { - const u = t.stops(), d = l.target; - u.includes(d) && (o = d, s(u)); + const u = t.stops(), f = l.target; + u.includes(f) && (o = f, s(u)); }; return e.addEventListener("keydown", a), e.addEventListener("focusin", c), i(), { refresh: i, @@ -18252,53 +18283,53 @@ function cR(e, t) { const { trigger: n, close: r } = t, o = t.items ?? (() => [...e.querySelectorAll(Cae)]); let s = "", i = Number.NEGATIVE_INFINITY; const a = () => { - const f = o(); - for (const h of f) h.tabIndex !== -1 && (h.tabIndex = -1); - return f; - }, c = (f) => (h) => !fg(f[h]), l = (f) => { - if (f.defaultPrevented || f.altKey || f.ctrlKey || f.metaKey) return; - const h = a(), g = h.indexOf(f.target); - if (f.key === "Escape") { - f.preventDefault(), f.stopPropagation(), r(), n?.focus(); + const d = o(); + for (const h of d) h.tabIndex !== -1 && (h.tabIndex = -1); + return d; + }, c = (d) => (h) => !hg(d[h]), l = (d) => { + if (d.defaultPrevented || d.altKey || d.ctrlKey || d.metaKey) return; + const h = a(), g = h.indexOf(d.target); + if (d.key === "Escape") { + d.preventDefault(), d.stopPropagation(), r(), n?.focus(); return; } - if (f.key === "Tab") { + if (d.key === "Tab") { r(), n?.focus(); return; } - if ((f.key === "Enter" || f.key === " " && s === "") && g >= 0) { - f.preventDefault(), fg(h[g]) || h[g].click(); + if ((d.key === "Enter" || d.key === " " && s === "") && g >= 0) { + d.preventDefault(), hg(h[g]) || h[g].click(); return; } - const p = f.shiftKey ? null : QU(f.key, "vertical", "ltr"); + const p = d.shiftKey ? null : QU(d.key, "vertical", "ltr"); if (p) { - f.preventDefault(); + d.preventDefault(); const m = AN(p, g, h.length, c(h), !0); m >= 0 && h[m].focus(); return; } - if (f.key.length === 1) { - f.timeStamp - i > Eae && (s = ""), s += f.key, i = f.timeStamp; + if (d.key.length === 1) { + d.timeStamp - i > Eae && (s = ""), s += d.key, i = d.timeStamp; const m = h.map(Nae), v = Iae(m, g, s, c(h)); - v >= 0 && (f.preventDefault(), h[v].focus()); + v >= 0 && (d.preventDefault(), h[v].focus()); } - }, u = (f) => { - f.key === " " && !f.defaultPrevented && f.preventDefault(); + }, u = (d) => { + d.key === " " && !d.defaultPrevented && d.preventDefault(); }; e.addEventListener("keydown", l), e.addEventListener("keyup", u), n?.setAttribute("aria-expanded", "true"); - const d = t.initialFocus ?? "first"; - if (d !== "none") { - const f = a(), h = AN(d, -1, f.length, c(f), !1); - h >= 0 && f[h].focus(); + const f = t.initialFocus ?? "first"; + if (f !== "none") { + const d = a(), h = AN(f, -1, d.length, c(d), !1); + h >= 0 && d[h].focus(); } return () => { e.removeEventListener("keydown", l), e.removeEventListener("keyup", u), n?.setAttribute("aria-expanded", "false"); - const f = Gr(e.ownerDocument); - n && (f === null || e.contains(f)) && n.focus(); + const d = Jr(e.ownerDocument); + n && (d === null || e.contains(d)) && n.focus(); }; } function XU(e, t) { - if (dg(e)) return; + if (fg(e)) return; if (t) { t.focus(); return; @@ -18312,35 +18343,35 @@ function XU(e, t) { } const uy = []; function Oae(e, t = {}) { - const n = e.ownerDocument, r = Gr(n), o = () => uy[uy.length - 1] === e; + const n = e.ownerDocument, r = Jr(n), o = () => uy[uy.length - 1] === e; let s = null, i = !1; const a = (u) => { - const d = bN(e), f = u === "first" ? d[0] : d[d.length - 1]; - if (f) { - f.focus(); + const f = bN(e), d = u === "first" ? f[0] : f[f.length - 1]; + if (d) { + d.focus(); return; } e.hasAttribute("tabindex") || (e.tabIndex = -1), e.focus(); }, c = (u) => { if (u.key !== "Tab" || u.defaultPrevented || !o()) return; - const d = bN(e), f = Gr(n), h = d[0], g = d[d.length - 1], p = f === e || f === h || !h, m = f === g || !g; + const f = bN(e), d = Jr(n), h = f[0], g = f[f.length - 1], p = d === e || d === h || !h, m = d === g || !g; (u.shiftKey ? p : m) && (u.preventDefault(), a(u.shiftKey ? "last" : "first")); }, l = (u) => { if (!o()) return; - const d = u.composedPath(); - if (d.includes(e)) { - s = d[0]; + const f = u.composedPath(); + if (f.includes(e)) { + s = f[0]; return; } queueMicrotask(() => { - i || !o() || dg(e) || (s?.isConnected && e.contains(s) ? s.focus() : a("first")); + i || !o() || fg(e) || (s?.isConnected && e.contains(s) ? s.focus() : a("first")); }); }; - return uy.push(e), e.addEventListener("keydown", c), n.addEventListener("focusin", l, !0), XU(e, t.initialFocus), s === null && dg(e) && (s = Gr(n)), () => { + return uy.push(e), e.addEventListener("keydown", c), n.addEventListener("focusin", l, !0), XU(e, t.initialFocus), s === null && fg(e) && (s = Jr(n)), () => { i = !0; const u = uy.lastIndexOf(e); if (u >= 0 && uy.splice(u, 1), e.removeEventListener("keydown", c), n.removeEventListener("focusin", l, !0), t.returnFocus === !1 || !r?.isConnected) return; - (Gr(n) === null || dg(e)) && r.focus(); + (Jr(n) === null || fg(e)) && r.focus(); }; } const Pae = (e) => e.tagName === "INPUT" || e.tagName === "TEXTAREA", Rae = /* @__PURE__ */ new Set(["ArrowUp", "ArrowLeft"]), Tae = /* @__PURE__ */ new Set(["ArrowDown", "ArrowRight"]), Mae = (e) => e.tabIndex >= 0 ? e : e.querySelector("input, textarea, select, button") ?? e, Bae = "input, textarea, select, button, a[href], [tabindex], [contenteditable]", _ae = (e) => typeof e.checkVisibility != "function" || e.checkVisibility({ checkVisibilityCSS: !0, visibilityProperty: !0 }), Lae = (e) => { @@ -18357,15 +18388,15 @@ function Fae(e) { if (!n.isTrusted || n.detail === 0) return; const r = e.hasAttribute("tabindex") ? e : e.querySelector("input, textarea, select, button"); if (!r || !r.contains(n.target)) return; - const o = Gr(e.ownerDocument); + const o = Jr(e.ownerDocument); o !== r && (o === null || jae(e, o)) && r.focus({ preventScroll: !0 }); }; return e.addEventListener("click", t), () => e.removeEventListener("click", t); } function Vae(e, t, n, r = {}) { const o = () => r.focusable === !1 ? [] : r.custom ? Dae(e) : [Mae(e)], s = (c) => { - const l = Gr(e.ownerDocument); - return c.focus({ preventScroll: !0 }), r.custom ? dg(e) || Gr(e.ownerDocument) !== l : !0; + const l = Jr(e.ownerDocument); + return c.focus({ preventScroll: !0 }), r.custom ? fg(e) || Jr(e.ownerDocument) !== l : !0; }, i = t.attachFocusTarget(n, { takesCursor: () => o().length > 0, focus: ({ select: c }) => { @@ -18390,7 +18421,7 @@ function $ae(e, t) { return t?.find((n) => n.for(e)) ?? null; } function Uae(e, t) { - const n = e.rotation ?? 0, r = kS({ box: e.box, rotation: n, scale: 1 }, t), o = zo(e.rect, t), s = { position: "absolute", left: "0", top: "0", transformOrigin: "0 0" }; + const n = e.rotation ?? 0, r = kS({ box: e.box, rotation: n, scale: 1 }, t), o = Wo(e.rect, t), s = { position: "absolute", left: "0", top: "0", transformOrigin: "0 0" }; return { frame: SU(r, !0), frameStyle: { @@ -18470,10 +18501,10 @@ function Jae(e) { icon: "download", shortcut: "Mod+S", categories: ["document"], - allowed: (t) => t.tryGet(It)?.canDownload() ?? !0, + allowed: (t) => t.tryGet(Pt)?.canDownload() ?? !0, notAllowedKey: "commands.notAllowed.doc-download", run: async (t) => { - const n = t.get(It), r = t.documentId ?? void 0, o = await n.download(r, { signal: t.signal }); + const n = t.get(Pt), r = t.documentId ?? void 0, o = await n.download(r, { signal: t.signal }); e.saveFile(o, Yae(n.get(r)?.name), "application/pdf"); }, enabled: (t) => t.documentId !== null @@ -18485,12 +18516,12 @@ function Jae(e) { icon: "print", shortcut: "Mod+P", categories: ["document"], - allowed: (t) => t.tryGet(It)?.canPrint() ?? !0, + allowed: (t) => t.tryGet(Pt)?.canPrint() ?? !0, notAllowedKey: "commands.notAllowed.doc-print", // The kernel prints the document's pages, and runs the document's own // print actions around the dialog when the actions plugin is there. run: async (t) => { - await t.get(It).print(t.documentId ?? void 0, { signal: t.signal }); + await t.get(Pt).print(t.documentId ?? void 0, { signal: t.signal }); }, enabled: (t) => t.documentId !== null } @@ -18499,7 +18530,7 @@ function Jae(e) { function Yae(e) { return e ? /\.pdf$/i.test(e) ? e : `${e}.pdf` : "document.pdf"; } -const vt = sn("annotation", { +const vt = an("annotation", { hint: "add annotationPlugin() from '@embedpdf/plugin-annotation' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -18544,7 +18575,7 @@ const vt = sn("annotation", { editing: e.text.getEditing() }), empty: { status: "loading", selected: [], hovered: null, editing: null } -}), Vd = "stamp", Xae = 0.5, Zae = (e) => e === !0 ? { opacity: Xae } : e, ece = [ +}), Ud = "stamp", Xae = 0.5, Zae = (e) => e === !0 ? { opacity: Xae } : e, ece = [ "ref", "page", "index", @@ -18578,7 +18609,7 @@ const vt = sn("annotation", { "fontSize", "fontColor", "textAlign" -], tce = [...SN, "layout"], Jn = (e) => Pm[e].filter( +], tce = [...SN, "layout"], Jn = (e) => Rm[e].filter( (t) => !ece.includes(t) ), nce = { square: Jn("square"), @@ -18610,7 +18641,7 @@ const vt = sn("annotation", { // The bare box every other widget family ingests as (a signature field's // widget among them): box styling only, no text to style. "widget-box": qk -}, rce = /* @__PURE__ */ new Set(["calibrate"]), Bi = ["annotation-draw", "annotation-edit"], gu = "#e5484d", ah = ["text-select", "annotation-edit"], e9 = (e) => e.has("annotation-draw") || e.has("text-select") ? "draw" : "tap", oce = [ +}, rce = /* @__PURE__ */ new Set(["calibrate"]), Bi = ["annotation-draw", "annotation-edit"], mu = "#e5484d", lh = ["text-select", "annotation-edit"], e9 = (e) => e.has("annotation-draw") || e.has("text-select") ? "draw" : "tap", oce = [ // shapes / lines / ink / free text — the `annotation-draw` gesture. // Draw tools carry click-create defaults (a bare click places a // default-size annotation). Their ghost is off: they are drag-first, so the @@ -18620,7 +18651,7 @@ const vt = sn("annotation", { subtype: "square", cursor: "crosshair", enables: Bi, - defaults: { color: gu, strokeWidth: 6 }, + defaults: { color: mu, strokeWidth: 6 }, // A click shows 80 wide and 60 tall as the page is seen, turned or not. clickCreate: { width: 80, height: 60 }, upright: !0 @@ -18630,7 +18661,7 @@ const vt = sn("annotation", { subtype: "circle", cursor: "crosshair", enables: Bi, - defaults: { color: gu, strokeWidth: 6 }, + defaults: { color: mu, strokeWidth: 6 }, // A click shows 80 wide and 60 tall as the page is seen, turned or not. clickCreate: { width: 80, height: 60 }, upright: !0 @@ -18640,7 +18671,7 @@ const vt = sn("annotation", { subtype: "line", cursor: "crosshair", enables: Bi, - defaults: { color: gu, strokeWidth: 6 }, + defaults: { color: mu, strokeWidth: 6 }, // A click lays it centred on the point, pointing right as the page shows. clickCreate: { length: 80 }, upright: !0 @@ -18670,14 +18701,14 @@ const vt = sn("annotation", { subtype: "polygon", cursor: "crosshair", enables: Bi, - defaults: { color: gu, strokeWidth: 6 } + defaults: { color: mu, strokeWidth: 6 } }, { id: "polyline", subtype: "polyline", cursor: "crosshair", enables: Bi, - defaults: { color: gu, strokeWidth: 6 } + defaults: { color: mu, strokeWidth: 6 } }, { id: "perimeter", @@ -18715,7 +18746,7 @@ const vt = sn("annotation", { subtype: "free-text", cursor: "crosshair", enables: Bi, - defaults: { color: gu, strokeWidth: 2, fontColor: "#ef4444" }, + defaults: { color: mu, strokeWidth: 2, fontColor: "#ef4444" }, upright: !0, // Top-left anchored: the box hangs where you'll type (the kind's reading // feel); shapes default to `center`. Anchoring is explicit policy data. @@ -18731,7 +18762,7 @@ const vt = sn("annotation", { subtype: "free-text-callout", cursor: "crosshair", enables: Bi, - defaults: { color: gu, strokeWidth: 6, lineEnding: "open-arrow" }, + defaults: { color: mu, strokeWidth: 6, lineEnding: "open-arrow" }, upright: !0 }, // text markup — the `text-select` gesture (inert without a selection plugin). @@ -18742,7 +18773,7 @@ const vt = sn("annotation", { id: "highlight", subtype: "highlight", cursor: "default", - enables: ah, + enables: lh, defaults: { color: "#ffe16a", blendMode: "multiply" }, selection: { kind: "markup" } }, @@ -18768,7 +18799,7 @@ const vt = sn("annotation", { id: "underline", subtype: "underline", cursor: "default", - enables: ah, + enables: lh, defaults: { color: "#ef4444" }, selection: { kind: "markup" } }, @@ -18776,7 +18807,7 @@ const vt = sn("annotation", { id: "strikeout", subtype: "strikeout", cursor: "default", - enables: ah, + enables: lh, defaults: { color: "#ef4444" }, selection: { kind: "markup" } }, @@ -18784,7 +18815,7 @@ const vt = sn("annotation", { id: "squiggly", subtype: "squiggly", cursor: "default", - enables: ah, + enables: lh, defaults: { color: "#ef4444" }, selection: { kind: "markup" } }, @@ -18796,7 +18827,7 @@ const vt = sn("annotation", { fieldsKind: "caret", preset: "caret", cursor: "default", - enables: ah, + enables: lh, defaults: { color: "#ef4444" }, selection: { kind: "text-edit", operation: "insert" } }, @@ -18805,7 +18836,7 @@ const vt = sn("annotation", { subtype: "strikeout", fieldsKind: "strikeout", cursor: "default", - enables: ah, + enables: lh, defaults: { color: "#ef4444" }, selection: { kind: "text-edit", operation: "replace" } }, @@ -18814,7 +18845,7 @@ const vt = sn("annotation", { // embedder can pass fixed bytes instead). `accept` narrows the dialog to // what the engine's stamp sniffer takes anyway. { - id: Vd, + id: Ud, subtype: "stamp", cursor: "copy", enables: ["annotation-place", "annotation-edit"], @@ -18988,9 +19019,9 @@ function uce() { } ]; } -const rg = sn("history", { +const og = an("history", { hint: "add historyPlugin() from '@embedpdf/plugin-history' to your plugins list" -}), dce = { limit: 100 }, S1 = (e) => e.tryGet(rg); +}), dce = { limit: 100 }, S1 = (e) => e.tryGet(og); function fce() { return [ { @@ -19015,7 +19046,7 @@ function fce() { } ]; } -const uR = sn("feedback"), yr = sn("interaction", { +const uR = an("feedback"), yr = an("interaction", { hint: "add interactionPlugin() from '@embedpdf/plugin-interaction' to your plugins list" }), hce = { defaultTool: "pointer", tools: [] }, Fy = (e) => e.tryGet(yr), KB = /* @__PURE__ */ new WeakMap(), pce = (e) => { let t = KB.get(e); @@ -19078,7 +19109,7 @@ function bce(e) { debug: e.debug ?? !1 }; } -const Wo = sn("render", { +const qo = an("render", { hint: "add renderPlugin() from '@embedpdf/plugin-render' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -19102,14 +19133,14 @@ const Wo = sn("render", { slowAfterMs: 400, debug: !1, snapshot: { scale: 2, box: { fill: null, stroke: null } } -}, hg = "snapshot", dy = (e) => e.tryGet(Wo)?.getSnapshot() ?? null; +}, pg = "snapshot", dy = (e) => e.tryGet(qo)?.getSnapshot() ?? null; function kce(e) { return [ // The snapshot tool, for a user who may take snapshots. { - ...Xw(hg), + ...Xw(pg), id: "tool:snapshot", - allowed: (t) => t.tryGet(Wo)?.canSnapshot() ?? !0, + allowed: (t) => t.tryGet(qo)?.canSnapshot() ?? !0, notAllowedKey: "commands.notAllowed.doc-content-copy" }, // ── the snapshot the snapshot tool holds ── @@ -19136,7 +19167,7 @@ function kce(e) { run: async (t) => { const n = dy(t); if (!n) return; - const r = t.get(It), o = t.documentId ?? void 0, s = await (await n.image).blob(), i = r.listPages(o).findIndex((a) => a.ref.objectNumber === n.page.objectNumber) + 1; + const r = t.get(Pt), o = t.documentId ?? void 0, s = await (await n.image).blob(), i = r.listPages(o).findIndex((a) => a.ref.objectNumber === n.page.objectNumber) + 1; e.saveFile(s, Ace(r.get(o)?.name, i), "image/png"); }, enabled: (t) => dy(t) !== null @@ -19147,7 +19178,7 @@ function kce(e) { label: "Clear snapshot", shortcut: "Escape", categories: ["snapshot"], - run: (t) => t.get(Wo).clearSnapshot(), + run: (t) => t.get(qo).clearSnapshot(), enabled: (t) => dy(t) !== null } ]; @@ -19155,7 +19186,7 @@ function kce(e) { function Ace(e, t) { return `${(e ?? "document").replace(/\.pdf$/i, "")} p${t}.png`; } -const _r = sn("selection", { +const _r = an("selection", { hint: "add selectionPlugin() from '@embedpdf/plugin-selection' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -19188,7 +19219,7 @@ function Sce(e) { } ]; } -const Zt = sn("stage", { +const tn = an("stage", { hint: "add stagePlugin() from '@embedpdf/plugin-stage' to your plugins list" }); function r9(e) { @@ -19239,18 +19270,18 @@ function s9(e, t) { function zB(e, t) { return Math.round(e * t) / t; } -function pg(e, t) { +function gg(e, t) { return o9(t) ? { width: e.height, height: e.width } : { width: e.width, height: e.height }; } function Ice(e, t) { return Math.max(1, Math.round(t * e.height / e.width)); } function Nce(e) { - const { pageSize: t, rotation: n, scale: r, dpr: o } = e, s = Math.max(1, Math.round(t.width * r * o)), i = Ice(t, s), a = s / t.width, c = { width: s / o, height: i / o }, l = c.width / t.width, u = e.baseScale ?? r, d = u > 0 ? l / u : 1, f = pg(c, n), h = [l, 0, 0, l, 0, 0], g = xS(l, c.width, c.height, n), p = qB(g), m = (x) => ci(h, x), v = qB(h), S = (x) => ci(v, x), C = (x) => ci(g, x), k = (x) => ci(p, x), N = (x) => SS(g, x), w = (x) => SS(p, x), y = Oce(g); + const { pageSize: t, rotation: n, scale: r, dpr: o } = e, s = Math.max(1, Math.round(t.width * r * o)), i = Ice(t, s), a = s / t.width, c = { width: s / o, height: i / o }, l = c.width / t.width, u = e.baseScale ?? r, f = u > 0 ? l / u : 1, d = gg(c, n), h = [l, 0, 0, l, 0, 0], g = xS(l, c.width, c.height, n), p = qB(g), m = (x) => ci(h, x), v = qB(h), S = (x) => ci(v, x), C = (x) => ci(g, x), k = (x) => ci(p, x), N = (x) => SS(g, x), w = (x) => SS(p, x), y = Oce(g); return { rotation: n, - viewWidth: f.width, - viewHeight: f.height, + viewWidth: d.width, + viewHeight: d.height, contentWidth: c.width, contentHeight: c.height, deviceWidth: s, @@ -19258,7 +19289,7 @@ function Nce(e) { renderScale: a, viewScale: l, baseScale: u, - zoom: d, + zoom: f, toPixels: m, fromPixels: S, pageToView: C, @@ -19269,21 +19300,21 @@ function Nce(e) { }; } function WB(e, t) { - const [n, r, o, s, i, a] = e, [c, l, u, d, f, h] = t; + const [n, r, o, s, i, a] = e, [c, l, u, f, d, h] = t; return [ n * c + o * l, r * c + s * l, - n * u + o * d, - r * u + s * d, - n * f + o * h + i, - r * f + s * h + a + n * u + o * f, + r * u + s * f, + n * d + o * h + i, + r * d + s * h + a ]; } function qB(e) { const [t, n, r, o, s, i] = e, a = t * o - n * r; if (a === 0) throw new Error("Mat2D.invert: non-invertible matrix (det = 0)"); - const c = o / a, l = -n / a, u = -r / a, d = t / a; - return [c, l, u, d, -(c * s + u * i), -(l * s + d * i)]; + const c = o / a, l = -n / a, u = -r / a, f = t / a; + return [c, l, u, f, -(c * s + u * i), -(l * s + f * i)]; } function ci(e, t) { const [n, r, o, s, i, a] = e; @@ -19341,19 +19372,19 @@ function fR(e) { return { x: r, y: o, width: Math.max(...t) - r, height: Math.max(...n) - o }; } function EN(e) { - const t = e.userUnit ?? 1, n = pg(e.size, e.rotation ?? 0); + const t = e.userUnit ?? 1, n = gg(e.size, e.rotation ?? 0); return t === 1 ? n : { width: n.width * t, height: n.height * t }; } -const $f = (e) => typeof e == "number" ? { top: e, right: e, bottom: e, left: e } : e, P0 = 0.05, s2 = 64, Mce = { min: P0, max: s2 }, Bce = (e, t) => { - const n = Uo(t, P0, s2); - return { min: Uo(e, P0, n), max: n }; -}, ho = (e, t = Mce) => Uo(e, t.min, t.max), dr = { +const Kf = (e) => typeof e == "number" ? { top: e, right: e, bottom: e, left: e } : e, P0 = 0.05, s2 = 64, Mce = { min: P0, max: s2 }, Bce = (e, t) => { + const n = Ko(t, P0, s2); + return { min: Ko(e, P0, n), max: n }; +}, po = (e, t = Mce) => Ko(e, t.min, t.max), fr = { Automatic: "automatic", FitPage: "fit-page", FitWidth: "fit-width", /** Fit the whole scene (every page) in view — the construction overview. */ FitAll: "fit-all" -}, Uo = (e, t, n) => Math.min(Math.max(e, t), n), Vy = (e, t) => ({ +}, Ko = (e, t, n) => Math.min(Math.max(e, t), n), Vy = (e, t) => ({ x: (t.x - e.x) * e.zoom, y: (t.y - e.y) * e.zoom }), i2 = (e, t) => ({ @@ -19365,7 +19396,7 @@ const $f = (e) => typeof e == "number" ? { top: e, right: e, bottom: e, left: e width: t.width / e.zoom, height: t.height / e.zoom }), Lce = (e, t, n, r) => { - const o = ho(e.zoom * n, r); + const o = po(e.zoom * n, r); return { x: e.x + t.x / e.zoom - t.x / o, y: e.y + t.y / e.zoom - t.y / o, @@ -19381,9 +19412,9 @@ const $f = (e) => typeof e == "number" ? { top: e, right: e, bottom: e, left: e fits: t * r <= n - o - s }), hi = (e, t, n, r) => { if (!r.bounded) return e; - const o = $f(r.padding), s = r.fitAlign ?? { x: "center", y: "center" }, i = (c, l, u, d, f, h, g) => { - const p = a9(l, u, d, e.zoom, h, g); - return p.fits ? f === "start" ? p.near : f === "end" ? p.far : (p.near + p.far) / 2 : Uo(c, p.near, p.far); + const o = Kf(r.padding), s = r.fitAlign ?? { x: "center", y: "center" }, i = (c, l, u, f, d, h, g) => { + const p = a9(l, u, f, e.zoom, h, g); + return p.fits ? d === "start" ? p.near : d === "end" ? p.far : (p.near + p.far) / 2 : Ko(c, p.near, p.far); }, a = r.direction === "rtl" && s.x !== "center" ? s.x === "start" ? "end" : "start" : s.x; return { zoom: e.zoom, @@ -19391,9 +19422,9 @@ const $f = (e) => typeof e == "number" ? { top: e, right: e, bottom: e, left: e y: i(e.y, t.y, t.height, n.height, s.y, o.top, o.bottom) }; }, Dce = (e, t, n, r) => { - const o = $f(r), s = (c, l, u, d, f, h) => { - const g = Math.min(l - f / e.zoom, c), m = (Math.max(l + u + h / e.zoom, c + d / e.zoom) - g) * e.zoom; - return { offset: (c - g) * e.zoom, total: m, scrollable: m > d + 0.5 }; + const o = Kf(r), s = (c, l, u, f, d, h) => { + const g = Math.min(l - d / e.zoom, c), m = (Math.max(l + u + h / e.zoom, c + f / e.zoom) - g) * e.zoom; + return { offset: (c - g) * e.zoom, total: m, scrollable: m > f + 0.5 }; }, i = s(e.x, t.x, t.width, n.width, o.left, o.right), a = s(e.y, t.y, t.height, n.height, o.top, o.bottom); return { scrollLeft: i.offset, @@ -19406,10 +19437,10 @@ const $f = (e) => typeof e == "number" ? { top: e, right: e, bottom: e, left: e scrollableY: a.scrollable }; }, jce = (e, t, n, r, o) => { - const s = $f(r), i = (a, c, l, u, d, f, h) => { + const s = Kf(r), i = (a, c, l, u, f, d, h) => { if (a === void 0) return c; - const g = Math.min(l - f / e.zoom, c), p = Math.max(l + u + h / e.zoom, c + d / e.zoom), m = Math.max(0, (p - g) * e.zoom - d); - return g + Uo(a, 0, m) / e.zoom; + const g = Math.min(l - d / e.zoom, c), p = Math.max(l + u + h / e.zoom, c + f / e.zoom), m = Math.max(0, (p - g) * e.zoom - f); + return g + Ko(a, 0, m) / e.zoom; }; return { zoom: e.zoom, @@ -19418,11 +19449,11 @@ const $f = (e) => typeof e == "number" ? { top: e, right: e, bottom: e, left: e }; }; function Fce(e, t, n, r = 0, o = { x: "start", y: "start" }, s = "ltr") { - const i = $f(r), a = (l, u, d, f, h, g) => { + const i = Kf(r), a = (l, u, f, d, h, g) => { if (l === "start") return u - h / n; - if (l === "end") return u + d - (f - g) / n; - const p = l === "center" ? 0.5 : Uo(l, 0, 1); - return u + d / 2 - (f * p + (h - g) / 2) / n; + if (l === "end") return u + f - (d - g) / n; + const p = l === "center" ? 0.5 : Ko(l, 0, 1); + return u + f / 2 - (d * p + (h - g) / 2) / n; }, c = s === "rtl" && o.x === "start" ? "end" : s === "rtl" && o.x === "end" ? "start" : o.x; return { zoom: n, @@ -19431,9 +19462,9 @@ function Fce(e, t, n, r = 0, o = { x: "start", y: "start" }, s = "ltr") { }; } function Vce(e, t, n, r = 0) { - const o = $f(r), s = (i, a, c, l, u, d) => { - const f = a + c - (l - d) / e.zoom, h = a - u / e.zoom; - return f > h ? h : Uo(i, f, h); + const o = Kf(r), s = (i, a, c, l, u, f) => { + const d = a + c - (l - f) / e.zoom, h = a - u / e.zoom; + return d > h ? h : Ko(i, d, h); }; return { zoom: e.zoom, @@ -19442,19 +19473,19 @@ function Vce(e, t, n, r = 0) { }; } function ES(e, t, n, r = 0, o) { - if ("level" in e) return ho(e.level, o); - if ("pageWidth" in e) return ho(e.pageWidth / t.width, o); - if ("pageHeight" in e) return ho(e.pageHeight / t.height, o); - const s = $f(r), i = Math.max(1, n.width - s.left - s.right) / t.width, a = Math.max(1, n.height - s.top - s.bottom) / t.height; + if ("level" in e) return po(e.level, o); + if ("pageWidth" in e) return po(e.pageWidth / t.width, o); + if ("pageHeight" in e) return po(e.pageHeight / t.height, o); + const s = Kf(r), i = Math.max(1, n.width - s.left - s.right) / t.width, a = Math.max(1, n.height - s.top - s.bottom) / t.height; switch (e.mode) { - case dr.FitWidth: - return ho(i, o); - case dr.FitPage: - case dr.FitAll: - return ho(Math.min(i, a), o); - case dr.Automatic: + case fr.FitWidth: + return po(i, o); + case fr.FitPage: + case fr.FitAll: + return po(Math.min(i, a), o); + case fr.Automatic: default: - return ho(Math.min(i, 1), o); + return po(Math.min(i, 1), o); } } function a2(e, t) { @@ -19509,7 +19540,7 @@ function u9(e, t) { const r = e.map((o) => o.pageIndexes[0]); return (o) => { const s = n[o] ?? -1; - return s >= 0 ? s : Uo(R0(r, o) - 1, 0, e.length - 1); + return s >= 0 ? s : Ko(R0(r, o) - 1, 0, e.length - 1); }; } const YB = 2; @@ -19523,26 +19554,26 @@ function d9(e, t, n) { } function f9(e, t, n, r, o, s) { let i = 0; - for (let d = 0; d < t.length; d++) - i = Math.max(i, EN(e[t[d]]).height * n); + for (let f = 0; f < t.length; f++) + i = Math.max(i, EN(e[t[f]]).height * n); const a = []; let c = 0; - for (let d = 0; d < t.length; d++) { - const f = EN(e[t[d]]), h = f.width * n, g = f.height * n; + for (let f = 0; f < t.length; f++) { + const d = EN(e[t[f]]), h = d.width * n, g = d.height * n; a.push({ - pageIndex: t[d], + pageIndex: t[f], lx: c + o.left, ly: o.top + (i - g) / 2, // page centers within the inner band w: h, h: g, - rotation: e[t[d]].rotation ?? 0, - userUnit: e[t[d]].userUnit ?? 1 + rotation: e[t[f]].rotation ?? 0, + userUnit: e[t[f]].userUnit ?? 1 }), c += o.left + h + o.right + r * n; } const l = Math.max(0, c - r * n), u = o.top + i + o.bottom; if (s === "rtl") - for (const d of a) d.lx = l - d.lx - d.w + (o.left - o.right); + for (const f of a) f.lx = l - f.lx - f.w + (o.left - o.right); return { local: a, width: l, height: u }; } function h9(e, t, n) { @@ -19561,10 +19592,10 @@ function h9(e, t, n) { } const p9 = (e, t, n, r = 1) => (n === "uniform" && e > 0 ? t / e : 1) * r; function Uce(e, t, n = {}) { - const r = n.gap ?? 16, o = (n.axis ?? "y") === "y", s = n.align ?? "center", i = n.sizing ?? "intrinsic", a = n.direction ?? "ltr", c = !o && a === "rtl", l = n.pageFrame ?? dR, u = t.map((A) => d9(e, A, r)), d = (A) => o ? A.width : A.height, f = u.reduce((A, b) => Math.max(A, d(b)), 0), h = new Array(t.length), g = new Array(t.length), p = new Array(t.length); + const r = n.gap ?? 16, o = (n.axis ?? "y") === "y", s = n.align ?? "center", i = n.sizing ?? "intrinsic", a = n.direction ?? "ltr", c = !o && a === "rtl", l = n.pageFrame ?? dR, u = t.map((A) => d9(e, A, r)), f = (A) => o ? A.width : A.height, d = u.reduce((A, b) => Math.max(A, f(b)), 0), h = new Array(t.length), g = new Array(t.length), p = new Array(t.length); let m = 0, v = 0, S = 0, C = 0; for (let A = 0; A < t.length; A++) { - const b = p9(d(u[A]), f, i, n.viewUnitsPerPoint), E = f9(e, t[A], b, r, l, a), { width: I, height: O } = E; + const b = p9(f(u[A]), d, i, n.viewUnitsPerPoint), E = f9(e, t[A], b, r, l, a), { width: I, height: O } = E; p[A] = b, g[A] = E.local; const T = { index: A, @@ -19601,23 +19632,23 @@ function Uce(e, t, n = {}) { return T; }, nearestItem(A) { - const b = Uo(R0(y, o ? A.y : A.x) - 1, 0, h.length - 1); + const b = Ko(R0(y, o ? A.y : A.x) - 1, 0, h.length - 1); return h[w(b)]; }, itemOfPage: u9(h, e.length) }; } function Kce(e, t, n = {}) { - const r = n.gap ?? 48, o = t.length, s = n.sizing ?? "intrinsic", i = n.direction ?? "ltr", a = n.pageFrame ?? dR, c = t.map((b) => d9(e, b, r)), l = c.reduce((b, E) => Math.max(b, E.width), 0), u = new Array(o), d = new Array(o), f = new Array(o); + const r = n.gap ?? 48, o = t.length, s = n.sizing ?? "intrinsic", i = n.direction ?? "ltr", a = n.pageFrame ?? dR, c = t.map((b) => d9(e, b, r)), l = c.reduce((b, E) => Math.max(b, E.width), 0), u = new Array(o), f = new Array(o), d = new Array(o); let h = 1, g = 1; for (let b = 0; b < o; b++) { const E = p9(c[b].width, l, s, n.viewUnitsPerPoint), I = f9(e, t[b], E, r, a, i); - f[b] = E, u[b] = I.local, d[b] = { width: I.width, height: I.height }, h = Math.max(h, d[b].width), g = Math.max(g, d[b].height); + d[b] = E, u[b] = I.local, f[b] = { width: I.width, height: I.height }, h = Math.max(h, f[b].width), g = Math.max(g, f[b].height); } const p = n.lineWidth !== void 0 ? Math.floor((n.lineWidth + r) / (h + r)) : n.columns ?? Math.ceil(Math.sqrt(o)), m = Math.max(1, Math.min(p, Math.max(1, o))), v = (b) => i === "rtl" ? m - 1 - b : b, S = h + r, C = Math.max(1, Math.ceil(o / m)), k = new Array(C).fill(1); for (let b = 0; b < o; b++) { const E = Math.floor(b / m); - k[E] = Math.max(k[E], d[b].height); + k[E] = Math.max(k[E], f[b].height); } const N = new Array(C); let w = 0; @@ -19627,14 +19658,14 @@ function Kce(e, t, n = {}) { for (let b = 0; b < o; b++) { const E = v(b % m), I = Math.floor(b / m), O = { index: b, - x: E * S + (h - d[b].width) / 2, - y: N[I] + (k[I] - d[b].height) / 2, - width: d[b].width, - height: d[b].height, + x: E * S + (h - f[b].width) / 2, + y: N[I] + (k[I] - f[b].height) / 2, + width: f[b].width, + height: f[b].height, pageIndexes: t[b], pages: [] }; - O.pages = h9(O, u[b], f[b]), x[b] = O; + O.pages = h9(O, u[b], d[b]), x[b] = O; } return { size: { width: m * S - r, height: Math.max(1, w - r) }, @@ -19646,14 +19677,14 @@ function Kce(e, t, n = {}) { const E = Math.max(0, Math.floor(b.x / S)), I = Math.min(m - 1, Math.floor((b.x + b.width) / S)), O = Math.max(0, l9(y, b.y)), T = Math.min(C - 1, R0(N, b.y + b.height) - 1), R = []; for (let M = O; M <= T; M++) for (let F = E; F <= I; F++) { - const B = M * m + v(F); - B < o && R.push(x[B]); + const _ = M * m + v(F); + _ < o && R.push(x[_]); } return R; }, nearestItem(b) { - const E = Uo(Math.floor(b.x / S), 0, m - 1), I = Uo(R0(N, b.y) - 1, 0, C - 1); - return x[Uo(I * m + v(E), 0, o - 1)]; + const E = Ko(Math.floor(b.x / S), 0, m - 1), I = Ko(R0(N, b.y) - 1, 0, C - 1); + return x[Ko(I * m + v(E), 0, o - 1)]; }, itemOfPage: u9(x, e.length) }; @@ -19668,7 +19699,7 @@ function Hce(e, t = "none") { for (t === "even" && e > 0 && n.push([r++]); r < e; r += 2) n.push(r + 1 < e ? [r, r + 1] : [r]); return n; } -const $n = (e) => e.tryGet(Zt), x1 = (e) => $n(e) !== null; +const $n = (e) => e.tryGet(tn), x1 = (e) => $n(e) !== null; function zce() { return [ // ── zoom ── @@ -19795,12 +19826,12 @@ function bv(e, t) { } const m9 = Fn(null), tle = Fn(null); function Qa() { - const e = Et(m9); + const e = Ct(m9); if (!e) throw new Error("useKernel must be used within /"); return e; } const pi = (e, t) => e === t || e.length === t.length && e.every((n, r) => n === t[r]); -function en(e, t = Object.is) { +function nn(e, t = Object.is) { const n = Qa(), r = Re(null), o = () => { const s = e(n); return r.current && t(r.current.v, s) ? r.current.v : (r.current = { v: s }, s); @@ -19808,36 +19839,36 @@ function en(e, t = Object.is) { return wi(n.subscribe, o); } function nle() { - return en((e) => e.documents.getActiveId()); + return nn((e) => e.documents.getActiveId()); } -function ar() { +function cr() { const e = vi(), t = nle(); return e ?? t; } function vi() { - return Et(tle); + return Ct(tle); } function rle({ fallback: e = null, locked: t, error: n, children: r }) { const o = IS(); return o.status === "ready" ? /* @__PURE__ */ P(nt, { children: r }) : o.status === "locked" && t ? /* @__PURE__ */ P(nt, { children: t(o) }) : o.status === "error" && n ? /* @__PURE__ */ P(nt, { children: n(o) }) : /* @__PURE__ */ P(nt, { children: e }); } function bt(e) { - const t = Qa(), n = Rt(e); + const t = Qa(), n = Bt(e); return n || (t.scopeOf(e) === "document" ? Koe(t, e) : t.capability(e)); } -function Rt(e) { +function Bt(e) { const t = vi(); - return en((n) => n.tryCapability(e, t ?? void 0)); + return nn((n) => n.tryCapability(e, t ?? void 0)); } function wt(e, t, n = Object.is) { - const r = Qa(), o = vi(), s = Rt(e) ?? r.capability(e, o ?? void 0), i = Re(null), a = () => { + const r = Qa(), o = vi(), s = Bt(e) ?? r.capability(e, o ?? void 0), i = Re(null), a = () => { const c = t(s); return i.current && n(i.current.v, c) ? i.current.v : (i.current = { v: c }, c); }; return wi(r.subscribe, a); } -function zt(e, t, n, r = Object.is) { - const o = Qa(), s = Rt(e), i = Re(null), a = () => { +function Gt(e, t, n, r = Object.is) { + const o = Qa(), s = Bt(e), i = Re(null), a = () => { let c; if (s === null) c = n; @@ -19852,7 +19883,7 @@ function zt(e, t, n, r = Object.is) { return wi(o.subscribe, a); } function hR(e, t, n) { - const r = Rt(e), o = Re(n); + const r = Bt(e), o = Re(n); o.current = n; const s = Re(t); s.current = t, Ke(() => { @@ -19861,30 +19892,30 @@ function hR(e, t, n) { }, [r]); } function pR() { - return bt(It); + return bt(Pt); } function y9(e, t, n, r) { const o = vi(); - return en((s) => { + return nn((s) => { const i = s.tryCapability(e, o ?? void 0), a = i ? t(i) : n; return r ? r(a) : a; }, hv); } function IS(e) { - return y9(It, bB.read, bB.empty, e); + return y9(Pt, bB.read, bB.empty, e); } function c2(e) { - return y9(It, wB.read, wB.empty, e); + return y9(Pt, wB.read, wB.empty, e); } const ole = Object.freeze([]); function sle() { - const e = ar(); - return en( + const e = cr(); + return nn( (t) => e ? t.documents.listPages(e) : ole ); } -function nu(e) { - return en((t) => { +function ru(e) { + return nn((t) => { const n = t.getSettings(); return e ? e(n) : n; }, hv); @@ -19900,8 +19931,8 @@ const ile = z$(function({ scope: c, accent: l, page: u, - fetch: d, - children: f + fetch: f, + children: d }, h) { const g = Re({ engine: t, plugins: n, initialDocuments: r }), p = Eoe({ identity: a, scope: c, accent: l, page: u }), m = Re(p); m.current = p; @@ -19909,10 +19940,10 @@ const ile = z$(function({ g9() && !v.current && (g.current.engine !== t || g.current.plugins !== n) && (v.current = !0, console.warn( "[embedpdf] engine/plugins are init-only. A changed identity is ignored — pass stable references (module scope, useState, or useMemo). An inline `plugins={[...]}` array recreates its identity every render." )); - const [S, C] = De({ phase: "booting", kernel: null }), k = Re(i); + const [S, C] = je({ phase: "booting", kernel: null }), k = Re(i); k.current = i; - const N = Re(d); - N.current = d, T6( + const N = Re(f); + N.current = f, T6( h, () => S.phase === "ready" ? S.kernel : null, [S] @@ -19951,14 +19982,14 @@ const ile = z$(function({ const w = S.phase === "error" ? null : S.kernel; return Ke(() => { w?.updateSettings(m.current); - }), S.phase === "error" ? /* @__PURE__ */ P(nt, { children: s ? s(S.error) : null }) : S.kernel ? /* @__PURE__ */ P(m9.Provider, { value: S.kernel, children: S.phase === "ready" ? f : o ?? null }) : null; + }), S.phase === "error" ? /* @__PURE__ */ P(nt, { children: s ? s(S.error) : null }) : S.kernel ? /* @__PURE__ */ P(m9.Provider, { value: S.kernel, children: S.phase === "ready" ? d : o ?? null }) : null; }), b9 = Fn(null), ale = b9.Provider; -function qo() { - const e = Et(b9); +function Go() { + const e = Ct(b9); if (!e) throw new Error("usePage must be used inside or a page"); return e; } -const Lr = sn("actions", { +const Lr = an("actions", { hint: "add actionsPlugin() from '@embedpdf/plugin-actions' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -20045,7 +20076,7 @@ const XB = (e) => { triggers: { document: !0, page: !0, annotation: !0 }, openSequence: "auto", javascript: { enabled: !1, identity: null } -}, Dm = Lr; +}, jm = Lr; function ule(e) { return e.map(({ ref: t, visibleRect: n, transform: r }) => { if (n.width <= 0 || n.height <= 0) @@ -20074,7 +20105,7 @@ function hle(e, t) { () => e.document()?.pagesSequence ?? 0, () => t.refit() ), dle(e, t), e.id !== w9) return; - const n = e.tryGet(Dm); + const n = e.tryGet(jm); n && (ple(e, t, n), gle(e, t, n)); } function ple(e, t, n) { @@ -20134,7 +20165,7 @@ const v9 = 0.55, mle = 0.998, k9 = 0.02, iC = 0.015, yle = (e, t) => (1 - 1 / (e return Math.abs(s - n) < 0.5 && Math.abs(o) < 0.01 ? { position: n, velocity: 0, done: !0 } : { position: s, velocity: o, done: !1 }; }, e_ = (e) => 1 - Math.pow(1 - e, 3), kle = (e, t, n) => e * Math.pow(t / e, n), t_ = 240, aC = (e, t, n) => e + (t - e) * n; function Ale({ events: e, clock: t, scene: n }, r) { - const { motionEnded: o } = e, { camera: s, viewport: i, buildScene: a, stayBounds: c, constraint: l } = n, { writeCamera: u, writeCameraUnclamped: d, axisTravels: f, syncCursorFromCamera: h } = r; + const { motionEnded: o } = e, { camera: s, viewport: i, buildScene: a, stayBounds: c, constraint: l } = n, { writeCamera: u, writeCameraUnclamped: f, axisTravels: d, syncCursorFromCamera: h } = r; let g = null; const p = () => { g?.(), g = null; @@ -20187,26 +20218,26 @@ function Ale({ events: e, clock: t, scene: n }, r) { return; } p(); - const w = s().zoom, y = s(), x = hi(y, c(), i(), l()), A = c(), b = i(), E = (F, B, $) => ({ + const w = s().zoom, y = s(), x = hi(y, c(), i(), l()), A = c(), b = i(), E = (F, _, $) => ({ position: F * w, velocity: -$ / 1e3, - springing: F !== B, + springing: F !== _, done: !1 }), I = E( y.x, x.x, - f("x", A.x, A.width, b.width, w) ? k : 0 + d("x", A.x, A.width, b.width, w) ? k : 0 ), O = E( y.y, x.y, - f("y", A.y, A.height, b.height, w) ? N : 0 + d("y", A.y, A.height, b.height, w) ? N : 0 ); if (!I.springing && !O.springing && Math.hypot(I.velocity, O.velocity) < k9) return; let T = !1, R = 0; const M = (F) => { g = null; - const B = T ? Math.min(64, Math.max(1, F - R)) : 16; + const _ = T ? Math.min(64, Math.max(1, F - R)) : 16; T = !0, R = F; const $ = hi( { x: I.position / w, y: O.position / w, zoom: w }, @@ -20215,11 +20246,11 @@ function Ale({ events: e, clock: t, scene: n }, r) { l() ), D = (j, H) => { if (j.done) return; - const Y = j.springing ? vle(j.position, j.velocity, H * w, B) : wle(j.position, j.velocity, B); + const Y = j.springing ? vle(j.position, j.velocity, H * w, _) : wle(j.position, j.velocity, _); j.position = Y.position, j.velocity = Y.velocity, j.done = Y.done; }; D(I, $.x), D(O, $.y); - const _ = hi( + const B = hi( { x: I.position / w, y: O.position / w, zoom: w }, c(), i(), @@ -20227,7 +20258,7 @@ function Ale({ events: e, clock: t, scene: n }, r) { ), L = (j, H) => { !j.springing && Math.abs(H * w - j.position) > 1e-6 && (j.position = H * w, j.springing = !0, j.done = !1); }; - if (L(I, _.x), L(O, _.y), d({ x: I.position / w, y: O.position / w, zoom: w }), h(), I.done && O.done) { + if (L(I, B.x), L(O, B.y), f({ x: I.position / w, y: O.position / w, zoom: w }), h(), I.done && O.done) { u(s()), o.emit({ camera: s() }); return; } @@ -20247,7 +20278,7 @@ const n_ = (e) => ({ width: e.width, height: e.height, orientation: e.height >= e.width ? "portrait" : "landscape" -}), Sle = (e, t) => (e.minWidth === void 0 || t.width >= e.minWidth) && (e.maxWidth === void 0 || t.width <= e.maxWidth) && (e.minHeight === void 0 || t.height >= e.minHeight) && (e.maxHeight === void 0 || t.height <= e.maxHeight) && (e.orientation === void 0 || t.orientation === e.orientation), xle = (e, t) => typeof e.when == "function" ? !!e.when(t) : Sle(e.when, t), og = (e, t) => { +}), Sle = (e, t) => (e.minWidth === void 0 || t.width >= e.minWidth) && (e.maxWidth === void 0 || t.width <= e.maxWidth) && (e.minHeight === void 0 || t.height >= e.minHeight) && (e.maxHeight === void 0 || t.height <= e.maxHeight) && (e.orientation === void 0 || t.orientation === e.orientation), xle = (e, t) => typeof e.when == "function" ? !!e.when(t) : Sle(e.when, t), sg = (e, t) => { const n = { ...e }; let r; for (r in t) { @@ -20267,7 +20298,7 @@ const n_ = (e) => ({ let r = e; const o = []; for (const s of t) - xle(s, n) && (s.name !== void 0 && o.push(s.name), s.settings && (r = og(r, s.settings))); + xle(s, n) && (s.name !== void 0 && o.push(s.name), s.settings && (r = sg(r, s.settings))); return { effective: r, active: o }; }, Nle = { flow: "continuous", @@ -20289,7 +20320,7 @@ const n_ = (e) => ({ zoomAlign: { x: "center", y: "center" }, anchorAlign: { x: "start", y: "start" }, viewRotation: 0, - zoom: { mode: dr.Automatic }, + zoom: { mode: fr.Automatic }, minZoom: P0, maxZoom: s2, scrollBehavior: "smooth", @@ -20354,7 +20385,7 @@ const n_ = (e) => ({ activeRules: [], zoomDrag: null, locks: {}, - ...og(Nle, n) + ...sg(Nle, n) }; }, o_ = (e, t) => e.camera === t ? e : { ...e, camera: t }, cC = (e, t) => e.cameraResting === t ? e : { ...e, cameraResting: t }, Rle = (e) => e.placed ? e : { ...e, placed: !0 }, s_ = (e, t) => e.viewport === t ? e : { ...e, viewport: t }, Tle = (e, t) => e.dpr === t ? e : { ...e, dpr: t }, l2 = (e, t) => e.pageIndex === t ? e : { ...e, pageIndex: t }, Mle = (e, t) => e.motionCause === t ? e : { ...e, motionCause: t }; function La(e, t) { @@ -20370,7 +20401,7 @@ const Ble = (e, t) => e.activeRules === t ? e : { ...e, activeRules: t }, E1 = ( y: (t.y - e.y) * e.zoom }); function Lle(e, { scene: t }, n, { cancelAnimation: r, animateTo: o, startCameraPhysics: s }, { scrollMetricsNow: i }, a) { - const { camera: c, viewport: l, padding: u, zoomLimits: d, buildScene: f, stayBounds: h, constraint: g } = t, { + const { camera: c, viewport: l, padding: u, zoomLimits: f, buildScene: d, stayBounds: h, constraint: g } = t, { gesture: p, armRest: m, writeCamera: v, @@ -20380,14 +20411,14 @@ function Lle(e, { scene: t }, n, { cancelAnimation: r, animateTo: o, startCamera syncCursorFromCamera: N, markCause: w } = n, y = (x) => { - if (w("user"), r(), !f().itemCount) return; + if (w("user"), r(), !d().itemCount) return; const A = jce(c(), h(), l(), u(), x); x.behavior === "smooth" ? o(A, h(), void 0, N) : (v(A), N()); }; return { api: { setCamera: (x) => { - w("user"), r(), v({ ...x, zoom: ho(x.zoom, d()) }), N(); + w("user"), r(), v({ ...x, zoom: po(x.zoom, f()) }), N(); }, panBy: (x, A) => { if (!a.beforePan()) { @@ -20411,9 +20442,9 @@ function Lle(e, { scene: t }, n, { cancelAnimation: r, animateTo: o, startCamera }, zoomAround: (x, A) => { r(); - const b = f(), E = b.itemCount ? a2(b, i2(c(), x)) : null; - v(Lce(c(), x, A, d())), p.depth === 0 && e.state.update(La, { zoom: { level: c().zoom } }); - const I = f(); + const b = d(), E = b.itemCount ? a2(b, i2(c(), x)) : null; + v(Lce(c(), x, A, f())), p.depth === 0 && e.state.update(La, { zoom: { level: c().zoom } }); + const I = d(); I !== b && E && I.itemCount && v(CS(E, I, x, c().zoom)), p.depth > 0 && p.elastic && (p.raw = k(c())), N(); }, beginGesture: (x) => { @@ -20444,10 +20475,10 @@ function Fle(e, { scene: t, clock: n }, { scrollMetricsNow: r }, o) { previous: { x: a() ? k : C, y: v } }; }; - let u = null, d = !1, f = null; + let u = null, f = !1, d = null; const h = () => (u ?? (u = { startedAt: l(), push: jle, spent: !1 }), u), g = () => { - f?.(), f = n.after(A9, () => { - f = null, u = null; + d?.(), d = n.after(A9, () => { + d = null, u = null; }); }, p = (m, v, S) => { for (const C of ["y", "x"]) { @@ -20466,28 +20497,28 @@ function Fle(e, { scene: t, clock: n }, { scrollMetricsNow: r }, o) { beforePan: () => { if (!i()) return !1; const m = h(); - return d || g(), m.spent; + return f || g(), m.spent; }, /** After a rigid pan: the part of it the clamp refused, in screen px. */ refused: (m) => { - !i() || !u || (u.push = c_(u.push, c(m)), d || p(u, u.push, a_)); + !i() || !u || (u.push = c_(u.push, c(m)), f || p(u, u.push, a_)); }, /** * A wheel or trackpad pushes anew while its last push still coasts: the * next stream begins here, with no pause before it. */ pushBegan: () => { - d || (u = null); + f || (u = null); }, /** A drag begins: one stream for all of it, however long it holds still. */ dragBegan: () => { - i() && (f?.(), f = null, u = null, d = !0, h()); + i() && (d?.(), d = null, u = null, f = !0, h()); }, /** * The drag ended, its finger pulled `overshoot` past the edge (screen px). * True: it turned the page, so nothing springs home. */ - dragEnded: (m, v) => (d = !1, !i() || !u ? !1 : v ? (u = null, !1) : (g(), p(u, c_(u.push, c(m)), a_))), + dragEnded: (m, v) => (f = !1, !i() || !u ? !1 : v ? (u = null, !1) : (g(), p(u, c_(u.push, c(m)), a_))), /** The release speed, right after a drag. True: no momentum, as the page turned. */ flung: (m) => !i() || !u ? !1 : u.spent || p(u, c(m), Dle), /** @@ -20535,34 +20566,34 @@ function zle(e, { clock: t }, n, { panBy: r }) { }; return { api: { - wheelBy: (l, u, d) => { - const f = e.state.get().scrollChaining; - if (l === 0 && u === 0) return !f || (o ?? !0); + wheelBy: (l, u, f) => { + const d = e.state.get().scrollChaining; + if (l === 0 && u === 0) return !d || (o ?? !0); const h = n.leadsSomewhere({ x: l, y: u }); - return i.brokenBy(Math.max(Math.abs(l), Math.abs(u)), d) && (n.pushBegan(), s || (o = null)), o ?? (o = h), s = o && h, c(), f && !o ? !1 : (r(l, u), !0); + return i.brokenBy(Math.max(Math.abs(l), Math.abs(u)), f) && (n.pushBegan(), s || (o = null)), o ?? (o = h), s = o && h, c(), d && !o ? !1 : (r(l, u), !0); } } }; } const Wle = 150; function qle(e, { clock: t, placement: n, scene: r }) { - const { camera: o, viewport: s, padding: i, paged: a, buildScene: c, stayBounds: l, constraint: u } = r, d = { depth: 0, zoomed: !1, elastic: !1, raw: null }; - let f = null; + const { camera: o, viewport: s, padding: i, paged: a, buildScene: c, stayBounds: l, constraint: u } = r, f = { depth: 0, zoomed: !1, elastic: !1, raw: null }; + let d = null; const h = () => { - f?.(), f = null; + d?.(), d = null; }, g = () => { - !t.hasFrames || !n.started || (e.state.update(cC, !1), h(), f = t.after(Wle, () => { - f = null, e.state.update(cC, !0); + !t.hasFrames || !n.started || (e.state.update(cC, !1), h(), d = t.after(Wle, () => { + d = null, e.state.update(cC, !0); })); }, p = (w, y = l()) => { const x = hi(w, y, s(), u()); - x.zoom !== o().zoom && (d.depth > 0 ? (d.zoomed = !0, e.state.update(cC, !1), h()) : g()), e.state.update(o_, x); + x.zoom !== o().zoom && (f.depth > 0 ? (f.zoomed = !0, e.state.update(cC, !1), h()) : g()), e.state.update(o_, x); }, m = (w, y, x, A, b) => { const E = i(), [I, O] = w === "x" ? [E.left, E.right] : [E.top, E.bottom]; return !a9(y, x, A, b, I, O).fits; }; return { - gesture: d, + gesture: f, armRest: g, writeCamera: p, writeCameraUnclamped: (w) => e.state.update(o_, w), @@ -20624,7 +20655,7 @@ function qle(e, { clock: t, placement: n, scene: r }) { }; } const Gle = () => ({ started: !1, pending: null }); -function Cd(e, t, n) { +function Nd(e, t, n) { if (e.started) { n(t); return; @@ -20637,8 +20668,8 @@ function Jle(e, { scene: t, placement: n }, { writeCamera: r, markCause: o }, { viewport: c, padding: l, zoomLimits: u, - paged: d, - isFitAll: f, + paged: f, + isFitAll: d, itemIndexOfPage: h, buildScene: g, sceneRect: p, @@ -20652,67 +20683,67 @@ function Jle(e, { scene: t, placement: n }, { writeCamera: r, markCause: o }, { boundsFor: y, constraint: x, indexOfTarget: A - } = t, b = () => e.state.get(), E = () => e.document()?.pageCount ?? 0, I = (B) => { + } = t, b = () => e.state.get(), E = () => e.document()?.pageCount ?? 0, I = (_) => { for (let $ = 0; $ < 3; $++) { const D = g(); - if (B(), g() === D) return; + if (_(), g() === D) return; } - }, O = (B, $) => { + }, O = (_, $) => { I(() => { const D = g(); if (!D.itemCount) return; - const _ = D.items[D.itemOfPage(B.pageIndex)], L = ES(b().zoom, w(_), c(), l(), u()), j = N($ ?? b().anchorAlign, c()); - r($ce(B, D, c(), L, j), y(_)); + const B = D.items[D.itemOfPage(_.pageIndex)], L = ES(b().zoom, w(B), c(), l(), u()), j = N($ ?? b().anchorAlign, c()); + r($ce(_, D, c(), L, j), y(B)); }); - }, T = (B, $) => { - f() ? R(b().pageIndex, { behavior: "instant" }) : O(B, $); - }, R = (B, $) => { + }, T = (_, $) => { + d() ? R(b().pageIndex, { behavior: "instant" }) : O(_, $); + }, R = (_, $) => { if (o("programmatic"), s(), E() === 0) return; - const D = Math.max(0, Math.min(B, E() - 1)); + const D = Math.max(0, Math.min(_, E() - 1)); if (e.state.update(l2, D), $?.viewpoint) { e.state.update(La, { zoom: $.viewpoint.zoom }), O($.viewpoint.anchor); return; } - const _ = () => { + const B = () => { const L = g(); if (!L.itemCount) return null; - const j = d() ? L.items[0] : L.items[h(D)], H = ES(b().zoom, w(j), c(), l(), u()), Y = f() ? p() : k(m(j), H) ? m(j) : v(j, D), ue = { ...b().arrivalAlign, ...$?.arrivalAlign }, le = Fce( + const j = f() ? L.items[0] : L.items[h(D)], H = ES(b().zoom, w(j), c(), l(), u()), Y = d() ? p() : k(m(j), H) ? m(j) : v(j, D), le = { ...b().arrivalAlign, ...$?.arrivalAlign }, ie = Fce( Y, c(), H, l(), { - x: ue.x === "keep" ? "start" : ue.x, - y: ue.y === "keep" ? "start" : ue.y + x: le.x === "keep" ? "start" : le.x, + y: le.y === "keep" ? "start" : le.y }, b().direction - ), pe = y(j), ge = hi(le, pe, c(), { ...x(), bounded: !0 }); + ), pe = y(j), ve = hi(ie, pe, c(), { ...x(), bounded: !0 }); return { camera: { zoom: H, - x: ue.x === "keep" ? a().x : ge.x, - y: ue.y === "keep" ? a().y : ge.y + x: le.x === "keep" ? a().x : ve.x, + y: le.y === "keep" ? a().y : ve.y }, bounds: pe }; }; if (($?.behavior ?? b().scrollBehavior) === "smooth") { - const L = _(); + const L = B(); L && i(L.camera, L.bounds); } else I(() => { - const L = _(); + const L = B(); L && r(L.camera, L.bounds); }); - }, M = (B, $) => { + }, M = (_, $) => { const D = S(); if (D.length) - if (B === 1) { - const _ = Math.max(...D) + 1; - _ < E() && R(_, $); + if (_ === 1) { + const B = Math.max(...D) + 1; + B < E() && R(B, $); } else { - const _ = Math.min(...D) - 1; - _ >= 0 && R(C(_), $); + const B = Math.min(...D) - 1; + B >= 0 && R(C(B), $); } }, F = () => R(0, { behavior: "instant" }); return { @@ -20722,26 +20753,26 @@ function Jle(e, { scene: t, placement: n }, { writeCamera: r, markCause: o }, { goToTarget: R, resetView: F, api: { - goToPage: (B, $) => { - const D = A(B); - D !== null && Cd(n, $, (_) => R(D, _)); + goToPage: (_, $) => { + const D = A(_); + D !== null && Nd(n, $, (B) => R(D, B)); }, - goToFirstPage: (B) => Cd(n, B, ($) => R(0, $)), - goToLastPage: (B) => Cd( + goToFirstPage: (_) => Nd(n, _, ($) => R(0, $)), + goToLastPage: (_) => Nd( n, - B, + _, ($) => R(Math.max(0, (e.document()?.pageCount ?? 1) - 1), $) ), canGoNext: () => { - const B = S(); - return B.length > 0 && Math.max(...B) < E() - 1; + const _ = S(); + return _.length > 0 && Math.max(..._) < E() - 1; }, canGoPrevious: () => { - const B = S(); - return B.length > 0 && Math.min(...B) > 0; + const _ = S(); + return _.length > 0 && Math.min(..._) > 0; }, - nextPage: (B) => Cd(n, B, ($) => M(1, $)), - previousPage: (B) => Cd(n, B, ($) => M(-1, $)), + nextPage: (_) => Nd(n, _, ($) => M(1, $)), + previousPage: (_) => Nd(n, _, ($) => M(-1, $)), resetView: F } }; @@ -20792,8 +20823,8 @@ function Qle(e, { scene: t, placement: n }, { writeCamera: r, markCause: o }, { const { camera: l, viewport: u, - padding: d, - zoomLimits: f, + padding: f, + zoomLimits: d, paged: h, itemIndexOfPage: g, worldPageFrame: p, @@ -20803,19 +20834,19 @@ function Qle(e, { scene: t, placement: n }, { writeCamera: r, markCause: o }, { worldRectForContent: C, boundsFor: k, indexOfTarget: N - } = t, w = () => e.state.get(), y = (E, I, O, T, R, M, F, B, $) => { + } = t, w = () => e.state.get(), y = (E, I, O, T, R, M, F, _, $) => { if (E === "keep") return I; if (E === void 0) { if (!F) { - const _ = I + B / M, L = I + (R - $) / M; - return O >= _ && O + T <= L ? I : T > L - _ || O < _ ? O - B / M : O + T - (R - $) / M; + const B = I + _ / M, L = I + (R - $) / M; + return O >= B && O + T <= L ? I : T > L - B || O < B ? O - _ / M : O + T - (R - $) / M; } E = "center"; } - if (E === "start") return O - B / M; + if (E === "start") return O - _ / M; if (E === "end") return O + T - (R - $) / M; const D = E === "center" ? 0.5 : Math.min(1, Math.max(0, E)); - return O + T / 2 - (R * D + (B - $) / 2) / M; + return O + T / 2 - (R * D + (_ - $) / 2) / M; }, x = (E, I) => { o("programmatic"); const O = e.document()?.pageCount ?? 0; @@ -20826,75 +20857,75 @@ function Qle(e, { scene: t, placement: n }, { writeCamera: r, markCause: o }, { c(T, I); return; } - const B = m(); - if (!B.itemCount) return; - const $ = S(B.items[g(T)], T), D = p(), _ = { + const _ = m(); + if (!_.itemCount) return; + const $ = S(_.items[g(T)], T), D = p(), B = { x: $.x - D.left, y: $.y - D.top, width: $.width + D.left + D.right, height: $.height + D.top + D.bottom - }, L = Vce(l(), _, u(), d()), j = l(); + }, L = Vce(l(), B, u(), f()), j = l(); if (L.x === j.x && L.y === j.y) return; s(), (I?.behavior ?? w().scrollBehavior) === "smooth" ? i(L, v()) : r(L, v()); return; } s(), e.state.update(l2, T); const M = () => { - const B = m(); - if (!B.itemCount) return null; - const $ = h() ? B.items[0] : B.items[g(T)], D = I.rect ? C($, T, I.rect) : S($, T), _ = I.zoom ?? "keep", L = d(), j = Math.max(1, u().width - L.left - L.right), H = Math.max(1, u().height - L.top - L.bottom); - let Y = typeof _ == "object" ? _.level : _ === "fit" ? Math.min(j / D.width, H / D.height) : _ === "fit-width" ? j / D.width : _ === "fit-height" ? H / D.height : l().zoom; - (!Number.isFinite(Y) || Y <= 0) && (Y = l().zoom), Y = ho(Y, f()); - const ue = _ !== "keep", le = I.align ?? {}; + const _ = m(); + if (!_.itemCount) return null; + const $ = h() ? _.items[0] : _.items[g(T)], D = I.rect ? C($, T, I.rect) : S($, T), B = I.zoom ?? "keep", L = f(), j = Math.max(1, u().width - L.left - L.right), H = Math.max(1, u().height - L.top - L.bottom); + let Y = typeof B == "object" ? B.level : B === "fit" ? Math.min(j / D.width, H / D.height) : B === "fit-width" ? j / D.width : B === "fit-height" ? H / D.height : l().zoom; + (!Number.isFinite(Y) || Y <= 0) && (Y = l().zoom), Y = po(Y, d()); + const le = B !== "keep", ie = I.align ?? {}; return { camera: { x: y( - le.x, + ie.x, l().x, D.x, D.width, u().width, Y, - ue, + le, L.left, L.right ), y: y( - le.y, + ie.y, l().y, D.y, D.height, u().height, Y, - ue, + le, L.top, L.bottom ), zoom: Y }, bounds: k($), - zoomChanged: ue + zoomChanged: le }; }, F = M(); if (F) if (F.zoomChanged && e.state.update(La, { zoom: { level: F.camera.zoom } }), (I.behavior ?? w().scrollBehavior) === "smooth") { - const B = M() ?? F; - i(B.camera, B.bounds); + const _ = M() ?? F; + i(_.camera, _.bounds); } else a(() => { - const B = M(); - B && r(B.camera, B.bounds); + const _ = M(); + _ && r(_.camera, _.bounds); }); }; return { api: { reveal: (E, I) => { const O = N(E); - O !== null && Cd(n, I, (T) => x(O, T)); + O !== null && Nd(n, I, (T) => x(O, T)); }, goToDestination: (E, I) => { const O = e.getPage(E.page); if (!O) return; const T = Yle(E, O.size); - Cd( + Nd( n, { ...T, behavior: I?.behavior }, (R) => x(O.index, R) @@ -20926,7 +20957,7 @@ const S9 = [ 32, 48, 64 -], Xle = [...S9].reverse(), x9 = 1.05, l_ = 1e-9, Zle = (e, t) => ho(S9.find((n) => n > e * x9) ?? t.max, t), eue = (e, t) => ho(Xle.find((n) => n < e / x9) ?? t.min, t); +], Xle = [...S9].reverse(), x9 = 1.05, l_ = 1e-9, Zle = (e, t) => po(S9.find((n) => n > e * x9) ?? t.max, t), eue = (e, t) => po(Xle.find((n) => n < e / x9) ?? t.min, t); function tue(e, { scene: t }, { syncCursorFromCamera: n }, { cancelAnimation: r, animateZoomAnchored: o @@ -20936,8 +20967,8 @@ function tue(e, { scene: t }, { syncCursorFromCamera: n }, { viewport: c, padding: l, zoomLimits: u, - paged: d, - itemIndexOfPage: f, + paged: f, + itemIndexOfPage: d, buildScene: h, alignPoint: g, fitBox: p @@ -20950,19 +20981,19 @@ function tue(e, { scene: t }, { syncCursorFromCamera: n }, { r(); const N = h(); if (!N.itemCount) return; - const w = d() ? N.items[0] : N.items[f(m().pageIndex)], y = p(w), x = u(), A = ES( - { mode: dr.Automatic }, + const w = f() ? N.items[0] : N.items[d(m().pageIndex)], y = p(w), x = u(), A = ES( + { mode: fr.Automatic }, y, c(), l(), x ), b = ES( - { mode: dr.FitWidth }, + { mode: fr.FitWidth }, y, c(), l(), x - ), E = [A, b, ho(A * 2.5, x)].sort((F, B) => F - B).filter((F, B, $) => B === 0 || F > $[B - 1] * 1.1), I = (F, B) => F > B / 1.1 && F < B * 1.1, O = E.findIndex((F) => I(a().zoom, F)), T = O >= 0 ? E[(O + 1) % E.length] : E[0]; + ), E = [A, b, po(A * 2.5, x)].sort((F, _) => F - _).filter((F, _, $) => _ === 0 || F > $[_ - 1] * 1.1), I = (F, _) => F > _ / 1.1 && F < _ * 1.1, O = E.findIndex((F) => I(a().zoom, F)), T = O >= 0 ? E[(O + 1) % E.length] : E[0]; e.state.update(La, { zoom: { level: T } }); const R = h(); if (!R.itemCount) return; @@ -20981,10 +21012,10 @@ function tue(e, { scene: t }, { syncCursorFromCamera: n }, { i.updateSettings({ zoom: k }); }, zoomBy: (k, N) => s.zoomAround(N?.around ?? v(), k), - fitWidth: () => i.updateSettings({ zoom: { mode: dr.FitWidth } }), - fitPage: () => i.updateSettings({ zoom: { mode: dr.FitPage } }), - fitAll: () => i.updateSettings({ zoom: { mode: dr.FitAll } }), - fitAutomatic: () => i.updateSettings({ zoom: { mode: dr.Automatic } }), + fitWidth: () => i.updateSettings({ zoom: { mode: fr.FitWidth } }), + fitPage: () => i.updateSettings({ zoom: { mode: fr.FitPage } }), + fitAll: () => i.updateSettings({ zoom: { mode: fr.FitAll } }), + fitAutomatic: () => i.updateSettings({ zoom: { mode: fr.Automatic } }), setViewRotation: C, rotateViewBy: (k) => C(s9(m().viewRotation, k === 90 ? 90 : 270)) } @@ -21012,17 +21043,17 @@ function nue(e, { scene: t }, { }, u = (g) => { const p = l(g.page, g.from), m = l(g.page, g.to); return p && m ? d_(p, m) : null; - }, d = tt( + }, f = tt( () => (t.buildScene(), [c().zoomDrag, t.camera(), t.cacheKey()]), (g, p, m) => { const v = g && u(g); return v && f_(v) ? v : null; } - ), f = (g) => { + ), d = (g) => { const p = a.pageToWorld(g.page, g.from), m = a.pageToWorld(g.page, g.to); return p && m ? d_(p, m) : null; }, h = (g) => { - const p = f(g); + const p = d(g); if (!p) return; const m = t.viewport(), v = t.padding(), S = Math.min( Math.max(1, m.width - v.left - v.right) / p.width, @@ -21031,7 +21062,7 @@ function nue(e, { scene: t }, { if (!Number.isFinite(S)) return; const C = Math.min(s2, Math.max(P0, S)); e.state.update(La, { zoom: { level: C } }); - const k = f(g) ?? p, N = t.camera(), w = hi( + const k = d(g) ?? p, N = t.camera(), w = hi( { zoom: C, // Centered in the padded viewport. @@ -21081,7 +21112,7 @@ function nue(e, { scene: t }, { } }, cancelZoomDrag: () => e.state.update(E1, null), - getZoomBox: d + getZoomBox: f } }; } @@ -21096,13 +21127,13 @@ function rue(e, { scene: t }) { cacheKey: c, stayBounds: l, cursorItem: u, - currentPages: d, - currentAnchor: f + currentPages: f, + currentAnchor: d } = t, h = () => e.state.get(), g = (b) => e.document()?.pages[b]?.ref.objectNumber ?? b + 1, p = (b) => { - const E = pg({ width: b.width, height: b.height }, b.rotation); + const E = gg({ width: b.width, height: b.height }, b.rotation); return { width: E.width / b.contentScale, height: E.height / b.contentScale }; }, m = (b) => { - const E = e.document()?.pages[b.pageIndex], I = E ? { width: E.size.width, height: E.size.height } : p(b), O = n(), T = o(), R = (b.x - O.x) * O.zoom, M = (b.y - O.y) * O.zoom, F = h().cameraResting, B = F ? zB(R, T) : R, $ = F ? zB(M, T) : M, D = Nce({ + const E = e.document()?.pages[b.pageIndex], I = E ? { width: E.size.width, height: E.size.height } : p(b), O = n(), T = o(), R = (b.x - O.x) * O.zoom, M = (b.y - O.y) * O.zoom, F = h().cameraResting, _ = F ? zB(R, T) : R, $ = F ? zB(M, T) : M, D = Nce({ pageSize: I, rotation: b.rotation, scale: b.contentScale * O.zoom, @@ -21111,14 +21142,14 @@ function rue(e, { scene: t }) { // independent of sizing mode or camera state. baseScale: h().viewUnitsPerPoint * (E?.userUnit ?? 1), dpr: T - }), _ = r(), L = O0( - { x: -B, y: -$, width: _.width, height: _.height }, + }), B = r(), L = O0( + { x: -_, y: -$, width: B.width, height: B.height }, { x: 0, y: 0, width: D.viewWidth, height: D.viewHeight } ), j = L.width > 0 && L.height > 0 ? D.viewToPageRect(L) : { x: 0, y: 0, width: 0, height: 0 }; return { ...b, - ref: Lt(g(b.pageIndex)), - screenX: B, + ref: Ft(g(b.pageIndex)), + screenX: _, screenY: $, transform: D, visibleRect: j @@ -21158,9 +21189,9 @@ function rue(e, { scene: t }) { h().cameraResting ]; }, - (b, E, I, O, T, R, M, F, B) => { + (b, E, I, O, T, R, M, F, _) => { const $ = a(); - return (i() ? $.items.slice(0, 1) : $.query(_ce({ x: I, y: O, zoom: T }, { width: R, height: M }))).flatMap((_) => _.pages).map(m); + return (i() ? $.items.slice(0, 1) : $.query(_ce({ x: I, y: O, zoom: T }, { width: R, height: M }))).flatMap((B) => B.pages).map(m); } ), w = () => h().placed ? N() : k, y = (b) => { if (!h().placed) return null; @@ -21175,7 +21206,7 @@ function rue(e, { scene: t }) { }, x = (b, E) => { const I = y(b); if (!I) return null; - const O = pg({ width: I.width, height: I.height }, I.rotation), T = xS( + const O = gg({ width: I.width, height: I.height }, I.rotation), T = xS( I.contentScale, O.width, O.height, @@ -21204,7 +21235,7 @@ function rue(e, { scene: t }) { }, listCurrentPages: () => { const b = e.document()?.pages ?? []; - return d().map((E) => b[E]).filter((E) => E !== void 0); + return f().map((E) => b[E]).filter((E) => E !== void 0); }, getPageBox: y, getPageAt: (b) => { @@ -21232,7 +21263,7 @@ function rue(e, { scene: t }) { pageRectToViewport: (b, E) => { const I = y(b); if (!I) return null; - const O = pg({ width: I.width, height: I.height }, I.rotation), T = xS( + const O = gg({ width: I.width, height: I.height }, I.rotation), T = xS( I.contentScale, O.width, O.height, @@ -21257,17 +21288,17 @@ function rue(e, { scene: t }) { const b = h().zoom; return "mode" in b ? b.mode : "custom"; }, - getViewpoint: () => ({ anchor: f(), zoom: h().zoom }), + getViewpoint: () => ({ anchor: d(), zoom: h().zoom }), getCurrentDestination: () => { const { left: b, top: E } = s(), I = n(), O = w().filter((F) => { - const B = Vy(I, { x: F.x + F.width, y: F.y + F.height }); - return B.x > b && B.y > E; - }).sort((F, B) => F.pageIndex - B.pageIndex)[0], T = O && e.getPage(O.ref)?.size; + const _ = Vy(I, { x: F.x + F.width, y: F.y + F.height }); + return _.x > b && _.y > E; + }).sort((F, _) => F.pageIndex - _.pageIndex)[0], T = O && e.getPage(O.ref)?.size; if (!O || !T) return null; const R = O.transform.viewToPage({ x: b - O.screenX, y: E - O.screenY - }), M = (F, B) => Math.round(Math.min(Math.max(F, 0), B) * 100) / 100; + }), M = (F, _) => Math.round(Math.min(Math.max(F, 0), _) * 100) / 100; return { kind: "xyz", page: O.ref, @@ -21296,145 +21327,145 @@ function oue(e) { }), { pageChanged: t, zoomChanged: n, cameraChanged: r, motionEnded: o, settingsChanged: s, viewportChanged: i }; } function sue(e) { - const t = () => e.state.get(), n = () => t().camera, r = () => t().viewport, o = () => t().dpr, s = () => $f(t().padding), i = () => Bce(t().minZoom, t().maxZoom), a = () => t().flow === "paged", c = () => { - const te = t().zoom; - return "mode" in te && te.mode === dr.FitAll; + const t = () => e.state.get(), n = () => t().camera, r = () => t().viewport, o = () => t().dpr, s = () => Kf(t().padding), i = () => Bce(t().minZoom, t().maxZoom), a = () => t().flow === "paged", c = () => { + const ee = t().zoom; + return "mode" in ee && ee.mode === fr.FitAll; }, l = tt( () => [e.document()?.pageCount ?? 0, t().spread], - (te, he) => { - const Te = Hce(te, he); - return { grouping: Te, firstPages: Te.map((ze) => ze[0]) }; + (ee, he) => { + const Te = Hce(ee, he); + return { grouping: Te, firstPages: Te.map((We) => We[0]) }; } - ), u = () => l().grouping.length, d = (te) => { + ), u = () => l().grouping.length, f = (ee) => { const he = l().firstPages; - let Te = 0, ze = he.length; - for (; Te < ze; ) { - const ae = Te + ze >> 1; - he[ae] <= te ? Te = ae + 1 : ze = ae; + let Te = 0, We = he.length; + for (; Te < We; ) { + const ae = Te + We >> 1; + he[ae] <= ee ? Te = ae + 1 : We = ae; } return Math.max(0, Te - 1); - }, f = () => { - const te = t().zoom; - return "level" in te ? ho(te.level, i()) : Math.max(t().camera.zoom, 1e-4); + }, d = () => { + const ee = t().zoom; + return "level" in ee ? po(ee.level, i()) : Math.max(t().camera.zoom, 1e-4); }, h = () => { - const { left: te, right: he } = s(); - return Math.max(1, (r().width - te - he) / f()); + const { left: ee, right: he } = s(); + return Math.max(1, (r().width - ee - he) / d()); }, g = () => { - const te = t().pageFrame; - if (!te.top && !te.right && !te.bottom && !te.left) return te; - const he = f(); + const ee = t().pageFrame; + if (!ee.top && !ee.right && !ee.bottom && !ee.left) return ee; + const he = d(); return { - top: te.top / he, - right: te.right / he, - bottom: te.bottom / he, - left: te.left / he + top: ee.top / he, + right: ee.right / he, + bottom: ee.bottom / he, + left: ee.left / he }; }, p = () => { - const te = t().pageFrame; - if (!te.top && !te.right && !te.bottom && !te.left) return "-"; + const ee = t().pageFrame; + if (!ee.top && !ee.right && !ee.bottom && !ee.left) return "-"; const he = g(); return `${Math.round(he.top)},${Math.round(he.right)},${Math.round(he.bottom)},${Math.round(he.left)}`; }, m = () => { - const te = t().gap; - return typeof te == "number" ? te : te.px ? te.px / f() : 0; + const ee = t().gap; + return typeof ee == "number" ? ee : ee.px ? ee.px / d() : 0; }, v = () => { - const te = t().gap; - return typeof te == "number" ? String(te) : `px:${Math.round(m())}`; - }, S = (te) => { - const he = t(), Te = e.document()?.pages ?? [], ze = he.viewRotation, ae = ze === 0 ? Te : Te.map((Ae) => ({ + const ee = t().gap; + return typeof ee == "number" ? String(ee) : `px:${Math.round(m())}`; + }, S = (ee) => { + const he = t(), Te = e.document()?.pages ?? [], We = he.viewRotation, ae = We === 0 ? Te : Te.map((Ae) => ({ ...Ae, - rotation: s9(Ae.rotation, ze) - })), me = g(), W = m(), Se = he.viewUnitsPerPoint; - return he.layout === "grid" ? Kce(ae, te, { + rotation: s9(Ae.rotation, We) + })), ge = g(), W = m(), Se = he.viewUnitsPerPoint; + return he.layout === "grid" ? Kce(ae, ee, { gap: W, sizing: he.sizing, direction: he.direction, - pageFrame: me, + pageFrame: ge, viewUnitsPerPoint: Se, columns: typeof he.columns == "number" ? he.columns : void 0, lineWidth: he.columns === "auto" ? h() : void 0 - }) : Uce(ae, te, { + }) : Uce(ae, ee, { axis: he.layout === "horizontal" ? "x" : "y", gap: W, sizing: he.sizing, direction: he.direction, - pageFrame: me, + pageFrame: ge, viewUnitsPerPoint: Se }); }, k = { columns: () => { - const te = t(); - return te.layout !== "grid" ? "-" : te.columns === "auto" ? `auto:${Math.round(h())}` : String(te.columns); + const ee = t(); + return ee.layout !== "grid" ? "-" : ee.columns === "auto" ? `auto:${Math.round(h())}` : String(ee.columns); }, gap: v, pageFrame: p - }, N = Xi.filter((te) => Zw[te] === "scene"), w = () => N.map((te) => { - const he = k[te]; + }, N = Xi.filter((ee) => Zw[ee] === "scene"), w = () => N.map((ee) => { + const he = k[ee]; if (he) return he(); - const Te = t()[te]; + const Te = t()[ee]; return typeof Te == "object" && Te !== null ? JSON.stringify(Te) : String(Te); }).join("|"); let y = null; const x = () => { - const te = e.document(); - return te ? `${te.pageCount}.${te.pagesSequence}` : "0.0"; + const ee = e.document(); + return ee ? `${ee.pageCount}.${ee.pagesSequence}` : "0.0"; }, A = () => { - const { grouping: te } = l(); + const { grouping: ee } = l(); if (t().flow === "paged") { - const ze = te.length ? Math.min(d(t().pageIndex), te.length - 1) : 0, ae = `paged|${x()}|${w()}|${ze}`; + const We = ee.length ? Math.min(f(t().pageIndex), ee.length - 1) : 0, ae = `paged|${x()}|${w()}|${We}`; if (y && y.key === ae) return y.scene; - const me = S(te.length ? [te[ze]] : []); - return y = { key: ae, scene: me }, me; + const ge = S(ee.length ? [ee[We]] : []); + return y = { key: ae, scene: ge }, ge; } const he = `continuous|${x()}|${w()}`; if (y && y.key === he) return y.scene; - const Te = S(te); + const Te = S(ee); return y = { key: he, scene: Te }, Te; }, b = () => { y = null; }, E = () => y.key, I = () => { - const { width: te, height: he } = A().size; - return { x: 0, y: 0, width: te, height: he }; - }, O = (te) => ({ - x: te.x, - y: te.y, - width: te.width, - height: te.height - }), T = (te, he) => { - const Te = te.pages.find((ze) => ze.pageIndex === he) ?? te.pages[0]; + const { width: ee, height: he } = A().size; + return { x: 0, y: 0, width: ee, height: he }; + }, O = (ee) => ({ + x: ee.x, + y: ee.y, + width: ee.width, + height: ee.height + }), T = (ee, he) => { + const Te = ee.pages.find((We) => We.pageIndex === he) ?? ee.pages[0]; return { x: Te.x, y: Te.y, width: Te.width, height: Te.height }; }, R = () => { - const te = A(); - return a() ? te.items[0] : te.items[d(t().pageIndex)]; - }, M = (te) => c() || D(O(te), n().zoom), F = () => { - const te = R(); - return te ? M(te) ? te.pageIndexes : [t().pageIndex] : []; - }, B = (te) => { - const he = l().grouping[d(te)]; - if (!he || he.length === 1) return te; - const Te = A(), ze = a() ? Te.items[0] : Te.items[d(te)]; - return ze && M(ze) ? he[0] : te; - }, $ = (te, he, Te) => { - const ze = te.pages.find((Se) => Se.pageIndex === he) ?? te.pages[0], ae = pg({ width: ze.width, height: ze.height }, ze.rotation), me = xS(ze.contentScale, ae.width, ae.height, ze.rotation), W = SS(me, Te); - return { x: ze.x + W.x, y: ze.y + W.y, width: W.width, height: W.height }; - }, D = (te, he) => { - const Te = r(), ze = s(); - return te.width * he <= Te.width - ze.left - ze.right + 0.5; - }, _ = (te) => te === "start" ? 0 : te === "center" ? 0.5 : te === "end" ? 1 : Math.min(1, Math.max(0, te)), L = (te, he) => { - const Te = t().direction === "rtl", ze = Te && te.x === "start" ? "end" : Te && te.x === "end" ? "start" : te.x, ae = s(); + const ee = A(); + return a() ? ee.items[0] : ee.items[f(t().pageIndex)]; + }, M = (ee) => c() || D(O(ee), n().zoom), F = () => { + const ee = R(); + return ee ? M(ee) ? ee.pageIndexes : [t().pageIndex] : []; + }, _ = (ee) => { + const he = l().grouping[f(ee)]; + if (!he || he.length === 1) return ee; + const Te = A(), We = a() ? Te.items[0] : Te.items[f(ee)]; + return We && M(We) ? he[0] : ee; + }, $ = (ee, he, Te) => { + const We = ee.pages.find((Se) => Se.pageIndex === he) ?? ee.pages[0], ae = gg({ width: We.width, height: We.height }, We.rotation), ge = xS(We.contentScale, ae.width, ae.height, We.rotation), W = SS(ge, Te); + return { x: We.x + W.x, y: We.y + W.y, width: W.width, height: W.height }; + }, D = (ee, he) => { + const Te = r(), We = s(); + return ee.width * he <= Te.width - We.left - We.right + 0.5; + }, B = (ee) => ee === "start" ? 0 : ee === "center" ? 0.5 : ee === "end" ? 1 : Math.min(1, Math.max(0, ee)), L = (ee, he) => { + const Te = t().direction === "rtl", We = Te && ee.x === "start" ? "end" : Te && ee.x === "end" ? "start" : ee.x, ae = s(); return { - x: ae.left + (he.width - ae.left - ae.right) * _(ze), - y: ae.top + (he.height - ae.top - ae.bottom) * _(te.y) + x: ae.left + (he.width - ae.left - ae.right) * B(We), + y: ae.top + (he.height - ae.top - ae.bottom) * B(ee.y) }; - }, j = () => L(t().anchorAlign, r()), H = (te) => c() ? A().size : a() ? { width: te.width, height: te.height } : A().maxItemSize, Y = (te) => a() ? O(te) : I(), ue = () => a() ? O(A().items[0]) : I(), le = () => ({ + }, j = () => L(t().anchorAlign, r()), H = (ee) => c() ? A().size : a() ? { width: ee.width, height: ee.height } : A().maxItemSize, Y = (ee) => a() ? O(ee) : I(), le = () => a() ? O(A().items[0]) : I(), ie = () => ({ bounded: t().bounded, padding: s(), fitAlign: t().fitAlign, direction: t().direction - }), pe = (te) => { + }), pe = (ee) => { const he = A(); - return he.itemCount ? c9(n(), he, r(), te) : { pageIndex: t().pageIndex, fractionX: 0.5, fractionY: 0 }; - }, ge = () => pe(j()), Me = (te) => e.getPage(te)?.index ?? -1; + return he.itemCount ? c9(n(), he, r(), ee) : { pageIndex: t().pageIndex, fractionX: 0.5, fractionY: 0 }; + }, ve = () => pe(j()), _e = (ee) => e.getPage(ee)?.index ?? -1; return { camera: n, viewport: r, @@ -21445,7 +21476,7 @@ function sue(e) { isFitAll: c, grouping: l, itemCountFull: u, - itemIndexOfPage: d, + itemIndexOfPage: f, worldPageFrame: g, buildScene: A, invalidate: b, @@ -21455,21 +21486,21 @@ function sue(e) { pageRectOf: T, cursorItem: R, currentPages: F, - unitStartOf: B, + unitStartOf: _, worldRectForContent: $, fitsAcross: D, alignPoint: L, anchorPoint: j, fitBox: H, boundsFor: Y, - stayBounds: ue, - constraint: le, + stayBounds: le, + constraint: ie, anchorAt: pe, - currentAnchor: ge, - indexOfPage: Me, - indexOfTarget: (te) => { - if (typeof te == "number") return Number.isInteger(te) ? te : null; - const he = Me(te); + currentAnchor: ve, + indexOfPage: _e, + indexOfTarget: (ee) => { + if (typeof ee == "number") return Number.isInteger(ee) ? ee : null; + const he = _e(ee); return he >= 0 ? he : null; } }; @@ -21494,13 +21525,13 @@ function aue(e, { scene: t }, n, { writeCamera: r }, { cancelAnimation: o }, { reapply: i, goToTarget: a }) { - const { camera: c, viewport: l, alignPoint: u, anchorAt: d } = t, f = () => e.state.get(), h = tt( - () => Xi.map((I) => f()[I]), - () => CN(f()) + const { camera: c, viewport: l, alignPoint: u, anchorAt: f } = t, d = () => e.state.get(), h = tt( + () => Xi.map((I) => d()[I]), + () => CN(d()) ), g = (I) => { o(); - const O = (M) => Xi.some((F) => I[F] !== void 0 && Zw[F] === M), T = O("refit") && !O("scene") && !O("reflow") ? f().zoomAlign : f().anchorAlign, R = d(u(T, l())); - e.state.update(La, I), O("scene") && t.invalidate(), O("reflow") ? a(f().pageIndex, { behavior: "instant" }) : O("scene") || O("refit") ? i(R, T) : O("reclamp") && r(c()); + const O = (M) => Xi.some((F) => I[F] !== void 0 && Zw[F] === M), T = O("refit") && !O("scene") && !O("reflow") ? d().zoomAlign : d().anchorAlign, R = f(u(T, l())); + e.state.update(La, I), O("scene") && t.invalidate(), O("reflow") ? a(d().pageIndex, { behavior: "instant" }) : O("scene") || O("refit") ? i(R, T) : O("reclamp") && r(c()); }; let p = h(); const m = p; @@ -21509,7 +21540,7 @@ function aue(e, { scene: t }, n, { writeCamera: r }, { cancelAnimation: o }, { const { effective: I, active: O } = r_(p, v, n_(l())); return { effective: C.reduce( - (T, R) => og(T, R.settings), + (T, R) => sg(T, R.settings), I ), active: O @@ -21522,18 +21553,18 @@ function aue(e, { scene: t }, n, { writeCamera: r }, { cancelAnimation: o }, { by: M.by, ...M.reasonKey !== void 0 ? { reasonKey: M.reasonKey } : {} }); - const O = f().locks, T = Object.keys(I); + const O = d().locks, T = Object.keys(I); T.length === Object.keys(O).length && T.every( (M) => O[M]?.by === I[M].by && O[M]?.reasonKey === I[M].reasonKey ) || e.state.update(_le, I); }, w = (I) => { - const O = f().activeRules; + const O = d().activeRules; (O.length !== I.length || I.some((T, R) => T !== O[R])) && e.state.update(Ble, I); }, y = (I, O = []) => { const { effective: T, active: R } = k(), M = {}; for (const $ of Xi) { - const D = !Jk(T[$], S[$]), _ = O.includes($) && !Jk(T[$], f()[$]); - (D || _) && Object.assign(M, { [$]: T[$] }); + const D = !Jk(T[$], S[$]), B = O.includes($) && !Jk(T[$], d()[$]); + (D || B) && Object.assign(M, { [$]: T[$] }); } S = T, w(R); const F = Object.keys(M); @@ -21541,17 +21572,17 @@ function aue(e, { scene: t }, n, { writeCamera: r }, { cancelAnimation: o }, { if (I) return g(M), "none"; e.state.update(La, M); - let B = "none"; + let _ = "none"; for (const $ of F) - h_[Zw[$]] > h_[B] && (B = Zw[$]); - return (B === "scene" || B === "reflow") && t.invalidate(), B; + h_[Zw[$]] > h_[_] && (_ = Zw[$]); + return (_ === "scene" || _ === "reflow") && t.invalidate(), _; }, x = (I) => { - p = og(p, I), y( + p = sg(p, I), y( !0, Xi.filter((O) => I[O] !== void 0) ); }, A = (I) => { - o(), p = og(p, CN(I)); + o(), p = sg(p, CN(I)); const { effective: O, active: T } = k(); S = O, w(T), e.state.update(La, O), e.state.update(l2, I.pageIndex ?? 0), t.invalidate(), s(I.anchor); }; @@ -21561,7 +21592,7 @@ function aue(e, { scene: t }, n, { writeCamera: r }, { cancelAnimation: o }, { const I = h(); if (C.length === 0) return I; const { effective: O } = r_(p, v, n_(l())), T = { ...I }; - for (const R of Object.keys(f().locks)) + for (const R of Object.keys(d().locks)) Object.assign(T, { [R]: O[R] }); return T; }, @@ -21571,7 +21602,7 @@ function aue(e, { scene: t }, n, { writeCamera: r }, { cancelAnimation: o }, { api: { getSettings: h, resetSettings: () => { - p = og(m, {}), y(!0, Xi); + p = sg(m, {}), y(!0, Xi); }, updateSettings: x, setResponsiveRules: (I) => { @@ -21581,19 +21612,19 @@ function aue(e, { scene: t }, n, { writeCamera: r }, { cancelAnimation: o }, { const O = p_(I); for (const M of O) { if (!Xi.includes(M)) - throw new re("invalid-input", "stage", `"${M}" is not a Stage setting`); + throw new te("invalid-input", "stage", `"${M}" is not a Stage setting`); if (M === "zoom") - throw new re( + throw new te( "invalid-input", "stage", "the zoom cannot be locked: gestures set it" ); - const F = C.find((B) => { - const $ = B.settings[M]; + const F = C.find((_) => { + const $ = _.settings[M]; return $ !== void 0 && !Jk($, I.settings[M]); }); if (F) - throw new re( + throw new te( "conflict", "stage", `"${M}" is locked by ${F.by} at another value` @@ -21606,9 +21637,9 @@ function aue(e, { scene: t }, n, { writeCamera: r }, { cancelAnimation: o }, { R || (R = !0, C = C.filter((M) => M !== T), N(), y(!0, O)); }; }, - getLock: (I) => f().locks[I] ?? null, - matchesRule: (I) => f().activeRules.includes(I), - listActiveRules: () => f().activeRules, + getLock: (I) => d().locks[I] ?? null, + matchesRule: (I) => d().activeRules.includes(I), + listActiveRules: () => d().activeRules, applyViewState: A } }; @@ -21617,7 +21648,7 @@ const p_ = (e) => Object.keys(e.settings).filter( (t) => e.settings[t] !== void 0 ); function cue(e, { scene: t, placement: n }, { cancelAnimation: r }, o, s) { - const { dpr: i, currentAnchor: a } = t, { goToTarget: c, reapply: l } = o, { snapshotSettings: u, viewStateSettings: d, syncResponsive: f } = s, h = () => e.state.get(), g = [], p = () => { + const { dpr: i, currentAnchor: a } = t, { goToTarget: c, reapply: l } = o, { snapshotSettings: u, viewStateSettings: f, syncResponsive: d } = s, h = () => e.state.get(), g = [], p = () => { n.started = !0; const m = [...g].sort( (C, k) => k.priority - C.priority @@ -21633,7 +21664,7 @@ function cue(e, { scene: t, placement: n }, { cancelAnimation: r }, o, s) { api: { setViewportSize: (m) => { if (!n.started) { - e.state.update(s_, m), f(!1), m.width > 0 && m.height > 0 && (e.document()?.pageCount ?? 0) > 0 && p(); + e.state.update(s_, m), d(!1), m.width > 0 && m.height > 0 && (e.document()?.pageCount ?? 0) > 0 && p(); return; } if (m.width <= 0 || m.height <= 0) return; @@ -21641,7 +21672,7 @@ function cue(e, { scene: t, placement: n }, { cancelAnimation: r }, o, s) { if (m.width === v.width && m.height === v.height) return; r(); const S = a(); - e.state.update(s_, m), f(!1) === "reflow" ? c(h().pageIndex, { behavior: "instant" }) : l(S); + e.state.update(s_, m), d(!1) === "reflow" ? c(h().pageIndex, { behavior: "instant" }) : l(S); }, setDevicePixelRatio: (m) => { m > 0 && m !== i() && e.state.update(Tle, m); @@ -21651,7 +21682,7 @@ function cue(e, { scene: t, placement: n }, { cancelAnimation: r }, o, s) { }, getViewState: () => ({ // A lock is this document's now, not the user's: the saved view keeps what's under it. - ...d(), + ...f(), pageIndex: h().pageIndex, anchor: a() }), @@ -21668,14 +21699,14 @@ function cue(e, { scene: t, placement: n }, { cancelAnimation: r }, o, s) { }; } function lue(e, t = {}) { - const n = iue(e), { events: r } = n, o = rue(e, n), s = qle(e, n), i = Ale(n, s), a = Jle(e, n, s, i), c = Fle(e, n, o, a.api), l = Lle(e, n, s, i, o, c), u = zle(e, n, c, l.api), d = Qle(e, n, s, i, a), f = aue(e, n, t, s, i, a), h = tue(e, n, s, i, l.api, f), g = nue(e, n, s, i, { ...o.api, ...h.api }), p = cue(e, n, i, a, f), m = tu("stage", [ + const n = iue(e), { events: r } = n, o = rue(e, n), s = qle(e, n), i = Ale(n, s), a = Jle(e, n, s, i), c = Fle(e, n, o, a.api), l = Lle(e, n, s, i, o, c), u = zle(e, n, c, l.api), f = Qle(e, n, s, i, a), d = aue(e, n, t, s, i, a), h = tue(e, n, s, i, l.api, d), g = nue(e, n, s, i, { ...o.api, ...h.api }), p = cue(e, n, i, a, d), m = nu("stage", [ o.api, i.api, l.api, u.api, a.api, - d.api, f.api, + d.api, h.api, g.api, p.api, @@ -21694,7 +21725,7 @@ function lue(e, t = {}) { }; } const g_ = (e = {}) => { - const { id: t = w9, token: n = Zt, ...r } = e; + const { id: t = w9, token: n = tn, ...r } = e; return { id: t, token: n, @@ -21703,7 +21734,7 @@ const g_ = (e = {}) => { state: () => Ple(r), create: (o) => lue(o, r) }; -}, m_ = wr(Zt, { +}, m_ = wr(tn, { read: (e) => ({ zoomLevel: e.getZoomLevel(), zoomMode: e.getZoomMode(), @@ -21715,7 +21746,7 @@ const g_ = (e = {}) => { }), empty: { zoomLevel: 1, - zoomMode: dr.Automatic, + zoomMode: fr.Automatic, currentPageIndex: 0, currentPage: null, pageCount: 0, @@ -21757,10 +21788,10 @@ function due(e, t) { } const Cn = yr, T0 = (e, t) => e.project?.(t) ?? (e.page?.ref.objectNumber === t.objectNumber ? e.page.point : null), mR = Fn(null), fue = mR.Provider, E9 = Fn(null), hue = E9.Provider; function pue() { - return Et(mR); + return Ct(mR); } function C9() { - const e = Et(mR); + const e = Ct(mR); if (!e) throw new Error( "No ViewProjector in scope: mount anchored UI under (overlay slot) or ." @@ -21768,7 +21799,7 @@ function C9() { return e; } function u2(e) { - const t = Et(E9); + const t = Ct(E9); return !e.anchor?.bounds || t && !t.has(e.anchor.page.objectNumber) ? null : /* @__PURE__ */ P(gue, { ...e }); } function gue({ @@ -21778,9 +21809,9 @@ function gue({ pinned: r = !1, children: o }) { - const { projector: s, subscribe: i } = C9(), [a, c] = De(null), [l, u] = De(null), [, d] = Wl((g) => g + 1, 0); - if (Ze(() => i ? i(d) : void 0, [i]), Ze(() => { - s.space === "client" && d(); + const { projector: s, subscribe: i } = C9(), [a, c] = je(null), [l, u] = je(null), [, f] = ql((g) => g + 1, 0); + if (Ze(() => i ? i(f) : void 0, [i]), Ze(() => { + s.space === "client" && f(); }, [s, e]), Ze(() => { if (a) return kse( @@ -21793,25 +21824,25 @@ function gue({ const g = (p) => p.stopPropagation(); return a.addEventListener("pointerdown", g), () => a.removeEventListener("pointerdown", g); }, [a]), !e?.bounds) return null; - const f = bse( + const d = bse( s, { ...e, bounds: e.bounds }, { placement: t, gap: n, pinned: r }, l ); - if (!f) return null; + if (!d) return null; const h = /* @__PURE__ */ P( "div", { ref: c, - "data-placement": f.placement, + "data-placement": d.placement, style: { position: s.space === "client" ? "fixed" : "absolute", - left: f.left, - top: f.top, + left: d.left, + top: d.top, // Its own width, wherever it sits: the size the placement measured. width: "max-content", - transform: f.transform, + transform: d.transform, pointerEvents: "auto" }, children: o @@ -21823,9 +21854,9 @@ const I9 = Fn(null); function mue({ token: e, children: t }) { return /* @__PURE__ */ P(I9.Provider, { value: e, children: t }); } -function Uf(e) { - const t = Et(I9); - return e ?? t ?? Zt; +function Hf(e) { + const t = Ct(I9); + return e ?? t ?? tn; } const yue = Object.freeze({ scrollLeft: 0, @@ -21838,8 +21869,8 @@ const yue = Object.freeze({ scrollableY: !1 }); function bue(e) { - const t = N9(Uf(e)), n = vi(); - return en( + const t = N9(Hf(e)), n = vi(); + return nn( (r) => r.tryCapability(t, n ?? void 0)?.getScrollMetrics() ?? yue ); } @@ -21855,33 +21886,33 @@ function IN({ thumbClassName: a, thumbStyle: c }) { - const l = Uf(t), u = bt(N9(l)), d = bue(l), f = e === "y", h = f ? d.scrollableY : d.scrollableX, g = Re(null), [p, m] = De(0), [v, S] = De(!1), [C, k] = De(!1), [N, w] = De(!0), y = VB(d, f, p, r), x = n === !1 ? 0 : n; + const l = Hf(t), u = bt(N9(l)), f = bue(l), d = e === "y", h = d ? f.scrollableY : f.scrollableX, g = Re(null), [p, m] = je(0), [v, S] = je(!1), [C, k] = je(!1), [N, w] = je(!0), y = VB(f, d, p, r), x = n === !1 ? 0 : n; Ke(() => { if (!x) return; w(!0); const T = setTimeout(() => w(!1), x); return () => clearTimeout(T); - }, [d, x]); + }, [f, x]); const A = !x || N || C || v; Ke(() => { const T = g.current; if (!T) return; - const R = () => m(f ? T.clientHeight : T.clientWidth), M = new ResizeObserver(R); + const R = () => m(d ? T.clientHeight : T.clientWidth), M = new ResizeObserver(R); return M.observe(T), R(), () => M.disconnect(); - }, [f, h]); + }, [d, h]); const b = { stage: u, - vertical: f, + vertical: d, layout: y, // Fresh geometry for paging steps — read from the capability, never a stale render. - liveLayout: () => VB(u.getScrollMetrics(), f, p, r), + liveLayout: () => VB(u.getScrollMetrics(), d, p, r), trackPress: o }, E = Re(b); if (E.current = b, Ke( () => g.current ? mae(g.current, { bar: () => E.current, onDragging: S }) : void 0, [h] ), !h) return null; - const I = f ? { position: "absolute", top: 0, right: 0, bottom: 0, width: 12 } : { position: "absolute", left: 0, right: 0, bottom: 0, height: 12 }, O = f ? { + const I = d ? { position: "absolute", top: 0, right: 0, bottom: 0, width: 12 } : { position: "absolute", left: 0, right: 0, bottom: 0, height: 12 }, O = d ? { position: "absolute", left: 2, right: 2, @@ -21899,7 +21930,7 @@ function IN({ { ref: g, role: "scrollbar", - "aria-orientation": f ? "vertical" : "horizontal", + "aria-orientation": d ? "vertical" : "horizontal", "aria-valuemin": 0, "aria-valuemax": Math.round(y.maxOffset), "aria-valuenow": Math.round(y.offset), @@ -21944,29 +21975,29 @@ function wue({ render: o, chrome: s }) { - const i = Re(null), a = t.transform, c = nu((h) => h.page), l = hae(a, n, { x: t.screenX, y: t.screenY }), u = t.ref.objectNumber, d = ft(() => Lt(u), [u]), f = ft( + const i = Re(null), a = t.transform, c = ru((h) => h.page), l = hae(a, n, { x: t.screenX, y: t.screenY }), u = t.ref.objectNumber, f = ft(() => Ft(u), [u]), d = ft( () => uae( e, // the hosting lens — per-view raster planning keys tile state by it, // so a thumbnail rail and the main view never fight over one plan r.getLensId(), - d, + f, t.pageIndex, n, a, () => i.current.getBoundingClientRect(), () => pae(r, u, a.deviceWidth) ), - [e, d, u, t.pageIndex, n, a, r] + [e, f, u, t.pageIndex, n, a, r] ); - return /* @__PURE__ */ P("div", { style: { position: "absolute", ...l.outer }, children: /* @__PURE__ */ P(ale, { value: f, children: [ + return /* @__PURE__ */ P("div", { style: { position: "absolute", ...l.outer }, children: /* @__PURE__ */ P(ale, { value: d, children: [ /* @__PURE__ */ P( "div", { style: { position: "absolute", ...l.shadow, - boxShadow: pt("page-shadow", c.shadow) + boxShadow: gt("page-shadow", c.shadow) } } ), @@ -21977,7 +22008,7 @@ function wue({ style: { position: "absolute", ...l.content, - background: pt("page-background", c.background), + background: gt("page-background", c.background), transform: l.turn ?? void 0, // A stacking context of its own: what a layer raises (a preview above the fields) // stays inside the page, under the next page and the overlays. @@ -21987,14 +22018,14 @@ function wue({ userSelect: "none", WebkitUserSelect: "none" }, - children: o(f) + children: o(d) } ), - s?.(f) + s?.(d) ] }) }); } function vue({ token: e }) { - const n = wt(e, (s) => s.getZoomBox()), r = wt(e, (s) => s.getSettings().zoomBox), o = nu((s) => s.accent); + const n = wt(e, (s) => s.getZoomBox()), r = wt(e, (s) => s.getSettings().zoomBox), o = ru((s) => s.accent); return n ? /* @__PURE__ */ P( "svg", { @@ -22031,7 +22062,7 @@ function O9({ className: i, style: a }) { - const c = Uf(s), l = bt(c), u = Rt(Cn); + const c = Hf(s), l = bt(c), u = Bt(Cn); Ke(() => { r === void 0 || !u || u.getActiveToolId() !== r && u.activateTool(r); }, [r, u]), hR( @@ -22039,7 +22070,7 @@ function O9({ (x) => x.onToolChanged, (x) => o?.(x.toolId) ); - const d = wt(c, (x) => x.getSettings().interaction), f = wt(c, (x) => x.getSettings().panFallback), h = wt(c, (x) => x.getSettings().zoomGestures), g = d && !!u, p = en(() => u?.getCursor() ?? "default"), m = Re(null), v = ar(), S = wt(c, (x) => x.listVisiblePages()), C = wt( + const f = wt(c, (x) => x.getSettings().interaction), d = wt(c, (x) => x.getSettings().panFallback), h = wt(c, (x) => x.getSettings().zoomGestures), g = f && !!u, p = nn(() => u?.getCursor() ?? "default"), m = Re(null), v = cr(), S = wt(c, (x) => x.listVisiblePages()), C = wt( c, (x) => x.getSettings().pageFrame, (x, A) => x.top === A.top && x.right === A.right && x.bottom === A.bottom && x.left === A.left @@ -22055,13 +22086,13 @@ function O9({ hub: g ? u : null, source: l.getLensId(), zoomGestures: h - }), b = g && u ? u.registerHandler(uue(l, u, { panFallback: f }), { + }), b = g && u ? u.registerHandler(uue(l, u, { panFallback: d }), { source: l.getLensId() }) : null, E = g && u ? u.registerHandler(due(l, u), { source: l.getLensId() }) : null; return () => { E?.(), b?.(), A(); }; - }, [l, u, g, h, f]), /* @__PURE__ */ P( + }, [l, u, g, h, d]), /* @__PURE__ */ P( "div", { ref: m, @@ -22093,11 +22124,11 @@ function O9({ ); } function y_(e) { - return bt(Uf(e)); + return bt(Hf(e)); } -function um(e, t) { - const n = Uf(t), r = vi(); - return en((o) => { +function dm(e, t) { + const n = Hf(t), r = vi(); + return nn((o) => { const s = o.tryCapability(n, r ?? void 0), i = s ? m_.read(s) : m_.empty; return e ? e(i) : i; }, hv); @@ -22193,7 +22224,7 @@ class xue { function lC(e) { return e.reason ?? new DOMException("aborted", "AbortError"); } -const NN = (e) => e.flatMap((t) => t.page ? [t.page.objectNumber] : []), uc = (e, t) => e.length ? { pages: [...new Set(e)], scope: t } : null; +const NN = (e) => e.flatMap((t) => t.page ? [t.page.objectNumber] : []), dc = (e, t) => e.length ? { pages: [...new Set(e)], scope: t } : null; function Eue(e) { const t = NN(e.meta.changedWidgets); return "widgets" in e && t.push(...NN(e.widgets)), "page" in e && e.page && t.push(e.page.objectNumber), t; @@ -22205,7 +22236,7 @@ function Cue(e, t) { case "annotations.deleted": case "annotations.restored": case "annotations.reordered": - return uc([e.page.objectNumber], "annotations"); + return dc([e.page.objectNumber], "annotations"); case "forms.valueSet": case "forms.created": case "forms.updated": @@ -22217,38 +22248,38 @@ function Cue(e, t) { case "forms.widgetRestored": case "forms.widgetUpdated": case "forms.widgetsReordered": - return uc(Eue(e), "fields"); + return dc(Eue(e), "fields"); // A coarse result (counts only, no per-widget detail): repaint every page. case "forms.repaired": - return uc(t(), "fields"); + return dc(t(), "fields"); // Sealing bakes the signature into its widget's appearance. case "signatures.completed": - return uc( + return dc( e.signature.widget ? NN([e.signature.widget]) : [], "fields" ); // These rewrite the page content itself. case "redaction.applied": case "pages.flattened": - return uc( + return dc( e.results.filter((n) => n.status === "applied").map((n) => n.page.objectNumber), "content" ); case "annotations.flattened": - return uc( + return dc( e.results.some((n) => n.status === "applied") ? [e.page.objectNumber] : [], "content" ); // The stream lost events that will never arrive: any page may be stale. case "stream.desynced": - return uc(t(), "content"); + return dc(t(), "content"); // The engine's own fonts changed, with no write behind it (a font // registered after the first pages were drawn): a page's text draws a // glyph its font lacks from a fallback, so any page may be stale. A // write's `fonts.changed` carries its `transaction`; that write's own events // repaint what it changed. case "fonts.changed": - return e.origin.transaction ? null : uc(t(), "content"); + return e.origin.transaction ? null : dc(t(), "content"); // pages.* replace the page registry: the kernel's `pagesSequence` bump already // re-keys every layout, and metadata never touches pixels. A new saved // version changes no pixels beyond the signature it seals. The @@ -22263,7 +22294,7 @@ const Iue = () => ({ fieldEpochs: {}, snapshot: null }); -function ch(e, t) { +function uh(e, t) { return e.snapshot === t ? e : { ...e, snapshot: t }; } const uC = (e, t) => { @@ -22286,14 +22317,14 @@ function Nue(e, t, n) { function Oue(e, t, n) { return (e.contentEpochs[t] ?? 0) + (n.includeAnnotations ? e.annotationEpochs[t] ?? 0 : 0) + (n.includeFormFields ? e.fieldEpochs[t] ?? 0 : 0); } -const ON = (e) => `a${e.includeAnnotations ? 1 : 0}f${e.includeFormFields ? 1 : 0}`, lh = (e, t = !1) => Object.freeze({ status: e, slow: t }), gg = { - idle: lh("idle"), - loading: lh("loading"), - slow: lh("loading", !0), - ready: lh("ready"), - forbidden: lh("forbidden"), - error: lh("error") -}, Pue = (e) => pr(e, "permission-denied") || typeof e == "object" && e !== null && e.code === "permission-denied"; +const ON = (e) => `a${e.includeAnnotations ? 1 : 0}f${e.includeFormFields ? 1 : 0}`, dh = (e, t = !1) => Object.freeze({ status: e, slow: t }), mg = { + idle: dh("idle"), + loading: dh("loading"), + slow: dh("loading", !0), + ready: dh("ready"), + forbidden: dh("forbidden"), + error: dh("error") +}, Pue = (e) => Xn(e, "permission-denied") || typeof e == "object" && e !== null && e.code === "permission-denied"; function Rue(e) { let t = null; for (const n of e.reports) { @@ -22303,7 +22334,7 @@ function Rue(e) { return t ?? "loading"; } function Tue(e, t) { - return e === "loading" ? t ? gg.slow : gg.loading : gg[e]; + return e === "loading" ? t ? mg.slow : mg.loading : mg[e]; } function Mue(e, t) { const n = /* @__PURE__ */ new Map(); @@ -22318,8 +22349,8 @@ function Mue(e, t) { if (l !== "loading") c.cancelSlow?.(), c.cancelSlow = null, c.slow = !1; else if (!c.slow && !c.cancelSlow) { - const d = e.settings().get().slowAfterMs; - d <= 0 ? c.slow = !0 : c.cancelSlow = e.clock.after(d, () => { + const f = e.settings().get().slowAfterMs; + f <= 0 ? c.slow = !0 : c.cancelSlow = e.clock.after(f, () => { c.cancelSlow = null, c.slow = !0, o(a, c); }); } @@ -22327,7 +22358,7 @@ function Mue(e, t) { c.state !== u && (c.state = u, e.notify(), t({ page: c.page, view: a, ...u })); } function s(a, c) { - return n.get(a)?.get(c)?.state ?? gg.idle; + return n.get(a)?.get(c)?.state ?? mg.idle; } function i(a, c) { const l = { shown: !1, failure: null }; @@ -22337,26 +22368,26 @@ function Mue(e, t) { } }; let u = n.get(a); u || n.set(a, u = /* @__PURE__ */ new Map()); - let d = u.get(c.objectNumber); - d || (d = { + let f = u.get(c.objectNumber); + f || (f = { page: c, reports: /* @__PURE__ */ new Set(), slow: !1, cancelSlow: null, - state: gg.idle - }, u.set(c.objectNumber, d)); - const f = d; - f.reports.add(l), o(a, f); + state: mg.idle + }, u.set(c.objectNumber, f)); + const d = f; + d.reports.add(l), o(a, d); let h = !0; return { shown() { - !h || r || l.shown || (l.shown = !0, l.failure = null, o(a, f)); + !h || r || l.shown || (l.shown = !0, l.failure = null, o(a, d)); }, failed(g) { - !h || r || l.shown || (l.failure = Pue(g) ? "forbidden" : "error", o(a, f)); + !h || r || l.shown || (l.failure = Pue(g) ? "forbidden" : "error", o(a, d)); }, close() { - !h || r || (h = !1, f.reports.delete(l), f.reports.size === 0 && n.get(a)?.get(c.objectNumber) === f && n.get(a).delete(c.objectNumber), o(a, f)); + !h || r || (h = !1, d.reports.delete(l), d.reports.size === 0 && n.get(a)?.get(c.objectNumber) === d && n.get(a).delete(c.objectNumber), o(a, d)); } }; } @@ -22463,7 +22494,7 @@ function Fue(e, { function l() { c?.abort(), c = null; const v = a; - a = null, e.state.update(ch, null), v && o.emit({ snapshot: null }); + a = null, e.state.update(uh, null), v && o.emit({ snapshot: null }); } function u(v, S) { const C = new AbortController(); @@ -22478,15 +22509,15 @@ function Fue(e, { }) ); N.catch(() => { - }), a = { page: v.page, rect: S, image: N }, e.state.update(ch, { + }), a = { page: v.page, rect: S, image: N }, e.state.update(uh, { ...v, from: { x: S.x, y: S.y }, to: { x: S.x + S.width, y: S.y + S.height }, held: !0 }), o.emit({ snapshot: a }); } - function d(v, S, C, k) { - return !i() || !e.getPage(v) ? !1 : (l(), e.state.update(ch, { + function f(v, S, C, k) { + return !i() || !e.getPage(v) ? !1 : (l(), e.state.update(uh, { page: v, from: S, to: S, @@ -22495,32 +22526,32 @@ function Fue(e, { held: !1 }), !0); } - function f(v) { + function d(v) { const S = s(), C = S && !S.held ? e.getPage(S.page)?.size : void 0; if (!S || !C) return; const k = { x: v_(v.x, 0, C.width), y: v_(v.y, 0, C.height) }; - e.state.update(ch, { ...S, to: k }); + e.state.update(uh, { ...S, to: k }); } function h() { const v = s(); if (!v || v.held) return; const S = e.getPage(v.page)?.size; if (!S) { - e.state.update(ch, null); + e.state.update(uh, null); return; } u(v, k_(v) ? A_(v) : { x: 0, y: 0, ...S }); } function g() { const v = s(); - v && !v.held && e.state.update(ch, null); + v && !v.held && e.state.update(uh, null); } const p = { id: "render-snapshot", priority: 10, enabledFor: (v) => v.enables.has(b_), // A press between pages does nothing: a box lives on one page. - onPointerDown: (v) => v.page ? d( + onPointerDown: (v) => v.page ? f( v.page.ref, v.page.point, v.page.scale ?? 1, @@ -22528,11 +22559,11 @@ function Fue(e, { ) : !1, onPointerMove: (v) => { const S = s(), C = S && T0(v, S.page); - C && f(C); + C && d(C); }, onPointerUp: (v) => { const S = s(), C = S && T0(v, S.page); - C && f(C), h(); + C && d(C), h(); }, onPointerCancel: g }, m = tt( @@ -22556,13 +22587,13 @@ function Fue(e, { const v = e.tryGet(Cn); v && (e.cleanup( v.registerTool({ - id: hg, + id: pg, cursor: "crosshair", touch: "draw", enables: /* @__PURE__ */ new Set([b_]) }) ), e.cleanup(v.registerHandler(p)), e.listen(v.onToolChanged, ({ toolId: S }) => { - S !== hg && l(); + S !== pg && l(); })); } }; @@ -22641,7 +22672,7 @@ function Kue(e, t) { const n = [...e].sort((r, o) => r - o); return n.find((r) => r >= t) ?? n[n.length - 1]; } -const mu = (e, t) => `${e}\0${t}`, Hue = 8, zue = 64; +const yu = (e, t) => `${e}\0${t}`, Hue = 8, zue = 64; class Wue { constructor(t) { this.deps = t, this.pages = /* @__PURE__ */ new Map(), this.strategy = tt( @@ -22656,28 +22687,28 @@ class Wue { if (!a) return Gk; const c = this.deps.getEpoch(n, o), l = this.pageState(n, t); l.epoch !== c && (this.abortAll(l), l.entries.clear(), l.failedKeys.clear(), l.epoch = c, l.wantScale = null, l.wantWidth = null, l.planCache = null); - const u = R9(i, r.desiredDeviceWidth), d = r.desiredDeviceWidth / u; - if (d <= i.engageRatio) - return (l.entries.size || l.wantScale !== null) && (this.deps.debug?.(`disengage page=${n} (deficit ${d.toFixed(2)})`), this.abortAll(l), l.entries.clear(), l.failedKeys.clear(), l.wantScale = null, l.wantWidth = null, l.planCache = null, this.pump()), Gk; - let f, h; - if (i.pyramid ? (h = Kue(i.pyramid, r.desiredDeviceWidth / a.width), f = Math.round(h * a.width)) : (f = Math.min( + const u = R9(i, r.desiredDeviceWidth), f = r.desiredDeviceWidth / u; + if (f <= i.engageRatio) + return (l.entries.size || l.wantScale !== null) && (this.deps.debug?.(`disengage page=${n} (deficit ${f.toFixed(2)})`), this.abortAll(l), l.entries.clear(), l.failedKeys.clear(), l.wantScale = null, l.wantWidth = null, l.planCache = null, this.pump()), Gk; + let d, h; + if (i.pyramid ? (h = Kue(i.pyramid, r.desiredDeviceWidth / a.width), d = Math.round(h * a.width)) : (d = Math.min( Math.max(1, Math.round(r.desiredDeviceWidth)), Math.round(i.tileMaxScale * a.width) - ), h = f / a.width), !r.visibleRect) { + ), h = d / a.width), !r.visibleRect) { const I = Math.max( i.tileSize, Math.floor(i.tileSize * Math.sqrt(zue * a.width / a.height)) ); - if (f > I) + if (d > I) if (this.warnedStageless || (this.warnedStageless = !0, console.warn( `[render] stage-less tile demand of ${Math.round(r.desiredDeviceWidth)} device px would tile the whole page — clamped to ${I}. Supply a visibleRect (host the page in a Stage) for sharp deep zoom.` )), i.pyramid) { const O = i.pyramid.filter( (T) => Math.round(T * a.width) <= I ); - h = O.length ? O[O.length - 1] : i.pyramid[0], f = Math.round(h * a.width); + h = O.length ? O[O.length - 1] : i.pyramid[0], d = Math.round(h * a.width); } else - f = I, h = f / a.width; + d = I, h = d / a.width; } const g = x_(a, h, i.tileSize), p = r.visibleRect ?? { x: 0, y: 0, width: a.width, height: a.height }; l.lastVisible = p; @@ -22694,14 +22725,14 @@ class Wue { a, g, h, - f, + d, o, c, m, C, p ), this.releaseCovered(n, l, a, o) && (l.version += 1, l.planCache = null); - const k = `w${f}|${que(p)}|e${c}`; + const k = `w${d}|${que(p)}|e${c}`; if (l.planCache && l.planCache.demandKey === k && l.planCache.version === l.version) return l.planCache.plan; const N = [], w = [], y = [], x = this.deps.getOptions().tiles.bleedPx; @@ -22744,7 +22775,7 @@ class Wue { } /** The layer's painted report: this key's pixels had a presentation opportunity. */ sourcePainted(t, n, r) { - const o = this.pages.get(mu(t, n)), s = o?.entries.get(r); + const o = this.pages.get(yu(t, n)), s = o?.entries.get(r); if (!o || !s || s.painted) return; s.painted = !0; const i = this.deps.getPageSize(n); @@ -22759,18 +22790,18 @@ class Wue { * pixels. Painted is a statement about the screen, so it follows the DOM. */ sourceUnpainted(t, n, r) { - const o = this.pages.get(mu(t, n))?.entries.get(r); + const o = this.pages.get(yu(t, n))?.entries.get(r); o && (o.painted = !1); } /** A lens stopped painting tiles for the page (it left the view, or its * layer paints none): stop fetching, drop bookkeeping. Resolved bytes stay * in the RasterStore for a re-mount. */ releasePage(t, n) { - const r = this.pages.get(mu(t, n)); - r && (this.abortAll(r), this.pages.delete(mu(t, n)), this.pump()); + const r = this.pages.get(yu(t, n)); + r && (this.abortAll(r), this.pages.delete(yu(t, n)), this.pump()); } pageState(t, n) { - let r = this.pages.get(mu(n, t)); + let r = this.pages.get(yu(n, t)); return r || (r = { view: n, pageObjectNumber: t, @@ -22785,15 +22816,15 @@ class Wue { cancelSettle: null, pendingLevel: null, lastVisible: null - }, this.pages.set(mu(n, t), r)), r; + }, this.pages.set(yu(n, t), r)), r; } - schedule(t, n, r, o, s, i, a, c, l, u, d) { - const f = this.deps.getOptions(), h = n.wantWidth === null, g = n.wantWidth !== null && n.wantWidth !== i; + schedule(t, n, r, o, s, i, a, c, l, u, f) { + const d = this.deps.getOptions(), h = n.wantWidth === null, g = n.wantWidth !== null && n.wantWidth !== i; g && n.failedKeys.clear(), n.wantScale = s, n.wantWidth = i; const p = (y) => this.tileKey(t, i, y, a, c), m = new Set([...l, ...u].map(p)); for (const [y, x] of n.entries) m.has(y) || (x.resolved ? x.scale === s && n.entries.delete(y) : (x.abort?.abort(), this.releaseSlot(x), n.entries.delete(y))); - const v = d.x + d.width / 2, S = d.y + d.height / 2, C = o.tileSize / o.scale, k = (y) => { + const v = f.x + f.width / 2, S = f.y + f.height / 2, C = o.tileSize / o.scale, k = (y) => { const x = (y.ix + 0.5) * C - v, A = (y.iy + 0.5) * C - S; return x * x + A * A; }, N = [...l].sort( @@ -22814,8 +22845,8 @@ class Wue { epoch: c }, this.pump(); }; - if (g && f.tiles.settleMs > 0) { - this.deps.debug?.(`arm settle page=${t} level=${i}`), n.queue = null, n.pendingLevel = i, n.cancelSettle?.(), n.cancelSettle = this.deps.after(f.tiles.settleMs, () => { + if (g && d.tiles.settleMs > 0) { + this.deps.debug?.(`arm settle page=${t} level=${i}`), n.queue = null, n.pendingLevel = i, n.cancelSettle?.(), n.cancelSettle = this.deps.after(d.tiles.settleMs, () => { n.cancelSettle = null, this.deps.debug?.( `settle fired page=${t} level=${i} current=${n.pendingLevel === i}` ), n.pendingLevel === i && w(); @@ -22869,15 +22900,15 @@ class Wue { start(t, n) { const { page: r, grid: o, wantWidth: s, layers: i, epoch: a } = t.queue, c = t.pageObjectNumber, l = this.tileKey(c, s, n, i, a), u = this.deps.getOptions().tiles.bleedPx / o.scale; this.inFlight += 1; - const d = new AbortController(), f = Vue(o, r, n), h = { + const f = new AbortController(), d = Vue(o, r, n), h = { key: l, scale: o.scale, coord: n, - rect: f, + rect: d, resolved: !1, painted: !1, charged: !0, - abort: d + abort: f }; t.entries.set(l, h), t.planCache = null, this.deps.store.acquire( l, @@ -22886,18 +22917,18 @@ class Wue { c, // The rendered region is the bled rect — it matches the bled // placement rect the paint list emits for this entry. - u > 0 ? E_(f, u, r) : f, + u > 0 ? E_(d, u, r) : d, o.scale, i, g ), - d.signal + f.signal ).then( () => { this.releaseSlot(h), t.entries.get(l) === h && (h.resolved = !0, t.version += 1, t.planCache = null, this.deps.onAdvance(c)), this.pump(); }, (g) => { - this.releaseSlot(h), t.entries.get(l) === h && (t.entries.delete(l), d.signal.aborted || (t.failedKeys.add(l), this.deps.debug?.(`tile failed ${l}: ${String(g)}`), t.version += 1, t.planCache = null, this.deps.onAdvance(c))), this.pump(); + this.releaseSlot(h), t.entries.get(l) === h && (t.entries.delete(l), f.signal.aborted || (t.failedKeys.add(l), this.deps.debug?.(`tile failed ${l}: ${String(g)}`), t.version += 1, t.planCache = null, this.deps.onAdvance(c))), this.pump(); } ); } @@ -22916,20 +22947,20 @@ class Wue { releaseCovered(t, n, r, o) { const { wantScale: s, wantWidth: i } = n; if (s === null || i === null) return !1; - const a = x_(r, s, this.strategy().tileSize), c = (d) => this.tileKey(t, i, d, o, n.epoch), l = (d) => n.entries.get(c(d))?.painted === !0; + const a = x_(r, s, this.strategy().tileSize), c = (f) => this.tileKey(t, i, f, o, n.epoch), l = (f) => n.entries.get(c(f))?.painted === !0; let u = !1; - for (const [d, f] of n.entries) { - if (f.scale === s || !f.resolved) continue; - const h = n.lastVisible ? O0(f.rect, n.lastVisible) : f.rect; + for (const [f, d] of n.entries) { + if (d.scale === s || !d.resolved) continue; + const h = n.lastVisible ? O0(d.rect, n.lastVisible) : d.rect; if ($ue(a, r, h, l)) - n.entries.delete(d), u = !0; + n.entries.delete(f), u = !0; else if (this.deps.debug && this.deps.getOptions().debug) { const g = Qk(a, r, h).filter((m) => !l(m)), p = g.slice(0, 3).map((m) => { const v = n.entries.get(c(m)), S = v ? v.resolved ? "RESOLVED-unpainted" : "PENDING" : "NO-ENTRY"; return `${m.ix},${m.iy}=${S}`; }); this.deps.debug( - `retained ${d} blocked by: ${p.join(" ")} (${g.length} missing)` + `retained ${f} blocked by: ${p.join(" ")} (${g.length} missing)` ); } } @@ -22938,7 +22969,7 @@ class Wue { /** Test/diagnostic introspection: bookkeeping size for one page. */ stats(t, n) { return { - entries: this.pages.get(mu(t, n))?.entries.size ?? 0, + entries: this.pages.get(yu(t, n))?.entries.size ?? 0, inFlight: this.inFlight }; } @@ -22969,67 +23000,67 @@ const C_ = (e) => `${e.ix},${e.iy}`, que = (e) => `${Math.round(e.x)},${Math.rou return { includeAnnotations: t?.[1] === "1", includeFormFields: t?.[2] === "1" }; }, fy = "doc.render", I_ = "doc.render.thumbnail", N_ = "doc.forms.read", Jue = "doc.annotate.read", Yue = [!1, !0].map( (e) => [!1, !0].map((t) => Object.freeze({ annotations: e, formFields: t })) -), dc = (e) => typeof e.reason == "string" ? e.reason : void 0, Que = 4; +), fc = (e) => typeof e.reason == "string" ? e.reason : void 0, Que = 4; function Xue(e) { const t = e.settings(), n = tt( () => [t.get()], (ae) => bce(ae) - ), r = new Bue(), o = new kue(), s = new xue(), i = e.events.source(), a = e.events.source(), c = e.events.source(), l = e.events.source(), u = Mue(e, l.emit), d = () => e.allows(fy), f = () => e.allows(I_); + ), r = new Bue(), o = new kue(), s = new xue(), i = e.events.source(), a = e.events.source(), c = e.events.source(), l = e.events.source(), u = Mue(e, l.emit), f = () => e.allows(fy), d = () => e.allows(I_); let h = null; const g = (ae) => { if (h) - throw new re("conflict", "render", "another plugin paints the pictures already"); - const me = ae; - h = me, e.notify(); + throw new te("conflict", "render", "another plugin paints the pictures already"); + const ge = ae; + h = ge, e.notify(); let W = !1; return () => { - W || (W = !0, h === me && (h = null, e.notify())); + W || (W = !0, h === ge && (h = null, e.notify())); }; }, p = () => Yue[e.allows("doc.annotate.read") ? 1 : 0][e.allows("doc.forms.read") ? 1 : 0], m = (ae) => { - const me = p(); + const ge = p(); return e6( { - ...ae.includeAnnotations !== void 0 && (me.annotations || !ae.includeAnnotations) ? { includeAnnotations: ae.includeAnnotations } : {}, - ...ae.includeFormFields !== void 0 && (me.formFields || !ae.includeFormFields) ? { includeFormFields: ae.includeFormFields } : {} + ...ae.includeAnnotations !== void 0 && (ge.annotations || !ae.includeAnnotations) ? { includeAnnotations: ae.includeAnnotations } : {}, + ...ae.includeFormFields !== void 0 && (ge.formFields || !ae.includeFormFields) ? { includeFormFields: ae.includeFormFields } : {} }, - me + ge ); - }, v = (ae, me) => (ae.includeAnnotations === !0 && e.assertAllowed("doc.annotate.read", me), ae.includeFormFields === !0 && e.assertAllowed(N_, me), m(ae)); + }, v = (ae, ge) => (ae.includeAnnotations === !0 && e.assertAllowed("doc.annotate.read", ge), ae.includeFormFields === !0 && e.assertAllowed(N_, ge), m(ae)); let S = !1; - const C = (ae, me) => { - S || me === void 0 || ae.format === me || (S = !0, console.warn( - `[render] format '${me}' is not in the deployment's formats — using '${ae.format}'.` + const C = (ae, ge) => { + S || ge === void 0 || ae.format === ge || (S = !0, console.warn( + `[render] format '${ge}' is not in the deployment's formats — using '${ae.format}'.` )); }; let k = !1; - const N = (ae, me) => { - k || n().tiles.enabled || ae <= me * 2 || (k = !0, console.warn( - `[render] demand is ${(ae / me).toFixed(1)}× over the base budget and the tile plane is disabled (tiles: false) — the page rests blurry. Raise fullPage.maxWidth or re-enable tiles.` + const N = (ae, ge) => { + k || n().tiles.enabled || ae <= ge * 2 || (k = !0, console.warn( + `[render] demand is ${(ae / ge).toFixed(1)}× over the base budget and the tile plane is disabled (tiles: false) — the page rests blurry. Raise fullPage.maxWidth or re-enable tiles.` )); }, w = () => e.document()?.renderPolicy ?? za, y = tt( () => [w(), n()], - (ae, me) => { - const W = P9(ae, me); - return C(W, me.format), W; + (ae, ge) => { + const W = P9(ae, ge); + return C(W, ge.format), W; } ), x = (ae) => { - const me = e.getPage(ae); - return me || e.assertPageRef(ae), me.size.width; + const ge = e.getPage(ae); + return ge || e.assertPageRef(ae), ge.size.width; }, A = () => (e.document()?.pages ?? []).map((ae) => ae.ref.objectNumber), b = (ae) => e.document()?.pendingPages.has(ae.objectNumber) ?? !1, E = (ae) => { - const me = e.document()?.pendingPages.get(ae.objectNumber); - return me?.kind === "copy" ? me.of : null; - }, I = async (ae, me) => { - await e.waitFor(() => !b(ae), me ? { signal: me } : void 0), e.getPage(ae) || e.assertPageRef(ae); - }, O = (ae, me) => { - const W = me * x(ae), Se = R9(y(), W); + const ge = e.document()?.pendingPages.get(ae.objectNumber); + return ge?.kind === "copy" ? ge.of : null; + }, I = async (ae, ge) => { + await e.waitFor(() => !b(ae), ge ? { signal: ge } : void 0), e.getPage(ae) || e.assertPageRef(ae); + }, O = (ae, ge) => { + const W = ge * x(ae), Se = R9(y(), W); return N(W, Se), { kind: "width", width: Se }; - }, T = (ae, me) => Oue(e.state.get(), ae, me), R = (ae, me, W, Se, Ae) => `${ae}|w${me}|${ON(W)}|e${T(ae, W)}${Se ? `|f${Se}` : ""}${Ae !== void 0 ? `|q${Ae}` : ""}`, M = (ae, me, W, Se) => `${ae}|thumbnail|${ON(me)}|e${T(ae, me)}${W ? `|f${W}` : ""}${Se !== void 0 ? `|q${Se}` : ""}`; - function F(ae, me, W, Se) { + }, T = (ae, ge) => Oue(e.state.get(), ae, ge), R = (ae, ge, W, Se, Ae) => `${ae}|w${ge}|${ON(W)}|e${T(ae, W)}${Se ? `|f${Se}` : ""}${Ae !== void 0 ? `|q${Ae}` : ""}`, M = (ae, ge, W, Se) => `${ae}|thumbnail|${ON(ge)}|e${T(ae, ge)}${W ? `|f${W}` : ""}${Se !== void 0 ? `|q${Se}` : ""}`; + function F(ae, ge, W, Se) { return r.acquire( - me, + ge, (ce) => { const Ne = (U) => { - const ne = e.doc.with({ + const re = e.doc.with({ priority: "high", ...W.view !== void 0 ? { view: W.view } : {} }).page(U).render.image({ @@ -23038,25 +23069,25 @@ function Xue(e) { ...W.format !== void 0 ? { format: W.format } : {}, ...W.quality !== void 0 ? { quality: W.quality } : {} }); - return ce.aborted ? ne.abort(dc(ce)) : ce.addEventListener("abort", () => ne.abort(dc(ce)), { + return ce.aborted ? re.abort(fc(ce)) : ce.addEventListener("abort", () => re.abort(fc(ce)), { once: !0 - }), ne; + }), re; }; return ((U) => b(U) ? I(U, ce).then(() => Ne(U)) : Ne(U))(E(ae) ?? ae); }, Se ).then( - (ce) => (a.emit({ page: ae, key: me }), ce), + (ce) => (a.emit({ page: ae, key: ge }), ce), (ce) => { - const Ne = qe("render", ce); - throw !pr(Ne, "operation-cancelled") && !pr(Ne, "instance-closed") && c.emit({ page: ae, key: me, error: Br(Ne) }), Ne; + const Ne = ze("render", ce); + throw !Xn(Ne, "operation-cancelled") && !Xn(Ne, "instance-closed") && c.emit({ page: ae, key: ge, error: Br(Ne) }), Ne; } ); } - async function B(ae, { scale: me, view: W, signal: Se, thumbnail: Ae, ...ce }) { - if (Ae) return _(ae, { ...ce, view: W, signal: Se }, "render.renderSource"); + async function _(ae, { scale: ge, view: W, signal: Se, thumbnail: Ae, ...ce }) { + if (Ae) return B(ae, { ...ce, view: W, signal: Se }, "render.renderSource"); e.assertAllowed(fy, "render.renderSource"); - const Ne = v(ce, "render.renderSource"), K = O(ae, me), U = y(), Z = R( + const Ne = v(ce, "render.renderSource"), K = O(ae, ge), U = y(), X = R( ae.objectNumber, K.kind === "width" ? K.width : 0, Ne, @@ -23065,7 +23096,7 @@ function Xue(e) { ); return F( ae, - Z, + X, { viewport: K, layers: Ne, @@ -23076,14 +23107,14 @@ function Xue(e) { Se ); } - function $(ae, me, W, Se, Ae, ce) { - const Ne = W.rect && O0(W.rect, { x: 0, y: 0, ...me }); + function $(ae, ge, W, Se, Ae, ce) { + const Ne = W.rect && O0(W.rect, { x: 0, y: 0, ...ge }); if (Ne && !(Ne.width > 0 && Ne.height > 0)) - throw new re("invalid-input", "render", "the rect misses the page", { + throw new te("invalid-input", "render", "the rect misses the page", { details: { field: "rect" } }); - const K = W.signal, U = (ne) => { - const xe = e.doc.with({ priority: "high" }).page(ne).render.image({ + const K = W.signal, U = (re) => { + const xe = e.doc.with({ priority: "high" }).page(re).render.image({ ...Ne ? { target: { kind: "rect", rect: Ne } } : {}, viewport: W.width !== void 0 ? { kind: "width", width: Math.max(1, Math.round(W.width)) } : { kind: "scale", scale: W.scale ?? 1 }, ...W.rotation ? { rotation: W.rotation } : {}, @@ -23091,24 +23122,24 @@ function Xue(e) { ...Ae !== void 0 ? { format: Ae } : {}, ...ce !== void 0 ? { quality: ce } : {} }); - return K?.aborted ? xe.abort(dc(K)) : K?.addEventListener("abort", () => xe.abort(dc(K)), { once: !0 }), xe; - }, Z = E(ae) ?? ae; - return b(Z) ? I(Z, K).then(() => U(Z)) : U(Z); + return K?.aborted ? xe.abort(fc(K)) : K?.addEventListener("abort", () => xe.abort(fc(K)), { once: !0 }), xe; + }, X = E(ae) ?? ae; + return b(X) ? I(X, K).then(() => U(X)) : U(X); } - async function D(ae, me = {}) { + async function D(ae, ge = {}) { e.assertAllowed(fy, "render.renderPage"); - const { ref: W, size: Se } = e.pageOf(ae), Ae = v(me, "render.renderPage"), ce = y(), Ne = me.format ?? ce.format, K = me.quality ?? ce.quality; - if (me.rect !== void 0 || me.rotation) + const { ref: W, size: Se } = e.pageOf(ae), Ae = v(ge, "render.renderPage"), ce = y(), Ne = ge.format ?? ce.format, K = ge.quality ?? ce.quality; + if (ge.rect !== void 0 || ge.rotation) return e.cancellable( - me.signal, - $(W, Se, me, Ae, Ne, K) + ge.signal, + $(W, Se, ge, Ae, Ne, K) ); - const U = Math.max(1, Math.round(me.width ?? (me.scale ?? 1) * Se.width)), Z = R(W.objectNumber, U, Ae, Ne, me.quality); + const U = Math.max(1, Math.round(ge.width ?? (ge.scale ?? 1) * Se.width)), X = R(W.objectNumber, U, Ae, Ne, ge.quality); return e.cancellable( - me.signal, + ge.signal, F( W, - Z, + X, { viewport: { kind: "width", width: U }, layers: Ae, @@ -23116,114 +23147,114 @@ function Xue(e) { quality: K, view: void 0 }, - me.signal + ge.signal ) ); } - async function _(ae, { - view: me, + async function B(ae, { + view: ge, signal: W, format: Se, quality: Ae, ...ce }, Ne) { e.assertAllowed(I_, Ne); - const K = v(ce, Ne), U = y(), Z = Se ?? U.format, ne = Ae ?? U.quality; + const K = v(ce, Ne), U = y(), X = Se ?? U.format, re = Ae ?? U.quality; return F( ae, - M(ae.objectNumber, K, Z, Ae), - { viewport: { kind: "thumbnail" }, layers: K, format: Z, quality: ne, view: me }, + M(ae.objectNumber, K, X, Ae), + { viewport: { kind: "thumbnail" }, layers: K, format: X, quality: re, view: ge }, W ); } - async function L(ae, me = {}) { + async function L(ae, ge = {}) { e.assertAllowed(fy, "render.renderPages"); - const W = Math.max(1, me.concurrency ?? Que), Se = [], Ae = [], ce = ae.map((Z, ne) => ({ page: Z, index: ne })), Ne = async () => { - for (let Z = ce.shift(); Z; Z = ce.shift()) { - const { page: ne, index: xe } = Z; + const W = Math.max(1, ge.concurrency ?? Que), Se = [], Ae = [], ce = ae.map((X, re) => ({ page: X, index: re })), Ne = async () => { + for (let X = ce.shift(); X; X = ce.shift()) { + const { page: re, index: xe } = X; try { - const _e = await D(ne, me); - Se.push({ index: xe, render: { page: e.pageOf(ne).ref, image: _e } }); - } catch (_e) { + const Le = await D(re, ge); + Se.push({ index: xe, render: { page: e.pageOf(re).ref, image: Le } }); + } catch (Le) { Ae.push({ index: xe, - ref: ne, - error: Br(qe("render", _e)) + ref: re, + error: Br(ze("render", Le)) }); } } }, K = Promise.all(Array.from({ length: Math.min(W, ce.length) }, Ne)); - await e.cancellable(me.signal, K); - const U = (Z, ne) => Z.index - ne.index; + await e.cancellable(ge.signal, K); + const U = (X, re) => X.index - re.index; return { - applied: Se.sort(U).map(({ render: Z }) => Z), + applied: Se.sort(U).map(({ render: X }) => X), skipped: [], - failed: Ae.sort(U).map(({ ref: Z, error: ne }) => ({ ref: Z, error: ne })) + failed: Ae.sort(U).map(({ ref: X, error: re }) => ({ ref: X, error: re })) }; } - async function j(ae, { family: me, scale: W, items: Se, signal: Ae }) { + async function j(ae, { family: ge, scale: W, items: Se, signal: Ae }) { e.assertAllowed( - me === "widgets" ? N_ : Jue, + ge === "widgets" ? N_ : Jue, "render.renderAppearances" ); - const ce = e.pageOf(ae).ref.objectNumber, Ne = new Map(Se.map((ne) => [oe(ne.ref), ne.version])), K = [...Ne].map(([ne, xe]) => `${ne}@${xe}`).sort(), U = `${me}|${ce}`, Z = o.acquire( + const ce = e.pageOf(ae).ref.objectNumber, Ne = new Map(Se.map((re) => [oe(re.ref), re.version])), K = [...Ne].map(([re, xe]) => `${re}@${xe}`).sort(), U = `${ge}|${ce}`, X = o.acquire( U, `${U}|s${W}|${K.join(",")}`, - async (ne) => { - b(ae) && await I(ae, ne); - const xe = e.doc.page(Lt(ce)), _e = { viewport: { kind: "scale", scale: W }, modes: ["normal"] }, Ie = me === "widgets" ? xe.forms.renderAppearances(_e) : xe.annotations.renderAppearances(_e); - ne.aborted ? Ie.abort(dc(ne)) : ne.addEventListener("abort", () => Ie.abort(dc(ne)), { + async (re) => { + b(ae) && await I(ae, re); + const xe = e.doc.page(Ft(ce)), Le = { viewport: { kind: "scale", scale: W }, modes: ["normal"] }, Ie = ge === "widgets" ? xe.forms.renderAppearances(Le) : xe.annotations.renderAppearances(Le); + re.aborted ? Ie.abort(fc(re)) : re.addEventListener("abort", () => Ie.abort(fc(re)), { once: !0 }); - const Le = (await Ie).appearances.flatMap((X) => { - const ie = Ne.get(oe(X.ref)); - return ie === void 0 ? [] : [{ ...X, version: ie }]; + const De = (await Ie).appearances.flatMap((qe) => { + const Me = Ne.get(oe(qe.ref)); + return Me === void 0 ? [] : [{ ...qe, version: Me }]; }); - return s.remember(me, Le, (X) => oe(X.ref)), Le; + return s.remember(ge, De, (qe) => oe(qe.ref)), De; }, Ae ); return e.cancellable( Ae, - Z.catch((ne) => { - throw qe("render", ne); + X.catch((re) => { + throw ze("render", re); }) ); } - function H(ae, me, W) { + function H(ae, ge, W) { if (ae.length !== 0) { - e.state.update(Nue, ae, me); + e.state.update(Nue, ae, ge); for (const Se of ae) Be(Se); i.emit({ - pages: ae.map((Se) => Lt(Se)), - scope: me, + pages: ae.map((Se) => Ft(Se)), + scope: ge, origin: W }); } } - function Y({ pages: ae, scope: me = "content" } = {}) { + function Y({ pages: ae, scope: ge = "content" } = {}) { const W = ae?.flatMap((Se) => e.getPage(Se)?.ref.objectNumber ?? []); - H(W ?? A(), me, null); + H(W ?? A(), ge, null); } - const ue = /* @__PURE__ */ new Set(); - let le = !1; + const le = /* @__PURE__ */ new Set(); + let ie = !1; const pe = (ae) => { - ue.add(ae), !le && (le = !0, e.clock.nextFrame(() => { - le = !1; - const me = [...ue]; - ue.clear(); - for (const W of me) Be(W); + le.add(ae), !ie && (ie = !0, e.clock.nextFrame(() => { + ie = !1; + const ge = [...le]; + le.clear(); + for (const W of ge) Be(W); })); - }, ge = new Wue({ + }, ve = new Wue({ store: r, getOptions: n, getPolicy: w, - getPageSize: (ae) => e.getPage(Lt(ae))?.size, + getPageSize: (ae) => e.getPage(Ft(ae))?.size, getEpoch: T, after: e.clock.after, - fetchTile: async (ae, me, W, Se, Ae, ce) => { + fetchTile: async (ae, ge, W, Se, Ae, ce) => { e.assertAllowed(fy, "render.tile"); - const Ne = Lt(me); + const Ne = Ft(ge); b(Ne) && await I(Ne, ce); const K = y(), U = e.doc.with({ priority: "high", view: ae }).page(Ne).render.image({ target: { kind: "rect", rect: W }, @@ -23232,48 +23263,48 @@ function Xue(e) { ...K.format !== void 0 ? { format: K.format } : {}, ...K.quality !== void 0 ? { quality: K.quality } : {} }); - return ce.aborted ? U.abort(dc(ce)) : ce.addEventListener("abort", () => U.abort(dc(ce)), { once: !0 }), U; + return ce.aborted ? U.abort(fc(ce)) : ce.addEventListener("abort", () => U.abort(fc(ce)), { once: !0 }), U; }, onAdvance: pe, debug: (ae) => { n().debug && console.debug(`[render] ${ae}`); } - }), Me = /* @__PURE__ */ new Map(); + }), _e = /* @__PURE__ */ new Map(); function Be(ae) { - let me = !1; - for (const [W, Se] of Me) { + let ge = !1; + for (const [W, Se] of _e) { const Ae = Se.pages.get(ae); if (!Ae) continue; - const ce = ge.plan(W, ae, Ae.demand, Ae.layers); - ce !== Ae.plan && (Ae.plan = ce, me = !0); + const ce = ve.plan(W, ae, Ae.demand, Ae.layers); + ce !== Ae.plan && (Ae.plan = ce, ge = !0); } - me && e.notify(); + ge && e.notify(); } - function te(ae) { - const me = Me.get(ae); - if (me) - return me.refs += 1, me.handle; + function ee(ae) { + const ge = _e.get(ae); + if (ge) + return ge.refs += 1, ge.handle; const W = /* @__PURE__ */ new Map(), Se = { setDemand: (Ae, ce, Ne) => { - const K = Ae.objectNumber, U = m(Ne ?? {}), Z = W.get(K), ne = ge.plan(ae, K, ce, U); - W.set(K, { demand: ce, layers: U, plan: ne }), ne !== Z?.plan && e.notify(); + const K = Ae.objectNumber, U = m(Ne ?? {}), X = W.get(K), re = ve.plan(ae, K, ce, U); + W.set(K, { demand: ce, layers: U, plan: re }), re !== X?.plan && e.notify(); }, getPlan: (Ae) => W.get(Ae.objectNumber)?.plan ?? Gk, - markPainted: (Ae, ce) => ge.sourcePainted(ae, Ae.objectNumber, ce), - markUnpainted: (Ae, ce) => ge.sourceUnpainted(ae, Ae.objectNumber, ce), + markPainted: (Ae, ce) => ve.sourcePainted(ae, Ae.objectNumber, ce), + markUnpainted: (Ae, ce) => ve.sourceUnpainted(ae, Ae.objectNumber, ce), release: (Ae) => { - W.delete(Ae.objectNumber), ge.releasePage(ae, Ae.objectNumber); + W.delete(Ae.objectNumber), ve.releasePage(ae, Ae.objectNumber); }, destroy: () => { - const Ae = Me.get(ae); + const Ae = _e.get(ae); if (!(!Ae || Ae.refs === 0) && (Ae.refs -= 1, !(Ae.refs > 0))) { for (const ce of [...Ae.pages.keys()]) - ge.releasePage(ae, ce); + ve.releasePage(ae, ce); Ae.pages.clear(); } } }; - return Me.set(ae, { handle: Se, refs: 1, pages: W }), Se; + return _e.set(ae, { handle: Se, refs: 1, pages: W }), Se; } const he = tt( () => [n().tiles.enabled], @@ -23281,8 +23312,8 @@ function Xue(e) { ); e.listen(t.api.onSettingsChanged, () => { const ae = /* @__PURE__ */ new Set(); - for (const me of Me.values()) for (const W of me.pages.keys()) ae.add(W); - for (const me of ae) Be(me); + for (const ge of _e.values()) for (const W of ge.pages.keys()) ae.add(W); + for (const ge of ae) Be(ge); }); const Te = Fue(e, { renderPage: D, @@ -23293,31 +23324,31 @@ function Xue(e) { api: { // ── public lens ── ...t.api, - canRender: d, - canRenderThumbnail: f, + canRender: f, + canRenderThumbnail: d, handOverPictures: g, getPicturePainter: () => h, renderPage: D, - renderThumbnail: async (ae, me = {}) => e.cancellable( - me.signal, - _(e.pageOf(ae).ref, me, "render.renderThumbnail") + renderThumbnail: async (ae, ge = {}) => e.cancellable( + ge.signal, + B(e.pageOf(ae).ref, ge, "render.renderThumbnail") ), renderPages: L, getRenderPolicy: w, - getRenderEpoch: (ae, me = {}) => { + getRenderEpoch: (ae, ge = {}) => { const W = e.getPage(ae); - return W ? T(W.ref.objectNumber, m(me)) : 0; + return W ? T(W.ref.objectNumber, m(ge)) : 0; }, invalidate: Y, onInvalidated: i.on, - getPictureState: (ae, me) => { + getPictureState: (ae, ge) => { const W = e.getPage(ae); - return W ? u.stateIn(me, W.ref.objectNumber) : gg.idle; + return W ? u.stateIn(ge, W.ref.objectNumber) : mg.idle; }, onPictureStateChanged: l.on, // ── host lens ── - renderSource: B, - getSourceKey: (ae, { scale: me, view: W, thumbnail: Se, ...Ae }) => { + renderSource: _, + getSourceKey: (ae, { scale: ge, view: W, thumbnail: Se, ...Ae }) => { if (Se) return M( ae.objectNumber, @@ -23325,7 +23356,7 @@ function Xue(e) { y().format, void 0 ); - const ce = O(ae, me); + const ce = O(ae, ge); return R( ae.objectNumber, ce.kind === "width" ? ce.width : 0, @@ -23337,10 +23368,10 @@ function Xue(e) { conformViewport: O, getPaintSettings: he, getLayerRights: p, - createViewDemand: te, + createViewDemand: ee, reportPicture: u.open, renderAppearances: j, - getKeptAppearances: (ae, me) => s.of(ae, oe(me)), + getKeptAppearances: (ae, ge) => s.of(ae, oe(ge)), getAppearanceScale: (ae) => rte(w(), ae), onRenderCompleted: a.on, onRenderFailed: c.on, @@ -23349,13 +23380,13 @@ function Xue(e) { }, connect() { e.listen(e.doc.events, (ae) => { - const me = Cue(ae, A); - me && H(me.pages, me.scope, "origin" in ae ? ae.origin : null); + const ge = Cue(ae, A); + ge && H(ge.pages, ge.scope, "origin" in ae ? ae.origin : null); }), Te.connect(); } }; } -const Pr = Wo, Zue = (e) => ({ +const Pr = qo, Zue = (e) => ({ id: "render", scope: "document", token: Pr, @@ -23371,16 +23402,16 @@ function ede(e) { const t = n2(e); return wi(t.subscribe, t.painted, t.painted); } -function wo(e) { +function vo(e) { const { ensure: t } = e, n = function(o) { const s = vi(); - return en((i) => { + return nn((i) => { const a = i.tryCapability(e.token, s ?? void 0), c = a ? e.read(a) : e.empty; return o ? o(c) : c; }, hv); }; return t ? function(o) { - const s = vi(), i = en( + const s = vi(), i = nn( (a) => a.tryCapability(e.token, s ?? void 0), Object.is ); @@ -23390,30 +23421,30 @@ function wo(e) { }, [i]), n(o); } : n; } -function jm(e) { +function Fm(e) { return function(n) { - return en((r) => { + return nn((r) => { const o = r.settingsOf(e).getSettings(); return n ? n(o) : o; }, hv); }; } -const tde = jm(Wo), nde = Object.freeze({ status: "idle", slow: !1 }); +const tde = Fm(qo), nde = Object.freeze({ status: "idle", slow: !1 }); function rde() { - const e = qo(); - return zt( - Wo, + const e = Go(); + return Gt( + qo, (t) => t.getPictureState(e.ref, e.view), nde ); } let O_ = !1; function B9(e = {}) { - const t = qo(), n = wt(Pr, (r) => r.getPicturePainter()); + const t = Go(), n = wt(Pr, (r) => r.getPicturePainter()); return n?.paints(t.view) ? /* @__PURE__ */ P(ode, { painter: n }) : /* @__PURE__ */ P(sde, { ...e }); } function ode({ painter: e }) { - const t = qo(), n = Re(null), r = bt(Pr), o = Re(null); + const t = Go(), n = Re(null), r = bt(Pr), o = Re(null); return Ze(() => { const s = r.reportPicture(t.view, t.ref); return o.current = { picture: e.paint(n.current, t, s), page: t }, () => { @@ -23442,14 +23473,14 @@ function sde({ tiles: n = !0, thumbnail: r = !1 }) { - const o = qo(), s = bt(Pr), i = wt(Pr, (p) => p.getPaintSettings()), a = Re(null), c = Re(null), l = { annotations: e, formFields: t }, u = ede(o.ref), d = wt(Pr, (p) => p.getLayerRights()), f = GU(u, l, d); + const o = Go(), s = bt(Pr), i = wt(Pr, (p) => p.getPaintSettings()), a = Re(null), c = Re(null), l = { annotations: e, formFields: t }, u = ede(o.ref), f = wt(Pr, (p) => p.getLayerRights()), d = GU(u, l, f); fae(u, l).length > 0 && bv( "render-layer-draws-what-a-layer-paints", " or draws what an or a on the page paints too, so it shows twice. Leave the prop out: the picture leaves out what a layer paints." ); const h = r ? { thumbnail: !0 } : {}, g = wt( Pr, - (p) => p.getSourceKey(o.ref, { scale: o.transform.renderScale, ...h, ...f }) + (p) => p.getSourceKey(o.ref, { scale: o.transform.renderScale, ...h, ...d }) ); return Ze(() => { const p = s.reportPicture(o.view, o.ref); @@ -23467,7 +23498,7 @@ function sde({ const S = await (await s.renderSource(o.ref, { scale: o.transform.renderScale, ...h, - ...f, + ...d, view: o.view, signal: p.signal })).objectUrl().abortWith(p.signal); @@ -23502,7 +23533,7 @@ function sde({ ] }); } function ide({ parts: e }) { - const t = qo(), n = bt(Pr), r = t.getViewDemand?.() ?? { + const t = Go(), n = bt(Pr), r = t.getViewDemand?.() ?? { desiredDeviceWidth: t.transform.deviceWidth }, o = ft(() => n.createViewDemand(t.view), [n, t.view]); Ke(() => () => o.destroy(), [o]), Ze(() => { @@ -23586,7 +23617,7 @@ function ade({ ); } function cde() { - return zt(Wo, (e) => e.getSnapshot(), null); + return Gt(qo, (e) => e.getSnapshot(), null); } function lde({ children: e, gap: t = 8, placement: n = "bottom" }) { const r = cde(), o = ft( @@ -23596,9 +23627,9 @@ function lde({ children: e, gap: t = 8, placement: n = "bottom" }) { return o ? /* @__PURE__ */ P(u2, { anchor: o, placement: n, gap: t, children: e }) : null; } function ude() { - const e = qo(), t = zt(Pr, (c) => c.getSnapshotBox(e.ref), null), n = tde((c) => c.snapshot.box), r = nu((c) => c.accent); + const e = Go(), t = Gt(Pr, (c) => c.getSnapshotBox(e.ref), null), n = tde((c) => c.snapshot.box), r = ru((c) => c.accent); if (!t) return null; - const { left: o, top: s, width: i, height: a } = zo(t, e.transform); + const { left: o, top: s, width: i, height: a } = Wo(t, e.transform); return /* @__PURE__ */ P( "svg", { @@ -23619,7 +23650,7 @@ function ude() { } ); } -const Fm = sn("page-edit", { +const Vm = an("page-edit", { hint: "add pageEditPlugin() from '@embedpdf/plugin-page-edit' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -23645,9 +23676,9 @@ function gde(e) { try { return await w(); } catch (y) { - throw qe("page-edit", y); + throw ze("page-edit", y); } - }, n = () => e.document()?.pages ?? pde, r = () => new re("invalid-input", "page-edit", "no pages given"), o = (w) => { + }, n = () => e.document()?.pages ?? pde, r = () => new te("invalid-input", "page-edit", "no pages given"), o = (w) => { if (w.length === 0) throw r(); return w.map((y) => e.pageOf(y).ref); }, s = (w) => !w || w === "start" || w === "end" ? w ?? "end" : "after" in w ? { after: e.pageOf(w.after).ref } : { before: e.pageOf(w.before).ref }, i = (w) => { @@ -23670,18 +23701,18 @@ function gde(e) { e.state.update(fde, y); }, l = (w, y, x) => { if (e.assertAllowed(w, y), x?.signal?.aborted) - throw new re("operation-cancelled", "page-edit", `${y} was cancelled`); + throw new te("operation-cancelled", "page-edit", `${y} was cancelled`); }, u = (w, y, x, A) => { const b = y === null ? { key: `pages.${w}` } : { key: `pages.${w}`, count: y }; return e.changes.stage({ label: b, ops: x, ...A ? { undo: A } : {} }); - }, d = async (w, y) => { + }, f = async (w, y) => { try { return (await e.cancellable(y?.signal, w.result)).items[0]; } catch (x) { - throw qe("page-edit", x); + throw ze("page-edit", x); } - }, f = async (w, y) => { - const x = await d(w, y); + }, d = async (w, y) => { + const x = await f(w, y); return { pages: "insertedPages" in x ? x.insertedPages : R_ }; }, h = (w, y) => { const x = /* @__PURE__ */ new Map(); @@ -23721,7 +23752,7 @@ function gde(e) { e.changes.sendHolds(), await e.cancellable(w?.signal, e.changes.whenSettled()); }, S = async (w, y) => (await v(y), e.cancellable(y?.signal, e.doc.pages.extract([...w]))), C = async (w, y, x, A) => { const b = y instanceof Uint8Array ? y : new Uint8Array(y); - return w === null ? f( + return w === null ? d( u("insert", null, [{ type: "pages.insert", source: b, position: x }]), A ) : m(w, A, (E) => { @@ -23729,9 +23760,9 @@ function gde(e) { "insert", w, [{ type: "pages.insert", source: b, position: x, objectNumbers: E }], - [{ type: "pages.delete", pages: E.map(Lt) }, ...g()] + [{ type: "pages.delete", pages: E.map(Ft) }, ...g()] ); - return f(I, A); + return d(I, A); }); }, k = async (w, y, x) => { const A = await t( @@ -23748,7 +23779,7 @@ function gde(e) { const b = await t(() => e.cancellable(x, A.pages.list())), E = y.map((I) => { const O = b.pages[I]; if (!O) - throw new re("not-found", "page-edit", `the PDF has no page ${I}`); + throw new te("not-found", "page-edit", `the PDF has no page ${I}`); return O.ref; }); return await t(() => e.cancellable(x, A.pages.extract(E))); @@ -23767,12 +23798,12 @@ function gde(e) { A, (E) => ((e.pageOf(E).rotation + y) % 360 + 360) % 360 ); - await d(b, x); + await f(b, x); }, setRotation: async (w, y, x) => { l(_i, "pageEdit.setRotation", x); const A = h(o(w), () => y); - await d(A, x); + await f(A, x); }, reorder: async (w, y, x) => { l(_i, "pageEdit.reorder", x); @@ -23782,20 +23813,20 @@ function gde(e) { [{ type: "pages.reorder", pages: A, position: s(y) }], [...AZ(n(), A), ...g()] ); - await d(b, x); + await f(b, x); }, delete: async (w, y) => { l(_i, "pageEdit.delete", y); const x = o(w), A = new Set(x.map((E) => E.objectNumber)); if (n().every((E) => A.has(E.ref.objectNumber))) - throw new re("invalid-input", "page-edit", "a document keeps at least one page"); + throw new te("invalid-input", "page-edit", "a document keeps at least one page"); const b = u( "delete", x.length, [{ type: "pages.delete", pages: x }], [{ type: "pages.restore", pages: S7(n(), x) }, ...g()] ); - await d(b, y); + await f(b, y); }, insertBlank: async (w = {}) => { l(_i, "pageEdit.insertBlank", w); @@ -23805,9 +23836,9 @@ function gde(e) { "insertBlank", x, [{ type: "pages.insertBlank", spec: { size: A, count: x }, position: y, objectNumbers: b }], - [{ type: "pages.delete", pages: b.map(Lt) }, ...g()] + [{ type: "pages.delete", pages: b.map(Ft) }, ...g()] ); - return f(E, w); + return d(E, w); }); }, insertFromBytes: async (w, y = {}) => { @@ -23821,11 +23852,11 @@ function gde(e) { if (l(_i, "pageEdit.insertFromDocument", x), y.length === 0) throw r(); const A = e.documentHandle(w); if (!A) - throw new re("not-found", "page-edit", `document '${w}' is not open`); - const b = e.get(It).listPages(w), E = y.map((T) => { + throw new te("not-found", "page-edit", `document '${w}' is not open`); + const b = e.get(Pt).listPages(w), E = y.map((T) => { const R = typeof T == "number" ? b[T] : b.find((M) => M.ref.objectNumber === T.objectNumber); if (!R) - throw new re( + throw new te( "not-found", "page-edit", `document '${w}' has no such page` @@ -23844,9 +23875,9 @@ function gde(e) { "duplicate", x.length, [{ type: "pages.copy", pages: x, position: A, objectNumbers: b }], - [{ type: "pages.delete", pages: b.map(Lt) }, ...g()] + [{ type: "pages.delete", pages: b.map(Ft) }, ...g()] ); - return f(E, y); + return d(E, y); }); }, extract: async (w, y) => (l(P_, "pageEdit.extract", y), S(o(w), y)) @@ -23855,10 +23886,10 @@ function gde(e) { const mde = () => ({ id: "page-edit", scope: "document", - token: Fm, + token: Vm, state: dde, create: gde -}), yde = wr(Fm, { +}), yde = wr(Vm, { read: (e) => ({ selected: e.getSelected(), canEdit: e.canEdit(), @@ -23871,9 +23902,9 @@ const mde = () => ({ } }); function bde() { - return bt(Fm); + return bt(Vm); } -const wde = wo(yde), vo = sn("i18n", { +const wde = vo(yde), ko = an("i18n", { hint: "add i18nPlugin() from '@embedpdf/plugin-i18n' to your plugins list" }); function PN(e, t) { @@ -23887,7 +23918,7 @@ const vde = [], kde = {}, Ade = { fallbackLocale: "en", locales: vde, loaders: kde -}, Pf = sn("link", { +}, Tf = an("link", { hint: "add linkPlugin() from '@embedpdf/plugin-link' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -23908,7 +23939,7 @@ function _9(e, t) { return { kind: "reported", target: e }; } } -const Vm = sn("outline", { +const $m = an("outline", { hint: "add outlinePlugin() from '@embedpdf/plugin-outline' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -23920,13 +23951,13 @@ const Vm = sn("outline", { move: !0, delete: !0 } -}), Kf = "top", it = (e) => e ? String(e.objectNumber) : Kf, Sde = Object.freeze([]), Tr = (e, t) => e.children[t] ?? Sde; +}), zf = "top", at = (e) => e ? String(e.objectNumber) : zf, Sde = Object.freeze([]), Tr = (e, t) => e.children[t] ?? Sde; function xde(e) { var r; const t = {}, n = {}; for (const o of e.items) { - const s = it(o.ref); - t[s] = o, (n[r = it(o.parent)] ?? (n[r] = [])).push(s); + const s = at(o.ref); + t[s] = o, (n[r = at(o.parent)] ?? (n[r] = [])).push(s); } return { items: t, children: n, incomplete: e.incomplete }; } @@ -23937,7 +23968,7 @@ function T_(e) { s && (t.push(s), n(o)); } }; - return n(Kf), t; + return n(zf), t; } function L9(e, t) { const n = [t]; @@ -23947,16 +23978,16 @@ function L9(e, t) { function NS(e, t) { const n = [], r = /* @__PURE__ */ new Set([t]); for (let o = e.items[t]?.parent ?? null; o; ) { - const s = it(o); + const s = at(o); if (r.has(s)) break; r.add(s), n.push(s), o = e.items[s]?.parent ?? null; } return n; } function Ede(e, t) { - const n = new Set(t.map(it)), r = /* @__PURE__ */ new Set(); + const n = new Set(t.map(at)), r = /* @__PURE__ */ new Set(); return t.filter((o) => { - const s = it(o); + const s = at(o); return r.has(s) ? !1 : (r.add(s), !NS(e, s).some((i) => n.has(i))); }); } @@ -23969,7 +24000,7 @@ function Cde(e, t) { n.push({ item: a, depth: s, hasChildren: c, expanded: l }), l && r(i, s + 1); } }; - return r(Kf, 0), n; + return r(zf, 0), n; } function Ide(e, t) { const n = []; @@ -23979,7 +24010,7 @@ function Ide(e, t) { const { destination: i } = s, a = t(i.page); if (a === null) return; const c = "y" in i ? i.y ?? 0 : 0; - n.push({ key: it(r.ref), pageIndex: a, y: c, order: o }); + n.push({ key: at(r.ref), pageIndex: a, y: c, order: o }); }), n.sort( (r, o) => r.pageIndex - o.pageIndex || r.y - o.y || r.order - o.order ); @@ -24019,16 +24050,16 @@ function Xk(e, t) { return { ...e, expanded: r }; } function M_(e, t) { - const n = t.map(it), r = t.filter((s, i) => n.indexOf(n[i]) === i); + const n = t.map(at), r = t.filter((s, i) => n.indexOf(n[i]) === i); return r.length === e.selected.length && r.every((s, i) => s.objectNumber === e.selected[i].objectNumber) ? e : { ...e, selected: r }; } function Tde(e, t) { - const n = Object.keys(e.expanded).filter((s) => !t.items[s]), r = e.selected.filter((s) => t.items[it(s)]); + const n = Object.keys(e.expanded).filter((s) => !t.items[s]), r = e.selected.filter((s) => t.items[at(s)]); if (n.length === 0 && r.length === e.selected.length) return e; const o = Xk(e, n); return r.length === e.selected.length ? o : { ...o, selected: r }; } -const Mde = (e) => e === Kf ? null : o6(Number(e)); +const Mde = (e) => e === zf ? null : o6(Number(e)); function Da(e, t, n) { const r = { ...e.children }; n.length > 0 ? r[t] = n : delete r[t]; @@ -24039,10 +24070,10 @@ function Da(e, t, n) { items: s === o ? e.items : { ...e.items, [t]: s } }; } -function $d(e, t) { +function Kd(e, t) { if (t.length === 0) return e; const n = { ...e.items }; - for (const r of t) n[it(r.ref)] = r; + for (const r of t) n[at(r.ref)] = r; return { ...e, items: n }; } function D9(e, t) { @@ -24051,7 +24082,7 @@ function D9(e, t) { const r = L9(e, t), o = { ...e.items }, s = { ...e.children }; for (const a of r) delete o[a], delete s[a]; - const i = it(n.parent); + const i = at(n.parent); return Da( { ...e, items: o, children: s }, i, @@ -24063,7 +24094,7 @@ function j9(e, t) { return n6( e.map(Mde).filter((n) => n !== null), t, - it + at ); } catch { return null; @@ -24077,21 +24108,21 @@ function Bde(e, t) { switch (t.type) { case "outline.created": return Da( - $d(e, [t.item]), - it(t.order.parent), - t.order.children.map(it) + Kd(e, [t.item]), + at(t.order.parent), + t.order.children.map(at) ); case "outline.updated": - return $d(e, [t.item]); + return Kd(e, [t.item]); case "outline.moved": { let n = e; for (const r of t.orders) { - const o = it(r.parent); - n = Da(n, o, r.children.map(it)), n = $d( + const o = at(r.parent); + n = Da(n, o, r.children.map(at)), n = Kd( n, r.children.flatMap((s) => { - const i = n.items[it(s)]; - return i && it(i.parent) !== o ? [{ ...i, parent: r.parent }] : []; + const i = n.items[at(s)]; + return i && at(i.parent) !== o ? [{ ...i, parent: r.parent }] : []; }) ); } @@ -24099,23 +24130,23 @@ function Bde(e, t) { } case "outline.deleted": { const [n] = t.deleted; - return n ? D9(e, it(n)) : e; + return n ? D9(e, at(n)) : e; } case "outline.restored": return Da( F9(e, t.items), - it(t.order.parent), - t.order.children.map(it) + at(t.order.parent), + t.order.children.map(at) ); default: return e; } } function F9(e, t) { - const n = $d(e, t), r = { ...n.children }, o = new Set(t.map((i) => it(i.ref))), s = {}; + const n = Kd(e, t), r = { ...n.children }, o = new Set(t.map((i) => at(i.ref))), s = {}; for (const i of t.slice(1)) { - const a = it(i.parent); - o.has(a) && (s[a] ?? (s[a] = [])).push(it(i.ref)); + const a = at(i.parent); + o.has(a) && (s[a] ?? (s[a] = [])).push(at(i.ref)); } for (const i of o) s[i] ? r[i] = s[i] : delete r[i]; @@ -24126,25 +24157,25 @@ function V9(e, t) { switch (t.type) { case "outline.create": { if (t.objectNumber === void 0) return e; - const n = o6(t.objectNumber), r = it(n), o = it(t.parent); - if (e.items[r] || o !== Kf && !e.items[o]) return e; + const n = o6(t.objectNumber), r = at(n), o = at(t.parent); + if (e.items[r] || o !== zf && !e.items[o]) return e; const s = Tr(e, o), i = j9(s, t.position ?? "end"); return i === null ? e : Da( - $d(e, [dZ(n, t.parent, t.data)]), + Kd(e, [dZ(n, t.parent, t.data)]), o, yR(s, i, [r]) ); } case "outline.update": { - const n = it(t.ref), r = e.items[n]; + const n = at(t.ref), r = e.items[n]; if (!r) return e; const o = fZ(r, t.patch, Tr(e, n).length > 0); - return o === r ? e : $d(e, [o]); + return o === r ? e : Kd(e, [o]); } case "outline.move": - return _de(e, t.refs.map(it), t.parent, t.position); + return _de(e, t.refs.map(at), t.parent, t.position); case "outline.delete": - return D9(e, it(t.ref)); + return D9(e, at(t.ref)); case "outline.restore": return Lde(e, t.items, t.index); default: @@ -24152,49 +24183,49 @@ function V9(e, t) { } } function _de(e, t, n, r) { - const o = it(n); - if (o !== Kf && !e.items[o] || new Set(t).size !== t.length || t.some((d) => !e.items[d])) return e; + const o = at(n); + if (o !== zf && !e.items[o] || new Set(t).size !== t.length || t.some((f) => !e.items[f])) return e; const s = new Set(t); - for (const d of t) - if (d === o || NS(e, d).some((f) => s.has(f))) + for (const f of t) + if (f === o || NS(e, f).some((d) => s.has(d))) return e; - if (NS(e, o).some((d) => s.has(d))) return e; - const i = Tr(e, o).filter((d) => !s.has(d)), a = j9(i, r); + if (NS(e, o).some((f) => s.has(f))) return e; + const i = Tr(e, o).filter((f) => !s.has(f)), a = j9(i, r); if (a === null) return e; const c = yR(i, a, t); if (Dde(c, Tr(e, o))) return e; let l = e; - const u = new Set(t.map((d) => it(e.items[d].parent))); + const u = new Set(t.map((f) => at(e.items[f].parent))); u.delete(o); - for (const d of u) + for (const f of u) l = Da( l, - d, - Tr(l, d).filter((f) => !s.has(f)) + f, + Tr(l, f).filter((d) => !s.has(d)) ); - return l = Da(l, o, c), $d( + return l = Da(l, o, c), Kd( l, - t.flatMap((d) => { - const f = l.items[d]; - return it(f.parent) === o ? [] : [{ ...f, parent: n }]; + t.flatMap((f) => { + const d = l.items[f]; + return at(d.parent) === o ? [] : [{ ...d, parent: n }]; }) ); } function Lde(e, t, n) { const [r] = t; if (!r) return e; - const o = it(r.parent); - if (o !== Kf && !e.items[o]) return e; - const s = it(r.ref); + const o = at(r.parent); + if (o !== zf && !e.items[o]) return e; + const s = at(r.ref); let i = e; for (const l of t) { - const u = i.items[it(l.ref)]; + const u = i.items[at(l.ref)]; if (!u) continue; - const d = it(u.parent); + const f = at(u.parent); i = Da( i, - d, - Tr(i, d).filter((f) => f !== it(l.ref)) + f, + Tr(i, f).filter((d) => d !== at(l.ref)) ); } const a = Tr(i, o), c = Math.max(0, Math.min(n, a.length)); @@ -24209,7 +24240,7 @@ function B_(e, t) { const s = e.items[o]; return s ? [s] : []; }), - index: Tr(e, it(n.parent)).indexOf(t) + index: Tr(e, at(n.parent)).indexOf(t) } : null; } function jde(e, t) { @@ -24218,12 +24249,12 @@ function jde(e, t) { return t.objectNumber === void 0 ? [] : [{ type: "outline.delete", ref: o6(t.objectNumber) }]; case "outline.update": case "outline.delete": { - const n = B_(e, it(t.ref)); + const n = B_(e, at(t.ref)); return n ? [n] : []; } case "outline.move": return t.refs.flatMap((r) => { - const o = B_(e, it(r)); + const o = B_(e, at(r)); return o ? [o] : []; }).sort( (r, o) => r.type === "outline.restore" && o.type === "outline.restore" ? r.index - o.index : 0 @@ -24271,17 +24302,17 @@ function Hde(e) { e.state.update(Rde, F), e.state.update(Tde, r.view() ?? F), n.emit({ outline: { items: T_(F), incomplete: F.incomplete } }); return; } - const B = M && "origin" in M ? Kde(M) : null; - B && M && "origin" in M && t.emit({ ...B, origin: M.origin }); + const _ = M && "origin" in M ? Kde(M) : null; + _ && M && "origin" in M && t.emit({ ..._, origin: M.origin }); } - }), o = () => r.view(), s = () => e.tryGet(Zt), i = tt( + }), o = () => r.view(), s = () => e.tryGet(tn), i = tt( () => [o()], (R) => R ? T_(R) : L_ - ), a = (R) => o()?.items[it(R)] ?? null, c = Mn( + ), a = (R) => o()?.items[at(R)] ?? null, c = Mn( (R) => [o()], (R, M) => M ? Tr(M, R).flatMap((F) => { - const B = M.items[F]; - return B ? [B] : []; + const _ = M.items[F]; + return _ ? [_] : []; }) : L_, { maxEntries: 256 } ), l = tt( @@ -24289,18 +24320,18 @@ function Hde(e) { (R, M) => R ? Cde(R, M) : $de ), u = tt( () => [o(), e.state.get().selected], - (R, M) => R && M.length > 0 ? M.filter((F) => R.items[it(F)] !== void 0) : Ude - ), d = tt( + (R, M) => R && M.length > 0 ? M.filter((F) => R.items[at(F)] !== void 0) : Ude + ), f = tt( () => [i(), e.document()?.pagesSequence ?? 0], (R) => Ide(R, (M) => e.getPage(M)?.index ?? null) - ), f = tt( + ), d = tt( () => { const R = s()?.getCurrentDestination() ?? null, M = R ? e.getPage(R.page)?.index ?? -1 : -1, F = R?.kind === "xyz" ? R.y ?? 0 : 0; - return [d(), M, F]; + return [f(), M, F]; }, (R, M, F) => M < 0 ? null : Ode(R, M, F) ), h = () => { - const R = f(); + const R = d(); return R ? o()?.items[R.key]?.ref ?? null : null; }, g = () => { const R = s()?.getCurrentDestination() ?? null; @@ -24309,15 +24340,15 @@ function Hde(e) { const R = o(); return R ? Object.keys(R.children).filter((M) => R.items[M]) : []; }, v = (R) => { - const M = o(), F = it(R); + const M = o(), F = at(R); return !!M && Tr(M, F).length > 0 && e.state.get().expanded[F] === !0; }, S = (R) => { const M = o(); - M && e.state.update(C1, NS(M, it(R))); + M && e.state.update(C1, NS(M, at(R))); }, C = (R) => { const M = a(R); if (!M) - throw new re("not-found", "outline", `the outline has no item ${R.objectNumber}`); + throw new te("not-found", "outline", `the outline has no item ${R.objectNumber}`); const F = e.tryGet(Lr); if (M.action && F) return { status: "dispatched", dispatch: F.execute(M.action, { @@ -24326,8 +24357,8 @@ function Hde(e) { event: { type: "activate" } }) }; if (!M.target) return { status: "none" }; - const B = e.tryGet(Pf); - if (B) return B.activate(M.target); + const _ = e.tryGet(Tf); + if (_) return _.activate(M.target); const $ = _9(M.target, (D) => e.getPage(D) !== null); switch ($.kind) { case "destination": { @@ -24343,10 +24374,10 @@ function Hde(e) { } }, k = (R, M) => { if (e.assertAllowed(__, R), M?.signal?.aborted) - throw new re("operation-cancelled", "outline", `${R} was cancelled`); + throw new te("operation-cancelled", "outline", `${R} was cancelled`); }, N = (R, M) => { if (o() && !p(R)) - throw new re( + throw new te( "not-found", "outline", `${M}: the outline has no item ${R.objectNumber}` @@ -24359,7 +24390,7 @@ function Hde(e) { try { return (await e.cancellable(M?.signal, R.result)).items[0]; } catch (F) { - throw qe("outline", F); + throw ze("outline", F); } }, x = async () => { for (; ; ) { @@ -24374,53 +24405,53 @@ function Hde(e) { const F = (await M.readText(R)).replace(/\s+/g, " ").trim(); if (F) return F.slice(0, Vde); } catch (F) { - if (R?.signal?.aborted) throw qe("outline", F); + if (R?.signal?.aborted) throw ze("outline", F); } - return e.tryGet(vo)?.t("outline.untitled", { fallback: "Untitled" }) ?? "Untitled"; + return e.tryGet(ko)?.t("outline.untitled", { fallback: "Untitled" }) ?? "Untitled"; }, b = async (R = {}, M) => { k("outline.create", M); - const { parent: F = null, position: B, title: $, target: D, color: _, bold: L, italic: j } = R; + const { parent: F = null, position: _, title: $, target: D, color: B, bold: L, italic: j } = R; F && N(F, "outline.create"); const H = D === void 0 ? g() : D, Y = { title: $ ?? await A(M), ...H ? { target: H } : {}, - ..._ !== void 0 ? { color: _ } : {}, + ...B !== void 0 ? { color: B } : {}, ...L !== void 0 ? { bold: L } : {}, ...j !== void 0 ? { italic: j } : {} - }, ue = await x(), le = w("create", [ - { type: "outline.create", parent: F, ...B ? { position: B } : {}, data: Y, objectNumber: ue } + }, le = await x(), ie = w("create", [ + { type: "outline.create", parent: F, ..._ ? { position: _ } : {}, data: Y, objectNumber: le } ]); if (M?.select) { - const ge = { kind: "objectNumber", objectNumber: ue }; - S(ge), e.state.update(M_, [ge]); + const ve = { kind: "objectNumber", objectNumber: le }; + S(ve), e.state.update(M_, [ve]); } - return { item: (await y(le, M)).item }; + return { item: (await y(ie, M)).item }; }, E = async (R, M, F) => { k("outline.update", F), N(R, "outline.update"); - const B = w("update", [{ type: "outline.update", ref: R, patch: M }]); - return { item: (await y(B, F)).item }; - }, I = async (R, M, F, B) => { - if (k("outline.move", B), R.length === 0) return; + const _ = w("update", [{ type: "outline.update", ref: R, patch: M }]); + return { item: (await y(_, F)).item }; + }, I = async (R, M, F, _) => { + if (k("outline.move", _), R.length === 0) return; for (const D of R) N(D, "outline.move"); M && N(M, "outline.move"); const $ = w("move", [{ type: "outline.move", refs: R, parent: M, position: F }]); - await y($, B); + await y($, _); }, O = async (R, M) => { k("outline.delete", M); for (const D of R) N(D, "outline.delete"); - const F = o(), B = F ? Ede(F, R) : R; - if (B.length === 0) return; + const F = o(), _ = F ? Ede(F, R) : R; + if (_.length === 0) return; const $ = w( "delete", - B.map((D) => ({ type: "outline.delete", ref: D })), - B.length + _.map((D) => ({ type: "outline.delete", ref: D })), + _.length ); await y($, M); }; return { api: { list: i, get: a, - getChildren: (R) => c(it(R)), + getChildren: (R) => c(at(R)), listRows: l, getCurrentItem: h, isIncomplete: () => o()?.incomplete ?? !1, @@ -24429,11 +24460,11 @@ function Hde(e) { refresh: (R) => e.cancellable(R?.signal, r.refresh()), isExpanded: v, expand: (R) => { - p(R) && e.state.update(C1, [it(R)]); + p(R) && e.state.update(C1, [at(R)]); }, - collapse: (R) => e.state.update(Xk, [it(R)]), + collapse: (R) => e.state.update(Xk, [at(R)]), toggle: (R) => { - v(R) ? e.state.update(Xk, [it(R)]) : p(R) && e.state.update(C1, [it(R)]); + v(R) ? e.state.update(Xk, [at(R)]) : p(R) && e.state.update(C1, [at(R)]); }, expandAll: () => e.state.update(C1, m()), collapseAll: () => e.state.update(Xk, Object.keys(e.state.get().expanded)), @@ -24453,12 +24484,12 @@ function Hde(e) { } const zde = () => ({ id: "outline", - token: Vm, + token: $m, scope: "document", - optional: [Zt, Lr, Pf, _r, vo], + optional: [tn, Lr, Tf, _r, ko], state: Pde, create: Hde -}), Wde = wr(Vm, { +}), Wde = wr($m, { read: (e) => ({ items: e.list(), rows: e.listRows(), @@ -24480,9 +24511,9 @@ const zde = () => ({ ensure: (e) => e.ensureLoaded() }); function RDe() { - return bt(Vm); + return bt($m); } -const qde = wo(Wde), $m = sn("attachment", { +const qde = vo(Wde), Um = an("attachment", { hint: "add attachmentPlugin() from '@embedpdf/plugin-attachment' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -24643,7 +24674,7 @@ function ife(e) { ]; return A.length > 0 ? A : N1; } - ), d = (y) => u().find((x) => x.id === y) ?? null, f = tt( + ), f = (y) => u().find((x) => x.id === y) ?? null, d = tt( () => [u(), e.state.get().selected], (y, x) => { if (x.length === 0) return N1; @@ -24659,22 +24690,22 @@ function ife(e) { return !(c.get() ?? []).some((A) => A.ref.key === x); }, g = (y, x, A) => { if (e.assertAllowed(y, x), A?.signal?.aborted) - throw new re("operation-cancelled", "attachment", `${x} was cancelled`); + throw new te("operation-cancelled", "attachment", `${x} was cancelled`); }, p = async (y, x) => { try { return await e.cancellable(x?.signal, y.result); } catch (A) { - throw qe("attachment", A); + throw ze("attachment", A); } }, m = (y) => { const x = l(); if (!x) - throw new re("not-found", "attachment", `${y}: no annotation plugin`); + throw new te("not-found", "attachment", `${y}: no annotation plugin`); return x; }, v = (y, x) => { const { data: A, description: b } = y, E = typeof Blob < "u" && A instanceof Blob ? A : null, I = y.name ?? (E && "name" in E ? String(E.name) : ""); if (!I) - throw new re( + throw new te( "invalid-input", "attachment", "attachment.add: a file needs a name: pass { data, name } or a File" @@ -24708,7 +24739,7 @@ function ife(e) { g(I1, "attachment.remove", x); const { ref: A } = y.home, b = c.view(); if (b && !b.some((O) => O.ref.key === A.key)) - throw new re( + throw new te( "not-found", "attachment", `attachment.remove: the document has no attachment '${A.key}'` @@ -24735,12 +24766,12 @@ function ife(e) { await e.cancellable(x?.signal, e.doc.attachments.download(y.home.ref)) ); } catch (b) { - throw qe("attachment", b); + throw ze("attachment", b); } }, N = (y) => { if (y.home.kind !== "page") return; const x = l(), A = x?.get(y.home.ref); - !x || !A || (x.selection.select([A.ref]), e.tryGet(Zt)?.reveal(A.ref.page, { + !x || !A || (x.selection.select([A.ref]), e.tryGet(tn)?.reveal(A.ref.page, { rect: A.rect, align: { x: "center", y: 0.35 }, behavior: "smooth" @@ -24748,8 +24779,8 @@ function ife(e) { }; return { api: { list: u, - get: d, - getSelected: f, + get: f, + getSelected: d, select: (y) => e.state.update( Qde, y.map((x) => x.id) @@ -24771,12 +24802,12 @@ function ife(e) { } const afe = () => ({ id: "attachment", - token: $m, + token: Um, scope: "document", - optional: [vt, Zt], + optional: [vt, tn], state: Yde, create: ife -}), cfe = wr($m, { +}), cfe = wr(Um, { read: (e) => ({ files: e.list(), selected: e.getSelected(), @@ -24794,9 +24825,9 @@ const afe = () => ({ ensure: (e) => e.ensureLoaded() }); function TDe() { - return bt($m); + return bt(Um); } -const H9 = wo(cfe), lfe = () => ({ +const H9 = vo(cfe), lfe = () => ({ activeToolId: "pointer", toolStack: [], cursor: "default" @@ -24848,63 +24879,63 @@ function gfe(e, t) { const n = e.settings(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(); let s = 0; const i = [], a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(); - let u = null, d = null, f = !1; + let u = null, f = null, d = !1; const h = e.events.source(), g = e.events.source(), p = e.events.source(), m = e.events.source(), v = e.events.source(); - e.state.onChange(({ previous: B, next: $ }) => { - B.cursor !== $.cursor && v.emit({ cursor: $.cursor }); + e.state.onChange(({ previous: _, next: $ }) => { + _.cursor !== $.cursor && v.emit({ cursor: $.cursor }); }); - const S = () => e.state.get(), C = (B) => r.get(B) ?? { id: B, cursor: "default", enables: F_ }, k = () => C(S().activeToolId), N = tt( + const S = () => e.state.get(), C = (_) => r.get(_) ?? { id: _, cursor: "default", enables: F_ }, k = () => C(S().activeToolId), N = tt( () => [s], - (B) => [...r.values()] + (_) => [...r.values()] ), w = () => { - let B = null; - for (const _ of c.values()) (!B || _.priority > B.priority) && (B = _); + let _ = null; + for (const B of c.values()) (!_ || B.priority > _.priority) && (_ = B); const $ = k(), D = l.get($.id); - return B ? D?.[B.cursor] ?? B.cursor : f ? D?.[$.cursor] ?? $.cursor : $.gapCursor ?? "default"; - }, y = () => e.state.update(ffe, w()), x = (B) => { - const $ = i.indexOf(B); - $ >= 0 && i.splice($, 1), a.delete(B), u === B && (u = null, d = null); - }, A = (B, $) => (i.push(B), $ !== void 0 && a.set(B, $), () => x(B)), b = (B) => { - r.delete(B.id); - const $ = o.get(B); - o.delete(B), $ && x($); - }, E = (B, $) => { - const D = r.get(B.id); + return _ ? D?.[_.cursor] ?? _.cursor : d ? D?.[$.cursor] ?? $.cursor : $.gapCursor ?? "default"; + }, y = () => e.state.update(ffe, w()), x = (_) => { + const $ = i.indexOf(_); + $ >= 0 && i.splice($, 1), a.delete(_), u === _ && (u = null, f = null); + }, A = (_, $) => (i.push(_), $ !== void 0 && a.set(_, $), () => x(_)), b = (_) => { + r.delete(_.id); + const $ = o.get(_); + o.delete(_), $ && x($); + }, E = (_, $) => { + const D = r.get(_.id); if (D && !$) - throw new re( + throw new te( "conflict", "interaction", - `tool '${B.id}' is already registered; pass { replace: true } to replace it` + `tool '${_.id}' is already registered; pass { replace: true } to replace it` ); D && b(D); - const _ = B.enables ? B : { ...B, enables: F_ }; - r.set(_.id, _); - const L = mfe(_); - return L && (o.set(_, L), A(L)), _; + const B = _.enables ? _ : { ..._, enables: F_ }; + r.set(B.id, B); + const L = mfe(B); + return L && (o.set(B, L), A(L)), B; }, I = () => { s += 1, e.notify(); - }, O = (B) => () => { - r.get(B.id) === B && (b(B), l.delete(B.id), I()); + }, O = (_) => () => { + r.get(_.id) === _ && (b(_), l.delete(_.id), I()); }; - for (const B of t) E(B, !0); - let T = n.get().tools.map((B) => O(E(B, !0))); - n.api.onSettingsChanged(({ changedKeys: B }) => { - if (B.includes("tools")) { + for (const _ of t) E(_, !0); + let T = n.get().tools.map((_) => O(E(_, !0))); + n.api.onSettingsChanged(({ changedKeys: _ }) => { + if (_.includes("tools")) { for (const $ of T) $(); T = n.get().tools.map(($) => O(E($, !0))), I(); } }), e.state.update(fC, n.get().defaultTool), y(); - const R = (B) => { + const R = (_) => { const $ = k(); return i.filter((D) => { - const _ = a.get(D); - return _ === void 0 || B === void 0 || _ === B; - }).filter((D) => D.enabledFor($)).sort((D, _) => _.priority - D.priority); + const B = a.get(D); + return B === void 0 || _ === void 0 || B === _; + }).filter((D) => D.enabledFor($)).sort((D, B) => B.priority - D.priority); }; - function M(B, $) { - if (!r.has(B)) throw new re("not-found", "interaction", `unknown tool '${B}'`); + function M(_, $) { + if (!r.has(_)) throw new te("not-found", "interaction", `unknown tool '${_}'`); const D = S().activeToolId; - u = null, d = null, c.clear(), e.state.update($), y(), h.emit({ toolId: B, previousToolId: D }); + u = null, f = null, c.clear(), e.state.update($), y(), h.emit({ toolId: _, previousToolId: D }); } return { api: { ...n.api, @@ -24913,27 +24944,27 @@ function gfe(e, t) { getActiveToolId: () => S().activeToolId, getDefaultToolId: () => n.get().defaultTool, listTools: N, - getTool: (B) => r.get(B) ?? null, - hasTool: (B) => r.has(B), - canUseTool: (B) => { - const $ = r.get(B); + getTool: (_) => r.get(_) ?? null, + hasTool: (_) => r.has(_), + canUseTool: (_) => { + const $ = r.get(_); return !!$ && ($.canUse?.() ?? !0); }, - activateTool: (B) => M(B, ($) => fC($, B)), + activateTool: (_) => M(_, ($) => fC($, _)), activateDefaultTool: () => { - const B = n.get().defaultTool; - M(B, ($) => fC($, B)); + const _ = n.get().defaultTool; + M(_, ($) => fC($, _)); }, - pushTool: (B) => M(B, ($) => ufe($, B)), + pushTool: (_) => M(_, ($) => ufe($, _)), popTool: () => { - const B = S().toolStack; - B.length !== 0 && M(B[B.length - 1], dfe); + const _ = S().toolStack; + _.length !== 0 && M(_[_.length - 1], dfe); }, - setToolCursor: (B, $) => { - $ === null ? l.delete(B) : l.set(B, $), y(); + setToolCursor: (_, $) => { + $ === null ? l.delete(_) : l.set(_, $), y(); }, - registerTool: (B, $) => { - const D = E(B, $?.replace ?? !1); + registerTool: (_, $) => { + const D = E(_, $?.replace ?? !1); return I(), O(D); }, onToolChanged: h.on, @@ -24941,38 +24972,38 @@ function gfe(e, t) { onGestureEnded: p.on, onGestureCancelled: m.on, // ── host ────────────────────────────────────────────────────────────── - activeToolEnables: (B) => k().enables.has(B), - registerHandler: (B, $) => A(B, $?.source), - claimCursor: (B, $, D = 0) => { - $ === null ? c.delete(B) : c.set(B, { cursor: $, priority: D }), y(); + activeToolEnables: (_) => k().enables.has(_), + registerHandler: (_, $) => A(_, $?.source), + claimCursor: (_, $, D = 0) => { + $ === null ? c.delete(_) : c.set(_, { cursor: $, priority: D }), y(); }, getCursor: () => S().cursor, hasCursorClaim: () => c.size > 0, onCursorChanged: v.on, - wouldClaimTouch: (B) => { - for (const $ of R(B.source)) if ($.claimsTouch?.(B)) return !0; + wouldClaimTouch: (_) => { + for (const $ of R(_.source)) if ($.claimsTouch?.(_)) return !0; return !1; }, - dispatchPointer: (B) => { - const $ = B.page != null; - if ($ !== f && (f = $, y()), B.phase === "down") { - u = null, d = null; - for (const D of R(B.source)) - if (D.onPointerDown(B)) { - u = D, d = { + dispatchPointer: (_) => { + const $ = _.page != null; + if ($ !== d && (d = $, y()), _.phase === "down") { + u = null, f = null; + for (const D of R(_.source)) + if (D.onPointerDown(_)) { + u = D, f = { toolId: S().activeToolId, - page: B.page?.ref ?? null, - pointerType: B.pointerType ?? "mouse" - }, g.emit(d); + page: _.page?.ref ?? null, + pointerType: _.pointerType ?? "mouse" + }, g.emit(f); break; } - } else if (B.phase === "move") - if (u) u.onPointerMove?.(B); - else for (const D of R(B.source)) D.onHover?.(B); + } else if (_.phase === "move") + if (u) u.onPointerMove?.(_); + else for (const D of R(_.source)) D.onHover?.(_); else { - const D = u, _ = d; - if (u = null, d = null, !D || !_) return; - B.phase === "cancel" ? ((D.onPointerCancel ?? D.onPointerUp)?.call(D, B), m.emit(_)) : (D.onPointerUp?.(B), p.emit(_)); + const D = u, B = f; + if (u = null, f = null, !D || !B) return; + _.phase === "cancel" ? ((D.onPointerCancel ?? D.onPointerUp)?.call(D, _), m.emit(B)) : (D.onPointerUp?.(_), p.emit(B)); } } } }; @@ -25034,9 +25065,9 @@ const yfe = (e) => ({ scope: "workspace", token: uR, create: () => ({ api: e.provider ?? wfe }) -}), kfe = wo(bfe); +}), kfe = vo(bfe); function Afe(e) { - const t = Rt(Cn), n = e && JSON.stringify(e), r = Re(e); + const t = Bt(Cn), n = e && JSON.stringify(e), r = Re(e); r.current = e, Ke(() => { const o = r.current; if (!(!o || !t)) @@ -25132,9 +25163,9 @@ function U_(e) { const t = e.results.filter((n) => n.status === "applied").map((n) => n.page); return t.length > 0 ? t : null; } -const uh = "doc.text.select", hC = "doc.text.copy", O1 = Object.freeze([]), Tfe = Object.freeze([]), Mfe = Object.freeze([]), K_ = 8, py = Number.MAX_SAFE_INTEGER; +const fh = "doc.text.select", hC = "doc.text.copy", O1 = Object.freeze([]), Tfe = Object.freeze([]), Mfe = Object.freeze([]), K_ = 8, py = Number.MAX_SAFE_INTEGER; function Bfe(e) { - const t = e.settings(), n = e.events.source(), r = e.events.source(), o = e.events.source(), s = /* @__PURE__ */ new Map(), i = () => e.state.get(), a = () => e.allows(uh), c = () => e.allows(hC), l = (L) => e.getPage(L)?.index ?? -1, u = (L) => e.document()?.pages[L]?.ref, d = e.pageMirror({ + const t = e.settings(), n = e.events.source(), r = e.events.source(), o = e.events.source(), s = /* @__PURE__ */ new Map(), i = () => e.state.get(), a = () => e.allows(fh), c = () => e.allows(hC), l = (L) => e.getPage(L)?.index ?? -1, u = (L) => e.document()?.pages[L]?.ref, f = e.pageMirror({ name: "geometry", load: (L, j) => L.page(j).text.layout(), affected: U_, @@ -25143,9 +25174,9 @@ function Bfe(e) { const j = i().selection; j && S(j); } - }), h = (L) => d.getStatus(L) === "ready" ? d.get(L) : void 0, g = (L, j) => L.charAt(j); + }), h = (L) => f.getStatus(L) === "ready" ? f.get(L) : void 0, g = (L, j) => L.charAt(j); function p(L) { - return !a() || !e.getPage(L) ? Promise.resolve() : d.ensureLoaded(L).catch(() => { + return !a() || !e.getPage(L) ? Promise.resolve() : f.ensureLoaded(L).catch(() => { }); } function m(L) { @@ -25162,22 +25193,22 @@ function Bfe(e) { const j = { anchor: v(L.anchor), focus: v(L.focus) - }, { start: H, end: Y } = m(j), ue = l(H.page), le = l(Y.page); - if (ue < 0 || le < 0) { + }, { start: H, end: Y } = m(j), le = l(H.page), ie = l(Y.page); + if (le < 0 || ie < 0) { e.state.update(hy); return; } const pe = {}; - for (let ge = ue; ge <= le; ge++) { - const Me = u(ge); - if (!Me) continue; - const Be = h(Me); + for (let ve = le; ve <= ie; ve++) { + const _e = u(ve); + if (!_e) continue; + const Be = h(_e); if (!Be) { - p(Me); + p(_e); continue; } - const te = ge === ue ? H.glyph : 0, he = ge === le ? Y.glyph : Be.charCount - 1; - pe[Me.objectNumber] = Be.segments({ start: te, count: he - te + 1 }); + const ee = ve === le ? H.glyph : 0, he = ve === ie ? Y.glyph : Be.charCount - 1; + pe[_e.objectNumber] = Be.segments({ start: ee, count: he - ee + 1 }); } e.state.update(Ofe, j, pe); } @@ -25186,10 +25217,10 @@ function Bfe(e) { (L, j) => k(L, j) ); function k(L, j) { - const H = Object.keys(j).map((Te) => Lt(Number(Te))).filter((Te) => (j[Te.objectNumber]?.length ?? 0) > 0).sort((Te, ze) => l(Te) - l(ze)), Y = H.map((Te) => ({ + const H = Object.keys(j).map((Te) => Ft(Number(Te))).filter((Te) => (j[Te.objectNumber]?.length ?? 0) > 0).sort((Te, We) => l(Te) - l(We)), Y = H.map((Te) => ({ page: Te, segments: j[Te.objectNumber] - })), ue = H.length ? H : Tfe; + })), le = H.length ? H : Tfe; if (!L) return { snapshot: { @@ -25199,37 +25230,37 @@ function Bfe(e) { direction: "forward", range: null }, - pages: ue, + pages: le, anchor: null }; - const { start: le, end: pe, direction: ge } = m(L), Me = { + const { start: ie, end: pe, direction: ve } = m(L), _e = { pages: Y, - start: N(j, le, "start"), + start: N(j, ie, "start"), end: N(j, pe, "end"), - direction: ge, + direction: ve, range: { - start: { page: le.page, index: le.glyph }, + start: { page: ie.page, index: ie.glyph }, end: { page: pe.page, index: pe.glyph + 1 } } }, Be = w(j[pe.page.objectNumber]); - let te = Be ? { page: pe.page, bounds: Be } : null; + let ee = Be ? { page: pe.page, bounds: Be } : null; const he = H[H.length - 1]; - return !te && he && (te = { page: he, bounds: w(j[he.objectNumber]) }), { snapshot: Me, pages: ue, anchor: te }; + return !ee && he && (ee = { page: he, bounds: w(j[he.objectNumber]) }), { snapshot: _e, pages: le, anchor: ee }; } function N(L, j, H) { const Y = L[j.page.objectNumber] ?? O1; if (!Y.length) return null; - const ue = H === "start" ? Y[0] : Y[Y.length - 1], le = h(j.page), pe = le ? le.charQuad(j.glyph) : null; - return le && pe ? { + const le = H === "start" ? Y[0] : Y[Y.length - 1], ie = h(j.page), pe = ie ? ie.charQuad(j.glyph) : null; + return ie && pe ? { page: j.page, glyphQuad: pe, - advance: ue.advance, + advance: le.advance, rect: fR(pe) } : { page: j.page, - glyphQuad: ue.quad, - advance: ue.advance, - rect: ue.rect + glyphQuad: le.quad, + advance: le.advance, + rect: le.rect }; } const w = (L) => L ? r9(L.map((j) => j.rect)) : null, y = Mn( @@ -25242,33 +25273,33 @@ function Bfe(e) { n.emit({ range: H.snapshot.range, pages: H.pages }), L.selection !== null && j.selection === null && o.emit({}); }); function x(L) { - e.assertAllowed(uh, "selection.select"); + e.assertAllowed(fh, "selection.select"); const j = "page" in L ? { start: { page: L.page, index: L.start }, end: { page: L.page, index: L.start + L.count } } : L; e.assertPageRef(j.start.page), e.assertPageRef(j.end.page); const H = l(j.start.page); - let Y = l(j.end.page), ue = j.end.index; - if (Y < H || Y === H && ue <= j.start.index) { + let Y = l(j.end.page), le = j.end.index; + if (Y < H || Y === H && le <= j.start.index) { e.state.update(hy); return; } - if (ue === 0) { + if (le === 0) { if (Y -= 1, Y < H) { e.state.update(hy); return; } - ue = py; + le = py; } - const le = u(Y); - le && S({ + const ie = u(Y); + ie && S({ anchor: { page: j.start.page, glyph: Math.max(0, j.start.index) }, - focus: { page: le, glyph: ue - 1 } + focus: { page: ie, glyph: le - 1 } }); } function A() { - e.assertAllowed(uh, "selection.selectAll"); + e.assertAllowed(fh, "selection.selectAll"); const L = e.document()?.pages ?? []; L.length !== 0 && S({ anchor: { page: L[0].ref, glyph: 0 }, @@ -25276,33 +25307,33 @@ function Bfe(e) { }); } function b(L) { - e.assertAllowed(uh, "selection.selectPage"); + e.assertAllowed(fh, "selection.selectPage"); const j = e.pageOf(L).ref; S({ anchor: { page: j, glyph: 0 }, focus: { page: j, glyph: py } }); } function E(L, j, H) { - e.assertAllowed(uh, `selection.select${H === "word" ? "WordAt" : "LineAt"}`); - const Y = e.pageOf(L).ref, ue = h(Y); - if (!ue) return !1; - const le = g(ue, j); - if (le == null) return !1; - const pe = H === "word" ? ue.wordAt(le) : ue.lineAt(le); + e.assertAllowed(fh, `selection.select${H === "word" ? "WordAt" : "LineAt"}`); + const Y = e.pageOf(L).ref, le = h(Y); + if (!le) return !1; + const ie = g(le, j); + if (ie == null) return !1; + const pe = H === "word" ? le.wordAt(ie) : le.lineAt(ie); return pe ? (S({ anchor: { page: Y, glyph: pe.start }, focus: { page: Y, glyph: pe.start + pe.count - 1 } }), !0) : !1; } function I(L, j) { - e.assertAllowed(uh, "selection.extendTo"); + e.assertAllowed(fh, "selection.extendTo"); const H = e.pageOf(L).ref, Y = i().selection; if (!Y) return; - const ue = h(H); - if (!ue) { + const le = h(H); + if (!le) { p(H); return; } - const le = g(ue, j); - le != null && S({ anchor: Y.anchor, focus: { page: H, glyph: le } }); + const ie = g(le, j); + ie != null && S({ anchor: Y.anchor, focus: { page: H, glyph: ie } }); } function O(L) { const j = L.objectNumber, H = s.get(j); @@ -25323,33 +25354,33 @@ function Bfe(e) { async function M(L, j) { e.assertPageRef(L.start.page), e.assertPageRef(L.end.page); const H = l(L.start.page); - let Y = l(L.end.page), ue = L.end.index; - if (Y < H || Y === H && ue <= L.start.index) + let Y = l(L.end.page), le = L.end.index; + if (Y < H || Y === H && le <= L.start.index) return ""; - ue === 0 && (Y -= 1, ue = py); - const le = []; - for (let Me = H; Me <= Y; Me++) { - const Be = u(Me); - Be && le.push({ + le === 0 && (Y -= 1, le = py); + const ie = []; + for (let _e = H; _e <= Y; _e++) { + const Be = u(_e); + Be && ie.push({ page: Be, - from: Me === H ? Math.max(0, L.start.index) : 0, - to: Me === Y ? ue : py + from: _e === H ? Math.max(0, L.start.index) : 0, + to: _e === Y ? le : py }); } - const pe = j?.signal, ge = new Array(le.length); - for (let Me = 0; Me < le.length; Me += K_) { + const pe = j?.signal, ve = new Array(ie.length); + for (let _e = 0; _e < ie.length; _e += K_) { if (pe?.aborted) - throw new re("operation-cancelled", "selection", "reading the text was cancelled"); - const Be = le.slice(Me, Me + K_); + throw new te("operation-cancelled", "selection", "reading the text was cancelled"); + const Be = ie.slice(_e, _e + K_); (await e.cancellable( pe, Promise.all(Be.map((he) => O(he.page))) )).forEach((he, Te) => { - const { from: ze, to: ae } = Be[Te]; - ge[Me + Te] = PV(he, { start: ze, count: ae - ze }); + const { from: We, to: ae } = Be[Te]; + ve[_e + Te] = PV(he, { start: We, count: ae - We }); }); } - return ge.join(` + return ve.join(` `); } function F() { @@ -25359,14 +25390,14 @@ function Bfe(e) { const j = i().selection; j && S(j); } - function B(L) { + function _(L) { for (const j of L) s.delete(j.objectNumber); e.state.update(hy); } const $ = (L) => e.state.update(Rfe, L), D = (L) => { const j = e.getPage(L); return j ? i().segments[j.ref.objectNumber] ?? O1 : O1; - }, _ = { + }, B = { ...t.api, // ── public lens ── canSelect: a, @@ -25396,7 +25427,7 @@ function Bfe(e) { onCleared: o.on, // ── host lens ── ensureLoaded: p, - isLoaded: (L) => d.getStatus(L) === "ready", + isLoaded: (L) => f.getStatus(L) === "ready", isOverText: (L, j) => { const H = h(L); return H ? g(H, j) != null : !1; @@ -25418,12 +25449,12 @@ function Bfe(e) { isHighlightVisible: () => !i().highlightHidden }; return { - api: _, + api: B, connect() { e.watch(() => e.document()?.pagesSequence ?? 0, F), e.listen(e.doc.events, (L) => { const j = U_(L); - j && B(j); - }), xfe(e, _); + j && _(j); + }), xfe(e, B); } }; } @@ -25464,7 +25495,7 @@ function Dfe(e) { end: { page: n.page, glyphQuad: n.glyphQuad, advance: n.advance } }; } -const ra = 12, P1 = 2, yu = 14, jfe = 0.05, Zk = (e, t) => ({ +const ra = 12, P1 = 2, bu = 14, jfe = 0.05, Zk = (e, t) => ({ x: (e.x + t.x) / 2, y: (e.y + t.y) / 2 }); @@ -25473,8 +25504,8 @@ function z9(e, t, n) { if (!i || !a) return null; const c = a.x - i.x, l = a.y - i.y, u = Math.hypot(c, l); if (u === 0) return null; - const d = Math.atan2(l, c) * 180 / Math.PI - 90, f = Math.abs(d) < jfe, h = c / u, g = l / u, p = n === "start" ? { x: i.x - h * ra / 2, y: i.y - g * ra / 2 } : { x: a.x + h * ra / 2, y: a.y + g * ra / 2 }; - return { bar: { from: i, to: a }, length: u, rotation: d, upright: f, head: p }; + const f = Math.atan2(l, c) * 180 / Math.PI - 90, d = Math.abs(f) < jfe, h = c / u, g = l / u, p = n === "start" ? { x: i.x - h * ra / 2, y: i.y - g * ra / 2 } : { x: a.x + h * ra / 2, y: a.y + g * ra / 2 }; + return { bar: { from: i, to: a }, length: u, rotation: f, upright: d, head: p }; } function Ffe(e, t, n, r) { const o = n.glyphQuad, s = Zk( @@ -25511,15 +25542,15 @@ function Vfe(e, t, n, r) { }; } function $fe() { - const e = qo(), t = bt(ja), n = wt( + const e = Go(), t = bt(ja), n = wt( ja, (a) => a.listSegments(e.ref), pi - ), r = wt(ja, (a) => a.isHighlightVisible()), o = q9((a) => a.color), s = nu((a) => a.accent); + ), r = wt(ja, (a) => a.isHighlightVisible()), o = q9((a) => a.color), s = ru((a) => a.accent); if (Ke(() => { t.ensureLoaded(e.ref); }, [t, e.ref]), !r) return null; - const i = pt("text-selection", o ?? Lm("text-selection", s)); + const i = gt("text-selection", o ?? Dm("text-selection", s)); return /* @__PURE__ */ P( "svg", { @@ -25546,32 +25577,32 @@ function $fe() { } ); } -const W9 = wo(Lfe), q9 = jm(_r); +const W9 = vo(Lfe), q9 = Fm(_r); function Ufe({ children: e, gap: t = 8, placement: n = "top" }) { const r = W9((s) => s.isSelecting), o = wt(_r, (s) => s.getAnchor(), LU); return r || !o ? null : /* @__PURE__ */ P(u2, { anchor: o, placement: n, gap: t, children: e }); } function Kfe({ token: e } = {}) { - const t = Uf(e), n = bt(ja), r = Rt(t), o = pue(); + const t = Hf(e), n = bt(ja), r = Bt(t), o = pue(); (!o || o.projector.space !== "overlay") && bv( "selection-handles-outside-stage", " renders nothing here: mount it in the overlay slot (a has no camera to project the handles through)." ); - const s = W9((S) => S.isSelecting), i = wt(ja, (S) => S.isHighlightVisible()), a = q9((S) => S.handles), c = nu((S) => S.accent), l = wt( + const s = W9((S) => S.isSelecting), i = wt(ja, (S) => S.isHighlightVisible()), a = q9((S) => S.handles), c = ru((S) => S.accent), l = wt( ja, (S) => Dfe(S.getSnapshot()), gie ); - en(() => r?.listVisiblePages() ?? null); - const [u, d] = De(null), f = Re( + nn(() => r?.listVisiblePages() ?? null); + const [u, f] = je(null), d = Re( null ); - f.current = r && l ? { stage: r, endpoints: l } : null; + d.current = r && l ? { stage: r, endpoints: l } : null; const h = ft(() => { const S = {}, C = (k) => (N) => { S[k]?.(), delete S[k], N && (S[k] = jse(N, { arm: () => { - const w = f.current; + const w = d.current; if (!w) return null; const y = Vfe( n, @@ -25579,13 +25610,13 @@ function Kfe({ token: e } = {}) { w.endpoints, k ); - return y ? (d(k), { + return y ? (f(k), { // the point the user grabbed: the bar's midpoint base: y.base, session: { move: y.drag.move, end: () => { - y.drag.end(), d(null); + y.drag.end(), f(null); } } }) : null; @@ -25595,10 +25626,10 @@ function Kfe({ token: e } = {}) { return { start: C("start"), end: C("end") }; }, [n]); if (!r || !l || !i || s && !u) return null; - const g = H_(r), p = pt("text-selection-handle", a.color ?? c), m = pt("text-selection-handle-shadow", a.shadow), v = (S) => { + const g = H_(r), p = gt("text-selection-handle", a.color ?? c), m = gt("text-selection-handle-shadow", a.shadow), v = (S) => { const C = z9(g, l[S], S); if (!C) return null; - const k = yu + (S === "start" ? ra : 0), N = yu + P1 / 2; + const k = bu + (S === "start" ? ra : 0), N = bu + P1 / 2; return /* @__PURE__ */ P( "div", { @@ -25607,8 +25638,8 @@ function Kfe({ token: e } = {}) { position: "absolute", left: C.bar.from.x - N, top: C.bar.from.y - k, - width: P1 + 2 * yu, - height: C.length + ra + 2 * yu, + width: P1 + 2 * bu, + height: C.length + ra + 2 * bu, // Upright text carries no transform — pixel-identical to an // axis-aligned box (the geometry's float-noise guard decides). ...C.upright ? null : { @@ -25625,7 +25656,7 @@ function Kfe({ token: e } = {}) { { style: { position: "absolute", - left: yu, + left: bu, top: k, width: P1, height: C.length, @@ -25640,7 +25671,7 @@ function Kfe({ token: e } = {}) { style: { position: "absolute", left: N - ra / 2, - top: S === "start" ? yu : yu + C.length, + top: S === "start" ? bu : bu + C.length, width: ra, height: ra, borderRadius: "50%", @@ -25660,7 +25691,7 @@ function Kfe({ token: e } = {}) { ] }); } function Hfe({ prefetch: e, onRefused: t, target: n } = {}) { - const r = Rt(_r), o = Re(t); + const r = Bt(_r), o = Re(t); return o.current = t, Ke(() => { const s = n ? n.current : void 0; if (!(!r || s === null)) @@ -25671,7 +25702,7 @@ function Hfe({ prefetch: e, onRefused: t, target: n } = {}) { }); }, [r, e, n]), null; } -const Xa = sn("fonts", { +const Xa = an("fonts", { hint: "add fontsPlugin() from '@embedpdf/plugin-fonts' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -25718,7 +25749,7 @@ const J9 = (e) => ({ e: e === "ne" || e === "e" || e === "se", n: e === "nw" || e === "n" || e === "ne", s: e === "sw" || e === "s" || e === "se" -}), Gfe = { left: 0, top: 0, right: 0, bottom: 0 }, dm = { small: !1, spread: Gfe }, Jfe = ["nw", "ne", "se", "sw"], Yfe = 6, bR = (e, t) => ({ +}), Gfe = { left: 0, top: 0, right: 0, bottom: 0 }, fm = { small: !1, spread: Gfe }, Jfe = ["nw", "ne", "se", "sw"], Yfe = 6, bR = (e, t) => ({ x: e.x - t.left, y: e.y - t.top, width: e.width + t.left + t.right, @@ -25727,9 +25758,9 @@ const J9 = (e) => ({ function Qfe(e, t, n, r) { const o = { left: n, top: n, right: n, bottom: n }; if (!r) return o; - const s = vn(e), i = Mt( - Yr(bR(e, o)).map((u) => Bt(u, s, t)) - ), a = (u, d) => u > 0 ? u : Math.min(d, 0), c = Bt( + const s = vn(e), i = Lt( + Qr(bR(e, o)).map((u) => Dt(u, s, t)) + ), a = (u, f) => u > 0 ? u : Math.min(f, 0), c = Dt( { x: a(r.x - i.x, r.x + r.width - (i.x + i.width)), y: a(r.y - i.y, r.y + r.height - (i.y + i.height)) @@ -25745,7 +25776,7 @@ function Qfe(e, t, n, r) { }; } function wR(e, t, n, r) { - return !n || n <= 0 || Math.min(e.width, e.height) > Yfe * n - 1e-6 ? dm : { small: !0, spread: Qfe(e, t, n / 2, r) }; + return !n || n <= 0 || Math.min(e.width, e.height) > Yfe * n - 1e-6 ? fm : { small: !0, spread: Qfe(e, t, n / 2, r) }; } const wv = (e, t) => { const n = J9(t); @@ -25800,7 +25831,7 @@ function Xfe(e, t, n) { return X9(e, t, n) ? 0 : Math.min( z_(e, n), z_(t, n), - ...Yr(n).map((r) => vR(r, e, t)) + ...Qr(n).map((r) => vR(r, e, t)) ); } function Zfe(e, t) { @@ -25814,18 +25845,18 @@ function vv(e, t) { } return n; } -function Mt(e) { +function Lt(e) { let t = 1 / 0, n = 1 / 0, r = -1 / 0, o = -1 / 0; for (const s of e) t = Math.min(t, s.x), n = Math.min(n, s.y), r = Math.max(r, s.x), o = Math.max(o, s.y); return { x: t, y: n, width: r - t, height: o - n }; } -const Hf = (e, t) => ({ +const Wf = (e, t) => ({ x: e.x - t, y: e.y - t, width: e.width + 2 * t, height: e.height + 2 * t -}), Yr = (e) => [ +}), Qr = (e) => [ { x: e.x, y: e.y }, { x: e.x + e.width, y: e.y }, { x: e.x + e.width, y: e.y + e.height }, @@ -25843,13 +25874,13 @@ function d2(e) { height: e.width }; } -function fm(e, t) { +function hm(e, t) { const n = zn(t); return n % 90 !== 0 ? kv(e, n) : n % 180 === 0 ? e : d2(e); } -const ehe = (e, t) => Rce(e, t * PS), Bt = (e, t, n) => ci(ehe(t, n), e); +const ehe = (e, t) => Rce(e, t * PS), Dt = (e, t, n) => ci(ehe(t, n), e); function kv(e, t, n = vn(e)) { - return t ? Mt(Yr(e).map((r) => Bt(r, n, t))) : e; + return t ? Lt(Qr(e).map((r) => Dt(r, n, t))) : e; } const kR = (e, t) => { const n = Math.max(0, e.width - 2 * t), r = Math.max(0, e.height - 2 * t); @@ -25871,7 +25902,7 @@ const kR = (e, t) => { }; function the(e, t, n, r) { if (!t) return BN(e, n, r); - const o = vn(e), s = Bt(r, o, -t), i = BN(e, n, s), a = wv(e, Z9[n]), c = Bt(a, o, t), l = vn(i), u = a.x - l.x, d = a.y - l.y, f = t * PS, h = Math.cos(f), g = Math.sin(f), p = h * u - g * d, m = g * u + h * d, v = c.x - p, S = c.y - m; + const o = vn(e), s = Dt(r, o, -t), i = BN(e, n, s), a = wv(e, Z9[n]), c = Dt(a, o, t), l = vn(i), u = a.x - l.x, f = a.y - l.y, d = t * PS, h = Math.cos(d), g = Math.sin(d), p = h * u - g * f, m = g * u + h * f, v = c.x - p, S = c.y - m; return { x: v - i.width / 2, y: S - i.height / 2, @@ -25879,7 +25910,7 @@ function the(e, t, n, r) { height: i.height }; } -function Rf(e, t, n, r, o) { +function Mf(e, t, n, r, o) { const s = 1 - o, i = [s * s * s, 3 * s * s * o, 3 * s * o * o, o * o * o]; return { x: i[0] * e.x + i[1] * t.x + i[2] * n.x + i[3] * r.x, @@ -25898,10 +25929,10 @@ function nhe(e, t, n, r, o) { Math.hypot(e.x - 2 * t.x + n.x, e.y - 2 * t.y + n.y), Math.hypot(t.x - 2 * n.x + r.x, t.y - 2 * n.y + r.y) ), i = Math.max(1, Math.ceil(Math.sqrt(0.75 * s / o))), a = []; - for (let c = 1; c <= i; c++) a.push(Rf(e, t, n, r, c / i)); + for (let c = 1; c <= i; c++) a.push(Mf(e, t, n, r, c / i)); return a; } -const Ns = (e) => Number(e.toFixed(4)).toString(), _0 = Math.PI, wl = Math.PI / 2, sa = 34 * Math.PI / 180, W_ = 30 * Math.PI / 180, _N = 12 * Math.PI / 180; +const Ns = (e) => Number(e.toFixed(4)).toString(), _0 = Math.PI, vl = Math.PI / 2, sa = 34 * Math.PI / 180, W_ = 30 * Math.PI / 180, _N = 12 * Math.PI / 180; class eK { constructor(t, n) { this.ox = t, this.oy = n, this.parts = [], this.started = !1; @@ -25936,11 +25967,11 @@ class tK { } curveTo(t, n, r, o, s, i) { const a = this.current, c = this.place(t, n), l = this.place(r, o), u = this.place(s, i); - for (const d of [ + for (const f of [ ...RS(a.x, c.x, l.x, u.x), ...RS(a.y, c.y, l.y, u.y) ]) - this.add(Rf(a, c, l, u, d)); + this.add(Mf(a, c, l, u, f)); this.add(u), this.current = u; } bounds() { @@ -25964,14 +25995,14 @@ class nK { this.current = this.place(t, n), this.lines.push([this.current]); } curveTo(t, n, r, o, s, i) { - const a = this.current, c = this.place(t, n), l = this.place(r, o), u = this.place(s, i), d = Sl(a, c) + Sl(c, l) + Sl(l, u), f = Math.max(2, Math.ceil(d / rhe)); + const a = this.current, c = this.place(t, n), l = this.place(r, o), u = this.place(s, i), f = xl(a, c) + xl(c, l) + xl(l, u), d = Math.max(2, Math.ceil(f / rhe)); let h = this.lines[this.lines.length - 1]; h || this.lines.push(h = [a]); - for (let g = 1; g <= f; g++) h.push(Rf(a, c, l, u, g / f)); + for (let g = 1; g <= d; g++) h.push(Mf(a, c, l, u, g / d)); this.current = u; } } -const Sl = (e, t) => Math.hypot(t.x - e.x, t.y - e.y), rK = (e, t) => t === 0 ? 0 : e / t, oK = (e, t) => t === 0 ? 0 : e / t; +const xl = (e, t) => Math.hypot(t.x - e.x, t.y - e.y), rK = (e, t) => t === 0 ? 0 : e / t, oK = (e, t) => t === 0 ? 0 : e / t; function ohe(e) { let t = 0; for (let n = 0; n < e.length; n++) { @@ -25992,20 +26023,20 @@ function ihe(e) { } return n; } -function mg(e, t, n, r, o, s, i, a) { - const c = Math.cos(e), l = Math.sin(e), u = Math.cos(t), d = Math.sin(t), f = Math.sin((t - e) / 2); - if (f === 0) { +function yg(e, t, n, r, o, s, i, a) { + const c = Math.cos(e), l = Math.sin(e), u = Math.cos(t), f = Math.sin(t), d = Math.sin((t - e) / 2); + if (d === 0) { a && i.moveTo(n + o * c, r + s * l); return; } - const h = 4 / 3 * (1 - Math.cos((t - e) / 2)) / f; + const h = 4 / 3 * (1 - Math.cos((t - e) / 2)) / d; a && i.moveTo(n + o * c, r + s * l), i.curveTo( n + o * (c - h * l), r + s * (l + h * c), - n + o * (u + h * d), - r + s * (d - h * u), + n + o * (u + h * f), + r + s * (f - h * u), n + o * u, - r + s * d + r + s * f ); } function pC(e, t, n, r) { @@ -26023,24 +26054,24 @@ function sK(e, t, n, r, o, s, i, a) { for (; c < 0; ) c += 2 * Math.PI; const l = c; let u = 0; - for (a && i.moveTo(o + n * Math.cos(e), s + r * Math.sin(e)); c > wl; ) - mg(e + u, e + u + wl, o, s, n, r, i, !1), u += wl, c -= wl; - c > 0 && mg(e + u, e + l, o, s, n, r, i, !1); + for (a && i.moveTo(o + n * Math.cos(e), s + r * Math.sin(e)); c > vl; ) + yg(e + u, e + u + vl, o, s, n, r, i, !1), u += vl, c -= vl; + c > 0 && yg(e + u, e + l, o, s, n, r, i, !1); } function iK(e, t, n, r, o, s, i, a, c) { const l = e + _0 + i, u = l - 22 * Math.PI / 180; - mg(l, u, r, o, n, n, a, c), sK(u, t - s, n, n, r, o, a, !1); + yg(l, u, r, o, n, n, a, c), sK(u, t - s, n, n, r, o, a, !1); } function ahe(e, t, n, r, o, s) { const i = e + _0; - mg(i + n, i + n - W_, r, o, t, t, s, !1), mg(i + n - W_, i + wl, r, o, t, t, s, !1), mg(i + wl, i + _0 - sa, r, o, t, t, s, !1); + yg(i + n, i + n - W_, r, o, t, t, s, !1), yg(i + n - W_, i + vl, r, o, t, t, s, !1), yg(i + vl, i + _0 - sa, r, o, t, t, s, !1); } function che(e, t) { const n = e + _0; return [ ...pC(n + sa, n + _N, t, t), - ...pC(n + _N, n + wl, t, t), - ...pC(n + wl, n + _0 - sa, t, t) + ...pC(n + _N, n + vl, t, t), + ...pC(n + vl, n + _0 - sa, t, t) ]; } function lhe(e, t, n, r) { @@ -26069,44 +26100,44 @@ function AR(e, t, n, r, o) { if (i < 2) return; if (n <= 0) { o.moveTo(s[0].x, s[0].y); - for (let f = 1; f < i; f++) + for (let d = 1; d < i; d++) o.curveTo( - s[f].x, - s[f].y, - s[f].x, - s[f].y, - s[f].x, - s[f].y + s[d].x, + s[d].y, + s[d].x, + s[d].y, + s[d].x, + s[d].y ); return; } let a = t ? aK(n, r) : uhe(n, r); a < 0.5 && (a = 0.5); const c = Math.cos(sa), l = []; - for (let f = 0; f + 1 < i; f++) { - const h = Sl(s[f], s[f + 1]); + for (let d = 0; d + 1 < i; d++) { + const h = xl(s[d], s[d + 1]); l.push( h <= 0 || h >= 2 * c * a ? sa : Math.acos(Math.min(1, h / (2 * a))) ); } - let u = 0, d = !1; - for (let f = 0; f + 1 < i; f++) { - const h = s[f], g = s[f + 1], p = Sl(h, g); + let u = 0, f = !1; + for (let d = 0; d + 1 < i; d++) { + const h = s[d], g = s[d + 1], p = xl(h, g); if (p === 0) continue; const m = dhe(a, c, p); if (m.n < 0) { - d || (o.moveTo(h.x, h.y), d = !0); + f || (o.moveTo(h.x, h.y), f = !0); continue; } const v = Math.max(0.5, m.adjustedRadius), S = 2 * c * v, C = c * a + c * v, k = Math.atan2(g.y - h.y, g.x - h.x); - if (f === 0) { + if (d === 0) { const E = s[i - 2]; u = Math.atan2(h.y - E.y, h.x - E.x); } const N = rK(g.x - h.x, p), w = oK(g.y - h.y, p); let y = h.x, x = h.y; - const A = l[f], b = l[f === 0 ? i - 2 : f - 1] ?? sa; - if (iK(u, k, a, h.x, h.y, A, b, o, !d), d = !0, m.n === 0) + const A = l[d], b = l[d === 0 ? i - 2 : d - 1] ?? sa; + if (iK(u, k, a, h.x, h.y, A, b, o, !f), f = !0, m.n === 0) y += p * N, x += p * w; else { y += C * N, x += C * w; @@ -26124,13 +26155,13 @@ function fhe(e, t, n, r) { if (i <= 0 || a <= 0) return []; const c = Math.max(32, Math.ceil(Math.max(i, a) * 2)), l = []; for (let u = 0; u <= c; u++) { - const d = 2 * Math.PI * u / c; - l.push({ x: o + i * Math.cos(d), y: s + a * Math.sin(d) }); + const f = 2 * Math.PI * u / c; + l.push({ x: o + i * Math.cos(f), y: s + a * Math.sin(f) }); } return l; } function q_(e, t, n, r) { - const o = Sl(e, t); + const o = xl(e, t); if (o === 0) return sa; const s = (r / 2 + (o - r) / 2) / n; return s < -1 || s > 1 ? 0 : Math.acos(s); @@ -26158,24 +26189,24 @@ function hhe(e, t, n, r, o, s, i) { s, i ); - const d = Math.sin(_N) * u - 1.5; - let f = e, h = n, g = t, p = r; - if (c > 2 * d) - f += d, h -= d; + const f = Math.sin(_N) * u - 1.5; + let d = e, h = n, g = t, p = r; + if (c > 2 * f) + d += f, h -= f; else { const E = (e + n) / 2; - f = E - 0.1, h = E + 0.1; + d = E - 0.1, h = E + 0.1; } - if (l > 2 * d) - g += d, p -= d; + if (l > 2 * f) + g += f, p -= f; else { const E = (r + t) / 2; p = E + 0.1, g = E - 0.1; } - const m = fhe(f, g, h, p); + const m = fhe(d, g, h, p); if (m.length < 2) return; let v = 0; - for (let E = 1; E < m.length; E++) v += Sl(m[E - 1], m[E]); + for (let E = 1; E < m.length; E++) v += xl(m[E - 1], m[E]); const S = Math.cos(sa); let C = Math.ceil(v / (2 * S * u)); if (C < 2) return a(); @@ -26188,14 +26219,14 @@ function hhe(e, t, n, r, o, s, i) { let w = 0; const y = s * 0.1; for (let E = 0; E + 1 < m.length; E++) { - const I = m[E], O = m[E + 1], T = Sl(I, O); + const I = m[E], O = m[E + 1], T = xl(I, O); if (T === 0) continue; let R = T + w; if (R >= k - y || E === m.length - 2) { const M = rK(O.x - I.x, T), F = oK(O.y - I.y, T); - let B = k - w; + let _ = k - w; for (; R >= k - y; ) - N.push({ x: I.x + B * M, y: I.y + B * F }), R -= k, B += k; + N.push({ x: I.x + _ * M, y: I.y + _ * F }), R -= k, _ += k; w = Math.max(0, R); } else w += T; @@ -26242,7 +26273,7 @@ function ghe(e, t, n, r) { } function mhe(e, t, n) { const r = new tK(0, 0); - return SR(e, t, n, r), Hf(r.bounds(), n / 2); + return SR(e, t, n, r), Wf(r.bounds(), n / 2); } function yhe(e, t, n) { const r = new nK(0, 0); @@ -26254,7 +26285,7 @@ function bhe(e, t, n, r) { } function whe(e, t, n, r) { const o = new tK(e.x, e.y); - return xR(e, t, n, r, o), Hf(o.bounds(), r / 2); + return xR(e, t, n, r, o), Wf(o.bounds(), r / 2); } const cK = /* @__PURE__ */ new Set(["square", "circle", "stamp", "widget"]), vhe = /* @__PURE__ */ new Set(["stamp", "widget"]), LN = (e) => e.subtype === "circle" || e.subtype === "widget" && e.fieldKind === "radio"; function khe(e) { @@ -26287,17 +26318,17 @@ function lK(e, t) { } function xhe(e, t) { const n = lK(e, t); - return n === e.box ? fm(n, e.rotation) : kv(n, e.rotation, vn(e.box)); + return n === e.box ? hm(n, e.rotation) : kv(n, e.rotation, vn(e.box)); } -function ql(e) { +function Gl(e) { const t = vn(e.box); - return Yr(e.box).map( - (n) => Bt(n, t, e.rotation) + return Qr(e.box).map( + (n) => Dt(n, t, e.rotation) ); } function uK(e, t, n) { - const r = e.rotation ? Bt(t, vn(e.box), -e.rotation) : t; - return Q9(Hf(e.box, n), r); + const r = e.rotation ? Dt(t, vn(e.box), -e.rotation) : t; + return Q9(Wf(e.box, n), r); } function ER(e, t) { return { ...e, box: { ...e.box, x: e.box.x + t.x, y: e.box.y + t.y } }; @@ -26311,7 +26342,7 @@ const dK = (e, t) => ({ function fK(e, t, n) { return { ...e, - box: dK(Bt(vn(e.box), t, n), e.box), + box: dK(Dt(vn(e.box), t, n), e.box), rotation: zn(e.rotation + n) }; } @@ -26329,11 +26360,11 @@ function CR(e, t, n, r, o = 0) { }; } const hK = (e, t, n) => wR(e.box, e.rotation, t, n); -function pK(e, t = dm) { +function pK(e, t = fm) { const n = vn(e.box), r = bR(e.box, t.spread); return Y9(t).map((o) => ({ id: o, - at: Bt(wv(r, o), n, e.rotation), + at: Dt(wv(r, o), n, e.rotation), cursor: qfe(o, e.rotation) })); } @@ -26341,7 +26372,7 @@ function gK(e, t, n) { return { ...e, box: the(e.box, e.rotation, t, n) }; } function Ehe(e, t, n) { - const { strokeWidth: r, cloudyIntensity: o } = t, { box: s, rotation: i, ellipse: a } = e, c = r / 2, l = vn(s), u = (h) => i ? h.map((g) => Bt(g, l, i)) : h; + const { strokeWidth: r, cloudyIntensity: o } = t, { box: s, rotation: i, ellipse: a } = e, c = r / 2, l = vn(s), u = (h) => i ? h.map((g) => Dt(g, l, i)) : h; if (o && s.width > 0 && s.height > 0) { const h = bhe(s, a, o, r).map(u), g = h.map( (m) => ({ kind: "stroke", points: m, closed: !0, halfWidth: c }) @@ -26354,21 +26385,21 @@ function Ehe(e, t, n) { rotation: i, halfWidth: 0, filled: !0 - } : { kind: "area", ring: ql(e) }, ...h.map((m) => ({ kind: "area", ring: m })), ...g] : g; + } : { kind: "area", ring: Gl(e) }, ...h.map((m) => ({ kind: "area", ring: m })), ...g] : g; } - const d = kR(s, c); + const f = kR(s, c); if (a) { if (s.width <= 0 || s.height <= 0) return []; - const h = Math.max(0.01, d.width / 2), g = Math.max(0.01, d.height / 2); + const h = Math.max(0.01, f.width / 2), g = Math.max(0.01, f.height / 2); return [{ kind: "oval", center: l, rx: h, ry: g, rotation: i, halfWidth: c, filled: n }]; } - const f = { + const d = { kind: "stroke", - points: u(Yr(d)), + points: u(Qr(f)), closed: !0, halfWidth: c }; - return n ? [{ kind: "area", ring: ql(e) }, f] : [f]; + return n ? [{ kind: "area", ring: Gl(e) }, d] : [d]; } function Che(e, t) { const { strokeWidth: n, cloudyIntensity: r } = t; @@ -26391,7 +26422,7 @@ const vr = { rect: xhe, selectionBounds: (e) => e.box, oriented: () => !0, - turnedCorners: ql, + turnedCorners: Gl, pivot: (e) => vn(e.box), translate: ER, rotateAbout: fK, @@ -26430,13 +26461,13 @@ function Phe(e, t) { return Zfe(e.ring, t); case "oval": { if (e.rx <= 0 || e.ry <= 0) return !1; - const n = Yr(t).map((a) => mK(e, a)), r = { x: 0, y: 0 }, o = vv(r, n) ? 0 : Math.min(...n.map((a, c) => vR(r, a, n[(c + 1) % 4]))), s = Math.max(...n.map((a) => Math.hypot(a.x, a.y))), i = yK(e, e.halfWidth); + const n = Qr(t).map((a) => mK(e, a)), r = { x: 0, y: 0 }, o = vv(r, n) ? 0 : Math.min(...n.map((a, c) => vR(r, a, n[(c + 1) % 4]))), s = Math.max(...n.map((a) => Math.hypot(a.x, a.y))), i = yK(e, e.halfWidth); return o <= 1 + i && (e.filled || s >= 1 - i); } } } function mK(e, t) { - const n = e.rotation ? Bt(t, e.center, -e.rotation) : t; + const n = e.rotation ? Dt(t, e.center, -e.rotation) : t; return { x: (n.x - e.center.x) / e.rx, y: (n.y - e.center.y) / e.ry }; } const yK = (e, t) => t / Math.min(e.rx, e.ry); @@ -26462,10 +26493,10 @@ function wK(e) { const t = e.glyphQuad, n = Math.hypot(t.lowerLeft.x - t.upperLeft.x, t.lowerLeft.y - t.upperLeft.y), r = Math.max(n / 2, 1), o = e.advance > 0 ? t.lowerRight : t.lowerLeft, s = t.lowerRight.x - t.lowerLeft.x, i = t.lowerRight.y - t.lowerLeft.y, a = Math.hypot(s, i) > 0 ? zn(Math.atan2(i, s) * 180 / Math.PI) : 0; if (a < G_ || a > 360 - G_) return { kind: "caret", box: Mhe(e), rotation: 0 }; - const c = (t.upperLeft.x - t.lowerLeft.x) / n, l = (t.upperLeft.y - t.lowerLeft.y) / n, u = o.x + c * r / 2, d = o.y + l * r / 2; + const c = (t.upperLeft.x - t.lowerLeft.x) / n, l = (t.upperLeft.y - t.lowerLeft.y) / n, u = o.x + c * r / 2, f = o.y + l * r / 2; return { kind: "caret", - box: { x: u - r / 2, y: d - r / 2, width: r, height: r }, + box: { x: u - r / 2, y: f - r / 2, width: r, height: r }, rotation: a }; } @@ -26492,7 +26523,7 @@ const kK = { rect: (e) => kv(J_(e), e.rotation, vn(e.box)), selectionBounds: (e) => e.box, oriented: () => !0, - turnedCorners: ql, + turnedCorners: Gl, pivot: (e) => vn(e.box), translate: ER, rotateAbout: (e) => e, @@ -26501,7 +26532,7 @@ const kK = { handles: () => [], drag: (e) => e, // A caret paints its whole box: the mark is small. - painted: (e) => IR(ql(e)), + painted: (e) => IR(Gl(e)), scene: Bhe }, R1 = (e) => ({ shape: "poly", @@ -26591,7 +26622,7 @@ function DN(e, t, n, r) { const s = o.rotation(t); return o.points(r).map((i) => AK(i, s, e)); } -function Gl(e, t, n, r) { +function Jl(e, t, n, r) { const o = SK(n); if (!o) return []; const s = o.rotation(t), i = o.points(r).map((a) => AK(a, s, e)); @@ -26638,7 +26669,7 @@ function NR(e, t) { return r.closed ? [{ kind: "area", ring: r.points }, o] : [o]; }); } -const Lhe = Math.SQRT2, Od = 0.5, ll = (e, t) => ({ x: e.x + t.x, y: e.y + t.y }), Ud = (e, t) => ({ x: e.x - t.x, y: e.y - t.y }), No = (e, t) => ({ x: e.x * t, y: e.y * t }), ul = (e, t) => e.x * t.x + e.y * t.y, f2 = (e, t) => Math.hypot(e.x - t.x, e.y - t.y); +const Lhe = Math.SQRT2, Rd = 0.5, ul = (e, t) => ({ x: e.x + t.x, y: e.y + t.y }), Hd = (e, t) => ({ x: e.x - t.x, y: e.y - t.y }), Oo = (e, t) => ({ x: e.x * t, y: e.y * t }), dl = (e, t) => e.x * t.x + e.y * t.y, f2 = (e, t) => Math.hypot(e.x - t.x, e.y - t.y); function gC(e) { const t = Math.hypot(e.x, e.y); return t === 0 ? { x: 0, y: 0 } : { x: e.x / t, y: e.y / t }; @@ -26654,21 +26685,21 @@ function jhe(e, t, n) { const r = e[t.first], o = e[t.last]; let s = 0, i = 0, a = 0, c = 0, l = 0; n.forEach((g, p) => { - const m = 1 - g, v = m * m * m, S = 3 * g * m * m, C = 3 * g * g * m, k = g * g * g, N = No(t.leaving, S), w = No(t.arriving, C); - s += ul(N, N), i += ul(N, w), a += ul(w, w); - const y = Ud( + const m = 1 - g, v = m * m * m, S = 3 * g * m * m, C = 3 * g * g * m, k = g * g * g, N = Oo(t.leaving, S), w = Oo(t.arriving, C); + s += dl(N, N), i += dl(N, w), a += dl(w, w); + const y = Hd( e[t.first + p], - ll(ll(No(r, v), No(r, S)), ll(No(o, C), No(o, k))) + ul(ul(Oo(r, v), Oo(r, S)), ul(Oo(o, C), Oo(o, k))) ); - c += ul(N, y), l += ul(w, y); + c += dl(N, y), l += dl(w, y); }); const u = s * a - i * i; - let d = u === 0 ? 0 : (c * a - l * i) / u, f = u === 0 ? 0 : (s * l - i * c) / u; + let f = u === 0 ? 0 : (c * a - l * i) / u, d = u === 0 ? 0 : (s * l - i * c) / u; const h = f2(o, r); - return (d < 1e-6 * h || f < 1e-6 * h) && (d = h / 3, f = h / 3), [ + return (f < 1e-6 * h || d < 1e-6 * h) && (f = h / 3, d = h / 3), [ r, - ll(r, No(t.leaving, d)), - ll(o, No(t.arriving, f)), + ul(r, Oo(t.leaving, f)), + ul(o, Oo(t.arriving, d)), o ]; } @@ -26676,23 +26707,23 @@ function Fhe(e, t, n, r) { const [o, s, i, a] = r; let c = { squared: 0, index: Math.floor((t.last - t.first + 1) / 2) + t.first }; for (let l = t.first + 1; l < t.last; l++) { - const u = Ud(Rf(o, s, i, a, n[l - t.first]), e[l]), d = ul(u, u); - d >= c.squared && (c = { squared: d, index: l }); + const u = Hd(Mf(o, s, i, a, n[l - t.first]), e[l]), f = dl(u, u); + f >= c.squared && (c = { squared: f, index: l }); } return c; } function Vhe(e, t, n) { - const r = Ud(n, t), o = ul(r, r), s = o === 0 ? 0 : Math.min(1, Math.max(0, ul(Ud(e, t), r) / o)); - return f2(e, ll(t, No(r, s))); + const r = Hd(n, t), o = dl(r, r), s = o === 0 ? 0 : Math.min(1, Math.max(0, dl(Hd(e, t), r) / o)); + return f2(e, ul(t, Oo(r, s))); } function $he(e, t, n) { const [r, o, s, i] = n; let a = 0; for (let c = 0; c <= 64; c++) { - const l = Rf(r, o, s, i, c / 64); + const l = Mf(r, o, s, i, c / 64); let u = 1 / 0; - for (let d = t.first; d < t.last; d++) - u = Math.min(u, Vhe(l, e[d], e[d + 1])); + for (let f = t.first; f < t.last; f++) + u = Math.min(u, Vhe(l, e[f], e[f + 1])); a = Math.max(a, u); } return a; @@ -26709,8 +26740,8 @@ function Uhe(e, t = Lhe) { { first: 0, last: o, - leaving: gC(Ud(n[1], n[0])), - arriving: gC(Ud(n[o - 1], n[o])) + leaving: gC(Hd(n[1], n[0])), + arriving: gC(Hd(n[o - 1], n[o])) } ]; for (; s.length > 0; ) { @@ -26718,24 +26749,24 @@ function Uhe(e, t = Lhe) { if (i.last - i.first === 1) { const g = f2(c, a) / 3; r.push({ - control1: ll(a, No(i.leaving, g)), - control2: ll(c, No(i.arriving, g)), + control1: ul(a, Oo(i.leaving, g)), + control2: ul(c, Oo(i.arriving, g)), end: c }); continue; } - const l = Dhe(n, i), u = jhe(n, i, l), d = Fhe(n, i, l, u); - if (d.squared < t * t && $he(n, i, u) < t) { + const l = Dhe(n, i), u = jhe(n, i, l), f = Fhe(n, i, l, u); + if (f.squared < t * t && $he(n, i, u) < t) { r.push({ control1: u[1], control2: u[2], end: c }); continue; } - const f = d.index, h = gC(Ud(n[f - 1], n[f + 1])); + const d = f.index, h = gC(Hd(n[d - 1], n[d + 1])); s.push({ - first: f, + first: d, last: i.last, - leaving: No(h, -1), + leaving: Oo(h, -1), arriving: i.arriving - }), s.push({ first: i.first, last: f, leaving: i.leaving, arriving: h }); + }), s.push({ first: i.first, last: d, leaving: i.leaving, arriving: h }); } return { kind: "curves", start: n[0], cubics: r }; } @@ -26841,13 +26872,13 @@ function p2(e) { const [t, n] = Za(e)[0]; return { start: t, end: n }; } -const Xhe = (e) => Za(e)[0], Av = (e) => vn(Mt(h2(e).flat())), Zhe = (e) => Mt(Za(e).flat()); +const Xhe = (e) => Za(e)[0], Av = (e) => vn(Lt(h2(e).flat())), Zhe = (e) => Lt(Za(e).flat()); function EK(e, t) { return !t.x && !t.y ? e : xK(e, (n) => ({ x: n.x + t.x, y: n.y + t.y })); } const X_ = 1e-9; function CK(e, t, n) { - const r = Av(e), o = Bt(r, t, n), s = { x: o.x - r.x, y: o.y - r.y }; + const r = Av(e), o = Dt(r, t, n), s = { x: o.x - r.x, y: o.y - r.y }; return { ...Math.abs(s.x) < X_ && Math.abs(s.y) < X_ ? e : EK(e, s), rotation: zn(e.rotation + n) }; } function epe(e, t, n, r) { @@ -26878,18 +26909,18 @@ function FN(e, t, n) { if (o === 0) return []; if (o === 1 || r === 0) return [...e]; const s = t ? o : o - 1, i = [], a = []; - for (let d = 0; d < s; d++) { - const f = e[d], h = e[(d + 1) % o], g = Math.hypot(h.x - f.x, h.y - f.y) || 1, p = (h.x - f.x) / g, m = (h.y - f.y) / g; + for (let f = 0; f < s; f++) { + const d = e[f], h = e[(f + 1) % o], g = Math.hypot(h.x - d.x, h.y - d.y) || 1, p = (h.x - d.x) / g, m = (h.y - d.y) / g; i.push({ x: p, y: m }), a.push({ x: -m, y: p }); } const c = []; - for (let d = 0; d < s; d++) { - const f = e[d], h = e[(d + 1) % o], g = a[d].x * r, p = a[d].y * r; - c.push({ x: f.x + g, y: f.y + p }, { x: f.x - g, y: f.y - p }), c.push({ x: h.x + g, y: h.y + p }, { x: h.x - g, y: h.y - p }); + for (let f = 0; f < s; f++) { + const d = e[f], h = e[(f + 1) % o], g = a[f].x * r, p = a[f].y * r; + c.push({ x: d.x + g, y: d.y + p }, { x: d.x - g, y: d.y - p }), c.push({ x: h.x + g, y: h.y + p }, { x: h.x - g, y: h.y - p }); } const l = t ? 0 : 1, u = t ? o : o - 1; - for (let d = l; d < u; d++) { - const f = t ? (d - 1 + o) % o : d - 1, h = d, g = i[f], p = i[h], m = a[f], v = a[h], S = g.x - p.x, C = g.y - p.y; + for (let f = l; f < u; f++) { + const d = t ? (f - 1 + o) % o : f - 1, h = f, g = i[d], p = i[h], m = a[d], v = a[h], S = g.x - p.x, C = g.y - p.y; if (Math.hypot(S, C) < 1e-9) continue; let k = m.x + v.x, N = m.y + v.y; const w = Math.hypot(k, N); @@ -26899,7 +26930,7 @@ function FN(e, t, n) { if (y < 1e-9) continue; const x = r / y; if (x > g2 * r) continue; - const A = e[d]; + const A = e[f]; c.push({ x: A.x + k * x, y: A.y + N * x }); } return c; @@ -26913,7 +26944,7 @@ function PR(e, t) { return FN(n.points, n.closed, t); case "ellipse": case "rect": - return Yr(Hf(n.rect, t / 2)); + return Qr(Wf(n.rect, t / 2)); case "path": return []; } @@ -26940,22 +26971,22 @@ function eL(e, t) { function ope(e, t) { const n = t / 2; if (e.kind === "dot") { - const { x: l, y: u } = e.center, d = Od + n; + const { x: l, y: u } = e.center, f = Rd + n; return [ - { x: l - d, y: u - d }, - { x: l + d, y: u + d } + { x: l - f, y: u - f }, + { x: l + f, y: u + f } ]; } const r = [e.start], o = [], s = []; let i = e.start; - for (const { control1: l, control2: u, end: d } of e.cubics) { - r.push(d); - for (const g of RS(i.x, l.x, u.x, d.x)) - o.push({ at: Rf(i, l, u, d, g), acrossX: !0 }); - for (const g of RS(i.y, l.y, u.y, d.y)) - o.push({ at: Rf(i, l, u, d, g), acrossX: !1 }); - const f = eL(i, [l, u, d]), h = eL(d, [u, l, i]); - f && h && s.push({ from: i, to: d, leaving: f, arriving: { x: -h.x, y: -h.y } }), i = d; + for (const { control1: l, control2: u, end: f } of e.cubics) { + r.push(f); + for (const g of RS(i.x, l.x, u.x, f.x)) + o.push({ at: Mf(i, l, u, f, g), acrossX: !0 }); + for (const g of RS(i.y, l.y, u.y, f.y)) + o.push({ at: Mf(i, l, u, f, g), acrossX: !1 }); + const d = eL(i, [l, u, f]), h = eL(f, [u, l, i]); + d && h && s.push({ from: i, to: f, leaving: d, arriving: { x: -h.x, y: -h.y } }), i = f; } if (r.push(...o.map(({ at: l }) => l)), n <= 0 || s.length === 0) return r; const a = (l, u) => [ @@ -26970,7 +27001,7 @@ function ope(e, t) { for (const l of s) r.push(...a(l.from, l.leaving), ...a(l.to, l.arriving)); for (let l = 0; l + 1 < s.length; l++) { - const { to: u, arriving: d } = s[l], { leaving: f } = s[l + 1], h = Math.hypot(d.x + f.x, d.y + f.y), g = { x: d.x - f.x, y: d.y - f.y }, p = Math.hypot(g.x, g.y); + const { to: u, arriving: f } = s[l], { leaving: d } = s[l + 1], h = Math.hypot(f.x + d.x, f.y + d.y), g = { x: f.x - d.x, y: f.y - d.y }, p = Math.hypot(g.x, g.y); if (h < 1e-9 || p < 1e-9 || 2 / h > g2) continue; const m = n * (2 / h) / p; r.push({ x: u.x + g.x * m, y: u.y + g.y * m }); @@ -27007,52 +27038,52 @@ function eA(e, t) { const { strokeWidth: n, cloudyIntensity: r } = t, o = Za(e); if (e.kind === "ink") { const { fitted: c, drawing: l } = TR(e, o); - return Mt([ + return Lt([ ...o.flat(), ...RR(c).flatMap((u) => ope(u, n)), - ...l ? Yr(Hf(Mt(l), n / 2)) : [] + ...l ? Qr(Wf(Lt(l), n / 2)) : [] ]); } const s = o[0], i = e.kind === "poly" && e.closed; if (i && r) return mhe(s, r, n); const a = BR(e).flatMap( - (c) => Gl(c.tip, c.angle, c.ending, MR(n)) + (c) => Jl(c.tip, c.angle, c.ending, MR(n)) ); - return Mt([ + return Lt([ ...FN(s, i, n), ...PR(a, n) ]); } function spe(e, t) { - const n = { ...e, rotation: 0 }, r = Yr(eA(n, t)); + const n = { ...e, rotation: 0 }, r = Qr(eA(n, t)); if (!e.rotation) return r; const o = Av(e); - return r.map((s) => Bt(s, o, e.rotation)); + return r.map((s) => Dt(s, o, e.rotation)); } function ipe(e, t, n) { const { strokeWidth: r, cloudyIntensity: o } = t, s = r / 2, i = Za(e); if (e.kind === "ink") { - const { fitted: u, drawing: d } = TR(e, i), f = RR(u).map( + const { fitted: u, drawing: f } = TR(e, i), d = RR(u).map( (h) => h.kind === "dot" ? { kind: "oval", center: h.center, - rx: Od, - ry: Od, + rx: Rd, + ry: Rd, rotation: 0, halfWidth: s, filled: !0 } : { kind: "stroke", points: zhe(h), closed: !1, halfWidth: s } ); - return d && f.push({ kind: "stroke", points: d, closed: !1, halfWidth: s }), f; + return f && d.push({ kind: "stroke", points: f, closed: !1, halfWidth: s }), d; } const a = e.kind === "poly" && e.closed, c = i[0], l = []; if (c && a && o && c.length >= 3) { const u = yhe(c, o, r); if (n) { l.push({ kind: "area", ring: c }); - for (const d of u) l.push({ kind: "area", ring: d }); + for (const f of u) l.push({ kind: "area", ring: f }); } - for (const d of u) l.push({ kind: "stroke", points: d, closed: !0, halfWidth: s }); + for (const f of u) l.push({ kind: "stroke", points: f, closed: !0, halfWidth: s }); return l; } c && n && a && l.push({ kind: "area", ring: c }); @@ -27060,7 +27091,7 @@ function ipe(e, t, n) { for (const u of BR(e)) l.push( ...NR( - Gl(u.tip, u.angle, u.ending, MR(r)), + Jl(u.tip, u.angle, u.ending, MR(r)), r ) ); @@ -27073,10 +27104,10 @@ function ape(e, t) { (u) => u.kind === "dot" ? { kind: "ellipse", rect: { - x: u.center.x - Od, - y: u.center.y - Od, - width: 2 * Od, - height: 2 * Od + x: u.center.x - Rd, + y: u.center.y - Rd, + width: 2 * Rd, + height: 2 * Rd } } : { kind: "path", d: Khe(u) } ); @@ -27087,10 +27118,10 @@ function ape(e, t) { return [{ kind: "path", d: phe(s, r, n) }]; const i = e.kind === "line" ? [{ kind: "line", a: s[0], b: s[1] }] : [{ kind: "poly", points: s, closed: e.closed }]; for (const a of BR(e)) - i.push(...Gl(a.tip, a.angle, a.ending, MR(n))); + i.push(...Jl(a.tip, a.angle, a.ending, MR(n))); return i; } -const Kd = { +const zd = { read: Whe, write: Jhe, placed: Ghe, @@ -27113,7 +27144,7 @@ const Kd = { function cpe(e) { return { kind: "quads", quadPoints: e.quadPoints }; } -const VN = (e) => Mt(e.quadPoints.flatMap(i9)), tL = (e, { strokeWidth: t }) => Hf(VN(e), t / 2); +const VN = (e) => Lt(e.quadPoints.flatMap(i9)), tL = (e, { strokeWidth: t }) => Wf(VN(e), t / 2); function lpe(e) { const t = e.quadPoints.flatMap(i9), n = t.length || 1; return { @@ -27131,7 +27162,7 @@ function dpe(e, t) { const n = (r) => ({ x: r.x + t.x, y: r.y + t.y }); return { ...e, quadPoints: e.quadPoints.map((r) => upe(r, n)) }; } -const fpe = (e) => e.quadPoints.map((t) => ({ kind: "poly", points: o2(t), closed: !0 })), Um = { +const fpe = (e) => e.quadPoints.map((t) => ({ kind: "poly", points: o2(t), closed: !0 })), Km = { read: cpe, write: (e) => ({ quadPoints: e.quadPoints }), // Quads are made from a text selection, never placed. @@ -27180,8 +27211,8 @@ function gpe(e) { }; } function nL(e, t, n = 0) { - const r = vn(e), o = n ? Bt(t, r, -n) : t, s = o.x - r.x, i = o.y - r.y, a = Math.abs(s) >= Math.abs(i) ? { x: s >= 0 ? e.x + e.width : e.x, y: r.y } : { x: r.x, y: i >= 0 ? e.y + e.height : e.y }; - return n ? Bt(a, r, n) : a; + const r = vn(e), o = n ? Dt(t, r, -n) : t, s = o.x - r.x, i = o.y - r.y, a = Math.abs(s) >= Math.abs(i) ? { x: s >= 0 ? e.x + e.width : e.x, y: r.y } : { x: r.x, y: i >= 0 ? e.y + e.height : e.y }; + return n ? Dt(a, r, n) : a; } const IK = (e, t, n) => n ? [t, n, nL(e.box, n, e.rotation)] : [t, nL(e.box, t, e.rotation)]; function NK(e, t, n, r, o) { @@ -27222,8 +27253,8 @@ const m2 = (e) => Math.atan2(e[0].y - e[1].y, e[0].x - e[1].x); function Ape(e, { strokeWidth: t }) { const n = e.calloutLine; if (!n) return e.box; - const r = [...ql(e), ...n]; - return e.lineEnding && r.push(...DN(n[0], m2(n), e.lineEnding, t)), Hf(Mt(r), t / 2); + const r = [...Gl(e), ...n]; + return e.lineEnding && r.push(...DN(n[0], m2(n), e.lineEnding, t)), Wf(Lt(r), t / 2); } function OK(e, { strokeWidth: t }) { const n = kv(e.box, e.rotation), r = e.calloutLine; @@ -27233,18 +27264,18 @@ function OK(e, { strokeWidth: t }) { ...r.slice(0, -1), { x: o.x + (o.x - s.x) * a, y: o.y + (o.y - s.y) * a } ], closed: !1 }, - ...Gl(r[0], m2(r), e.lineEnding ?? void 0, t) + ...Jl(r[0], m2(r), e.lineEnding ?? void 0, t) ]; - return Mt([...Yr(n), ...PR(l, t)]); + return Lt([...Qr(n), ...PR(l, t)]); } function Spe(e, t) { return e.calloutLine ? OK(e, t) : e.box; } function xpe(e, { strokeWidth: t }) { - const n = IR(ql(e)), r = e.calloutLine; + const n = IR(Gl(e)), r = e.calloutLine; if (!r) return n; n.push({ kind: "stroke", points: r, closed: !1, halfWidth: t / 2 }); - const o = Gl(r[0], m2(r), e.lineEnding ?? void 0, t); + const o = Jl(r[0], m2(r), e.lineEnding ?? void 0, t); return [...n, ...NR(o, t)]; } function Epe(e, { strokeWidth: t }) { @@ -27254,7 +27285,7 @@ function Epe(e, { strokeWidth: t }) { t > 0 && l > 0 && (i[i.length - 1] = { x: a.x + (a.x - c.x) / l * (t / 2), y: a.y + (a.y - c.y) / l * (t / 2) - }), n.push({ kind: "poly", points: i, closed: !1 }), e.lineEnding && n.push(...Gl(r[0], m2(r), e.lineEnding, t)); + }), n.push({ kind: "poly", points: i, closed: !1 }), e.lineEnding && n.push(...Jl(r[0], m2(r), e.lineEnding, t)); } const o = kR(e.box, t / 2); if (!r || !e.rotation) @@ -27262,7 +27293,7 @@ function Epe(e, { strokeWidth: t }) { const s = vn(e.box); return n.push({ kind: "poly", - points: Yr(o).map((i) => Bt(i, s, e.rotation)), + points: Qr(o).map((i) => Dt(i, s, e.rotation)), closed: !0 }), n; } @@ -27275,7 +27306,7 @@ const _R = { rect: OK, selectionBounds: Spe, oriented: (e) => !e.calloutLine, - turnedCorners: (e) => e.calloutLine ? null : ql(e), + turnedCorners: (e) => e.calloutLine ? null : Gl(e), pivot: (e) => vn(e.box), translate: mpe, rotateAbout: ype, @@ -27295,10 +27326,10 @@ const Ipe = { box: vr, caret: kK, "text-box": _R, - quads: Um, - line: Kd, - poly: Kd, - ink: Kd + quads: Km, + line: zd, + poly: zd, + ink: zd }, kt = (e) => Ipe[e.kind]; function Npe(e) { return { @@ -27316,7 +27347,7 @@ function Npe(e) { rotateAbout: (t, n, r) => kt(t).rotateAbout(t, n, r), scaleAbout: (t, n, r, o, s) => kt(t).scaleAbout(t, n, r, o, s), upright: (t, n) => kt(t).upright(t, n), - handleLayout: (t, n, r) => kt(t).handleLayout?.(t, n, r) ?? dm, + handleLayout: (t, n, r) => kt(t).handleLayout?.(t, n, r) ?? fm, handles: (t, n) => kt(t).handles(t, n), drag: (t, n, r) => kt(t).drag(t, n, r), painted: (t, n, r) => kt(t).painted(t, n, r), @@ -27346,7 +27377,7 @@ const Gn = { ignoresReadOnly: !1, noZoom: !1, noRotate: !1 -}, tn = (e) => e, Ci = { +}, rn = (e) => e, Ci = { key: "opacity", control: "number", label: "Opacity", @@ -27504,7 +27535,7 @@ const Gn = { { value: "center", label: "Center", labelKey: "annotation.alignments.center" }, { value: "right", label: "Right", labelKey: "annotation.alignments.right" } ] -}, ru = { +}, ou = { key: "link", control: "link", label: "Link", @@ -27515,7 +27546,7 @@ const Gn = { Ci, DR, Ppe, - ru + ou ], _K = [ PK, LR, @@ -27523,8 +27554,8 @@ const Gn = { DR, MK, Tpe, - ru -], y2 = [Sv, Ci, BK, ru], _pe = [ + ou +], y2 = [Sv, Ci, BK, ou], _pe = [ { key: "print", control: "flag", label: "Print", labelKey: "annotation.flags.print" }, { key: "hidden", control: "flag", label: "Hidden", labelKey: "annotation.flags.hidden" }, { key: "noView", control: "flag", label: "No view", labelKey: "annotation.flags.noView" }, @@ -27574,7 +27605,7 @@ function jpe(e) { }; } const b2 = { borderStyle: "solid", dashArray: null, cloudyIntensity: null }; -function ou(e) { +function su(e) { const t = e; return { color: t.color, @@ -27609,7 +27640,7 @@ function $pe(e) { ...b2 }; } -function zf(e) { +function qf(e) { const t = e; return { color: t.color ?? "#1a1a1a", @@ -27633,23 +27664,23 @@ function DK(e) { ...b2 }; } -function Pd(e) { +function Td(e) { return e.blendMode === "normal" ? void 0 : e.blendMode; } function jK(e) { if (!(e.cloudyIntensity || e.borderStyle !== "dashed")) return e.dashArray?.length ? e.dashArray : [3, 3]; } -const rL = tn({ +const rL = rn({ name: "caret", family: kK, style: Fpe, caps: { ...Gn, selectable: !0, anchored: !0, commentable: !0 }, properties: [Sv, Ci] -}), oL = tn({ +}), oL = rn({ name: "circle", family: vr, - style: ou, + style: su, caps: { ...Gn, selectable: !0, @@ -27669,7 +27700,7 @@ const rL = tn({ { value: "paperclip", label: "Paperclip", labelKey: "annotation.attachmentIcons.paperclip" }, { value: "graph", label: "Graph", labelKey: "annotation.attachmentIcons.graph" }, { value: "tag", label: "Tag", labelKey: "annotation.attachmentIcons.tag" } -], sL = tn({ +], sL = rn({ name: "file-attachment", family: vr, style: LK, @@ -27795,31 +27826,31 @@ const VK = { max: 12, step: 0.5 }, - ru -], iL = tn({ + ou +], iL = rn({ name: "free-text", family: _R, - style: ou, + style: su, text: FK, caps: VK, properties: $K -}), aL = tn({ +}), aL = rn({ name: "free-text-callout", family: _R, - style: ou, + style: su, text: FK, caps: { ...VK, rotatable: !1, groupResizable: !1, groupRotatable: !1 }, properties: $K -}), cL = tn({ +}), cL = rn({ name: "highlight", - family: Um, + family: Km, style: v2, caps: { ...Gn, paintsBeneath: !0, selectable: !0, anchored: !0, commentable: !0 }, properties: y2 -}), lL = tn({ +}), lL = rn({ name: "ink", - family: Kd, - style: ou, + family: zd, + style: su, caps: { ...Gn, selectable: !0, @@ -27830,11 +27861,11 @@ const VK = { groupRotatable: !0, commentable: !0 }, - properties: [Sv, Ci, DR, BK, ru] -}), uL = tn({ + properties: [Sv, Ci, DR, BK, ou] +}), uL = rn({ name: "line", - family: Kd, - style: ou, + family: zd, + style: su, caps: { ...Gn, selectable: !0, @@ -27848,7 +27879,7 @@ const VK = { hasEndings: !0 }, properties: _K -}), dL = tn({ +}), dL = rn({ name: "link", family: vr, style: DK, @@ -27861,11 +27892,11 @@ const VK = { opaqueBody: !0, rasterOnly: !0 }, - properties: [ru] -}), fL = tn({ + properties: [ou] +}), fL = rn({ name: "polygon", - family: Kd, - style: ou, + family: zd, + style: su, caps: { ...Gn, selectable: !0, @@ -27880,10 +27911,10 @@ const VK = { hasCloudy: !0 }, properties: VR -}), hL = tn({ +}), hL = rn({ name: "polyline", - family: Kd, - style: ou, + family: zd, + style: su, caps: { ...Gn, selectable: !0, @@ -27898,8 +27929,8 @@ const VK = { }, properties: _K }), Hpe = Npe( - (e) => e.subtype === "redact" && e.quadPoints.length > 0 ? Um : vr -), pL = tn({ + (e) => e.subtype === "redact" && e.quadPoints.length > 0 ? Km : vr +), pL = rn({ name: "redact", family: Hpe, style: Vpe, @@ -27937,10 +27968,10 @@ const VK = { }, FR ] -}), gL = tn({ +}), gL = rn({ name: "square", family: vr, - style: ou, + style: su, caps: { ...Gn, selectable: !0, @@ -27955,13 +27986,13 @@ const VK = { hasCloudy: !0 }, properties: VR -}), mL = tn({ +}), mL = rn({ name: "squiggly", - family: Um, + family: Km, style: v2, caps: { ...Gn, paintsBeneath: !0, selectable: !0, anchored: !0, commentable: !0 }, properties: y2 -}), yL = tn({ +}), yL = rn({ name: "stamp", family: vr, style: $pe, @@ -27978,10 +28009,10 @@ const VK = { opaqueBody: !0, rasterOnly: !0 }, - properties: [Ci, ru] -}), bL = tn({ + properties: [Ci, ou] +}), bL = rn({ name: "strikeout", - family: Um, + family: Km, style: v2, caps: { ...Gn, paintsBeneath: !0, selectable: !0, anchored: !0, commentable: !0 }, properties: y2 @@ -27997,7 +28028,7 @@ const VK = { }, { value: "paragraph", label: "Paragraph", labelKey: "annotation.noteIcons.paragraph" }, { value: "insert", label: "Insert", labelKey: "annotation.noteIcons.insert" } -], wL = tn({ +], wL = rn({ name: "text", family: vr, style: LK, @@ -28022,15 +28053,15 @@ const VK = { }, Sv, Ci, - ru + ou ] -}), vL = tn({ +}), vL = rn({ name: "underline", - family: Um, + family: Km, style: v2, caps: { ...Gn, paintsBeneath: !0, selectable: !0, anchored: !0, commentable: !0 }, properties: y2 -}), Wf = { +}), Gf = { ...Gn, selectable: !0, movable: !0, @@ -28085,50 +28116,50 @@ const VK = { labelKey: "annotation.style.textColor" }, { ...FR, label: "Alignment", labelKey: "annotation.style.alignment" } -], TS = tn({ +], TS = rn({ name: "widget-text", family: vr, - style: zf, + style: qf, text: $R, - caps: Wf, + caps: Gf, properties: UR -}), D0 = tn({ +}), D0 = rn({ name: "widget-choice", family: vr, - style: zf, + style: qf, text: $R, - caps: Wf, + caps: Gf, properties: UR -}), MS = tn({ +}), MS = rn({ name: "widget-button", family: vr, - style: zf, + style: qf, text: $R, - caps: Wf, + caps: Gf, properties: UR -}), BS = tn({ +}), BS = rn({ name: "widget-toggle", family: vr, - style: zf, - caps: Wf, + style: qf, + caps: Gf, properties: k2 -}), _S = tn({ +}), _S = rn({ name: "widget-radio", family: vr, - style: zf, - caps: Wf, + style: qf, + caps: Gf, properties: k2 -}), LS = tn({ +}), LS = rn({ name: "widget-box", family: vr, - style: zf, - caps: Wf, + style: qf, + caps: Gf, properties: k2 -}), $N = tn({ +}), $N = rn({ name: "widget-mark", family: vr, - style: zf, - caps: Wf, + style: qf, + caps: Gf, properties: [] }), Wpe = { text: TS.name, @@ -28183,7 +28214,7 @@ function nA(e) { properties: [] }, kL.set(e, n)), n; } -function Wt(e) { +function Jt(e) { switch (e.subtype) { case "widget": return nA(qpe(e)); @@ -28195,19 +28226,19 @@ function Wt(e) { return nA(e.subtype); } } -const Sn = (e) => e?.annotation.ref ?? null, Tf = (e) => e.reply?.type === "group" ? oe(e.reply.to) : void 0, Qpe = { ...UF, print: !0 }, Xpe = Object.keys(UF), Zpe = (e) => e.invisible && e.subtype === "unsupported" && e.rawSubtypeCode === JX.UNKNOWN && e.rawSubtypeName !== "Projection", KR = (e, t = !1) => !e.hidden && !Zpe(e) && (!e.noView || e.toggleNoView && t), ege = (e) => !e.hidden && !e.noView && !e.readOnly, A2 = (e) => Wt(e.annotation).caps.ignoresReadOnly ? !e.annotation.hidden && !e.annotation.noView : ege(e.annotation), S2 = (e) => A2(e) && !e.annotation.locked && (e.authority?.update ?? !0), UK = (e) => A2(e) && !e.annotation.locked && (e.authority?.delete ?? !0), x2 = (e) => A2(e) && !e.annotation.lockedContents && (e.authority?.update ?? !0), tge = /* @__PURE__ */ new Set(["contents", "richText"]); +const Sn = (e) => e?.annotation.ref ?? null, Bf = (e) => e.reply?.type === "group" ? oe(e.reply.to) : void 0, Qpe = { ...UF, print: !0 }, Xpe = Object.keys(UF), Zpe = (e) => e.invisible && e.subtype === "unsupported" && e.rawSubtypeCode === JX.UNKNOWN && e.rawSubtypeName !== "Projection", KR = (e, t = !1) => !e.hidden && !Zpe(e) && (!e.noView || e.toggleNoView && t), ege = (e) => !e.hidden && !e.noView && !e.readOnly, A2 = (e) => Jt(e.annotation).caps.ignoresReadOnly ? !e.annotation.hidden && !e.annotation.noView : ege(e.annotation), S2 = (e) => A2(e) && !e.annotation.locked && (e.authority?.update ?? !0), UK = (e) => A2(e) && !e.annotation.locked && (e.authority?.delete ?? !0), x2 = (e) => A2(e) && !e.annotation.lockedContents && (e.authority?.update ?? !0), tge = /* @__PURE__ */ new Set(["contents", "richText"]); function KK(e, t) { return Xpe.includes(t) ? e.authority?.update ?? !0 : tge.has(t) ? x2(e) : S2(e); } function nge(e) { const { intent: t } = e; - return sm(e) ? t : e.subtype; + return im(e) ? t : e.subtype; } -function su(e, t) { +function iu(e, t) { const { editable: n } = e; return typeof n == "boolean" ? n : n.includes(nge(t)); } -const Ii = (e, t) => S2(t) && su(e, t.annotation), rge = (e, t) => UK(t) && su(e, t.annotation), HK = (e, t) => x2(t) && su(e, t.annotation), AL = (e) => typeof e == "string" && e !== ""; +const Ii = (e, t) => S2(t) && iu(e, t.annotation), rge = (e, t) => UK(t) && iu(e, t.annotation), HK = (e, t) => x2(t) && iu(e, t.annotation), AL = (e) => typeof e == "string" && e !== ""; function oge(e) { const t = e.annotation; return t.reply && t.reply.type !== "group" || t.subtype === "text" && (AL(t.state) || AL(t.stateModel)) ? !0 : t.subtype === "popup"; @@ -28237,8 +28268,8 @@ function cge(e, t, n, r) { } const SL = (e, t, n) => Math.max(t, Math.min(n, e)); function WR(e, t, n, r) { - const o = o9(zn(r) ?? 0), s = o ? t.height : t.width, i = o ? t.width : t.height, a = Math.min(1, s > 0 ? n.width / s : 1, i > 0 ? n.height / i : 1), c = t.width * a, l = t.height * a, u = o ? l : c, d = o ? c : l, f = SL(e.x, u / 2, n.width - u / 2), h = SL(e.y, d / 2, n.height - d / 2); - return { x: f - c / 2, y: h - l / 2, width: c, height: l }; + const o = o9(zn(r) ?? 0), s = o ? t.height : t.width, i = o ? t.width : t.height, a = Math.min(1, s > 0 ? n.width / s : 1, i > 0 ? n.height / i : 1), c = t.width * a, l = t.height * a, u = o ? l : c, f = o ? c : l, d = SL(e.x, u / 2, n.width - u / 2), h = SL(e.y, f / 2, n.height - f / 2); + return { x: d - c / 2, y: h - l / 2, width: c, height: l }; } function lge(e, t) { return Dr(e) ? kt(e).upright(e, t) : e; @@ -28247,7 +28278,7 @@ function uge(e, t) { const n = kt(e).turnedCorners(e, t); return n ? { corners: n, angle: Dr(e) } : null; } -function UN(e, t = dm) { +function UN(e, t = fm) { const n = bR(e, t.spread); return Y9(t).map((r) => ({ id: r, @@ -28294,8 +28325,8 @@ function hge(e, t, n) { if (a < c || a > l) return null; continue; } - const u = (c - a) / i, d = (l - a) / i; - o = Math.max(o, Math.min(u, d)), s = Math.min(s, Math.max(u, d)); + const u = (c - a) / i, f = (l - a) / i; + o = Math.max(o, Math.min(u, f)), s = Math.min(s, Math.max(u, f)); } return o >= s || !Number.isFinite(o) || !Number.isFinite(s) ? null : { a: { x: t.x + r.x * o, y: t.y + r.y * o }, @@ -28318,9 +28349,9 @@ function DS(e, t, n) { }; } const $y = (e, t) => kt(e).drawnBounds(e, t), pge = (e, t) => kt(e).selectionBounds(e, t); -function Km(e, t) { +function Hm(e, t) { const n = uge(e, t); - return n ? n.corners : Yr(pge(e, t)); + return n ? n.corners : Qr(pge(e, t)); } const gge = (e, t) => vv(e, t), qK = (e) => kt(e).bounds(e), EL = /* @__PURE__ */ new WeakMap(); function mge(e, t, n) { @@ -28333,13 +28364,13 @@ function mge(e, t, n) { const s = kt(e).painted(e, r, n); return EL.set(e, { stroke: r, filled: n, pieces: s }), s; } -const GK = (e, t, n) => (t ? kt(e).handleLayout?.(e, t, n) : void 0) ?? dm, jS = (e, t) => kt(e).handles(e, t), N2 = (e, t) => kt(e).translate(e, t), yge = (e, t, n) => kt(e).drag(e, t, n), CL = (e, t) => kt(e).scene(e, t); +const GK = (e, t, n) => (t ? kt(e).handleLayout?.(e, t, n) : void 0) ?? fm, jS = (e, t) => kt(e).handles(e, t), N2 = (e, t) => kt(e).translate(e, t), yge = (e, t, n) => kt(e).drag(e, t, n), CL = (e, t) => kt(e).scene(e, t); function bge(e, t) { const n = e.annotation.subtype, r = t.subtype; return typeof r != "string" || r === n ? n : KK(e, "subtype") && lV(e.annotation, r) ? r : n; } -function Mf(e, t) { - const n = bge(e, t), r = Pm[n], o = n === e.annotation.subtype ? {} : { subtype: n }; +function _f(e, t) { + const n = bge(e, t), r = Rm[n], o = n === e.annotation.subtype ? {} : { subtype: n }; for (const [a, c] of Object.entries(t)) c === void 0 || a === "subtype" || !r.includes(a) || KK(e, a) && (o[a] = c); if (!Object.keys(o).length) return e; @@ -28350,31 +28381,31 @@ function Mf(e, t) { return Object.keys(E0(e.annotation, i)).length ? { ...e, annotation: i } : e; } const IL = /* @__PURE__ */ new WeakMap(); -function Vt(e) { +function Ht(e) { let t = IL.get(e); - return t || (t = Wt(e).family.read(e), IL.set(e, t)), t; + return t || (t = Jt(e).family.read(e), IL.set(e, t)), t; } -const dl = (e, t) => Mf(e, kt(t).write(t, e.annotation.subtype)); +const fl = (e, t) => _f(e, kt(t).write(t, e.annotation.subtype)); function MDe(e, t) { - if (!Wt(e).caps.quarterTurns) return {}; - const n = Vt(e); + if (!Jt(e).caps.quarterTurns) return {}; + const n = Ht(e); if (n.kind !== "box") return {}; - const r = fm(n.box, n.rotation); - return { box: fm(r, t), rotation: t || null }; + const r = hm(n.box, n.rotation); + return { box: hm(r, t), rotation: t || null }; } const NL = /* @__PURE__ */ new WeakMap(); function Wn(e) { let t = NL.get(e); - return t || (t = Wt(e).style(e), NL.set(e, t)), t; + return t || (t = Jt(e).style(e), NL.set(e, t)), t; } const mC = /* @__PURE__ */ new WeakMap(); -function qf(e) { +function Jf(e) { if (mC.has(e)) return mC.get(e); - const t = Wt(e).text?.(e); + const t = Jt(e).text?.(e); return mC.set(e, t), t; } function wge(e, t) { - return e.kind === "quads" ? e.quadPoints.map(fR) : e.kind === "text-box" ? [kv(e.box, e.rotation)] : [Mt(Km(e, t))]; + return e.kind === "quads" ? e.quadPoints.map(fR) : e.kind === "text-box" ? [kv(e.box, e.rotation)] : [Lt(Hm(e, t))]; } function qR(e) { return e && (e.kind === "goto" || e.kind === "uri") ? e : null; @@ -28409,16 +28440,16 @@ function vge() { r[W] = 1 << Se + 1, o[r[W]] = W; }), Object.freeze(r); var s = r.LRI | r.RLI | r.FSI, i = r.L | r.R | r.AL, a = r.B | r.S | r.WS | r.ON | r.FSI | r.LRI | r.RLI | r.PDI, c = r.BN | r.RLE | r.LRE | r.RLO | r.LRO | r.PDF, l = r.S | r.WS | r.B | s | r.PDI | c, u = null; - function d() { + function f() { if (!u) { u = /* @__PURE__ */ new Map(); var W = 0; for (var Se in n) if (n.hasOwnProperty(Se)) - for (var Ae = n[Se], ce = "", Ne = void 0, K = !1, U = 0, Z = 0; Z <= Ae.length + 1; Z += 1) { - var ne = Ae[Z]; - if (ne !== "," && Z !== Ae.length) - ne === "+" ? (K = !0, U = W = U + parseInt(ce, 36), ce = "") : ce += ne; + for (var Ae = n[Se], ce = "", Ne = void 0, K = !1, U = 0, X = 0; X <= Ae.length + 1; X += 1) { + var re = Ae[X]; + if (re !== "," && X !== Ae.length) + re === "+" ? (K = !0, U = W = U + parseInt(ce, 36), ce = "") : ce += re; else { K ? Ne = W + parseInt(ce, 36) : (U = W = U + parseInt(ce, 36), Ne = W), K = !1, ce = "", U = Ne; for (var xe = W; xe < Ne + 1; xe += 1) @@ -28427,11 +28458,11 @@ function vge() { } } } - function f(W) { - return d(), u.get(W.codePointAt(0)) || r.L; + function d(W) { + return f(), u.get(W.codePointAt(0)) || r.L; } function h(W) { - return o[f(W)]; + return o[d(W)]; } var g = { pairs: "14>1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1", @@ -28439,14 +28470,14 @@ function vge() { }; function p(W, Se) { var Ae = 36, ce = 0, Ne = /* @__PURE__ */ new Map(), K = Se && /* @__PURE__ */ new Map(), U; - return W.split(",").forEach(function Z(ne) { - if (ne.indexOf("+") !== -1) - for (var xe = +ne; xe--; ) - Z(U); + return W.split(",").forEach(function X(re) { + if (re.indexOf("+") !== -1) + for (var xe = +re; xe--; ) + X(U); else { - U = ne; - var _e = ne.split(">"), Ie = _e[0], Le = _e[1]; - Ie = String.fromCodePoint(ce += parseInt(Ie, Ae)), Le = String.fromCodePoint(ce += parseInt(Le, Ae)), Ne.set(Ie, Le), Se && K.set(Le, Ie); + U = re; + var Le = re.split(">"), Ie = Le[0], De = Le[1]; + Ie = String.fromCodePoint(ce += parseInt(Ie, Ae)), De = String.fromCodePoint(ce += parseInt(De, Ae)), Ne.set(Ie, De), Se && K.set(De, Ie); } }), { map: Ne, reverseMap: K }; } @@ -28466,83 +28497,83 @@ function vge() { function w(W) { return C(), S.get(W) || null; } - var y = r.L, x = r.R, A = r.EN, b = r.ES, E = r.ET, I = r.AN, O = r.CS, T = r.B, R = r.S, M = r.ON, F = r.BN, B = r.NSM, $ = r.AL, D = r.LRO, _ = r.RLO, L = r.LRE, j = r.RLE, H = r.PDF, Y = r.LRI, ue = r.RLI, le = r.FSI, pe = r.PDI; - function ge(W, Se) { + var y = r.L, x = r.R, A = r.EN, b = r.ES, E = r.ET, I = r.AN, O = r.CS, T = r.B, R = r.S, M = r.ON, F = r.BN, _ = r.NSM, $ = r.AL, D = r.LRO, B = r.RLO, L = r.LRE, j = r.RLE, H = r.PDF, Y = r.LRI, le = r.RLI, ie = r.FSI, pe = r.PDI; + function ve(W, Se) { for (var Ae = 125, ce = new Uint32Array(W.length), Ne = 0; Ne < W.length; Ne++) - ce[Ne] = f(W[Ne]); + ce[Ne] = d(W[Ne]); var K = /* @__PURE__ */ new Map(); - function U(Fr, Qo) { - var Vr = ce[Fr]; - ce[Fr] = Qo, K.set(Vr, K.get(Vr) - 1), Vr & a && K.set(a, K.get(a) - 1), K.set(Qo, (K.get(Qo) || 0) + 1), Qo & a && K.set(a, (K.get(a) || 0) + 1); + function U(Vr, Qo) { + var $r = ce[Vr]; + ce[Vr] = Qo, K.set($r, K.get($r) - 1), $r & a && K.set(a, K.get(a) - 1), K.set(Qo, (K.get(Qo) || 0) + 1), Qo & a && K.set(a, (K.get(a) || 0) + 1); } - for (var Z = new Uint8Array(W.length), ne = /* @__PURE__ */ new Map(), xe = [], _e = null, Ie = 0; Ie < W.length; Ie++) - _e || xe.push(_e = { + for (var X = new Uint8Array(W.length), re = /* @__PURE__ */ new Map(), xe = [], Le = null, Ie = 0; Ie < W.length; Ie++) + Le || xe.push(Le = { start: Ie, end: W.length - 1, // 3.3.1 P2-P3: Determine the paragraph level level: Se === "rtl" ? 1 : Se === "ltr" ? 0 : R3(Ie, !1) - }), ce[Ie] & T && (_e.end = Ie, _e = null); - for (var Le = j | L | _ | D | s | pe | H | T, X = function(Fr) { - return Fr + (Fr & 1 ? 1 : 2); - }, ie = function(Fr) { - return Fr + (Fr & 1 ? 2 : 1); - }, Fe = 0; Fe < xe.length; Fe++) { - _e = xe[Fe]; - var He = [{ - _level: _e.level, + }), ce[Ie] & T && (Le.end = Ie, Le = null); + for (var De = j | L | B | D | s | pe | H | T, qe = function(Vr) { + return Vr + (Vr & 1 ? 1 : 2); + }, Me = function(Vr) { + return Vr + (Vr & 1 ? 2 : 1); + }, It = 0; It < xe.length; It++) { + Le = xe[It]; + var rt = [{ + _level: Le.level, _override: 0, //0=neutral, 1=L, 2=R _isolate: 0 //bool - }], ut = void 0, $e = 0, gt = 0, qt = 0; + }], Z = void 0, fe = 0, Fe = 0, ht = 0; K.clear(); - for (var $t = _e.start; $t <= _e.end; $t++) { - var nn = ce[$t]; - if (ut = He[He.length - 1], K.set(nn, (K.get(nn) || 0) + 1), nn & a && K.set(a, (K.get(a) || 0) + 1), nn & Le) - if (nn & (j | L)) { - Z[$t] = ut._level; - var pn = (nn === j ? ie : X)(ut._level); - pn <= Ae && !$e && !gt ? He.push({ - _level: pn, + for (var At = Le.start; At <= Le.end; At++) { + var Nt = ce[At]; + if (Z = rt[rt.length - 1], K.set(Nt, (K.get(Nt) || 0) + 1), Nt & a && K.set(a, (K.get(a) || 0) + 1), Nt & De) + if (Nt & (j | L)) { + X[At] = Z._level; + var $t = (Nt === j ? Me : qe)(Z._level); + $t <= Ae && !fe && !Fe ? rt.push({ + _level: $t, _override: 0, _isolate: 0 - }) : $e || gt++; - } else if (nn & (_ | D)) { - Z[$t] = ut._level; - var Jo = (nn === _ ? ie : X)(ut._level); - Jo <= Ae && !$e && !gt ? He.push({ - _level: Jo, - _override: nn & _ ? x : y, + }) : fe || Fe++; + } else if (Nt & (B | D)) { + X[At] = Z._level; + var Fr = (Nt === B ? Me : qe)(Z._level); + Fr <= Ae && !fe && !Fe ? rt.push({ + _level: Fr, + _override: Nt & B ? x : y, _isolate: 0 - }) : $e || gt++; - } else if (nn & s) { - nn & le && (nn = R3($t + 1, !0) === 1 ? ue : Y), Z[$t] = ut._level, ut._override && U($t, ut._override); - var Ym = (nn === ue ? ie : X)(ut._level); - Ym <= Ae && $e === 0 && gt === 0 ? (qt++, He.push({ - _level: Ym, + }) : fe || Fe++; + } else if (Nt & s) { + Nt & ie && (Nt = R3(At + 1, !0) === 1 ? le : Y), X[At] = Z._level, Z._override && U(At, Z._override); + var sc = (Nt === le ? Me : qe)(Z._level); + sc <= Ae && fe === 0 && Fe === 0 ? (ht++, rt.push({ + _level: sc, _override: 0, _isolate: 1, - _isolInitIndex: $t - })) : $e++; - } else if (nn & pe) { - if ($e > 0) - $e--; - else if (qt > 0) { - for (gt = 0; !He[He.length - 1]._isolate; ) - He.pop(); - var du = He[He.length - 1]._isolInitIndex; - du != null && (ne.set(du, $t), ne.set($t, du)), He.pop(), qt--; + _isolInitIndex: At + })) : fe++; + } else if (Nt & pe) { + if (fe > 0) + fe--; + else if (ht > 0) { + for (Fe = 0; !rt[rt.length - 1]._isolate; ) + rt.pop(); + var fu = rt[rt.length - 1]._isolInitIndex; + fu != null && (re.set(fu, At), re.set(At, fu)), rt.pop(), ht--; } - ut = He[He.length - 1], Z[$t] = ut._level, ut._override && U($t, ut._override); - } else nn & H ? ($e === 0 && (gt > 0 ? gt-- : !ut._isolate && He.length > 1 && (He.pop(), ut = He[He.length - 1])), Z[$t] = ut._level) : nn & T && (Z[$t] = _e.level); + Z = rt[rt.length - 1], X[At] = Z._level, Z._override && U(At, Z._override); + } else Nt & H ? (fe === 0 && (Fe > 0 ? Fe-- : !Z._isolate && rt.length > 1 && (rt.pop(), Z = rt[rt.length - 1])), X[At] = Z._level) : Nt & T && (X[At] = Le.level); else - Z[$t] = ut._level, ut._override && nn !== F && U($t, ut._override); + X[At] = Z._level, Z._override && Nt !== F && U(At, Z._override); } - for (var Ao = [], kr = null, Mi = _e.start; Mi <= _e.end; Mi++) { - var fu = ce[Mi]; - if (!(fu & c)) { - var Qm = Z[Mi], V = fu & s, G = fu === pe; - kr && Qm === kr._level ? (kr._end = Mi, kr._endsWithIsolInit = V) : Ao.push(kr = { + for (var So = [], kr = null, Mi = Le.start; Mi <= Le.end; Mi++) { + var hu = ce[Mi]; + if (!(hu & c)) { + var Qm = X[Mi], V = hu & s, G = hu === pe; + kr && Qm === kr._level ? (kr._end = Mi, kr._endsWithIsolInit = V) : So.push(kr = { _start: Mi, _end: Mi, _level: Qm, @@ -28551,44 +28582,44 @@ function vge() { }); } } - for (var Q = [], be = 0; be < Ao.length; be++) { - var we = Ao[be]; - if (!we._startsWithPDI || we._startsWithPDI && !ne.has(we._start)) { - for (var ye = [kr = we], st = void 0; kr && kr._endsWithIsolInit && (st = ne.get(kr._end)) != null; ) - for (var Qe = be + 1; Qe < Ao.length; Qe++) - if (Ao[Qe]._start === st) { - ye.push(kr = Ao[Qe]); + for (var Q = [], ye = 0; ye < So.length; ye++) { + var be = So[ye]; + if (!be._startsWithPDI || be._startsWithPDI && !re.has(be._start)) { + for (var me = [kr = be], it = void 0; kr && kr._endsWithIsolInit && (it = re.get(kr._end)) != null; ) + for (var Qe = ye + 1; Qe < So.length; Qe++) + if (So[Qe]._start === it) { + me.push(kr = So[Qe]); break; } - for (var At = [], Nn = 0; Nn < ye.length; Nn++) - for (var mt = ye[Nn], On = mt._start; On <= mt._end; On++) - At.push(On); - for (var Zn = Z[At[0]], sc = _e.level, ic = At[0] - 1; ic >= 0; ic--) - if (!(ce[ic] & c)) { - sc = Z[ic]; + for (var St = [], Nn = 0; Nn < me.length; Nn++) + for (var mt = me[Nn], On = mt._start; On <= mt._end; On++) + St.push(On); + for (var er = X[St[0]], ic = Le.level, ac = St[0] - 1; ac >= 0; ac--) + if (!(ce[ac] & c)) { + ic = X[ac]; break; } - var hE = At[At.length - 1], XJ = Z[hE], h3 = _e.level; + var hE = St[St.length - 1], XJ = X[hE], h3 = Le.level; if (!(ce[hE] & s)) { - for (var Jv = hE + 1; Jv <= _e.end; Jv++) + for (var Jv = hE + 1; Jv <= Le.end; Jv++) if (!(ce[Jv] & c)) { - h3 = Z[Jv]; + h3 = X[Jv]; break; } } Q.push({ - _seqIndices: At, - _sosType: Math.max(sc, Zn) % 2 ? x : y, + _seqIndices: St, + _sosType: Math.max(ic, er) % 2 ? x : y, _eosType: Math.max(h3, XJ) % 2 ? x : y }); } } for (var pE = 0; pE < Q.length; pE++) { - var gE = Q[pE], Ge = gE._seqIndices, Xm = gE._sosType, ZJ = gE._eosType, eh = Z[Ge[0]] & 1 ? x : y; - if (K.get(B)) + var gE = Q[pE], Ge = gE._seqIndices, Xm = gE._sosType, ZJ = gE._eosType, nh = X[Ge[0]] & 1 ? x : y; + if (K.get(_)) for (var Yv = 0; Yv < Ge.length; Yv++) { var p3 = Ge[Yv]; - if (ce[p3] & B) { + if (ce[p3] & _) { for (var mE = Xm, Qv = Yv - 1; Qv >= 0; Qv--) if (!(ce[Ge[Qv]] & c)) { mE = ce[Ge[Qv]]; @@ -28618,11 +28649,11 @@ function vge() { for (var Zm = 1; Zm < Ge.length - 1; Zm++) { var bE = Ge[Zm]; if (ce[bE] & (b | O)) { - for (var th = 0, wE = 0, vE = Zm - 1; vE >= 0 && (th = ce[Ge[vE]], !!(th & c)); vE--) + for (var rh = 0, wE = 0, vE = Zm - 1; vE >= 0 && (rh = ce[Ge[vE]], !!(rh & c)); vE--) ; for (var kE = Zm + 1; kE < Ge.length && (wE = ce[Ge[kE]], !!(wE & c)); kE++) ; - th === wE && (ce[bE] === b ? th === A : th & (A | I)) && U(bE, th); + rh === wE && (ce[bE] === b ? rh === A : rh & (A | I)) && U(bE, rh); } } if (K.get(A)) @@ -28654,25 +28685,25 @@ function vge() { if (K.get(a)) { var ty = x | A | I, k3 = ty | y, r1 = []; { - for (var nh = [], rh = 0; rh < Ge.length; rh++) - if (ce[Ge[rh]] & a) { - var ny = W[Ge[rh]], A3 = void 0; + for (var oh = [], sh = 0; sh < Ge.length; sh++) + if (ce[Ge[sh]] & a) { + var ny = W[Ge[sh]], A3 = void 0; if (k(ny) !== null) - if (nh.length < 63) - nh.push({ char: ny, seqIndex: rh }); + if (oh.length < 63) + oh.push({ char: ny, seqIndex: sh }); else break; else if ((A3 = N(ny)) !== null) - for (var ry = nh.length - 1; ry >= 0; ry--) { - var xE = nh[ry].char; + for (var ry = oh.length - 1; ry >= 0; ry--) { + var xE = oh[ry].char; if (xE === A3 || xE === N(w(ny)) || k(w(xE)) === ny) { - r1.push([nh[ry].seqIndex, rh]), nh.length = ry; + r1.push([oh[ry].seqIndex, sh]), oh.length = ry; break; } } } - r1.sort(function(Fr, Qo) { - return Fr[0] - Qo[0]; + r1.sort(function(Vr, Qo) { + return Vr[0] - Qo[0]; }); } for (var EE = 0; EE < r1.length; EE++) { @@ -28681,7 +28712,7 @@ function vge() { if (ce[E3] & k3) { x3 = !0; var C3 = ce[E3] & ty ? x : y; - if (C3 === eh) { + if (C3 === nh) { Yo = C3; break; } @@ -28693,38 +28724,38 @@ function vge() { var I3 = Ge[NE]; if (ce[I3] & k3) { var N3 = ce[I3] & ty ? x : y; - N3 !== eh ? Yo = N3 : Yo = eh; + N3 !== nh ? Yo = N3 : Yo = nh; break; } } } if (Yo) { - if (ce[Ge[o1]] = ce[Ge[CE]] = Yo, Yo !== eh) { + if (ce[Ge[o1]] = ce[Ge[CE]] = Yo, Yo !== nh) { for (var oy = o1 + 1; oy < Ge.length; oy++) if (!(ce[Ge[oy]] & c)) { - f(W[Ge[oy]]) & B && (ce[Ge[oy]] = Yo); + d(W[Ge[oy]]) & _ && (ce[Ge[oy]] = Yo); break; } } - if (Yo !== eh) { + if (Yo !== nh) { for (var sy = CE + 1; sy < Ge.length; sy++) if (!(ce[Ge[sy]] & c)) { - f(W[Ge[sy]]) & B && (ce[Ge[sy]] = Yo); + d(W[Ge[sy]]) & _ && (ce[Ge[sy]] = Yo); break; } } } } - for (var ac = 0; ac < Ge.length; ac++) - if (ce[Ge[ac]] & a) { - for (var O3 = ac, OE = ac, PE = Xm, iy = ac - 1; iy >= 0; iy--) + for (var cc = 0; cc < Ge.length; cc++) + if (ce[Ge[cc]] & a) { + for (var O3 = cc, OE = cc, PE = Xm, iy = cc - 1; iy >= 0; iy--) if (ce[Ge[iy]] & c) O3 = iy; else { PE = ce[Ge[iy]] & ty ? x : y; break; } - for (var P3 = ZJ, ay = ac + 1; ay < Ge.length; ay++) + for (var P3 = ZJ, ay = cc + 1; ay < Ge.length; ay++) if (ce[Ge[ay]] & (a | c)) OE = ay; else { @@ -28732,113 +28763,113 @@ function vge() { break; } for (var RE = O3; RE <= OE; RE++) - ce[Ge[RE]] = PE === P3 ? PE : eh; - ac = OE; + ce[Ge[RE]] = PE === P3 ? PE : nh; + cc = OE; } } } - for (var Zr = _e.start; Zr <= _e.end; Zr++) { - var tY = Z[Zr], s1 = ce[Zr]; - if (tY & 1 ? s1 & (y | A | I) && Z[Zr]++ : s1 & x ? Z[Zr]++ : s1 & (I | A) && (Z[Zr] += 2), s1 & c && (Z[Zr] = Zr === 0 ? _e.level : Z[Zr - 1]), Zr === _e.end || f(W[Zr]) & (R | T)) - for (var i1 = Zr; i1 >= 0 && f(W[i1]) & l; i1--) - Z[i1] = _e.level; + for (var eo = Le.start; eo <= Le.end; eo++) { + var tY = X[eo], s1 = ce[eo]; + if (tY & 1 ? s1 & (y | A | I) && X[eo]++ : s1 & x ? X[eo]++ : s1 & (I | A) && (X[eo] += 2), s1 & c && (X[eo] = eo === 0 ? Le.level : X[eo - 1]), eo === Le.end || d(W[eo]) & (R | T)) + for (var i1 = eo; i1 >= 0 && d(W[i1]) & l; i1--) + X[i1] = Le.level; } } return { - levels: Z, + levels: X, paragraphs: xe }; - function R3(Fr, Qo) { - for (var Vr = Fr; Vr < W.length; Vr++) { - var cc = ce[Vr]; - if (cc & (x | $)) + function R3(Vr, Qo) { + for (var $r = Vr; $r < W.length; $r++) { + var lc = ce[$r]; + if (lc & (x | $)) return 1; - if (cc & (T | y) || Qo && cc === pe) + if (lc & (T | y) || Qo && lc === pe) return 0; - if (cc & s) { - var T3 = nY(Vr); - Vr = T3 === -1 ? W.length : T3; + if (lc & s) { + var T3 = nY($r); + $r = T3 === -1 ? W.length : T3; } } return 0; } - function nY(Fr) { - for (var Qo = 1, Vr = Fr + 1; Vr < W.length; Vr++) { - var cc = ce[Vr]; - if (cc & T) + function nY(Vr) { + for (var Qo = 1, $r = Vr + 1; $r < W.length; $r++) { + var lc = ce[$r]; + if (lc & T) break; - if (cc & pe) { + if (lc & pe) { if (--Qo === 0) - return Vr; - } else cc & s && Qo++; + return $r; + } else lc & s && Qo++; } return -1; } } - var Me = "14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1", Be; - function te() { + var _e = "14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1", Be; + function ee() { if (!Be) { - var W = p(Me, !0), Se = W.map, Ae = W.reverseMap; + var W = p(_e, !0), Se = W.map, Ae = W.reverseMap; Ae.forEach(function(ce, Ne) { Se.set(Ne, ce); }), Be = Se; } } function he(W) { - return te(), Be.get(W) || null; + return ee(), Be.get(W) || null; } function Te(W, Se, Ae, ce) { var Ne = W.length; Ae = Math.max(0, Ae == null ? 0 : +Ae), ce = Math.min(Ne - 1, ce == null ? Ne - 1 : +ce); for (var K = /* @__PURE__ */ new Map(), U = Ae; U <= ce; U++) if (Se[U] & 1) { - var Z = he(W[U]); - Z !== null && K.set(U, Z); + var X = he(W[U]); + X !== null && K.set(U, X); } return K; } - function ze(W, Se, Ae, ce) { + function We(W, Se, Ae, ce) { var Ne = W.length; Ae = Math.max(0, Ae == null ? 0 : +Ae), ce = Math.min(Ne - 1, ce == null ? Ne - 1 : +ce); var K = []; return Se.paragraphs.forEach(function(U) { - var Z = Math.max(Ae, U.start), ne = Math.min(ce, U.end); - if (Z < ne) { - for (var xe = Se.levels.slice(Z, ne + 1), _e = ne; _e >= Z && f(W[_e]) & l; _e--) - xe[_e] = U.level; - for (var Ie = U.level, Le = 1 / 0, X = 0; X < xe.length; X++) { - var ie = xe[X]; - ie > Ie && (Ie = ie), ie < Le && (Le = ie | 1); + var X = Math.max(Ae, U.start), re = Math.min(ce, U.end); + if (X < re) { + for (var xe = Se.levels.slice(X, re + 1), Le = re; Le >= X && d(W[Le]) & l; Le--) + xe[Le] = U.level; + for (var Ie = U.level, De = 1 / 0, qe = 0; qe < xe.length; qe++) { + var Me = xe[qe]; + Me > Ie && (Ie = Me), Me < De && (De = Me | 1); } - for (var Fe = Ie; Fe >= Le; Fe--) - for (var He = 0; He < xe.length; He++) - if (xe[He] >= Fe) { - for (var ut = He; He + 1 < xe.length && xe[He + 1] >= Fe; ) - He++; - He > ut && K.push([ut + Z, He + Z]); + for (var It = Ie; It >= De; It--) + for (var rt = 0; rt < xe.length; rt++) + if (xe[rt] >= It) { + for (var Z = rt; rt + 1 < xe.length && xe[rt + 1] >= It; ) + rt++; + rt > Z && K.push([Z + X, rt + X]); } } }), K; } function ae(W, Se, Ae, ce) { - var Ne = me(W, Se, Ae, ce), K = [].concat(W); - return Ne.forEach(function(U, Z) { - K[Z] = (Se.levels[U] & 1 ? he(W[U]) : null) || W[U]; + var Ne = ge(W, Se, Ae, ce), K = [].concat(W); + return Ne.forEach(function(U, X) { + K[X] = (Se.levels[U] & 1 ? he(W[U]) : null) || W[U]; }), K.join(""); } - function me(W, Se, Ae, ce) { - for (var Ne = ze(W, Se, Ae, ce), K = [], U = 0; U < W.length; U++) + function ge(W, Se, Ae, ce) { + for (var Ne = We(W, Se, Ae, ce), K = [], U = 0; U < W.length; U++) K[U] = U; - return Ne.forEach(function(Z) { - for (var ne = Z[0], xe = Z[1], _e = K.slice(ne, xe + 1), Ie = _e.length; Ie--; ) - K[xe - Ie] = _e[Ie]; + return Ne.forEach(function(X) { + for (var re = X[0], xe = X[1], Le = K.slice(re, xe + 1), Ie = Le.length; Ie--; ) + K[xe - Ie] = Le[Ie]; }), K; } - return t.closingToOpeningBracket = N, t.getBidiCharType = f, t.getBidiCharTypeName = h, t.getCanonicalBracket = w, t.getEmbeddingLevels = ge, t.getMirroredCharacter = he, t.getMirroredCharactersMap = Te, t.getReorderSegments = ze, t.getReorderedIndices = me, t.getReorderedString = ae, t.openingToClosingBracket = k, Object.defineProperty(t, "__esModule", { value: !0 }), t; + return t.closingToOpeningBracket = N, t.getBidiCharType = d, t.getBidiCharTypeName = h, t.getCanonicalBracket = w, t.getEmbeddingLevels = ve, t.getMirroredCharacter = he, t.getMirroredCharactersMap = Te, t.getReorderSegments = We, t.getReorderedIndices = ge, t.getReorderedString = ae, t.openingToClosingBracket = k, Object.defineProperty(t, "__esModule", { value: !0 }), t; })({}); return e; } -const So = [ +const xo = [ 32, 33, 34, @@ -29060,7 +29091,7 @@ const So = [ ascent: 803, descent: -248, programHash: "955500bf0048e07e3046477b3874ef9e7653010a2bc780bbf27f837d7ca34d19", - codePoints: So, + codePoints: xo, advances: [ 600, 600, @@ -29284,7 +29315,7 @@ const So = [ ascent: 811, descent: -248, programHash: "386d8684b075c7ff4911235ae9691d5e9e924fff13fa1f17841c6d4d4f3762e6", - codePoints: So, + codePoints: xo, advances: [ 600, 600, @@ -29508,7 +29539,7 @@ const So = [ ascent: 811, descent: -248, programHash: "d1dae62980ea92bfa86f9e3961a3064e164e41a5064211f2a3a8833643a322a5", - codePoints: So, + codePoints: xo, advances: [ 600, 600, @@ -29732,7 +29763,7 @@ const So = [ ascent: 803, descent: -248, programHash: "d790f273acf84a1afada2cf96a6eb646728a1a6e7afe961a2cc846bb3a501b0b", - codePoints: So, + codePoints: xo, advances: [ 600, 600, @@ -29956,7 +29987,7 @@ const So = [ ascent: 945, descent: -224, programHash: "93fe419ed14bac240018cf4506dbb64643eeeee379c0b51d3c52d239f4adbc58", - codePoints: So, + codePoints: xo, advances: [ 278, 278, @@ -30180,7 +30211,7 @@ const So = [ ascent: 962, descent: -227, programHash: "f11bf41cf5d115966ee4d954d9d3eab4a7d1b63d371e5d655fc82d15350bc929", - codePoints: So, + codePoints: xo, advances: [ 278, 333, @@ -30404,7 +30435,7 @@ const So = [ ascent: 962, descent: -227, programHash: "9cd559e9d134dd6bb8bb75186d4302079e78ebee53a7c9b38dea1fba52a534d8", - codePoints: So, + codePoints: xo, advances: [ 278, 333, @@ -30628,7 +30659,7 @@ const So = [ ascent: 951, descent: -224, programHash: "872e4efa9cc73daff4a3fffa952663f32144db19ec91a8407afc359486eae30b", - codePoints: So, + codePoints: xo, advances: [ 278, 278, @@ -30852,7 +30883,7 @@ const So = [ ascent: 878, descent: -249, programHash: "7be927a55309ca34d67972ccf041ff3d156d774017022b18131fa365e6dd922e", - codePoints: So, + codePoints: xo, advances: [ 250, 333, @@ -31076,7 +31107,7 @@ const So = [ ascent: 889, descent: -249, programHash: "f23f2efbfa079f9083d967acf695b10db7c78e39862dbeb4788a4fd0533ff29c", - codePoints: So, + codePoints: xo, advances: [ 250, 333, @@ -31300,7 +31331,7 @@ const So = [ ascent: 869, descent: -249, programHash: "cf51fab68d7d965f5755218a7f99b0376bc440e1bb4e90498aef0964aac94490", - codePoints: So, + codePoints: xo, advances: [ 250, 389, @@ -31524,7 +31555,7 @@ const So = [ ascent: 868, descent: -249, programHash: "f405670768d71ff8d8a4e493cbcb9c6deff9565419bf63a38abb544789aa87b4", - codePoints: So, + codePoints: xo, advances: [ 250, 333, @@ -32558,7 +32589,7 @@ const Age = { symbol: () => import("./symbol.generated-DXSVzciM-CR210hra.js"), "zapf-dingbats": () => import("./zapf-dingbats.generated-DSHah6NK-lpJ-p1Lt.js") }, qa = (e) => `epdf-${e.slice(0, 16)}`, PL = /* @__PURE__ */ new Map(); -function vl(e) { +function kl(e) { const t = PL.get(e); if (t) return t; const n = Ev[e].programHash; @@ -32580,14 +32611,14 @@ function vl(e) { }; return PL.set(e, o), o; } -const Jl = "e9d14973462069b4906f8d22a9aaec2d6ec9eb02ac31d697631783316d8b8768", Sge = "AAEAAAAKAIAAAwAgT1MvMlUTUmMAAACsAAAAYGNtYXAAIrhhAAABDAAAADRnbHlmBX0EwQAAAUAAAAA4aGVhZGHSQ6EAAAF4AAAANmhoZWEFogH3AAABsAAAACRobXR4BRQAPAAAAdQAAAAIbG9jYQAcAAAAAAHcAAAABm1heHAABQAKAAAB5AAAACBuYW1lLeJOdAAAAgQAAAI6cG9zdP+fADIAAARAAAAAIAAEArwBkAAFAQACigJYAAAASwKKAlgAAAFeADIA+gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFUERGAMAAIP//AyD/OAAAAyAAyAAAAAAAAAAAAfQCvAAAACAAAQAAAAEAAwAKAAAADAANAAAAAAAoAAAAAAAAAAIAAAAgAADX/wAAAAEAAOAAABD//wAAAAEAAgA8AAACgAK8AAMABwAAAQEBAQEBAQEAPAAAAkQAAP/EAAD+NAAAAAACvAAA/UQAPAJEAAD9vAABAAAAAQAAu91Pc18PPPUAAwPoAAAAAAAAAAAAAAAAAAAAAAA8AAACgAK8AAAACAACAAAAAAAAAAEAAAMg/zgAAAK8AAAAAAKAAAEAAAAAAAAAAAAAAAAAAAACAlgAAAK8ADwAAAAAABwAAAABAAAAAgAIAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAACQByAAMAAQQJAAAANgAAAAMAAQQJAAEAKAA2AAMAAQQJAAIADgBeAAMAAQQJAAMANABsAAMAAQQJAAQAKACgAAMAAQQJAAUAGgDIAAMAAQQJAAYANADiAAMAAQQ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AwAAAAAwAAAAAAAP+cADIAAAAAAAAAAAAAAAAAAAAAAAAAAA=="; let yC = null; function j0() { if (!yC) { let e = null; yC = { - hash: Jl, - family: qa(Jl), + hash: Yl, + family: qa(Yl), weight: 400, style: "normal", load: () => Promise.resolve(e ?? (e = JR("AAEAAAAKAIAAAwAgT1MvMlUTUmMAAACsAAAAYGNtYXAAIrhhAAABDAAAADRnbHlmBX0EwQAAAUAAAAA4aGVhZGHSQ6EAAAF4AAAANmhoZWEFogH3AAABsAAAACRobXR4BRQAPAAAAdQAAAAIbG9jYQAcAAAAAAHcAAAABm1heHAABQAKAAAB5AAAACBuYW1lLeJOdAAAAgQAAAI6cG9zdP+fADIAAARAAAAAIAAEArwBkAAFAQACigJYAAAASwKKAlgAAAFeADIA+gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABFUERGAMAAIP//AyD/OAAAAyAAyAAAAAAAAAAAAfQCvAAAACAAAQAAAAEAAwAKAAAADAANAAAAAAAoAAAAAAAAAAIAAAAgAADX/wAAAAEAAOAAABD//wAAAAEAAgA8AAACgAK8AAMABwAAAQEBAQEBAQEAPAAAAkQAAP/EAAD+NAAAAAACvAAA/UQAPAJEAAD9vAABAAAAAQAAu91Pc18PPPUAAwPoAAAAAAAAAAAAAAAAAAAAAAA8AAACgAK8AAAACAACAAAAAAAAAAEAAAMg/zgAAAK8AAAAAAKAAAEAAAAAAAAAAAAAAAAAAAACAlgAAAK8ADwAAAAAABwAAAABAAAAAgAIAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAACQByAAMAAQQJAAAANgAAAAMAAQQJAAEAKAA2AAMAAQQJAAIADgBeAAMAAQQJAAMANABsAAMAAQQJAAQAKACgAAMAAQQJAAUAGgDIAAMAAQQJAAYANADiAAMAAQQJAA0AXAEWAAMAAQQJAA4AVgFyAEMAbwBwAHkAcgBpAGcAaAB0ACAAMgAwADIANgAgAEMAbABvAHUAZABQAEQARgAgAEwAVABEAEUAbQBiAGUAZABQAEQARgAgAEwAYQBzAHQAIABSAGUAcwBvAHIAdABSAGUAZwB1AGwAYQByAEUAbQBiAGUAZABQAEQARgBMAGEAcwB0AFIAZQBzAG8AcgB0AC0AUgBlAGcAdQBsAGEAcgBFAG0AYgBlAGQAUABEAEYAIABMAGEAcwB0ACAAUgBlAHMAbwByAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwADAAMABFAG0AYgBlAGQAUABEAEYATABhAHMAdABSAGUAcwBvAHIAdAAtAFIAZQBnAHUAbABhAHIATABpAGMAZQBuAHMAZQBkACAAdQBuAGQAZQByACAAdABoAGUAIABBAHAAYQBjAGgAZQAgAEwAaQBjAGUAbgBzAGUALAAgAFYAZQByAHMAaQBvAG4AIAAyAC4AMABoAHQAdABwAHMAOgAvAC8AdwB3AHcALgBhAHAAYQBjAGgAZQAuAG8AcgBnAC8AbABpAGMAZQBuAHMAZQBzAC8ATABJAEMARQBOAFMARQAtADIALgAwAAAAAwAAAAAAAP+cADIAAAAAAAAAAAAAAAAAAAAAAAAAAA=="))) @@ -32595,7 +32626,7 @@ function j0() { } return yC; } -const yg = { +const bg = { advance: 700, ascent: 800, descent: -200 @@ -32614,10 +32645,10 @@ function O2(e) { return Ege[ui[e].family]; } const RL = /* @__PURE__ */ new Map(); -function hm(e) { +function pm(e) { let t = RL.get(e); if (!t) { - const n = vl(e); + const n = kl(e); t = { fontFamily: `"${n.family}", ${O2(e)}`, fontWeight: n.weight, @@ -32627,23 +32658,23 @@ function hm(e) { } return t; } -function Gf(e) { +function Yf(e) { return gs(e) ? e : "helvetica"; } let bC = null; function F0(e) { - return bC ?? (bC = new Map(Om.map((t) => [qa(Ev[t].programHash), t]))), bC.get(e); + return bC ?? (bC = new Map(Pm.map((t) => [qa(Ev[t].programHash), t]))), bC.get(e); } const Cge = { standardDisplayHash: (e) => Ev[e].programHash, - lastResortDisplayHash: Jl + lastResortDisplayHash: Yl }, Ige = [{ start: 32, count: 55264 }, { start: 57344, count: 1056768 -}], JK = (e) => Om.find((t) => Ev[t].programHash === e); +}], JK = (e) => Pm.find((t) => Ev[t].programHash === e); function Nge(e) { const t = []; for (const n of [...e].sort((r, o) => r - o)) { @@ -32678,30 +32709,30 @@ function Oge(e) { format: "truetype", embeddingPermission: "installable", covers: Ige, - ascent: yg.ascent, - descent: yg.descent + ascent: bg.ascent, + descent: bg.descent }; } function Pge(e) { const t = JK(e); - if (t) return vl(t).load(); + if (t) return kl(t).load(); if (e === "e9d14973462069b4906f8d22a9aaec2d6ec9eb02ac31d697631783316d8b8768") return j0().load(); } const Rge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, BUILT_IN_PROGRAMS: Cge, - LAST_RESORT_HASH: Jl, - LAST_RESORT_METRICS: yg, + LAST_RESORT_HASH: Yl, + LAST_RESORT_METRICS: bg, builtInProgramInfo: Oge, fontProgramFamily: qa, lastResortFontBytes: xge, lastResortFontProgram: j0, loadBuiltInProgram: Pge, - standardFontCss: hm, + standardFontCss: pm, standardFontMetrics: GR, - standardFontOf: Gf, + standardFontOf: Yf, standardFontOfProgramFamily: F0, - standardFontProgram: vl, + standardFontProgram: kl, standardFontStack: O2 }, Symbol.toStringTag, { value: "Module" })), KN = 8205, Tge = /\p{M}/u, YR = (e) => e > 65535 ? 2 : 1, Mge = (e) => Tge.test(String.fromCodePoint(e)), YK = (e) => e >= 65024 && e <= 65039 || e >= 917760 && e <= 917999; function Cv(e) { @@ -33186,14 +33217,14 @@ const wC = (e) => e === ZR || e === e5 || e === t5, nH = (e) => Qge.has(e), tme function nme(e, t, n) { const r = jge(e, t), o = XK(e), s = [], i = []; let a = "Common"; - for (const [u, d] of o) { - const f = e.slice(u, d); + for (const [u, f] of o) { + const d = e.slice(u, f); let h = eme(e.codePointAt(u)); wC(h) ? h = a : a = h; - const g = tH(f, n); - !g.covered && !ZK(f) && !s.includes(f) && s.push(f), i.push({ + const g = tH(d, n); + !g.covered && !ZK(d) && !s.includes(d) && s.push(d), i.push({ begin: u, - end: d, + end: f, script: h, level: r[u], font: g.font @@ -33202,10 +33233,10 @@ function nme(e, t, n) { for (let u = i.length; u > 1; u -= 1) wC(i[u - 2].script) && (i[u - 2].script = i[u - 1].script); const c = []; for (const u of i) { - const d = c[c.length - 1]; - if (d && d.font === u.font && d.level === u.level && (d.script === u.script || wC(u.script))) { + const f = c[c.length - 1]; + if (f && f.font === u.font && f.level === u.level && (f.script === u.script || wC(u.script))) { c[c.length - 1] = { - ...d, + ...f, end: u.end }; continue; @@ -33213,12 +33244,12 @@ function nme(e, t, n) { c.push({ ...u }); } const l = []; - return c.forEach((u, d) => { - const f = o.filter(([g]) => g >= u.begin && g < u.end), h = rme(e, u, f); - f.forEach(([g, p], m) => l.push({ + return c.forEach((u, f) => { + const d = o.filter(([g]) => g >= u.begin && g < u.end), h = rme(e, u, d); + d.forEach(([g, p], m) => l.push({ begin: g, end: p, - item: d, + item: f, widths: h[m] })); }), { @@ -33244,27 +33275,27 @@ function rme(e, t, n) { for (; c < n.length && !i(c); ) c += 1; const l = n[a][0]; let u = 0; - for (let d = a; d < c; d += 1) { - const f = o.width(e.slice(l, n[d][1]), r); - s.push([f - u]), u = f; + for (let f = a; f < c; f += 1) { + const d = o.width(e.slice(l, n[f][1]), r); + s.push([d - u]), u = d; } a = c; } return s; } -const FS = Math.fround, ome = FS(1e-3), Eu = (e, t) => FS(FS(e * t) * ome); +const FS = Math.fround, ome = FS(1e-3), Cu = (e, t) => FS(FS(e * t) * ome); function rH(e, t, n, r) { let o = 0; - for (let s = t; s < n; s += 1) for (const i of e.graphemes[s].widths) o = FS(o + Eu(i, r)); + for (let s = t; s < n; s += 1) for (const i of e.graphemes[s].widths) o = FS(o + Cu(i, r)); return o; } function $L(e, t, n, r) { if (t >= n) return []; - const { text: o, graphemes: s, items: i } = e, a = s[t].begin, c = s[n - 1].end, l = Fge(o, e.levels, a, c, e.base), u = [], d = []; - let f = t; - for (; f < n; ) { - const h = s[f], g = l[h.begin - a]; - let p = f + 1; + const { text: o, graphemes: s, items: i } = e, a = s[t].begin, c = s[n - 1].end, l = Fge(o, e.levels, a, c, e.base), u = [], f = []; + let d = t; + for (; d < n; ) { + const h = s[d], g = l[h.begin - a]; + let p = d + 1; for (; p < n && s[p].item === h.item && l[s[p].begin - a] === g; ) p += 1; const m = i[h.item], v = s[p - 1].end; u.push({ @@ -33272,12 +33303,12 @@ function $L(e, t, n, r) { text: o.slice(h.begin, v), rtl: m.level % 2 === 1, plain: m.font.standard || nH(m.script), - width: rH(e, f, p, r), + width: rH(e, d, p, r), begin: h.begin, end: v - }), d.push(g), f = p; + }), f.push(g), d = p; } - return $ge(d).map((h) => u[h]); + return $ge(f).map((h) => u[h]); } const UL = [ [ @@ -34249,7 +34280,7 @@ function ume(e, t = () => !0) { s !== "T" && (o >= 0 && lme(n[o]) && cme(s) && t(o, i) && (r[o].next = !0, r[i].previous = !0), o = i); }), r; } -const KL = "‍", dme = (e, t) => `${t.previous ? KL : ""}${e}${t.next ? KL : ""}`, _t = Math.fround, oH = (e) => e < 1e-4 && e > -1e-4, HL = (e, t) => e > t && !oH(_t(e - t)), vC = [ +const KL = "‍", dme = (e, t) => `${t.previous ? KL : ""}${e}${t.next ? KL : ""}`, jt = Math.fround, oH = (e) => e < 1e-4 && e > -1e-4, HL = (e, t) => e > t && !oH(jt(e - t)), vC = [ 4, 6, 8, @@ -34277,8 +34308,8 @@ const KL = "‍", dme = (e, t) => `${t.previous ? KL : ""}${e}${t.next ? KL : "" 144 ]; function WN(e, t, n) { - const { plate: r, alignment: o, multiline: s, cells: i } = n, a = _t(r.right - r.left), c = _t(r.top - r.bottom), l = Math.max(a, 0), u = fme(e, n), d = Vge(u.join("")) ?? !1, f = i > 0, h = u.map((I) => { - const O = nme(I, d, t); + const { plate: r, alignment: o, multiline: s, cells: i } = n, a = jt(r.right - r.left), c = jt(r.top - r.bottom), l = Math.max(a, 0), u = fme(e, n), f = Vge(u.join("")) ?? !1, d = i > 0, h = u.map((I) => { + const O = nme(I, f, t); return { paragraph: O, units: O.graphemes.map((T, R) => { @@ -34296,16 +34327,16 @@ function WN(e, t, n) { return ume(O.map((R) => I.text.slice(T(R).begin, T(R).end)), (R, M) => T(O[R]).item === T(O[M]).item); }, v = (I, O, T, R) => { if (!T.previous && !T.next) return p(I, O, R); - const { paragraph: M } = I, F = M.graphemes[O.grapheme], B = M.items[F.item], $ = dme(M.text.slice(F.begin, F.end), T); - return Eu(B.font.width($, B.level % 2 === 1), R); - }, S = (I) => Eu(t.face.ascent, I), C = (I) => Eu(t.face.descent, I); + const { paragraph: M } = I, F = M.graphemes[O.grapheme], _ = M.items[F.item], $ = dme(M.text.slice(F.begin, F.end), T); + return Cu(_.font.width($, _.level % 2 === 1), R); + }, S = (I) => Cu(t.face.ascent, I), C = (I) => Cu(t.face.descent, I); let k = n.fontSize; if (oH(k) && (k = 0, a > 0)) { const I = s ? vC.slice(0, Math.trunc(vC.length / 4)) : vC, O = (M) => { - let F = 0, B = 0; + let F = 0, _ = 0; for (const $ of h) { const D = E($, M, null); - if (F = Math.max(D.width, F), B = _t(B + D.height), HL(F, a) || HL(B, c)) return !0; + if (F = Math.max(D.width, F), _ = jt(_ + D.height), HL(F, a) || HL(_, c)) return !0; } return !1; }; @@ -34322,28 +34353,28 @@ function WN(e, t, n) { let O; const T = []; let R = [], M = 0, F; - if (f) { - const B = _t(a / i), $ = I.units.length; + if (d) { + const _ = jt(a / i), $ = I.units.length; let D = 0; o === 1 ? D = Math.trunc((i - $) / 2) : o === 2 && (D = i - $); - const _ = S(k); + const B = S(k); let L = C(k); R = m(I); for (let j = 0; j < $ && j < i; j += 1) { const H = I.units[j], Y = v(I, H, R[j], k); - T.push(_t(B * (j + D + 0.5) - _t(Y * 0.5))), L = Math.min(L, Eu(H.descent, k)); + T.push(jt(_ * (j + D + 0.5) - jt(Y * 0.5))), L = Math.min(L, Cu(H.descent, k)); } O = [{ begin: $ > 0 ? 0 : -1, end: $ - 1, width: 0, - ascent: _, + ascent: B, descent: L - }], F = _t(_ - L); + }], F = jt(B - L); } else { O = []; - const B = E(I, k, O); - M = zL(o, l, B.width), F = B.height; + const _ = E(I, k, O); + M = zL(o, l, _.width), F = _.height; } N.push({ section: I, @@ -34352,20 +34383,20 @@ function WN(e, t, n) { cellJoins: R, left: M, top: w - }), w = _t(w + F), y = _t(y + F); + }), w = jt(w + F), y = jt(y + F); } - const x = n.centered ? _t(_t(y - c) / 2) : 0, A = []; + const x = n.centered ? jt(jt(y - c) / 2) : 0, A = []; for (const { section: I, lines: O, cellX: T, cellJoins: R, left: M, top: F } of N) { - let B = 0; + let _ = 0; for (const $ of O) { - B = _t(B + $.ascent); - const D = _t(_t(B + F) - x); - B = _t(B - $.descent); - const _ = []; - if ($.begin >= 0) if (f) T.forEach((L, j) => { + _ = jt(_ + $.ascent); + const D = jt(jt(_ + F) - x); + _ = jt(_ - $.descent); + const B = []; + if ($.begin >= 0) if (d) T.forEach((L, j) => { const H = I.units[j], Y = R[j]; - for (const ue of $L(I.paragraph, H.grapheme, H.grapheme + 1, k)) _.push({ - ...b(ue, L), + for (const le of $L(I.paragraph, H.grapheme, H.grapheme + 1, k)) B.push({ + ...b(le, L), width: v(I, H, Y, k), joinsPrevious: Y.previous, joinsNext: Y.next @@ -34375,11 +34406,11 @@ function WN(e, t, n) { let L = zL(o, l, $.width); const j = I.units[$.begin].grapheme, H = I.units[$.end].grapheme + 1; for (const Y of $L(I.paragraph, j, H, k)) - _.push(b(Y, _t(_t(L - M) + M))), L = _t(L + Y.width); + B.push(b(Y, jt(jt(L - M) + M))), L = jt(L + Y.width); } A.push({ - baseline: _t(r.top - D), - runs: _ + baseline: jt(r.top - D), + runs: B }); } } @@ -34387,18 +34418,18 @@ function WN(e, t, n) { fontSize: k, contentHeight: y, lines: A, - rtl: d, + rtl: f, missing: g }; function b(I, O) { - const { font: T, text: R, rtl: M, plain: F, width: B } = I; + const { font: T, text: R, rtl: M, plain: F, width: _ } = I; return { font: T, text: R, rtl: M, plain: F, - x: _t(r.left + O), - width: B, + x: jt(r.left + O), + width: _, joinsPrevious: !1, joinsNext: !1 }; @@ -34406,75 +34437,75 @@ function WN(e, t, n) { function E(I, O, T) { const { units: R } = I; if (R.length === 0) { - const te = S(O), he = C(O); + const ee = S(O), he = C(O); return T?.push({ begin: -1, end: -1, width: 0, - ascent: te, + ascent: ee, descent: he }), { width: 0, - height: _t(te - he) + height: jt(ee - he) }; } - let M = 0, F = 0, B = 0, $ = 0, D = 0, _ = 0, L = 0, j = 0, H = 0, Y = 0, ue = !1, le = 0, pe = 0, ge = !1; - const Me = (te) => { + let M = 0, F = 0, _ = 0, $ = 0, D = 0, B = 0, L = 0, j = 0, H = 0, Y = 0, le = !1, ie = 0, pe = 0, ve = !1; + const _e = (ee) => { T?.push({ begin: M, - end: te, + end: ee, width: $, - ascent: _, + ascent: B, descent: j - }), B = _t(B + _), B = _t(B - j), F = Math.max($, F); + }), _ = jt(_ + B), _ = jt(_ - j), F = Math.max($, F); }; let Be = 0; for (; Be < R.length; ) { - const te = R[Be], he = R[Be > 0 ? Be - 1 : Be]; - _ = Math.max(_, Eu(te.ascent, O)), j = Math.min(j, Eu(te.descent, O)), ge ? !HN(te.code) && !DL(te.code) && (ge = !1) : DL(te.code) ? (ge = !0, ue = !0) : Jge(he.code, te.code) && (ue = !0), ue && (ue = !1, pe > 0 && (le += 1), Y = Be, D = $, L = _, H = j), pe += 1; - const Te = p(I, te, O); - s && l > 0 && _t($ + Te) > l ? (le > 0 && (Be = Y, $ = D, _ = L, j = H), pe === 1 && ($ = Te, Be += 1), Me(Be - 1), M = Be, $ = 0, _ = 0, j = 0, pe = 0, le = 0, ue = !1) : ($ = _t($ + Te), Be += 1); + const ee = R[Be], he = R[Be > 0 ? Be - 1 : Be]; + B = Math.max(B, Cu(ee.ascent, O)), j = Math.min(j, Cu(ee.descent, O)), ve ? !HN(ee.code) && !DL(ee.code) && (ve = !1) : DL(ee.code) ? (ve = !0, le = !0) : Jge(he.code, ee.code) && (le = !0), le && (le = !1, pe > 0 && (ie += 1), Y = Be, D = $, L = B, H = j), pe += 1; + const Te = p(I, ee, O); + s && l > 0 && jt($ + Te) > l ? (ie > 0 && (Be = Y, $ = D, B = L, j = H), pe === 1 && ($ = Te, Be += 1), _e(Be - 1), M = Be, $ = 0, B = 0, j = 0, pe = 0, ie = 0, le = !1) : ($ = jt($ + Te), Be += 1); } - return M <= R.length - 1 && Me(R.length - 1), { + return M <= R.length - 1 && _e(R.length - 1), { width: F, - height: B + height: _ }; } } function zL(e, t, n) { - return e === 1 ? _t(_t(t - n) * 0.5) : e === 2 ? _t(t - n) : 0; + return e === 1 ? jt(jt(t - n) * 0.5) : e === 2 ? jt(t - n) : 0; } function fme(e, t) { const { limit: n, cells: r, multiline: o, password: s } = t, i = QK(e), a = [""]; - let c = 0, l = 0, u = 0, d = 0; - for (let f = 0; f < e.length; ) { - let h = f + 1; + let c = 0, l = 0, u = 0, f = 0; + for (let d = 0; d < e.length; ) { + let h = d + 1; for (; h < e.length && !i[h]; ) h += 1; - const g = h - f; + const g = h - d; if (n > 0 && c + g > n || r > 0 && l >= r) break; - const p = e[f]; + const p = e[d]; if (p === "\r" || p === ` `) { if (o) { const m = p === "\r" ? ` ` : "\r"; - e[h] === m && (h += 1), a.push(""), u += 1, d += 1; + e[h] === m && (h += 1), a.push(""), u += 1, f += 1; } - } else n > 0 && u + g > n || r > 0 && d >= r || (a[a.length - 1] += s ? "*" : p === " " ? " " : e.slice(f, h), u += g, d += 1); - c += g, l += 1, f = h; + } else n > 0 && u + g > n || r > 0 && f >= r || (a[a.length - 1] += s ? "*" : p === " " ? " " : e.slice(d, h), u += g, f += 1); + c += g, l += 1, d = h; } return a; } const WL = /* @__PURE__ */ new Map(); -function sg(e) { +function ig(e) { const t = WL.get(e); if (t) return t; - const { fontFamily: n, fontWeight: r, fontStyle: o } = hm(e), s = { + const { fontFamily: n, fontWeight: r, fontStyle: o } = pm(e), s = { ...Yge(e), fontFamily: n, fontWeight: r, fontStyle: o, - program: vl(e) + program: kl(e) }; return WL.set(e, s), s; } @@ -34512,20 +34543,20 @@ function sH() { if (T1) return T1; const e = j0(); return T1 = { - key: Jl, - ascent: yg.ascent, - descent: yg.descent, + key: Yl, + ascent: bg.ascent, + descent: bg.descent, standard: !1, covers: (t) => t >= 32 && (t < 55296 || t > 57343), width: (t) => { let n = 0; for (const r of t) { const o = r.codePointAt(0); - o !== gme && !mme(o) && (n += yg.advance); + o !== gme && !mme(o) && (n += bg.advance); } return n; }, - fontFamily: `"${qa(Jl)}"`, + fontFamily: `"${qa(Yl)}"`, fontWeight: e.weight, fontStyle: e.style, program: e @@ -34533,7 +34564,7 @@ function sH() { } function n5(e) { return { - face: sg(Gf(e ?? "helvetica")), + face: ig(Yf(e ?? "helvetica")), fallbacks: [], lastResort: sH() }; @@ -34650,9 +34681,9 @@ function wme(e) { } return t / 1e3; } -const xl = 9; +const El = 9; function iH(e) { - return wme(e.trimEnd()) * xl; + return wme(e.trimEnd()) * El; } function bs(e) { if (e.subtype === "line" && e.intent === "line-dimension") @@ -34692,14 +34723,14 @@ function r5(e) { subject: vme[e.intent] }; } -const pm = 2, kme = 7, Ame = 24, Sme = 20; +const gm = 2, kme = 7, Ame = 24, Sme = 20; function Hn(e, t, n) { return { x: e.x + t.x * n, y: e.y + t.y * n }; } -function Bf(e, t, n) { +function Lf(e, t, n) { return (t.x - e.x) * n.x + (t.y - e.y) * n.y; } function o5(e, t) { @@ -34715,7 +34746,7 @@ function xme(e, t) { measure: t.measure, linePoints: e.linePoints }); - return Rm(n) ? n.label : t.contents ?? ""; + return Tm(n) ? n.label : t.contents ?? ""; } function Eme(e, t, n, r, o) { const s = (i, a) => Hn(Hn(e, t, i), n, a); @@ -34729,12 +34760,12 @@ function Eme(e, t, n, r, o) { function Cme(e, t, n, r, o) { if (!o || o.along === 0 && o.perpendicular === 0) return []; - const s = Bf(e, t.center, r), i = Bf(e, t.center, n), a = t.width / 2 + pm, c = t.height / 2 + pm; + const s = Lf(e, t.center, r), i = Lf(e, t.center, n), a = t.width / 2 + gm, c = t.height / 2 + gm; if (Math.abs(s) <= c) return []; if (Math.abs(i) <= a) { - const d = Hn(e, r, s - Math.sign(s) * c); - return [{ from: e, to: d }]; + const f = Hn(e, r, s - Math.sign(s) * c); + return [{ from: e, to: f }]; } const l = Hn(e, r, s), u = Hn(t.center, n, -Math.sign(i) * a); return [ @@ -34752,32 +34783,32 @@ function Ime(e, t, n, r, o, s, i, a, c) { } if (!s || i === "top") return [{ from: e, to: t }]; - const l = Bf(e, s.center, r); - if (Math.abs(l) >= s.height / 2 + pm) + const l = Lf(e, s.center, r); + if (Math.abs(l) >= s.height / 2 + gm) return [{ from: e, to: t }]; - const u = Bf(e, s.center, n), d = s.width / 2 + pm, f = Math.max(0, Math.min(o, u - d)), h = Math.max(0, Math.min(o, u + d)), g = []; - return f > 0 && g.push({ from: e, to: Hn(e, n, f) }), h < o && g.push({ from: Hn(e, n, h), to: t }), g; + const u = Lf(e, s.center, n), f = s.width / 2 + gm, d = Math.max(0, Math.min(o, u - f)), h = Math.max(0, Math.min(o, u + f)), g = []; + return d > 0 && g.push({ from: e, to: Hn(e, n, d) }), h < o && g.push({ from: Hn(e, n, h), to: t }), g; } -function Jf(e, t, n) { +function Qf(e, t, n) { if (e.kind !== "line") return null; - const { start: r, end: o } = p2(e), { along: s, normal: i, length: a } = o5(r, o), c = t.leader?.length ?? 0, l = Hn(r, i, c), u = Hn(o, i, c), d = Hn(l, s, a / 2), f = xme(e, t), h = iH(f), g = !!t.captionEnabled && f.length > 0, p = g && h + 2 * pm + Ame * n > a; + const { start: r, end: o } = p2(e), { along: s, normal: i, length: a } = o5(r, o), c = t.leader?.length ?? 0, l = Hn(r, i, c), u = Hn(o, i, c), f = Hn(l, s, a / 2), d = xme(e, t), h = iH(d), g = !!t.captionEnabled && d.length > 0, p = g && h + 2 * gm + Ame * n > a; let m = null; if (g) { const b = s.x < 0 || s.x === 0 && s.y > 0 ? { x: -s.x, y: -s.y } : s, E = { x: b.y, y: -b.x }, I = t.captionOffset; - let O = Hn(d, s, I?.along ?? 0); + let O = Hn(f, s, I?.along ?? 0); if (O = Hn(O, i, I?.perpendicular ?? 0), t.captionPosition === "top" || p) { - const T = p && c < 0 ? -1 : 1, R = p ? kme : pm; - O = Hn(O, i, T * (xl / 2 + R)); + const T = p && c < 0 ? -1 : 1, R = p ? kme : gm; + O = Hn(O, i, T * (El / 2 + R)); } m = { - text: f, + text: d, center: O, along: b, normal: E, width: h, - height: xl, - bounds: Eme(O, b, E, h, xl) + height: El, + bounds: Eme(O, b, E, h, El) }; } const v = []; @@ -34799,9 +34830,9 @@ function Jf(e, t, n) { t.captionPosition, p, n - ), C = m ? Cme(d, m, s, i, t.captionOffset) : [], k = Math.atan2(s.y, s.x), N = p ? k : k + Math.PI, w = p ? k + Math.PI : k, y = [ - ...Gl(l, N, e.lineEndings?.start, n), - ...Gl(u, w, e.lineEndings?.end, n) + ), C = m ? Cme(f, m, s, i, t.captionOffset) : [], k = Math.atan2(s.y, s.x), N = p ? k : k + Math.PI, w = p ? k + Math.PI : k, y = [ + ...Jl(l, N, e.lineEndings?.start, n), + ...Jl(u, w, e.lineEndings?.end, n) ], x = [ r, o, @@ -34827,7 +34858,7 @@ function Jf(e, t, n) { arrowPlacement: p ? "outside" : "inside", endings: y, selectionPoints: x, - visualBounds: aH(Mt(x), n / 2 + 1) + visualBounds: aH(Lt(x), n / 2 + 1) }; } function aH(e, t) { @@ -34839,10 +34870,10 @@ function aH(e, t) { }; } function Nme(e, t, n) { - const r = Jf(e, t, n); + const r = Qf(e, t, n); if (!r || e.kind !== "line") - return Km(e, { strokeWidth: n }); - const o = Dr(e), s = p2(e).start, i = r.selectionPoints.map((l) => Bt(l, s, -o)), a = aH(Mt(i), n / 2 + 1), c = (l, u) => Bt({ x: l, y: u }, s, o); + return Hm(e, { strokeWidth: n }); + const o = Dr(e), s = p2(e).start, i = r.selectionPoints.map((l) => Dt(l, s, -o)), a = aH(Lt(i), n / 2 + 1), c = (l, u) => Dt({ x: l, y: u }, s, o); return [ c(a.x, a.y), c(a.x + a.width, a.y), @@ -34862,7 +34893,7 @@ function Ome(e, t, n = 0) { const r = e.caption; if (!r) return !1; - const o = Bf(r.center, t, r.along), s = Bf(r.center, t, r.normal); + const o = Lf(r.center, t, r.along), s = Lf(r.center, t, r.normal); return Math.abs(o) <= r.width / 2 + n && Math.abs(s) <= r.height / 2 + n; } const lH = (e) => e ? IR(e.bounds) : []; @@ -34889,7 +34920,7 @@ function qN(e, t) { if (e.kind !== "line") return 0; const { start: n, end: r } = p2(e), { normal: o } = o5(n, r); - return Bf(n, t, o); + return Lf(n, t, o); } function Rme(e, t, n) { if (e.kind !== "line") @@ -34909,13 +34940,13 @@ function Tme(e, t) { ...e.leaderSegments, ...e.captionConnector ].map((r) => ({ kind: "line", a: r.from, b: r.to })); - return Mt([ + return Lt([ ...PR([...n, ...e.endings], t), ...e.caption?.bounds ?? [] ]); } function Mme(e, t, n) { - const r = Jf(e, t, n.strokeWidth); + const r = Qf(e, t, n.strokeWidth); if (!r) return []; const o = { @@ -34947,13 +34978,13 @@ function Mme(e, t, n) { } function uH(e, t) { if (e) { - const n = sg("helvetica"), r = Hn(e.center, e.normal, -xl * 0.33); + const n = ig("helvetica"), r = Hn(e.center, e.normal, -El * 0.33); return [ { kind: "text", at: Hn(r, e.along, -e.width / 2), text: e.text, - fontSize: xl, + fontSize: El, fontFamily: n.fontFamily, program: n.program, rotation: Math.atan2(e.along.y, e.along.x) * 180 / Math.PI, @@ -34963,7 +34994,7 @@ function uH(e, t) { } return []; } -const bg = { x: 0, y: 0 }; +const wg = { x: 0, y: 0 }; function R2(e, t) { return Ba({ subtype: t.intent === "polygon-dimension" ? "polygon" : "polyline", @@ -34974,57 +35005,57 @@ function R2(e, t) { } function Bme(e, t) { const n = R2(e, t); - return Rm(n) ? n.label : n.unavailable === "invalid-geometry" ? "—" : t.contents ?? ""; + return Tm(n) ? n.label : n.unavailable === "invalid-geometry" ? "—" : t.contents ?? ""; } function _me(e, t) { - if (!e.length) return bg; + if (!e.length) return wg; if (!t) { - const u = e.slice(1).map((f, h) => Math.hypot(f.x - e[h].x, f.y - e[h].y)); - let d = u.reduce((f, h) => f + h, 0) / 2; - for (let f = 0; f < u.length; f++) { - const h = u[f]; - if (h > 0 && d <= h) { - const g = d / h; + const u = e.slice(1).map((d, h) => Math.hypot(d.x - e[h].x, d.y - e[h].y)); + let f = u.reduce((d, h) => d + h, 0) / 2; + for (let d = 0; d < u.length; d++) { + const h = u[d]; + if (h > 0 && f <= h) { + const g = f / h; return { - x: e[f].x + g * (e[f + 1].x - e[f].x), - y: e[f].y + g * (e[f + 1].y - e[f].y) - xl / 2 - 2 + x: e[d].x + g * (e[d + 1].x - e[d].x), + y: e[d].y + g * (e[d + 1].y - e[d].y) - El / 2 - 2 }; } - d -= h; + f -= h; } return e[0]; } const n = e[0]; let r = 0, o = 0, s = 0; for (let u = 0; u < e.length; u++) { - const d = { x: e[u].x - n.x, y: e[u].y - n.y }, f = e[(u + 1) % e.length], h = { x: f.x - n.x, y: f.y - n.y }, g = d.x * h.y - h.x * d.y; - r += g, o += (d.x + h.x) * g, s += (d.y + h.y) * g; + const f = { x: e[u].x - n.x, y: e[u].y - n.y }, d = e[(u + 1) % e.length], h = { x: d.x - n.x, y: d.y - n.y }, g = f.x * h.y - h.x * f.y; + r += g, o += (f.x + h.x) * g, s += (f.y + h.y) * g; } if (Math.abs(r) > 1e-8) { const u = { x: n.x + o / (3 * r), y: n.y + s / (3 * r) }; if (vv(u, e)) return u; } - const i = Mt([...e]), a = { x: i.x + i.width / 2, y: i.y + i.height / 2 }, c = []; + const i = Lt([...e]), a = { x: i.x + i.width / 2, y: i.y + i.height / 2 }, c = []; for (let u = 0; u < e.length; u++) { - const d = e[u], f = e[(u + 1) % e.length]; - d.y > a.y != f.y > a.y && c.push( - d.x + (a.y - d.y) * (f.x - d.x) / (f.y - d.y) + const f = e[u], d = e[(u + 1) % e.length]; + f.y > a.y != d.y > a.y && c.push( + f.x + (a.y - f.y) * (d.x - f.x) / (d.y - f.y) ); } - c.sort((u, d) => u - d); + c.sort((u, f) => u - f); let l = -1; for (let u = 1; u < c.length; u += 2) { - const d = c[u] - c[u - 1]; - d > l && (l = d, a.x = (c[u] + c[u - 1]) / 2); + const f = c[u] - c[u - 1]; + f > l && (l = f, a.x = (c[u] + c[u - 1]) / 2); } return a; } function Iv(e, t, n) { if (e.kind !== "poly" || !e.vertices.length) return null; - const r = Dr(e), o = Xhe(e).map((g) => Bt(g, bg, -r)), s = e.captionCenter ? Yhe(e, e.captionCenter) : Bt(_me(o, e.closed), bg, r), i = Bme(e, t), a = iH(i), c = xl, l = Bt({ x: 1, y: 0 }, bg, r), u = { x: l.y, y: -l.x }, d = (g, p) => ({ + const r = Dr(e), o = Xhe(e).map((g) => Dt(g, wg, -r)), s = e.captionCenter ? Yhe(e, e.captionCenter) : Dt(_me(o, e.closed), wg, r), i = Bme(e, t), a = iH(i), c = El, l = Dt({ x: 1, y: 0 }, wg, r), u = { x: l.y, y: -l.x }, f = (g, p) => ({ x: s.x + g * l.x + p * u.x, y: s.y + g * l.y + p * u.y - }), f = t.captionEnabled && i ? { + }), d = t.captionEnabled && i ? { text: i, center: s, along: l, @@ -35032,31 +35063,31 @@ function Iv(e, t, n) { width: a, height: c, bounds: [ - d(-a / 2, -c / 2), - d(a / 2, -c / 2), - d(a / 2, c / 2), - d(-a / 2, c / 2) + f(-a / 2, -c / 2), + f(a / 2, -c / 2), + f(a / 2, c / 2), + f(-a / 2, c / 2) ] - } : null, h = [...Km(e, n), ...f?.bounds ?? []]; - return { caption: f, selectionPoints: h, visualBounds: Mt(h) }; + } : null, h = [...Hm(e, n), ...d?.bounds ?? []]; + return { caption: d, selectionPoints: h, visualBounds: Lt(h) }; } function V0(e, t, n) { - return t.intent === "line-dimension" ? Jf(e, t, n.strokeWidth) : Iv(e, t, n); + return t.intent === "line-dimension" ? Qf(e, t, n.strokeWidth) : Iv(e, t, n); } function dH(e, t, n) { if (t.intent === "line-dimension") return Nme(e, t, n.strokeWidth); const r = Iv(e, t, n); - if (!r) return Km(e, n); - const o = Dr(e), s = Mt( - r.selectionPoints.map((i) => Bt(i, bg, -o)) + if (!r) return Hm(e, n); + const o = Dr(e), s = Lt( + r.selectionPoints.map((i) => Dt(i, wg, -o)) ); return [ { x: s.x, y: s.y }, { x: s.x + s.width, y: s.y }, { x: s.x + s.width, y: s.y + s.height }, { x: s.x, y: s.y + s.height } - ].map((i) => Bt(i, bg, o)); + ].map((i) => Dt(i, wg, o)); } function T2(e, t, n, r) { if (t.intent === "line-dimension") @@ -35071,14 +35102,14 @@ function T2(e, t, n, r) { } const GN = (e) => jx.has(e.subtype); function fH(e) { - const t = Vt(e), n = Wn(e), r = kt(t).rect(t, n), o = bs(e); + const t = Ht(e), n = Wn(e), r = kt(t).rect(t, n), o = bs(e); if (!o) return r; if (o.intent === "line-dimension") { - const i = Jf(t, o, n.strokeWidth); + const i = Qf(t, o, n.strokeWidth); return i ? Tme(i, n.strokeWidth) : r; } const s = Iv(t, o, n)?.caption; - return s ? Mt([...Yr(r), ...s.bounds]) : r; + return s ? Lt([...Qr(r), ...s.bounds]) : r; } function hH(e, t) { const n = u7(e, t); @@ -35109,7 +35140,7 @@ function Ky(e) { source: "baked", annotation: e, apBox: t ?? e.rect, - ...t ? { apRot: Dr(Vt(e)) } : {} + ...t ? { apRot: Dr(Ht(e)) } : {} }; } const pH = (e) => !!e && !E2(e); @@ -35117,7 +35148,7 @@ function i5(e, t) { const n = t.map((o) => e.byId[o]).filter((o) => !!o); if (n.length === 0) return { movable: !1, resizable: !1, rotatable: !1 }; const r = (o) => n.every( - (s) => Ii(e, s) && o(Wt(s.annotation).caps) + (s) => Ii(e, s) && o(Jt(s.annotation).caps) ); return { movable: r((o) => o.groupMovable), @@ -35128,11 +35159,11 @@ function i5(e, t) { function gH(e, t) { const n = e.byId[t]; if (!n) return null; - const r = Tf(n.annotation); + const r = Bf(n.annotation); if (r) return E2(n) ? null : r; for (const o of e.order) { const s = e.byId[o]; - if (s && Tf(s.annotation) === t && pH(s)) return t; + if (s && Bf(s.annotation) === t && pH(s)) return t; } return null; } @@ -35143,7 +35174,7 @@ function mH(e, t) { e.byId[n] && r.push(n); for (const o of e.order) { const s = e.byId[o]; - o !== n && s && Tf(s.annotation) === n && pH(s) && r.push(o); + o !== n && s && Bf(s.annotation) === n && pH(s) && r.push(o); } return r; } @@ -35155,7 +35186,7 @@ function VS(e, t) { return n; } function qn(e) { - const t = Wt(e.annotation).caps, n = !!e.annotation.noZoom || t.noZoom, r = !!e.annotation.noRotate || t.noRotate; + const t = Jt(e.annotation).caps, n = !!e.annotation.noZoom || t.noZoom, r = !!e.annotation.noRotate || t.noRotate; return n || r ? { zoom: n, upright: r } : null; } const yH = (e) => e.kind === "box" || e.kind === "line" || e.kind === "poly" || e.kind === "ink" || e.kind === "text-box" && !e.calloutLine, a5 = (e) => { @@ -35183,7 +35214,7 @@ function c5(e, t, n) { if (!r || !yH(e)) return e; let o = e; r.s !== 1 && (o = I2(o, kC, r.s, r.s)), r.r !== 0 && (o = xv(o, kC, r.r)); - const s = a5(o), i = Bt(s, kC, -r.r); + const s = a5(o), i = Dt(s, kC, -r.r); return N2(o, { x: i.x / r.s - s.x, y: i.y / r.s - s.y @@ -35199,14 +35230,14 @@ function Lme(e, t, n, r) { const s = { x: e.x + e.width / 2, y: e.y + e.height / 2 }, i = { x: t.x + (s.x - t.x) / o.s, y: t.y + (s.y - t.y) / o.s - }, a = o.r !== 0 ? Bt(i, t, zn(-o.r)) : i, c = e.width / o.s, l = e.height / o.s; + }, a = o.r !== 0 ? Dt(i, t, zn(-o.r)) : i, c = e.width / o.s, l = e.height / o.s; return { box: { x: a.x - c / 2, y: a.y - l / 2, width: c, height: l }, rot: zn(-o.r) }; } function Fa(e, t, n) { - const r = n?.style ?? Wn(e.annotation), o = n?.measure ?? bs(e.annotation), s = qn(e), i = Ni(n?.geometry ?? Vt(e.annotation), s, t), a = l5(r.strokeWidth, s, t), c = o ? dH(i, o, { ...r, strokeWidth: a }) : Km(i, { ...r, strokeWidth: a }); + const r = n?.style ?? Wn(e.annotation), o = n?.measure ?? bs(e.annotation), s = qn(e), i = Ni(n?.geometry ?? Ht(e.annotation), s, t), a = l5(r.strokeWidth, s, t), c = o ? dH(i, o, { ...r, strokeWidth: a }) : Hm(i, { ...r, strokeWidth: a }); return { corners: c, center: { @@ -35217,31 +35248,31 @@ function Fa(e, t, n) { }; } function u5(e, t) { - return ige(Ni(Vt(e.annotation), qn(e), t)); + return ige(Ni(Ht(e.annotation), qn(e), t)); } function wH(e, t) { const n = t.objectNumber, r = [], o = []; for (const s of e.order) { const i = e.byId[s]; - !i || i.annotation.page.objectNumber !== n || KR(i.annotation, e.selected.includes(s)) && (HR(i) || (Wt(i.annotation).caps.paintsBeneath ? r : o).push(s)); + !i || i.annotation.page.objectNumber !== n || KR(i.annotation, e.selected.includes(s)) && (HR(i) || (Jt(i.annotation).caps.paintsBeneath ? r : o).push(s)); } return [...r, ...o]; } const ws = (e, t) => { const n = e.byId[t]; - return !!n && A2(n) && Wt(n.annotation).caps.selectable; -}, vH = (e) => Wt(e.annotation).caps.anchored && Vt(e.annotation).kind === "quads", kH = (e) => Wt(e.annotation).caps.movable && !vH(e), gm = (e, t) => { + return !!n && A2(n) && Jt(n.annotation).caps.selectable; +}, vH = (e) => Jt(e.annotation).caps.anchored && Ht(e.annotation).kind === "quads", kH = (e) => Jt(e.annotation).caps.movable && !vH(e), mm = (e, t) => { const n = e.byId[t]; return !!n && Ii(e, n) && kH(n); }, Dme = (e, t) => { if (!Ii(e, t) || vH(t)) return !1; - const n = Wt(t.annotation).caps; + const n = Jt(t.annotation).caps; return n.resizable || n.vertexEditable; -}, d5 = (e, t) => Ni(Vt(e.annotation), qn(e), t); +}, d5 = (e, t) => Ni(Ht(e.annotation), qn(e), t); function AH(e, t) { const n = Wn(e.annotation), r = bs(e.annotation), o = d5(e, t), s = { ...n, strokeWidth: JN(e, t) }; if (r?.intent === "line-dimension") { - const c = Jf(o, r, s.strokeWidth); + const c = Qf(o, r, s.strokeWidth); if (c) return Pme(c, s.strokeWidth); } const i = r ? V0(o, r, s)?.caption : null, a = mge(o, s, Fme(e)); @@ -35252,8 +35283,8 @@ function jme(e, t, n, r) { return o.kind === "text-box" && uK(o, t, n); } const JN = (e, t) => l5(Wn(e.annotation).strokeWidth, qn(e), t), Fme = (e) => { - const t = Vt(e.annotation); - return Wn(e.annotation).interiorColor != null || t.kind === "quads" || Wt(e.annotation).caps.opaqueBody; + const t = Ht(e.annotation); + return Wn(e.annotation).interiorColor != null || t.kind === "quads" || Jt(e.annotation).caps.opaqueBody; }, qL = (e, t) => t.x >= e.x && t.x <= e.x + e.width && t.y >= e.y && t.y <= e.y + e.height, Vme = (e, t, n) => gge(t, Fa(e, n).corners); function GL(e, t, n) { let r = null, o = 1 / 0; @@ -35272,13 +35303,13 @@ function YL(e, t, n, r) { const o = n / 2 - Ume; return e.filter((s) => { if (!G9.includes(s.id)) return !0; - const i = r ? Bt(t, s.at, -r) : t; + const i = r ? Dt(t, s.at, -r) : t; return Math.abs(i.x - s.at.x) < o && Math.abs(i.y - s.at.y) < o; }); } function Kme(e, t, n) { const r = t.objectNumber, o = e.selected.filter( - (i) => e.byId[i]?.annotation.page.objectNumber === r && ws(e, i) && gm(e, i) + (i) => e.byId[i]?.annotation.page.objectNumber === r && ws(e, i) && mm(e, i) ); if (o.length < 2) return null; const s = []; @@ -35286,7 +35317,7 @@ function Kme(e, t, n) { const a = e.byId[i]; s.push(...Fa(a, n).corners); } - return Mt(s); + return Lt(s); } function SH(e, t, n) { const r = t.objectNumber, o = []; @@ -35294,25 +35325,25 @@ function SH(e, t, n) { const i = e.byId[s]; !i || i.annotation.page.objectNumber !== r || o.push(...Fa(i, n).corners); } - return o.length ? Mt(o) : null; + return o.length ? Lt(o) : null; } function f5(e, t, n, r, o, s, i, a) { const c = t.objectNumber; if (e.selected.length === 1 && ws(e, e.selected[0])) { - const d = e.byId[e.selected[0]]; - if (d.annotation.page.objectNumber === c) { - let f = 1 / 0; - if (r.rotationHandle !== !1 && Wt(d.annotation).caps.rotatable && Ii(e, d)) { - const g = Fa(d, a), p = DS(g.corners, r.knobOffset, s); - f = YN(p.at, n, r.knobTol); + const f = e.byId[e.selected[0]]; + if (f.annotation.page.objectNumber === c) { + let d = 1 / 0; + if (r.rotationHandle !== !1 && Jt(f.annotation).caps.rotatable && Ii(e, f)) { + const g = Fa(f, a), p = DS(g.corners, r.knobOffset, s); + d = YN(p.at, n, r.knobTol); } const h = () => ({ kind: "rotate", - ids: [d.id], - pivot: u5(d, a) + ids: [f.id], + pivot: u5(f, a) }); - if (Dme(e, d)) { - const g = Wn(d.annotation), p = bs(d.annotation), m = d5(d, a), v = p?.intent === "line-dimension" && Jf(m, p, JN(d, a)), S = GK(m, r.handleSize, s), C = v ? cH(v) : jS(m, S), k = !v && S.small && $me(m, n), N = GL( + if (Dme(e, f)) { + const g = Wn(f.annotation), p = bs(f.annotation), m = d5(f, a), v = p?.intent === "line-dimension" && Qf(m, p, JN(f, a)), S = GK(m, r.handleSize, s), C = v ? cH(v) : jS(m, S), k = !v && S.small && $me(m, n), N = GL( k ? YL( C, n, @@ -35322,49 +35353,49 @@ function f5(e, t, n, r, o, s, i, a) { n, r.handleTol ); - if (JL(f, N, n)) return h(); + if (JL(d, N, n)) return h(); const w = p && V0(m, p, { ...g, - strokeWidth: JN(d, a) + strokeWidth: JN(f, a) }); if (w && Ome(w, n, Math.min(2, r.handleTol / 3))) - return { kind: "handle", id: d.id, handle: "caption", cursor: "move" }; + return { kind: "handle", id: f.id, handle: "caption", cursor: "move" }; if (N) return { kind: "handle", - id: d.id, + id: f.id, handle: N.id, cursor: OS(N.cursor, a?.rotation ?? 0) }; - } else if (f !== 1 / 0) return h(); + } else if (d !== 1 / 0) return h(); } } else if (e.selected.length > 1) { - const d = i5(e, e.selected), f = d.rotatable || d.resizable ? SH(e, t, a) : null; - if (f) { + const f = i5(e, e.selected), d = f.rotatable || f.resizable ? SH(e, t, a) : null; + if (d) { const h = e.selected.filter( (m) => e.byId[m]?.annotation.page.objectNumber === c ); let g = 1 / 0; - if (d.rotatable && r.rotationHandle !== !1) { + if (f.rotatable && r.rotationHandle !== !1) { const m = [ - { x: f.x, y: f.y }, - { x: f.x + f.width, y: f.y }, - { x: f.x + f.width, y: f.y + f.height }, - { x: f.x, y: f.y + f.height } + { x: d.x, y: d.y }, + { x: d.x + d.width, y: d.y }, + { x: d.x + d.width, y: d.y + d.height }, + { x: d.x, y: d.y + d.height } ], v = DS(m, r.knobOffset, s); g = YN(v.at, n, r.knobTol); } let p = null; - if (d.resizable) { - const m = wR(f, 0, r.handleSize, s), v = UN(f, m); + if (f.resizable) { + const m = wR(d, 0, r.handleSize, s), v = UN(d, m); p = GL( - m.small && qL(f, n) ? YL(v, n, r.handleSize ?? 0, 0) : v, + m.small && qL(d, n) ? YL(v, n, r.handleSize ?? 0, 0) : v, n, r.handleTol ); } if (JL(g, p, n)) { - const m = { x: f.x + f.width / 2, y: f.y + f.height / 2 }; + const m = { x: d.x + d.width / 2, y: d.y + d.height / 2 }; return { kind: "rotate", ids: h, pivot: m }; } if (p) @@ -35373,35 +35404,35 @@ function f5(e, t, n, r, o, s, i, a) { ids: h, handle: p.id, cursor: OS(p.cursor, a?.rotation ?? 0), - box: f + box: d }; } } const l = wH(e, t); - for (let d = l.length - 1; d >= 0; d--) { - const f = l[d], h = e.byId[f]; - if (!(!h || i?.has(f) || !ws(e, f))) { - if (e.selected.includes(f) && gm(e, f) && Vme(h, n, a)) - return { kind: "annot", id: f }; + for (let f = l.length - 1; f >= 0; f--) { + const d = l[f], h = e.byId[d]; + if (!(!h || i?.has(d) || !ws(e, d))) { + if (e.selected.includes(d) && mm(e, d) && Vme(h, n, a)) + return { kind: "annot", id: d }; if (Ihe(AH(h, a), n, o)) - return { kind: "annot", id: f }; + return { kind: "annot", id: d }; } } const u = Kme(e, t, a); if (u && qL(u, n)) { - for (let d = l.length - 1; d >= 0; d--) - if (e.selected.includes(l[d]) && gm(e, l[d])) - return { kind: "annot", id: l[d] }; + for (let f = l.length - 1; f >= 0; f--) + if (e.selected.includes(l[f]) && mm(e, l[f])) + return { kind: "annot", id: l[f] }; } return { kind: "empty" }; } function Hme(e, t, n, r, o, s, i, a) { const c = f5(e, t, n, r, o, s, i, a); - return c.kind === "handle" || c.kind === "group-handle" ? c.cursor : c.kind === "rotate" ? "grab" : c.kind === "annot" ? e.selected.includes(c.id) && gm(e, c.id) ? "move" : "pointer" : null; + return c.kind === "handle" || c.kind === "group-handle" ? c.cursor : c.kind === "rotate" ? "grab" : c.kind === "annot" ? e.selected.includes(c.id) && mm(e, c.id) ? "move" : "pointer" : null; } -const Hm = (e) => e.painter !== void 0 || !Wt(e.annotation).caps.rasterOnly, M2 = (e) => Hm({ annotation: e }) ? "vector" : "baked", QL = (e, t) => Hm({ annotation: e }) && (t || !e.hasAppearance) ? "vector" : "baked"; +const zm = (e) => e.painter !== void 0 || !Jt(e.annotation).caps.rasterOnly, M2 = (e) => zm({ annotation: e }) ? "vector" : "baked", QL = (e, t) => zm({ annotation: e }) && (t || !e.hasAppearance) ? "vector" : "baked"; function $S(e, t) { - if (!Hm(e)) return {}; + if (!zm(e)) return {}; const n = fV( e.annotation, $x(e.annotation, t) @@ -35426,8 +35457,8 @@ function zme(e, t) { } function xH(e, t) { const n = e.byId[t]; - if (!Hm(n)) return n.source; - if (e.editing === t && Vt(n.annotation).kind === "text-box") return "vector"; + if (!zm(n)) return n.source; + if (e.editing === t && Ht(n.annotation).kind === "text-box") return "vector"; const r = e.draft; return (r?.kind === "handle" || r?.kind === "caption" || r?.kind === "leader") && r.id === t || (r?.kind === "rotate" || r?.kind === "group") && r.ids.includes(t) ? "vector" : n.source; } @@ -35437,15 +35468,15 @@ function Wme(e, t) { } function qme(e, t, n, r) { const o = e.byId[t]; - if (Wt(o.annotation).caps.rasterOnly) - return r.kind === "box" && o.annotation.subtype === "widget" ? { box: fm(r.box, r.rotation) } : { + if (Jt(o.annotation).caps.rasterOnly) + return r.kind === "box" && o.annotation.subtype === "widget" ? { box: hm(r.box, r.rotation) } : { box: r.kind === "box" ? Wme(o, r.box) : o.apBox, rot: Dr(r) || void 0 }; if (!o.apBox) return { rot: o.apRot }; const s = Lme( o.apBox, - a5(Vt(o.annotation)), + a5(Ht(o.annotation)), qn(o), n ); @@ -35458,19 +35489,19 @@ function Gme(e, t) { const n = e[0], r = e[e.length - 1], o = r.x - n.x, s = r.y - n.y, i = Math.hypot(o, s); if (i < 3) return [...e]; if (e.reduce((l, u) => { - const d = Math.abs(o * (n.y - u.y) - (n.x - u.x) * s) / i; - return Math.max(l, d); + const f = Math.abs(o * (n.y - u.y) - (n.x - u.x) * s) / i; + return Math.max(l, f); }, 0) / i >= t.deviationThreshold) return [...e]; const c = Math.atan2(Math.abs(s), Math.abs(o)) * (180 / Math.PI); if (c <= t.axisSnapDegrees) { - const l = e.reduce((u, d) => u + d.y, 0) / e.length; + const l = e.reduce((u, f) => u + f.y, 0) / e.length; return [ { x: n.x, y: l }, { x: r.x, y: l } ]; } if (c >= 90 - t.axisSnapDegrees) { - const l = e.reduce((u, d) => u + d.x, 0) / e.length; + const l = e.reduce((u, f) => u + f.x, 0) / e.length; return [ { x: l, y: n.y }, { x: l, y: r.y } @@ -35478,10 +35509,10 @@ function Gme(e, t) { } return [...e]; } -const US = (e, t, n) => Math.max(t, Math.min(n, e)), mm = (e, t) => t ? { +const US = (e, t, n) => Math.max(t, Math.min(n, e)), ym = (e, t) => t ? { x: US(e.x, t.x, t.x + t.width), y: US(e.y, t.y, t.y + t.height) -} : e, ig = (e) => e.zoom != null || e.displayRotation != null ? { zoom: e.zoom ?? 1, rotation: e.displayRotation ?? 0 } : void 0; +} : e, ag = (e) => e.zoom != null || e.displayRotation != null ? { zoom: e.zoom ?? 1, rotation: e.displayRotation ?? 0 } : void 0; function XL(e, t) { let n = 0; for (const r of e) @@ -35515,7 +35546,7 @@ function Jme(e, t, n) { const s = e.byId[o]; s && r.push(...Fa(s, n).corners); } - return r.length ? Mt(r) : null; + return r.length ? Lt(r) : null; } function QN(e, t, n, r, o) { if (!r) return n; @@ -35534,14 +35565,14 @@ const e0 = 3, eD = (e, t) => t ? { x: Math.min(Math.max(e.x, t.x), Math.max(t.x, t.x + t.width - e.width)), y: Math.min(Math.max(e.y, t.y), Math.max(t.y, t.y + t.height - e.height)) } : e; -function wg(e, t, n) { +function vg(e, t, n) { return e === "segment" ? Math.hypot(n.x - t.x, n.y - t.y) >= e0 : Math.abs(n.x - t.x) >= e0 || Math.abs(n.y - t.y) >= e0; } const EH = ({ upright: e, displayRotation: t }) => e && t ? zR(t) : 0; function B2(e, t, n, r, o = {}) { - if (!wg(e, t, n)) + if (!vg(e, t, n)) return r ? CH(t, r, o) : null; - const s = o.pageBox ? mm(t, o.pageBox) : t, i = o.pageBox ? mm(n, o.pageBox) : n; + const s = o.pageBox ? ym(t, o.pageBox) : t, i = o.pageBox ? ym(n, o.pageBox) : n; if (e === "segment") return { kind: "segment", a: s, b: i }; const a = EH(o), c = B0(s, i); return { kind: "box", rect: a % 180 ? d2(c) : c, rot: a }; @@ -35549,11 +35580,11 @@ function B2(e, t, n, r, o = {}) { function CH(e, t, n = {}) { const r = n.upright ? n.displayRotation ?? 0 : 0; if ("length" in t) { - const u = (t.rotation ?? 0) * Math.PI / 180, d = Bt( + const u = (t.rotation ?? 0) * Math.PI / 180, f = Dt( { x: Math.cos(u) * t.length, y: Math.sin(u) * t.length }, { x: 0, y: 0 }, -r - ), f = t.anchor === "start" ? 0 : t.anchor === "end" ? 1 : 0.5, h = { x: e.x - d.x * f, y: e.y - d.y * f }, g = { x: h.x + d.x, y: h.y + d.y }, p = B0(h, g), m = eD(p, n.pageBox), v = m.x - p.x, S = m.y - p.y; + ), d = t.anchor === "start" ? 0 : t.anchor === "end" ? 1 : 0.5, h = { x: e.x - f.x * d, y: e.y - f.y * d }, g = { x: h.x + f.x, y: h.y + f.y }, p = B0(h, g), m = eD(p, n.pageBox), v = m.x - p.x, S = m.y - p.y; return { kind: "segment", a: { x: h.x + v, y: h.y + S }, b: { x: g.x + v, y: g.y + S } }; } const { width: o, height: s } = t, i = EH(n), a = t.anchor === "top-left" ? cge(e, o, s, r) : { x: e.x - o / 2, y: e.y - s / 2, width: o, height: s }, c = i % 180 ? d2(a) : a, l = eD(c, n.pageBox); @@ -35564,7 +35595,7 @@ function CH(e, t, n = {}) { }; } function t0(e, t) { - return Wt(e).family.placed(t, e); + return Jt(e).family.placed(t, e); } function Qme(e) { return { box: e.rect, rotation: e.rot || null }; @@ -35616,9 +35647,9 @@ const OH = { rotationThresholdDeg: 4 }, editable: !0 -}, eye = {}, Qr = (e, t) => e.defaults[t] ?? eye, li = (e, t, n = t) => NH(t, Qr(e, n)); +}, eye = {}, Xr = (e, t) => e.defaults[t] ?? eye, li = (e, t, n = t) => NH(t, Xr(e, n)); function tye(e, t, n) { - return PH(e, t, { ...Qr(e, t), ...n }); + return PH(e, t, { ...Xr(e, t), ...n }); } function PH(e, t, n) { return [{ ...e, defaults: { ...e.defaults, [t]: n } }, []]; @@ -35633,7 +35664,7 @@ function RH(e, t) { const rye = (e) => e === "polygon" || e === "polyline", AC = (e, t) => ({ x: e.x - t.x, y: e.y - t.y }), tD = (e, t, n) => { const r = qn(e); return c5( - n(Ni(Vt(e.annotation), r, t)), + n(Ni(Ht(e.annotation), r, t)), r, t ); @@ -35642,9 +35673,9 @@ const rye = (e) => e === "polygon" || e === "polyline", AC = (e, t) => ({ x: e.x if (r === void 0) throw new Error("annotation-core: the session holds no object number for a new record"); return { kind: "objectNumber", page: t, objectNumber: r }; -}, iu = (e, t) => e.objectNumbers.slice(t); +}, au = (e, t) => e.objectNumbers.slice(t); function Ga(e, t, n, r = {}, o = {}) { - const s = IH(e), i = Pm[s]; + const s = IH(e), i = Rm[s]; return { ...Object.fromEntries( Object.entries(t).filter(([c]) => i.includes(c)) @@ -35717,28 +35748,28 @@ function cye(e, t, n, r = "free-text-callout", o) { return s?.kind !== "create-callout" ? [e, []] : s.step === "box" && s.boxFrom ? [{ ...e, draft: { ...s, boxTo: n.point } }, []] : [{ ...e, draft: { ...s, current: n.point } }, []]; if (s?.kind !== "create-callout" || s.step !== "box" || !s.boxFrom) return [e, []]; - const i = MH(s), a = TH(s), c = li(e, "free-text-callout", s.preset), l = c.subtype === "free-text" ? c.lineEnding : null, u = l && l !== "none" ? l : "open-arrow", d = Ja( + const i = MH(s), a = TH(s), c = li(e, "free-text-callout", s.preset), l = c.subtype === "free-text" ? c.lineEnding : null, u = l && l !== "none" ? l : "open-arrow", f = Ja( e, s.page, Ga( "free-text-callout", - Qr(e, s.preset ?? "free-text-callout"), + Xr(e, s.preset ?? "free-text-callout"), NK(i, a, s.tip, s.knee, u), { intent: "free-text-callout", contents: "" }, s.flags ) - ), f = d.record.id; + ), d = f.record.id; return [ { ...e, - objectNumbers: iu(e, 1), - byId: { ...e.byId, [f]: d.record }, - order: [...e.order, f], - selected: [f], + objectNumbers: au(e, 1), + byId: { ...e.byId, [d]: f.record }, + order: [...e.order, d], + selected: [d], draft: null, - editing: f + editing: d }, - [{ type: "create", id: f, draft: d.draft }] + [{ type: "create", id: d, draft: f.draft }] ]; } function lye(e, t, n, r, o, s) { @@ -35783,10 +35814,10 @@ function lye(e, t, n, r, o, s) { }, l = Wn(a), u = (m) => ({ ...i.measure, leader: { ...i.measure.leader, length: m } - }), d = qN(c, n.point), f = KS( + }), f = qN(c, n.point), d = KS( n.pageBox, - (m) => dH(c, u(d * m), l) - ), h = u(d * f); + (m) => dH(c, u(f * m), l) + ), h = u(f * d); if (t === "move") return [{ ...e, draft: { ...i, measure: h } }, []]; const g = Ja( @@ -35794,7 +35825,7 @@ function lye(e, t, n, r, o, s) { i.page, Ga( "line", - Qr(e, i.preset), + Xr(e, i.preset), c, { ...r5(h), @@ -35807,7 +35838,7 @@ function lye(e, t, n, r, o, s) { return [ { ...e, - objectNumbers: iu(e, 1), + objectNumbers: au(e, 1), byId: { ...e.byId, [p]: g.record }, order: [...e.order, p], selected: [p], @@ -35825,10 +35856,10 @@ function BH(e, t) { { pageBox: t, upright: e.upright, displayRotation: e.displayRotation } ); } -function uye(e, t, n, r, o = n, s, i = !1, a, c, l, u, d) { +function uye(e, t, n, r, o = n, s, i = !1, a, c, l, u, f) { if (t !== "down" && e.draft && "page" in e.draft && e.draft.page.objectNumber !== r.page.objectNumber) return [e, []]; - if (r.pageBox && (r = { ...r, point: mm(r.point, r.pageBox) }), e.draft?.kind === "create-distance" || u?.intent === "line-dimension" && !d) + if (r.pageBox && (r = { ...r, point: ym(r.point, r.pageBox) }), e.draft?.kind === "create-distance" || u?.intent === "line-dimension" && !f) return lye( e, t, @@ -35871,7 +35902,7 @@ function uye(e, t, n, r, o = n, s, i = !1, a, c, l, u, d) { const C = n === "line" ? { kind: "create-line", measure: u, - capture: d, + capture: f, subtype: n, preset: o, page: r.page, @@ -35916,48 +35947,48 @@ function uye(e, t, n, r, o = n, s, i = !1, a, c, l, u, d) { } return [e, []]; } - const f = e.draft; - if (f?.kind !== "create-rect" && f?.kind !== "create-line" && f?.kind !== "create-ink") + const d = e.draft; + if (d?.kind !== "create-rect" && d?.kind !== "create-line" && d?.kind !== "create-ink") return [e, []]; - if (f.kind === "create-ink") { - const C = f.strokes.slice(); + if (d.kind === "create-ink") { + const C = d.strokes.slice(); if (a && C.length) { const N = C.length - 1; C[N] = Gme(C[N], a); } - const k = { ...e, draft: { ...f, strokes: C, drawing: !1 } }; + const k = { ...e, draft: { ...d, strokes: C, drawing: !1 } }; return i ? [k, []] : _H(k); } - const h = li(e, f.subtype, f.preset), g = BH(f, r.pageBox), p = g && t0(h, g); + const h = li(e, d.subtype, d.preset), g = BH(d, r.pageBox), p = g && t0(h, g); if (!p) return [{ ...e, draft: null }, []]; - if (f.kind === "create-line" && f.capture) + if (d.kind === "create-line" && d.capture) return [ { ...e, draft: null }, - [{ type: "captured", tool: f.capture, page: f.page, geometry: p }] + [{ type: "captured", tool: d.capture, page: d.page, geometry: p }] ]; const m = { // A measurement states its intent, scale, caption and leader. - ...f.kind === "create-line" && f.measure ? r5(f.measure) : {}, + ...d.kind === "create-line" && d.measure ? r5(d.measure) : {}, // A free text starts empty, as a plain box. ...p.kind === "text-box" ? { intent: "free-text", contents: "" } : {}, // A drawn link starts at the tool preset's target ('docs-link' style // presets), or dead (`null` — the create-then-edit flow). - ...f.subtype === "link" ? { target: qR(h.subtype === "link" ? h.target : null) } : {} + ...d.subtype === "link" ? { target: qR(h.subtype === "link" ? h.target : null) } : {} }, v = Ja( e, - f.page, + d.page, Ga( - f.subtype, - Qr(e, f.preset ?? f.subtype), + d.subtype, + Xr(e, d.preset ?? d.subtype), p, m, - f.flags + d.flags ) ), S = v.record.id; return [ { ...e, - objectNumbers: iu(e, 1), + objectNumbers: au(e, 1), byId: { ...e.byId, [S]: v.record }, order: [...e.order, S], selected: [S], @@ -35974,14 +36005,14 @@ function _H(e) { const n = t.strokes.flat(); if (!t.strokes.some((i) => i.length >= 2) || n.length === 0) return [{ ...e, draft: null }, []]; - const r = Mt(n); + const r = Lt(n); if (Math.max(r.width, r.height) < e0) return [{ ...e, draft: null }, []]; const o = Ja( e, t.page, Ga( t.subtype, - Qr(e, t.preset ?? t.subtype), + Xr(e, t.preset ?? t.subtype), { kind: "ink", inkList: t.strokes, rotation: 0 }, // The ink highlighter says so: `/IT` is set at create, never changed. t.intent === "ink-highlight" ? { intent: t.intent } : {}, @@ -35991,7 +36022,7 @@ function _H(e) { return [ { ...e, - objectNumbers: iu(e, 1), + objectNumbers: au(e, 1), byId: { ...e.byId, [s]: o.record }, order: [...e.order, s], selected: [s], @@ -36025,7 +36056,7 @@ function LH(e) { t.page, Ga( t.subtype, - Qr(e, t.preset ?? t.subtype), + Xr(e, t.preset ?? t.subtype), o, t.measure ? r5(t.measure) : {}, t.flags @@ -36034,7 +36065,7 @@ function LH(e) { return [ { ...e, - objectNumbers: iu(e, 1), + objectNumbers: au(e, 1), byId: { ...e.byId, [i]: s.record }, order: [...e.order, i], selected: [i], @@ -36050,43 +36081,43 @@ const M1 = 14, SC = (e) => ({ min: { x: e.min.x + t.x, y: e.min.y + t.y }, max: { x: e.max.x + t.x, y: e.max.y + t.y } }), sD = (e, t) => { - const n = Vt(e.byId[t].annotation), r = Wn(e.byId[t].annotation); - return Km(n, r); + const n = Ht(e.byId[t].annotation), r = Wn(e.byId[t].annotation); + return Hm(n, r); }; function fye(e, t, n, r, o, s) { const i = n.objectNumber, a = new Set(t); if (t.some((m) => e.byId[m] && qn(e.byId[m]))) return { delta: r, guides: [] }; - const c = SC(Mt(t.flatMap((m) => sD(e, m)))), l = oD(c, r), u = [ + const c = SC(Lt(t.flatMap((m) => sD(e, m)))), l = oD(c, r), u = [ ...s ? [SC(s)] : [], ...e.order.filter( (m) => !a.has(m) && e.byId[m].annotation.page.objectNumber === i && ws(e, m) && !qn(e.byId[m]) - ).map((m) => SC(Mt(sD(e, m)))) + ).map((m) => SC(Lt(sD(e, m)))) ]; - let d = null, f = null; + let f = null, d = null; for (const m of u) { for (const v of nD(m)) for (const S of nD(l)) { const C = v - S; - Math.abs(C) < o && (!d || Math.abs(C) < Math.abs(d.adjust)) && (d = { adjust: C, at: v, tb: m }); + Math.abs(C) < o && (!f || Math.abs(C) < Math.abs(f.adjust)) && (f = { adjust: C, at: v, tb: m }); } for (const v of rD(m)) for (const S of rD(l)) { const C = v - S; - Math.abs(C) < o && (!f || Math.abs(C) < Math.abs(f.adjust)) && (f = { adjust: C, at: v, tb: m }); + Math.abs(C) < o && (!d || Math.abs(C) < Math.abs(d.adjust)) && (d = { adjust: C, at: v, tb: m }); } } - const h = { x: r.x + (d?.adjust ?? 0), y: r.y + (f?.adjust ?? 0) }, g = oD(c, h), p = []; - return d && p.push({ + const h = { x: r.x + (f?.adjust ?? 0), y: r.y + (d?.adjust ?? 0) }, g = oD(c, h), p = []; + return f && p.push({ axis: "x", - at: d.at, - lo: Math.min(g.min.y, d.tb.min.y) - M1, - hi: Math.max(g.max.y, d.tb.max.y) + M1 - }), f && p.push({ - axis: "y", at: f.at, - lo: Math.min(g.min.x, f.tb.min.x) - M1, - hi: Math.max(g.max.x, f.tb.max.x) + M1 + lo: Math.min(g.min.y, f.tb.min.y) - M1, + hi: Math.max(g.max.y, f.tb.max.y) + M1 + }), d && p.push({ + axis: "y", + at: d.at, + lo: Math.min(g.min.x, d.tb.min.x) - M1, + hi: Math.max(g.max.x, d.tb.max.x) + M1 }), { delta: h, guides: p }; } function hye(e) { @@ -36095,7 +36126,7 @@ function hye(e) { const n = e.byId[t.id], r = n && bs(n.annotation); if (r?.intent !== "line-dimension" || t.delta === 0) return [{ ...e, draft: null }, []]; - const o = Mf(n, { + const o = _f(n, { leader: { ...r.leader, length: (r.leader?.length ?? 0) + t.delta } }); return [{ ...e, draft: null, byId: { ...e.byId, [o.id]: o } }, []]; @@ -36104,11 +36135,11 @@ function hye(e) { const n = e.byId[t.id], r = n && bs(n.annotation); if (!r || !t.delta.x && !t.delta.y) return [{ ...e, draft: null }, []]; const o = Wn(n.annotation), s = T2( - Vt(n.annotation), + Ht(n.annotation), r, t.delta, o - ), i = s.measure.intent === "line-dimension" ? Mf(n, { captionOffset: s.measure.captionOffset }) : dl(n, s.geometry); + ), i = s.measure.intent === "line-dimension" ? _f(n, { captionOffset: s.measure.captionOffset }) : fl(n, s.geometry); return [{ ...e, draft: null, byId: { ...e.byId, [i.id]: i } }, []]; } if (t.kind === "handle") { @@ -36119,7 +36150,7 @@ function hye(e) { if ("unavailable" in i && i.unavailable === "invalid-geometry") return [{ ...e, draft: null }, []]; } - const s = dl(n, r); + const s = fl(n, r); return [{ ...e, byId: { ...e.byId, [t.id]: s }, draft: null }, []]; } if (t.kind === "rotate") { @@ -36134,7 +36165,7 @@ function hye(e) { t.view, (a) => xv(a, t.pivot, n) ); - r[o] = dl(s, i); + r[o] = fl(s, i); } return [{ ...e, byId: r, draft: null }, []]; } @@ -36150,7 +36181,7 @@ function hye(e) { t.view, (c) => I2(c, t.anchor, n, r, M0) ); - o[s] = dl(i, a); + o[s] = fl(i, a); } return [{ ...e, byId: o, draft: null }, []]; } @@ -36158,8 +36189,8 @@ function hye(e) { if (Math.hypot(t.delta.x, t.delta.y) < 0.01) return [{ ...e, draft: null }, []]; const n = { ...e.byId }; for (const r of t.ids) { - const o = n[r], s = Vt(o.annotation); - n[r] = dl(o, N2(s, t.delta)); + const o = n[r], s = Ht(o.annotation); + n[r] = fl(o, N2(s, t.delta)); } return [{ ...e, byId: n, draft: null }, []]; } @@ -36167,7 +36198,7 @@ function hye(e) { } const pye = 180 / Math.PI, iD = (e, t) => Math.atan2(t.y - e.y, t.x - e.x) * pye, gye = (e, t) => (t - e + 540) % 360 - 180; function Ov(e, t) { - const n = iD(t.pivot, t.current) - iD(t.pivot, t.start), r = t.ids.length === 1 ? e.byId[t.ids[0]] : null, o = r ? Dr(Ni(Vt(r.annotation), qn(r), t.view)) : 0, s = zn(o + n); + const n = iD(t.pivot, t.current) - iD(t.pivot, t.start), r = t.ids.length === 1 ? e.byId[t.ids[0]] : null, o = r ? Dr(Ni(Ht(r.annotation), qn(r), t.view)) : 0, s = zn(o + n); if (!e.snap.rotation || t.free) return { delta: n, angle: s, snapped: !1 }; for (const i of e.snap.rotationAngles) { const a = gye(s, zn(i)); @@ -36178,7 +36209,7 @@ function Ov(e, t) { } const mye = (e, t) => t.some((n) => { const r = e.byId[n]; - return !!r && Dr(Vt(r.annotation)) !== 0; + return !!r && Dr(Ht(r.annotation)) !== 0; }); function yye(e, t, n) { return t === "down" ? bye(e, n) : t === "move" ? e.draft ? wye(e, n) : [e, []] : e.draft ? hye(e) : [e, []]; @@ -36192,7 +36223,7 @@ function bye(e, t) { e.hitMargin / (t.scale || 1), t.pageBox, t.inert, - ig(t) + ag(t) ); if (n.kind === "handle" && n.handle === "caption") return [ @@ -36211,7 +36242,7 @@ function bye(e, t) { [] ]; if (n.kind === "handle") { - const r = e.byId[n.id], o = ig(t), s = Ni(Vt(r.annotation), qn(r), o); + const r = e.byId[n.id], o = ag(t), s = Ni(Ht(r.annotation), qn(r), o); return [ { ...e, @@ -36229,7 +36260,7 @@ function bye(e, t) { ]; } if (n.kind === "rotate") { - const r = ig(t); + const r = ag(t); return [ { ...e, @@ -36246,7 +36277,7 @@ function bye(e, t) { ]; } if (n.kind === "group-handle") { - const r = ig(t); + const r = ag(t); return [ { ...e, @@ -36266,20 +36297,20 @@ function bye(e, t) { ]; } if (n.kind === "annot") { - const r = mH(e, n.id), o = e.selected.includes(n.id), s = t.shift ? o ? e.selected.filter((c) => !r.includes(c)) : [...e.selected, ...r.filter((c) => !e.selected.includes(c))] : o ? e.selected : r, a = s.length > 0 && s.every((c) => gm(e, c)) ? { kind: "move", ids: s, start: t.point, delta: { x: 0, y: 0 }, guides: [] } : null; + const r = mH(e, n.id), o = e.selected.includes(n.id), s = t.shift ? o ? e.selected.filter((c) => !r.includes(c)) : [...e.selected, ...r.filter((c) => !e.selected.includes(c))] : o ? e.selected : r, a = s.length > 0 && s.every((c) => mm(e, c)) ? { kind: "move", ids: s, start: t.point, delta: { x: 0, y: 0 }, guides: [] } : null; return [{ ...e, selected: s, draft: a }, []]; } return [{ ...e, selected: [] }, []]; } -const aD = (e, t, n) => mm( +const aD = (e, t, n) => ym( { x: e.x + n.point.x - t.x, y: e.y + n.point.y - t.y }, - n.pageBox && Mt([...Yr(n.pageBox), e]) + n.pageBox && Lt([...Qr(n.pageBox), e]) ); function wye(e, t) { const n = e.draft, r = Yme(e, n); if (r != null && t.page.objectNumber !== r.objectNumber) return [e, []]; if (n.kind === "move") { - const s = ig(t), i = QN( + const s = ag(t), i = QN( e, n.ids, AC(t.point, n.start), @@ -36301,28 +36332,28 @@ function wye(e, t) { ); return [{ ...e, draft: { ...n, delta: c, guides: l } }, []]; } - const o = mm(t.point, t.pageBox); + const o = ym(t.point, t.pageBox); if (n.kind === "leader") { - const s = e.byId[n.id], i = Vt(s.annotation), a = bs(s.annotation), c = qN(i, o) - qN(i, n.start); + const s = e.byId[n.id], i = Ht(s.annotation), a = bs(s.annotation), c = qN(i, o) - qN(i, n.start); if (a?.intent !== "line-dimension") return [{ ...e, draft: { ...n, delta: c } }, []]; - const l = a.leader?.length ?? 0, u = KS(t.pageBox, (d) => { - const f = { ...a.leader, length: l + c * d }; - return Fa(s, void 0, { measure: { ...a, leader: f } }).corners; + const l = a.leader?.length ?? 0, u = KS(t.pageBox, (f) => { + const d = { ...a.leader, length: l + c * f }; + return Fa(s, void 0, { measure: { ...a, leader: d } }).corners; }); return [{ ...e, draft: { ...n, delta: c * u } }, []]; } if (n.kind === "caption") { - const s = e.byId[n.id], i = Vt(s.annotation), a = bs(s.annotation), c = Wn(s.annotation), l = AC(o, n.start), u = a ? ZL(t.pageBox, l, (d) => { - const f = T2(i, a, d, c); - return Fa(s, void 0, f).corners; + const s = e.byId[n.id], i = Ht(s.annotation), a = bs(s.annotation), c = Wn(s.annotation), l = AC(o, n.start), u = a ? ZL(t.pageBox, l, (f) => { + const d = T2(i, a, f, c); + return Fa(s, void 0, d).corners; }) : l; return [{ ...e, draft: { ...n, delta: u } }, []]; } if (n.kind === "handle") { const s = e.byId[n.id], i = jS(n.base).find((u) => u.id === n.handle)?.at ?? o, a = n.start ? aD(i, n.start, t) : o, c = (u) => yge(n.base, n.handle, { x: i.x + u.x, y: i.y + u.y }), l = ZL(t.pageBox, AC(a, i), (u) => { - const d = c(u); - return Fa(s, void 0, { geometry: d }).corners; + const f = c(u); + return Fa(s, void 0, { geometry: f }).corners; }); return [{ ...e, draft: { ...n, current: c(l) } }, []]; } @@ -36341,7 +36372,7 @@ function wye(e, t) { return [e, []]; } function vye(e, t, n) { - const r = mm(n.point, n.pageBox); + const r = ym(n.point, n.pageBox); if (t === "down") return [{ ...e, draft: { kind: "marquee", page: n.page, from: r, to: r } }, []]; if (e.draft?.kind !== "marquee") return [e, []]; @@ -36353,7 +36384,7 @@ function vye(e, t, n) { e.draft.page, B0(e.draft.from, r), n.inert, - ig(n) + ag(n) ), s = n.shift ? kye(e.selected, o) : o; return [{ ...e, selected: s, draft: null }, []]; } @@ -36377,7 +36408,7 @@ function $0(e, t) { const n = []; for (const r of e.order) { const o = e.byId[r]; - o && E2(o) && Tf(o.annotation) === t && n.push(o); + o && E2(o) && Bf(o.annotation) === t && n.push(o); } return n; } @@ -36411,7 +36442,7 @@ function Cye(e, t) { (i) => r.includes(i.subtype) && oS(i.subtype).some((a) => lV(i, a)) )) return null; const s = r.filter( - (i) => su(e, { ...n, subtype: i }) + (i) => iu(e, { ...n, subtype: i }) ); return s.length > 1 ? jpe(s) : null; } @@ -36421,7 +36452,7 @@ function Iye(e, t) { return [...e.slice(0, r), Dpe, ...e.slice(r)]; } function Nye(e, t) { - const n = t.map((s) => Wt(s)), r = Iye(Eye(n), n), o = Cye(e, t); + const n = t.map((s) => Jt(s)), r = Iye(Eye(n), n), o = Cye(e, t); return o ? [o, ...r] : r; } function Oye(e) { @@ -36509,13 +36540,13 @@ function FH(e, t, n, r = []) { if (s <= o) return e; const i = U0(e, o), a = U0(e, s), c = e.paragraphs.map((l, u) => { if (u < i.paragraph || u > a.paragraph) return l; - const d = u === i.paragraph ? i.offset : 0, f = u === a.paragraph ? a.offset : l.runs.reduce((m, v) => m + v.text.length, 0); - if (f <= d) return l; - const h = lD(lD(l, d), f); + const f = u === i.paragraph ? i.offset : 0, d = u === a.paragraph ? a.offset : l.runs.reduce((m, v) => m + v.text.length, 0); + if (d <= f) return l; + const h = lD(lD(l, f), d); let g = 0; const p = h.runs.map((m) => { const v = g; - if (g += m.text.length, v < d || v >= f || m.text.length === 0) return m; + if (g += m.text.length, v < f || v >= d || m.text.length === 0) return m; const S = { ...m.style ?? {}, ...n }; for (const C of r) delete S[C]; return { ...m, style: S }; @@ -36588,9 +36619,9 @@ function jye(e, t) { dir: "ltr" }; } -function Yl(e, t) { +function Ql(e, t) { if (e.subtype === "free-text" && e.richText) return e.richText; - const n = qf(e) ?? { + const n = Jf(e) ?? { fontFamily: "helvetica", fontSize: 12, fontColor: "#000000", @@ -36605,7 +36636,7 @@ function _2(e, t, n) { let r = null; for (const o of t) { const s = (r ?? e.byId)[o]; - if (!s || !su(e, s.annotation)) continue; + if (!s || !iu(e, s.annotation)) continue; const i = n(s); i !== s && (r ?? (r = { ...e.byId }), r[o] = i); } @@ -36613,8 +36644,8 @@ function _2(e, t, n) { } function Fye(e, t) { return [_2(e, Object.keys(t), (r) => { - const { subtype: o, ...s } = t[r.id], i = o === void 0 || su(e, { ...r.annotation, subtype: o }), a = Vye(r.annotation, s); - return Mf(r, i ? { subtype: o, ...a } : a); + const { subtype: o, ...s } = t[r.id], i = o === void 0 || iu(e, { ...r.annotation, subtype: o }), a = Vye(r.annotation, s); + return _f(r, i ? { subtype: o, ...a } : a); }), []]; } const uD = { @@ -36650,7 +36681,7 @@ function Hye(e, t, n) { const s = o.annotation; if (s.subtype !== "free-text") return o; const { body: i, paragraphs: a } = s.richText, c = VH({ paragraphs: a }, (l) => Kye(l, t, n)); - return $ye(i, t) === n && c.paragraphs === a ? o : Mf(o, { + return $ye(i, t) === n && c.paragraphs === a ? o : _f(o, { richText: { body: Uye(i, t, n), paragraphs: c.paragraphs } }); }), []]; @@ -36659,15 +36690,15 @@ function zye(e, t) { const n = [], r = []; for (const o of e.selected) { const s = e.byId[o]; - !s || !Ii(e, s) || !xye(Wt(s.annotation)) || (s.annotation.subtype === "link" ? r.push(o) : n.push({ type: "syncLink", id: o, target: t })); + !s || !Ii(e, s) || !xye(Jt(s.annotation)) || (s.annotation.subtype === "link" ? r.push(o) : n.push({ type: "syncLink", id: o, target: t })); } - return t && !qR(t) ? [e, n] : [_2(e, r, (o) => Mf(o, { target: t })), n]; + return t && !qR(t) ? [e, n] : [_2(e, r, (o) => _f(o, { target: t })), n]; } function Wye(e, t, n) { - return [_2(e, n ?? e.selected, (r) => Mf(r, t)), []]; + return [_2(e, n ?? e.selected, (r) => _f(r, t)), []]; } const KH = (e, t) => { - const { rotatable: n, quarterTurns: r } = Wt(e.annotation).caps; + const { rotatable: n, quarterTurns: r } = Jt(e.annotation).caps; return n || r && t % 90 === 0; }; function HH(e, t, n) { @@ -36684,7 +36715,7 @@ function HH(e, t, n) { o ?? (o = { ...e.byId }); for (const c of i) { const l = o[c]; - o[c] = dl(l, N2(Vt(l.annotation), a)); + o[c] = fl(l, N2(Ht(l.annotation), a)); } } } @@ -36707,8 +36738,8 @@ function qye(e, t, n) { } const s = { ...e.byId }; for (const i of r) { - const a = s[i], c = Vt(a.annotation); - s[i] = dl(a, xv(c, o, t)); + const a = s[i], c = Ht(a.annotation); + s[i] = fl(a, xv(c, o, t)); } return [HH({ ...e, byId: s }, r, n), []]; } @@ -36717,10 +36748,10 @@ function Gye(e, t) { for (const o of e.selected) { const s = n[o]; if (!s || !Ii(e, s) || !KH(s, 0)) continue; - const i = Vt(s.annotation); + const i = Ht(s.annotation); if (Dr(i) === 0) continue; const a = u5(s); - n[o] = dl(s, lge(i, a)), r.push(o); + n[o] = fl(s, lge(i, a)), r.push(o); } return r.length ? [HH({ ...e, byId: n }, r, t), []] : [e, []]; } @@ -36771,12 +36802,12 @@ function Xye(e, t, n, r, o = t, s) { const a = { kind: "quads", quadPoints: i }, c = t === "redact" ? { rect: qK(a) } : {}, l = Ja( e, n, - Ga(t, Qr(e, o), a, c, s) + Ga(t, Xr(e, o), a, c, s) ), u = l.record.id; return [ { ...e, - objectNumbers: iu(e, 1), + objectNumbers: au(e, 1), byId: { ...e.byId, [u]: l.record }, order: [...e.order, u], selected: [u], @@ -36802,7 +36833,7 @@ function Zye(e, t, n, r, o = "replace-text") { t, Ga( "strikeout", - Qr(e, o), + Xr(e, o), { kind: "quads", quadPoints: s }, { intent: "strikeout-text-edit" } ), @@ -36811,7 +36842,7 @@ function Zye(e, t, n, r, o = "replace-text") { return [ { ...e, - objectNumbers: iu(e, 2), + objectNumbers: au(e, 2), byId: { ...e.byId, [c]: a.record, [u]: l.record }, order: [...e.order, c, u], selected: [c, u], @@ -36830,12 +36861,12 @@ function ebe(e, t, n, r) { const s = Ja( e, t, - Ga("caret", Qr(e, "caret"), o, {}, r) + Ga("caret", Xr(e, "caret"), o, {}, r) ), i = s.record.id; return [ { ...e, - objectNumbers: iu(e, 1), + objectNumbers: au(e, 1), byId: { ...e.byId, [i]: s.record }, order: [...e.order, i], selected: [i], @@ -37018,7 +37049,7 @@ function dbe(e, t) { return e.kind === "box" || e.kind === "caret" || e.kind === "text-box" && !e.calloutLine ? zn(t ?? 0) : 0; } function fbe(e, t, n) { - const r = Bt(vn(t), vn(e.box), -e.rotation); + const r = Dt(vn(t), vn(e.box), -e.rotation); return { box: { x: r.x - t.width / 2 - e.box.x, @@ -37030,7 +37061,7 @@ function fbe(e, t, n) { }; } function Hy(e, t = 1) { - const n = { box: e.box, rotation: dbe(e.geometry, e.rot), scale: t }, r = Pd(e.style); + const n = { box: e.box, rotation: dbe(e.geometry, e.rot), scale: t }, r = Td(e.style); return { ...e, frame: n, @@ -37047,7 +37078,7 @@ function g5(e, t) { if (!o || !r) return o; if (r.kind === "caption" && r.id === t) { - const s = Vt(n.annotation), i = Wn(n.annotation); + const s = Ht(n.annotation), i = Wn(n.annotation); return T2(s, o, r.delta, i).measure; } return r.kind === "leader" && r.id === t && o.intent === "line-dimension" ? { @@ -37058,8 +37089,8 @@ function g5(e, t) { } } : o; } -function _f(e, t, n) { - const r = e.byId[t], o = Ni(Vt(r.annotation), qn(r), n), s = e.draft; +function Df(e, t, n) { + const r = e.byId[t], o = Ni(Ht(r.annotation), qn(r), n), s = e.draft; if (s) { if (s.kind === "move" && s.ids.includes(t)) return N2(o, s.delta); @@ -37091,20 +37122,20 @@ function qH(e, t) { }; } function tO(e, t, n, r, o, s, i) { - const a = Ni(n, qn({ annotation: t }), o), c = L2(t, o), l = s && V0(a, s, c), u = qf(t), d = l?.visualBounds ?? $y(a, c); + const a = Ni(n, qn({ annotation: t }), o), c = L2(t, o), l = s && V0(a, s, c), u = Jf(t), f = l?.visualBounds ?? $y(a, c); return Hy( { id: e, ref: null, - subtype: Wt(t).name, + subtype: Jt(t).name, geometry: a, - box: d, + box: f, style: c, ...u ? { text: u } : {}, ...WH(t), ...zH(t), ...s ? { measure: s } : {}, - ...i ? qH(i, d) : {}, + ...i ? qH(i, f) : {}, source: r, selected: !1, rot: Dr(a) @@ -37122,18 +37153,18 @@ function mbe(e, t) { function ybe(e, t, n) { const r = t.objectNumber, o = []; for (const a of wH(e, t)) { - const c = e.byId[a], l = qf(c.annotation), u = _f(e, a, n), d = L2(c.annotation, n), f = qme(e, a, n, u), h = g5(e, a), p = (h && V0(u, h, d))?.visualBounds ?? $y(u, d); + const c = e.byId[a], l = Jf(c.annotation), u = Df(e, a, n), f = L2(c.annotation, n), d = qme(e, a, n, u), h = g5(e, a), p = (h && V0(u, h, f))?.visualBounds ?? $y(u, f); o.push( Hy( { id: a, ref: Sn(c), annotation: c.annotation, - subtype: Wt(c.annotation).name, + subtype: Jt(c.annotation).name, geometry: u, box: p, - apBox: f.box, - style: d, + apBox: d.box, + style: f, ...l ? { text: l } : {}, ...WH(c.annotation), ...zH(c.annotation), @@ -37144,14 +37175,14 @@ function ybe(e, t, n) { selected: e.selected.includes(a), ...e.hovered === a ? { hovered: !0 } : {}, rot: Dr(u), - ...f.rot ? { apRot: f.rot } : {} + ...d.rot ? { apRot: d.rot } : {} }, bH(qn(c), n) ) ); } const s = e.draft; - if ((s?.kind === "create-rect" || s?.kind === "create-line") && s.page.objectNumber === r && wg(s.kind === "create-line" ? "segment" : "box", s.from, s.to)) { + if ((s?.kind === "create-rect" || s?.kind === "create-line") && s.page.objectNumber === r && vg(s.kind === "create-line" ? "segment" : "box", s.from, s.to)) { const a = BH(s), c = { ...li(e, s.subtype, s.preset), ...s.flags }, l = a && t0(c, a); if (l) { const u = s.kind === "create-line" ? s.measure : void 0; @@ -37177,7 +37208,7 @@ function ybe(e, t, n) { inkList: s.strokes, rotation: 0, ...s.drawing ? { drawing: !0 } : {} - }, u = s.kind === "create-distance" || s.kind === "create-poly" ? s.measure : void 0, d = u && V0(l, u, c); + }, u = s.kind === "create-distance" || s.kind === "create-poly" ? s.measure : void 0, f = u && V0(l, u, c); o.push( Hy({ id: xC, @@ -37185,7 +37216,7 @@ function ybe(e, t, n) { measure: u, subtype: s.subtype, geometry: l, - box: d?.visualBounds ?? $y(l, c), + box: f?.visualBounds ?? $y(l, c), style: c, source: "draft", selected: !1 @@ -37193,19 +37224,19 @@ function ybe(e, t, n) { ); } if (s?.kind === "create-callout" && s.page.objectNumber === r) { - const a = li(e, s.subtype, s.preset), c = Wn(a), l = a.subtype === "free-text" ? a.lineEnding : null, u = l && l !== "none" ? l : "open-arrow", d = TH(s), f = s.step === "knee" ? { + const a = li(e, s.subtype, s.preset), c = Wn(a), l = a.subtype === "free-text" ? a.lineEnding : null, u = l && l !== "none" ? l : "open-arrow", f = TH(s), d = s.step === "knee" ? { kind: "line", linePoints: { start: s.tip, end: s.current }, lineEndings: { start: u, end: "none" }, rotation: 0 - } : NK(MH(s), d, s.tip, s.knee, u); + } : NK(MH(s), f, s.tip, s.knee, u); o.push( Hy({ id: xC, ref: null, subtype: s.subtype, - geometry: f, - box: $y(f, c), + geometry: d, + box: $y(d, c), style: c, source: "draft", selected: !1 @@ -37242,8 +37273,8 @@ function bbe(e, t, n) { } function GH(e, t, n) { const r = e.byId[t]; - if (!r || Vt(r.annotation).kind !== "text-box") return null; - const o = _f(e, t, n); + if (!r || Ht(r.annotation).kind !== "text-box") return null; + const o = Df(e, t, n); return o.kind !== "text-box" ? null : { id: t, box: o.box, @@ -37271,7 +37302,7 @@ function JH(e, t, n, r) { const a = e.byId[i]; !a || a.annotation.page.objectNumber !== o || s.push(...Pv(e, i, n(i), r).corners); } - return s.length ? Mt(s) : null; + return s.length ? Lt(s) : null; } function fD(e, t, n, r, o, s) { const i = t.objectNumber, a = e.selected.filter( @@ -37279,7 +37310,7 @@ function fD(e, t, n, r, o, s) { ); if (a.length === 1) { const c = e.byId[a[0]]; - if (!Wt(c.annotation).caps.rotatable || !Ii(e, c)) + if (!Jt(c.annotation).caps.rotatable || !Ii(e, c)) return null; const l = Pv(e, c.id, o(c.id), s); return DS(l.corners, r, n); @@ -37298,14 +37329,14 @@ function YH(e, t, n, r = C2, o) { t, n, r, - (c) => Ni(Vt(e.byId[c].annotation), qn(e.byId[c]), o), + (c) => Ni(Ht(e.byId[c].annotation), qn(e.byId[c]), o), o ); if (!i) return null; const { delta: a } = Ov(e, s); return { - at: Bt(i.at, s.pivot, a), - from: Bt(i.from, s.pivot, a) + at: Dt(i.at, s.pivot, a), + from: Dt(i.from, s.pivot, a) }; } return fD( @@ -37313,7 +37344,7 @@ function YH(e, t, n, r = C2, o) { t, n, r, - (i) => _f(e, i, o), + (i) => Df(e, i, o), o ); } @@ -37324,27 +37355,27 @@ function vbe(e, t, n, r = C2, o, s) { a.push({ kind: "guide", axis: u.axis, at: u.at, lo: u.lo, hi: u.hi }); const c = e.draft?.kind === "rotate" && e.byId[e.draft.ids[0]]?.annotation.page.objectNumber === i ? e.draft : null; if (c) { - const { angle: u } = Ov(e, c), d = n ?? { x: c.pivot.x - 300, y: c.pivot.y - 300, width: 600, height: 600 }, f = []; + const { angle: u } = Ov(e, c), f = n ?? { x: c.pivot.x - 300, y: c.pivot.y - 300, width: 600, height: 600 }, d = []; for (const [h, g] of [ [0, "axis"], [90, "axis"], [u, "indicator"] ]) { - const p = hge(d, c.pivot, h); - p && f.push({ ...p, role: g }); + const p = hge(f, c.pivot, h); + p && d.push({ ...p, role: g }); } - a.push({ kind: "rotate-guides", center: c.pivot, angle: u, lines: f }); + a.push({ kind: "rotate-guides", center: c.pivot, angle: u, lines: d }); } const l = e.selected.filter( (u) => ws(e, u) && e.byId[u].annotation.page.objectNumber === i ); if (l.length === 1) { - const u = e.byId[l[0]], d = _f(e, l[0], o), f = L2(u.annotation, o), h = Wt(u.annotation).caps, g = Dr(d), p = g5(e, u.id), m = p?.intent === "line-dimension" && Jf(d, p, f.strokeWidth), v = Pv(e, u.id, d, o); - if (v.angle !== 0 ? a.push({ kind: "obb", corners: v.corners, angle: v.angle }) : a.push({ kind: "outline", rect: Mt(v.corners) }), !c && Ii(e, u) && (h.resizable || h.vertexEditable)) { - const S = GK(d, s, n), C = e.draft?.kind === "handle" && e.draft.id === u.id ? e.draft.handle : null, k = m ? cH(m) : hD( - jS(d, S), + const u = e.byId[l[0]], f = Df(e, l[0], o), d = L2(u.annotation, o), h = Jt(u.annotation).caps, g = Dr(f), p = g5(e, u.id), m = p?.intent === "line-dimension" && Qf(f, p, d.strokeWidth), v = Pv(e, u.id, f, o); + if (v.angle !== 0 ? a.push({ kind: "obb", corners: v.corners, angle: v.angle }) : a.push({ kind: "outline", rect: Lt(v.corners) }), !c && Ii(e, u) && (h.resizable || h.vertexEditable)) { + const S = GK(f, s, n), C = e.draft?.kind === "handle" && e.draft.id === u.id ? e.draft.handle : null, k = m ? cH(m) : hD( + jS(f, S), C, - () => jS(d, { ...S, small: !1 }) + () => jS(f, { ...S, small: !1 }) ); for (const N of k) a.push({ @@ -37357,11 +37388,11 @@ function vbe(e, t, n, r = C2, o, s) { }); } } else if (l.length > 1 && !c) { - const u = JH(e, t, (d) => _f(e, d, o), o); + const u = JH(e, t, (f) => Df(e, f, o), o); if (u && (a.push({ kind: "outline", rect: u }), i5(e, l).resizable)) { - const f = e.draft?.kind === "group" && e.draft.op === "resize" ? e.draft.handle : null, h = wR(u, 0, s, n), g = hD( + const d = e.draft?.kind === "group" && e.draft.op === "resize" ? e.draft.handle : null, h = wR(u, 0, s, n), g = hD( UN(u, h), - f, + d, () => UN(u, { ...h, small: !1 }) ); for (const p of g) @@ -37370,7 +37401,7 @@ function vbe(e, t, n, r = C2, o, s) { at: p.at, cursor: OS(p.cursor, o?.rotation ?? 0), role: pD(p.id), - active: p.id === f + active: p.id === d }); } } @@ -37386,9 +37417,9 @@ function kbe(e, t, n) { ); if (o.length === 0) return null; const s = o.flatMap( - (i) => Pv(e, i, _f(e, i, n), n).corners + (i) => Pv(e, i, Df(e, i, n), n).corners ); - return Mt(s); + return Lt(s); } function Abe(e, t, n, r) { if (e.draft && !e.draft.kind.startsWith("create-")) return null; @@ -37423,7 +37454,7 @@ function QH(e) { kind: "poly", subtype: t.closed ? "polygon" : "polyline", page: t.page, - bounds: Mt(t.points), + bounds: Lt(t.points), pointCount: t.points.length, minPoints: n, canFinish: t.points.length >= n && (!t.measure || !("unavailable" in R2( @@ -37443,10 +37474,10 @@ function pD(e) { function gD(e, t, n) { const r = e.byId[t]; if (!r) return null; - const o = Pv(e, t, _f(e, t, n), n); - return { page: r.annotation.page, bounds: Mt(o.corners) }; + const o = Pv(e, t, Df(e, t, n), n); + return { page: r.annotation.page, bounds: Lt(o.corners) }; } -const vg = 20, ag = 1, mD = (e) => Number(e.toFixed(3)); +const kg = 20, cg = 1, mD = (e) => Number(e.toFixed(3)); class nO { constructor(t) { this.toPage = t, this.parts = []; @@ -37473,8 +37504,8 @@ class nO { } /** A closed ellipse in the box between two corners: four curves from its top middle. */ ellipse(t, n, r, o) { - const s = (t + r) / 2, i = (n + o) / 2, a = yD * Math.abs(r - t) / 2, c = yD * Math.abs(o - n) / 2, [l, u] = [Math.min(t, r), Math.max(t, r)], [d, f] = [Math.min(n, o), Math.max(n, o)]; - return this.move(s, f).curve(s + a, f, u, i + c, u, i).curve(u, i - c, s + a, d, s, d).curve(s - a, d, l, i - c, l, i).curve(l, i + c, s - a, f, s, f).close(); + const s = (t + r) / 2, i = (n + o) / 2, a = yD * Math.abs(r - t) / 2, c = yD * Math.abs(o - n) / 2, [l, u] = [Math.min(t, r), Math.max(t, r)], [f, d] = [Math.min(n, o), Math.max(n, o)]; + return this.move(s, d).curve(s + a, d, u, i + c, u, i).curve(u, i - c, s + a, f, s, f).curve(s - a, f, l, i - c, l, i).curve(l, i + c, s - a, d, s, d).close(); } get d() { return this.parts.join(" "); @@ -37486,7 +37517,7 @@ function xbe(e) { return 0.299 * n + 0.587 * r + 0.114 * o < 0.45 ? "#ffffff" : "#000000"; } function XH(e, t) { - const n = xbe(e.color), r = { opacity: e.opacity, blend: Pd(e) }; + const n = xbe(e.color), r = { opacity: e.opacity, blend: Td(e) }; return { contrast: n, /** Filled with the colour and outlined, as PDF's `B` (or `B*`, even-odd) paints. */ @@ -37494,11 +37525,11 @@ function XH(e, t) { ...r, fill: e.color ?? void 0, stroke: n, - width: ag * t, + width: cg * t, ...o ? { fillRule: "evenodd" } : {} }), /** Outlined only. */ - outline: (o = ag, s = !1) => ({ + outline: (o = cg, s = !1) => ({ ...r, stroke: n, width: o * t, @@ -37517,18 +37548,18 @@ function XH(e, t) { }; } function ZH(e) { - const t = e.width / vg, n = e.height / vg; + const t = e.width / kg, n = e.height / kg; return { - toPage: (r, o) => ({ x: e.x + r * t, y: e.y + (vg - o) * n }), + toPage: (r, o) => ({ x: e.x + r * t, y: e.y + (kg - o) * n }), pen: Math.sqrt(t * n) }; } const ez = (e, t) => (n, r) => e( - ag / 2 + n / t * (vg - ag), - ag / 2 + r / t * (vg - ag) + cg / 2 + n / t * (kg - cg), + cg / 2 + r / t * (kg - cg) ); function Ebe(e, t, n) { - const { toPage: r, pen: o } = ZH(t), s = XH(n, o), i = () => new nO(r), a = () => new nO(ez(r, vg)), c = (l, u) => ({ kind: "path", d: l.d, paint: u }); + const { toPage: r, pen: o } = ZH(t), s = XH(n, o), i = () => new nO(r), a = () => new nO(ez(r, kg)), c = (l, u) => ({ kind: "path", d: l.d, paint: u }); switch (e) { case "comment": { const l = i().move(0.5, 4.5).line(0.5, 19.5).line(19.5, 19.5).line(19.5, 4.5).line(8.5, 4.5).line(6.5, 0.5).line(4.5, 4.5).line(0.5, 4.5); @@ -37561,7 +37592,7 @@ function Ebe(e, t, n) { } default: { const l = a().move(3.5, 1).line(3.5, 19).line(12.5, 19).line(16.5, 15).line(16.5, 1).close(), u = a().move(12.5, 19).line(12.5, 15).line(16.5, 15); - for (const d of [12, 8.5, 5]) u.move(6, d).line(14, d); + for (const f of [12, 8.5, 5]) u.move(6, f).line(14, f); return [c(l, s.body()), c(u, s.outline())]; } } @@ -37603,9 +37634,9 @@ function Nbe(e, t) { }; } function Obe(e, t, n, r, o) { - const s = Math.max(2, o * 1.5), i = (u, d) => ({ - x: e.x + t.x * u + n.x * d, - y: e.y + t.y * u + n.y * d + const s = Math.max(2, o * 1.5), i = (u, f) => ({ + x: e.x + t.x * u + n.x * f, + y: e.y + t.y * u + n.y * f }), a = (u) => `${zS(u.x)} ${zS(u.y)}`, c = i(s / 2, o); let l = `M ${a(i(0, 0))} Q ${a(c)} ${a(i(s, 0))}`; for (let u = s; u + s <= r + 0.5; u += s) @@ -37623,13 +37654,13 @@ function Pbe(e, t, n) { y: i.lowerRight.y - i.lowerLeft.y }, u = Math.hypot(l.x, l.y); if (u <= 0 || c <= 0) continue; - const d = { x: a.x / c, y: a.y / c }, f = Math.min(2.5, Math.max(0.75, c * 0.06)); + const f = { x: a.x / c, y: a.y / c }, d = Math.min(2.5, Math.max(0.75, c * 0.06)); if (e === "underline") s.push({ kind: "line", - a: { x: i.lowerLeft.x - d.x * f, y: i.lowerLeft.y - d.y * f }, - b: { x: i.lowerRight.x - d.x * f, y: i.lowerRight.y - d.y * f }, - paint: { stroke: r, width: f, opacity: o, blend: Pd(n) } + a: { x: i.lowerLeft.x - f.x * d, y: i.lowerLeft.y - f.y * d }, + b: { x: i.lowerRight.x - f.x * d, y: i.lowerRight.y - f.y * d }, + paint: { stroke: r, width: d, opacity: o, blend: Td(n) } }); else if (e === "strikeout") s.push({ @@ -37642,25 +37673,25 @@ function Pbe(e, t, n) { x: (i.upperRight.x + i.lowerRight.x) / 2, y: (i.upperRight.y + i.lowerRight.y) / 2 }, - paint: { stroke: r, width: f, opacity: o, blend: Pd(n) } + paint: { stroke: r, width: d, opacity: o, blend: Td(n) } }); else if (e === "squiggly") { const h = Math.min(2, Math.max(1, c * 0.08)), g = { x: l.x / u, y: l.y / u }, p = { - x: i.lowerLeft.x - d.x * h, - y: i.lowerLeft.y - d.y * h + x: i.lowerLeft.x - f.x * h, + y: i.lowerLeft.y - f.y * h }; s.push({ kind: "path", // n̂ toward ascent = −(toward baseline) - d: Obe(p, g, { x: -d.x, y: -d.y }, u, h), - paint: { stroke: r, width: f, opacity: o, blend: Pd(n) } + d: Obe(p, g, { x: -f.x, y: -f.y }, u, h), + paint: { stroke: r, width: d, opacity: o, blend: Td(n) } }); } else s.push({ kind: "poly", points: o2(i), closed: !0, - paint: { fill: r, opacity: o, blend: Pd(n) } + paint: { fill: r, opacity: o, blend: Td(n) } }); } return s; @@ -37752,7 +37783,7 @@ function jbe(e) { n.push(...Dbe(r.bounds, e.label, e.text)); return n; } -const Fbe = (e) => e.source !== "baked" || e.lentScene !== void 0 || e.annotation !== void 0 && Hm({ annotation: e.annotation }); +const Fbe = (e) => e.source !== "baked" || e.lentScene !== void 0 || e.annotation !== void 0 && zm({ annotation: e.annotation }); function Vbe(e) { if (e.lentScene) return [...e.lentScene()]; if (e.subtype === "link") return []; @@ -37778,7 +37809,7 @@ function Vbe(e) { const t = e.geometry.kind === "ink", n = e.style.strokeWidth === 0 && Ibe.has(e.subtype), r = CL(e.geometry, e.style).map((o) => { const s = o.kind === "rect" || o.kind === "ellipse" || o.kind === "path" && !t || o.kind === "poly" && o.closed, i = { ...Nbe(e.style, s), - blend: Pd(e.style), + blend: Td(e.style), ...n ? { hairline: !0 } : {} }; return { @@ -37814,7 +37845,7 @@ function n0(e) { const [t] = e.failed; if (t) throw t.error; } -const tz = () => new re("operation-failed", "annotation", "the annotation could not be created"), Ube = (e, t) => { +const tz = () => new te("operation-failed", "annotation", "the annotation could not be created"), Ube = (e, t) => { for (const n of e.result?.items ?? []) if (n.type === "annotations.create" && oe(n.annotation.ref) === t) return n.annotation; @@ -37831,109 +37862,109 @@ async function Va(e) { const t = await e.written; return n0(t), t; } -async function ym(e, t = 0) { +async function bm(e, t = 0) { return (await Va(e)).annotations[t] ?? null; } async function Kbe(e, t = 0) { - const n = await ym(e, t); + const n = await bm(e, t); if (!n) throw tz(); return n.ref; } const Hbe = { noZoom: !0, noRotate: !0 }, bD = { hidden: !0, noZoom: !0, noRotate: !0 }, EC = (e) => ({ x: e.x, y: e.y, width: 20, height: 20 }); function zbe(e, { store: t, authority: n, events: r }, o, s) { - const i = (d, f) => t.applyWhenNumbered([{ type: "create", page: Lt(d), draft: f }]).then((h) => Kbe(h)), a = async (d, f) => { - await e.cancellable(f, Va(t.apply([{ type: "delete", ref: d }]))); - }, c = (d) => { - const f = t.model().byId[oe(d)]; - return !!f && !sm(f.annotation) && x2(f); - }, l = (d, f) => r.threadChanged.emit({ rootRef: d, type: f }); + const i = (f, d) => t.applyWhenNumbered([{ type: "create", page: Ft(f), draft: d }]).then((h) => Kbe(h)), a = async (f, d) => { + await e.cancellable(d, Va(t.apply([{ type: "delete", ref: f }]))); + }, c = (f) => { + const d = t.model().byId[oe(f)]; + return !!d && !im(d.annotation) && x2(d); + }, l = (f, d) => r.threadChanged.emit({ rootRef: f, type: d }); return { api: { comments: { listThreads: () => o.index().threads, - getThread: (d) => o.index().byMember.get(oe(d)) ?? null, + getThread: (f) => o.index().byMember.get(oe(f)) ?? null, onThreadChanged: r.threadChanged.on, - reply: async (d, f, h = {}) => { + reply: async (f, d, h = {}) => { e.assertAllowed("annotations:create", "annotation.comments.reply"); - const g = o.rootRefOf(d), p = o.threadOf(d), m = await t.applyWhenNumbered([ + const g = o.rootRefOf(f), p = o.threadOf(f), m = await t.applyWhenNumbered([ { type: "create", - page: Lt(p.page.objectNumber), + page: Ft(p.page.objectNumber), draft: { subtype: "text", rect: EC(p.root.rect), icon: "comment", - contents: f, + contents: d, reply: { to: p.root.ref }, ...Hbe } } ]), v = await e.cancellable( h.signal, - ym(m) + bm(m) ); if (l(g, "reply"), !v) - throw new re("operation-failed", "annotation", "the reply could not be created"); + throw new te("operation-failed", "annotation", "the reply could not be created"); return { annotation: v }; }, - setText: async (d, f, h = {}) => { - const g = o.rootRefOf(d), p = t.model().byId[oe(d)]; - if (p && sm(p.annotation)) - throw new re( + setText: async (f, d, h = {}) => { + const g = o.rootRefOf(f), p = t.model().byId[oe(f)]; + if (p && im(p.annotation)) + throw new te( "invalid-input", "annotation", "a measurement's text is worked out from its points" ); if (!Sn(p)) - throw new re("not-found", "annotation", `no annotation ${oe(d)}`); + throw new te("not-found", "annotation", `no annotation ${oe(f)}`); await s.update( - d, - { subtype: p.annotation.subtype, contents: f }, + f, + { subtype: p.annotation.subtype, contents: d }, void 0, h ), l(g, "text"); }, - setStatus: async (d, f, h = {}) => { + setStatus: async (f, d, h = {}) => { e.assertAllowed("annotations:create", "annotation.comments.setStatus"); - const g = o.rootRefOf(d), p = o.threadOf(d), m = o.currentUserId(), v = m ? p.review.byReviewer[m] : void 0; + const g = o.rootRefOf(f), p = o.threadOf(f), m = o.currentUserId(), v = m ? p.review.byReviewer[m] : void 0; await e.cancellable( h.signal, i(p.page.objectNumber, { subtype: "text", rect: EC(p.root.rect), reply: { to: v?.ref ?? p.root.ref }, - state: f, + state: d, stateModel: "review", ...bD }) ), l(g, "status"); }, - setMarked: async (d, f, h = {}) => { + setMarked: async (f, d, h = {}) => { e.assertAllowed("annotations:create", "annotation.comments.setMarked"); - const g = o.rootRefOf(d), p = o.threadOf(d); + const g = o.rootRefOf(f), p = o.threadOf(f); await e.cancellable( h.signal, i(p.page.objectNumber, { subtype: "text", rect: EC(p.root.rect), reply: { to: p.root.ref }, - state: f ? "marked" : "unmarked", + state: d ? "marked" : "unmarked", stateModel: "marked", ...bD }) ), l(g, "marked"); }, - delete: async (d, f = {}) => { - const h = o.rootRefOf(d); - await a(d, f.signal), l(h, "deleted"); + delete: async (f, d = {}) => { + const h = o.rootRefOf(f); + await a(f, d.signal), l(h, "deleted"); }, - deleteThread: async (d, f = {}) => { - const h = o.rootRefOf(d), g = o.threadOf(d), p = o.memberRefsOf(g), m = n.blockersOf(h); + deleteThread: async (f, d = {}) => { + const h = o.rootRefOf(f), g = o.threadOf(f), p = o.memberRefsOf(g), m = n.blockersOf(h); if (m.length > 0) return l(h, "deleted"), { deleted: [], failed: m.map((v) => ({ ref: v, error: new Error("delete not permitted") })) }; try { - return await a(h, f.signal), { deleted: p, failed: [] }; + return await a(h, d.signal), { deleted: p, failed: [] }; } catch (v) { return { deleted: [], failed: [{ ref: h, error: v }] }; } finally { @@ -37946,10 +37977,10 @@ function zbe(e, { store: t, authority: n, events: r }, o, s) { canSetStatus: () => n.canCreate(), canSetMarked: () => n.canCreate(), canSetText: c, - canDelete: (d) => n.canDelete(d), - canDeleteThread: (d) => { - const f = o.index().byMember.get(oe(d)) ?? null; - return f !== null && n.canDelete(f.root.ref); + canDelete: (f) => n.canDelete(f), + canDeleteThread: (f) => { + const d = o.index().byMember.get(oe(f)) ?? null; + return d !== null && n.canDelete(d.root.ref); } } } }; } @@ -37957,13 +37988,13 @@ function Wbe(e, { store: t }) { const n = () => e.doc?.security.identity?.userId; let r = null; const o = () => (e.document()?.pages ?? []).map((u) => u.ref.objectNumber).join(","), s = () => { - const u = t.model(), d = []; + const u = t.model(), f = []; for (const m of u.order) { const v = u.byId[m]; - v && Sn(v) && d.push(v.annotation); + v && Sn(v) && f.push(v.annotation); } - const f = ZY(d, { currentUserId: n() }), h = e.document()?.pages ?? [], g = new Map(h.map((m, v) => [m.ref.objectNumber, v])); - f.sort((m, v) => { + const d = ZY(f, { currentUserId: n() }), h = e.document()?.pages ?? [], g = new Map(h.map((m, v) => [m.ref.objectNumber, v])); + d.sort((m, v) => { const S = g.get(m.page.objectNumber) ?? Number.MAX_SAFE_INTEGER, C = g.get(v.page.objectNumber) ?? Number.MAX_SAFE_INTEGER; if (S !== C) return S - C; if (m.root.rect.y !== v.root.rect.y) return m.root.rect.y - v.root.rect.y; @@ -37971,30 +38002,30 @@ function Wbe(e, { store: t }) { return k === null || N === null ? k === N ? 0 : k === null ? -1 : 1 : GP(k, N); }); const p = /* @__PURE__ */ new Map(); - for (const m of f) { + for (const m of d) { p.set(oe(m.root.ref), m); for (const v of m.replies) p.set(oe(v.ref), m); for (const v of m.groupedParts) p.set(oe(v.ref), m); for (const v of m.review.statusRefs) p.set(oe(v), m); } - return { threads: f, byMember: p }; + return { threads: d, byMember: p }; }, i = () => { - const u = t.model(), d = o(), f = n(); - return r && r.byId === u.byId && r.order === u.order && r.layout === d && r.userId === f || (r = { ...s(), byId: u.byId, order: u.order, layout: d, userId: f }), r; + const u = t.model(), f = o(), d = n(); + return r && r.byId === u.byId && r.order === u.order && r.layout === f && r.userId === d || (r = { ...s(), byId: u.byId, order: u.order, layout: f, userId: d }), r; }; return { currentUserId: n, index: i, threadOf: (u) => { - const d = i().byMember.get(oe(u)); - if (!d) throw new Error("[annotation] no comment thread contains this ref"); - return d; + const f = i().byMember.get(oe(u)); + if (!f) throw new Error("[annotation] no comment thread contains this ref"); + return f; }, rootRefOf: (u) => i().byMember.get(oe(u))?.root.ref ?? u, memberRefsOf: (u) => [ - ...u.replies.map((d) => d.ref), - ...u.groupedParts.map((d) => d.ref), + ...u.replies.map((f) => f.ref), + ...u.groupedParts.map((f) => f.ref), ...u.review.statusRefs, u.root.ref // root LAST — children first keeps foreign readers coherent ] }; } -const rz = 100, qbe = 95, Gbe = 55, Jbe = 50, Ybe = 4, B1 = (e) => e === "polygon" || e === "polyline", wD = (e) => e === "free-text-callout", fl = (e, t) => e.project?.(t) ?? (e.page?.ref.objectNumber === t.objectNumber ? e.page.point : null); +const rz = 100, qbe = 95, Gbe = 55, Jbe = 50, Ybe = 4, B1 = (e) => e === "polygon" || e === "polyline", wD = (e) => e === "free-text-callout", hl = (e, t) => e.project?.(t) ?? (e.page?.ref.objectNumber === t.objectNumber ? e.page.point : null); function oz(e, t, n) { n.page && e.canCreate() && !t.hasCursorClaim() ? e.hoverGhostAt( t.getActiveToolId(), @@ -38072,7 +38103,7 @@ function Xbe(e, t) { }, onPointerMove: (r) => { if (!n) return; - const o = fl(r, n.page); + const o = hl(r, n.page); o && (n.point = o, e.editPointer( "move", n.page, @@ -38088,7 +38119,7 @@ function Xbe(e, t) { n && (e.editPointer( "up", n.page, - fl(r, n.page) ?? n.point, + hl(r, n.page) ?? n.point, !1, void 0, void 0, @@ -38134,7 +38165,7 @@ function Zbe(e) { }, n = { page: s.page.ref, point: s.page.point }, o = { scale: s.page.scale, rotation: s.page.rotation, zoom: s.page.zoom }, r = !1, !0) : !1, onPointerMove: (s) => { if (!t) return; - const i = fl(s, t.page); + const i = hl(s, t.page); if (i) { if (n = { page: t.page, point: i }, !r) { if (Math.hypot(s.viewport.x - t.vx, s.viewport.y - t.vy) < Ybe) @@ -38198,15 +38229,15 @@ function ewe(e, t) { priority: Gbe, enabledFor: (c) => c.enables.has("annotation-draw"), onPointerDown: (c) => { - const l = n(), u = r(l), d = e.getDistanceCreationPage?.(); - if (d != null) { - const f = fl(c, d); - return f && e.createPointer(l, "down", d, f), a = null, !0; + const l = n(), u = r(l), f = e.getDistanceCreationPage?.(); + if (f != null) { + const d = hl(c, f); + return d && e.createPointer(l, "down", f, d), a = null, !0; } if (!c.page) return !1; if (a = { page: c.page.ref, point: c.page.point }, B1(u)) { - const f = (c.clickCount ?? 1) >= 2; - return e.createPointer(l, "down", c.page.ref, c.page.point, f), o = !f, i = f ? null : c.page.ref, !0; + const d = (c.clickCount ?? 1) >= 2; + return e.createPointer(l, "down", c.page.ref, c.page.point, d), o = !d, i = d ? null : c.page.ref, !0; } return o = !1, wD(u) ? (s = !0, i = c.page.ref) : i = null, e.createPointer( l, @@ -38220,27 +38251,27 @@ function ewe(e, t) { onPointerMove: (c) => { const l = n(), u = r(l); if (!a || B1(u) && !o) return; - const d = fl(c, a.page); - d && (a.point = d, e.createPointer(l, "move", a.page, d)); + const f = hl(c, a.page); + f && (a.point = f, e.createPointer(l, "move", a.page, f)); }, onPointerUp: (c) => { const l = n(), u = r(l); - a && !B1(u) && e.createPointer(l, "up", a.page, fl(c, a.page) ?? a.point), a = null, e.clearGhost(); + a && !B1(u) && e.createPointer(l, "up", a.page, hl(c, a.page) ?? a.point), a = null, e.clearGhost(); }, onPointerCancel: () => { o = !1, s = !1, i = null, a = null, e.draft.cancel(), e.clearGhost(); }, onHover: (c) => { oz(e, t, c); - const l = n(), u = r(l), d = e.getDistanceCreationPage?.(); - if (d != null) { - const f = fl(c, d); - f && e.createPointer(l, "move", d, f); + const l = n(), u = r(l), f = e.getDistanceCreationPage?.(); + if (f != null) { + const d = hl(c, f); + d && e.createPointer(l, "move", f, d); return; } if (i && (o && B1(u) || s && wD(u))) { - const f = fl(c, i); - f && e.createPointer(l, "move", i, f); + const d = hl(c, i); + d && e.createPointer(l, "move", i, d); } } }; @@ -38263,7 +38294,7 @@ function twe(e, t, n) { }); } function nwe(e, t) { - const n = e.get(Cn), r = e.tryGet(ja), o = e.tryGet(Dm); + const n = e.get(Cn), r = e.tryGet(ja), o = e.tryGet(jm); o && e.cleanup( o.registerAnnotCommitSink((s) => t.commitScriptEffects(s)) ); @@ -38289,7 +38320,7 @@ function nwe(e, t) { e.listen(n.onToolChanged, () => { t.finishInkDraft(), t.cancel(), t.clearGhost(), t.hoverGhostIn(null), t.pruneEngagedSelection(); const s = n.getActiveTool(); - s.id !== Vd && !s.enables.has("annotation-stamp") && t.stamps.disarm(); + s.id !== Ud && !s.enables.has("annotation-stamp") && t.stamps.disarm(); }), r && twe(t, r, n); } const rwe = () => ({ @@ -38349,7 +38380,7 @@ function iwe(e, { store: t, records: n, lending: r }) { ); }, c = (w) => w.map((y) => y.annotation); let l = null; - const u = /* @__PURE__ */ new Map(), d = (w) => { + const u = /* @__PURE__ */ new Map(), f = (w) => { const y = t.model(); if (!w || !w.pages && w.subtype === void 0) return l?.model !== y && (l = { model: y, v: c(a()) }), l.v; @@ -38362,18 +38393,18 @@ function iwe(e, { store: t, records: n, lending: r }) { } return c(a(w)); }; - let f = null; + let d = null; return { get: o, listAnnots: a, listSelected: () => { const w = t.model(); - return f?.model !== w && (f = { + return d?.model !== w && (d = { model: w, v: c( w.selected.map((y) => w.byId[y]).filter((y) => !!y) ) - }), f.v; + }), d.v; }, getEditing: () => { const w = t.model(); @@ -38382,7 +38413,7 @@ function iwe(e, { store: t, records: n, lending: r }) { loadedOrThrow: (w) => { const y = t.model().byId[oe(w)]; if (!y) - throw new re("not-found", "annotation", "annotation is not loaded in this document"); + throw new te("not-found", "annotation", "annotation is not loaded in this document"); return y; }, selectedRecords: () => { @@ -38390,19 +38421,19 @@ function iwe(e, { store: t, records: n, lending: r }) { return w.selected.map((y) => w.byId[y]).filter((y) => !!y); }, pageOf: (w) => t.model().byId[oe(w)]?.annotation.page ?? w.page, - api: { get: o, list: d, isPending: s, getHovered: () => { + api: { get: o, list: f, isPending: s, getHovered: () => { const w = t.model(); return w.hovered ? w.byId[w.hovered]?.annotation ?? null : null; }, isEditable: (w) => { const y = t.model(), x = y.byId[oe(w)]; - return !!x && su(y, x.annotation); + return !!x && iu(y, x.annotation); }, isMovable: (w) => { const y = t.model().byId[oe(w)]; return !!y && kH(y); } } }; } -const Id = (e, t) => e != null || t != null ? { zoom: e ?? 1, rotation: t ?? 0 } : void 0; +const Od = (e, t) => e != null || t != null ? { zoom: e ?? 1, rotation: t ?? 0 } : void 0; function awe(e) { const t = (s) => e.document()?.pages.find((i) => i.ref.objectNumber === s), n = (s) => t(s)?.size ?? null; return { sizeOf: n, cropOf: (s) => t(s)?.pdfCropBox ?? null, pageBoxOf: (s) => { @@ -38436,7 +38467,7 @@ function cwe(e, { c(A.scale), n.pageBoxOf(O), E === void 0 ? r.engagedIdsOn(O) : E ?? void 0, - Id(A.zoom, A.rotation) + Od(A.zoom, A.rotation) ); }, u = (y, x, A = {}) => { const b = l(y, x, A, 1, null), E = b.kind === "annot" || b.kind === "handle" ? b.id : null, I = E != null ? t.model().byId[E] : void 0; @@ -38444,10 +38475,10 @@ function cwe(e, { I, x, i(A.scale).handleTol, - Id(A.zoom, A.rotation) + Od(A.zoom, A.rotation) ) ? E : null; - }, d = /* @__PURE__ */ new Map(), f = (y, x, A, b) => { - const E = y.objectNumber, I = t.model(), O = s(), T = d.get(E); + }, f = /* @__PURE__ */ new Map(), d = (y, x, A, b) => { + const E = y.objectNumber, I = t.model(), O = s(), T = f.get(E); if (T && T.model === I && T.cs === O && T.scale === x && T.rotation === A && T.zoom === b) return T.v; const R = i(x); @@ -38456,10 +38487,10 @@ function cwe(e, { y, n.pageBoxOf(E), R.knobOffset, - Id(b, A), + Od(b, A), R.handleSize ); - return O.guides.enabled || (M = M.filter((F) => F.kind !== "rotate-guides")), O.rotationHandle.enabled || (M = M.filter((F) => F.kind !== "rotate-knob")), d.set(E, { model: I, cs: O, scale: x, rotation: A, zoom: b, v: M }), M; + return O.guides.enabled || (M = M.filter((F) => F.kind !== "rotate-guides")), O.rotationHandle.enabled || (M = M.filter((F) => F.kind !== "rotate-knob")), f.set(E, { model: I, cs: O, scale: x, rotation: A, zoom: b, v: M }), M; }; let h = null; const g = (y, x, A) => { @@ -38470,7 +38501,7 @@ function cwe(e, { b, (T) => n.pageBoxOf(T.objectNumber), () => i(y).knobOffset, - () => Id(A, x) + () => Od(A, x) ), O = I ? { page: I.page, bounds: I.bounds, @@ -38517,13 +38548,13 @@ function cwe(e, { selectionAnchor: () => g(), rotationAnchor: () => N(), api: { - listChromeNodes: (y, x, A, b) => f(y, x, A, b), + listChromeNodes: (y, x, A, b) => d(y, x, A, b), getSelectionAnchorIn: (y) => g(y.scale, y.rotation, y.zoom), getAnnotationAnchor: (y, x) => S(y, x), getHitKind: (y, x, A, b, E, I) => l(y, x, { scale: A, rotation: b, zoom: E }, a(I)).kind, claimsTouchAt: (y, x, A, b, E) => { const I = t.model(), O = l(y, x, { scale: A, rotation: b, zoom: E }, ED); - return O.kind === "handle" || O.kind === "rotate" || O.kind === "group-handle" ? !0 : O.kind === "annot" ? I.selected.includes(O.id) && I.selected.every((T) => gm(I, T)) : !1; + return O.kind === "handle" || O.kind === "rotate" || O.kind === "group-handle" ? !0 : O.kind === "annot" ? I.selected.includes(O.id) && I.selected.every((T) => mm(I, T)) : !1; }, getCursorAt: (y, x, A, b, E) => { const I = y.objectNumber, O = t.model(); @@ -38535,7 +38566,7 @@ function cwe(e, { c(A), n.pageBoxOf(I), r.engagedIdsOn(I), - Id(E, b) + Od(E, b) ); } } @@ -38552,10 +38583,10 @@ const CD = [ function lwe(e, t) { const n = e.weight ?? 400, r = e.italic ?? !1; return UP({ family: e.family, weight: n, italic: r }, (o) => { - const s = Cf(o); + const s = Nf(o); let i; for (const a of t?.() ?? []) { - if (Cf(a.familyName) !== s) continue; + if (Nf(a.familyName) !== s) continue; const c = Math.abs(a.weight - n) + (a.italic === r ? 0 : 1e3); (!i || c < i.score) && (i = { key: a.key, score: c }); } @@ -38566,7 +38597,7 @@ const uwe = (e) => e.trim().toUpperCase(); function dwe(e, t, n) { return { richText: { - paragraphs: az(t, Yl(e.annotation, n).body) + paragraphs: az(t, Ql(e.annotation, n).body) } }; } @@ -38617,11 +38648,11 @@ function hwe(e, t) { if (r <= n) return []; const o = U0(e, n), s = U0(e, r), i = []; for (let a = o.paragraph; a <= s.paragraph; a++) { - const c = e.paragraphs[a], l = a === o.paragraph ? o.offset : 0, u = a === s.paragraph ? s.offset : c.runs.reduce((f, h) => f + h.text.length, 0); - let d = 0; - for (const f of c.runs) { - const h = d + f.text.length; - h > l && d < u && f.text.length > 0 && i.push(f.style ?? {}), d = h; + const c = e.paragraphs[a], l = a === o.paragraph ? o.offset : 0, u = a === s.paragraph ? s.offset : c.runs.reduce((d, h) => d + h.text.length, 0); + let f = 0; + for (const d of c.runs) { + const h = f + d.text.length; + h > l && f < u && d.text.length > 0 && i.push(d.style ?? {}), f = h; } } return i; @@ -38642,7 +38673,7 @@ function cz(e, t, n) { decoration: c.decoration ?? e.decoration }), o = (t.length ? t : [{}]).map(r), s = {}, i = [], a = (c, l) => { const u = l(o[0]); - s[c] = u, o.some((d) => JSON.stringify(l(d)) !== JSON.stringify(u)) && i.push(c); + s[c] = u, o.some((f) => JSON.stringify(l(f)) !== JSON.stringify(u)) && i.push(c); }; return a( "fontFamily", @@ -38675,38 +38706,38 @@ function uz(e, t) { } function ywe(e, { store: t, fonts: n }) { const r = (u) => { - const d = e.state.get().textSelection; - return d && u.editing === d.id && u.byId[d.id] ? d : null; + const f = e.state.get().textSelection; + return f && u.editing === f.id && u.byId[f.id] ? f : null; }, o = (u) => { - const d = r(u); - return d && d.end > d.start ? d : null; + const f = r(u); + return f && f.end > f.start ? f : null; }, s = (u) => { - const d = r(u); - return d && d.end === d.start ? d : null; - }, i = (u, d) => { - const f = d.annotation, h = qf(f); + const f = r(u); + return f && f.end === f.start ? f : null; + }, i = (u, f) => { + const d = f.annotation, h = Jf(d); return { - data: f, + data: d, ...h ? { text: h } : {}, // Parents store no link: the committed children are the truth, read // through the lens. A link annotation reads its own target. - link: f.subtype === "link" ? f.target ?? null : XN(u, d.id) + link: d.subtype === "link" ? d.target ?? null : XN(u, f.id) }; - }, a = (u, d) => { - if (d.annotation.subtype !== "free-text") return null; - const f = Yl(d.annotation, n), h = r(u); - return h?.id !== d.id ? ID(f, { start: 0, end: Oye(f) }, n) : h.end > h.start ? ID(f, h, n) : pwe(f, h.start, h.typing, n); + }, a = (u, f) => { + if (f.annotation.subtype !== "free-text") return null; + const d = Ql(f.annotation, n), h = r(u); + return h?.id !== f.id ? ID(d, { start: 0, end: Oye(d) }, n) : h.end > h.start ? ID(d, h, n) : pwe(d, h.start, h.typing, n); }; let c = null; return { activeTextRange: o, activeCaret: s, selectionPropertiesOf: () => { - const u = t.model(), d = r(u); - if (c && c.model === u && c.selection === d) return c.v; - const f = u.selected.map((k) => u.byId[k]).filter( - (k) => !!k && su(u, k.annotation) + const u = t.model(), f = r(u); + if (c && c.model === u && c.selection === f) return c.v; + const d = u.selected.map((k) => u.byId[k]).filter( + (k) => !!k && iu(u, k.annotation) ), h = Nye( u, - f.map((k) => k.annotation) - ), g = f.map((k) => i(u, k)), p = f.map((k) => a(u, k)), m = (k, N) => { + d.map((k) => k.annotation) + ), g = d.map((k) => i(u, k)), p = d.map((k) => a(u, k)), m = (k, N) => { const w = p[N]; return w && CD.includes(k.key) ? w.values[k.key] : lz(k, g[N]); }, v = g.length ? uz(h, g[0]) : {}, S = []; @@ -38717,7 +38748,7 @@ function ywe(e, { store: t, fonts: n }) { (g.some((y, x) => JSON.stringify(m(k, x)) !== w) || N && p.some((y) => y?.mixed.includes(k.key))) && S.push(k.key); } const C = { properties: h, values: v, mixed: S }; - return c = { model: u, selection: d, v: C }, C; + return c = { model: u, selection: f, v: C }, C; } }; } function bwe(e, t, n, r) { @@ -38728,7 +38759,7 @@ function wwe(e, t, n, r) { return o && dz(e, o, r); } function dz(e, t, n) { - const r = e.byId[t.id], o = (r && qf(r.annotation)) ?? Sye, s = r ? Wn(r.annotation).strokeWidth : 0, i = r ? Yl(r.annotation, n?.lookup) : null, a = i ? { family: i.body.family, weight: i.body.weight, italic: i.body.italic } : { family: "Helvetica", weight: 400, italic: !1 }, c = n?.text.bodyCss(t.id, o, a) ?? hm(Gf(o.fontFamily)); + const r = e.byId[t.id], o = (r && Jf(r.annotation)) ?? Sye, s = r ? Wn(r.annotation).strokeWidth : 0, i = r ? Ql(r.annotation, n?.lookup) : null, a = i ? { family: i.body.family, weight: i.body.weight, italic: i.body.italic } : { family: "Helvetica", weight: 400, italic: !1 }, c = n?.text.bodyCss(t.id, o, a) ?? pm(Yf(o.fontFamily)); return { id: t.id, ref: Sn(r), @@ -38770,7 +38801,7 @@ function vwe(e, t, n, r, o) { italic: c.italic ?? n.italic }); for (const u of l.programs) - s.some((d) => d.hash === u.hash) || s.push(u); + s.some((f) => f.hash === u.hash) || s.push(u); } return s; } @@ -38782,71 +38813,71 @@ function kwe(e, { fonts: s, textFonts: i }, a, c) { - const l = /* @__PURE__ */ new Map(), u = () => e.tryGet(Xa), d = (I) => { + const l = /* @__PURE__ */ new Map(), u = () => e.tryGet(Xa), f = (I) => { if (!I.hovered || !I.label) return I; const O = u()?.getPaintFonts( I.text?.fontFamily ?? "helvetica", I.label.text ); return O ? { ...I, label: { ...I.label, fonts: O } } : I; - }, f = (I, O) => { - const T = I.objectNumber, R = t(T), M = e.state.get(), F = M.ghostAt?.page.objectNumber === T ? M.ghostAt : null, B = M.placing?.page.objectNumber === T ? M.placing : null, $ = u()?.getPaintFontsEpoch() ?? 0, D = l.get(T); - if (D && D.model === R && D.ghostAt === F && D.placing === B && D.zoom === O?.zoom && D.rotation === O?.rotation && D.fontsEpoch === $) + }, d = (I, O) => { + const T = I.objectNumber, R = t(T), M = e.state.get(), F = M.ghostAt?.page.objectNumber === T ? M.ghostAt : null, _ = M.placing?.page.objectNumber === T ? M.placing : null, $ = u()?.getPaintFontsEpoch() ?? 0, D = l.get(T); + if (D && D.model === R && D.ghostAt === F && D.placing === _ && D.zoom === O?.zoom && D.rotation === O?.rotation && D.fontsEpoch === $) return D.v; - const _ = [ - ...ybe(R, I, O).map(d), + const B = [ + ...ybe(R, I, O).map(f), ...a.itemsOn(T, R, O) ]; return l.set(T, { model: R, ghostAt: F, - placing: B, + placing: _, zoom: O?.zoom, rotation: O?.rotation, fontsEpoch: $, - v: _ - }), _; + v: B + }), B; }, h = /* @__PURE__ */ new Map(), g = (I, O) => { const T = I.objectNumber, R = t(T), M = i.version(), F = h.get(T); if (F && F.model === R && F.zoom === O?.zoom && F.rotation === O?.rotation && F.fonts === M) return F.v; - const B = bwe(R, I, O, { lookup: s, text: i }); + const _ = bwe(R, I, O, { lookup: s, text: i }); return h.set(T, { model: R, zoom: O?.zoom, rotation: O?.rotation, fonts: M, - v: B - }), B; + v: _ + }), _; }, p = /* @__PURE__ */ new Map(), m = (I, O) => { const T = oe(I), R = t(I.page.objectNumber), M = i.version(), F = p.get(T); if (F && F.model === R && F.zoom === O?.zoom && F.rotation === O?.rotation && F.fonts === M) return F.v; - const B = wwe(R, T, O, { lookup: s, text: i }); - return p.set(T, { model: R, zoom: O?.zoom, rotation: O?.rotation, fonts: M, v: B }), B; + const _ = wwe(R, T, O, { lookup: s, text: i }); + return p.set(T, { model: R, zoom: O?.zoom, rotation: O?.rotation, fonts: M, v: _ }), _; }, v = /* @__PURE__ */ new Map(), S = (I) => { const O = t(I), T = v.get(I); if (T && T.model === O) return T.v; const R = []; for (const M of O.order) { - const F = O.byId[M], B = F?.annotation; - if (!B || B.page.objectNumber !== I || B.subtype !== "link" || !KR(B, !1)) continue; - const $ = B.target ?? null, D = Vt(B); + const F = O.byId[M], _ = F?.annotation; + if (!_ || _.page.objectNumber !== I || _.subtype !== "link" || !KR(_, !1)) continue; + const $ = _.target ?? null, D = Ht(_); if ($ == null || D.kind !== "box") continue; - const _ = B.actions?.activate, L = Sn(F) ?? void 0, j = !!B.actions?.cursorEnter?.root, H = !!B.actions?.cursorExit?.root; + const B = _.actions?.activate, L = Sn(F) ?? void 0, j = !!_.actions?.cursorEnter?.root, H = !!_.actions?.cursorExit?.root; R.push({ id: M, bounds: D.box, target: $, - attached: Tf(B) !== void 0, - ..._ ? { activate: _ } : {}, + attached: Bf(_) !== void 0, + ...B ? { activate: B } : {}, ...L ? { ref: L } : {}, ...j || H ? { hoverEvents: { enter: j, exit: H } } : {} }); } return v.set(I, { model: O, v: R }), R; }, C = { - listPageItems: (I, O) => f(I, O), + listPageItems: (I, O) => d(I, O), listTextItems: (I, O) => g(I, O), getTextItem: (I, O) => m(I, O), listLinkItems: (I) => S(I.objectNumber), @@ -38876,14 +38907,14 @@ function kwe(e, { R.push({ ref: D.annotation.ref, version: D.pictureVersion ?? 0 }); } } - const B = n.lender(); + const _ = n.lender(); return { engine: R, placed: M.sort().join("|"), - lent: F && B ? `lent:${B.getPictureEpoch(I)}` : "" + lent: F && _ ? `lent:${_.getPictureEpoch(I)}` : "" }; }, N = (I, O, T) => { - const R = n.lender(), M = t(I.objectNumber), F = M.order.some((B) => n.owns(B) && !M.byId[B].unconfirmed); + const R = n.lender(), M = t(I.objectNumber), F = M.order.some((_) => n.owns(_) && !M.byId[_].unconfirmed); return !R || !F ? Promise.resolve([]) : R.renderAppearances(I, O, T).catch(() => []); }, w = (I, O, T, R) => { const M = e.tryGet(Pr); @@ -38916,26 +38947,26 @@ function kwe(e, { for (const M of x(I.id)) { const F = O.getKeptAppearances("annotations", M); if (F.length) - return F.map((B) => ({ ...B, ref: T, rect: I.apBox ?? B.rect })); + return F.map((_) => ({ ..._, ref: T, rect: I.apBox ?? _.rect })); } return []; }, E = async (I, O) => { const T = t(I.objectNumber), R = T.order.map(async (M) => { const F = T.byId[M]; if (!F.unconfirmed) return []; - const B = F.pictureVersion ?? 0, $ = A(F); - if (!$) return b(F).map((L) => ({ ...L, version: B })); + const _ = F.pictureVersion ?? 0, $ = A(F); + if (!$) return b(F).map((L) => ({ ...L, version: _ })); const D = F.apBox; if (!D) return []; - const _ = await $(D.width * O); - return _ ? [ + const B = await $(D.width * O); + return B ? [ { ref: F.annotation.ref, mode: "normal", state: null, rect: D, - image: UQ(_.bytes, _.mimeType ?? "image/png"), - version: B + image: UQ(B.bytes, B.mimeType ?? "image/png"), + version: _ } ] : []; }); @@ -38945,34 +38976,34 @@ function kwe(e, { } function Awe(e, t) { const n = () => e.allows("doc.annotate.read"), r = () => e.allows("annotations:create"), o = (u) => { - const d = t.model().byId[oe(u)]?.annotation; + const f = t.model().byId[oe(u)]?.annotation; return { - ...d?.userId != null ? { userId: d.userId } : {}, - ...d?.groupId != null ? { groupId: d.groupId } : {} + ...f?.userId != null ? { userId: f.userId } : {}, + ...f?.groupId != null ? { groupId: f.groupId } : {} }; - }, s = (u, d) => e.doc?.security.allowsAnnotation(u, o(d)) ?? !1, i = (u) => { - const d = t.model().byId[oe(u)]; - return !!d && S2(d); + }, s = (u, f) => e.doc?.security.allowsAnnotation(u, o(f)) ?? !1, i = (u) => { + const f = t.model().byId[oe(u)]; + return !!f && S2(f); }, a = (u) => { - const d = t.model(), f = oe(u); - if (!d.byId[f]) return [u]; - const g = d.order.map((p) => d.byId[p]?.annotation).filter( + const f = t.model(), d = oe(u); + if (!f.byId[d]) return [u]; + const g = f.order.map((p) => f.byId[p]?.annotation).filter( (p) => p?.page.objectNumber === u.page.objectNumber ); return Dx(g, u).filter((p) => { - const m = d.byId[oe(p.ref)]; - return m ? oe(p.ref) === f ? !UK(m) : !Swe(m) : !0; + const m = f.byId[oe(p.ref)]; + return m ? oe(p.ref) === d ? !UK(m) : !Swe(m) : !0; }).map((p) => p.ref); }; return { canRead: n, canCreate: r, canUpdate: i, canDelete: (u) => a(u).length === 0, canDuplicate: (u) => { if (!u.length || !r()) return !1; - const d = t.model(), f = []; + const f = t.model(), d = []; for (const h of u) { - const g = d.byId[oe(h)]?.annotation; + const g = f.byId[oe(h)]?.annotation; if (!g || g.locked) return !1; - f.push(g); + d.push(g); } - return g7(f, {}).dropped.length === 0; + return g7(d, {}).dropped.length === 0; }, blockersOf: a, allowsMutation: s }; } const Swe = (e) => !e.annotation.locked && (e.authority?.delete ?? !0), xwe = (e, t) => { @@ -39016,9 +39047,9 @@ function Ewe(e, t, n) { if (y.paintOf) return y.paintOf(w) ?? a; const x = y.painter?.(w) ?? null, A = y.accentOf?.(w) ?? null; return { ...x ? { painter: x } : {}, ...A ? { accent: A } : {} }; - }, l = (w, y) => w === y || w !== null && y !== null && w.color === y.color && w.strength === y.strength && w.setting === y.setting, u = (w, y) => w === y || w !== null && y !== null && w.color === y.color, d = (w, y) => w === y || w !== null && y !== null && w.text === y.text && w.color === y.color && w.align === y.align, f = /* @__PURE__ */ new WeakMap(), h = (w, y, x) => { - const A = c(w, x), b = A.painter ?? null, E = A.accent ?? null, I = A.placeholder ?? null, O = A.outline ?? null, T = b ? { painter: b } : {}, R = f.get(w); - if (R && R.truth === y && R.painter === b && l(R.accent, E) && d(R.placeholder, I) && u(R.outline, O)) + }, l = (w, y) => w === y || w !== null && y !== null && w.color === y.color && w.strength === y.strength && w.setting === y.setting, u = (w, y) => w === y || w !== null && y !== null && w.color === y.color, f = (w, y) => w === y || w !== null && y !== null && w.text === y.text && w.color === y.color && w.align === y.align, d = /* @__PURE__ */ new WeakMap(), h = (w, y, x) => { + const A = c(w, x), b = A.painter ?? null, E = A.accent ?? null, I = A.placeholder ?? null, O = A.outline ?? null, T = b ? { painter: b } : {}, R = d.get(w); + if (R && R.truth === y && R.painter === b && l(R.accent, E) && f(R.placeholder, I) && u(R.outline, O)) return R.record; let M; if (!y) @@ -39037,10 +39068,10 @@ function Ewe(e, t, n) { pictureVersion: x.getPictureVersion(y.ref), authority: x.getAuthority(y), ...T - }, B = { ...E0(y, w), subtype: y.subtype }; - M = w === y ? F : { ...F, annotation: w, ...$S(F, B) }, x.isPending(w.ref) && Hm(M) && (M = { ...M, source: "vector" }); + }, _ = { ...E0(y, w), subtype: y.subtype }; + M = w === y ? F : { ...F, annotation: w, ...$S(F, _) }, x.isPending(w.ref) && zm(M) && (M = { ...M, source: "vector" }); } - return E && (M = { ...M, accent: E }), I && (M = { ...M, placeholder: I }), O && (M = { ...M, outline: O }), f.set(w, { truth: y, painter: b, accent: E, placeholder: I, outline: O, record: M }), M; + return E && (M = { ...M, accent: E }), I && (M = { ...M, placeholder: I }), O && (M = { ...M, outline: O }), d.set(w, { truth: y, painter: b, accent: E, placeholder: I, outline: O, record: M }), M; }, g = /* @__PURE__ */ new WeakMap(), p = /* @__PURE__ */ new Set(), m = (w) => { let y = g.get(w); if (!y) { @@ -39156,14 +39187,14 @@ function Pwe(e) { toolId: o.id, subtype: o.subtype, accept: l?.kind === "prompt" ? l.accept : void 0, - page: Lt(s), + page: Ft(s), point: i - }, d = e.doc; + }, f = e.doc; return c(u).then( - (f) => { - f && e.doc === d && e.tryGet(yr)?.getActiveToolId() === o.id && a(f); + (d) => { + d && e.doc === f && e.tryGet(yr)?.getActiveToolId() === o.id && a(d); }, - (f) => console.error("[annotation] file-picker provider failed:", f) + (d) => console.error("[annotation] file-picker provider failed:", d) ), !0; } }; } @@ -39188,7 +39219,7 @@ function Twe(e) { function ND(e, t) { if (!e.owns(oe(t))) return; const n = e.lender()?.owner ?? "its own"; - throw new re( + throw new te( "invalid-input", "annotation", `${oe(t)} belongs to the ${n} plugin: change it there` @@ -39199,7 +39230,7 @@ function Mwe(e, t, n) { if (!r || !s.length) return t; const i = t.refs.filter((c) => !o(c)), a = Fx(t.position); if (a && (i.length || !o(a))) - throw new re( + throw new te( "invalid-input", "annotation", `${r.owner} records move among their own: ${oe(a)} can't be their neighbour` @@ -39233,8 +39264,8 @@ function Bwe(e) { let c = a; return { ops: i.map((u) => { if (u.type !== "annotations.create" || u.objectNumber !== void 0) return u; - const [d, ...f] = c, h = d ?? e.changes.takeObjectNumber(); - return d !== void 0 && (c = f), h === null ? u : { ...u, objectNumber: h }; + const [f, ...d] = c, h = f ?? e.changes.takeObjectNumber(); + return f !== void 0 && (c = d), h === null ? u : { ...u, objectNumber: h }; }), held: c }; } }; } @@ -39642,7 +39673,7 @@ function Gwe(e, t) { const r = t.change.put.map((s) => s.id).filter((s) => !(s in e.byId)), o = [...e.order.filter((s) => s in n), ...r]; return { ...t.session, byId: n, order: o }; } -const sO = (e) => new re("not-found", "annotation", `no annotation ${oe(e)}`), MD = (e) => e.reduce( +const sO = (e) => new te("not-found", "annotation", `no annotation ${oe(e)}`), MD = (e) => e.reduce( (t, n) => t + (n.type === "create" ? 1 : n.type === "copy" ? b5(n).length : 0), 0 ); @@ -39711,7 +39742,7 @@ function Ywe(e, t, n, r) { live: !!a && $S(a, e.patch).source === "vector" }; } -const iO = (e, t) => t.map((n) => Sn(e.byId[n])).filter((n) => n != null), BD = (e, t) => e === t || e.length === t.length && e.every((n, r) => n === t[r]), NC = { failed: [], result: null }, Qwe = () => new re( +const iO = (e, t) => t.map((n) => Sn(e.byId[n])).filter((n) => n != null), BD = (e, t) => e === t || e.length === t.length && e.every((n, r) => n === t[r]), NC = { failed: [], result: null }, Qwe = () => new te( "not-ready", "annotation", "the document holds no object number for a new annotation right now" @@ -39727,13 +39758,13 @@ function Xwe(e, t, n, r, o, s) { ); r.writeFailed.emit({ refs: w, error: Br(N.error) }); }); - const d = (N, w) => N.result.then( + const f = (N, w) => N.result.then( (y) => ({ failed: [], result: y }), (y) => ({ - failed: [{ ids: w, error: qe("annotation", y) }], + failed: [{ ids: w, error: ze("annotation", y) }], result: null }) - ), f = (N, w, y = [], x) => { + ), d = (N, w, y = [], x) => { const A = [...N, ...y], b = [ ...y.length ? o.lender()?.undoOf(y) ?? [] : [], ...OD(w, N) @@ -39759,40 +39790,40 @@ function Xwe(e, t, n, r, o, s) { let A; try { A = nbe(x, N); - } catch (_) { - throw qe("annotation", _); + } catch (B) { + throw ze("annotation", B); } if (a && dye(x, A.session, N) && (a(), l().draft !== x.draft)) return m(N, w); w.adjust && (A = w.adjust(A)); - const b = Gwe(x, A), E = n.view(), I = o.lender(), O = (_) => I !== null && "id" in _ && o.owns(_.id), T = A.effects.filter(O), R = TD( - A.effects.filter((_) => !O(_)).flatMap((_) => c.get(_.type)?.(_, b, x) ?? []), + const b = Gwe(x, A), E = n.view(), I = o.lender(), O = (B) => I !== null && "id" in B && o.owns(B.id), T = A.effects.filter(O), R = TD( + A.effects.filter((B) => !O(B)).flatMap((B) => c.get(B.type)?.(B, b, x) ?? []), i, b - ), M = T.length && I ? I.opsOf(T, b, x) : [], F = h.named(R, A.session.objectNumbers), B = RD(E, F.ops); + ), M = T.length && I ? I.opsOf(T, b, x) : [], F = h.named(R, A.session.objectNumbers), _ = RD(E, F.ops); F.held !== A.session.objectNumbers && (A = { ...A, session: { ...A.session, objectNumbers: F.held } }); let $ = Promise.resolve(NC); if (M.length && !w.into) { - const _ = f(B, E, M); - g.remember(_.opId, x.selected, A.session.selected), $ = d(_, zy([...B, ...M])); - } else if (B.length) { - const _ = w.into; - if (_) { - _.base ?? (_.base = E), _.held.set(B, OD(_.base, B)); - const L = _.held.change; - L && (u.add(L.opId), g.remember(L.opId, x.selected, A.session.selected), $ = d(L, zy(B))); + const B = d(_, E, M); + g.remember(B.opId, x.selected, A.session.selected), $ = f(B, zy([..._, ...M])); + } else if (_.length) { + const B = w.into; + if (B) { + B.base ?? (B.base = E), B.held.set(_, OD(B.base, _)); + const L = B.held.change; + L && (u.add(L.opId), g.remember(L.opId, x.selected, A.session.selected), $ = f(L, zy(_))); } else { - const L = f(B, E); - g.remember(L.opId, x.selected, A.session.selected), $ = d(L, zy(B)); + const L = d(_, E); + g.remember(L.opId, x.selected, A.session.selected), $ = f(L, zy(_)); } } - const D = A.change.put.filter((_) => _.source === "vector").map((_) => _.id); + const D = A.change.put.filter((B) => B.source === "vector").map((B) => B.id); return e.state.update(AD, A.session, D), { effects: A.effects, written: $ }; }, v = (N, w, y) => { const x = l().draft, A = e.changes.reserveObjectNumbers(y).then( () => l().draft === x ? m(N, w).written : NC, (b) => ({ - failed: [{ ids: [], error: qe("annotation", b) }], + failed: [{ ids: [], error: ze("annotation", b) }], result: null }) ); @@ -39803,23 +39834,23 @@ function Xwe(e, t, n, r, o, s) { const b = [], E = [], I = [], O = [], T = [], R = []; let M = y; try { - for (const _ of N) { - if ((_.type === "update" || _.type === "delete") && ND(o, _.ref), _.type === "copy") { - for (const Y of [..._.refs, ..._.along ?? []]) ND(o, Y); - const H = Jwe(_, M, A); + for (const B of N) { + if ((B.type === "update" || B.type === "delete") && ND(o, B.ref), B.type === "copy") { + for (const Y of [...B.refs, ...B.along ?? []]) ND(o, Y); + const H = Jwe(B, M, A); O.push(...H.ids), I.push(b.length), b.push(H.op), T.push(...H.live), R.push(...H.copies), M = GS(M, H.op); continue; } - const L = _.type === "reorder" ? Mwe(o, _, E) : _; + const L = B.type === "reorder" ? Mwe(o, B, E) : B; if (!L) { - O.push(oe(_.refs[0])), I.push(-1); + O.push(oe(B.refs[0])), I.push(-1); continue; } const j = Ywe(L, M, A, (H) => l().byId[H]); O.push(j.id), I.push(j.op ? b.length : -1), j.op && (b.push(j.op), j.live && T.push(j.id), M = GS(M, j.op)); } - } catch (_) { - throw qe("annotation", _); + } catch (B) { + throw ze("annotation", B); } if (w.lent && (E.push(...w.lent.ops), O.push(...w.lent.ids)), !b.length && !E.length) return { @@ -39828,34 +39859,34 @@ function Xwe(e, t, n, r, o, s) { }; const F = h.named( TD(b, i, qwe(l(), y, M)).filter( - (_) => !b.includes(_) + (B) => !b.includes(B) ), e.state.get().session.objectNumbers ); - F.held !== e.state.get().session.objectNumbers && e.state.update((_) => ({ - ..._, - session: { ..._.session, objectNumbers: F.held } + F.held !== e.state.get().session.objectNumbers && e.state.update((B) => ({ + ...B, + session: { ...B.session, objectNumbers: F.held } })); - const B = l().selected; + const _ = l().selected; s.note(R); - const $ = f( + const $ = d( RD(y, [...b, ...F.ops]), y, E, w.label ); - if (g.remember($.opId, B, w.select ? O : B), T.length && e.state.update(AD, e.state.get().session, T), w.select && (m({ type: "select", ids: O }), O.some((_) => !(_ in l().byId)))) { - const _ = l().selected, L = () => { - BD(l().selected, _) && m({ type: "select", ids: O }); + if (g.remember($.opId, _, w.select ? O : _), T.length && e.state.update(AD, e.state.get().session, T), w.select && (m({ type: "select", ids: O }), O.some((B) => !(B in l().byId)))) { + const B = l().selected, L = () => { + BD(l().selected, B) && m({ type: "select", ids: O }); }; $.result.then(L, () => { }); } - const D = d($, zy([...b, ...E])).then( - (_) => ({ - ..._, + const D = f($, zy([...b, ...E])).then( + (B) => ({ + ...B, annotations: I.map((L) => { - const j = L < 0 ? void 0 : _.result?.items[L]; + const j = L < 0 ? void 0 : B.result?.items[L]; return j && "annotation" in j ? j.annotation : null; }) }) @@ -39902,7 +39933,7 @@ function Xwe(e, t, n, r, o, s) { whenWritten: () => e.changes.whenSettled() }; } -const Zwe = 250, L1 = (e) => `${Cf(e.family)}|${e.weight}|${e.italic}`, D1 = "body", _D = (e) => Array.from(e, (t) => t.codePointAt(0)); +const Zwe = 250, L1 = (e) => `${Nf(e.family)}|${e.weight}|${e.italic}`, D1 = "body", _D = (e) => Array.from(e, (t) => t.codePointAt(0)); function e0e(e, t, n) { const r = () => e.tryGet(Xa), o = /* @__PURE__ */ new Map(); let s = null, i = null; @@ -39913,23 +39944,23 @@ function e0e(e, t, n) { answered: l, epoch: 0 }; - const d = (p, m) => { + const f = (p, m) => { const v = VP( p.fontFamily, (S) => n().find((C) => C.key === S) ); return (v.weight ?? 400) === m.weight && (v.italic ?? !1) === m.italic; - }, f = (p) => { - const m = qf(p.annotation); + }, d = (p) => { + const m = Jf(p.annotation); if (!m || p.annotation.subtype !== "free-text") return null; - const v = Yl(p.annotation, n), S = v.body, C = [D1], k = [LD(m, S, d(m, S))]; + const v = Ql(p.annotation, n), S = v.body, C = [D1], k = [LD(m, S, f(m, S))]; let N = ""; for (const y of v.paragraphs) for (const x of y.runs) { N += x.text; const A = x.style; if (A?.family === void 0 && A?.weight === void 0 && A?.italic === void 0) { - C.push(D1), k.push({ ...LD(m, S, d(m, S)), text: x.text }); + C.push(D1), k.push({ ...LD(m, S, f(m, S)), text: x.text }); continue; } const b = { @@ -39942,7 +39973,7 @@ function e0e(e, t, n) { const w = JSON.stringify({ body: k[0], faces: [...new Set(C)].sort() }); return { body: S, runs: k, faces: C, text: N, key: w }; }, h = async (p) => { - const m = r(), v = t.model().byId[p], S = m && v && f(v); + const m = r(), v = t.model().byId[p], S = m && v && d(v); if (!m || !v || !S) return; const { body: C, runs: k, faces: N, text: w, key: y } = S, x = Sn(v) ?? void 0; p === s && (i = { id: p, codePoints: new Set(_D(w)) }), a.get(p)?.abort(); @@ -39968,7 +39999,7 @@ function e0e(e, t, n) { for (const [v, S] of o) { const C = p.byId[v]; if (C === S.record) continue; - const k = C && f(C); + const k = C && d(C); if (k && k.key === S.faces) { o.set(v, { ...S, record: C }); continue; @@ -39982,17 +40013,17 @@ function e0e(e, t, n) { p !== s && (s = p, c(), i = null, p !== null && h(p)); }), { bodyCss: (p, m, v) => { - const S = r(), C = d(m, v); + const S = r(), C = f(m, v); if (!S) - return hm( - C ? Gf(m.fontFamily) : cl(v) + return pm( + C ? Yf(m.fontFamily) : ll(v) ); const k = o.get(p)?.byFace.get(D1); return k ? S.getRunCss(k) : C ? S.getFontCss(m.fontFamily) : S.getFaceCss(v); }, faceCss: (p, m) => { const v = r(); - if (!v) return hm(cl(m)); + if (!v) return pm(ll(m)); const S = p !== null ? o.get(p)?.byFace.get(L1(m)) : void 0; return S ? v.getRunCss(S) : v.getFaceCss(m); }, @@ -40010,7 +40041,7 @@ function e0e(e, t, n) { if (s !== p) return; const m = t.model().byId[p]; if (!m) return; - const v = Yl(m.annotation, n).paragraphs.flatMap((C) => C.runs.map((k) => k.text)).join(""), S = i?.id === p ? i.codePoints : null; + const v = Ql(m.annotation, n).paragraphs.flatMap((C) => C.runs.map((k) => k.text)).join(""), S = i?.id === p ? i.codePoints : null; S && _D(v).every((C) => S.has(C)) || (c(), c = e.clock.after(Zwe, () => void h(p))); } }; @@ -40052,9 +40083,9 @@ function n0e(e, t, n, r) { const C = e.tryGet(Cn); return C ? o.get(C.getActiveToolId()) : void 0; }, c = (C) => C && a()?.upright ? zR(C) : 0, l = /* @__PURE__ */ new Map(), u = (C) => { - const k = o.get(C), N = k?.subtype ?? C, w = Qr(n.model(), k?.preset ?? C), y = l.get(C); + const k = o.get(C), N = k?.subtype ?? C, w = Xr(n.model(), k?.preset ?? C), y = l.get(C); if (y?.own === w) return y; - const x = NH(N, w), { subtype: A, ...b } = x, E = ZN(nA(k?.fieldsKind ?? C)), I = qf(x), O = x.subtype === "link" ? x.target ?? null : null, T = { + const x = NH(N, w), { subtype: A, ...b } = x, E = ZN(nA(k?.fieldsKind ?? C)), I = Jf(x), O = x.subtype === "link" ? x.target ?? null : null, T = { own: w, defaults: b, properties: { @@ -40064,7 +40095,7 @@ function n0e(e, t, n, r) { } }; return l.set(C, T), T; - }, d = (C, k) => { + }, f = (C, k) => { const N = u(C).own; Object.entries(k).some( ([y, x]) => JSON.stringify(N[y]) !== JSON.stringify(x) @@ -40073,8 +40104,8 @@ function n0e(e, t, n, r) { preset: o.get(C)?.preset ?? C, patch: k }), r.toolDefaultsChanged.emit({ toolId: C, defaults: u(C).defaults })); - }, f = /* @__PURE__ */ new WeakMap(), h = (C) => { - let k = f.get(C); + }, d = /* @__PURE__ */ new WeakMap(), h = (C) => { + let k = d.get(C); return k || (k = { id: C.id, subtype: C.subtype, @@ -40084,7 +40115,7 @@ function n0e(e, t, n, r) { ...C.defaults ? { defaults: C.defaults } : {}, ghost: C.ghost, ...C.meta ? { meta: C.meta } : {} - }, f.set(C, k)), k; + }, d.set(C, k)), k; }, g = (C) => { const { id: k, cursor: N, enables: w } = C, y = () => e.allows("annotations:create"), x = { id: k, cursor: N, enables: w, touch: e9(w), canUse: y }; return e.tryGet(Cn)?.registerTool(x, { replace: !0 }); @@ -40121,7 +40152,7 @@ function n0e(e, t, n, r) { }; }, getDefaults: (C) => u(C).defaults, - updateDefaults: d, + updateDefaults: f, getProperties: (C) => u(C).properties, onDefaultsChanged: r.toolDefaultsChanged.on }; @@ -40140,11 +40171,11 @@ function o0e(e, { settings: t, tools: n, store: r }) { return { shape: (c) => (l) => { const u = r0e(l); if (!u.length) return l; - const d = o(c); - let f = l.session; - !d.editText && f.editing !== null && u.includes(f.editing) && (f = { ...f, editing: null }); - const h = f.editing !== null && u.includes(f.editing); - return !d.select && !h && (f = { ...f, selected: [] }), f === l.session ? l : { ...l, session: f }; + const f = o(c); + let d = l.session; + !f.editText && d.editing !== null && u.includes(d.editing) && (d = { ...d, editing: null }); + const h = d.editing !== null && u.includes(d.editing); + return !f.select && !h && (d = { ...d, selected: [] }), d === l.session ? l : { ...l, session: d }; }, done: (c, l) => { l.effects.some((u) => u.type === "create") && o(c).tool === "default" && e.tryGet(Cn)?.activateDefaultTool(); }, placed: (c, l) => { @@ -40263,7 +40294,7 @@ function d0e(e) { } const f0e = "tool-ghost", h0e = "tool-placing"; function DD(e, t) { - return t && wg("box", t.from, t.to) ? !1 : e ? e.kind === "create-rect" ? !wg("box", e.from, e.to) : e.kind === "create-line" ? !wg("segment", e.from, e.to) : !1 : !0; + return t && vg("box", t.from, t.to) ? !1 : e ? e.kind === "create-rect" ? !vg("box", e.from, e.to) : e.kind === "create-line" ? !vg("segment", e.from, e.to) : !1 : !0; } function p0e(e, { store: t, @@ -40294,7 +40325,7 @@ function p0e(e, { if (!N) return null; const w = rA(C, v); if (JS(v.subtype)) { - const x = Id(S.zoom, S.displayRotation), { rect: A } = hz(w, S.point, N, x); + const x = Od(S.zoom, S.displayRotation), { rect: A } = hz(w, S.point, N, x); return t0(w, { kind: "box", rect: A, rot: 0 }); } if (!v.clickCreate) return null; @@ -40304,12 +40335,12 @@ function p0e(e, { displayRotation: S.displayRotation }); return t0(w, y); - }, d = (v, S) => o.lender()?.toolPaintOf?.(v.id, S) ?? void 0, f = (v, S, C) => { + }, f = (v, S) => o.lender()?.toolPaintOf?.(v.id, S) ?? void 0, d = (v, S, C) => { const { ghostAt: k, placing: N } = e.state.get(), w = [], y = k && r.get(k.toolId); if (k?.page.objectNumber === v && y?.ghost && s.clickStamp(y) === null && DD(S.draft, N)) { const A = u(y, k, S); if (A) { - const b = rA(S, y), E = d(y, k.page); + const b = rA(S, y), E = f(y, k.page); w.push({ ...tO(f0e, b, A, "ghost", C, void 0, E), ghostOpacity: y.ghost.opacity @@ -40317,18 +40348,18 @@ function p0e(e, { } } const x = N && r.get(N.toolId); - if (N?.page.objectNumber === v && x && wg("box", N.from, N.to)) { + if (N?.page.objectNumber === v && x && vg("box", N.from, N.to)) { const A = B2("box", N.from, N.to, x.clickCreate, { pageBox: n.pageBoxOf(v), upright: x.upright, displayRotation: N.displayRotation - }), b = rA(S, x), E = A && t0(b, A), I = d(x, N.page); + }), b = rA(S, x), E = A && t0(b, A), I = f(x, N.page); E && w.push(tO(h0e, b, E, "draft", C, void 0, I)); } return w; }; let h = null, g = null; - return { itemsOn: f, api: { + return { itemsOn: d, api: { hoverGhostAt: l, hoverGhostIn: a, clearGhost: i, @@ -40351,7 +40382,7 @@ function p0e(e, { const y = s.armed(); if (!y || C.page.objectNumber !== v.objectNumber) return null; if (g?.place !== C || g.armed !== y) { - const x = r.get(Vd); + const x = r.get(Ud); g = { place: C, armed: y, @@ -40386,12 +40417,12 @@ function g0e(e, { const a = (C) => { const k = s.get(C); if (!k) - throw new re("not-found", "annotation", `no annotation ${oe(C)}`); + throw new te("not-found", "annotation", `no annotation ${oe(C)}`); return { annotation: k }; }, c = (C, k) => { const N = n.get(k); - if (!N) throw new re("not-found", "annotation", `no tool '${k}'`); - const w = Pm[C.subtype], y = Object.entries(Qr(t.model(), N.preset)).filter( + if (!N) throw new te("not-found", "annotation", `no tool '${k}'`); + const w = Rm[C.subtype], y = Object.entries(Xr(t.model(), N.preset)).filter( ([x]) => x !== "richText" && w.includes(x) ); return { ...N.flags, ...Object.fromEntries(y), ...C }; @@ -40399,7 +40430,7 @@ function g0e(e, { e.assertAllowed("annotations:create", "annotation.create"); const { ref: y } = e.pageOf(C); if (k.subtype === "unsupported") - throw new re( + throw new te( "invalid-input", "annotation", "a kind the engine doesn't know can't be created" @@ -40407,9 +40438,9 @@ function g0e(e, { const x = k, A = w.tool ? c(x, w.tool) : x, b = await t.applyWhenNumbered( [{ type: "create", page: y, draft: A, ...N ? { resources: N } : {} }], { select: w.select } - ), E = await e.cancellable(w.signal, ym(b)); + ), E = await e.cancellable(w.signal, bm(b)); if (!E) - throw new re( + throw new te( "operation-failed", "annotation", "the annotation could not be created" @@ -40418,23 +40449,23 @@ function g0e(e, { }, u = async (C, k, N, w = {}) => { const y = await e.cancellable( w.signal, - ym( + bm( t.apply([{ type: "update", ref: C, patch: k, ...N ? { resources: N } : {} }]) ) ); return y ? { annotation: y } : a(C); - }, d = async (C, k = {}) => { + }, f = async (C, k = {}) => { await e.cancellable(k.signal, Va(t.apply([{ type: "delete", ref: C }]))); - }, f = async (C, k, N = {}) => { + }, d = async (C, k, N = {}) => { if (!C.length) return; const w = t.model(), y = (O) => { const T = w.byId[oe(O)]; if (!T) - throw new re("not-found", "annotation", `no annotation ${oe(O)}`); + throw new te("not-found", "annotation", `no annotation ${oe(O)}`); return T; }, x = C.map(y), A = Fx(k), b = A ? y(A) : null, E = x[0].annotation.page, I = (O) => O.annotation.page.objectNumber !== E.objectNumber; if (x.some(I) || b && I(b)) - throw new re( + throw new te( "invalid-input", "annotation", "a reorder stays on one page: the annotations and their neighbour" @@ -40458,7 +40489,7 @@ function g0e(e, { ...w ? { page: w } : {}, ...k.offset ? { offset: k.offset } : {} }, x = N.length ? o.lender() : null, A = x ? await x.copyOps(N, y) : null, b = t.model(), E = new Set(C.map(oe)), I = C.flatMap( - (_) => $0(b, oe(_)).map((L) => L.annotation.ref).filter((L) => !E.has(oe(L))) + (B) => $0(b, oe(B)).map((L) => L.annotation.ref).filter((L) => !E.has(oe(L))) ), O = A?.copies.map(oe) ?? [], T = await t.applyWhenNumbered( C.length ? [{ type: "copy", refs: C, ...I.length ? { along: I } : {}, ...y }] : [], { @@ -40471,28 +40502,28 @@ function g0e(e, { } } : {} } - ), M = (await e.cancellable(k.signal, Va(T))).result?.items ?? [], F = M.find((_) => _.type === "annotations.copy"); + ), M = (await e.cancellable(k.signal, Va(T))).result?.items ?? [], F = M.find((B) => B.type === "annotations.copy"); if (C.length && F?.type !== "annotations.copy") - throw new re( + throw new te( "operation-failed", "annotation", "the annotations could not be copied" ); - const B = new Set(T.ids), $ = F?.type === "annotations.copy" ? F.annotations.filter((_) => B.has(oe(_.ref))) : [], D = /* @__PURE__ */ new Map(); - for (const _ of M) { - const L = _.type === "forms.copy" || _.type === "forms.addWidget" ? _.widgets : _.type === "forms.updateWidget" ? [_.widget] : []; + const _ = new Set(T.ids), $ = F?.type === "annotations.copy" ? F.annotations.filter((B) => _.has(oe(B.ref))) : [], D = /* @__PURE__ */ new Map(); + for (const B of M) { + const L = B.type === "forms.copy" || B.type === "forms.addWidget" ? B.widgets : B.type === "forms.updateWidget" ? [B.widget] : []; for (const j of L) D.set(oe(j.ref), j); } return { - annotations: [...$, ...O.flatMap((_) => D.get(_) ?? [])], + annotations: [...$, ...O.flatMap((B) => D.get(B) ?? [])], dropped: F?.type === "annotations.copy" ? F.dropped : [] }; }, g = (C) => C?.map((k) => e.pageOf(k).ref); return { update: u, duplicate: h, api: { create: l, update: u, - delete: d, - reorder: f, + delete: f, + reorder: d, duplicate: h, export: async (C = {}, k = {}) => { e.assertAllowed("doc.download", "annotation.export"); @@ -40564,7 +40595,7 @@ function m0e(e, { const u = () => { const p = t.model().draft; return p?.kind === "create-ink" && !p.drawing ? p : null; - }, d = ({ selects: p = !0 } = {}) => { + }, f = ({ selects: p = !0 } = {}) => { const m = u(); if (!m) return; const v = l?.draft === m ? l : null; @@ -40576,16 +40607,16 @@ function m0e(e, { } ); (!v || v.activeToolId === r.activeTool()?.id) && o.done(S, k); - }, f = (p, m) => { + }, d = (p, m) => { const v = u(); if (!v) return; l?.cancel(); const S = e.clock.after(m, () => { - t.model().draft === v && d(); + t.model().draft === v && f(); }); l = { draft: v, toolId: p, activeToolId: r.activeTool()?.id, cancel: S }; }; - t.onWaitingInk(() => d({ selects: !1 })), e.onSettle(() => d()); + t.onWaitingInk(() => f({ selects: !1 })), e.onSettle(() => f()); const h = { get: () => a(), finish: c, @@ -40593,7 +40624,7 @@ function m0e(e, { t.commit({ type: "cancel" }); } }, g = { - finishInkDraft: () => d(), + finishInkDraft: () => f(), cancel: () => { t.commit({ type: "cancel" }); }, @@ -40607,7 +40638,7 @@ function m0e(e, { return p?.kind === "create-poly" || p?.kind === "create-callout" || p?.kind === "create-distance" && p.step === "offset"; } }; - return { draft: h, api: g, waitForNextStroke: f }; + return { draft: h, api: g, waitForNextStroke: d }; } function y0e(e, { store: t, @@ -40616,65 +40647,65 @@ function y0e(e, { filePicker: o, afterCreate: s }, i) { - const a = (d, f, { data: h, resources: g }) => t.applyWhenNumbered([ - { type: "create", page: Lt(f), draft: h, resources: g } - ]).then((p) => (s.placed(d.id, p.ids), Va(p))), c = (d, f, h, g, p) => { - const m = e.doc, v = n.sizeOf(f); - if (!m || !v || !JS(d.subtype)) return !1; - const { rect: S } = hz(rA(t.model(), d), h, v, g), C = u0e( - d.subtype, + const a = (f, d, { data: h, resources: g }) => t.applyWhenNumbered([ + { type: "create", page: Ft(d), draft: h, resources: g } + ]).then((p) => (s.placed(f.id, p.ids), Va(p))), c = (f, d, h, g, p) => { + const m = e.doc, v = n.sizeOf(d); + if (!m || !v || !JS(f.subtype)) return !1; + const { rect: S } = hz(rA(t.model(), f), h, v, g), C = u0e( + f.subtype, { rect: S }, - Qr(t.model(), d.preset), - d.flags, + Xr(t.model(), f.preset), + f.flags, p ); - return a(d, f, C).catch( + return a(f, d, C).catch( (k) => console.error("[annotation] icon placement failed:", k) ), !0; - }, l = (d, f, h, g) => { - if (i.placeArmedStamp(d, f, h)) return !0; + }, l = (f, d, h, g) => { + if (i.placeArmedStamp(f, d, h)) return !0; const p = r.activeTool(); if (!p) return !1; if (p.subtype === "stamp") - return i.requestStampAt(d, f, h); + return i.requestStampAt(f, d, h); if (!JS(p.subtype)) return !1; - const m = Id(g, h); - return p.subtype === "text" ? c(p, d, f, m, null) : o.promptAt( + const m = Od(g, h); + return p.subtype === "text" ? c(p, f, d, m, null) : o.promptAt( p, - d, f, - (v) => c(p, d, f, m, v) + d, + (v) => c(p, f, d, m, v) ); }; return { api: { - placeAt: (d, f, h, g) => l(d.objectNumber, f, h, g), - setFilePickerProvider: (d) => o.set(d) + placeAt: (f, d, h, g) => l(f.objectNumber, d, h, g), + setFilePickerProvider: (f) => o.set(f) } }; } function b0e(e, { store: t }) { const n = (s, i, a) => { const c = a.byId[s], l = Sn(c); - if (!c || !l || Wt(c.annotation).name === "link") return []; - const u = qR(i), d = i == null ? [] : wge(Vt(c.annotation), Wn(c.annotation)), f = $0(a, s), h = [], g = Math.min(f.length, d.length); + if (!c || !l || Jt(c.annotation).name === "link") return []; + const u = qR(i), f = i == null ? [] : wge(Ht(c.annotation), Wn(c.annotation)), d = $0(a, s), h = [], g = Math.min(d.length, f.length); for (let p = 0; p < g; p++) h.push({ type: "update", - ref: f[p].annotation.ref, - patch: { subtype: "link", rect: d[p], ...u ? { target: u } : {} } + ref: d[p].annotation.ref, + patch: { subtype: "link", rect: f[p], ...u ? { target: u } : {} } }); - for (let p = f.length; p < d.length; p++) + for (let p = d.length; p < f.length; p++) h.push({ type: "create", page: c.annotation.page, draft: { subtype: "link", - rect: d[p], + rect: f[p], target: u, reply: { to: l, type: "group" } } }); - for (let p = d.length; p < f.length; p++) - h.push({ type: "delete", ref: f[p].annotation.ref }); + for (let p = f.length; p < d.length; p++) + h.push({ type: "delete", ref: d[p].annotation.ref }); return h; }, r = async (s, i, a) => { const c = n(oe(s), i, t.model()); @@ -40711,78 +40742,78 @@ function w0e(e, { tools: r, afterCreate: o }, s) { - const i = (d, f, h, g, p) => t.commit( + const i = (f, d, h, g, p) => t.commit( { type: "createMarkup", - subtype: d, - page: f, + subtype: f, + page: d, quads: h, preset: g, flags: g ? r.get(g)?.flags : void 0 }, { adjust: p } - ), a = (d, f, h) => t.commit({ type: "createCaret", page: d, anchor: f }, { adjust: h }), c = (d, f, h, g, p) => t.commit({ type: "createReplaceText", page: d, quads: f, anchor: h, preset: g }, { adjust: p }), l = (d, f, h, g) => { - const p = f.end; - if (d.kind === "insert") + ), a = (f, d, h) => t.commit({ type: "createCaret", page: f, anchor: d }, { adjust: h }), c = (f, d, h, g, p) => t.commit({ type: "createReplaceText", page: f, quads: d, anchor: h, preset: g }, { adjust: p }), l = (f, d, h, g) => { + const p = d.end; + if (f.kind === "insert") return p ? [a(p.page, { glyphQuad: p.glyphQuad, advance: p.advance }, g)] : []; const m = []; - for (const v of f.pages) { + for (const v of d.pages) { const S = v.segments[v.segments.length - 1]; if (!S) continue; const C = v.segments.map((N) => N.quad); - if (d.kind === "markup") { - m.push(i(d.subtype, v.page, C, h, g)); + if (f.kind === "markup") { + m.push(i(f.subtype, v.page, C, h, g)); continue; } - const k = p && Vf(p.page, v.page) ? { glyphQuad: p.glyphQuad, advance: p.advance } : { glyphQuad: S.quad, advance: S.advance }; + const k = p && Uf(p.page, v.page) ? { glyphQuad: p.glyphQuad, advance: p.advance } : { glyphQuad: S.quad, advance: S.advance }; m.push(c(v.page, C, k, h, g)); } return m; }; return { api: { - createMarkup: (d, f, h, g) => { - n.canCreate() && i(d, f, h, g); + createMarkup: (f, d, h, g) => { + n.canCreate() && i(f, d, h, g); }, - createCaret: (d, f) => { - n.canCreate() && a(d, f); + createCaret: (f, d) => { + n.canCreate() && a(f, d); }, - createReplaceText: (d, f, h, g) => { - n.canCreate() && c(d, f, h, g); + createReplaceText: (f, d, h, g) => { + n.canCreate() && c(f, d, h, g); }, /** * Turn the text selection into what the tool makes of it, then clear the * selection. Nothing, and `false`, for a tool that makes nothing of a * selection, without create authority, or without a selection. */ - applyToolToSelection: (d) => { - const f = r.get(d), h = f && jD(f); - if (!f || !h || !n.canCreate()) return !1; + applyToolToSelection: (f) => { + const d = r.get(f), h = d && jD(d); + if (!d || !h || !n.canCreate()) return !1; const g = e.tryGet(_r); if (!g || !g.hasSelection()) return !1; const p = l( h, g.getSnapshot(), - f.preset, - o.shape(f.id) + d.preset, + o.shape(d.id) ); g.clear(); - for (const m of p) o.done(f.id, m); + for (const m of p) o.done(d.id, m); return !0; }, - previewMarkup: (d, f, h) => { - t.commit({ type: "setMarkupPreview", subtype: d, quadsByPage: f, preset: h }); + previewMarkup: (f, d, h) => { + t.commit({ type: "setMarkupPreview", subtype: f, quadsByPage: d, preset: h }); }, clearMarkupPreview: () => { t.commit({ type: "clearMarkupPreview" }); }, - createFromSelection: async (d, f = {}) => { + createFromSelection: async (f, d = {}) => { e.assertAllowed("annotations:create", "annotation.createFromSelection"); - const h = r.get(d), g = h && jD(h); + const h = r.get(f), g = h && jD(h); if (!h || !g) - throw new re( + throw new te( "not-found", "annotation", - `no tool '${d}' that makes something of selected text` + `no tool '${f}' that makes something of selected text` ); const p = e.tryGet(_r); if (!p || !p.hasSelection()) return { annotations: [] }; @@ -40795,9 +40826,9 @@ function w0e(e, { h.preset, v ); - return f.clear !== !1 && p.clear(), { + return d.clear !== !1 && p.clear(), { annotations: (await e.cancellable( - f.signal, + d.signal, Promise.all( S.filter((k) => k.effects.length).map((k) => nz(k)) ) @@ -40822,12 +40853,12 @@ function v0e(e, { store: t, records: n }) { const a = { page: s, scale: i, updated: [], skipped: [], failed: [] }; if (n.getStatus() !== "ready") return a.error = Mx(new Error("the annotations of this document are not loaded")), a; - const c = t.model(), l = Object.values(n.get().byKey).flatMap(({ dto: d }) => { - const f = c.byId[oe(d.ref)]; - return f && d.page.objectNumber === s.objectNumber && sm(d) ? [{ dto: d, annotation: f }] : []; + const c = t.model(), l = Object.values(n.get().byKey).flatMap(({ dto: f }) => { + const d = c.byId[oe(f.ref)]; + return d && f.page.objectNumber === s.objectNumber && im(f) ? [{ dto: f, annotation: d }] : []; }), u = []; - for (const { dto: d, annotation: f } of l) { - const h = d.ref, g = f.authority?.update === !1 ? "no-authority" : !S2(f) || !x2(f) ? "locked" : "measure" in d && d.measure && d.measure.subtype !== "rectilinear" ? "foreign-measure" : Rm(Ba({ ...d, measure: i })) ? null : "unavailable"; + for (const { dto: f, annotation: d } of l) { + const h = f.ref, g = d.authority?.update === !1 ? "no-authority" : !S2(d) || !x2(d) ? "locked" : "measure" in f && f.measure && f.measure.subtype !== "rectilinear" ? "foreign-measure" : Tm(Ba({ ...f, measure: i })) ? null : "unavailable"; if (g) { a.skipped.push({ ref: h, reason: g }); continue; @@ -40835,7 +40866,7 @@ function v0e(e, { store: t, records: n }) { u.push({ type: "update", ref: h, - patch: { subtype: d.subtype, measure: i } + patch: { subtype: f.subtype, measure: i } }), a.updated.push(h); } return u.length > 0 && t.apply(u), a; @@ -40867,7 +40898,7 @@ function A0e(e, t) { if (!o) return null; const s = t(o), i = s ? Sn(s) : null; if (!s || !i || s.unconfirmed) return null; - const a = Wt(s.annotation).name; + const a = Jt(s.annotation).name; if (a.startsWith("widget") || a === "link") return null; const c = !!s.annotation.actions?.cursorEnter?.root, l = !!s.annotation.actions?.cursorExit?.root; return !c && !l ? null : { ref: i, page: s.annotation.page, events: { enter: c, exit: l } }; @@ -40884,7 +40915,7 @@ function S0e(e, { behaviors: s, afterCreate: i }, a, c, l) { - const u = e.tryGet(Lr), d = u ? A0e(u, (h) => t.model().byId[h] ?? null) : null; + const u = e.tryGet(Lr), f = u ? A0e(u, (h) => t.model().byId[h] ?? null) : null; return { api: { editPointer: (h, g, p, m, v, S, C, k) => { t.commit({ @@ -40926,7 +40957,7 @@ function S0e(e, { const C = p.objectNumber, k = o.get(h); if (k?.capture === !0 ? !e.doc?.security.allows("doc.annotate.modify") : !r.canCreate()) return; - const N = n.sizeOf(C) !== null, w = c.viewportsOf(C), y = k?.ink?.groupStrokesMs ?? 0, x = t.model().draft, A = (x?.kind === "create-distance" || x?.kind === "create-poly") && x.page.objectNumber === C && x.preset === (k?.preset ?? h), b = k ? Qr(t.model(), k.preset) : {}, E = b.intent, I = k && sm({ subtype: k.subtype, intent: E }); + const N = n.sizeOf(C) !== null, w = c.viewportsOf(C), y = k?.ink?.groupStrokesMs ?? 0, x = t.model().draft, A = (x?.kind === "create-distance" || x?.kind === "create-poly") && x.page.objectNumber === C && x.preset === (k?.preset ?? h), b = k ? Xr(t.model(), k.preset) : {}, E = b.intent, I = k && im({ subtype: k.subtype, intent: E }); if (I && g === "down" && !A && (!N || !w?.viewports)) return; const O = N && w?.viewports ? TV(w.viewports, m) : void 0, T = O ? O.measure ?? null : w?.fallback, R = b.captionEnabled ?? !0, M = I && N && w ? E === "line-dimension" ? { @@ -40943,7 +40974,7 @@ function S0e(e, { captionEnabled: R, contents: "" } : void 0; - if (M && g === "down" && !A && !Rm( + if (M && g === "down" && !A && !Tm( Ba({ subtype: k.subtype, intent: M.intent, @@ -40995,7 +41026,7 @@ function S0e(e, { }); m.kind === "annot" && (p = m.id); } - g.hovered !== p && (d?.hover(p), t.commit({ type: "hover", id: p })); + g.hovered !== p && (f?.hover(p), t.commit({ type: "hover", id: p })); } } }; } @@ -41008,7 +41039,7 @@ function x0e(e) { }; return e.root && n(e.root), t; } -function ol(e) { +function sl(e) { return x0e(e).join(` ; `); @@ -41066,7 +41097,7 @@ function N0e(e) { ), m; }; let o = null, s = !1, i = null, a = null, c = 0, l = !1; - const u = () => (o ?? (o = e.sandboxFactory()), o), d = (p) => ({ + const u = () => (o ?? (o = e.sandboxFactory()), o), f = (p) => ({ document: { ...e.document(), ...p.pageNumber !== void 0 ? { pageNumber: p.pageNumber } : {} @@ -41078,7 +41109,7 @@ function N0e(e) { ...p.annotPages ? { annotPages: p.annotPages } : {}, ...p.annotsCoverDocument !== void 0 ? { annotsCoverDocument: p.annotsCoverDocument } : {}, event: p.event - }), f = (p) => { + }), d = (p) => { p.destroyed && (o = null, s = !1, i = null); }, h = async (p, m) => { if (s) return null; @@ -41105,14 +41136,14 @@ function N0e(e) { if (S.length === 0) return null; const C = v.boot( S, - d({ ...p, event: { kind: "name-tree-boot" } }), + f({ ...p, event: { kind: "name-tree-boot" } }), m ?? t ); - return f(v), C; + return d(v), C; }, g = async (p, m, v) => { s || (i = await h(m, v)); - const S = await u(), C = S.run(p, d(m), v ?? t); - return f(S), C; + const S = await u(), C = S.run(p, f(m), v ?? t); + return d(S), C; }; return { transaction(p) { @@ -41140,7 +41171,7 @@ function N0e(e) { function pz(e) { const t = e, n = Date; let r = null; - const o = (K) => Array.isArray(K) ? K.map((U) => String(U)) : K, s = (K, U) => Array.isArray(K) && Array.isArray(U) ? K.length === U.length && K.every((Z, ne) => Z === U[ne]) : K === U, i = (K) => { + const o = (K) => Array.isArray(K) ? K.map((U) => String(U)) : K, s = (K, U) => Array.isArray(K) && Array.isArray(U) ? K.length === U.length && K.every((X, re) => X === U[re]) : K === U, i = (K) => { const U = K; return U?.kind === "objectNumber" ? `obj:${String(U.objectNumber)}` : `fqn:${String(U?.name ?? "")}`; }, a = (K, U) => { @@ -41151,16 +41182,16 @@ function pz(e) { if (typeof K == "number") return Number.isFinite(K) ? K : 0; const U = Number(String(K ?? "").replace(/[^0-9+\-.]/g, "")); return Number.isFinite(U) ? U : 0; - }, u = (K) => K === "hidden" ? 1 : K === "noPrint" ? 2 : K === "noView" ? 3 : 0, d = (K) => Number(K) === 1 ? "hidden" : Number(K) === 2 ? "noPrint" : Number(K) === 3 ? "noView" : "visible", f = (K) => K === "widget-activate" ? "Mouse Up" : K === "field-keystroke" ? "Keystroke" : K === "field-validate" ? "Validate" : K === "field-calculate" ? "Calculate" : K === "field-format" ? "Format" : "Open", h = {}, g = (K) => { - const U = K.input, Z = {}; - return Object.defineProperties(Z, { + }, u = (K) => K === "hidden" ? 1 : K === "noPrint" ? 2 : K === "noView" ? 3 : 0, f = (K) => Number(K) === 1 ? "hidden" : Number(K) === 2 ? "noPrint" : Number(K) === 3 ? "noView" : "visible", d = (K) => K === "widget-activate" ? "Mouse Up" : K === "field-keystroke" ? "Keystroke" : K === "field-validate" ? "Validate" : K === "field-calculate" ? "Calculate" : K === "field-format" ? "Format" : "Open", h = {}, g = (K) => { + const U = K.input, X = {}; + return Object.defineProperties(X, { name: { enumerable: !0, get: () => U.name }, type: { enumerable: !0, get: () => U.kind }, value: { enumerable: !0, get: () => o(K.value), - set: (ne) => { - K.value = o(ne); + set: (re) => { + K.value = o(re); } }, valueAsString: { @@ -41185,14 +41216,14 @@ function pz(e) { display: { enumerable: !0, get: () => u(K.display), - set: (ne) => { - K.display = d(ne); + set: (re) => { + K.display = f(re); } }, source: { enumerable: !1, get: () => h } - }), Z.setFocus = () => { + }), X.setFocus = () => { r?.uiEffects.push({ type: "focusField", field: String(U.name) }); - }, Z; + }, X; }, p = (K) => r?.fieldsByName.get(String(K))?.wrapper ?? null, m = { square: ["strokeColor", "fillColor", "opacity", "width", "borderStyle", "dash", "rect"], circle: ["strokeColor", "fillColor", "opacity", "width", "borderStyle", "dash", "rect"], @@ -41227,78 +41258,78 @@ function pz(e) { "file-attachment": "FileAttachment" }, C = (K) => { if (!Array.isArray(K) || K.length === 0) return !1; - const Z = { T: 0, G: 1, RGB: 3, CMYK: 4 }[String(K[0])]; - return Z !== void 0 && K.length === Z + 1 && K.slice(1).every((ne) => typeof ne == "number" && isFinite(Number(ne))); + const X = { T: 0, G: 1, RGB: 3, CMYK: 4 }[String(K[0])]; + return X !== void 0 && K.length === X + 1 && K.slice(1).every((re) => typeof re == "number" && isFinite(Number(re))); }, k = (K) => { - const U = K, Z = String(U[0]); - if (Z === "T") return null; - if (Z === "G") return [Number(U[1]), Number(U[1]), Number(U[1])]; - if (Z === "RGB") return [Number(U[1]), Number(U[2]), Number(U[3])]; - const ne = Number(U[1]), xe = Number(U[2]), _e = Number(U[3]), Ie = Number(U[4]); + const U = K, X = String(U[0]); + if (X === "T") return null; + if (X === "G") return [Number(U[1]), Number(U[1]), Number(U[1])]; + if (X === "RGB") return [Number(U[1]), Number(U[2]), Number(U[3])]; + const re = Number(U[1]), xe = Number(U[2]), Le = Number(U[3]), Ie = Number(U[4]); return [ - 1 - Math.min(1, ne + Ie), + 1 - Math.min(1, re + Ie), 1 - Math.min(1, xe + Ie), - 1 - Math.min(1, _e + Ie) + 1 - Math.min(1, Le + Ie) ]; - }, N = (K, U) => Array.isArray(K) && Array.isArray(U) ? K.length === U.length && K.every((Z, ne) => Z === U[ne]) : K === U, w = (K) => Array.isArray(K) ? [...K] : K, y = (K) => { - const U = K.input, Z = String(U.subtype), ne = m[Z] ?? [], xe = {}, _e = (ie, Fe, He) => { - if (ie !== "contents" && v.indexOf(ie) < 0 && ne.indexOf(ie) < 0) { + }, N = (K, U) => Array.isArray(K) && Array.isArray(U) ? K.length === U.length && K.every((X, re) => X === U[re]) : K === U, w = (K) => Array.isArray(K) ? [...K] : K, y = (K) => { + const U = K.input, X = String(U.subtype), re = m[X] ?? [], xe = {}, Le = (Me, It, rt) => { + if (Me !== "contents" && v.indexOf(Me) < 0 && re.indexOf(Me) < 0) { a( "unsupported-api", - `Annot.${ie} is not writable on subtype '${Z}' (write ignored)` + `Annot.${Me} is not writable on subtype '${X}' (write ignored)` ); return; } - if (U.opaqueBody && v.indexOf(ie) < 0 && ie !== "contents") { + if (U.opaqueBody && v.indexOf(Me) < 0 && Me !== "contents") { a( "unsupported-api", - `Annot.${ie}: '${Z}' has an opaque appearance (write ignored)` + `Annot.${Me}: '${X}' has an opaque appearance (write ignored)` ); return; } - if (!He(Fe)) { - a("invalid-field-value", `Annot.${ie}: invalid value (write ignored)`); + if (!rt(It)) { + a("invalid-field-value", `Annot.${Me}: invalid value (write ignored)`); return; } - K.current[ie] = w(Fe); - }, Ie = (ie, Fe) => ({ + K.current[Me] = w(It); + }, Ie = (Me, It) => ({ enumerable: !0, - get: () => w(K.current[ie]), - set: (He) => _e(ie, He, Fe) - }), Le = (ie) => typeof ie == "number" && isFinite(ie), X = (ie) => typeof ie == "boolean"; + get: () => w(K.current[Me]), + set: (rt) => Le(Me, rt, It) + }), De = (Me) => typeof Me == "number" && isFinite(Me), qe = (Me) => typeof Me == "boolean"; return Object.defineProperties(xe, { name: { enumerable: !0, get: () => String(U.name ?? "") }, - type: { enumerable: !0, get: () => S[Z] ?? Z }, + type: { enumerable: !0, get: () => S[X] ?? X }, page: { enumerable: !0, get: () => Number(U.page ?? 0) }, author: { enumerable: !0, get: () => String(U.author ?? "") }, subject: { enumerable: !0, get: () => String(U.subject ?? "") }, strokeColor: Ie("strokeColor", C), fillColor: Ie("fillColor", C), - opacity: Ie("opacity", (ie) => Le(ie) && Number(ie) >= 0 && Number(ie) <= 1), - width: Ie("width", (ie) => Le(ie) && Number(ie) >= 0), - style: Ie("borderStyle", (ie) => ie === "S" || ie === "D"), - dash: Ie("dash", (ie) => Array.isArray(ie) && ie.every(Le)), + opacity: Ie("opacity", (Me) => De(Me) && Number(Me) >= 0 && Number(Me) <= 1), + width: Ie("width", (Me) => De(Me) && Number(Me) >= 0), + style: Ie("borderStyle", (Me) => Me === "S" || Me === "D"), + dash: Ie("dash", (Me) => Array.isArray(Me) && Me.every(De)), rect: Ie( "rect", - (ie) => Array.isArray(ie) && ie.length === 4 && ie.every(Le) + (Me) => Array.isArray(Me) && Me.length === 4 && Me.every(De) ), - contents: Ie("contents", (ie) => typeof ie == "string"), - hidden: Ie("hidden", X), - print: Ie("print", X), - readOnly: Ie("readOnly", X), - lock: Ie("locked", X), - noView: Ie("noView", X), - toggleNoView: Ie("toggleNoView", X), + contents: Ie("contents", (Me) => typeof Me == "string"), + hidden: Ie("hidden", qe), + print: Ie("print", qe), + readOnly: Ie("readOnly", qe), + lock: Ie("locked", qe), + noView: Ie("noView", qe), + toggleNoView: Ie("toggleNoView", qe), doc: { enumerable: !1, get: () => h } }), xe.getProps = () => { - const ie = {}; - for (const Fe of Object.keys(K.current)) - ie[Fe] = w(K.current[Fe]); - return ie; - }, xe.setProps = (ie) => { - const Fe = ie ?? {}; - for (const He of Object.keys(Fe)) - xe[He] = Fe[He]; + const Me = {}; + for (const It of Object.keys(K.current)) + Me[It] = w(K.current[It]); + return Me; + }, xe.setProps = (Me) => { + const It = Me ?? {}; + for (const rt of Object.keys(It)) + xe[rt] = It[rt]; }, xe; }, x = (K) => { if (!r) return null; @@ -41308,19 +41339,19 @@ function pz(e) { "unsupported-api", "getAnnots: whole-document search is limited to the prefetched pages (compatibility deviation)" ), r.annots.length ? r.annots.map((xe) => xe.wrapper) : null; - const Z = Math.trunc(Number(U)); - if (!r.annotPages.has(Z)) + const X = Math.trunc(Number(U)); + if (!r.annotPages.has(X)) return a( "unsupported-api", - `getAnnots: page ${Z} is outside the prefetched annots plane (compatibility deviation)` + `getAnnots: page ${X} is outside the prefetched annots plane (compatibility deviation)` ), null; - const ne = r.annotsByPage.get(Z) ?? []; - return ne.length ? ne.map((xe) => xe.wrapper) : null; + const re = r.annotsByPage.get(X) ?? []; + return re.length ? re.map((xe) => xe.wrapper) : null; }, A = (K, U) => { - const Z = x({ nPage: K }); - if (!Z) return null; - for (const ne of Z) - if (String(ne.name) === String(U)) return ne; + const X = x({ nPage: K }); + if (!X) return null; + for (const re of X) + if (String(re.name) === String(U)) return re; return null; }; h.getAnnots = x, h.getAnnot = A, Object.defineProperties(h, { @@ -41339,21 +41370,21 @@ function pz(e) { } }), h.getField = p, h.getNthFieldName = (K) => String(r?.fields[Math.trunc(Number(K))]?.input.name ?? ""), h.resetForm = (K) => { if (!r) return; - const U = K === void 0 ? r.fields : (Array.isArray(K) ? K : [K]).map((Z) => r.fieldsByName.get(String(Z))).filter((Z) => Z !== void 0); - for (const Z of U) { - Z.value = o(Z.input.defaultValue); - const ne = i(Z.input.ref); - r.resetKeys.has(ne) || (r.resetKeys.add(ne), r.resetRefs.push(Z.input.ref)); + const U = K === void 0 ? r.fields : (Array.isArray(K) ? K : [K]).map((X) => r.fieldsByName.get(String(X))).filter((X) => X !== void 0); + for (const X of U) { + X.value = o(X.input.defaultValue); + const re = i(X.input.ref); + r.resetKeys.has(re) || (r.resetKeys.add(re), r.resetRefs.push(X.input.ref)); } - }, h.print = () => r?.uiEffects.push({ type: "print" }), h.submitForm = (K, U, Z, ne) => { + }, h.print = () => r?.uiEffects.push({ type: "print" }), h.submitForm = (K, U, X, re) => { if (!r) return; - const xe = K !== null && typeof K == "object" ? K : { cURL: K, bFDF: U, bEmpty: Z, aFields: ne }, _e = Array.isArray(xe.aFields) ? xe.aFields.map((X) => String(X)) : null, Ie = xe.cSubmitAs === void 0 ? void 0 : String(xe.cSubmitAs).toUpperCase(), Le = Ie === "FDF" ? "fdf" : Ie === "XFDF" ? "xfdf" : Ie === "HTML" ? "html" : Ie === "PDF" ? "pdf" : xe.bFDF === !1 ? "html" : void 0; + const xe = K !== null && typeof K == "object" ? K : { cURL: K, bFDF: U, bEmpty: X, aFields: re }, Le = Array.isArray(xe.aFields) ? xe.aFields.map((qe) => String(qe)) : null, Ie = xe.cSubmitAs === void 0 ? void 0 : String(xe.cSubmitAs).toUpperCase(), De = Ie === "FDF" ? "fdf" : Ie === "XFDF" ? "xfdf" : Ie === "HTML" ? "html" : Ie === "PDF" ? "pdf" : xe.bFDF === !1 ? "html" : void 0; r.uiEffects.push({ type: "submitForm", url: xe.cURL === void 0 || xe.cURL === null ? null : String(xe.cURL), - fieldNames: _e, + fieldNames: Le, includeEmpty: !!xe.bEmpty, - ...Le === void 0 ? {} : { format: Le }, + ...De === void 0 ? {} : { format: De }, ...xe.bGet === void 0 ? {} : { method: xe.bGet ? "get" : "post" } }); }, h.mailDoc = () => c("mailDoc"), h.getURL = () => c("getURL"); @@ -41369,11 +41400,11 @@ function pz(e) { viewerVariation: "Reader", viewerVersion: 21, formsVersion: 21, - alert: (K, U, Z, ne) => (r?.uiEffects.push({ + alert: (K, U, X, re) => (r?.uiEffects.push({ type: "alert", message: String(K), icon: Number.isFinite(Number(U)) ? Number(U) : 0, - ...ne === void 0 ? {} : { title: String(ne) } + ...re === void 0 ? {} : { title: String(re) } }), 1), beep: () => a("unsupported-api", "app.beep is not supported in v1"), response: () => (a("unsupported-api", "app.response is not supported in v1"), null), @@ -41412,140 +41443,140 @@ function pz(e) { "November", "December" ], T = (K, U) => { - const Z = r?.input.environment ?? {}, ne = U && typeof U.getTime == "function" ? new n(Number(U.getTime())) : new n(Number(Z.nowMs ?? 0)), xe = new n( - ne.getTime() + Number(Z.utcOffsetMinutes ?? 0) * 6e4 - ), _e = xe.getUTCFullYear(), Ie = xe.getUTCMonth(), Le = xe.getUTCDate(), X = xe.getUTCHours(), ie = xe.getUTCMinutes(), Fe = xe.getUTCSeconds(), He = X % 12 === 0 ? 12 : X % 12, ut = { - yyyy: String(_e), - yy: E(_e % 100), + const X = r?.input.environment ?? {}, re = U && typeof U.getTime == "function" ? new n(Number(U.getTime())) : new n(Number(X.nowMs ?? 0)), xe = new n( + re.getTime() + Number(X.utcOffsetMinutes ?? 0) * 6e4 + ), Le = xe.getUTCFullYear(), Ie = xe.getUTCMonth(), De = xe.getUTCDate(), qe = xe.getUTCHours(), Me = xe.getUTCMinutes(), It = xe.getUTCSeconds(), rt = qe % 12 === 0 ? 12 : qe % 12, Z = { + yyyy: String(Le), + yy: E(Le % 100), mmmm: O[Ie], mmm: I[Ie], mm: E(Ie + 1), m: String(Ie + 1), - dd: E(Le), - d: String(Le), - HH: E(X), - hh: E(He), - h: String(He), - H: String(X), - MM: E(ie), - M: String(ie), - ss: E(Fe), - tt: X < 12 ? "am" : "pm" + dd: E(De), + d: String(De), + HH: E(qe), + hh: E(rt), + h: String(rt), + H: String(qe), + MM: E(Me), + M: String(Me), + ss: E(It), + tt: qe < 12 ? "am" : "pm" }; return String(K).replace( /yyyy|mmmm|mmm|yy|mm|dd|HH|hh|MM|ss|tt|m|d|H|h|M/g, - ($e) => ut[$e] + (fe) => Z[fe] ); }, R = { printd: T, printf: (K, ...U) => { - let Z = 0; - return String(K).replace(/%(?:,?\d*(?:\.\d+)?)?[dfs]/g, (ne) => { - const xe = U[Z++]; - if (ne.endsWith("s")) return String(xe ?? ""); - if (ne.endsWith("d")) return String(Math.trunc(l(xe))); - const _e = /\.(\d+)/.exec(ne)?.[1]; - return l(xe).toFixed(_e ? Number(_e) : 0); + let X = 0; + return String(K).replace(/%(?:,?\d*(?:\.\d+)?)?[dfs]/g, (re) => { + const xe = U[X++]; + if (re.endsWith("s")) return String(xe ?? ""); + if (re.endsWith("d")) return String(Math.trunc(l(xe))); + const Le = /\.(\d+)/.exec(re)?.[1]; + return l(xe).toFixed(Le ? Number(Le) : 0); }); } }, M = (K, U) => { - const Z = (K.fields ?? []).map(($e) => { - const gt = { - input: $e, - originalValue: o($e.value), - value: o($e.value), - originalDisplay: String($e.display ?? "visible"), - display: String($e.display ?? "visible"), + const X = (K.fields ?? []).map((fe) => { + const Fe = { + input: fe, + originalValue: o(fe.value), + value: o(fe.value), + originalDisplay: String(fe.display ?? "visible"), + display: String(fe.display ?? "visible"), wrapper: {} }; - return gt.wrapper = g(gt), gt; - }), ne = new Map(Z.map(($e) => [String($e.input.name), $e])), xe = new Map(Z.map(($e) => [i($e.input.ref), $e])), _e = (K.annots ?? []).map( - ($e) => { - const gt = () => ({ - strokeColor: w($e.strokeColor ?? ["T"]), - fillColor: w($e.fillColor ?? ["T"]), - opacity: Number($e.opacity ?? 1), - width: Number($e.width ?? 1), - borderStyle: String($e.borderStyle ?? "S"), - dash: w($e.dash ?? []), - rect: w($e.rect ?? [0, 0, 0, 0]), - contents: String($e.contents ?? ""), - hidden: !!$e.hidden, - print: !!$e.print, - readOnly: !!$e.readOnly, - locked: !!$e.locked, - noView: !!$e.noView, - toggleNoView: !!$e.toggleNoView - }), qt = { - input: $e, - original: gt(), - current: gt(), + return Fe.wrapper = g(Fe), Fe; + }), re = new Map(X.map((fe) => [String(fe.input.name), fe])), xe = new Map(X.map((fe) => [i(fe.input.ref), fe])), Le = (K.annots ?? []).map( + (fe) => { + const Fe = () => ({ + strokeColor: w(fe.strokeColor ?? ["T"]), + fillColor: w(fe.fillColor ?? ["T"]), + opacity: Number(fe.opacity ?? 1), + width: Number(fe.width ?? 1), + borderStyle: String(fe.borderStyle ?? "S"), + dash: w(fe.dash ?? []), + rect: w(fe.rect ?? [0, 0, 0, 0]), + contents: String(fe.contents ?? ""), + hidden: !!fe.hidden, + print: !!fe.print, + readOnly: !!fe.readOnly, + locked: !!fe.locked, + noView: !!fe.noView, + toggleNoView: !!fe.toggleNoView + }), ht = { + input: fe, + original: Fe(), + current: Fe(), wrapper: {} }; - return qt.wrapper = y(qt), qt; + return ht.wrapper = y(ht), ht; } ), Ie = /* @__PURE__ */ new Map(); - for (const $e of _e) { - const gt = Number($e.input.page ?? 0), qt = Ie.get(gt); - qt ? qt.push($e) : Ie.set(gt, [$e]); + for (const fe of Le) { + const Fe = Number(fe.input.page ?? 0), ht = Ie.get(Fe); + ht ? ht.push(fe) : Ie.set(Fe, [fe]); } - const Le = K.event ?? {}, X = xe.get(i(Le.target)), ie = xe.get(i(Le.source)), Fe = Le.value !== void 0 ? o(Le.value) : o(X?.value ?? null), He = Le.type !== void 0 ? String(Le.type) : Le.kind === "name-tree-boot" ? "Doc" : "Field", ut = { + const De = K.event ?? {}, qe = xe.get(i(De.target)), Me = xe.get(i(De.source)), It = De.value !== void 0 ? o(De.value) : o(qe?.value ?? null), rt = De.type !== void 0 ? String(De.type) : De.kind === "name-tree-boot" ? "Doc" : "Field", Z = { // Explicit type/name (action-driven runs, from trigger provenance) // beat the kind-derived defaults (the K/V/C/F pipeline path). - name: Le.name !== void 0 ? String(Le.name) : f(String(Le.kind ?? "")), - type: He, + name: De.name !== void 0 ? String(De.name) : d(String(De.kind ?? "")), + type: rt, // Doc-typed events target the Doc object (Acrobat's WillSave // boilerplate does `event.target.getField(...)`); field targets win // when present (a widget-anchored run). - target: X?.wrapper ?? (He === "Doc" ? h : null), - targetName: String(X?.input.name ?? ""), - source: ie?.wrapper ?? { source: h }, - value: Fe, - change: String(Le.change ?? ""), - selStart: Math.max(0, Math.trunc(Number(Le.selStart ?? 0))), - selEnd: Math.max(0, Math.trunc(Number(Le.selEnd ?? 0))), - willCommit: !!Le.willCommit, - modifier: !!Le.modifier, - shift: !!Le.shift, + target: qe?.wrapper ?? (rt === "Doc" ? h : null), + targetName: String(qe?.input.name ?? ""), + source: Me?.wrapper ?? { source: h }, + value: It, + change: String(De.change ?? ""), + selStart: Math.max(0, Math.trunc(Number(De.selStart ?? 0))), + selEnd: Math.max(0, Math.trunc(Number(De.selEnd ?? 0))), + willCommit: !!De.willCommit, + modifier: !!De.modifier, + shift: !!De.shift, rc: !0 }; r = { input: K, - fields: Z, - fieldsByName: ne, + fields: X, + fieldsByName: re, fieldsByRef: xe, - annots: _e, + annots: Le, annotsByPage: Ie, annotPages: new Set( - (K.annotPages ?? []).map(($e) => Math.trunc(Number($e))) + (K.annotPages ?? []).map((fe) => Math.trunc(Number(fe))) ), annotsCoverDocument: !!K.annotsCoverDocument, - event: ut, + event: Z, resetRefs: [], resetKeys: /* @__PURE__ */ new Set(), uiEffects: [], diagnostics: [], randomState: Number(K.environment?.randomSeed ?? 1) >>> 0, maxEffects: Math.max(1, Math.trunc(Number(U?.maxEffects ?? 256))) - }, t.event = ut, t.identity = { ...K.identity ?? {} }; + }, t.event = Z, t.identity = { ...K.identity ?? {} }; }, F = (K, U) => { - const Z = String(K.input.kind); - if (Z === "text") return { value: String(U ?? "") }; - if (Z === "checkbox" || Z === "radio") + const X = String(K.input.kind); + if (X === "text") return { value: String(U ?? "") }; + if (X === "checkbox" || X === "radio") return { value: U == null || String(U) === "Off" ? null : String(U) }; - if (Z === "combobox") { - const ne = Array.isArray(U) ? U[0] : U, xe = ne == null ? "" : String(ne); + if (X === "combobox") { + const re = Array.isArray(U) ? U[0] : U, xe = re == null ? "" : String(re); return { value: xe === "" ? null : xe }; } - return Z === "listbox" ? Array.isArray(U) ? { selectedValues: U.map(String) } : { + return X === "listbox" ? Array.isArray(U) ? { selectedValues: U.map(String) } : { selectedValues: U == null || U === "" ? [] : [String(U)] } : (a( "invalid-field-value", `field '${String(K.input.name)}' cannot accept a scripted value` ), null); - }, B = () => ({ + }, _ = () => ({ rc: !!r?.event.rc, value: o(r?.event.value ?? null), change: String(r?.event.change ?? ""), @@ -41553,50 +41584,50 @@ function pz(e) { selEnd: Math.max(0, Math.trunc(Number(r?.event.selEnd ?? 0))) }), $ = () => { if (!r) throw new Error("AcroJS run state was not initialized"); - const K = r.input.event, U = r.fieldsByRef.get(i(K.target)), Z = String(K.kind ?? ""); - U && Z === "field-calculate" && (U.value = o(r.event.value)); - const ne = []; - r.resetRefs.length > 0 && ne.push({ kind: "reset", refs: [...r.resetRefs] }); + const K = r.input.event, U = r.fieldsByRef.get(i(K.target)), X = String(K.kind ?? ""); + U && X === "field-calculate" && (U.value = o(r.event.value)); + const re = []; + r.resetRefs.length > 0 && re.push({ kind: "reset", refs: [...r.resetRefs] }); for (const Ie of r.fields) { - const Le = i(Ie.input.ref), X = r.resetKeys.has(Le) ? Ie.input.defaultValue : Ie.originalValue; - if (!s(Ie.value, X)) { - const ie = F(Ie, Ie.value); - ie && ne.push({ kind: "setValue", ref: Ie.input.ref, value: ie }); + const De = i(Ie.input.ref), qe = r.resetKeys.has(De) ? Ie.input.defaultValue : Ie.originalValue; + if (!s(Ie.value, qe)) { + const Me = F(Ie, Ie.value); + Me && re.push({ kind: "setValue", ref: Ie.input.ref, value: Me }); } - Ie.display !== Ie.originalDisplay && ne.push({ kind: "setDisplay", ref: Ie.input.ref, display: Ie.display }); + Ie.display !== Ie.originalDisplay && re.push({ kind: "setDisplay", ref: Ie.input.ref, display: Ie.display }); } - U && Z === "field-format" && ne.push({ + U && X === "field-format" && re.push({ kind: "setAppearanceText", ref: U.input.ref, text: String(r.event.value ?? "") }); const xe = []; for (const Ie of r.annots) { - const Le = {}, X = {}; - for (const ie of Object.keys(Ie.current)) - N(Ie.current[ie], Ie.original[ie]) || (v.indexOf(ie) >= 0 ? X[ie] = Ie.current[ie] : Le[ie] = w(Ie.current[ie])); - Object.keys(X).length > 0 && (Le.flags = X), Object.keys(Le).length > 0 && xe.push({ ref: Ie.input.ref, patch: Le }); - } - const _e = ne.length + xe.length + r.uiEffects.length; - return _e > r.maxEffects ? { - event: B(), + const De = {}, qe = {}; + for (const Me of Object.keys(Ie.current)) + N(Ie.current[Me], Ie.original[Me]) || (v.indexOf(Me) >= 0 ? qe[Me] = Ie.current[Me] : De[Me] = w(Ie.current[Me])); + Object.keys(qe).length > 0 && (De.flags = qe), Object.keys(De).length > 0 && xe.push({ ref: Ie.input.ref, patch: De }); + } + const Le = re.length + xe.length + r.uiEffects.length; + return Le > r.maxEffects ? { + event: _(), formEffects: [], annotEffects: [], uiEffects: [], diagnostics: [...r.diagnostics], error: { kind: "budget", - message: `script produced ${_e} effects; limit is ${r.maxEffects}` + message: `script produced ${Le} effects; limit is ${r.maxEffects}` } } : { - event: B(), - formEffects: ne, + event: _(), + formEffects: re, annotEffects: xe, uiEffects: [...r.uiEffects], diagnostics: [...r.diagnostics] }; }, D = (K) => ({ - event: B(), + event: _(), formEffects: [], annotEffects: [], uiEffects: [], @@ -41606,23 +41637,23 @@ function pz(e) { message: K instanceof Error ? K.message : String(K), ...K instanceof Error && K.stack ? { stack: K.stack } : {} } - }), _ = (K) => (0, eval)(K); + }), B = (K) => (0, eval)(K); Object.defineProperties(t, { - __acrojsBoot: { configurable: !1, writable: !1, value: (K, U, Z) => { - M(U, Z); + __acrojsBoot: { configurable: !1, writable: !1, value: (K, U, X) => { + M(U, X); try { - for (const ne of K ?? []) _(String(ne)); + for (const re of K ?? []) B(String(re)); return $(); - } catch (ne) { - return D(ne); + } catch (re) { + return D(re); } } }, - __acrojsRun: { configurable: !1, writable: !1, value: (K, U, Z) => { - M(U, Z); + __acrojsRun: { configurable: !1, writable: !1, value: (K, U, X) => { + M(U, X); try { - return _(String(K)), $(); - } catch (ne) { - return D(ne); + return B(String(K)), $(); + } catch (re) { + return D(re); } } } }), t.app = b, t.util = R, t.display = Object.freeze({ visible: 0, hidden: 1, noPrint: 2, noView: 3 }), t.color = Object.freeze({ @@ -41640,20 +41671,20 @@ function pz(e) { yellow: Object.freeze(["CMYK", 0, 0, 1, 0]), convert: (K, U) => { if (!C(K)) return ["T"]; - const Z = String(U), ne = k(K); - if (Z === "T" || ne === null) return ["T"]; - if (Z === "G") return ["G", 0.3 * ne[0] + 0.59 * ne[1] + 0.11 * ne[2]]; - if (Z === "RGB") return ["RGB", ne[0], ne[1], ne[2]]; - if (Z === "CMYK") { - const xe = 1 - Math.max(ne[0], ne[1], ne[2]); - return ["CMYK", 1 - ne[0] - xe, 1 - ne[1] - xe, 1 - ne[2] - xe, xe]; + const X = String(U), re = k(K); + if (X === "T" || re === null) return ["T"]; + if (X === "G") return ["G", 0.3 * re[0] + 0.59 * re[1] + 0.11 * re[2]]; + if (X === "RGB") return ["RGB", re[0], re[1], re[2]]; + if (X === "CMYK") { + const xe = 1 - Math.max(re[0], re[1], re[2]); + return ["CMYK", 1 - re[0] - xe, 1 - re[1] - xe, 1 - re[2] - xe, xe]; } return ["T"]; }, equal: (K, U) => { if (!C(K) || !C(U)) return !1; - const Z = k(K), ne = k(U); - return Z === null || ne === null ? Z === ne : Z.every((xe, _e) => Math.abs(xe - ne[_e]) < 1e-6); + const X = k(K), re = k(U); + return X === null || re === null ? X === re : X.every((xe, Le) => Math.abs(xe - re[Le]) < 1e-6); } }), t.getField = p, t.getAnnots = x, t.getAnnot = A, t.resetForm = h.resetForm, t.print = h.print, t.submitForm = h.submitForm, t.mailDoc = h.mailDoc, t.getURL = h.getURL, Object.defineProperties(t, { documentFileName: { configurable: !0, get: () => h.documentFileName }, @@ -41685,24 +41716,24 @@ function pz(e) { t.Date = H; const Y = t.Math; Y && (Y.random = () => r ? (r.randomState = 1664525 * r.randomState + 1013904223 >>> 0, r.randomState / 4294967296) : 0), t.AFSimple_Calculate = (K, U) => { - const ne = (Array.isArray(U) ? U : String(U).split(",")).map((Ie) => l(p(String(Ie).trim())?.value)), xe = String(K).toUpperCase(), _e = ne.length === 0 ? 0 : xe === "PRD" ? ne.reduce((Ie, Le) => Ie * Le, 1) : xe === "AVG" ? ne.reduce((Ie, Le) => Ie + Le, 0) / ne.length : xe === "MIN" ? Math.min(...ne) : xe === "MAX" ? Math.max(...ne) : ne.reduce((Ie, Le) => Ie + Le, 0); - r && (r.event.value = _e); - }, t.AFNumber_Format = (K, U, Z, ne, xe, _e) => { + const re = (Array.isArray(U) ? U : String(U).split(",")).map((Ie) => l(p(String(Ie).trim())?.value)), xe = String(K).toUpperCase(), Le = re.length === 0 ? 0 : xe === "PRD" ? re.reduce((Ie, De) => Ie * De, 1) : xe === "AVG" ? re.reduce((Ie, De) => Ie + De, 0) / re.length : xe === "MIN" ? Math.min(...re) : xe === "MAX" ? Math.max(...re) : re.reduce((Ie, De) => Ie + De, 0); + r && (r.event.value = Le); + }, t.AFNumber_Format = (K, U, X, re, xe, Le) => { if (!r) return; const Ie = Math.max(0, Math.min(10, Math.trunc(Number(K)))); - let Le = l(r.event.value).toFixed(Ie); + let De = l(r.event.value).toFixed(Ie); if (Number(U) === 0 || Number(U) === 2) { - const [ie, Fe] = Le.split("."); - Le = `${ie.replace(/\B(?=(\d{3})+(?!\d))/g, ",")}${Fe === void 0 ? "" : `.${Fe}`}`; + const [Me, It] = De.split("."); + De = `${Me.replace(/\B(?=(\d{3})+(?!\d))/g, ",")}${It === void 0 ? "" : `.${It}`}`; } - const X = String(xe ?? ""); - r.event.value = _e ? `${X}${Le}` : `${Le}${X}`; + const qe = String(xe ?? ""); + r.event.value = Le ? `${qe}${De}` : `${De}${qe}`; }, t.AFPercent_Format = (K) => { if (!r) return; const U = Math.max(0, Math.min(10, Math.trunc(Number(K)))); r.event.value = `${(l(r.event.value) * 100).toFixed(U)}%`; }; - const ue = [ + const le = [ "m/d", "m/d/yy", "mm/dd/yy", @@ -41717,67 +41748,67 @@ function pz(e) { "mmmm d, yyyy", "m/d/yy h:MM tt", "m/d/yy HH:MM" - ], le = ["HH:MM", "h:MM tt", "HH:MM:ss", "h:MM:ss tt"], pe = (K) => { + ], ie = ["HH:MM", "h:MM tt", "HH:MM:ss", "h:MM:ss tt"], pe = (K) => { r && (r.uiEffects.push({ type: "alert", message: K, icon: 0 }), r.event.rc = !1); - }, ge = () => pe( + }, ve = () => pe( `The value entered does not match the format of the field [ ${String( r?.event.targetName ?? "" )} ]` - ), Me = (K) => pe( + ), _e = (K) => pe( `Invalid date/time: please ensure that the date/time exists. Field [ ${String( r?.event.targetName ?? "" )} ] should match format ${String(K ?? "")}` ), Be = (K) => { - const U = K ?? r?.event ?? {}, Z = String(U.value ?? ""); - if (U.willCommit) return Z; - const ne = Math.max(0, Math.trunc(Number(U.selStart ?? 0))), xe = Math.max(ne, Math.trunc(Number(U.selEnd ?? 0))); - return Z.slice(0, ne) + String(U.change ?? "") + Z.slice(xe); + const U = K ?? r?.event ?? {}, X = String(U.value ?? ""); + if (U.willCommit) return X; + const re = Math.max(0, Math.trunc(Number(U.selStart ?? 0))), xe = Math.max(re, Math.trunc(Number(U.selEnd ?? 0))); + return X.slice(0, re) + String(U.change ?? "") + X.slice(xe); }; t.AFMergeChange = Be; - const te = (K) => { + const ee = (K) => { if (typeof K == "number") return Number.isFinite(K) ? K : null; let U = String(K ?? "").trim(); if (U === "") return null; U = U.replace(/[^0-9,.\-+eE]/g, ""), U.includes(",") && U.includes(".") ? U = U.lastIndexOf(",") > U.lastIndexOf(".") ? U.replace(/\./g, "").replace(",", ".") : U.replace(/,/g, "") : U.includes(",") && (U = (U.match(/,/g) ?? []).length === 1 ? U.replace(",", ".") : U.replace(/,/g, "")); - const Z = Number(U); - return U !== "" && Number.isFinite(Z) ? Z : null; + const X = Number(U); + return U !== "" && Number.isFinite(X) ? X : null; }; - t.AFMakeNumber = te, t.AFExtractNums = (K) => { + t.AFMakeNumber = ee, t.AFExtractNums = (K) => { const U = String(K ?? "").match(/\d+/g); return U && U.length > 0 ? [...U] : null; }; const he = (K, U) => { - const Z = K.trim(); - return Z === "" ? !0 : (U === 2 || U === 3 ? /^[+-]?(\d+|\d{1,3}(\.\d{3})+)?(,\d*)?$/ : /^[+-]?(\d+|\d{1,3}(,\d{3})+)?(\.\d*)?$/).test(Z) && /\d/.test(Z); + const X = K.trim(); + return X === "" ? !0 : (U === 2 || U === 3 ? /^[+-]?(\d+|\d{1,3}(\.\d{3})+)?(,\d*)?$/ : /^[+-]?(\d+|\d{1,3}(,\d{3})+)?(\.\d*)?$/).test(X) && /\d/.test(X); }; - t.AFNumber_Keystroke = (K, U, Z, ne, xe) => { + t.AFNumber_Keystroke = (K, U, X, re, xe) => { if (!r || !r.event.willCommit) return; - const _e = Be(r.event), Ie = xe ? _e.split(String(xe)).join("") : _e; - he(Ie, Math.trunc(Number(U))) || ge(); + const Le = Be(r.event), Ie = xe ? Le.split(String(xe)).join("") : Le; + he(Ie, Math.trunc(Number(U))) || ve(); }, t.AFPercent_Keystroke = (K, U) => { if (!r || !r.event.willCommit) return; - const Z = Be(r.event).replace(/%\s*$/, ""); - he(Z, Math.trunc(Number(U))) || ge(); + const X = Be(r.event).replace(/%\s*$/, ""); + he(X, Math.trunc(Number(U))) || ve(); }; - const Te = (K) => String(K ?? "").replace(/\D/g, ""), ze = (K) => { + const Te = (K) => String(K ?? "").replace(/\D/g, ""), We = (K) => { if (!r) return; - const U = Te(r.event.value), Z = Math.trunc(Number(K)); - let ne = String(r.event.value ?? ""); - Z === 0 ? ne = U.slice(0, 5) : Z === 1 ? ne = `${U.slice(0, 5)}-${U.slice(5, 9)}` : Z === 2 ? ne = U.length >= 10 ? `(${U.slice(0, 3)}) ${U.slice(3, 6)}-${U.slice(6, 10)}` : `${U.slice(0, 3)}-${U.slice(3, 7)}` : Z === 3 && (ne = `${U.slice(0, 3)}-${U.slice(3, 5)}-${U.slice(5, 9)}`), r.event.value = ne; + const U = Te(r.event.value), X = Math.trunc(Number(K)); + let re = String(r.event.value ?? ""); + X === 0 ? re = U.slice(0, 5) : X === 1 ? re = `${U.slice(0, 5)}-${U.slice(5, 9)}` : X === 2 ? re = U.length >= 10 ? `(${U.slice(0, 3)}) ${U.slice(3, 6)}-${U.slice(6, 10)}` : `${U.slice(0, 3)}-${U.slice(3, 7)}` : X === 3 && (re = `${U.slice(0, 3)}-${U.slice(3, 5)}-${U.slice(5, 9)}`), r.event.value = re; }; - t.AFSpecial_Format = ze, t.AFSpecial_Keystroke = (K) => { + t.AFSpecial_Format = We, t.AFSpecial_Keystroke = (K) => { if (!r || !r.event.willCommit) return; const U = Be(r.event); if (U.trim() === "") return; - const Z = Te(U).length, ne = Math.trunc(Number(K)); - (ne === 0 ? Z === 5 : ne === 1 ? Z === 9 : ne === 2 ? Z === 7 || Z === 10 : Z === 9) || ge(); - }, t.AFRange_Validate = (K, U, Z, ne) => { + const X = Te(U).length, re = Math.trunc(Number(K)); + (re === 0 ? X === 5 : re === 1 ? X === 9 : re === 2 ? X === 7 || X === 10 : X === 9) || ve(); + }, t.AFRange_Validate = (K, U, X, re) => { if (!r) return; - const xe = te(r.event.value); + const xe = ee(r.event.value); if (xe === null) return; - const _e = !!K, Ie = !!Z, Le = Number(U), X = Number(ne); - (!_e || xe >= Le) && (!Ie || xe <= X) || pe( - _e && Ie ? `Invalid value: must be greater than or equal to ${Le} and less than or equal to ${X}.` : _e ? `Invalid value: must be greater than or equal to ${Le}.` : `Invalid value: must be less than or equal to ${X}.` + const Le = !!K, Ie = !!X, De = Number(U), qe = Number(re); + (!Le || xe >= De) && (!Ie || xe <= qe) || pe( + Le && Ie ? `Invalid value: must be greater than or equal to ${De} and less than or equal to ${qe}.` : Le ? `Invalid value: must be greater than or equal to ${De}.` : `Invalid value: must be less than or equal to ${qe}.` ); }; const ae = () => { @@ -41792,52 +41823,52 @@ function pz(e) { M: 0, S: 0 }; - }, me = (K) => { + }, ge = (K) => { const U = r?.input.environment ?? {}; return new n( n.UTC(K.y, K.m - 1, K.d, K.H, K.M, K.S) - Number(U.utcOffsetMinutes ?? 0) * 6e4 ); - }, W = (K, U, Z) => { - const ne = String(K ?? "").trim(); - if (ne === "") return null; - const xe = ne.toLowerCase(); - let _e = null; - for (let pn = 0; pn < 12; pn += 1) - if (xe.indexOf(I[pn].toLowerCase()) >= 0) { - _e = pn + 1; + }, W = (K, U, X) => { + const re = String(K ?? "").trim(); + if (re === "") return null; + const xe = re.toLowerCase(); + let Le = null; + for (let $t = 0; $t < 12; $t += 1) + if (xe.indexOf(I[$t].toLowerCase()) >= 0) { + Le = $t + 1; break; } - const Ie = /(\d{1,2}):(\d{2})(?::(\d{2}))?\s*(am|pm)?/i.exec(ne); - let Le = 0, X = 0, ie = 0; + const Ie = /(\d{1,2}):(\d{2})(?::(\d{2}))?\s*(am|pm)?/i.exec(re); + let De = 0, qe = 0, Me = 0; if (Ie) { - Le = Number(Ie[1]), X = Number(Ie[2]), ie = Number(Ie[3] ?? 0); - const pn = String(Ie[4] ?? "").toLowerCase(); - if (pn === "pm" && Le < 12 && (Le += 12), pn === "am" && Le === 12 && (Le = 0), Le > 23 || X > 59 || ie > 59) return null; - } - const He = ((Ie ? ne.slice(0, Ie.index) + ne.slice(Ie.index + Ie[0].length) : ne).match(/\d+/g) ?? []).map((pn) => Number(pn)), ut = []; - for (const pn of String(U ?? "").match(/yyyy|mmmm|mmm|yy|mm|dd|m|d/g) ?? []) { - const Jo = pn[0] === "y" ? "y" : pn[0] === "m" ? "m" : "d"; - ut.indexOf(Jo) < 0 && ut.push(Jo); - } - let $e = null, gt = _e, qt = null, $t = 0; - for (const pn of ut) { - if (pn === "m" && _e !== null) continue; - if ($t >= He.length) break; - const Jo = He[$t]; - $t += 1, pn === "y" ? $e = Jo : pn === "m" ? gt = Jo : qt = Jo; - } - if ($e === null && gt === null && qt === null && !Ie || ($e === null ? $e = Z.y : $e < 100 && ($e = $e < 50 ? 2e3 + $e : 1900 + $e), gt === null && (gt = Z.m), qt === null && (qt = 1), gt < 1 || gt > 12 || qt < 1 || qt > 31)) return null; - const nn = new n(n.UTC($e, gt - 1, qt)); - return nn.getUTCFullYear() !== $e || nn.getUTCMonth() !== gt - 1 || nn.getUTCDate() !== qt ? null : { y: $e, m: gt, d: qt, H: Le, M: X, S: ie }; + De = Number(Ie[1]), qe = Number(Ie[2]), Me = Number(Ie[3] ?? 0); + const $t = String(Ie[4] ?? "").toLowerCase(); + if ($t === "pm" && De < 12 && (De += 12), $t === "am" && De === 12 && (De = 0), De > 23 || qe > 59 || Me > 59) return null; + } + const rt = ((Ie ? re.slice(0, Ie.index) + re.slice(Ie.index + Ie[0].length) : re).match(/\d+/g) ?? []).map(($t) => Number($t)), Z = []; + for (const $t of String(U ?? "").match(/yyyy|mmmm|mmm|yy|mm|dd|m|d/g) ?? []) { + const Fr = $t[0] === "y" ? "y" : $t[0] === "m" ? "m" : "d"; + Z.indexOf(Fr) < 0 && Z.push(Fr); + } + let fe = null, Fe = Le, ht = null, At = 0; + for (const $t of Z) { + if ($t === "m" && Le !== null) continue; + if (At >= rt.length) break; + const Fr = rt[At]; + At += 1, $t === "y" ? fe = Fr : $t === "m" ? Fe = Fr : ht = Fr; + } + if (fe === null && Fe === null && ht === null && !Ie || (fe === null ? fe = X.y : fe < 100 && (fe = fe < 50 ? 2e3 + fe : 1900 + fe), Fe === null && (Fe = X.m), ht === null && (ht = 1), Fe < 1 || Fe > 12 || ht < 1 || ht > 31)) return null; + const Nt = new n(n.UTC(fe, Fe - 1, ht)); + return Nt.getUTCFullYear() !== fe || Nt.getUTCMonth() !== Fe - 1 || Nt.getUTCDate() !== ht ? null : { y: fe, m: Fe, d: ht, H: De, M: qe, S: Me }; }, Se = (K, U) => W(K, U, ae()); Object.defineProperty(t, "__acrojsParseDate", { configurable: !1, writable: !1, - value: (K, U, Z) => { - const ne = Z ?? {}, xe = W(K, U, { - y: Number(ne.year), - m: Number(ne.month), - d: Number(ne.day) + value: (K, U, X) => { + const re = X ?? {}, xe = W(K, U, { + y: Number(re.year), + m: Number(re.month), + d: Number(re.day) }); return xe && { year: xe.y, @@ -41853,27 +41884,27 @@ function pz(e) { if (!r) return; const U = String(r.event.value ?? ""); if (U.trim() === "") return; - const Z = Se(U, K), ne = Z ? me(Z) : new H(U); - Number.isNaN(ne.getTime()) || (r.event.value = T(K, ne)); + const X = Se(U, K), re = X ? ge(X) : new H(U); + Number.isNaN(re.getTime()) || (r.event.value = T(K, re)); }; - t.AFDate_FormatEx = Ae, t.AFDate_Format = (K) => Ae(ue[Math.trunc(Number(K))] ?? "m/d/yy"); + t.AFDate_FormatEx = Ae, t.AFDate_Format = (K) => Ae(le[Math.trunc(Number(K))] ?? "m/d/yy"); const ce = (K) => { if (!r || !r.event.willCommit) return; const U = Be(r.event); - U.trim() !== "" && (Se(U, K) || Me(K)); + U.trim() !== "" && (Se(U, K) || _e(K)); }; - t.AFDate_KeystrokeEx = ce, t.AFDate_Keystroke = (K) => ce(ue[Math.trunc(Number(K))] ?? "m/d/yy"); + t.AFDate_KeystrokeEx = ce, t.AFDate_Keystroke = (K) => ce(le[Math.trunc(Number(K))] ?? "m/d/yy"); const Ne = (K) => { if (!r) return; const U = String(r.event.value ?? ""); if (U.trim() === "") return; - const Z = Se(U, K); - Z && (r.event.value = T(K, me(Z))); + const X = Se(U, K); + X && (r.event.value = T(K, ge(X))); }; - t.AFTime_FormatEx = Ne, t.AFTime_Format = (K) => Ne(le[Math.trunc(Number(K))] ?? "HH:MM"), t.AFTime_Keystroke = (K) => { + t.AFTime_FormatEx = Ne, t.AFTime_Format = (K) => Ne(ie[Math.trunc(Number(K))] ?? "HH:MM"), t.AFTime_Keystroke = (K) => { if (!r || !r.event.willCommit) return; const U = Be(r.event); - U.trim() !== "" && (Se(U, le[Math.trunc(Number(K))] ?? "HH:MM") || Me(le[Math.trunc(Number(K))] ?? "HH:MM")); + U.trim() !== "" && (Se(U, ie[Math.trunc(Number(K))] ?? "HH:MM") || _e(ie[Math.trunc(Number(K))] ?? "HH:MM")); }, t.fetch = void 0, t.XMLHttpRequest = void 0, t.WebSocket = void 0; } const BDe = `(${pz.toString()})(globalThis);`; @@ -41966,16 +41997,16 @@ function M0e(e, { store: t, geometry: n }) { continue; } const l = t.model().byId[`obj:${c.annotObjectNumber}`], u = l?.annotation.page.objectNumber ?? c.page?.objectNumber; - let d = Sn(l), f = l?.annotation.subtype; - if ((!d || !f) && u !== void 0) + let f = Sn(l), d = l?.annotation.subtype; + if ((!f || !d) && u !== void 0) try { - const { annotations: g } = await s.page(Lt(u)).annotations.list(), p = g.find( + const { annotations: g } = await s.page(Ft(u)).annotations.list(), p = g.find( (m) => m.ref.kind === "objectNumber" && m.ref.objectNumber === c.annotObjectNumber ); - p && (d = p.ref, f = p.subtype); + p && (f = p.ref, d = p.subtype); } catch { } - if (u === void 0 || !d || !f) { + if (u === void 0 || !f || !d) { i.push({ annotObjectNumber: c.annotObjectNumber, status: "failed", @@ -41983,7 +42014,7 @@ function M0e(e, { store: t, geometry: n }) { }); continue; } - const h = T0e(f, c.patch, n.cropOf(u)); + const h = T0e(d, c.patch, n.cropOf(u)); if (h instanceof Error) { i.push({ annotObjectNumber: c.annotObjectNumber, @@ -41993,7 +42024,7 @@ function M0e(e, { store: t, geometry: n }) { continue; } try { - await Va(t.apply([{ type: "update", ref: d, patch: h }])), i.push({ annotObjectNumber: c.annotObjectNumber, status: "applied" }); + await Va(t.apply([{ type: "update", ref: f, patch: h }])), i.push({ annotObjectNumber: c.annotObjectNumber, status: "applied" }); } catch (g) { a = !0, i.push({ annotObjectNumber: c.annotObjectNumber, @@ -42006,7 +42037,7 @@ function M0e(e, { store: t, geometry: n }) { } } }; } -const dh = 10; +const hh = 10; function B0e(e, { store: t, authority: n, @@ -42014,8 +42045,8 @@ function B0e(e, { behaviors: o, lending: s, geometry: i -}, a, c, l, u, d) { - const f = () => iO(t.model(), t.model().selected), h = (w) => { +}, a, c, l, u, f) { + const d = () => iO(t.model(), t.model().selected), h = (w) => { const y = [], x = []; for (const A of w) (s.owns(oe(A)) ? x : y).push(A); return { own: y, lent: x }; @@ -42023,10 +42054,10 @@ function B0e(e, { const w = a.selectedRecords().flatMap(({ annotation: x }) => { const A = i.pageBoxOf(x.page.objectNumber); return A ? [{ rect: x.rect, page: A }] : []; - }), y = (x, A) => w.some(({ rect: b, page: E }) => b[x] + b[A] + dh > E[A]) && w.every(({ rect: b }) => b[x] - dh >= 0); + }), y = (x, A) => w.some(({ rect: b, page: E }) => b[x] + b[A] + hh > E[A]) && w.every(({ rect: b }) => b[x] - hh >= 0); return { - x: y("x", "width") ? -dh : dh, - y: y("y", "height") ? -dh : dh + x: y("x", "width") ? -hh : hh, + y: y("y", "height") ? -hh : hh }; }, p = () => { const w = {}; @@ -42036,7 +42067,7 @@ function B0e(e, { } return w; }, m = async (w, y) => { - const x = f(), A = await e.cancellable( + const x = d(), A = await e.cancellable( y, Promise.all(w().map((b) => b.written)) ); @@ -42056,7 +42087,7 @@ function B0e(e, { u.styleTyping(E, T); else if (Object.keys(T).length) { const M = FH( - { paragraphs: Yl(I.annotation, r).paragraphs }, + { paragraphs: Ql(I.annotation, r).paragraphs }, x, T ); @@ -42132,7 +42163,7 @@ function B0e(e, { O && await N(I, { to: O, type: "group" }, w); }, ungroup: async (w = {}) => { - const y = t.model(), x = VS(y, y.selected).map((A) => y.byId[A]).filter((A) => !!A && !!Tf(A.annotation)); + const y = t.model(), x = VS(y, y.selected).map((A) => y.byId[A]).filter((A) => !!A && !!Bf(A.annotation)); await N(x, null, w); }, canGroup: () => { @@ -42148,7 +42179,7 @@ function B0e(e, { return !(x.size === 1 && !x.has(null)); }, canUngroup: () => { - const w = t.model(), y = VS(w, w.selected).map((x) => w.byId[x]).filter((x) => !!x && !!Tf(x.annotation)); + const w = t.model(), y = VS(w, w.selected).map((x) => w.byId[x]).filter((x) => !!x && !!Bf(x.annotation)); return y.length > 0 && y.every((x) => { const A = Sn(x); return A != null && n.allowsMutation("update", A); @@ -42159,8 +42190,8 @@ function B0e(e, { // A lent record (a form's widget) is its lender's to copy, in the same // change: what a person does to the selection goes to each record's owner. duplicate: (w = {}) => { - const { own: y, lent: x } = h(f()); - return d.duplicate( + const { own: y, lent: x } = h(d()); + return f.duplicate( y, { offset: w.offset ?? g(), @@ -42171,7 +42202,7 @@ function B0e(e, { ); }, canDuplicate: () => { - const { own: w, lent: y } = h(f()); + const { own: w, lent: y } = h(d()); if (!w.length && !y.length || w.length && !n.canDuplicate(w)) return !1; const x = s.lender(), A = t.model(); return y.every((b) => { @@ -42194,7 +42225,7 @@ function yz(e, t = 4096) { const n = Math.max(128, Math.ceil(e)); return Math.min(t, 2 ** Math.ceil(Math.log2(n))); } -const _n = vt, aO = () => new re( +const _n = vt, aO = () => new te( "invalid-input", "annotation", "a stamp must be PNG, JPEG, or one-page PDF bytes" @@ -42215,7 +42246,7 @@ const _n = vt, aO = () => new re( async function cO(e, t, n) { if (typeof e.preview == "function") return _0e(e.preview); if (e.preview) { - const r = await Vo(e.preview); + const r = await $o(e.preview); return VD(new Uint8Array(r.bytes), r.mimeType); } return n === "application/pdf" ? null : VD(new Uint8Array(t), n); @@ -42225,7 +42256,7 @@ const lO = (e, t, n) => { return t === void 0 ? r : { width: t, height: t * (r.height / r.width) }; }; async function $D(e) { - const t = await Vo(e), n = im(t.bytes); + const t = await $o(e), n = am(t.bytes); if (!n) return console.error("[annotation]", aO().message), null; const r = await cO({}, t.bytes, n.mimeType); @@ -42240,7 +42271,7 @@ function D0e(e, { afterCreate: s }) { let i = null; - const a = /* @__PURE__ */ new Map(), c = (b) => b.unconfirmed ? a.get(b.id) ?? null : (a.delete(b.id), null), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), d = (b) => { + const a = /* @__PURE__ */ new Map(), c = (b) => b.unconfirmed ? a.get(b.id) ?? null : (a.delete(b.id), null), l = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), f = (b) => { const E = b.source; if (E?.kind !== "bytes") return L0e; const { source: I } = E; @@ -42249,7 +42280,7 @@ function D0e(e, { (T) => (u.set(I, T), e.notify(), T), (T) => (l.delete(I), console.error("[annotation] stamp bytes could not be read:", T), null) ), l.set(I, O)), O; - }, f = (b) => { + }, d = (b) => { if (i) return i; const E = b.source; return E?.kind === "bytes" ? u.get(E.source) ?? null : null; @@ -42258,7 +42289,7 @@ function D0e(e, { const p = () => { e.state.update(rO, null), e.state.update(iz, null), e.notify(); }, m = async (b, E = {}) => { - const I = await e.cancellable(E.signal, Vo(b.source)), O = im(I.bytes); + const I = await e.cancellable(E.signal, $o(b.source)), O = am(I.bytes); if (!O) throw aO(); const T = await cO(b, I.bytes, O.mimeType); i = { @@ -42274,21 +42305,21 @@ function D0e(e, { ...b.subject !== void 0 ? { subject: b.subject } : {} }; const R = e.tryGet(yr); - R && g === null && (g = R.getActiveToolId()), p(), R?.activateTool(Vd); + R && g === null && (g = R.getActiveToolId()), p(), R?.activateTool(Ud); }, v = () => { if (!i) return; const b = g; i = null, h = null, g = null, p(); const E = e.tryGet(yr); - !E || b === null || E.getActiveToolId() !== Vd || b !== Vd && (E.hasTool(b) ? E.activateTool(b) : E.activateDefaultTool()); + !E || b === null || E.getActiveToolId() !== Ud || b !== Ud && (E.hasTool(b) ? E.activateTool(b) : E.activateDefaultTool()); }, S = (b, E, I, O, T, R = 0, M = {}, F = !1) => { - const B = e.doc, $ = n.sizeOf(b); - if (!B || !$) return null; - const D = WR(E, O, $, R), _ = t.applyWhenNumbered( + const _ = e.doc, $ = n.sizeOf(b); + if (!_ || !$) return null; + const D = WR(E, O, $, R), B = t.applyWhenNumbered( [ { type: "create", - page: Lt(b), + page: Ft(b), draft: { subtype: "stamp", // Its box before any turn, and the turn (`null` upright, so none is kept). @@ -42303,17 +42334,17 @@ function D0e(e, { ], { select: F } ); - return T && _.then(({ ids: [L] }) => { + return T && B.then(({ ids: [L] }) => { L !== void 0 && (a.set(L, T), e.notify()); - }), _; + }), B; }, C = (b, E, I, O, T, R = 0, M = {}) => { const F = S(b, E, I, O, T, R, M); if (!F) return !1; - const B = r.activeTool()?.id; - return F.then(($) => (s.placed(B, $.ids), ym($))).catch(($) => console.error("[annotation] stamp placement failed:", $)), !0; + const _ = r.activeTool()?.id; + return F.then(($) => (s.placed(_, $.ids), bm($))).catch(($) => console.error("[annotation] stamp placement failed:", $)), !0; }, k = async (b, E, I = {}) => { e.assertAllowed("annotations:create", "annotation.stamps.place"); - const { ref: O } = e.pageOf(E.page), T = await e.cancellable(I.signal, Vo(b.source)), R = im(T.bytes); + const { ref: O } = e.pageOf(E.page), T = await e.cancellable(I.signal, $o(b.source)), R = am(T.bytes); if (!R) throw aO(); const M = await e.cancellable( I.signal, @@ -42332,18 +42363,18 @@ function D0e(e, { E.select ?? !1 ); if (!F) - throw new re( + throw new te( "not-ready", "annotation", `page ${O.objectNumber} isn't laid out yet` ); - const B = await e.cancellable( + const _ = await e.cancellable( I.signal, - F.then(($) => ym($)) + F.then(($) => bm($)) ); - if (!B) - throw new re("operation-failed", "annotation", "the stamp could not be placed"); - return { annotation: B }; + if (!_) + throw new te("operation-failed", "annotation", "the stamp could not be placed"); + return { annotation: _ }; }, N = (b, E, I) => { const O = i; return O ? C( @@ -42364,19 +42395,19 @@ function D0e(e, { const O = r.activeTool(), T = O?.source; if (!T) return !1; const R = r.uprightRotFor(O.upright ? I : void 0); - return T.kind === "bytes" ? (d(O).then( + return T.kind === "bytes" ? (f(O).then( (M) => w(b, E, M, R) ), !0) : o.promptAt(O, b, E, (M) => { const F = M.data instanceof ArrayBuffer ? new Uint8Array(M.data) : M.data; $D(F).then( - (B) => w(b, E, B, R) + (_) => w(b, E, _, R) ); }); }; return { armed: () => i, - clickStamp: f, - readToolStamp: d, + clickStamp: d, + readToolStamp: f, lookOf: c, placeArmedStamp: N, requestStampAt: y, @@ -42398,64 +42429,64 @@ const j0e = 250; function F0e(e, { store: t, fonts: n, textFonts: r }, o) { let s = null; const i = async () => { - const f = s; - f && (s = null, f.cancelPause(), f.hold.send(), await f.written); - }, a = (f, h) => { - s && (s.id !== f || !s.hold.open) && i(), s ?? (s = { - id: f, + const d = s; + d && (s = null, d.cancelPause(), d.hold.send(), await d.written); + }, a = (d, h) => { + s && (s.id !== d || !s.hold.open) && i(), s ?? (s = { + id: d, // Every pause of typing into one text box is one step of the history. - hold: t.hold({ key: "annotation.text" }, { merge: `annotation.text:${f}` }), + hold: t.hold({ key: "annotation.text" }, { merge: `annotation.text:${d}` }), written: null, cancelPause: () => { } }); const g = s, p = t.commit(h, { into: g.hold }); - return r.typed(f), g.written = p.written, g.cancelPause(), g.cancelPause = e.clock.after(j0e, () => { + return r.typed(d), g.written = p.written, g.cancelPause(), g.cancelPause = e.clock.after(j0e, () => { s === g && i(); }), p; - }, c = (f, h) => { + }, c = (d, h) => { const g = e.state.get().textSelection; - g?.id !== f || g.start !== g.end || e.state.update(_1, { ...g, typing: { ...g.typing, ...h } }); - }, l = (f, h) => { - const g = e.state.get().textSelection, p = t.model().byId[f]; - if (!g?.typing || g.id !== f || !p) return h; - const m = Yl(p.annotation, n), v = _ye(m, { paragraphs: h }, g.start, g.typing), S = v ? { id: f, start: v.caret, end: v.caret, ...v.style && { typing: v.style } } : { id: f, start: g.start, end: g.end }; + g?.id !== d || g.start !== g.end || e.state.update(_1, { ...g, typing: { ...g.typing, ...h } }); + }, l = (d, h) => { + const g = e.state.get().textSelection, p = t.model().byId[d]; + if (!g?.typing || g.id !== d || !p) return h; + const m = Ql(p.annotation, n), v = _ye(m, { paragraphs: h }, g.start, g.typing), S = v ? { id: d, start: v.caret, end: v.caret, ...v.style && { typing: v.style } } : { id: d, start: g.start, end: g.end }; return e.state.update(_1, S), v?.doc.paragraphs ?? h; }; - return t.onEffect("text", (f, h) => { - const g = h.byId[f.id], p = Sn(g); + return t.onEffect("text", (d, h) => { + const g = h.byId[d.id], p = Sn(g); if (!g || !p) return; - const m = dwe(g, Yl(g.annotation, n).paragraphs, n); + const m = dwe(g, Ql(g.annotation, n).paragraphs, n); return [{ type: "annotations.update", ref: p, patch: { subtype: "free-text", ...m } }]; }), { type: a, styleTyping: c, sendTyping: i, text: { - begin: (f) => { - t.commit({ type: "beginTextEdit", id: oe(f) }); + begin: (d) => { + t.commit({ type: "beginTextEdit", id: oe(d) }); }, - end: async (f = {}) => { + end: async (d = {}) => { const h = i(); - e.state.get().textSelection && e.state.update(_1, null), t.commit({ type: "endTextEdit" }), await e.cancellable(f.signal, h); + e.state.get().textSelection && e.state.update(_1, null), t.commit({ type: "endTextEdit" }), await e.cancellable(d.signal, h); } }, api: { - beginTextEditAt: (f, h, g, p, m) => { - const v = o.textBoxAt(f, h, { scale: g, rotation: p, zoom: m }); + beginTextEditAt: (d, h, g, p, m) => { + const v = o.textBoxAt(d, h, { scale: g, rotation: p, zoom: m }); return v != null && (t.commit({ type: "beginTextEdit", id: v }), t.model().editing === v); }, getEditingId: () => t.model().editing, - draftContents: (f, h) => { - const g = oe(f); + draftContents: (d, h) => { + const g = oe(d); a(g, { type: "setText", id: g, text: h }); }, - draftRichText: (f, h) => { - const g = oe(f), p = { paragraphs: l(g, h.paragraphs) }; + draftRichText: (d, h) => { + const g = oe(d), p = { paragraphs: l(g, h.paragraphs) }; return a(g, { type: "setRichText", id: g, doc: p }), p; }, // A selection that moves is a new one: the style chosen at the caret stays only while it doesn't. - setTextSelection: (f, h) => { - const g = oe(f), p = e.state.get().textSelection, m = h ? { id: g, start: h.start, end: h.end } : null; + setTextSelection: (d, h) => { + const g = oe(d), p = e.state.get().textSelection, m = h ? { id: g, start: h.start, end: h.end } : null; p === null == (m === null) && (!p || !m || p.id === m.id && p.start === m.start && p.end === m.end) || e.state.update(_1, m); }, - getCssFontFamily: (f, h) => r.faceCss(h, f).fontFamily, - getFamilyOfCss: (f) => r.familyOfCss(f) ?? f + getCssFontFamily: (d, h) => r.faceCss(h, d).fontFamily, + getFamilyOfCss: (d) => r.familyOfCss(d) ?? d } }; } function V0e(e) { @@ -42463,17 +42494,17 @@ function V0e(e) { e.state.update(vD, c.get().snap), e.state.update(kD, c.get().editable), c.api.onSettingsChanged(({ settings: O, changedKeys: T }) => { T.includes("snap") && e.state.update(vD, O.snap), T.includes("editable") && e.state.update(kD, O.editable); }); - const l = iwe(e, t), u = cwe(e, t), d = ywe(e, t); + const l = iwe(e, t), u = cwe(e, t), f = ywe(e, t); c0e(e, t, a0e(n)); - const f = F0e(e, t, u), h = async () => { - await f.sendTyping(), await t.store.whenWritten(); + const d = F0e(e, t, u), h = async () => { + await d.sendTyping(), await t.store.whenWritten(); }; c.api.onSettingsChanged(({ changedKeys: O }) => { if (!O.includes("editable")) return; const T = t.store.model(), R = T.editing === null ? void 0 : T.byId[T.editing]; - R && !HK(T, R) && f.text.end(); + R && !HK(T, R) && d.text.end(); const M = T.draft; - (M && "ids" in M ? M.ids : M && "id" in M ? [M.id] : []).some((B) => T.byId[B] && !Ii(T, T.byId[B])) && t.store.commit({ type: "cancel" }); + (M && "ids" in M ? M.ids : M && "id" in M ? [M.id] : []).some((_) => T.byId[_] && !Ii(T, T.byId[_])) && t.store.commit({ type: "cancel" }); }); const g = b0e(e, t); k0e(t); @@ -42481,18 +42512,18 @@ function V0e(e) { e, t, l, - d, - u, f, + u, + d, p - ), N = v0e(e, t), w = m0e(e, t, l), y = S0e(e, t, u, N, w), x = w0e(e, t, l), A = M0e(e, t), b = Wbe(e, t), E = zbe(e, t, b, p), I = tu("annotation", [ + ), N = v0e(e, t), w = m0e(e, t, l), y = S0e(e, t, u, N, w), x = w0e(e, t, l), A = M0e(e, t), b = Wbe(e, t), E = zbe(e, t, b, p), I = nu("annotation", [ c.api, l.api, u.api, S.api, i.api, a.api, - f.api, + d.api, g.api, p.api, m.api, @@ -42509,7 +42540,7 @@ function V0e(e) { selection: k.selection, draft: w.draft, text: { - ...f.text, + ...d.text, getEditing: l.getEditing, toggleFormat: k.toggleFormat }, @@ -42553,16 +42584,16 @@ const $0e = (e) => ({ token: _n, scope: "document", requires: [Cn], - optional: [ja, Lr, Wo, Xa], + optional: [ja, Lr, qo, Xa], state: rwe, settings: { defaults: lce, registered: e, whole: ["chrome.marquee"] }, create: V0e }); function D2(e) { - const [t] = De(() => sse()); + const [t] = je(() => sse()); Ke(() => () => t.release(), [t]), Ke(() => t.mount(e)); } -const U0e = wo(Qae), wz = jm(vt), w5 = Number.parseInt(Are, 10) >= 19 ? { inert: !0 } : { inert: "true" }; +const U0e = vo(Qae), wz = Fm(vt), w5 = Number.parseInt(Are, 10) >= 19 ? { inert: !0 } : { inert: "true" }; function vz({ shapes: e }) { return D2(yie(e)), /* @__PURE__ */ P(nt, { children: Az(e) }); } @@ -42591,7 +42622,7 @@ function Az(e) { ); } function z0e({ children: e, gap: t = 15, placement: n = "top" }) { - const { projector: r } = C9(), o = zt( + const { projector: r } = C9(), o = Gt( _n, (s) => { const i = s.selection.getAnchor(); @@ -42621,7 +42652,7 @@ function W0e({ gap: t = 16, placement: n = "right" }) { - const r = zt( + const r = Gt( vt, (s) => s.selection.getRotationAnchor(), null, @@ -42643,8 +42674,8 @@ function W0e({ padding: "2px 6px", fontFamily: yv("font-mono"), fontSize: 12, - background: pt("readout-background", o.background), - color: pt("readout-color", o.color) + background: gt("readout-background", o.background), + color: gt("readout-color", o.color) }, children: [ r.angle, @@ -42741,7 +42772,7 @@ function Q0e({ page: e }) { const t = wt( _n, (a) => a.getImageGhost(e.ref) - ), n = t?.preview ?? null, [r, o] = De(null), s = t ? yz(t.box.width * e.transform.renderScale) : 0; + ), n = t?.preview ?? null, [r, o] = je(null), s = t ? yz(t.box.width * e.transform.renderScale) : 0; if (Ke(() => { if (!n || !s) { o(null); @@ -42749,7 +42780,7 @@ function Q0e({ page: e }) { } return Bie(() => n(s), o); }, [n, s]), !t || !r) return null; - const i = zo(t.box, e.transform); + const i = Wo(t.box, e.transform); return /* @__PURE__ */ P( "img", { @@ -42776,7 +42807,7 @@ function Q0e({ page: e }) { ); } function Sz() { - const e = wz((r) => r.chrome), t = nu((r) => r.accent), n = ft(() => Aie(e, t), [e, t]); + const e = wz((r) => r.chrome), t = ru((r) => r.accent), n = ft(() => Aie(e, t), [e, t]); return { chrome: e, painted: n }; } function X0e({ @@ -42805,29 +42836,29 @@ function Z0e({ }) { const n = e.transform.viewScale, r = e.transform.rotation, o = e.transform.zoom, s = wt( _n, - (f) => f.listChromeNodes(e.ref, n, r, o), + (d) => d.listChromeNodes(e.ref, n, r, o), pi - ), { chrome: i, painted: a } = Sz(), c = t?.Handle, l = t?.RotationHandle, u = [], d = Sie(s, e.transform).map((f, h) => { - switch (f.kind) { + ), { chrome: i, painted: a } = Sz(), c = t?.Handle, l = t?.RotationHandle, u = [], f = Sie(s, e.transform).map((d, h) => { + switch (d.kind) { case "handle": return c ? (u.push( /* @__PURE__ */ P( c, { - at: f.at, + at: d.at, size: i.handles.size, - rotation: f.rotation, - kind: f.role, - active: f.active + rotation: d.rotation, + kind: d.role, + active: d.active }, h ) ), null) : /* @__PURE__ */ P( X0e, { - at: f.at, + at: d.at, size: i.handles.size, - rotation: f.rotation, + rotation: d.rotation, shape: i.handles.shape, style: a.handle }, @@ -42837,19 +42868,19 @@ function Z0e({ return /* @__PURE__ */ P( "line", { - x1: f.from.x, - y1: f.from.y, - x2: f.to.x, - y2: f.to.y, + x1: d.from.x, + y1: d.from.y, + x2: d.to.x, + y2: d.to.y, shapeRendering: "crispEdges", style: a.guide }, h ); case "turned-outline": - return /* @__PURE__ */ P("polygon", { points: f.points, fill: "none", style: a.outline }, h); + return /* @__PURE__ */ P("polygon", { points: d.points, fill: "none", style: a.outline }, h); case "rotation-guides": - return /* @__PURE__ */ P("g", { children: f.lines.map((g, p) => /* @__PURE__ */ P( + return /* @__PURE__ */ P("g", { children: d.lines.map((g, p) => /* @__PURE__ */ P( "line", { x1: g.from.x, @@ -42866,8 +42897,8 @@ function Z0e({ /* @__PURE__ */ P( l, { - at: f.at, - from: f.from, + at: d.at, + from: d.from, size: i.rotationHandle.size, rotation: 0, active: !1 @@ -42878,10 +42909,10 @@ function Z0e({ i.rotationHandle.stalk && /* @__PURE__ */ P( "line", { - x1: f.from.x, - y1: f.from.y, - x2: f.at.x, - y2: f.at.y, + x1: d.from.x, + y1: d.from.y, + x2: d.at.x, + y2: d.at.y, strokeWidth: 1, style: { stroke: a.rotationHandle.stroke } } @@ -42889,8 +42920,8 @@ function Z0e({ /* @__PURE__ */ P( "circle", { - cx: f.at.x, - cy: f.at.y, + cx: d.at.x, + cy: d.at.y, r: i.rotationHandle.size / 2, strokeWidth: 1.5, style: a.rotationHandle @@ -42903,10 +42934,10 @@ function Z0e({ return /* @__PURE__ */ P( "rect", { - x: f.box.left, - y: f.box.top, - width: f.box.width, - height: f.box.height, + x: d.box.left, + y: d.box.top, + width: d.box.width, + height: d.box.height, strokeWidth: 1, strokeDasharray: "4 3", style: a.marquee @@ -42917,10 +42948,10 @@ function Z0e({ return /* @__PURE__ */ P( "rect", { - x: f.box.left, - y: f.box.top, - width: f.box.width, - height: f.box.height, + x: d.box.left, + y: d.box.top, + width: d.box.width, + height: d.box.height, fill: "none", style: a.outline }, @@ -42929,12 +42960,12 @@ function Z0e({ } }); return /* @__PURE__ */ P(nt, { children: [ - /* @__PURE__ */ P("svg", { style: { position: "absolute", inset: 0, overflow: "visible", pointerEvents: "none" }, children: d }), + /* @__PURE__ */ P("svg", { style: { position: "absolute", inset: 0, overflow: "visible", pointerEvents: "none" }, children: f }), u.length > 0 && /* @__PURE__ */ P("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: u }) ] }); } function eve(e, t) { - const n = bt(_n), [r, o] = De(null), [s] = De(() => Eie()); + const n = bt(_n), [r, o] = je(null), [s] = je(() => Eie()); return Ke( () => s.follow(r, n, e, t), [s, n, r, e, t] @@ -42949,7 +42980,7 @@ function tve({ item: e, page: t }) { function nve(e, t, n) { const r = Re(t); r.current = t; - const [, o] = De(0); + const [, o] = je(0); Ke(() => { if (!n) return; const s = Oie(e, n, () => r.current()); @@ -42957,9 +42988,9 @@ function nve(e, t, n) { }, [e, n]); } function rve({ renderers: e, components: t } = {}) { - const n = qo(), r = bt(_n); - zt(yr, (v) => v.getActiveToolId(), ""); - const o = Rt(yr), s = n.transform.zoom, i = n.transform.rotation, a = nu((v) => v.accent), c = wt( + const n = Go(), r = bt(_n); + Gt(yr, (v) => v.getActiveToolId(), ""); + const o = Bt(yr), s = n.transform.zoom, i = n.transform.rotation, a = ru((v) => v.accent), c = wt( _n, (v) => v.listPageItems(n.ref, { zoom: s, rotation: i }), pi @@ -42967,8 +42998,8 @@ function rve({ renderers: e, components: t } = {}) { _n, (v) => v.listTextItems(n.ref, { zoom: s, rotation: i }), pi - ), [u, d] = De(null), [f] = De(KU); - Ke(() => () => f.release(), [f]), nve(r, () => o?.getActiveToolId() ?? "", e), M9(n.ref, "annotations"); + ), [u, f] = je(null), [d] = je(KU); + Ke(() => () => d.release(), [d]), nve(r, () => o?.getActiveToolId() ?? "", e), M9(n.ref, "annotations"); const h = Re(e); e && h.current && e !== h.current && pi(e, h.current) && bv( "annotation-renderers-inline", @@ -42977,19 +43008,19 @@ function rve({ renderers: e, components: t } = {}) { const g = wt( _n, (v) => v.getAppearanceEpoch(n.ref) - ), p = zt( + ), p = Gt( Pr, (v) => v.getAppearanceScale(n.transform.renderScale), n.transform.renderScale ); Ke( () => HU( - f, + d, (v) => r.renderAppearances(n.ref, p, v), oe, - d + f ), - [f, r, n.ref, p, g] + [d, r, n.ref, p, g] ); const m = Tie(l, oe); return /* @__PURE__ */ P("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: [ @@ -43095,7 +43126,7 @@ function rve({ renderers: e, components: t } = {}) { } const ove = qoe; function sve(e = ove) { - const t = Rt(vt); + const t = Bt(vt); Ke(() => { if (t) return Goe( @@ -43113,7 +43144,7 @@ function ive() { } const ave = {}; function cve(e) { - return zt( + return Gt( vt, (t) => t.tools.getDefaults(e), ave @@ -43121,7 +43152,7 @@ function cve(e) { } const lve = { properties: [], values: {}, mixed: [] }; function _De(e) { - return zt( + return Gt( vt, (t) => e === void 0 ? t.selection.getProperties() : t.tools.getProperties(e), lve @@ -43132,16 +43163,16 @@ function LDe() { } const uve = [], dve = []; function DDe() { - const e = ar(), t = zt( + const e = cr(), t = Gt( vt, (r) => r.comments.listThreads(), dve - ), n = en( + ), n = nn( (r) => e ? r.documents.listPages(e) : uve ); return ft(() => Die(t, n), [t, n]); } -const Qn = sn("stamp", { +const Qn = an("stamp", { hint: "add stampPlugin() from '@embedpdf/plugin-stamp' to your plugins list" }); function fve(e) { @@ -43200,18 +43231,18 @@ const yve = { fonts: [], previewWidth: 256, dynamic: !0 -}, xt = (e, t) => new re(e, "stamp", t), Rs = (e, t) => xt("not-found", `unknown ${e} '${t}'`), Cz = (e, t) => new re("permission-denied", "stamp", `${t} requires ${e}`, { +}, Et = (e, t) => new te(e, "stamp", t), Rs = (e, t) => Et("not-found", `unknown ${e} '${t}'`), Cz = (e, t) => new te("permission-denied", "stamp", `${t} requires ${e}`, { permission: e }), bn = (e) => { if (e?.aborted) - throw new re("operation-cancelled", "stamp", "operation cancelled", { + throw new te("operation-cancelled", "stamp", "operation cancelled", { cause: e.reason }); -}, Wr = (e) => async (...t) => { +}, qr = (e) => async (...t) => { try { return await e(...t); } catch (n) { - throw qe("stamp", n); + throw ze("stamp", n); } }; function bve(e, { @@ -43220,58 +43251,58 @@ function bve(e, { ghosts: r, targets: o }) { - const { binaries: s, libraryBinaries: i } = t, { ghostProvider: a } = r, { documentIdOf: c } = o, l = (f) => { + const { binaries: s, libraryBinaries: i } = t, { ghostProvider: a } = r, { documentIdOf: c } = o, l = (d) => { const h = e.state.get(); - return (f?.libraryId ? [f.libraryId] : h.libraryOrder).flatMap( + return (d?.libraryId ? [d.libraryId] : h.libraryOrder).flatMap( (p) => (h.libraries[p]?.assetIds ?? []).map((m) => h.assets[m]) ).filter( - (p) => p != null && (!f?.kind || p.kind === f.kind) && (!f?.category || (p.categories ?? []).includes(f.category)) + (p) => p != null && (!d?.kind || p.kind === d.kind) && (!d?.category || (p.categories ?? []).includes(d.category)) ); - }, u = (f) => { - const h = c(f); + }, u = (d) => { + const h = c(d); return h ? e.tryForDocument(vt, h)?.canCreate() ?? !1 : !1; - }, d = (f) => { - const h = c(f); - return h !== null && e.get(It).canDownload(h); + }, f = (d) => { + const h = c(d); + return h !== null && e.get(Pt).canDownload(h); }; return { canPlace: u, - canCreateFromAnnotations: d, + canCreateFromAnnotations: f, api: { - listLibraries: (f) => { - const h = e.state.get(), g = f?.kind === void 0 ? null : new Set(typeof f.kind == "string" ? [f.kind] : f.kind); + listLibraries: (d) => { + const h = e.state.get(), g = d?.kind === void 0 ? null : new Set(typeof d.kind == "string" ? [d.kind] : d.kind); return h.libraryOrder.map((p) => h.libraries[p]).filter( (p) => p != null && (g === null || g.has(p.kind)) ); }, - getLibrary: (f) => e.state.get().libraries[f] ?? null, + getLibrary: (d) => e.state.get().libraries[d] ?? null, listAssets: l, - getAsset: (f) => e.state.get().assets[f] ?? null, - getAssetPreview: (f) => s.get(f)?.preview ?? null, - renderAssetPreview: Wr( - async (f, { width: h, signal: g }) => { + getAsset: (d) => e.state.get().assets[d] ?? null, + getAssetPreview: (d) => s.get(d)?.preview ?? null, + renderAssetPreview: qr( + async (d, { width: h, signal: g }) => { bn(g); - const p = s.get(f); - if (!p) throw Rs("asset", f); + const p = s.get(d); + if (!p) throw Rs("asset", d); const m = await e.cancellable( g, - a(p.bytes, p.preview, f)(h) + a(p.bytes, p.preview, d)(h) ); return m ? { bytes: m.bytes, mimeType: m.mimeType ?? "image/png" } : null; } ), - getAssetBytes: (f) => { - const h = s.get(f)?.bytes; + getAssetBytes: (d) => { + const h = s.get(d)?.bytes; return h ? new Uint8Array(h) : null; }, - exportLibrary: async (f, h) => { + exportLibrary: async (d, h) => { bn(h?.signal); - const g = i.get(f); - if (!g) throw Rs("library", f); + const g = i.get(d); + if (!g) throw Rs("library", d); return new Uint8Array(g); }, canPlace: u, - canCreateFromAnnotations: d, + canCreateFromAnnotations: f, canImport: n.canImport } }; @@ -43282,43 +43313,43 @@ function vve(e) { const t = e.settings(); let n = null, r = null; const o = [], s = () => { - const d = t.get().assetEngine; - if (r?.from !== d) { - const f = d ? typeof d == "function" ? d() : d : e.engine; - typeof d == "function" && o.push(f), r = { from: d, engine: f }, n = null; + const f = t.get().assetEngine; + if (r?.from !== f) { + const d = f ? typeof f == "function" ? f() : f : e.engine; + typeof f == "function" && o.push(d), r = { from: f, engine: d }, n = null; } return r.engine; - }, i = /* @__PURE__ */ new WeakMap(), a = async (d) => { - const f = t.get().fonts.find((m) => m.key === d); - if (!f) return; + }, i = /* @__PURE__ */ new WeakMap(), a = async (f) => { + const d = t.get().fonts.find((m) => m.key === f); + if (!d) return; const h = await s(); if (!C0(h)) return; let g = i.get(h); g || i.set(h, g = /* @__PURE__ */ new Map()); - let p = g.get(d); + let p = g.get(f); if (!p) { const m = g; - p = f.load().then((v) => h.fonts.register({ key: d, data: v })).then(() => { - }), m.set(d, p), p.catch(() => m.delete(d)); + p = d.load().then((v) => h.fonts.register({ key: f, data: v })).then(() => { + }), m.set(f, p), p.catch(() => m.delete(f)); } return p; - }, c = async (d) => { - const f = await s(); - if (!C0(f)) - throw n !== !1 && (n = !1, e.notify()), xt( + }, c = async (f) => { + const d = await s(); + if (!C0(d)) + throw n !== !1 && (n = !1, e.notify()), Et( "unsupported", t.get().assetEngine ? "the stamp plugin's assetEngine must be a local engine (createLocalEngine())" : "importing a library PDF needs a local engine, and this viewer's engine is a cloud engine. Pass stampPlugin({ assetEngine: () => import('@embedpdf/engine').then((module) => module.createLocalEngine()) }): it loads lazily, on first import." ); - return f.open({ kind: "bytes", id: Iz("stamp-import"), bytes: d }, { scope: ["*"] }); - }, l = (d) => { - if (d.source.kind !== "bytes") - throw xt( + return d.open({ kind: "bytes", id: Iz("stamp-import"), bytes: f }, { scope: ["*"] }); + }, l = (f) => { + if (f.source.kind !== "bytes") + throw Et( "unsupported", "the asset engine returned a URL-sourced render; asset engines must be local" ); - return { bytes: d.source.bytes, mimeType: d.mimeType }; - }, u = async (d) => l( - await d.render.image({ + return { bytes: f.source.bytes, mimeType: f.mimeType }; + }, u = async (f) => l( + await f.render.image({ viewport: { kind: "width", width: t.get().previewWidth }, background: "transparent", includeAnnotations: !0, @@ -43327,8 +43358,8 @@ function vve(e) { ); return e.cleanup(() => { r = null; - for (const d of o.splice(0)) - Promise.resolve(d).then((f) => f.destroy()).catch(() => { + for (const f of o.splice(0)) + Promise.resolve(f).then((d) => d.destroy()).catch(() => { }); }), { openAssetDocument: c, @@ -43346,15 +43377,15 @@ function kve(e) { }), { binaries: t, libraryBinaries: n, ghostRenders: o, mutateLibrary: r }; } function Ave(e) { - const t = () => e.get(It), n = (s) => s ?? t().getActiveId(); + const t = () => e.get(Pt), n = (s) => s ?? t().getActiveId(); return { documentIdOf: n, targetOf: (s) => { const i = n(s?.documentId); - if (!i) throw xt("not-ready", "no document is open"); + if (!i) throw Et("not-ready", "no document is open"); return i; }, pageOf: (s, i) => { const a = t().getPage(i, s); if (!a) - throw xt( + throw Et( "not-found", `no page ${typeof i == "number" ? i : i.objectNumber} in document '${s}'` ); @@ -43397,7 +43428,7 @@ function xve({ const c = a ? n.get(a) ?? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Map(); return a && n.set(a, c), (l) => { let u = c.get(l); - return u || (u = r(s, l).catch((d) => (globalThis.console?.warn("[stamp] ghost render failed, using the thumbnail:", d), i)), c.set(l, u)), u; + return u || (u = r(s, l).catch((f) => (globalThis.console?.warn("[stamp] ghost render failed, using the thumbnail:", f), i)), c.set(l, u)), u; }; } }; } @@ -43484,106 +43515,106 @@ function Tve(e, { assetEngine: r, targets: o }, { resolveAssetSource: s }, { createLibrary: i }, { canCreateFromAnnotations: a }) { - const { libraryChanged: c, assetCreated: l, assetUpdated: u, assetDeleted: d } = t, { binaries: f, libraryBinaries: h, ghostRenders: g, mutateLibrary: p } = n, { openAssetDocument: m, renderThumbnail: v } = r, { targetOf: S, pageOf: C } = o, k = async (b, E) => { + const { libraryChanged: c, assetCreated: l, assetUpdated: u, assetDeleted: f } = t, { binaries: d, libraryBinaries: h, ghostRenders: g, mutateLibrary: p } = n, { openAssetDocument: m, renderThumbnail: v } = r, { targetOf: S, pageOf: C } = o, k = async (b, E) => { const I = E?.signal; if (bn(I), b.libraryId && !e.state.get().libraries[b.libraryId]) throw Rs("library", b.libraryId); - const O = await e.cancellable(I, s(b)), T = im(O.bytes); + const O = await e.cancellable(I, s(b)), T = am(O.bytes); if (!T) - throw xt("invalid-input", "asset source must be PNG, JPEG, or single-page PDF bytes"); + throw Et("invalid-input", "asset source must be PNG, JPEG, or single-page PDF bytes"); const R = T.mimeType === "application/pdf", M = b.name ?? hve(), F = b.label ?? M; if (M.length === 0 || M.includes("=")) - throw xt( + throw Et( "invalid-input", `invalid stamp identifier '${M}': must be non-empty and contain no '='` ); - const B = b.size ?? ("width" in T ? { width: T.width, height: T.height } : null); - if (!R && (!B || B.width <= 0 || B.height <= 0)) - throw xt( + const _ = b.size ?? ("width" in T ? { width: T.width, height: T.height } : null); + if (!R && (!_ || _.width <= 0 || _.height <= 0)) + throw Et( "invalid-input", "a raster asset needs a positive `size` (its page size in points)" ); let $ = null; if (b.preview) { - const _ = await Vo(b.preview); + const B = await $o(b.preview); $ = { - bytes: new Uint8Array(_.bytes), - mimeType: _.mimeType ?? "image/png" + bytes: new Uint8Array(B.bytes), + mimeType: B.mimeType ?? "image/png" }; } const D = b.libraryId ?? (await i(F, { signal: I })).library.id; return p( D, async () => { - const _ = e.state.get().libraries[D]; - if (!_) - throw xt("not-found", `library '${D}' no longer exists`); - const L = xz(_.id, M); + const B = e.state.get().libraries[D]; + if (!B) + throw Et("not-found", `library '${D}' no longer exists`); + const L = xz(B.id, M); if (e.state.get().assets[L]) - throw xt( + throw Et( "invalid-input", - `library '${_.name}' already has a stamp named '${M}'` + `library '${B.name}' already has a stamp named '${M}'` ); - const j = h.get(_.id); + const j = h.get(B.id); if (!j) - throw xt( + throw Et( "operation-failed", - `canonical bytes are missing for library '${_.id}'` + `canonical bytes are missing for library '${B.id}'` ); const H = await e.cancellable(I, m(j)); let Y; try { - let ue; + let le; if (R) { - const te = await H.pages.insert(new Uint8Array(O.bytes)); - if (te.insertedPages.length !== 1) - throw xt("invalid-input", "a library asset must be a single-page PDF"); - ue = te.insertedPages[0]; + const ee = await H.pages.insert(new Uint8Array(O.bytes)); + if (ee.insertedPages.length !== 1) + throw Et("invalid-input", "a library asset must be a single-page PDF"); + le = ee.insertedPages[0]; } else { if (!H.pages.flatten) - throw xt( + throw Et( "unsupported", "raster assets need an asset engine with pages.flatten" ); - if (ue = (await H.pages.insertBlank({ size: B })).insertedPages[0], await H.page(ue).annotations.create( + if (le = (await H.pages.insertBlank({ size: _ })).insertedPages[0], await H.page(le).annotations.create( { subtype: "stamp", - box: { x: 0, y: 0, width: B.width, height: B.height }, + box: { x: 0, y: 0, width: _.width, height: _.height }, fit: "fill" }, { resources: { appearance: new Uint8Array(O.bytes) } } - ), (await H.pages.flatten([ue], { usage: "display" })).results.some(({ status: Te }) => Te !== "applied")) - throw xt("operation-failed", "flattening the raster into its page failed"); + ), (await H.pages.flatten([le], { usage: "display" })).results.some(({ status: Te }) => Te !== "applied")) + throw Et("operation-failed", "flattening the raster into its page failed"); } - const le = (await H.pages.list()).pages.find( - (te) => te.ref.objectNumber === ue.objectNumber - ), pe = H.page(ue); - if (!le) - throw xt("operation-failed", "the new page is missing from the library layout"); - await H.pages.setName({ name: sA(M, F), page: ue }); - const ge = { + const ie = (await H.pages.list()).pages.find( + (ee) => ee.ref.objectNumber === le.objectNumber + ), pe = H.page(le); + if (!ie) + throw Et("operation-failed", "the new page is missing from the library layout"); + await H.pages.setName({ name: sA(M, F), page: le }); + const ve = { id: L, - libraryId: _.id, + libraryId: B.id, kind: b.kind ?? "stamp", name: M, label: F, - size: { width: le.size.width, height: le.size.height }, - page: ue, + size: { width: ie.size.width, height: ie.size.height }, + page: le, ...b.subject !== void 0 ? { subject: b.subject } : {}, ...b.categories !== void 0 ? { categories: b.categories } : {} }; await pe.pieceInfo.update( o0, - uO(ge.kind, { subject: ge.subject, categories: ge.categories }) + uO(ve.kind, { subject: ve.subject, categories: ve.categories }) ); - const Me = await H.pages.extract([ue]), Be = $ ?? await v(pe); - Y = { asset: ge, bytes: Me, preview: Be, canonical: await H.download() }; + const _e = await H.pages.extract([le]), Be = $ ?? await v(pe); + Y = { asset: ve, bytes: _e, preview: Be, canonical: await H.download() }; } finally { await H.close(); } - return bn(I), h.set(_.id, Y.canonical), f.set(Y.asset.id, { bytes: Y.bytes, preview: Y.preview }), e.state.update(Nz, Y.asset), c.emit({ libraryId: _.id, type: "asset-created" }), l.emit({ + return bn(I), h.set(B.id, Y.canonical), d.set(Y.asset.id, { bytes: Y.bytes, preview: Y.preview }), e.state.update(Nz, Y.asset), c.emit({ libraryId: B.id, type: "asset-created" }), l.emit({ assetId: Y.asset.id, - libraryId: _.id, + libraryId: B.id, asset: Y.asset }), { asset: Y.asset }; }, @@ -43596,9 +43627,9 @@ function Tve(e, { if (!a(R)) throw Cz("doc.download", "stamp.createAssetFromAnnotations"); const M = e.documentHandle(R); - if (!M) throw xt("not-found", `document '${R}' is not open`); - const F = M.page(C(R, b).ref), B = await e.cancellable(T, F.annotations.exportAppearance([...E])); - return k({ ...I, source: B }, { signal: T }); + if (!M) throw Et("not-found", `document '${R}' is not open`); + const F = M.page(C(R, b).ref), _ = await e.cancellable(T, F.annotations.exportAppearance([...E])); + return k({ ...I, source: _ }, { signal: T }); }, w = async (b, E) => { const I = E?.signal; bn(I); @@ -43613,18 +43644,18 @@ function Tve(e, { if (!R) return; const M = h.get(R.id); if (!M) - throw xt( + throw Et( "operation-failed", `canonical bytes are missing for library '${R.id}'` ); const F = await e.cancellable(I, m(M)); - let B; + let _; try { - await F.pages.delete([T.page]), B = await F.download(); + await F.pages.delete([T.page]), _ = await F.download(); } finally { await F.close(); } - bn(I), h.set(R.id, B), f.delete(b), g.delete(b), e.state.update(Rve, b), c.emit({ libraryId: R.id, type: "asset-deleted" }), d.emit({ assetId: b, libraryId: R.id, asset: null }); + bn(I), h.set(R.id, _), d.delete(b), g.delete(b), e.state.update(Rve, b), c.emit({ libraryId: R.id, type: "asset-deleted" }), f.emit({ assetId: b, libraryId: R.id, asset: null }); }, I ); @@ -43638,30 +43669,30 @@ function Tve(e, { async () => { const R = e.state.get().assets[b], M = R ? e.state.get().libraries[R.libraryId] : void 0; if (!R || !M) throw Rs("asset", b); - const { subject: F, ...B } = R, $ = { - ...E.subject === null ? B : R, + const { subject: F, ..._ } = R, $ = { + ...E.subject === null ? _ : R, ...E.label !== void 0 ? { label: E.label } : {}, ...E.categories !== void 0 ? { categories: E.categories } : {}, ...E.subject !== void 0 && E.subject !== null ? { subject: E.subject } : {} }, D = h.get(M.id); if (!D) - throw xt( + throw Et( "operation-failed", `canonical bytes are missing for library '${M.id}'` ); - const _ = await e.cancellable(O, m(D)); + const B = await e.cancellable(O, m(D)); let L; try { - $.label !== R.label && await _.pages.setName({ + $.label !== R.label && await B.pages.setName({ name: sA(R.name, $.label), page: R.page, replace: sA(R.name, R.label) - }), await _.page(R.page).pieceInfo.update( + }), await B.page(R.page).pieceInfo.update( o0, uO($.kind, { subject: $.subject, categories: $.categories }) - ), L = await _.download(); + ), L = await B.download(); } finally { - await _.close(); + await B.close(); } return bn(O), h.set(M.id, L), e.state.update(Pve, $), c.emit({ libraryId: M.id, type: "asset-updated" }), u.emit({ assetId: $.id, libraryId: M.id, asset: $ }), { asset: $ }; }, @@ -43670,7 +43701,7 @@ function Tve(e, { }, x = async (b, E, I) => { const O = I?.signal; bn(O); - const T = e.state.get().assets[b], R = f.get(b); + const T = e.state.get().assets[b], R = d.get(b); if (!T || !R) throw Rs("asset", b); if (E.libraryId === T.libraryId) return { asset: T }; const M = await k( @@ -43688,7 +43719,7 @@ function Tve(e, { return await w(b), M; }, A = async (b, E) => { bn(E?.signal); - const I = e.state.get().assets[b], O = f.get(b); + const I = e.state.get().assets[b], O = d.get(b); if (!I || !O) throw Rs("asset", b); return k( { @@ -43705,12 +43736,12 @@ function Tve(e, { }; return { api: { - createAsset: Wr(k), - createAssetFromAnnotations: Wr(N), - updateAsset: Wr(y), - deleteAsset: Wr(w), - moveAsset: Wr(x), - duplicateAsset: Wr(A) + createAsset: qr(k), + createAssetFromAnnotations: qr(N), + updateAsset: qr(y), + deleteAsset: qr(w), + moveAsset: qr(x), + duplicateAsset: qr(A) } }; } @@ -43745,7 +43776,7 @@ ${n} %%EOF `, F1 = new TextEncoder().encode(e), new Uint8Array(F1); } -const fh = (e, t) => { +const ph = (e, t) => { const n = e[t]; return n?.type === "string" && n.value.length > 0 ? n.value : void 0; }, zD = (e, t) => { @@ -43774,7 +43805,7 @@ const fh = (e, t) => { return n.add(r), r; }; function Bve(e, { events: t, binaries: n, assetEngine: r }) { - const { libraryChanged: o, libraryCreated: s, libraryUpdated: i, libraryDeleted: a, assetCreated: c } = t, { binaries: l, libraryBinaries: u, ghostRenders: d, mutateLibrary: f } = n, { openAssetDocument: h, renderThumbnail: g } = r, p = async (k, N) => { + const { libraryChanged: o, libraryCreated: s, libraryUpdated: i, libraryDeleted: a, assetCreated: c } = t, { binaries: l, libraryBinaries: u, ghostRenders: f, mutateLibrary: d } = n, { openAssetDocument: h, renderThumbnail: g } = r, p = async (k, N) => { const w = N?.signal; bn(w); const y = N?.kind ?? v5, x = new Set(Object.keys(e.state.get().libraries)), A = qD(N?.id, "stamp-lib", x), b = await e.cancellable(w, h(Oz())); @@ -43799,9 +43830,9 @@ function Bve(e, { events: t, binaries: n, assetEngine: r }) { }, m = async (k, N) => { const w = N?.signal; bn(w); - const y = await e.cancellable(w, Vo(k)); - if (im(y.bytes)?.mimeType !== "application/pdf") - throw xt( + const y = await e.cancellable(w, $o(k)); + if (am(y.bytes)?.mimeType !== "application/pdf") + throw Et( "invalid-input", "importLibrary needs PDF bytes (use createAsset for a raster image)" ); @@ -43810,53 +43841,53 @@ function Bve(e, { events: t, binaries: n, assetEngine: r }) { try { const E = await A.pages.list(); if (E.pageCount === 0) - throw xt( + throw Et( "invalid-input", "a canonical stamp library PDF must contain at least one page" ); const I = new Map( E.pages.map((Y) => [Y.ref.objectNumber, Y]) ), O = (await A.pieceInfo.get(j1))?.entries ?? {}, T = new Set(Object.keys(e.state.get().libraries)), R = qD( - N?.id ?? fh(O, "Id"), + N?.id ?? ph(O, "Id"), "stamp-lib", T - ), M = await A.metadata.get(), F = (M.title && M.title.length > 0 ? M.title : void 0) ?? fh(O, "Name") ?? N?.name ?? "Stamps"; + ), M = await A.metadata.get(), F = (M.title && M.title.length > 0 ? M.title : void 0) ?? ph(O, "Name") ?? N?.name ?? "Stamps"; M.title || await A.metadata.update({ title: F }); - const B = N?.categories ?? WD(O, "Categories"), $ = fh(O, "Locale"), D = N?.libraryKind ?? gve(zD(O, "Kind")), _ = (E.namedPages ?? []).filter( + const _ = N?.categories ?? WD(O, "Categories"), $ = ph(O, "Locale"), D = N?.libraryKind ?? gve(zD(O, "Kind")), B = (E.namedPages ?? []).filter( (Y) => Y.target.kind === "page" ), L = (E.namedPages ?? []).filter((Y) => Y.target.kind !== "page"); L.length > 0 && globalThis.console?.warn( `[stamp] library '${F}' carries ${L.length} hidden-template or dangling registration(s); they are not stamps and were ignored` ); let j; - if (_.length > 0) { + if (B.length > 0) { const Y = /* @__PURE__ */ new Set(); - j = _.map((ue) => { - const { name: le, label: pe } = fve(ue.name); - if (!le) - throw xt( + j = B.map((le) => { + const { name: ie, label: pe } = fve(le.name); + if (!ie) + throw Et( "invalid-input", - `library '${F}': empty stamp identifier in key '${ue.name}'` + `library '${F}': empty stamp identifier in key '${le.name}'` ); - if (Y.has(le)) - throw xt( + if (Y.has(ie)) + throw Et( "invalid-input", - `library '${F}': duplicate stamp identifier '${le}'` + `library '${F}': duplicate stamp identifier '${ie}'` ); - Y.add(le); - const ge = I.get(ue.target.page.objectNumber); - return { page: ge.ref, index: ge.index, name: le, label: pe }; - }), j.sort((ue, le) => ue.index - le.index); + Y.add(ie); + const ve = I.get(le.target.page.objectNumber); + return { page: ve.ref, index: ve.index, name: ie, label: pe }; + }), j.sort((le, ie) => le.index - ie.index); } else { if (E.namedPages === void 0) - throw xt( + throw Et( "unsupported", "the asset engine reports no named-page registry; an engine with named pages is needed to import libraries" ); j = []; for (const Y of E.pages) { - const ue = (await A.page(Y.ref).pieceInfo.get(o0))?.entries, le = (ue && fh(ue, "Name")) ?? `Stamp${Y.index + 1}`, pe = (ue && fh(ue, "Subject")) ?? N?.assetName?.(Y.index) ?? le; - j.push({ page: Y.ref, index: Y.index, name: le, label: pe }); + const le = (await A.page(Y.ref).pieceInfo.get(o0))?.entries, ie = (le && ph(le, "Name")) ?? `Stamp${Y.index + 1}`, pe = (le && ph(le, "Subject")) ?? N?.assetName?.(Y.index) ?? ie; + j.push({ page: Y.ref, index: Y.index, name: ie, label: pe }); } for (const Y of j) await A.pages.setName({ @@ -43868,13 +43899,13 @@ function Bve(e, { events: t, binaries: n, assetEngine: r }) { j1, PC(R, { kind: D, - categories: B, + categories: _, locale: $ }) ); const H = []; for (const Y of j) { - const ue = A.page(Y.page), le = (await ue.pieceInfo.get(o0))?.entries ?? {}, pe = N?.assetKind ?? Mve(zD(le, "Kind")) ?? "stamp", ge = fh(le, "SubjectOverride"), Me = WD(le, "Categories"), Be = I.get(Y.page.objectNumber), te = { + const le = A.page(Y.page), ie = (await le.pieceInfo.get(o0))?.entries ?? {}, pe = N?.assetKind ?? Mve(zD(ie, "Kind")) ?? "stamp", ve = ph(ie, "SubjectOverride"), _e = WD(ie, "Categories"), Be = I.get(Y.page.objectNumber), ee = { id: xz(R, Y.name), libraryId: R, kind: pe, @@ -43882,15 +43913,15 @@ function Bve(e, { events: t, binaries: n, assetEngine: r }) { label: Y.label, size: { width: Be.size.width, height: Be.size.height }, page: Y.page, - ...ge !== void 0 ? { subject: ge } : {}, - ...Me !== void 0 ? { categories: Me } : {} + ...ve !== void 0 ? { subject: ve } : {}, + ..._e !== void 0 ? { categories: _e } : {} }; - await ue.pieceInfo.update( + await le.pieceInfo.update( o0, - uO(pe, { subject: ge, categories: Me }) + uO(pe, { subject: ve, categories: _e }) ); const he = await A.pages.extract([Y.page]); - H.push({ asset: te, bytes: he, preview: await g(ue) }); + H.push({ asset: ee, bytes: he, preview: await g(le) }); } b = { library: { @@ -43898,7 +43929,7 @@ function Bve(e, { events: t, binaries: n, assetEngine: r }) { name: F, kind: D, ...$ ? { locale: $ } : {}, - categories: B, + categories: _, assetIds: [] }, canonicalBytes: await A.download(), @@ -43918,9 +43949,9 @@ function Bve(e, { events: t, binaries: n, assetEngine: r }) { const N = e.state.get().libraries[k]; if (N) for (const w of N.assetIds) - l.delete(w), d.delete(w); + l.delete(w), f.delete(w); u.delete(k), e.state.update(Ove, k); - }, S = (k, N) => f( + }, S = (k, N) => d( k, async () => { const w = e.state.get().libraries[k] !== void 0; @@ -43930,14 +43961,14 @@ function Bve(e, { events: t, binaries: n, assetEngine: r }) { ), C = async (k, N, w) => { const y = w?.signal; if (bn(y), !e.state.get().libraries[k]) throw Rs("library", k); - return f( + return d( k, async () => { const x = e.state.get().libraries[k]; if (!x) throw Rs("library", k); const A = u.get(k); if (!A) - throw xt("operation-failed", `canonical bytes are missing for library '${k}'`); + throw Et("operation-failed", `canonical bytes are missing for library '${k}'`); const b = { ...x, ...N.name !== void 0 ? { name: N.name } : {}, @@ -43964,24 +43995,24 @@ function Bve(e, { events: t, binaries: n, assetEngine: r }) { return { createLibrary: p, api: { - createLibrary: Wr(p), - updateLibrary: Wr(C), - importLibrary: Wr(m), - deleteLibrary: Wr(S) + createLibrary: qr(p), + updateLibrary: qr(C), + importLibrary: qr(m), + deleteLibrary: qr(S) } }; } const _ve = (e) => { const t = e.trim(); if (!/^#[0-9a-f]{6}$/i.test(t)) - throw xt("invalid-input", `mark color must be #rrggbb, got '${e}'`); + throw Et("invalid-input", `mark color must be #rrggbb, got '${e}'`); return t; }, GD = (e) => { const t = new ArrayBuffer(e.byteLength); return new Uint8Array(t).set(e), t; }, Lve = (e) => { if (!e.some((t) => t.length > 0)) - throw xt("invalid-input", "an ink mark needs at least one point"); + throw Et("invalid-input", "an ink mark needs at least one point"); return e.map((t) => t.map(({ x: n, y: r }) => ({ x: n, y: r }))); }, Dve = (e, t) => ({ x: 0, @@ -43995,11 +44026,11 @@ function jve({ assetEngine: e }) { const a = await t(Oz()); try { const l = (await a.pages.list()).pages[0]; - if (!l) throw xt("operation-failed", "the scratch document has no page"); - const u = a.page(l.ref), d = _ve(i.color ?? "#1d2b53"), f = i.kind === "ink" ? await u.annotations.create({ + if (!l) throw Et("operation-failed", "the scratch document has no page"); + const u = a.page(l.ref), f = _ve(i.color ?? "#1d2b53"), d = i.kind === "ink" ? await u.annotations.create({ subtype: "ink", inkList: Lve(i.strokes), - color: d, + color: f, strokeWidth: i.strokeWidth ?? 2 }) : await u.annotations.create({ subtype: "free-text", @@ -44010,10 +44041,10 @@ function jve({ assetEngine: e }) { textAlign: "center", verticalAlign: "middle", box: Dve(i.text, i.fontSize ?? 36), - fontColor: d, + fontColor: f, strokeWidth: 0 }); - return new Uint8Array(await u.annotations.exportAppearance([f.annotation.ref])); + return new Uint8Array(await u.annotations.exportAppearance([d.annotation.ref])); } finally { await a.close(); } @@ -44022,7 +44053,7 @@ function jve({ assetEngine: e }) { try { const l = await c.pages.list(), u = l.pages[a]; if (!u) - throw xt( + throw Et( "invalid-input", `the PDF has no page ${a} (${l.pageCount} pages)` ); @@ -44033,14 +44064,14 @@ function jve({ assetEngine: e }) { }; return { resolveAssetSource: async (i) => { if (i.source === void 0 == (i.mark === void 0)) - throw xt("invalid-input", "createAsset takes exactly one of `source` / `mark`"); - if (i.source !== void 0) return Vo(i.source); + throw Et("invalid-input", "createAsset takes exactly one of `source` / `mark`"); + if (i.source !== void 0) return $o(i.source); const a = i.mark; switch (a.kind) { case "image": - return Vo(a.source); + return $o(a.source); case "pdf": { - const c = await Vo(a.source); + const c = await $o(a.source); return a.pageIndex === void 0 ? c : { bytes: GD(await o(new Uint8Array(c.bytes), a.pageIndex)) }; @@ -44051,7 +44082,7 @@ function jve({ assetEngine: e }) { } } }; } -const bm = (e) => e.kind === "objectNumber" ? `obj:${e.objectNumber}` : `fqn:${e.name}`, Ft = (e) => bm(e.ref), Pz = () => ({ +const wm = (e) => e.kind === "objectNumber" ? `obj:${e.objectNumber}` : `fqn:${e.name}`, Kt = (e) => wm(e.ref), Pz = () => ({ snapshot: null, byKey: {}, byName: {}, @@ -44063,42 +44094,42 @@ function k5(e, t = {}) { const n = {}, r = {}, o = {}, s = {}; return e.fields.forEach((i, a) => { var c; - n[Ft(i)] = a, r[c = i.name] ?? (r[c] = a); + n[Kt(i)] = a, r[c = i.name] ?? (r[c] = a); for (const l of i.widgets) l.objectNumber > 0 && (o[l.objectNumber] = a); }), e.widgets.forEach((i, a) => { i.ref.kind === "objectNumber" && (s[i.ref.objectNumber] = a); }), { snapshot: e, byKey: n, byName: r, byWidget: o, rowByWidget: s, pictureVersions: t }; } -const Yf = (e, t) => k5(t, e.pictureVersions); +const Xf = (e, t) => k5(t, e.pictureVersions); function Rz(e, t) { const n = {}; for (const [r, o] of Object.entries(e.pictureVersions)) n[Number(r)] = o + 1; for (const r of t.widgets) { - const o = El(r); + const o = Cl(r); o > 0 && (n[o] ?? (n[o] = 0)); } return k5(t, n); } const dO = (e, t) => e.pictureVersions[t] ?? 0; -function uo(e, t) { +function fo(e, t) { if (!e.snapshot || t.length === 0) return e; const n = e.snapshot.fields.slice(); for (const r of t) { - const o = e.byKey[Ft(r)]; + const o = e.byKey[Kt(r)]; o === void 0 ? n.push(r) : n[o] = r; } - return Yf(e, { ...e.snapshot, fields: n }); + return Xf(e, { ...e.snapshot, fields: n }); } -const El = (e) => e.ref.kind === "objectNumber" ? e.ref.objectNumber : 0; -function fo(e, t) { +const Cl = (e) => e.ref.kind === "objectNumber" ? e.ref.objectNumber : 0; +function ho(e, t) { if (!e.snapshot || t.length === 0) return e; - const n = new Map(t.map((o) => [El(o), o])), r = e.snapshot.widgets.map((o) => { - const s = n.get(El(o)); - return s && n.delete(El(o)), s ?? o; + const n = new Map(t.map((o) => [Cl(o), o])), r = e.snapshot.widgets.map((o) => { + const s = n.get(Cl(o)); + return s && n.delete(Cl(o)), s ?? o; }); - return Yf(e, { ...e.snapshot, widgets: [...r, ...n.values()] }); + return Xf(e, { ...e.snapshot, widgets: [...r, ...n.values()] }); } function Tz(e, t, n) { if (!e.snapshot) return e; @@ -44108,19 +44139,19 @@ function Tz(e, t, n) { n.map(oe), (o) => oe(o.ref) ); - return Yf(e, { ...e.snapshot, widgets: r }); + return Xf(e, { ...e.snapshot, widgets: r }); } -function wm(e, t) { +function vm(e, t) { if (!e.snapshot || t.length === 0) return e; - const n = new Set(t.map((o) => o.objectNumber)), r = e.snapshot.widgets.filter((o) => !n.has(El(o))); - return r.length === e.snapshot.widgets.length ? e : Yf(e, { ...e.snapshot, widgets: r }); + const n = new Set(t.map((o) => o.objectNumber)), r = e.snapshot.widgets.filter((o) => !n.has(Cl(o))); + return r.length === e.snapshot.widgets.length ? e : Xf(e, { ...e.snapshot, widgets: r }); } function Mz(e, t) { if (!e.snapshot) return e; const n = e.snapshot.fields.filter( (r) => t.kind === "objectNumber" ? !(r.ref.kind === "objectNumber" && r.ref.objectNumber === t.objectNumber) : r.name !== t.name ); - return n.length === e.snapshot.fields.length ? e : Yf(e, { ...e.snapshot, fields: n }); + return n.length === e.snapshot.fields.length ? e : Xf(e, { ...e.snapshot, fields: n }); } function Fve(e, t) { return Hve($ve(e, Vve(t)), t); @@ -44139,7 +44170,7 @@ function $ve(e, t) { if (o.objectNumber) n.add(o.objectNumber); else if (o.page) for (const s of e.snapshot?.widgets ?? []) - s.page.objectNumber === o.page.objectNumber && n.add(El(s)); + s.page.objectNumber === o.page.objectNumber && n.add(Cl(s)); if (n.size === 0) return e; const r = { ...e.pictureVersions }; for (const o of n) r[o] = (r[o] ?? 0) + 1; @@ -44150,11 +44181,11 @@ function Uve(e, t) { const n = t.ref.objectNumber; if (t.widgets.some((o) => o.objectNumber === n)) return e; const r = xn(e, n); - return r ? wm(e, [{ ref: r.ref, objectNumber: n, page: r.page }]) : e; + return r ? vm(e, [{ ref: r.ref, objectNumber: n, page: r.page }]) : e; } function Kve(e, t) { - const n = new Set(t.widgets.map(El)); - return wm( + const n = new Set(t.widgets.map(Cl)); + return vm( e, t.meta.changedWidgets.filter((r) => !n.has(r.objectNumber)) ); @@ -44163,47 +44194,47 @@ function Hve(e, t) { switch (t.type) { case "forms.widgetAdded": return Uve( - fo(uo(e, [t.field]), t.widgets), + ho(fo(e, [t.field]), t.widgets), t.field ); case "forms.widgetRemoved": - return fo( - Kve(uo(e, [t.field]), t), + return ho( + Kve(fo(e, [t.field]), t), t.widgets ); case "forms.valueSet": case "forms.restored": - return fo(uo(e, [t.field]), t.widgets); + return ho(fo(e, [t.field]), t.widgets); case "forms.updated": - return Rd( - fo(uo(e, [t.field]), t.widgets), + return Md( + ho(fo(e, [t.field]), t.widgets), t.calculationOrder ); case "forms.created": { - const n = fo(uo(e, [t.field]), t.widgets); - return Rd( - n.snapshot?.formKind === "none" ? Yf(n, { ...n.snapshot, formKind: "acroform" }) : n, + const n = ho(fo(e, [t.field]), t.widgets); + return Md( + n.snapshot?.formKind === "none" ? Xf(n, { ...n.snapshot, formKind: "acroform" }) : n, t.calculationOrder ); } case "forms.calculationsReordered": - return Rd(e, t.calculationOrder); + return Md(e, t.calculationOrder); case "forms.widgetDeleted": { - const n = wm(e, t.meta.changedWidgets); - return t.field ? uo(n, [t.field]) : n; + const n = vm(e, t.meta.changedWidgets); + return t.field ? fo(n, [t.field]) : n; } case "forms.widgetRestored": - return fo(t.field ? uo(e, [t.field]) : e, t.widgets); + return ho(t.field ? fo(e, [t.field]) : e, t.widgets); case "forms.widgetUpdated": return QS( - fo(e, [t.widget]), - wn(e, El(t.widget)) + ho(e, [t.widget]), + wn(e, Cl(t.widget)) ); case "forms.widgetsReordered": return Tz(e, t.page, t.order); case "forms.deleted": - return t.deleted ? Rd( - wm(Mz(e, t.deleted), t.meta.changedWidgets), + return t.deleted ? Md( + vm(Mz(e, t.deleted), t.meta.changedWidgets), t.calculationOrder ) : os(); // A repair reports only counts; the others add or remove pages, or paint their @@ -44225,27 +44256,27 @@ function JD(e) { ({ actions: t }) => !!(t?.keystroke || t?.validate || t?.calculate || t?.format) ); } -function Rd(e, t) { - return !t || !e.snapshot ? e : Yf(e, { ...e.snapshot, calculationOrder: [...t] }); +function Md(e, t) { + return !t || !e.snapshot ? e : Xf(e, { ...e.snapshot, calculationOrder: [...t] }); } const Ya = (e, t) => { const n = e.byKey[t]; return n === void 0 ? null : e.snapshot?.fields[n] ?? null; }; function yt(e, t) { - const n = t.kind === "fqn" ? e.byName[t.name] : e.byKey[bm(t)]; + const n = t.kind === "fqn" ? e.byName[t.name] : e.byKey[wm(t)]; return n === void 0 ? null : e.snapshot?.fields[n] ?? null; } const YS = (e, t) => { const n = yt(e, t); - return n ? Ft(n) : bm(t); + return n ? Kt(n) : wm(t); }, wn = (e, t) => { const n = e.byWidget[t]; return n === void 0 ? null : e.snapshot?.fields[n] ?? null; }; function zve(e, t) { return (t.snapshot?.fields ?? []).filter((n) => { - const r = Ya(e, Ft(n)); + const r = Ya(e, Kt(n)); return !r || JSON.stringify(YD(r)) !== JSON.stringify(YD(n)); }); } @@ -44253,14 +44284,14 @@ const YD = (e) => "valueEntry" in e ? e.valueEntry : null, Bz = (e) => ({ box: e.box ?? e.rect, rotation: e.box ? e.rotation ?? 0 : 0, rect: e.rect -}), fO = (e) => e.rect.width > 0 && e.rect.height > 0, j2 = (e) => !e.hidden && !e.noView && fO(e), au = (e) => e.kind === "pushbutton" && e.takesImage; +}), fO = (e) => e.rect.width > 0 && e.rect.height > 0, j2 = (e) => !e.hidden && !e.noView && fO(e), cu = (e) => e.kind === "pushbutton" && e.takesImage; function QS(e, t) { - const n = t && Ya(e, Ft(t)); + const n = t && Ya(e, Kt(t)); if (n?.kind !== "pushbutton") return e; const r = c6( n.widgets.map((o) => xn(e, o.objectNumber)?.actions ?? null) ); - return r === n.takesImage ? e : uo(e, [{ ...n, takesImage: r }]); + return r === n.takesImage ? e : fo(e, [{ ...n, takesImage: r }]); } function Wve(e, t) { const n = {}; @@ -44305,7 +44336,7 @@ function Yve(e, t, n) { for (const [o, { box: s, rotation: i, rect: a }] of Object.entries(t)) { if (!Jve(a, n)) continue; const c = Number(o), l = wn(e, c); - l && (!r || a.width * a.height < r.rect.width * r.rect.height) && (r = { annotObjectNumber: c, field: l, box: s, rotation: i, rect: a, imageBox: au(l) }); + l && (!r || a.width * a.height < r.rect.width * r.rect.height) && (r = { annotObjectNumber: c, field: l, box: s, rotation: i, rect: a, imageBox: cu(l) }); } return r; } @@ -44323,17 +44354,17 @@ function e1e(e, t) { function QD(e, t) { return w0(e.designAssignment, t) ? e : { ...e, designAssignment: Object.freeze({ ...t }) }; } -const Ts = (e) => e.kind === "objectNumber" ? `obj:${e.objectNumber}` : `fqn:${e.name}`, x5 = (e, t) => Ts(e) === Ts(t), hl = (e) => Array.isArray(e) ? [...e] : e, XD = (e, t) => Array.isArray(e) && Array.isArray(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e === t; +const Ts = (e) => e.kind === "objectNumber" ? `obj:${e.objectNumber}` : `fqn:${e.name}`, x5 = (e, t) => Ts(e) === Ts(t), pl = (e) => Array.isArray(e) ? [...e] : e, XD = (e, t) => Array.isArray(e) && Array.isArray(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e === t; function t1e(e) { return e.map((t) => ({ ...t, ref: { ...t.ref }, - value: hl(t.value), - defaultValue: hl(t.defaultValue), + value: pl(t.value), + defaultValue: pl(t.defaultValue), ...t.options ? { options: t.options.map((n) => ({ ...n })) } : {} })); } -function Td(e, t) { +function Bd(e, t) { return e.find((n) => x5(n.ref, t)); } function my(e, t) { @@ -44384,16 +44415,16 @@ function n1e(e) { return null; } } -function bu(e, t) { +function wu(e, t) { for (const n of t) { if (n.kind === "reset") { for (const s of n.refs) { - const i = Td(e.fields, s); - i && (i.value = hl(i.defaultValue), e.resetKeys.add(Ts(s))); + const i = Bd(e.fields, s); + i && (i.value = pl(i.defaultValue), e.resetKeys.add(Ts(s))); } continue; } - const r = Td(e.fields, n.ref); + const r = Bd(e.fields, n.ref); if (!r) continue; const o = Ts(n.ref); n.kind === "setValue" ? (r.value = jz(r, n.value), e.resetKeys.delete(o)) : n.kind === "setDisplay" ? r.display = n.display : e.appearances.set(o, { ref: n.ref, text: n.text }); @@ -44402,7 +44433,7 @@ function bu(e, t) { function ZD(e) { const t = [], n = []; for (const r of e.fields) { - const o = Td(e.original, r.ref); + const o = Bd(e.original, r.ref); if (o) { if (!XD(o.value, r.value)) { const s = Ts(r.ref); @@ -44424,7 +44455,7 @@ function ZD(e) { })) ), t; } -function to(e) { +function no(e) { return { kind: "invalid-output", message: e }; } function r1e(e) { @@ -44444,7 +44475,7 @@ function e8(e, t) { function t8(e, t) { const n = [], r = []; let o = 0, s = 0; - const i = (l, u) => (s += r1e(JSON.stringify(l)), n.push(...l.uiEffects.map((d) => ({ ...d, phase: u }))), r.push(...l.diagnostics), s > t.maxOutputBytes ? { + const i = (l, u) => (s += r1e(JSON.stringify(l)), n.push(...l.uiEffects.map((f) => ({ ...f, phase: u }))), r.push(...l.diagnostics), s > t.maxOutputBytes ? { kind: "budget", message: `Form script transaction output exceeded ${t.maxOutputBytes} bytes` } : l.error ?? null), a = () => { @@ -44452,20 +44483,20 @@ function t8(e, t) { return l <= 0 ? null : { ...t, maxExecutionMs: l }; }; return { uiEffects: n, diagnostics: r, consume: i, run: async (l, u) => { - const d = a(); - if (!d) + const f = a(); + if (!f) return { error: { kind: "budget", message: "Form script transaction timed out" } }; - let f; + let d; try { const g = Date.now(); - f = await e.run(l, u, d), o += Date.now() - g; + d = await e.run(l, u, f), o += Date.now() - g; } catch (g) { return { - error: to(g instanceof Error ? g.message : String(g)) + error: no(g instanceof Error ? g.message : String(g)) }; } - const h = i(f, "user"); - return h ? { error: h } : { output: f }; + const h = i(d, "user"); + return h ? { error: h } : { output: d }; } }; } function o1e(e) { @@ -44532,25 +44563,25 @@ class s1e { return { status: "accepted", effects: [], bootEffects: [], uiEffects: [], diagnostics: [] }; const a = my(n, i); if (!a) - return this.failed([], [], to(`Form field '${Ts(i)}' no longer exists`)); + return this.failed([], [], no(`Form field '${Ts(i)}' no longer exists`)); const c = a.ref, l = oA(n), u = { original: l, fields: t1e(l), resetKeys: /* @__PURE__ */ new Set(), appearances: /* @__PURE__ */ new Map() - }, d = Td(u.fields, c); - if (!d) - return this.failed([], [], to(`Form field '${Ts(c)}' has no script view`)); - const f = o !== void 0; - let h = hl(d.value); + }, f = Bd(u.fields, c); + if (!f) + return this.failed([], [], no(`Form field '${Ts(c)}' has no script view`)); + const d = o !== void 0; + let h = pl(f.value); if (o) try { - h = jz(d, o); + h = jz(f, o); } catch (A) { return this.failed( [], [], - to(A instanceof Error ? A.message : String(A)) + no(A instanceof Error ? A.message : String(A)) ); } const g = this.options.document(), p = e8(g, a), m = this.transactionBudget ?? r0, { uiEffects: v, diagnostics: S, consume: C, run: k } = t8(t, m), N = (A, b) => ({ @@ -44573,19 +44604,19 @@ class s1e { b ? S.push({ code: "script-error", message: `Document boot script failed (continuing without it): ${b.message}` - }) : bu(u, A.formEffects); + }) : wu(u, A.formEffects); } } const w = ZD(u); if (s) { let A; try { - A = ol(s); + A = sl(s); } catch (b) { return this.failed( v, S, - to(b instanceof Error ? b.message : String(b)) + no(b instanceof Error ? b.message : String(b)) ); } if (A) { @@ -44595,26 +44626,26 @@ class s1e { kind: "widget-activate", target: c, source: c, - value: d.value + value: f.value }) ); if (b.error) return this.failed(v, S, b.error); - bu(u, b.output.formEffects); + wu(u, b.output.formEffects); } } - if (!s && f && a.actions?.keystroke && a.kind === "text") { + if (!s && d && a.actions?.keystroke && a.kind === "text") { let A; try { - A = ol(a.actions.keystroke); + A = sl(a.actions.keystroke); } catch (b) { return this.failed( v, S, - to(b instanceof Error ? b.message : String(b)) + no(b instanceof Error ? b.message : String(b)) ); } if (A) { - const b = String(d.value ?? ""), E = await k( + const b = String(f.value ?? ""), E = await k( A, N(u.fields, { kind: "field-keystroke", @@ -44637,7 +44668,7 @@ class s1e { else { if (!E.output.event.rc) return this.rejected(w, v, S); - bu(u, E.output.formEffects); + wu(u, E.output.formEffects); const O = E.output.event, T = String(O.value ?? ""); h = T.slice(0, O.selStart) + O.change + T.slice(Math.max(O.selStart, O.selEnd)); } @@ -44664,19 +44695,19 @@ class s1e { else { if (!I.output.event.rc) return this.rejected(w, v, S); - bu(u, I.output.formEffects), h = hl(I.output.event.value); + wu(u, I.output.formEffects), h = pl(I.output.event.value); } } } - if (!s && f && (d.value = hl(h), u.resetKeys.delete(Ts(c))), !s && f && a.actions?.validate) { + if (!s && d && (f.value = pl(h), u.resetKeys.delete(Ts(c))), !s && d && a.actions?.validate) { let A; try { - A = ol(a.actions.validate); + A = sl(a.actions.validate); } catch (b) { return this.failed( v, S, - to(b instanceof Error ? b.message : String(b)) + no(b instanceof Error ? b.message : String(b)) ); } if (A) { @@ -44700,33 +44731,33 @@ class s1e { else { if (!b.output.event.rc) return this.rejected(w, v, S); - d.value = hl(b.output.event.value), bu(u, b.output.formEffects); + f.value = pl(b.output.event.value), wu(u, b.output.formEffects); } } } - const y = !s && f ? [c] : []; + const y = !s && d ? [c] : []; for (const A of s ? [] : n.calculationOrder) { if (!A) continue; const b = my(n, A), E = b?.actions?.calculate; if (!b || !E) continue; let I; try { - I = ol(E); + I = sl(E); } catch (T) { return this.failed( v, S, - to(T instanceof Error ? T.message : String(T)) + no(T instanceof Error ? T.message : String(T)) ); } - const O = Td(u.fields, A); + const O = Bd(u.fields, A); if (I && O) { const T = await k( I, N(u.fields, { kind: "field-calculate", target: A, - ...f ? { source: c } : {}, + ...d ? { source: c } : {}, value: O.value }) ); @@ -44735,21 +44766,21 @@ class s1e { T.error ? S.push({ code: "script-error", message: `Calculate script failed (field left unchanged): ${T.error.message}` - }) : bu(u, T.output.formEffects); + }) : wu(u, T.output.formEffects); } y.some((T) => x5(T, A)) || y.push(A); } for (const A of y) { - const b = my(n, A), E = b?.actions?.format, I = Td(u.fields, A); + const b = my(n, A), E = b?.actions?.format, I = Bd(u.fields, A); if (!b || !E || !I) continue; let O; try { - O = ol(E); + O = sl(E); } catch (M) { return this.failed( v, S, - to(M instanceof Error ? M.message : String(M)) + no(M instanceof Error ? M.message : String(M)) ); } if (!O) continue; @@ -44758,7 +44789,7 @@ class s1e { N(u.fields, { kind: "field-format", target: A, - ...f ? { source: c } : {}, + ...d ? { source: c } : {}, value: T }) ); @@ -44771,7 +44802,7 @@ class s1e { }); continue; } - bu(u, R.output.formEffects); + wu(u, R.output.formEffects); } const x = ZD(u); return x.length + v.length > m.maxEffects ? this.failed(v, S, { @@ -44793,9 +44824,9 @@ class s1e { message: null, error: h }), s = my(n, r); - if (!s) return o(to(`Form field '${Ts(r)}' no longer exists`)); - const i = s.ref, a = oA(n), c = Td(a, i); - if (!c) return o(to(`Form field '${Ts(i)}' has no script view`)); + if (!s) return o(no(`Form field '${Ts(r)}' no longer exists`)); + const i = s.ref, a = oA(n), c = Bd(a, i); + if (!c) return o(no(`Form field '${Ts(i)}' has no script view`)); const l = [], u = s.kind === "text" ? s.actions?.keystroke : void 0; if (u) { const h = String(c.value ?? ""), g = { kind: "field-keystroke", target: i, source: i }; @@ -44816,20 +44847,20 @@ class s1e { kind: "field-validate", target: i, source: i, - value: hl(c.value), + value: pl(c.value), willCommit: !0 } }); - const d = e8(this.options.document(), s), { run: f } = t8(t, this.transactionBudget ?? r0); + const f = e8(this.options.document(), s), { run: d } = t8(t, this.transactionBudget ?? r0); for (const { tree: h, event: g } of l) { let p; try { - p = ol(h); + p = sl(h); } catch (v) { - return o(to(v instanceof Error ? v.message : String(v))); + return o(no(v instanceof Error ? v.message : String(v))); } if (!p) continue; - const m = await f(p, { fields: a, pageNumber: d, event: g }); + const m = await d(p, { fields: a, pageNumber: f, event: g }); if (m.error && m.error.kind !== "exception") return o(m.error); if (!m.error && !m.output.event.rc) return { status: "rejected", message: o1e(m.output) }; @@ -44853,7 +44884,7 @@ function i1e(e, { ghosts: r, targets: o }, { canPlace: s }) { - const { binaries: i, libraryBinaries: a } = t, { openAssetDocument: c, imageToPreview: l } = n, { ghostProvider: u } = r, { documentIdOf: d, targetOf: f, pageOf: h } = o, g = e.settings(), p = () => Object.keys(e.state.get().armed).filter( + const { binaries: i, libraryBinaries: a } = t, { openAssetDocument: c, imageToPreview: l } = n, { ghostProvider: u } = r, { documentIdOf: f, targetOf: d, pageOf: h } = o, g = e.settings(), p = () => Object.keys(e.state.get().armed).filter( (b) => !e.tryForDocument(_n, b)?.stamps.isArmed() ).join(` `); @@ -44869,62 +44900,62 @@ function i1e(e, { subject: b.subject ?? b.label }), v = async (b, E, I) => { if (!g.get().dynamic) return I; - const O = e.tryForDocument(Dm, b), T = O?.createDetachedScriptRealm; + const O = e.tryForDocument(jm, b), T = O?.createDetachedScriptRealm; if (!O || !T) return I; - const R = e.get(It), M = R.get(b); + const R = e.get(Pt), M = R.get(b); if (M?.status !== "ready") - throw xt("not-found", `document '${b}' is not open`); + throw Et("not-found", `document '${b}' is not open`); const F = { name: M.name, pageCount: M.pageCount, pages: R.listPages(b) - }, B = a.get(E.libraryId), $ = B ?? I.bytes, D = await c(new Uint8Array($)); - let _ = null, L = null; + }, _ = a.get(E.libraryId), $ = _ ?? I.bytes, D = await c(new Uint8Array($)); + let B = null, L = null; try { const j = await D.pages.list(), H = E.page === void 0 ? j.pageCount === 1 ? j.pages[0] : void 0 : j.pages.find(({ ref: Be }) => Be.objectNumber === E.page.objectNumber); if (!H) - throw xt( + throw Et( "invalid-input", - B ? `canonical page ${E.page?.objectNumber ?? "unknown"} no longer exists` : "a loose dynamic stamp asset must contain exactly one page" + _ ? `canonical page ${E.page?.objectNumber ?? "unknown"} no longer exists` : "a loose dynamic stamp asset must contain exactly one page" ); const Y = await D.forms.list(); if (!Y.fields.some( - (Be) => Be.widgets.some(({ page: te }) => te?.objectNumber === H.ref.objectNumber) + (Be) => Be.widgets.some(({ page: ee }) => ee?.objectNumber === H.ref.objectNumber) )) return I; if (!D.pages.flatten || !D.pages.extract) - throw xt( + throw Et( "unsupported", "dynamic PDF stamps need an asset engine with pages.flatten and pages.extract" ); - _ = T.call(O, { + B = T.call(O, { doc: D, document: () => F, - bootSources: async () => (D.actions ? await D.actions.get() : null)?.nameTreeScripts.map(({ action: te }) => ol(te)) ?? [] + bootSources: async () => (D.actions ? await D.actions.get() : null)?.nameTreeScripts.map(({ action: ee }) => sl(ee)) ?? [] }), L = hO({ document: () => F, - transaction: _.transaction.bind(_), - budget: _.budget + transaction: B.transaction.bind(B), + budget: B.budget }); - const le = await L.transaction(async (Be) => { - const te = await Be.recalculate(Y); - return te.status === "accepted" && te.effects.length > 0 && await D.apply({ ops: qw(te.effects) }), te; + const ie = await L.transaction(async (Be) => { + const ee = await Be.recalculate(Y); + return ee.status === "accepted" && ee.effects.length > 0 && await D.apply({ ops: qw(ee.effects) }), ee; }); - if (O.surfaceScriptCommit(le, { origin: "user", realm: "detached" }), le.status === "failed") - throw xt( + if (O.surfaceScriptCommit(ie, { origin: "user", realm: "detached" }), ie.status === "failed") + throw Et( "operation-failed", - `dynamic stamp scripting failed: ${le.error?.message ?? "native form effect failed"}` + `dynamic stamp scripting failed: ${ie.error?.message ?? "native form effect failed"}` ); const pe = H.ref; await D.pages.flatten([pe], { usage: "display" }); - const ge = await D.pages.extract([pe]), Me = await D.page(pe).render.image({ + const ve = await D.pages.extract([pe]), _e = await D.page(pe).render.image({ viewport: { kind: "width", width: g.get().previewWidth }, background: "transparent", includeAnnotations: !1, format: "png" }); - return { bytes: ge, preview: l(Me) }; + return { bytes: ve, preview: l(_e) }; } finally { - L?.destroy(), _?.destroy(), await D.close(); + L?.destroy(), B?.destroy(), await D.close(); } }, S = (b) => { const E = e.state.get().assets[b], I = i.get(b); @@ -44935,7 +44966,7 @@ function i1e(e, { }, k = async (b, E) => { const I = E?.signal; bn(I); - const O = f(E), { asset: T, binary: R } = S(b); + const O = d(E), { asset: T, binary: R } = S(b); C(O, "stamp.armAsset"); const M = await e.cancellable( I, @@ -44949,10 +44980,10 @@ function i1e(e, { { signal: I } ), e.state.update(Ive, O, b); }, N = (b) => { - const E = d(b), I = E === null ? void 0 : e.state.get().armed[E]; + const E = f(b), I = E === null ? void 0 : e.state.get().armed[E]; return E === null || I === void 0 || !e.tryForDocument(_n, E)?.stamps.isArmed() ? null : e.state.get().assets[I] ?? null; }, w = (b) => { - const E = d(b); + const E = f(b); E !== null && (e.tryForDocument(vt, E)?.stamps.disarm(), e.state.update(KD, [E])); }, y = async (b, E, I, O) => { const { asset: T, binary: R } = S(E), M = await e.cancellable( @@ -44966,50 +44997,50 @@ function i1e(e, { ); }, x = async (b, E, I) => { bn(I?.signal); - const O = f(I); + const O = d(I); return S(b), C(O, "stamp.placeAsset"), y(O, b, E, I?.signal); }, A = async (b, E, I, O) => { const T = O?.signal; bn(T); - const R = f(O); + const R = d(O); S(b), C(R, "stamp.placeAssetOnPages"); - const M = E === "all" ? e.get(It).listPages(R).map(($) => $.ref) : E.map(($) => h(R, $).ref), F = [], B = []; + const M = E === "all" ? e.get(Pt).listPages(R).map(($) => $.ref) : E.map(($) => h(R, $).ref), F = [], _ = []; for (const $ of M) try { const D = await y(R, b, { ...I, page: $ }, T); F.push(D.annotation); } catch (D) { - const _ = qe("stamp", D); - if (_.code === "operation-cancelled") throw _; - B.push({ ref: $, error: Br(_) }); + const B = ze("stamp", D); + if (B.code === "operation-cancelled") throw B; + _.push({ ref: $, error: Br(B) }); } - return { applied: F, skipped: [], failed: B }; + return { applied: F, skipped: [], failed: _ }; }; return { api: { - armAsset: Wr(k), + armAsset: qr(k), disarm: w, getArmedAsset: N, - placeAsset: Wr(x), - placeAssetOnPages: Wr(A) + placeAsset: qr(x), + placeAssetOnPages: qr(A) } }; } function a1e(e) { const t = Eve(e), { events: n } = t, r = e.settings(); - e.state.onChange(({ previous: u, next: d }) => { - if (u.armed === d.armed) return; - const f = /* @__PURE__ */ new Set([...Object.keys(u.armed), ...Object.keys(d.armed)]); - for (const h of f) { - const g = d.armed[h]; + e.state.onChange(({ previous: u, next: f }) => { + if (u.armed === f.armed) return; + const d = /* @__PURE__ */ new Set([...Object.keys(u.armed), ...Object.keys(f.armed)]); + for (const h of d) { + const g = f.armed[h]; u.armed[h] !== g && n.armChanged.emit({ documentId: h, - asset: g === void 0 ? null : d.assets[g] ?? null + asset: g === void 0 ? null : f.assets[g] ?? null }); } }); const o = bve(e, t), s = jve(t), i = Bve(e, t), a = Tve(e, t, s, i, o), c = i1e(e, t, o); - return { api: tu("stamp", [ + return { api: nu("stamp", [ r.api, o.api, i.api, @@ -45086,8 +45117,8 @@ function d1e(e, t, n = {}) { try { l.step === "save" ? await t.put(i, await e.exportLibrary(i)) : await t.delete(i); } catch (u) { - const d = l.step === "save" ? "persisting" : "deleting stored"; - globalThis.console?.warn(`[stamp] ${d} library '${i}' failed:`, u); + const f = l.step === "save" ? "persisting" : "deleting stored"; + globalThis.console?.warn(`[stamp] ${f} library '${i}' failed:`, u); } o.delete(i), l.next && s(i, l.next); }); @@ -45099,7 +45130,7 @@ function d1e(e, t, n = {}) { function E5() { return bt(Qn); } -const f1e = wo(l1e); +const f1e = vo(l1e); function h1e(e) { const t = e?.kind === void 0 ? void 0 : [].concat(e.kind).join("\0"); return wt( @@ -45117,7 +45148,7 @@ function Fz(e) { ); } function p1e(e) { - const t = E5(), [n, r] = De(null); + const t = E5(), [n, r] = je(null); return Ke(() => { const o = e ? t.getAssetPreview(e) : null; if (!o) { @@ -45143,16 +45174,16 @@ const g1e = [ ], Vz = (e, t = 1) => typeof e == "object" ? e : f7(1, 1, e === "imperial" ? "ft" : "m", { userUnit: t }); function m1e(e, t, n = s6(t)) { const r = e.x[0]?.unit.trim(); - if (!(r in Do)) + if (!(r in jo)) throw new RangeError("This scale has an unknown base unit; calibrate it first"); const o = e.distance[e.distance.length - 1], s = o?.fraction === "fraction" ? 100 : o?.precision ?? 100; return { ...e, - distance: [{ unit: t, conversion: Do[r] / Do[t], precision: s, fraction: "decimal" }], + distance: [{ unit: t, conversion: jo[r] / jo[t], precision: s, fraction: "decimal" }], area: [ { unit: a6(n), - conversion: Do[r] ** 2 / i6(n), + conversion: jo[r] ** 2 / i6(n), precision: s, fraction: "decimal" } @@ -45169,7 +45200,7 @@ function y1e(e, t) { } function b1e(e, t) { const n = e.x[0]?.unit.trim(); - if (!(n in Do)) + if (!(n in jo)) throw new RangeError("This scale has an unknown base unit; calibrate it first"); const r = e.area[e.area.length - 1], o = r?.fraction === "fraction" ? 100 : r?.precision ?? 100; return { @@ -45177,14 +45208,14 @@ function b1e(e, t) { area: [ { unit: a6(t), - conversion: Do[n] ** 2 / i6(t), + conversion: jo[n] ** 2 / i6(t), precision: o, fraction: "decimal" } ] }; } -const gi = sn("measurement", { +const gi = an("measurement", { hint: "add measurementPlugin() from '@embedpdf/plugin-measurement' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -45207,7 +45238,7 @@ const gi = sn("measurement", { source: "default", ready: !1, persistent: !1 -}), k1e = Object.freeze({ unavailable: "not-dimension" }), $z = Object.keys(Do), A1e = [...$z.map(s6), "ha", "acre"]; +}), k1e = Object.freeze({ unavailable: "not-dimension" }), $z = Object.keys(jo), A1e = [...$z.map(s6), "ha", "acre"]; function S1e(e, { siblings: t }, { scaleOf: n }) { const { annotation: r } = t, o = e.settings(), s = () => e.state.get(), i = /* @__PURE__ */ new WeakMap(); return { @@ -45220,22 +45251,22 @@ function S1e(e, { siblings: t }, { scaleOf: n }) { listUnits: () => $z, listAreaUnits: () => A1e, getReadout: (u) => { - const d = r.get(u); - if (!d) return k1e; - let f = i.get(d); - return f || (f = Ba(d), i.set(d, f)), f; + const f = r.get(u); + if (!f) return k1e; + let d = i.get(f); + return d || (d = Ba(f), i.set(f, d)), d; }, - measureDistance: (u, d, f) => Ba({ + measureDistance: (u, f, d) => Ba({ subtype: "line", intent: "line-dimension", measure: n(u).measure, - linePoints: { start: d, end: f } + linePoints: { start: f, end: d } }), - measureArea: (u, d) => Ba({ + measureArea: (u, f) => Ba({ subtype: "polygon", intent: "polygon-dimension", measure: n(u).measure, - vertices: [...d] + vertices: [...f] }), getCalibrationRequest: () => s().calibration } @@ -45287,32 +45318,32 @@ const n8 = Object.freeze({ persistent: !1 }), TC = Object.freeze([]); function B1e(e, { siblings: t }) { - const { annotation: n } = t, r = e.settings(), o = (d) => Vz(r.get().defaultScale, d.userUnit), s = (d) => e.doc.page(d).measure !== void 0, i = (d) => s(d.ref) ? d.viewports ?? TC : e.state.get().localViewports[d.ref.objectNumber] ?? TC, a = Mn( - (d) => { - const f = e.getPage(Lt(d)); + const { annotation: n } = t, r = e.settings(), o = (f) => Vz(r.get().defaultScale, f.userUnit), s = (f) => e.doc.page(f).measure !== void 0, i = (f) => s(f.ref) ? f.viewports ?? TC : e.state.get().localViewports[f.ref.objectNumber] ?? TC, a = Mn( + (f) => { + const d = e.getPage(Ft(f)); return [ - f, - f ? i(f) : TC, - f ? s(f.ref) : !1, + d, + d ? i(d) : TC, + d ? s(d.ref) : !1, r.get().defaultScale ]; }, - (d, f, h, g) => f ? M1e(h, f.size, o(f), g) : n8 + (f, d, h, g) => d ? M1e(h, d.size, o(d), g) : n8 ); - return { ensureLoaded: (d) => e.getPage(d) ? Promise.resolve() : Promise.reject(new re("not-found", "measurement", "no such page")), scaleOf: (d) => { - if (typeof d != "number") return a(d.objectNumber); - const f = e.getPage(d); - return f ? a(f.ref.objectNumber) : n8; + return { ensureLoaded: (f) => e.getPage(f) ? Promise.resolve() : Promise.reject(new te("not-found", "measurement", "no such page")), scaleOf: (f) => { + if (typeof f != "number") return a(f.objectNumber); + const d = e.getPage(f); + return d ? a(d.ref.objectNumber) : n8; }, isPersistent: s, connect: () => { - const d = /* @__PURE__ */ new Map(), f = (g, p = !1) => { + const f = /* @__PURE__ */ new Map(), d = (g, p = !1) => { const m = i(g); - !p && d.get(g.ref.objectNumber) === m || (d.set(g.ref.objectNumber, m), n.setPageViewports(g.ref, [...m], o(g))); + !p && f.get(g.ref.objectNumber) === m || (f.set(g.ref.objectNumber, m), n.setPageViewports(g.ref, [...m], o(g))); }, h = () => { - for (const g of e.document()?.pages ?? []) f(g); + for (const g of e.document()?.pages ?? []) d(g); }; h(), e.watch(() => e.document()?.pages, h), e.watch(() => e.state.get().localViewports, h), e.listen(r.api.onSettingsChanged, ({ changedKeys: g }) => { if (g.includes("defaultScale")) - for (const p of e.document()?.pages ?? []) f(p, !0); + for (const p of e.document()?.pages ?? []) d(p, !0); }); } }; } @@ -45320,11 +45351,11 @@ function _1e(e, { events: t, store: n, siblings: r }) { const { calibrationRequested: o, calibrationDismissed: s } = t, { canCalibrate: i } = n, { annotation: a, interaction: c } = r; return { connect: () => { - e.listen(a.onDraftCaptured, (f) => { - if (f.tool !== "calibrate" || !i()) return; - const h = If(f.from), g = If(f.to), p = Math.hypot(g.x - h.x, g.y - h.y); + e.listen(a.onDraftCaptured, (d) => { + if (d.tool !== "calibrate" || !i()) return; + const h = Of(d.from), g = Of(d.to), p = Math.hypot(g.x - h.x, g.y - h.y); if (!(p > 0)) return; - const m = { page: f.page, from: h, to: g, userSpaceLength: p }; + const m = { page: d.page, from: h, to: g, userSpaceLength: p }; c.activateTool("pointer"), e.state.update(iA, m), o.emit({ request: m }); }); }, @@ -45346,15 +45377,15 @@ function L1e(e, { siblings: t }, { scaleOf: n }) { }; switch (i.kind) { case "distance": { - const [d, f] = i.points; - return !d || !f || i.points.length !== 2 ? new re( + const [f, d] = i.points; + return !f || !d || i.points.length !== 2 ? new te( "invalid-input", "measurement", "a distance needs exactly two points" ) : { subtype: "line", intent: "line-dimension", - linePoints: { start: d, end: f }, + linePoints: { start: f, end: d }, lineEndings: l.lineEndings, // The arrowheads fill with the line's color unless the tool sets a fill. interiorColor: l.interiorColor ?? l.color, @@ -45385,14 +45416,14 @@ function L1e(e, { siblings: t }, { scaleOf: n }) { e.assertAllowed("annotations:create", "measurement.createMeasurement"); const c = e.pageOf(i.page).ref; if (!n(c).ready) - throw new re("not-ready", "measurement", "the page scale is not known yet"); + throw new te("not-ready", "measurement", "the page scale is not known yet"); const l = o(i, c, i.tool ?? i.kind); if (l instanceof Error) throw l; return r.create(c, l, void 0, { signal: a?.signal }); } } }; } function D1e(e, { events: t, store: n, siblings: r }, { scaleOf: o, isPersistent: s }) { - const { scaleChanged: i, calibrationCompleted: a } = t, { requirePage: c, targets: l } = n, { annotation: u } = r, d = e.settings(), f = (k, N) => N ?? Vz(d.get().defaultScale, c(k).userUnit), h = ({ page: k, scale: N }) => { + const { scaleChanged: i, calibrationCompleted: a } = t, { requirePage: c, targets: l } = n, { annotation: u } = r, f = e.settings(), d = (k, N) => N ?? Vz(f.get().defaultScale, c(k).userUnit), h = ({ page: k, scale: N }) => { const w = c(k), y = e.state.get().localViewports[k.objectNumber] ?? []; e.state.update( T1e, @@ -45423,7 +45454,7 @@ function D1e(e, { events: t, store: n, siblings: r }, { scaleOf: o, isPersistent ) }) : null, reports: k.map(({ page: b, scale: E }) => { - const I = f(b, E); + const I = d(b, E); return N ? u.stageRemeasure(b, I) : { page: b, scale: I, updated: [], skipped: [], failed: [] }; }) })); @@ -45438,7 +45469,7 @@ function D1e(e, { events: t, store: n, siblings: r }, { scaleOf: o, isPersistent e.assertAllowed(XS, "changing a scale"); const y = l(k), { signal: x } = w; if (x?.aborted) - throw new re("operation-cancelled", "measurement", "operation cancelled", { + throw new te("operation-cancelled", "measurement", "operation cancelled", { cause: x.reason }); const A = k === "all" || y.length > 1, b = w.recalculate !== !1; @@ -45451,7 +45482,7 @@ function D1e(e, { events: t, store: n, siblings: r }, { scaleOf: o, isPersistent const R = N(T); R && XP(R), I.push({ page: T, scale: R }); } catch (R) { - const M = qe("measurement", R); + const M = ze("measurement", R); if (!A) throw M; E.set(T.objectNumber, m(T, M)); } @@ -45460,7 +45491,7 @@ function D1e(e, { events: t, store: n, siblings: r }, { scaleOf: o, isPersistent for (const T of await p(I, b, x)) E.set(T.page.objectNumber, T); } catch (T) { - const R = qe("measurement", T); + const R = ze("measurement", T); if (!A || R.code === "operation-cancelled") throw R; for (const { page: M } of I) E.set(M.objectNumber, m(M, R)); @@ -45475,7 +45506,7 @@ function D1e(e, { events: t, store: n, siblings: r }, { scaleOf: o, isPersistent }, S = (k) => { const N = o(k).measure; if (!N || N.subtype !== "rectilinear") - throw new re( + throw new te( "not-ready", "measurement", "calibrate this page before changing its units or precision" @@ -45486,25 +45517,25 @@ function D1e(e, { events: t, store: n, siblings: r }, { scaleOf: o, isPersistent api: { setScale: (k, N, w) => v(k, () => N, w), calibrate: async (k, N = {}) => { - const w = If(k.from), y = If(k.to); + const w = Of(k.from), y = Of(k.to); let x; try { x = KX(Math.hypot(y.x - w.x, y.y - w.y), k.distance); } catch (T) { - throw new re( + throw new te( "invalid-input", "measurement", String(T.message ?? T) ); } const { applyTo: A, ...b } = N, E = c(k.page).ref, I = await v(A ?? E, () => x, b), O = e.state.get().calibration; - return O && Vf(O.page, E) && e.state.update(iA, null), a.emit({ page: E }), I; + return O && Uf(O.page, E) && e.state.update(iA, null), a.emit({ page: E }), I; }, setUnit: (k, N, w) => v(k, (y) => m1e(S(y), N), w), setAreaUnit: (k, N, w) => v(k, (y) => b1e(S(y), N), w), setPrecision: (k, N, w) => v(k, (y) => y1e(S(y), N), w), setPreset: (k, N, w) => { - const y = d.get().presets.find((x) => x.id === N); + const y = f.get().presets.find((x) => x.id === N); return y ? v( k, (x) => f7(y.paper, y.real, y.unit, { @@ -45512,7 +45543,7 @@ function D1e(e, { events: t, store: n, siblings: r }, { scaleOf: o, isPersistent }), w ) : Promise.reject( - new re("not-found", "measurement", `unknown scale preset '${N}'`) + new te("not-found", "measurement", `unknown scale preset '${N}'`) ); }, clearScale: (k, N) => v(k, () => null, N) @@ -45522,7 +45553,7 @@ function D1e(e, { events: t, store: n, siblings: r }, { scaleOf: o, isPersistent function j1e(e) { const t = I1e(e), { events: n, store: r } = t, o = e.settings(), s = B1e(e, t), i = S1e(e, t, s), a = D1e(e, t, s), c = _1e(e, t), l = L1e(e, t, s); return { - api: tu("measurement", [ + api: nu("measurement", [ o.api, i.api, a.api, @@ -45566,12 +45597,12 @@ const F1e = (e) => ({ function jDe() { return bt(gi); } -const $1e = wo(V1e); +const $1e = vo(V1e); function U1e(e) { const t = vi(); - return en((n) => e === null ? null : n.tryCapability(gi, t ?? void 0)?.getPageScale(e) ?? v1e); + return nn((n) => e === null ? null : n.tryCapability(gi, t ?? void 0)?.getPageScale(e) ?? v1e); } -const Oi = sn("search", { +const Oi = an("search", { hint: "add searchPlugin() from '@embedpdf/plugin-search' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -45583,7 +45614,7 @@ const Oi = sn("search", { }), K1e = { reveal: { align: { y: 0.35 }, behavior: "smooth" }, highlight: { color: "#ffd500", activeColor: "#ff9632", blendMode: "multiply" } -}, oa = sn("redaction", { +}, oa = an("redaction", { hint: "add redactionPlugin() from '@embedpdf/plugin-redaction' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -45615,36 +45646,36 @@ const Oi = sn("search", { }); function W1e(e, { store: t, siblings: n }) { const { pages: r, pageIndexOf: o } = t, { annotation: s } = n, i = Mn( - (f) => { - const h = Lt(f); + (d) => { + const h = Ft(d); return [s.list({ pages: [h] }), o(h)]; }, - (f, h, g) => { + (d, h, g) => { const p = h.flatMap( (m) => m.subtype === "redact" ? [r8(m, g)] : [] ); return p.length ? p : MC; } ), a = tt( - () => r().map((f) => i(f.objectNumber)), - (...f) => f.some((h) => h.length) ? f.flat() : MC - ), c = (f) => { - if (f?.page === void 0) return a(); - const h = e.getPage(f.page); + () => r().map((d) => i(d.objectNumber)), + (...d) => d.some((h) => h.length) ? d.flat() : MC + ), c = (d) => { + if (d?.page === void 0) return a(); + const h = e.getPage(d.page); return h ? i(h.ref.objectNumber) : MC; }; return { listPending: c, - markFor: (f) => f.subtype === "redact" ? r8(f, o(f.ref.page)) : null, + markFor: (d) => d.subtype === "redact" ? r8(d, o(d.ref.page)) : null, api: { listPending: c, - getPending: (f) => { - const h = oe(f); + getPending: (d) => { + const h = oe(d); return c().find((g) => oe(g.ref) === h) ?? null; }, - getPendingCount: (f) => c(f === void 0 ? void 0 : { page: f }).length, - estimateCollateral: (f) => { - const h = f ? new Set(f.map(oe)) : null, g = []; + getPendingCount: (d) => c(d === void 0 ? void 0 : { page: d }).length, + estimateCollateral: (d) => { + const h = d ? new Set(d.map(oe)) : null, g = []; for (const p of r()) { const m = s.list({ pages: [p] }), v = m.filter( (C) => C.subtype === "redact" && (!h || h.has(oe(C.ref))) @@ -45681,7 +45712,7 @@ function Y1e(e) { const t = () => { const i = e.doc.redaction; if (!i) - throw new re("unsupported", "redaction", "this engine has no redaction service"); + throw new te("unsupported", "redaction", "this engine has no redaction service"); return i; }, n = () => (e.document()?.pages ?? []).map((i) => i.ref), r = tt( () => [e.document()?.pages], @@ -45723,38 +45754,38 @@ function oke(e, { siblings: t }) { function ske(e, { store: t }, { listPending: n }) { const { requireService: r, pages: o } = t, s = e.serialQueue("apply"); e.onSettle(() => s.idle()); - const i = (u, d) => s( + const i = (u, f) => s( async () => { - const f = r(), h = u(); + const d = r(), h = u(); e.state.update(Z1e); try { - return await e.cancellable(d?.signal, f.apply(h)); + return await e.cancellable(f?.signal, d.apply(h)); } finally { e.state.update(eke); } }, - { signal: d?.signal } + { signal: f?.signal } ); - return { api: { apply: (u, d) => i(() => { - const f = new Set(u.map(oe)), h = n().filter((g) => f.has(oe(g.ref))).map((g) => g.ref); + return { api: { apply: (u, f) => i(() => { + const d = new Set(u.map(oe)), h = n().filter((g) => d.has(oe(g.ref))).map((g) => g.ref); if (h.length === 0) - throw new re("not-found", "redaction", "no matching pending marks"); + throw new te("not-found", "redaction", "no matching pending marks"); return { annotations: h }; - }, d), applyPages: async (u, d) => { + }, f), applyPages: async (u, f) => { if (u.length === 0) - throw new re("invalid-input", "redaction", "no pages given"); - const f = u.map((h) => e.pageOf(h).ref); - return i(() => ({ pages: f }), d); + throw new te("invalid-input", "redaction", "no pages given"); + const d = u.map((h) => e.pageOf(h).ref); + return i(() => ({ pages: d }), f); }, applyAll: (u) => i(() => { - const d = o(); - if (d.length === 0) - throw new re("not-ready", "redaction", "the document has no pages"); - return { pages: d }; + const f = o(); + if (f.length === 0) + throw new te("not-ready", "redaction", "the document has no pages"); + return { pages: f }; }, u) } }; } const o8 = (e) => { if (e?.aborted) - throw new re("operation-cancelled", "redaction", "operation cancelled", { + throw new te("operation-cancelled", "redaction", "operation cancelled", { cause: e.reason }); }; @@ -45772,15 +45803,15 @@ function ike(e, { siblings: t }, { listPending: n, markFor: r }) { }; }, c = (k) => { const N = r(k); - if (!N) throw new re("operation-failed", "redaction", "the record is not a mark"); + if (!N) throw new te("operation-failed", "redaction", "the record is not a mark"); return N; }, l = (k) => { const N = oe(k); return n().some((w) => oe(w.ref) === N); - }, u = (k) => l(k) && o.canDelete(k), d = (k) => l(k) && o.canUpdate(k), f = async (k) => { + }, u = (k) => l(k) && o.canDelete(k), f = (k) => l(k) && o.canUpdate(k), d = async (k) => { e.assertAllowed("annotations:create", "redaction.markSelection"); const N = s(); - if (!N) throw new re("unsupported", "redaction", "no selection plugin"); + if (!N) throw new te("unsupported", "redaction", "no selection plugin"); if (!N.hasSelection()) return { marks: [] }; const { annotations: w } = await o.createFromSelection("redact", { clear: !0, @@ -45806,7 +45837,7 @@ function ike(e, { siblings: t }, { listPending: n, markFor: r }) { }, m = async (k, N) => { e.assertAllowed("annotations:create", "redaction.markMatches"); const w = N?.signal, y = i(); - if (!y) throw new re("unsupported", "redaction", "no search plugin"); + if (!y) throw new te("unsupported", "redaction", "no search plugin"); const x = N?.pages ? new Set(N.pages.map((b) => e.pageOf(b).ref.objectNumber)) : null; await y.search(k, { signal: w }); const A = []; @@ -45829,7 +45860,7 @@ function ike(e, { siblings: t }, { listPending: n, markFor: r }) { continue; } if (!o.canDelete(b)) { - const E = new re( + const E = new te( "permission-denied", "redaction", "redaction.unmark requires annotations:delete", @@ -45841,7 +45872,7 @@ function ike(e, { siblings: t }, { listPending: n, markFor: r }) { try { await o.delete(b, { signal: w }), y.push(b); } catch (E) { - const I = qe("redaction", E); + const I = ze("redaction", E); if (I.code === "operation-cancelled") throw I; A.push({ ref: b, error: Br(I) }); } @@ -45851,8 +45882,8 @@ function ike(e, { siblings: t }, { listPending: n, markFor: r }) { return { api: { canUnmark: u, - canUpdateLabel: d, - markSelection: f, + canUpdateLabel: f, + markSelection: d, markArea: g, markPage: p, markMatches: m, @@ -45864,9 +45895,9 @@ function ike(e, { siblings: t }, { listPending: n, markFor: r }) { updateLabel: async (k, N, w) => { const y = o.get(k); if (!y || y.subtype !== "redact") - throw new re("not-found", "redaction", "the target is not a redaction mark"); + throw new te("not-found", "redaction", "the target is not a redaction mark"); if (!o.canUpdate(k)) - throw new re( + throw new te( "permission-denied", "redaction", "redaction.updateLabel requires annotations:update", @@ -45889,7 +45920,7 @@ function ike(e, { siblings: t }, { listPending: n, markFor: r }) { ); return { mark: c(x.annotation) }; } catch (x) { - throw qe("redaction", x); + throw ze("redaction", x); } } } @@ -45898,7 +45929,7 @@ function ike(e, { siblings: t }, { listPending: n, markFor: r }) { function ake(e) { const t = Q1e(e), { events: n, store: r } = t, o = e.settings(), s = W1e(e, t), i = ike(e, t, s), a = ske(e, t, s); return { - api: tu("redaction", [ + api: nu("redaction", [ o.api, s.api, i.api, @@ -45928,7 +45959,7 @@ const cke = (e) => ({ state: X1e, settings: { defaults: H1e, registered: e }, create: ake -}), Ss = sn("form", { +}), Ss = an("form", { hint: "add formPlugin() from '@embedpdf/plugin-form' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -45982,7 +46013,7 @@ const cke = (e) => ({ }, fillable: !0, tools: [] -}, C5 = "form-design", s8 = ["form-place", "annotation-edit", C5], fc = { +}, C5 = "form-design", s8 = ["form-place", "annotation-edit", C5], hc = { interiorColor: "#ffffff", color: "#6b7280", strokeWidth: 1 @@ -45996,7 +46027,7 @@ const cke = (e) => ({ visualKind: "widget-text", clickCreate: { width: 160, height: 24 }, upright: !0, - defaults: { ...fc, fontSize: 12 }, + defaults: { ...hc, fontSize: 12 }, cursor: "crosshair" }, { @@ -46005,7 +46036,7 @@ const cke = (e) => ({ visualKind: "widget-toggle", clickCreate: { width: 18, height: 18 }, upright: !0, - defaults: fc, + defaults: hc, cursor: "crosshair" }, { @@ -46015,7 +46046,7 @@ const cke = (e) => ({ visualKind: "widget-radio", clickCreate: { width: 18, height: 18 }, upright: !0, - defaults: fc, + defaults: hc, cursor: "crosshair" }, { @@ -46024,7 +46055,7 @@ const cke = (e) => ({ visualKind: "widget-choice", clickCreate: { width: 140, height: 24 }, upright: !0, - defaults: { ...fc, fontSize: 12 }, + defaults: { ...hc, fontSize: 12 }, cursor: "crosshair" }, { @@ -46033,7 +46064,7 @@ const cke = (e) => ({ visualKind: "widget-choice", clickCreate: { width: 140, height: 72 }, upright: !0, - defaults: { ...fc, fontSize: 12 }, + defaults: { ...hc, fontSize: 12 }, cursor: "crosshair" }, // A push button: its caption is its text; what it does is its actions. @@ -46043,7 +46074,7 @@ const cke = (e) => ({ visualKind: "widget-button", clickCreate: { width: 100, height: 28 }, upright: !0, - defaults: { ...fc, interiorColor: "#e5e7eb", fontSize: 12 }, + defaults: { ...hc, interiorColor: "#e5e7eb", fontSize: 12 }, cursor: "crosshair" }, // A signature field: the bare widget box every non-text kind ingests @@ -46056,7 +46087,7 @@ const cke = (e) => ({ visualKind: "widget-box", clickCreate: { width: 160, height: 48 }, upright: !0, - defaults: fc, + defaults: hc, cursor: "crosshair", field: { purpose: "signature" } }, @@ -46069,7 +46100,7 @@ const cke = (e) => ({ visualKind: "widget-button", clickCreate: { width: 120, height: 90 }, upright: !0, - defaults: { ...fc, layout: "image" }, + defaults: { ...hc, layout: "image" }, cursor: "crosshair", field: { takesImage: !0 } }, @@ -46181,8 +46212,8 @@ function pke(e, t) { return o.width < 1 || o.height < 1 ? null : o; } function gke(e, t) { - const { box: n, rotation: r } = Qme(e), o = r ?? 0, s = pke(fm(n, o), t); - return s ? { box: fm(s, o), ...o ? { rotation: o } : {} } : null; + const { box: n, rotation: r } = Qme(e), o = r ?? 0, s = pke(hm(n, o), t); + return s ? { box: hm(s, o), ...o ? { rotation: o } : {} } : null; } function Wz(e, t, n, r = F2) { const o = { ...mke(e, t, n), ...e.field }; @@ -46223,8 +46254,8 @@ function yke(e, t, n, r = uke) { return !l || !e.canDesign() || e.getDesignAssignment().kind === "anyone" && !qz(l) ? null : l; }, a = () => { o = null, n?.clearPlacementPreview(), n?.clearGhost(); - }, c = async (l, u, d) => { - const f = e.getPageBox(u), h = f ? gke(d, f) : null; + }, c = async (l, u, f) => { + const d = e.getPageBox(u), h = d ? gke(f, d) : null; if (!h) return; const g = zz(l, n), p = hke(l.fieldKind, new Set(e.list().map((k) => k.name))), m = e.create( Wz(l, p, { page: u, ...h, ...g }, e.getDesignAssignment()) @@ -46273,14 +46304,14 @@ function yke(e, t, n, r = uke) { if (!o) return; const u = o; a(); - const d = r.get(t.getActiveToolId()); - if (!d) return; - const f = T0(l, u.page) ?? u.last, h = B2("box", u.start, f, d.clickCreate, { + const f = r.get(t.getActiveToolId()); + if (!f) return; + const d = T0(l, u.page) ?? u.last, h = B2("box", u.start, d, f.clickCreate, { pageBox: e.getPageBox(u.page) ?? void 0, - upright: s(d), + upright: s(f), displayRotation: u.displayRotation }); - h?.kind === "box" && c(d, u.page, h).catch((g) => { + h?.kind === "box" && c(f, u.page, h).catch((g) => { globalThis.console?.error("[form] placing the field failed:", g); }); }, @@ -46324,7 +46355,7 @@ function bke(e, t, n, r) { e.cleanup( o.registerHandler(yke(t, o, s, r)) ), s && e.allows("doc.forms.modify") && e.cleanup(s.lend(n)); - const i = e.tryGet(Dm); + const i = e.tryGet(jm); i && (e.cleanup(i.registerFormCommitSink((a) => t.commitScriptFormEffects(a))), e.cleanup(i.registerFormReader(() => t.getSnapshot())), e.cleanup(i.registerFormFocus((a) => t.focus(PY(a)))), e.cleanup( i.registerSubmitResolver( (a, c, l) => t.resolveSubmitDataset(a, c, l) @@ -46392,7 +46423,7 @@ function N5(e, t) { case "signature": return e.valueEntry.kind === "none" && !t; case "pushbutton": - return au(e) && !e.hasImage; + return cu(e) && !e.hasImage; default: return !1; } @@ -46403,7 +46434,7 @@ function Ake(e, { fields: t, rights: n, siblings: r }) { if (!p) return o(); const m = p.page === void 0 ? void 0 : e.getPage(p.page)?.ref; return p.page !== void 0 && !m ? i8 : o().filter( - (v) => (!p.kind || v.kind === p.kind) && (p.name === void 0 || v.name === p.name) && (!m || v.widgets.some((S) => S.page && Vf(S.page, m))) + (v) => (!p.kind || v.kind === p.kind) && (p.name === void 0 || v.name === p.name) && (!m || v.widgets.some((S) => S.page && Uf(S.page, m))) ); }, i = Mn( (p) => { @@ -46434,21 +46465,21 @@ function Ake(e, { fields: t, rights: n, siblings: r }) { return [v ? e.getPage(v.page)?.index ?? 1 / 0 : 1 / 0, v?.rect.y ?? 0, v?.rect.x ?? 0]; }, u = (p) => p.map((m) => ({ field: m, place: l(m) })).sort( (m, v) => m.place[0] - v.place[0] || m.place[1] - v.place[1] || m.place[2] - v.place[2] - ).map(({ field: m }) => m), d = (p) => { + ).map(({ field: m }) => m), f = (p) => { const m = u( (p.snapshot?.fields ?? []).filter( (S) => Dz(S) && n.mayFillOrSign(S) ) ), v = m.filter((S) => $2(p, S)); return { valid: v.length === 0, missing: v, required: m }; - }, f = tt(() => [t.view(), e.document(), n.key()], d), h = tt( + }, d = tt(() => [t.view(), e.document(), n.key()], f), h = tt( () => [t.view(), r.annotation()?.selection.getSelected() ?? a8], (p, m) => { let v = null; for (const S of m) { if (!S.subtype.startsWith("widget")) return null; const C = wn(p, yn(S.ref)); - if (!C || v && Ft(v) !== Ft(C)) return null; + if (!C || v && Kt(v) !== Kt(C)) return null; v = C; } return v; @@ -46460,7 +46491,7 @@ function Ake(e, { fields: t, rights: n, siblings: r }) { for (const S of m) { if (!S.subtype.startsWith("widget")) continue; const C = wn(p, yn(S.ref)); - C && !v.has(Ft(C)) && v.set(Ft(C), C); + C && !v.has(Kt(C)) && v.set(Kt(C), C); } return v.size === 0 ? wke : Object.freeze([...v.values()]); } @@ -46469,7 +46500,7 @@ function Ake(e, { fields: t, rights: n, siblings: r }) { /** Fields in page order, for the reads that list some (read/value-checks.ts). */ inPageOrder: u, /** The required-field check of one form, for a check that answers of that form alone. */ - validationOf: d, + validationOf: f, api: { getSnapshot: () => t.view().snapshot, getStatus: t.getStatus, @@ -46483,26 +46514,26 @@ function Ake(e, { fields: t, rights: n, siblings: r }) { getValue: (p) => i(YS(t.view(), p)), getSelectedField: h, listSelectedFields: g, - validate: f, + validate: d, exportValues: c } }; } -const Ske = (e, t) => t === "" ? e : `${e}: ${t}`, c8 = (e, t) => t === null ? e : `${e}, ${t}`, Gz = (e) => e.kind === "text" || e.kind === "combobox" || e.kind === "signature" || au(e); +const Ske = (e, t) => t === "" ? e : `${e}: ${t}`, c8 = (e, t) => t === null ? e : `${e}, ${t}`, Gz = (e) => e.kind === "text" || e.kind === "combobox" || e.kind === "signature" || cu(e); function Jz(e, t, n) { const r = e.placeholder ?? t; return r === null || !N5(e, n) ? null : Gz(e) ? r : null; } function Yz(e, t) { - return e.kind === "signature" || au(e) ? "center" : t; + return e.kind === "signature" || cu(e) ? "center" : t; } -const Qz = (e) => (e.kind !== "pushbutton" || au(e)) && !e.readOnly && !(e.kind === "signature" && e.valueEntry.kind !== "none"), xke = Object.freeze({}); +const Qz = (e) => (e.kind !== "pushbutton" || cu(e)) && !e.readOnly && !(e.kind === "signature" && e.valueEntry.kind !== "none"), xke = Object.freeze({}); function Eke(e, t, n, r, o, s = xke) { - const i = Ft(e), a = s.owner ?? null, c = s.inGroup ?? null, l = s.marked ?? n.hasMark, u = r && Qz(e), d = { + const i = Kt(e), a = s.owner ?? null, c = s.inGroup ?? null, l = s.marked ?? n.hasMark, u = r && Qz(e), f = { key: i, fieldRef: e.ref, annotObjectNumber: t, - annotationRef: e.widgets.find((f) => f.objectNumber === t)?.ref ?? null, + annotationRef: e.widgets.find((d) => d.objectNumber === t)?.ref ?? null, ref: n.ref, groupId: e.groupId, assignment: e.assignment, @@ -46526,7 +46557,7 @@ function Eke(e, t, n, r, o, s = xke) { switch (e.kind) { case "text": return { - ...d, + ...f, control: "text", value: e.value, multiline: e.multiline, @@ -46535,34 +46566,34 @@ function Eke(e, t, n, r, o, s = xke) { comb: e.comb }; case "checkbox": { - const f = e.widgets.find( + const d = e.widgets.find( (h) => h.objectNumber === t ); return { - ...d, + ...f, control: "toggle", kind: "checkbox", checked: e.checked, - exportValue: f && "exportValue" in f ? f.exportValue : e.exportValue + exportValue: d && "exportValue" in d ? d.exportValue : e.exportValue }; } case "radio": { - const f = e.widgets.find( + const d = e.widgets.find( (g) => g.objectNumber === t - ), h = f && "exportValue" in f ? f.exportValue : ""; + ), h = d && "exportValue" in d ? d.exportValue : ""; return { - ...d, + ...f, label: c8(Ske(e.alternateName ?? e.name, h), a), control: "toggle", kind: "radio", - checked: f && "checked" in f ? f.checked : !1, + checked: d && "checked" in d ? d.checked : !1, exportValue: h, inGroup: c }; } case "combobox": return { - ...d, + ...f, control: "choice", kind: "combo", edit: e.edit, @@ -46572,7 +46603,7 @@ function Eke(e, t, n, r, o, s = xke) { }; case "listbox": return { - ...d, + ...f, control: "choice", kind: "list", edit: !1, @@ -46581,9 +46612,9 @@ function Eke(e, t, n, r, o, s = xke) { selected: e.selectedValues }; case "pushbutton": - return au(e) ? { ...d, control: "image", hasImage: e.hasImage } : { ...d, control: "button" }; + return cu(e) ? { ...f, control: "image", hasImage: e.hasImage } : { ...f, control: "button" }; case "signature": - return { ...d, control: "signature", signed: e.valueEntry.kind !== "none" }; + return { ...f, control: "signature", signed: e.valueEntry.kind !== "none" }; default: return null; } @@ -46815,7 +46846,7 @@ function Fke({ } function $a(e) { if (e?.signal?.aborted) - throw new re("operation-cancelled", "form", "operation cancelled", { + throw new te("operation-cancelled", "form", "operation cancelled", { cause: e.signal.reason }); } @@ -46857,18 +46888,18 @@ function Kke(e, { }, s) { const i = async () => { if (t.getStatus() !== "ready" && (await t.settled(), t.getStatus() !== "ready" && (await t.ensureLoaded(), t.getStatus() !== "ready"))) - throw e.assertAllowed("doc.forms.read", $ke), new re("not-ready", "form", "the form has not been read"); - }, a = (f) => s.inPageOrder( - (f.snapshot?.fields ?? []).filter( - (h) => n.mayFill(h) && !S5(h) && !$2(f, h) + throw e.assertAllowed("doc.forms.read", $ke), new te("not-ready", "form", "the form has not been read"); + }, a = (d) => s.inPageOrder( + (d.snapshot?.fields ?? []).filter( + (h) => n.mayFill(h) && !S5(h) && !$2(d, h) ) - ), c = (f) => { - const h = I5(f), g = h ? gO(f, h, e.clock.today()) : null; - return g?.status === "rejected" ? { field: f, message: g.message } : null; - }, l = async (f, h) => { - const g = f.snapshot; + ), c = (d) => { + const h = I5(d), g = h ? gO(d, h, e.clock.today()) : null; + return g?.status === "rejected" ? { field: d, message: g.message } : null; + }, l = async (d, h) => { + const g = d.snapshot; if (!g) return []; - const p = a(f), m = r.checker(f); + const p = a(d), m = r.checker(d); if (!m) return p.flatMap((C) => { const k = c(C); @@ -46885,7 +46916,7 @@ function Kke(e, { $a(h); const N = await C.check(g, k.ref); if (N.status === "failed") - throw new re( + throw new te( "operation-failed", "form", N.error?.message ?? `the rules of field '${k.name}' could not be run` @@ -46895,28 +46926,28 @@ function Kke(e, { }), p.flatMap((C) => v.get(C) ?? []); }; return { - api: { validateValues: async (f) => { - $a(f); + api: { validateValues: async (d) => { + $a(d); try { - return t.view().snapshot || await e.cancellable(f?.signal, t.settled()), await e.cancellable( - f?.signal, + return t.view().snapshot || await e.cancellable(d?.signal, t.settled()), await e.cancellable( + d?.signal, o(async () => { await i(); - const h = t.view(), g = s.validationOf(h), p = await l(h, f); + const h = t.view(), g = s.validationOf(h), p = await l(h, d); return { ...g, valid: g.valid && p.length === 0, invalid: p }; - }, f) + }, d) ); } catch (h) { - throw qe("form", h); + throw ze("form", h); } } }, - host: { validateConfirmed: async (f) => { - $a(f); + host: { validateConfirmed: async (d) => { + $a(d); try { - const h = await e.cancellable(f?.signal, e.doc.forms.list()), g = Rz(Pz(), h), p = s.validationOf(g), m = await l(g, f); + const h = await e.cancellable(d?.signal, e.doc.forms.list()), g = Rz(Pz(), h), p = s.validationOf(g), m = await l(g, d); return { ...p, valid: p.valid && m.length === 0, invalid: m, snapshot: h }; } catch (h) { - throw qe("form", h); + throw ze("form", h); } } } }; @@ -46934,19 +46965,19 @@ function Wke(e, { groups: l, purposes: u }) { - const d = (C) => t.settled(), f = Mn( + const f = (C) => t.settled(), d = Mn( (C) => [t.view()], (C, k) => Wve(k, C) ), h = (C, k) => { const N = e.getPage(C)?.ref; - return N ? Yve(t.view(), f(N.objectNumber), k) : null; + return N ? Yve(t.view(), d(N.objectNumber), k) : null; }, g = (C) => { - const k = i.annotation()?.getImageGhost(Lt(C))?.into; + const k = i.annotation()?.getImageGhost(Ft(C))?.into; return k ? yn(k) : null; }, p = Mn( (C) => [ t.view(), - f(C), + d(C), g(C), n.key(), e.settings().get().fillable, @@ -46995,7 +47026,7 @@ function Wke(e, { getWidgetPainting: r.getWidgetPainting, getTextEditorLayout: r.getTextEditorLayout, getWidgetFontCss: r.getWidgetFontCss, - ensureLoaded: d, + ensureLoaded: f, getWidgetAt: h, getPageBox: m, getWidgetAnchor: S, @@ -47014,9 +47045,9 @@ const s0 = (e, t) => ({ field: t, widgets: U2(e, t) }); -function Md(e, t) { - return t.length === 0 ? e : fo( - uo( +function _d(e, t) { + return t.length === 0 ? e : ho( + fo( e, t.map((n) => n.field) ), @@ -47037,30 +47068,30 @@ function Gke(e, t) { switch (t.type) { case "forms.setValue": { const n = yt(e, t.field); - return n ? Md(e, [P7(s0(e, n), t.value)]) : e; + return n ? _d(e, [P7(s0(e, n), t.value)]) : e; } case "forms.reset": { const n = t.fields ? t.fields.flatMap((r) => yt(e, r) ?? []) : tW(e); - return Md( + return _d( e, n.map((r) => FZ(s0(e, r))) ); } case "forms.setDisplay": { const n = yt(e, t.field); - return n ? fo(e, VZ(U2(e, n), t.display)) : e; + return n ? ho(e, VZ(U2(e, n), t.display)) : e; } // The engine predicts no image; the field holds one, or none, as the op says. The picture // shows once the engine has drawn it. case "forms.setButtonImage": { const n = yt(e, t.field); - return n?.kind === "pushbutton" ? uo(e, [{ ...n, hasImage: t.image !== null }]) : e; + return n?.kind === "pushbutton" ? fo(e, [{ ...n, hasImage: t.image !== null }]) : e; } case "forms.restore": - return Md(e, [t]); + return _d(e, [t]); case "forms.restoreWidget": { - const n = fo(e, [t.widget]); - return t.field ? uo(n, [t.field]) : n; + const n = ho(e, [t.widget]); + return t.field ? fo(n, [t.field]) : n; } case "forms.create": return nW(e, t); @@ -47074,13 +47105,13 @@ function Gke(e, t) { return e; case "forms.update": { const n = yt(e, t.field); - return n ? Md(e, [UZ(s0(e, n), t.patch)]) : e; + return n ? _d(e, [UZ(s0(e, n), t.patch)]) : e; } case "forms.delete": { const n = yt(e, t.field); if (!n || !e.snapshot) return e; - const r = wm(Mz(e, n.ref), n.widgets); - return Rd( + const r = vm(Mz(e, n.ref), n.widgets); + return Md( r, e.snapshot.calculationOrder.filter((o) => !Jke(o, n.ref)) ); @@ -47088,17 +47119,17 @@ function Gke(e, t) { case "forms.updateWidget": { const n = ZS(e, t.widget); return n ? QS( - fo(e, [N7(n, t.patch)]), + ho(e, [N7(n, t.patch)]), wn(e, mO(n)) ) : e; } case "forms.deleteWidget": { const n = ZS(e, t.widget); if (!n) return e; - const r = mO(n), o = wn(e, r), s = wm(e, [{ objectNumber: r, page: n.page }]); + const r = mO(n), o = wn(e, r), s = vm(e, [{ objectNumber: r, page: n.page }]); if (!o) return s; const i = o.widgets.filter((a) => a.objectNumber !== r); - return QS(uo(s, [{ ...o, widgets: i }]), o); + return QS(fo(s, [{ ...o, widgets: i }]), o); } case "forms.reorderWidgets": { if (!e.snapshot) return e; @@ -47110,9 +47141,9 @@ function Gke(e, t) { const n = e.snapshot.calculationOrder.filter( (r) => r !== null ); - return Rd( + return Md( e, - iS(n, t.fields, t.position, bm) + iS(n, t.fields, t.position, wm) ); } default: @@ -47122,7 +47153,7 @@ function Gke(e, t) { return e; } } -const ZS = (e, t) => t.kind === "objectNumber" ? xn(e, t.objectNumber) : null, Jke = (e, t) => e !== null && bm(e) === bm(t); +const ZS = (e, t) => t.kind === "objectNumber" ? xn(e, t.objectNumber) : null, Jke = (e, t) => e !== null && wm(e) === wm(t); function nW(e, t) { const n = t.draft.widgets ?? [], r = t.widgetObjectNumbers ?? []; if (t.objectNumber === void 0 || r.length !== n.length) return e; @@ -47136,8 +47167,8 @@ function nW(e, t) { page: c.page, objectNumber: r[l] })) - }), i = o.formKind === "none" ? k5({ ...o, formKind: "acroform" }, e.pictureVersions) : e, a = Md(i, [s]); - return t.draft.actions?.calculate ? Rd(a, [...o.calculationOrder, s.field.ref]) : a; + }), i = o.formKind === "none" ? k5({ ...o, formKind: "acroform" }, e.pictureVersions) : e, a = _d(i, [s]); + return t.draft.actions?.calculate ? Md(a, [...o.calculationOrder, s.field.ref]) : a; } function rW(e, t) { const { snapshot: n } = e; @@ -47180,10 +47211,10 @@ function Yke(e, t) { widgetObjectNumbers: r.widgetObjectNumbers }); const s = yt(n, o); - s && (n = fo( + s && (n = ho( n, U2(n, s).map((i, a) => N7(i, r.flags[a] ?? {})) - ), r.value && (n = Md(n, [P7(s0(n, s), r.value)]))); + ), r.value && (n = _d(n, [P7(s0(n, s), r.value)]))); } return n; } @@ -47191,7 +47222,7 @@ function Qke(e, t) { if (t.objectNumber === void 0 || t.splitObjectNumber !== void 0) return e; const n = yt(e, t.field); if (!n || n.kind === "unknown" || n.ref.kind !== "objectNumber" || xn(e, t.objectNumber)) return e; - const r = "options" in n ? { options: n.options.map(({ label: c, value: l }) => ({ label: c, value: l })) } : {}, o = au(n) ? { ...t.placement, actions: y7(t.placement.actions) } : t.placement, s = f6( + const r = "options" in n ? { options: n.options.map(({ label: c, value: l }) => ({ label: c, value: l })) } : {}, o = cu(n) ? { ...t.placement, actions: y7(t.placement.actions) } : t.placement, s = f6( { kind: n.kind, name: n.name, ...r, widgets: [o] }, { objectNumber: n.ref.objectNumber, @@ -47199,8 +47230,8 @@ function Qke(e, t) { } ), [i] = s.field.widgets, [a] = s.widgets; return !i || !a ? e : QS( - fo( - uo(e, [{ ...n, widgets: [...n.widgets, i] }]), + ho( + fo(e, [{ ...n, widgets: [...n.widgets, i] }]), [a] ), n @@ -47208,7 +47239,7 @@ function Qke(e, t) { } function Wy(e, t) { const n = /* @__PURE__ */ new Map(), r = (o) => { - o && !n.has(Ft(o)) && n.set(Ft(o), o); + o && !n.has(Kt(o)) && n.set(Kt(o), o); }; for (const o of t) switch (o.type) { @@ -47226,10 +47257,10 @@ function Wy(e, t) { return [...n.values()]; } function Xke(e, t, n) { - return Md( + return _d( e, n.flatMap((r) => { - const o = Ya(t, Ft(r)); + const o = Ya(t, Kt(r)); return o ? [s0(t, o)] : []; }) ); @@ -47301,7 +47332,7 @@ function Zke(e, t) { return Wy(e, [t]).map((n) => _C(e, n)); } } -function kl(e, t) { +function Al(e, t) { const n = []; let r = e; for (const o of t) @@ -47355,48 +47386,48 @@ const tAe = 2e3, oW = (e) => e.takesCursor?.() ?? !0, LC = (e, t) => oW(e) && e. function nAe(e, t, n) { const r = /* @__PURE__ */ new Map(); let o = null, s = null, i = null; - const a = (d) => { - const f = e.state.get().focused; - if (f?.widget === d?.widget && f?.field === d?.field) return; - e.state.update((p) => ({ ...p, focused: d })); - const h = d ? Ya(t.view(), d.field) : null, g = d ? xn(t.view(), d.widget) : null; + const a = (f) => { + const d = e.state.get().focused; + if (d?.widget === f?.widget && d?.field === f?.field) return; + e.state.update((p) => ({ ...p, focused: f })); + const h = f ? Ya(t.view(), f.field) : null, g = f ? xn(t.view(), f.widget) : null; n.focusChanged.emit({ field: h, widget: g?.ref ?? null }); }, c = () => { o?.expire(), o?.settle?.(), o = null; - }, l = (d) => { - d.settle ?? (d.settle = e.clock.after(0, () => { - if (d.settle = null, o !== d) return; - const f = r.get(d.widget); - f && (c(), LC(f, d.select) || d.onward?.()); + }, l = (f) => { + f.settle ?? (f.settle = e.clock.after(0, () => { + if (f.settle = null, o !== f) return; + const d = r.get(f.widget); + d && (c(), LC(d, f.select) || f.onward?.()); })); - }, u = (d, f) => { - LC(f, d.select) ? o === d && c() : l(d); + }, u = (f, d) => { + LC(d, f.select) ? o === f && c() : l(f); }; return { focused: () => e.state.get().focused, last: () => i, - note(d, f, h) { + note(f, d, h) { const g = yn(h); - if (d === "focus") { + if (f === "focus") { s?.(), s = null, o && o.widget !== g && c(); - const p = yt(t.view(), f); - i = g, a(p ? { field: Ft(p), widget: g } : null); + const p = yt(t.view(), d); + i = g, a(p ? { field: Kt(p), widget: g } : null); } else e.state.get().focused?.widget === g && (s?.(), s = e.clock.after(0, () => { s = null, a(null); })); }, - goTo(d, f, h) { - const g = yn(d.ref), p = r.get(g); + goTo(f, d, h) { + const g = yn(f.ref), p = r.get(g); if (p && !oW(p)) return "declined"; - const m = e.tryGet(Zt); - m?.reveal(d.page, { rect: d.rect }), c(); + const m = e.tryGet(tn); + m?.reveal(f.page, { rect: f.rect }), c(); const v = r.get(g); - if (v && LC(v, f)) return "taken"; + if (v && LC(v, d)) return "taken"; if (v && v === p) return "declined"; if (!m) return "unreachable"; const S = { widget: g, - select: f, + select: d, onward: h ?? null, expire: e.clock.after(tAe, () => { o === S && c(); @@ -47405,10 +47436,10 @@ function nAe(e, t, n) { }; return o = S, v && l(S), "taken"; }, - attach(d, f) { - const h = yn(d); - return r.set(h, f), o?.widget === h && u(o, f), () => { - r.get(h) === f && r.delete(h); + attach(f, d) { + const h = yn(f); + return r.set(h, d), o?.widget === h && u(o, d), () => { + r.get(h) === d && r.delete(h); }; } }; @@ -47434,7 +47465,7 @@ function oAe(e) { }; return e.state.onChange(({ previous: n, next: r }) => { n.designAssignment !== r.designAssignment && t.designGroupChanged.emit({ - groupId: nm(r.designAssignment), + groupId: rm(r.designAssignment), assignment: r.designAssignment }); }), t; @@ -47473,14 +47504,14 @@ function cAe(e, t) { if (i.type !== "forms.setAppearanceText") continue; const a = yt(s, i.field), c = a ? f8(a) : null; if (!a || c === null) continue; - const l = Ft(a), u = n.get(l) ?? /* @__PURE__ */ new Map(); + const l = Kt(a), u = n.get(l) ?? /* @__PURE__ */ new Map(); for (u.delete(c), u.set(c, i.text); u.size > aAe; ) u.delete(u.keys().next().value); n.set(l, u), r += 1; } }), { textOf(o) { const s = f8(o); - return s === null ? null : n.get(Ft(o))?.get(s) ?? null; + return s === null ? null : n.get(Kt(o))?.get(s) ?? null; }, version: () => r }; @@ -47495,16 +47526,16 @@ const h8 = Object.freeze([ "#ca8a04", "#65a30d" ]), V1 = "doc.forms.modify", p8 = "Anyone", lAe = "form.fields.tintColor", uAe = "form.fields.anyoneTintColor", dAe = /* @__PURE__ */ new Map(); -function Hd(e) { +function Wd(e) { try { return KF({ kind: "text", assignment: e ?? null }); } catch (t) { - throw qe("form", t); + throw ze("form", t); } } const fAe = (e) => { try { - return Hd(e), !0; + return Wd(e), !0; } catch { return !1; } @@ -47546,14 +47577,14 @@ function hAe(e, t, n) { ), a = tt( () => [e.settings().get().fields.anyoneTintColor, e.settings().get().fields.tint], (h, g) => h !== null && g > 0 ? Object.freeze({ color: h, strength: g, setting: uAe }) : null - ), c = e.tryGet(vo), l = tt( + ), c = e.tryGet(ko), l = tt( () => [c?.getTranslator() ?? null], (h) => h?.("form.anyone", { fallback: p8 }) ?? p8 ); e.state.onChange(({ previous: h, next: g }) => { h.groups !== g.groups && n.groupsChanged.emit({ groups: o() }); }); - const u = (h) => e.doc.security.allowsField("set-group", { groupId: h }), d = () => e.doc.security.fieldRights().setGroup.all, f = (h, g) => new re("permission-denied", "form", `${h} requires ${g}`, { + const u = (h) => e.doc.security.allowsField("set-group", { groupId: h }), f = () => e.doc.security.fieldRights().setGroup.all, d = (h, g) => new te("permission-denied", "form", `${h} requires ${g}`, { permission: g }); return { @@ -47563,35 +47594,35 @@ function hAe(e, t, n) { anyoneLabel: l, maySet: (h) => e.allows(V1) && u(h), assertMaySet: (h, g) => { - if (e.assertAllowed(V1, g), !u(h)) throw f(g, `fields:set-group:group=${h}`); + if (e.assertAllowed(V1, g), !u(h)) throw d(g, `fields:set-group:group=${h}`); }, - mayAssign: (h) => fAe(h) && e.allows(V1) && (h.kind === "group" ? u(h.groupId) : h.kind === "anyone" ? d() : !0), + mayAssign: (h) => fAe(h) && e.allows(V1) && (h.kind === "group" ? u(h.groupId) : h.kind === "anyone" ? f() : !0), assertMayAssign: (h, g) => { e.assertAllowed(V1, g); - const p = Hd(h); + const p = Wd(h); if (p.kind === "group" && !u(p.groupId)) - throw f(g, `fields:set-group:group=${p.groupId}`); - if (p.kind === "anyone" && !d()) - throw f(g, "fields:set-group:all"); + throw d(g, `fields:set-group:group=${p.groupId}`); + if (p.kind === "anyone" && !f()) + throw d(g, "fields:set-group:all"); } }; } -const lt = Math.fround, pAe = [3]; -function yo(e, t, n = t) { +const ut = Math.fround, pAe = [3]; +function bo(e, t, n = t) { const r = Math.min(e.left, e.right), o = Math.max(e.left, e.right), s = Math.min(e.bottom, e.top), i = Math.max(e.bottom, e.top); - return { left: lt(r + t), bottom: lt(s + n), right: lt(o - t), top: lt(i - n) }; + return { left: ut(r + t), bottom: ut(s + n), right: ut(o - t), top: ut(i - n) }; } const ys = (e) => ({ op: "rect", x: e.left, y: e.bottom, - width: lt(e.right - e.left), - height: lt(e.top - e.bottom) -}), kg = (e) => [ + width: ut(e.right - e.left), + height: ut(e.top - e.bottom) +}), Ag = (e) => [ parseInt(e.slice(1, 3), 16) / 255, parseInt(e.slice(3, 5), 16) / 255, parseInt(e.slice(5, 7), 16) / 255 -], Lf = [0, 0, 0]; +], jf = [0, 0, 0]; function sW(e) { const t = e.borderStyle ?? "solid", n = e.strokeWidth ?? 1; return { @@ -47603,13 +47634,13 @@ function sW(e) { function P5(e, t, n) { const r = t.width; if (r <= 0) return []; - const { left: o, bottom: s, right: i, top: a } = e, c = lt(r / 2), l = (d, f) => ({ x: d, y: f }), u = (d) => d.map((f, h) => ({ op: h === 0 ? "move" : "line", x: f.x, y: f.y })); + const { left: o, bottom: s, right: i, top: a } = e, c = ut(r / 2), l = (f, d) => ({ x: f, y: d }), u = (f) => f.map((d, h) => ({ op: h === 0 ? "move" : "line", x: d.x, y: d.y })); switch (t.style) { case "solid": return n ? [ { kind: "fill", - path: [ys(e), ys(yo(e, r))], + path: [ys(e), ys(bo(e, r))], color: n, evenOdd: !0 } @@ -47619,11 +47650,11 @@ function P5(e, t, n) { { kind: "stroke", path: u([ - l(lt(o + c), lt(s + c)), - l(lt(o + c), lt(a - c)), - l(lt(i - c), lt(a - c)), - l(lt(i - c), lt(s + c)), - l(lt(o + c), lt(s + c)) + l(ut(o + c), ut(s + c)), + l(ut(o + c), ut(a - c)), + l(ut(i - c), ut(a - c)), + l(ut(i - c), ut(s + c)), + l(ut(o + c), ut(s + c)) ]), color: n, width: r, @@ -47632,32 +47663,32 @@ function P5(e, t, n) { ] : []; case "beveled": case "inset": { - const d = t.style === "beveled", f = d ? 1 : 0.5, h = d ? 0.5 : 0.75, g = [ + const f = t.style === "beveled", d = f ? 1 : 0.5, h = f ? 0.5 : 0.75, g = [ { kind: "fill", path: [ ...u([ - l(lt(o + c), lt(s + c)), - l(lt(o + c), lt(a - c)), - l(lt(i - c), lt(a - c)), - l(lt(i - r), lt(a - r)), - l(lt(o + r), lt(a - r)), - l(lt(o + r), lt(s + r)) + l(ut(o + c), ut(s + c)), + l(ut(o + c), ut(a - c)), + l(ut(i - c), ut(a - c)), + l(ut(i - r), ut(a - r)), + l(ut(o + r), ut(a - r)), + l(ut(o + r), ut(s + r)) ]) ], - color: [f, f, f], + color: [d, d, d], evenOdd: !1 }, { kind: "fill", path: [ ...u([ - l(lt(i - c), lt(a - c)), - l(lt(i - c), lt(s + c)), - l(lt(o + c), lt(s + c)), - l(lt(o + r), lt(s + r)), - l(lt(i - r), lt(s + r)), - l(lt(i - r), lt(a - r)) + l(ut(i - c), ut(a - c)), + l(ut(i - c), ut(s + c)), + l(ut(o + c), ut(s + c)), + l(ut(o + r), ut(s + r)), + l(ut(i - r), ut(s + r)), + l(ut(i - r), ut(a - r)) ]) ], color: [h, h, h], @@ -47666,7 +47697,7 @@ function P5(e, t, n) { ]; return n && g.push({ kind: "fill", - path: [ys(e), ys(yo(e, c))], + path: [ys(e), ys(bo(e, c))], color: n, evenOdd: !0 }), g; @@ -47675,7 +47706,7 @@ function P5(e, t, n) { return n ? [ { kind: "stroke", - path: u([l(o, lt(s + c)), l(i, lt(s + c))]), + path: u([l(o, ut(s + c)), l(i, ut(s + c))]), color: n, width: r, dash: null @@ -47684,14 +47715,14 @@ function P5(e, t, n) { } } function R5(e, t, n, r) { - const o = t.width, s = o > 0 ? yo(e, lt(o / 2)) : e, i = []; + const o = t.width, s = o > 0 ? bo(e, ut(o / 2)) : e, i = []; return n && i.push({ kind: "fill", path: [ys(s)], color: n, evenOdd: !0 }), r && o > 0 && i.push({ kind: "stroke", path: [ys(s)], color: r, width: o, dash: null }), i; } function iW(e, t, n, r) { const o = t.width, s = []; return n && s.push({ kind: "fill", path: [ys(e)], color: n, evenOdd: !0 }), t.style !== "solid" ? s.push(...P5(e, t, r)) : r && o > 0 && s.push({ kind: "stroke", - path: [ys(yo(e, lt(o / 2)))], + path: [ys(bo(e, ut(o / 2)))], color: r, width: o, dash: null @@ -47716,7 +47747,7 @@ const Tn = Math.fround, T5 = (e) => e < 1e-4 && e > -1e-4, g8 = (e, t) => e > t runs: mAe(e) }), M5 = { multiline: !1, password: !1, limit: 0, cells: 0 }; function yO(e, t) { - const n = e.border.width, r = yo(e.bbox, Tn(2 * n), n), o = t.maxLength ?? 0, s = K2(e, t.value, { + const n = e.border.width, r = bo(e.bbox, Tn(2 * n), n), o = t.maxLength ?? 0, s = K2(e, t.value, { plate: r, alignment: e.alignment, multiline: t.multiline, @@ -47729,10 +47760,10 @@ function yO(e, t) { return { plate: r, laid: s }; } function yAe(e, t) { - const { bbox: n, border: r } = e, o = r.width, s = iW(n, r, e.background, e.borderColor), { laid: i } = yO(e, t), a = H0(i, e.textColor ?? Lf); + const { bbox: n, border: r } = e, o = r.width, s = iW(n, r, e.background, e.borderColor), { laid: i } = yO(e, t), a = H0(i, e.textColor ?? jf); return s.push({ kind: "clip", - rect: yo(n, o), + rect: bo(n, o), ops: B5(a) ? [a] : [] }), { ops: s, missing: i.missing }; } @@ -47740,23 +47771,23 @@ const B5 = (e) => e.kind === "text" && e.runs.length > 0; function bAe(e, t) { const { bbox: n, border: r } = e, o = []; e.background && o.push({ kind: "fill", path: [ys(n)], color: e.background, evenOdd: !1 }), o.push(...P5(n, r, e.borderColor)); - const s = yo(n, r.width, r.width), i = y8({ ...s, left: Tn(s.right - 13) }), a = yo(y8({ ...s, right: i.left }), 4, 0), c = K2(e, t.value, { + const s = bo(n, r.width, r.width), i = y8({ ...s, left: Tn(s.right - 13) }), a = bo(y8({ ...s, right: i.left }), 4, 0), c = K2(e, t.value, { ...M5, plate: a, alignment: 0, centered: !0 - }), l = H0(c, e.textColor ?? Lf); + }), l = H0(c, e.textColor ?? jf); if (B5(l) && o.push({ kind: "clip", rect: a, ops: [l] }), !AAe(i)) { - const u = Tn(Tn(i.left + i.right) / 2), d = Tn(Tn(i.top + i.bottom) / 2), f = Tn(i.right - i.left), h = Tn(i.top - i.bottom); - g8(f, 6) && g8(h, 6) && o.push({ + const u = Tn(Tn(i.left + i.right) / 2), f = Tn(Tn(i.top + i.bottom) / 2), d = Tn(i.right - i.left), h = Tn(i.top - i.bottom); + g8(d, 6) && g8(h, 6) && o.push({ kind: "fill", path: [ - { op: "move", x: Tn(u - 3), y: Tn(d + 1.5) }, - { op: "line", x: Tn(u + 3), y: Tn(d + 1.5) }, - { op: "line", x: u, y: Tn(d - 1.5) }, - { op: "line", x: Tn(u - 3), y: Tn(d + 1.5) } + { op: "move", x: Tn(u - 3), y: Tn(f + 1.5) }, + { op: "line", x: Tn(u + 3), y: Tn(f + 1.5) }, + { op: "line", x: u, y: Tn(f - 1.5) }, + { op: "line", x: Tn(u - 3), y: Tn(f + 1.5) } ], - color: Lf, + color: jf, evenOdd: !1 }); } @@ -47766,11 +47797,11 @@ const wAe = [0, 51 / 255, 113 / 255], m8 = [1, 1, 1]; function vAe(e, t) { const { bbox: n, border: r } = e, o = []; e.background && o.push({ kind: "fill", path: [ys(n)], color: e.background, evenOdd: !1 }), o.push(...P5(n, r, e.borderColor)); - const s = yo(n, r.width, r.width), i = [], a = /* @__PURE__ */ new Set(); - let c = s.top, l = Lf; + const s = bo(n, r.width, r.width), i = [], a = /* @__PURE__ */ new Set(); + let c = s.top, l = jf; const u = t.topIndex < 0 ? t.options.length : t.topIndex; - for (let d = u; d < t.options.length && !gAe(c, s.bottom); d += 1) { - const f = t.options[d], h = K2(e, f.label, { + for (let f = u; f < t.options.length && !gAe(c, s.bottom); f += 1) { + const d = t.options[f], h = K2(e, d.label, { ...M5, plate: { left: s.left, bottom: c, right: s.right, top: c }, fontSize: e.fontSize === 0 || T5(e.fontSize) ? 12 : e.fontSize, @@ -47779,7 +47810,7 @@ function vAe(e, t) { }); for (const p of h.missing) a.add(p); const g = h.contentHeight; - f.selected ? (i.push({ + d.selected ? (i.push({ kind: "fill", path: [ys({ left: s.left, bottom: Tn(c - g), right: s.right, top: c })], color: wAe, @@ -47791,8 +47822,8 @@ function vAe(e, t) { function kAe(e, t) { const { bbox: n, border: r } = e, o = R5(n, r, e.background, e.borderColor); if (!t) return { ops: o, missing: [] }; - const s = yo(n, Tn(2 * r.width), r.width), i = K2(e, t, { ...M5, plate: s, alignment: 1, centered: !0 }), a = H0(i, e.textColor ?? Lf); - return B5(a) && o.push({ kind: "clip", rect: yo(n, r.width), ops: [a] }), { ops: o, missing: i.missing }; + const s = bo(n, Tn(2 * r.width), r.width), i = K2(e, t, { ...M5, plate: s, alignment: 1, centered: !0 }), a = H0(i, e.textColor ?? jf); + return B5(a) && o.push({ kind: "clip", rect: bo(n, r.width), ops: [a] }), { ops: o, missing: i.missing }; } function y8(e) { return { @@ -47802,11 +47833,11 @@ function y8(e) { top: Math.max(e.bottom, e.top) }; } -const AAe = (e) => e.left >= e.right || e.bottom >= e.top, ve = Math.fround, Oo = ve(0.5522847498308), b8 = ve(0.5523); +const AAe = (e) => e.left >= e.right || e.bottom >= e.top, we = Math.fround, Po = we(0.5522847498308), b8 = we(0.5523); function SAe(e, t) { const n = R5(e.bbox, e.border, e.background, e.borderColor); if (!t) return n; - const r = e.checkStyle ?? "check", o = yo(e.bbox, e.border.width); + const r = e.checkStyle ?? "check", o = bo(e.bbox, e.border.width); return n.push(cW(e, r, aW(o, r, !1))), n; } function xAe(e, t) { @@ -47814,88 +47845,88 @@ function xAe(e, t) { if (n !== "circle") { const h = R5(e.bbox, e.border, e.background, e.borderColor); return t && h.push( - cW(e, n, aW(yo(e.bbox, e.border.width), n, !0)) + cW(e, n, aW(bo(e.bbox, e.border.width), n, !0)) ), h; } - const { bbox: r, border: o } = e, s = o.width, i = ve(s / 2), a = ve(ve(r.left + r.right) / 2), c = ve(ve(r.bottom + r.top) / 2), l = ve(ve(r.right - r.left) / 2), u = ve(ve(r.top - r.bottom) / 2), d = [], f = w8(a, c, ve(l - i), ve(u - i)); - return e.background && d.push({ kind: "fill", path: f, color: e.background, evenOdd: !0 }), e.borderColor && s > 0 && d.push({ kind: "stroke", path: f, color: e.borderColor, width: s, dash: null }), t && d.push({ + const { bbox: r, border: o } = e, s = o.width, i = we(s / 2), a = we(we(r.left + r.right) / 2), c = we(we(r.bottom + r.top) / 2), l = we(we(r.right - r.left) / 2), u = we(we(r.top - r.bottom) / 2), f = [], d = w8(a, c, we(l - i), we(u - i)); + return e.background && f.push({ kind: "fill", path: d, color: e.background, evenOdd: !0 }), e.borderColor && s > 0 && f.push({ kind: "stroke", path: d, color: e.borderColor, width: s, dash: null }), t && f.push({ kind: "fill", path: w8( a, c, - ve(ve(l - s) * 0.5), - ve(ve(u - s) * 0.5) + we(we(l - s) * 0.5), + we(we(u - s) * 0.5) ), - color: e.symbolColor ?? Lf, + color: e.symbolColor ?? jf, evenOdd: !0 - }), d; + }), f; } function w8(e, t, n, r) { - const o = ve(b8 * n), s = ve(b8 * r); + const o = we(b8 * n), s = we(b8 * r); return [ - { op: "move", x: e, y: ve(t + r) }, + { op: "move", x: e, y: we(t + r) }, { op: "curve", - x1: ve(e + o), - y1: ve(t + r), - x2: ve(e + n), - y2: ve(t + s), - x: ve(e + n), + x1: we(e + o), + y1: we(t + r), + x2: we(e + n), + y2: we(t + s), + x: we(e + n), y: t }, { op: "curve", - x1: ve(e + n), - y1: ve(t - s), - x2: ve(e + o), - y2: ve(t - r), + x1: we(e + n), + y1: we(t - s), + x2: we(e + o), + y2: we(t - r), x: e, - y: ve(t - r) + y: we(t - r) }, { op: "curve", - x1: ve(e - o), - y1: ve(t - r), - x2: ve(e - n), - y2: ve(t - s), - x: ve(e - n), + x1: we(e - o), + y1: we(t - r), + x2: we(e - n), + y2: we(t - s), + x: we(e - n), y: t }, { op: "curve", - x1: ve(e - n), - y1: ve(t + s), - x2: ve(e - o), - y2: ve(t + r), + x1: we(e - n), + y1: we(t + s), + x2: we(e - o), + y2: we(t + r), x: e, - y: ve(t + r) + y: we(t + r) }, { op: "close" } ]; } function aW(e, t, n) { - const r = ve(e.right - e.left), o = ve(e.top - e.bottom), s = r > o ? ve(o / 2) : ve(r / 2), i = ve(ve(e.left + e.right) / 2), a = ve(ve(e.top + e.bottom) / 2), c = { - left: ve(i - s), - bottom: ve(a - s), - right: ve(i + s), - top: ve(a + s) - }, l = t === "circle" ? ve(n ? 1 / 2 : 2 / 3) : t === "check" || t === "cross" ? 1 : ve(2 / 3); + const r = we(e.right - e.left), o = we(e.top - e.bottom), s = r > o ? we(o / 2) : we(r / 2), i = we(we(e.left + e.right) / 2), a = we(we(e.top + e.bottom) / 2), c = { + left: we(i - s), + bottom: we(a - s), + right: we(i + s), + top: we(a + s) + }, l = t === "circle" ? we(n ? 1 / 2 : 2 / 3) : t === "check" || t === "cross" ? 1 : we(2 / 3); if (l === 1) return c; - const u = ve(ve(c.right - c.left) / 2), d = ve(ve(c.top - c.bottom) / 2), f = ve(ve(c.left + c.right) / 2), h = ve(ve(c.top + c.bottom) / 2); + const u = we(we(c.right - c.left) / 2), f = we(we(c.top - c.bottom) / 2), d = we(we(c.left + c.right) / 2), h = we(we(c.top + c.bottom) / 2); return { - left: ve(f - ve(u * l)), - bottom: ve(h - ve(d * l)), - right: ve(f + ve(u * l)), - top: ve(h + ve(d * l)) + left: we(d - we(u * l)), + bottom: we(h - we(f * l)), + right: we(d + we(u * l)), + top: we(h + we(f * l)) }; } function cW(e, t, n) { - const r = e.symbolColor ?? Lf, o = ve(ve(n.left + n.right) / 2), s = ve(ve(n.bottom + n.top) / 2); + const r = e.symbolColor ?? jf, o = we(we(n.left + n.right) / 2), s = we(we(n.bottom + n.top) / 2); switch (t) { case "check": return { kind: "fill", path: CAe(n), color: r, evenOdd: !1 }; case "circle": { - const i = ve(ve(n.right - n.left) / 2), a = ve(ve(n.top - n.bottom) / 2), c = { x: n.left, y: s }, l = { x: o, y: n.top }, u = { x: n.right, y: s }, d = { x: o, y: n.bottom }; + const i = we(we(n.right - n.left) / 2), a = we(we(n.top - n.bottom) / 2), c = { x: n.left, y: s }, l = { x: o, y: n.top }, u = { x: n.right, y: s }, f = { x: o, y: n.bottom }; return { kind: "fill", path: [ @@ -47903,36 +47934,36 @@ function cW(e, t, n) { { op: "curve", x1: c.x, - y1: ve(c.y + ve(a * Oo)), - x2: ve(l.x - ve(i * Oo)), + y1: we(c.y + we(a * Po)), + x2: we(l.x - we(i * Po)), y2: l.y, x: l.x, y: l.y }, { op: "curve", - x1: ve(l.x + ve(i * Oo)), + x1: we(l.x + we(i * Po)), y1: l.y, x2: u.x, - y2: ve(u.y + ve(a * Oo)), + y2: we(u.y + we(a * Po)), x: u.x, y: u.y }, { op: "curve", x1: u.x, - y1: ve(u.y - ve(a * Oo)), - x2: ve(d.x + ve(i * Oo)), - y2: d.y, - x: d.x, - y: d.y + y1: we(u.y - we(a * Po)), + x2: we(f.x + we(i * Po)), + y2: f.y, + x: f.x, + y: f.y }, { op: "curve", - x1: ve(d.x - ve(i * Oo)), - y1: d.y, + x1: we(f.x - we(i * Po)), + y1: f.y, x2: c.x, - y2: ve(c.y - ve(a * Oo)), + y2: we(c.y - we(a * Po)), x: c.x, y: c.y } @@ -47979,13 +48010,13 @@ function cW(e, t, n) { evenOdd: !1 }; case "star": { - const i = ve(ve(n.top - n.bottom) / ve(1 + ve(Math.cos(Math.PI / 5)))), a = []; - let c = ve(Math.PI / 10); + const i = we(we(n.top - n.bottom) / we(1 + we(Math.cos(Math.PI / 5)))), a = []; + let c = we(Math.PI / 10); for (let l = 0; l < 5; l += 1) a.push([ - ve(o + ve(i * ve(Math.cos(c)))), - ve(s + ve(i * ve(Math.sin(c)))) - ]), c = ve(c + ve(Math.PI * 2 / 5)); + we(o + we(i * we(Math.cos(c)))), + we(s + we(i * we(Math.sin(c)))) + ]), c = we(c + we(Math.PI * 2 / 5)); return { kind: "fill", path: DC([a[0], a[2], a[4], a[1], a[3]]), @@ -48044,19 +48075,19 @@ const EAe = [ ] ]; function CAe(e) { - const t = ve(e.right - e.left), n = ve(e.top - e.bottom), r = EAe.map( + const t = we(e.right - e.left), n = we(e.top - e.bottom), r = EAe.map( (s) => s.map( - ([i, a]) => [ve(ve(ve(i) * t) + e.left), ve(ve(ve(a) * n) + e.bottom)] + ([i, a]) => [we(we(we(i) * t) + e.left), we(we(we(a) * n) + e.bottom)] ) ), o = [{ op: "move", x: r[0][0][0], y: r[0][0][1] }]; for (let s = 0; s < r.length; s += 1) { - const i = r[s], a = r[(s + 1) % r.length][0], [c, l] = i[0], u = ve(i[1][0] - c), d = ve(i[1][1] - l), f = ve(i[2][0] - a[0]), h = ve(i[2][1] - a[1]); + const i = r[s], a = r[(s + 1) % r.length][0], [c, l] = i[0], u = we(i[1][0] - c), f = we(i[1][1] - l), d = we(i[2][0] - a[0]), h = we(i[2][1] - a[1]); o.push({ op: "curve", - x1: ve(c + ve(u * Oo)), - y1: ve(l + ve(d * Oo)), - x2: ve(a[0] + ve(f * Oo)), - y2: ve(a[1] + ve(h * Oo)), + x1: we(c + we(u * Po)), + y1: we(l + we(f * Po)), + x2: we(a[0] + we(d * Po)), + y2: we(a[1] + we(h * Po)), x: a[0], y: a[1] }); @@ -48070,11 +48101,11 @@ function lW(e, t) { look: { bbox: { left: 0, bottom: 0, right: n.width, top: n.height }, border: sW(e), - background: e.interiorColor ? kg(e.interiorColor) : null, - borderColor: e.color ? kg(e.color) : null, + background: e.interiorColor ? Ag(e.interiorColor) : null, + borderColor: e.color ? Ag(e.color) : null, fonts: t ?? n5(e.fontFamily), fontSize: e.fontSize ?? 0, - textColor: e.fontColor ? kg(e.fontColor) : null, + textColor: e.fontColor ? Ag(e.fontColor) : null, alignment: IAe[e.textAlign ?? "left"] }, approximate: o === "symbol" || o === "zapf-dingbats" ? "symbolic-font" : o || t ? null : "font" @@ -48108,7 +48139,7 @@ function v8(e, t, n = {}) { } function OAe(e, t, n = {}, r) { if (!uW(t)) return null; - const o = e.box ?? e.rect, s = { left: 0, bottom: 0, right: o.width, top: o.height }, i = sW(e), a = e.interiorColor ? kg(e.interiorColor) : null, c = e.color ? kg(e.color) : null, l = e.fontColor ? kg(e.fontColor) : null, u = (p, m = null) => ({ + const o = e.box ?? e.rect, s = { left: 0, bottom: 0, right: o.width, top: o.height }, i = sW(e), a = e.interiorColor ? Ag(e.interiorColor) : null, c = e.color ? Ag(e.color) : null, l = e.fontColor ? Ag(e.fontColor) : null, u = (p, m = null) => ({ width: o.width, height: o.height, ops: p, @@ -48129,19 +48160,19 @@ function OAe(e, t, n = {}, r) { t.kind === "checkbox" ? SAe(p, m) : xAe(p, m) ); } - const d = lW(e, r), f = d.look; - let h = d.approximate; - const g = t.kind === "text" ? yAe(f, { + const f = lW(e, r), d = f.look; + let h = f.approximate; + const g = t.kind === "text" ? yAe(d, { value: n.text ?? t.value, multiline: t.multiline, password: t.password, comb: t.comb, maxLength: t.maxLength - }) : t.kind === "combobox" ? bAe(f, { value: n.text ?? t.value }) : t.kind === "listbox" ? vAe(f, { options: t.options, topIndex: t.topIndex }) : kAe(f, e.caption ?? null); + }) : t.kind === "combobox" ? bAe(d, { value: n.text ?? t.value }) : t.kind === "listbox" ? vAe(d, { options: t.options, topIndex: t.topIndex }) : kAe(d, e.caption ?? null); return g.missing.length > 0 && !r && (h ?? (h = "glyph")), u(g.ops, h); } function PAe(e, t) { - const n = O2(Gf(e.face.key)); + const n = O2(Yf(e.face.key)); return [...t.map((r) => `"${r.family}"`), n].join(", "); } function RAe(e, t) { @@ -48159,9 +48190,9 @@ function TAe(e, t, n, r) { password: t.password, comb: t.comb, maxLength: t.maxLength - }, { plate: i, laid: a } = yO(o, { ...s, value: n }), { bbox: c } = o, { face: l } = o.fonts, u = a.fontSize, d = RAe(o.fonts, a), f = { - programs: d, - fontFamily: PAe(o.fonts, d), + }, { plate: i, laid: a } = yO(o, { ...s, value: n }), { bbox: c } = o, { face: l } = o.fonts, u = a.fontSize, f = RAe(o.fonts, a), d = { + programs: f, + fontFamily: PAe(o.fonts, f), fontWeight: l.fontWeight, fontStyle: l.fontStyle, fontSize: u, @@ -48174,11 +48205,11 @@ function TAe(e, t, n, r) { left: i.left - c.left } }, h = t.comb ? t.maxLength ?? 0 : 0; - if (h === 0) return { ...f, letterSpacing: 0, comb: !1 }; + if (h === 0) return { ...d, letterSpacing: 0, comb: !1 }; const p = (n ? a : yO(o, { ...s, value: "0" }).laid).lines.flatMap((S) => S.runs), m = p.reduce((S, C) => S + C.width, 0) / Math.max(1, p.length), v = (i.right - i.left) / h; return { - ...f, - padding: { ...f.padding, left: (p[0]?.x ?? i.left) - c.left }, + ...d, + padding: { ...d.padding, left: (p[0]?.x ?? i.left) - c.left }, letterSpacing: v - m, comb: !0 }; @@ -48187,8 +48218,8 @@ const jC = (e) => `#${[...e].map( (t) => Math.round(Math.min(1, Math.max(0, t)) * 255).toString(16).padStart(2, "0") ).join("")}`, $1 = (e) => Number(e.toFixed(3)); function MAe(e, t) { - const { box: n } = t, r = ((t.rotation ?? 0) % 360 + 360) % 360, o = n.x + n.width / 2, s = n.y + n.height / 2, i = (d, f) => { - const h = n.x + d - o, g = n.y + (e.height - f) - s; + const { box: n } = t, r = ((t.rotation ?? 0) % 360 + 360) % 360, o = n.x + n.width / 2, s = n.y + n.height / 2, i = (f, d) => { + const h = n.x + f - o, g = n.y + (e.height - d) - s; switch (r) { case 90: return { x: o - g, y: s + h }; @@ -48199,38 +48230,38 @@ function MAe(e, t) { default: return { x: o + h, y: s + g }; } - }, a = (d) => { - const f = (h, g) => { + }, a = (f) => { + const d = (h, g) => { const p = i(h, g); return `${$1(p.x)} ${$1(p.y)}`; }; - return d.map((h) => { + return f.map((h) => { switch (h.op) { case "rect": { const { x: g, y: p, width: m, height: v } = h; - return `M ${f(g, p)} L ${f(g + m, p)} L ${f(g + m, p + v)} L ${f(g, p + v)} Z`; + return `M ${d(g, p)} L ${d(g + m, p)} L ${d(g + m, p + v)} L ${d(g, p + v)} Z`; } case "move": - return `M ${f(h.x, h.y)}`; + return `M ${d(h.x, h.y)}`; case "line": - return `L ${f(h.x, h.y)}`; + return `L ${d(h.x, h.y)}`; case "curve": - return `C ${f(h.x1, h.y1)} ${f(h.x2, h.y2)} ${f(h.x, h.y)}`; + return `C ${d(h.x1, h.y1)} ${d(h.x2, h.y2)} ${d(h.x, h.y)}`; case "close": return "Z"; } }).join(" "); - }, c = (d) => { - const f = i(d.left, d.bottom), h = i(d.right, d.top); + }, c = (f) => { + const d = i(f.left, f.bottom), h = i(f.right, f.top); return { - x: Math.min(f.x, h.x), - y: Math.min(f.y, h.y), - width: Math.abs(h.x - f.x), - height: Math.abs(h.y - f.y) + x: Math.min(d.x, h.x), + y: Math.min(d.y, h.y), + width: Math.abs(h.x - d.x), + height: Math.abs(h.y - d.y) }; - }, l = [], u = (d, f) => { - for (const h of d) { - const g = f ? { clip: f } : {}; + }, l = [], u = (f, d) => { + for (const h of f) { + const g = d ? { clip: d } : {}; switch (h.kind) { case "fill": { const p = { @@ -48280,7 +48311,7 @@ function MAe(e, t) { }; return u(e.ops, void 0), l; } -const BAe = Object.freeze([]), hh = (e) => e.kind === "objectNumber" ? e.objectNumber : -1; +const BAe = Object.freeze([]), gh = (e) => e.kind === "objectNumber" ? e.objectNumber : -1; function _Ae({ fields: e, formatted: t, @@ -48329,21 +48360,21 @@ function _Ae({ }, c = Mn( (m) => [e.view(), e.get(), t.version(), n.lending(), o()], (m, v, S, C, k) => k ? BAe : Gve(v, m, (N) => { - const w = hh(N.ref); + const w = gh(N.ref); return { pending: a(v, w) !== a(S, w), pictureVersion: dO(S, w) }; }) ), l = (m, v, S, C = !1) => { - const k = wn(e.view(), hh(m.ref)); + const k = wn(e.view(), gh(m.ref)); return k ? u(m, k, v, S, C) : null; }, u = (m, v, S, C, k) => { const N = t.textOf(v), w = N === null ? {} : { text: N }, y = s(m, v8(m, v, w)); if (y === null && !k) return null; const x = OAe({ ...m, box: S }, v, w, y ?? void 0); return x && MAe(x, { box: S, rotation: C }); - }, d = Mn( + }, f = Mn( (m) => { const v = e.view(), S = xn(v, m), C = S ? wn(v, m) : null; return [S, C, C ? t.textOf(C) : null, o()]; @@ -48352,9 +48383,9 @@ function _Ae({ const S = v && l(v, v.box ?? v.rect, v.rotation); return S ? { scene: S } : null; } - ), f = (m) => r()?.getFontCss(m) ?? hm(Gf(m)), h = (m, v) => { + ), d = (m) => r()?.getFontCss(m) ?? pm(Yf(m)), h = (m, v) => { if (!r() || !v || gs(v)) return m; - const S = f(v); + const S = d(v); return { ...m, programs: S.programs, @@ -48365,10 +48396,10 @@ function _Ae({ }, g = /* @__PURE__ */ new WeakMap(); return { listShownWidgets: (m) => c(m), - getWidgetPainting: (m) => d(hh(m)), + getWidgetPainting: (m) => f(gh(m)), /** The widget's look in the view isn't its confirmed look yet: it draws live until its picture is. */ isPending: (m) => { - const v = hh(m); + const v = gh(m); return a(e.view(), v) !== a(e.get(), v); }, /** @@ -48384,14 +48415,14 @@ function _Ae({ return g.set(m, { field: v, painter: C }), C; }, getTextEditorLayout: (m, v) => { - const S = e.view(), C = hh(m), k = xn(S, C), N = k ? wn(S, C) : null; + const S = e.view(), C = gh(m), k = xn(S, C), N = k ? wn(S, C) : null; if (!k || !N) return null; const w = s(k, v8(k, N, { text: v })), y = TAe(k, N, v, w ?? void 0); return y && (w ? y : h(y, k.fontFamily ?? null)); }, getWidgetFontCss: (m) => { - const v = xn(e.view(), hh(m)); - return v ? f(v.fontFamily ?? "helvetica") : null; + const v = xn(e.view(), gh(m)); + return v ? d(v.fontFamily ?? "helvetica") : null; } }; } @@ -48440,7 +48471,7 @@ const k8 = { return t?.kind === "date" ? t.pattern : VAe; }, UAe = (e) => Kz.includes(e), A8 = "Filled in when you sign"; function KAe(e) { - const t = e.tryGet(vo), n = tt( + const t = e.tryGet(ko), n = tt( () => [t?.getTranslator() ?? null], (i) => Object.freeze( Kz.map( @@ -48505,15 +48536,15 @@ function HAe(e, t) { * before it. What the open scripts ask for is dropped with the realm. */ checker: (l) => { - const { snapshot: u } = l, d = t.actions()?.createScratchScriptRealm; - return !u || !d || !JD(l) ? null : async (f) => { - const h = d(), g = hO({ + const { snapshot: u } = l, f = t.actions()?.createScratchScriptRealm; + return !u || !f || !JD(l) ? null : async (d) => { + const h = f(), g = hO({ document: () => e.document(), transaction: h.transaction.bind(h), budget: h.budget }); try { - return await g.warm(u), await g.transaction(f); + return await g.warm(u), await g.transaction(d); } finally { g.destroy(), h.destroy(); } @@ -48538,7 +48569,7 @@ function zAe(e) { /** The annotation plugin: design mode's selection, tools, ghosts and placement previews. */ annotation: () => e.tryGet(_n), /** The script realm owner and the one surface port for script results. */ - actions: () => e.tryGet(Dm), + actions: () => e.tryGet(jm), /** The page renderer: the widgets' pictures, shared by the form layer and design mode. */ render: () => e.tryGet(Pr) }; @@ -48554,8 +48585,8 @@ function WAe(e, t) { for (const c of s) { const l = yn(c.ref), u = wn(o, l); if (u?.kind !== "radio") continue; - const d = Ft(u), f = i.get(d); - f ? f.push(l) : i.set(d, [l]); + const f = Kt(u), d = i.get(f); + d ? d.push(l) : i.set(f, [l]); } const a = /* @__PURE__ */ new Map(); for (const c of i.values()) @@ -48593,7 +48624,7 @@ function qAe(e) { }; } function GAe(e, t, { fill: n }) { - const { fields: r, scripting: o, cursor: s } = t, i = async (f) => (await r.settled(), (f.kind === "objectNumber" ? xn(r.view(), f.objectNumber) : null)?.actions?.activate ?? null), a = async (f, h, g) => { + const { fields: r, scripting: o, cursor: s } = t, i = async (d) => (await r.settled(), (d.kind === "objectNumber" ? xn(r.view(), d.objectNumber) : null)?.actions?.activate ?? null), a = async (d, h, g) => { if (!o.controller()) return { status: "unchanged", @@ -48610,19 +48641,19 @@ function GAe(e, t, { fill: n }) { diagnostics: [] }; const { result: v } = await n( - { ops: [], scripts: { kind: "activate", field: f, action: m }, origin: "user" }, + { ops: [], scripts: { kind: "activate", field: d, action: m }, origin: "user" }, g ); return v; - }, c = (f, h) => ({ + }, c = (d, h) => ({ kind: "widget", - field: f, + field: d, annotation: h, page: h.page }); let l = null; - const u = (f) => (l ?? (l = gR(f.dispatch)), l), d = (f) => { - const h = f.kind === "objectNumber" ? xn(r.view(), f.objectNumber) : null; + const u = (d) => (l ?? (l = gR(d.dispatch)), l), f = (d) => { + const h = d.kind === "objectNumber" ? xn(r.view(), d.objectNumber) : null; return h ? { enter: !!h.actions?.cursorEnter?.root, exit: !!h.actions?.cursorExit?.root @@ -48630,38 +48661,38 @@ function GAe(e, t, { fill: n }) { }; return { api: { - activateWidget: async (f, h) => { - const g = wn(r.view(), yn(f)); - if (!g) throw new re("not-found", "form", "no form field owns this widget"); + activateWidget: async (d, h) => { + const g = wn(r.view(), yn(d)); + if (!g) throw new te("not-found", "form", "no form field owns this widget"); const p = e.tryGet(Lr); if (p) { const m = await e.cancellable( h?.signal, p.dispatch({ type: "activate", - annotation: f, - page: f.page, - source: c(g.ref, f) + annotation: d, + page: d.page, + source: c(g.ref, d) }) ); if (!(m.status === "inert" && m.steps.length === 0 && m.diagnostics.length === 0)) return { status: "dispatched", result: m }; } return { status: "form", - result: await a(g.ref, f, h) + result: await a(g.ref, d, h) }; }, - notifyWidgetEvent: (f, h, g) => { - (g === "focus" || g === "blur") && s.note(g, f, h); + notifyWidgetEvent: (d, h, g) => { + (g === "focus" || g === "blur") && s.note(g, d, h); const p = e.tryGet(Lr); if (!p) return; - const m = c(f, h); + const m = c(d, h); if (g === "cursorEnter" || g === "cursorExit") { if (g === "cursorExit") { u(p).hover(null); return; } - const v = d(h); + const v = f(h); if (v && !v.enter && !v.exit) return; u(p).hover({ ref: h, @@ -48713,22 +48744,22 @@ function QAe(e, t, n, r) { const { snapshot: o } = e, s = n.offset ?? { x: 0, y: 0 }, i = [], a = t.map((m) => { const v = xn(e, S8(m)); if (!v || !o) - throw new re("not-found", "form", `no widget ${oe(m)}`); + throw new te("not-found", "form", `no widget ${oe(m)}`); return v; - }), c = [], l = [], u = [], d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Set(); + }), c = [], l = [], u = [], f = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Set(); for (const m of a) { const v = wn(e, S8(m.ref)); if (!v) { i.push({ ref: null, widget: m.ref, reason: "no-field" }); continue; } - const S = Ft(v); + const S = Kt(v); if (v.kind !== "radio") { - c.some((w) => Ft(w) === S) || c.push(v), l.push(m.ref); + c.some((w) => Kt(w) === S) || c.push(v), l.push(m.ref); continue; } - const C = d.get(S) ?? v.widgets.map((w) => w.exportValue), k = dW(C); - d.set(S, [...C, k]); + const C = f.get(S) ?? v.widgets.map((w) => w.exportValue), k = dW(C); + f.set(S, [...C, k]); const N = q7(v, m, (w) => w, r.mayScript, i); u.push({ row: m, @@ -48740,8 +48771,8 @@ function QAe(e, t, n, r) { exportValue: k }, // Only the first button added splits a merged group. - split: fW(v) && !f.has(S) - }), f.add(S); + split: fW(v) && !d.has(S) + }), d.add(S); } let h = null; c.length > 0 && o && (h = A6({ @@ -48808,7 +48839,7 @@ function XAe(e, t) { if (!n) return { x: 0, y: 0, width: 0, height: 0 }; const { width: r, height: o } = n, s = e.at(-2), i = s && (s.x !== n.x || s.y !== n.y) ? { x: n.x - s.x, y: n.y - s.y } : { x: 0, y: o * 1.5 }, a = { x: n.x + i.x, y: n.y + i.y, width: r, height: o }; if (x8(a, t)) return a; - const c = Math.abs(i.y) >= Math.abs(i.x), l = Math.min(...e.map((p) => p.x)), u = Math.min(...e.map((p) => p.y)), d = Math.max(...e.map((p) => p.x + p.width)), f = Math.max(...e.map((p) => p.y + p.height)), h = Math.max(c ? Math.abs(i.y) - o : Math.abs(i.x) - r, 0), g = c ? { x: d + (h || r / 2), y: u, width: r, height: o } : { x: l, y: f + (h || o / 2), width: r, height: o }; + const c = Math.abs(i.y) >= Math.abs(i.x), l = Math.min(...e.map((p) => p.x)), u = Math.min(...e.map((p) => p.y)), f = Math.max(...e.map((p) => p.x + p.width)), d = Math.max(...e.map((p) => p.y + p.height)), h = Math.max(c ? Math.abs(i.y) - o : Math.abs(i.x) - r, 0), g = c ? { x: f + (h || r / 2), y: u, width: r, height: o } : { x: l, y: d + (h || o / 2), width: r, height: o }; return x8(g, t) ? g : { x: Math.min(Math.max(a.x, 0), Math.max(t.width - r, 0)), y: Math.min(Math.max(a.y, 0), Math.max(t.height - o, 0)), @@ -48875,28 +48906,28 @@ function rSe(e, { fields: t, enqueue: n, groups: r }) { try { Ux(A.purpose), Lx(A.placeholder), b !== void 0 && _x(A, b); } catch (E) { - throw qe("form", E); + throw ze("form", E); } }, i = (A, b) => { if (!(b?.kind !== "anyone" || V2(A))) - throw new re("invalid-input", "form", Xve(A)); + throw new te("invalid-input", "form", Xve(A)); }, a = (A, b = !1) => { e.assertAllowed(E8, A), b && e.assertAllowed(C8, A); }, c = (A, b) => e.changes.stage({ label: { key: `form.${A}` }, ops: [b], - undo: kl(t.view(), [b]) + undo: Al(t.view(), [b]) }), l = (A, b) => e.changes.stage({ label: { key: `form.${A}` }, ops: [...b], - undo: kl(t.view(), b) + undo: Al(t.view(), b) }), u = async (A, b) => { try { return (await e.cancellable(b?.signal, A.result)).items[0]; } catch (E) { - throw qe("form", E); + throw ze("form", E); } - }, d = async (A, b) => { + }, f = async (A, b) => { a("form.create", U7(A)), typeof A.groupId == "string" && r.assertMaySet(A.groupId, "form.create"), A.assignment !== void 0 && r.assertMayAssign(A.assignment, "form.create"), s(A, A.kind), i(A, A.assignment); const E = 1 + (A.widgets?.length ?? 0), [I, ...O] = o.takeNow(E) ?? await o.take(E), T = c("create", { type: "forms.create", @@ -48905,29 +48936,29 @@ function rSe(e, { fields: t, enqueue: n, groups: r }) { widgetObjectNumbers: O }); return { field: (await u(T, b)).field }; - }, f = async (A, b = {}, E) => { - a("form.addWidget", Fd(b.actions)); + }, d = async (A, b = {}, E) => { + a("form.addWidget", $d(b.actions)); const I = t.view(), O = yt(I, A); - if (!O) throw new re("not-found", "form", "no form field has this ref"); - const T = O.widgets.map((le) => xn(I, le.objectNumber)).filter((le) => le !== null), R = T.at(-1), M = b.page ?? R?.page; + if (!O) throw new te("not-found", "form", "no form field has this ref"); + const T = O.widgets.map((ie) => xn(I, ie.objectNumber)).filter((ie) => ie !== null), R = T.at(-1), M = b.page ?? R?.page; if (!M) - throw new re( + throw new te( "invalid-input", "form", "the field shows on no page: give `page` and `rect`" ); - const F = e.getPage(M)?.size, B = T.filter((le) => le.page.objectNumber === M.objectNumber), $ = b.rect ?? b.box ?? (F && B.length > 0 ? XAe( + const F = e.getPage(M)?.size, _ = T.filter((ie) => ie.page.objectNumber === M.objectNumber), $ = b.rect ?? b.box ?? (F && _.length > 0 ? XAe( // Where each stands: the next one takes its place in line, and the last one's turn. - B.map((le) => le.rect), + _.map((ie) => ie.rect), F ) : void 0); if (!$) - throw new re( + throw new te( "invalid-input", "form", "no widget of the field on that page: give `rect`" ); - const D = b.exportValue ?? nSe(O), _ = fW(O), [L, j] = o.takeNow(_ ? 2 : 1) ?? await o.take(_ ? 2 : 1), H = c("addWidget", { + const D = b.exportValue ?? nSe(O), B = fW(O), [L, j] = o.takeNow(B ? 2 : 1) ?? await o.take(B ? 2 : 1), H = c("addWidget", { type: "forms.addWidget", field: O.ref, placement: { @@ -48938,11 +48969,11 @@ function rSe(e, { fields: t, enqueue: n, groups: r }) { ...D === void 0 ? {} : { exportValue: D } }, objectNumber: L, - ..._ ? { splitObjectNumber: j } : {} - }), Y = await u(H, E), ue = Y.widgets.find( - (le) => le.ref.kind === "objectNumber" && le.ref.objectNumber === L + ...B ? { splitObjectNumber: j } : {} + }), Y = await u(H, E), le = Y.widgets.find( + (ie) => ie.ref.kind === "objectNumber" && ie.ref.objectNumber === L ) ?? Y.widgets.at(-1); - return { field: Y.field, widget: ue }; + return { field: Y.field, widget: le }; }, h = (A) => ({ ...A.page === void 0 ? {} : { page: e.pageOf(A.page).ref }, ...A.offset ? { offset: A.offset } : {} @@ -48954,14 +48985,14 @@ function rSe(e, { fields: t, enqueue: n, groups: r }) { mayScript: e.allows(C8) }); } catch (T) { - throw qe("form", T); + throw ze("form", T); } const O = I.needs ? o.takeNow(I.needs) ?? await o.take(I.needs) : []; return { ...I.build(O), dropped: I.dropped }; }, p = async (A, b = {}) => { if (a("form.duplicate"), A.length === 0) return { fields: [], widgets: [], dropped: [] }; const E = h(b), I = b.values ?? !1, { snapshot: O } = t.view(); - if (!O) throw new re("not-ready", "form", "the form is still loading"); + if (!O) throw new te("not-ready", "form", "the form is still loading"); let T; try { T = A6({ @@ -48971,8 +49002,8 @@ function rSe(e, { fields: t, enqueue: n, groups: r }) { values: I, mayScript: !0 }).creates.reduce(($, D) => $ + 1 + D.widgets.length, 0); - } catch (B) { - throw qe("form", B); + } catch (_) { + throw ze("form", _); } const R = T ? o.takeNow(T) ?? await o.take(T) : [], M = l("duplicate", [ { type: "forms.copy", fields: A, ...E, values: I, objectNumbers: R } @@ -48987,21 +49018,21 @@ function rSe(e, { fields: t, enqueue: n, groups: r }) { try { O = (await e.cancellable(b.signal, I.result)).items; } catch (T) { - throw qe("form", T); + throw ze("form", T); } return oSe(O, E.copies, E.dropped); }, v = (A) => { if (A === "all") return e.document()?.pages ?? []; if (!Array.isArray(A)) - throw new re("invalid-input", "form", "repeat: `pages` is 'all' or a list of pages"); + throw new te("invalid-input", "form", "repeat: `pages` is 'all' or a list of pages"); return A.map((b) => e.pageOf(b)); }, S = async (A, b) => { a("form.repeat"); const { as: E } = b; if (E !== void 0 && E !== "boxes" && E !== "fields") - throw new re("invalid-input", "form", "repeat: `as` is 'boxes' or 'fields'"); + throw new te("invalid-input", "form", "repeat: `as` is 'boxes' or 'fields'"); const { snapshot: I } = t.view(); - if (!I) throw new re("not-ready", "form", "the form is still loading"); + if (!I) throw new te("not-ready", "form", "the form is still loading"); const O = v(b.pages); let T; try { @@ -49013,7 +49044,7 @@ function rSe(e, { fields: t, enqueue: n, groups: r }) { ...E ? { as: E } : {} }); } catch (F) { - throw qe("form", F); + throw ze("form", F); } if (T.count === 0) return { fields: [], widgets: [], dropped: [] }; const R = c("repeat", { @@ -49031,12 +49062,12 @@ function rSe(e, { fields: t, enqueue: n, groups: r }) { const b = t.view(); return A.map((E) => { const I = yt(b, E); - if (!I) throw new re("not-found", "form", "no form field has this ref"); + if (!I) throw new te("not-found", "form", "no form field has this ref"); return I; }); }, N = async (A, b, E, I) => { const O = /* @__PURE__ */ new Map(); - for (const F of A) b(F) && O.set(Ft(F), F); + for (const F of A) b(F) && O.set(Kt(F), F); if (O.size === 0) return { fields: A }; const T = l( "update", @@ -49048,12 +49079,12 @@ function rSe(e, { fields: t, enqueue: n, groups: r }) { try { R = (await e.cancellable(I?.signal, T.result)).items; } catch (F) { - throw qe("form", F); + throw ze("form", F); } const M = /* @__PURE__ */ new Map(); for (const F of R) - F.type === "forms.update" && M.set(Ft(F.field), F.field); - return { fields: A.map((F) => M.get(Ft(F)) ?? F) }; + F.type === "forms.update" && M.set(Kt(F.field), F.field); + return { fields: A.map((F) => M.get(Kt(F)) ?? F) }; }, w = async (A, b, E, I, O) => { a(A), r.assertMayAssign(E, A); const T = k(b); @@ -49068,25 +49099,25 @@ function rSe(e, { fields: t, enqueue: n, groups: r }) { return { copyOps: g, api: { - create: d, - addWidget: f, + create: f, + addWidget: d, duplicate: p, duplicateWidgets: m, repeat: S, canRepeat: C, moveToGroup: async (A, b, E) => { - const I = Hd(iv(b)); + const I = Wd(iv(b)); return w("form.moveToGroup", A, I, { groupId: b }, E); }, assign: async (A, b, E) => { - const I = Hd(b); + const I = Wd(b); return w("form.assign", A, I, { assignment: I }, E); }, update: async (A, b, E) => { - a("form.update", Fd(b.actions)); + a("form.update", $d(b.actions)); const I = yt(t.view(), A); if (typeof b.groupId == "string" && b.groupId !== I?.groupId && r.assertMaySet(b.groupId, "form.update"), b.assignment !== void 0) { - const T = Hd(b.assignment); + const T = Wd(b.assignment); I && w0(I.assignment, T) || r.assertMayAssign(T, "form.update"); } s(b, I?.kind), I && (b.assignment !== void 0 || b.purpose !== void 0) && i( @@ -49141,9 +49172,9 @@ function oSe(e, t, n) { }; for (const a of e) if (a.type === "forms.copy") { - for (const c of a.fields) r.set(Ft(c), c); + for (const c of a.fields) r.set(Kt(c), c); a.widgets.forEach(i), s.push(...a.dropped); - } else a.type === "forms.addWidget" ? (r.set(Ft(a.field), a.field), a.widgets.forEach(i)) : a.type === "forms.updateWidget" && i(a.widget); + } else a.type === "forms.addWidget" ? (r.set(Kt(a.field), a.field), a.widgets.forEach(i)) : a.type === "forms.updateWidget" && i(a.widget); return { fields: [...r.values()], widgets: t.flatMap( @@ -49158,29 +49189,29 @@ function uSe(e, { fields: t, scripting: n, enqueue: r }) { const y = t.view(), x = w.ops.reduce(O5, y); if (w.ops.length === 0) return { request: w, before: y, shown: x, hold: null }; const A = e.changes.hold(o(w, y, w.ops)); - return A.set(w.ops, kl(y, w.ops)), { request: w, before: y, shown: x, hold: A }; + return A.set(w.ops, Al(y, w.ops)), { request: w, before: y, shown: x, hold: A }; }, i = ({ request: w, before: y }) => Xke(t.view(), y, Wy(y, w.ops)), a = ({ hold: w }) => w !== null && !w.open && !!w.change, c = ({ request: w, shown: y }) => { const x = t.view(); return Wy(y, w.ops).every( - (A) => lSe(Ya(x, Ft(A)), A) + (A) => lSe(Ya(x, Kt(A)), A) ); }, l = (w, y, x) => { const { request: A, hold: b } = w; if (y.length === 0) return b?.cancel(), { script: x, changes: [], after: t.view() }; if (!b) { - const T = o(A, t.view(), y), R = e.changes.stage({ label: T, ops: y, undo: kl(i(w), y) }); + const T = o(A, t.view(), y), R = e.changes.stage({ label: T, ops: y, undo: Al(i(w), y) }); return { script: x, changes: [R], after: t.view() }; } if (b.open) { - b.set(y, kl(i(w), y)); + b.set(y, Al(i(w), y)); const T = b.send(); return { script: x, changes: T ? [T] : [], after: t.view() }; } const E = b.change, I = y.filter((T) => !E?.shows.some((R) => cSe(R, T))), O = E ? [E] : []; if (I.length > 0) { const T = o(A, t.view(), I); - O.push(e.changes.stage({ label: T, ops: I, undo: kl(t.view(), I) })); + O.push(e.changes.stage({ label: T, ops: I, undo: Al(t.view(), I) })); } return { script: x, changes: O, after: t.view() }; }, u = ({ request: w, before: y }) => { @@ -49189,7 +49220,7 @@ function uSe(e, { fields: t, scripting: n, enqueue: r }) { return b ? [{ type: "forms.setValue", field: A.ref, value: b }] : []; }); x.length !== 0 && e.changes.stage({ label: o(w, y, x), ops: x, history: !1 }); - }, d = async (w, y) => { + }, f = async (w, y) => { const x = t.view().snapshot; if (!x) return; const A = await w.recalculate(x); @@ -49198,7 +49229,7 @@ function uSe(e, { fields: t, scripting: n, enqueue: r }) { ops: qw(A.effects), history: !1 }); - }, f = (w, y, x) => { + }, d = (w, y, x) => { const A = t.view().snapshot; if (!A) return null; switch (x.kind) { @@ -49246,7 +49277,7 @@ function uSe(e, { fields: t, scripting: n, enqueue: r }) { if (E) return E; try { return await b.transaction(async (I) => { - const O = f(I, w, A); + const O = d(I, w, A); if (!O) return l(w, y.ops, null); const T = await O; n.surface(T, y.origin); @@ -49258,7 +49289,7 @@ function uSe(e, { fields: t, scripting: n, enqueue: r }) { history: !1 }), { script: T, changes: [], after: t.view() }; if (R && !c(w)) - return await d(I, y.origin), { script: T, changes: [x.change], after: t.view() }; + return await f(I, y.origin), { script: T, changes: [x.change], after: t.view() }; const M = qw(T.effects); return l( w, @@ -49287,7 +49318,7 @@ function uSe(e, { fields: t, scripting: n, enqueue: r }) { try { I = (await O.result).meta.undoable || I; } catch (T) { - throw qe("form", T); + throw ze("form", T); } return E(I ? "applied" : "unchanged"); }, S = async (w, y) => { @@ -49296,16 +49327,16 @@ function uSe(e, { fields: t, scripting: n, enqueue: r }) { try { A = await r(() => m(x), y); } catch (b) { - throw x.hold?.cancel(), qe("form", b); + throw x.hold?.cancel(), ze("form", b); } return e.cancellable(y?.signal, v(x, A)); }, C = (w) => { const y = s(w); r(() => m(y)).catch((x) => { y.hold?.cancel(); - const A = qe("form", x).message; + const A = ze("form", x).message; n.surface( - { uiEffects: [], diagnostics: [], error: to(A) }, + { uiEffects: [], diagnostics: [], error: no(A) }, w.origin ); }); @@ -49314,7 +49345,7 @@ function uSe(e, { fields: t, scripting: n, enqueue: r }) { const N = () => r(async () => { k = !1; const w = n.controller(); - w && await w.transaction((y) => d(y, "user")); + w && await w.transaction((y) => f(y, "user")); }); return e.changes.onSettled((w) => { if (w.status !== "refused" || w.change.undoOf !== null || !aSe.has(w.change.label.key) || k) return; @@ -49326,7 +49357,7 @@ function uSe(e, { fields: t, scripting: n, enqueue: r }) { }), { fill: S, fillSoon: C }; } function I8(e) { - return new re( + return new te( "operation-failed", "form", e.error?.message ?? e.diagnostics[0]?.message ?? "the write failed" @@ -49350,7 +49381,7 @@ function fSe(e, { const y = wn(p, w); if (!(!y || !n.takesInput(y))) { if (y.kind === "radio") { - const x = `${Ft(y)}@${k.page.objectNumber}`; + const x = `${Kt(y)}@${k.page.objectNumber}`; if (C.has(x)) return; C.add(x); } @@ -49382,18 +49413,18 @@ function fSe(e, { if (N !== "declined") return N === "taken"; } return !1; - }, d = (p, m, v = dSe) => { + }, f = (p, m, v = dSe) => { const { backward: S, empty: C, required: k, wrap: N } = m, w = t.view(), { position: y, stops: x } = a(), A = p === null ? null : wn(w, p), b = p === null ? null : xn(w, p)?.page.objectNumber, E = A?.kind === "radio" ? x.find(($) => $.field === A && $.row.page.objectNumber === b) : void 0, I = p === null ? void 0 : y.get(p), O = I === void 0 ? null : E?.at ?? I, T = x.filter( ($) => (!C || $2(w, $.field)) && (!k || Dz($.field)) && $ !== E && !v.has(yn($.row.ref)) - ), R = ($) => O === null ? !0 : S ? $.at < O : $.at > O, M = T.filter(R), F = N ? T.filter(($) => !R($)) : [], B = S ? [...M.reverse(), ...F.reverse()] : [...M, ...F]; - for (const $ of B) { - const D = yn($.row.ref), _ = () => void d(D, m, /* @__PURE__ */ new Set([...v, D])), L = o.goTo(l($, S), !0, _); + ), R = ($) => O === null ? !0 : S ? $.at < O : $.at > O, M = T.filter(R), F = N ? T.filter(($) => !R($)) : [], _ = S ? [...M.reverse(), ...F.reverse()] : [...M, ...F]; + for (const $ of _) { + const D = yn($.row.ref), B = () => void f(D, m, /* @__PURE__ */ new Set([...v, D])), L = o.goTo(l($, S), !0, B); if (L !== "declined") return L === "taken"; } return !1; - }, f = (p = {}) => { + }, d = (p = {}) => { const { position: m } = a(), v = p.from ? yt(t.view(), p.from) : null, S = p.from ? v?.widgets.map(({ objectNumber: C }) => C).find((C) => m.has(C)) ?? null : o.focused()?.widget ?? o.last(); - return d(S, { + return f(S, { backward: p.backward ?? !1, empty: p.empty ?? !1, required: p.required ?? !1, @@ -49420,7 +49451,7 @@ function fSe(e, { return { api: { focus: u, - focusNext: f, + focusNext: d, getFocusedField: g, onFocusChanged: r.focusChanged.on, moveInGroup: h, @@ -49444,14 +49475,14 @@ function pSe(e, { groups: t }) { setGroups: (n) => { e.state.update(e1e, hSe(n)); }, - getDesignGroup: () => nm(e.state.get().designAssignment), + getDesignGroup: () => rm(e.state.get().designAssignment), getDesignAssignment: () => e.state.get().designAssignment, setDesignGroup: (n) => { - const r = Hd(iv(n)); + const r = Wd(iv(n)); n !== null && t.assertMaySet(n, "form.setDesignGroup"), e.state.update(QD, r); }, setDesignAssignment: (n) => { - const r = Hd(n); + const r = Wd(n); r.kind !== "unassigned" && t.assertMayAssign(r, "form.setDesignAssignment"), e.state.update(QD, r); }, canSetGroup: t.maySet, @@ -49463,28 +49494,28 @@ function gSe(e, { fields: t, rights: n }) { return { api: { setButtonImage: async (o, s, i) => { t.view().snapshot || await t.settled(); const a = yt(t.view(), o); - if (!a) throw new re("not-found", "form", "no form field has this ref"); + if (!a) throw new te("not-found", "form", "no form field has this ref"); if (a.kind !== "pushbutton") - throw new re("invalid-input", "form", `'${a.name}' is no push button`); - if (!au(a)) - throw new re( + throw new te("invalid-input", "form", `'${a.name}' is no push button`); + if (!cu(a)) + throw new te( "invalid-input", "form", `'${a.name}' is a push button that takes no image: only an image field does (\`takesImage\`)` ); n.assertMayFill(a, "form.setButtonImage"); - const c = s === null ? null : new Uint8Array((await Vo(s.source)).bytes); + const c = s === null ? null : new Uint8Array((await $o(s.source)).bytes); $a(i); const l = { type: "forms.setButtonImage", field: a.ref, image: c }, u = e.changes.stage({ label: { key: "form.setButtonImage" }, ops: [l], - undo: kl(t.view(), [l]) + undo: Al(t.view(), [l]) }); try { - const { items: d } = await e.cancellable(i?.signal, u.result), f = d[0]; - return { field: f?.type === "forms.setButtonImage" ? f.field : a }; - } catch (d) { - throw qe("form", d); + const { items: f } = await e.cancellable(i?.signal, u.result), d = f[0]; + return { field: d?.type === "forms.setButtonImage" ? d.field : a }; + } catch (f) { + throw ze("form", f); } } } }; } @@ -49507,7 +49538,7 @@ function mSe(e, t) { }, import: async (i, a = {}) => { const { signal: c, history: l, ...u } = a; return e.assertAllowed("doc.forms.modify", "form.import"), (u.attribution ?? "restore") === "restore" && e.assertAllowed("doc.forms.import", "form.import"), n(async () => { - const d = e.changes.stage({ + const f = e.changes.stage({ label: { key: "form.import" }, opId: u.opId, history: l, @@ -49515,7 +49546,7 @@ function mSe(e, t) { items: [{ type: "forms.import", ...v }], meta: v.meta })) - }), { items: f } = await d.result, h = f[0], g = r.annotation(); + }), { items: d } = await f.result, h = d[0], g = r.annotation(); return g && await g.whenSynced(), { fields: h.fields, refMap: h.refMap, dropped: h.dropped }; }, a); } } @@ -49546,7 +49577,7 @@ function wSe(e, { e.settings().get().fields.placeholder ], (v, S, C) => v && S && C ? { confirmed: S.widgets.filter(fO), shown: C.widgets.filter(fO) } : null - ), d = (v) => { + ), f = (v) => { const S = t.view(), C = [], k = /* @__PURE__ */ new Map(); for (const N of v) { const w = wn(S, FC(N.ref)); @@ -49554,8 +49585,8 @@ function wSe(e, { C.push({ type: "forms.deleteWidget", widget: N.ref }); continue; } - const y = k.get(Ft(w)) ?? { field: w, widgets: [] }; - y.widgets.push(N), k.set(Ft(w), y); + const y = k.get(Kt(w)) ?? { field: w, widgets: [] }; + y.widgets.push(N), k.set(Kt(w), y); } for (const { field: N, widgets: w } of k.values()) { const y = new Set(w.map((x) => FC(x.ref))); @@ -49565,7 +49596,7 @@ function wSe(e, { } return C; }; - function f(v) { + function d(v) { const S = t.view(), C = FC(v.ref), k = wn(S, C), N = xn(S, C); return k && N ? { field: k, row: N } : null; } @@ -49609,9 +49640,9 @@ function wSe(e, { const y = C.byId[w.id]; y && N.push(y.annotation); } - return [...k, ...d(N)]; + return [...k, ...f(N)]; }, - undoOf: (v) => kl(t.view(), v), + undoOf: (v) => Al(t.view(), v), reorderOps: (v, S, C) => [ { type: "forms.reorderWidgets", page: v, widgets: [...S], position: C } ], @@ -49630,7 +49661,7 @@ function wSe(e, { // confirmed (a restyle, a resize, a field just placed), and until its new picture is there. isPending: o.isPending, paintOf: (v) => { - const S = f(v); + const S = d(v); return S ? m(S.field, S.row) : null; }, toolPaintOf: (v, S) => { @@ -49665,20 +49696,20 @@ function vSe(e, { fields: t, rights: n, purposes: r }, o) { g !== void 0 && (h.assignment.kind === "anyone" ? l.push({ ref: h.ref, reason: "for-anyone" }) : $2(u, h) ? g === null || g === "" ? l.push({ ref: h.ref, reason: "no-value" }) : c.push({ ref: h.ref, value: { value: g } }) : l.push({ ref: h.ref, reason: "filled" })); } if (c.length === 0) return { applied: [], skipped: l, failed: [] }; - const { applied: d, failed: f } = await o(c, a, "form.prefill"); - return { applied: d, skipped: l, failed: f }; + const { applied: f, failed: d } = await o(c, a, "form.prefill"); + return { applied: f, skipped: l, failed: d }; } }, host: { setSigningDate: async (a) => { $a(a), t.view().snapshot || await t.settled(); const c = [], l = []; - for (const f of t.view().snapshot?.fields ?? []) { - if (f.purpose !== "date-signed" || f.kind !== "text" && f.kind !== "combobox" || !n.mayFill(f)) continue; - const h = r.valueFor(f); - typeof h == "string" && (f.assignment.kind === "anyone" ? l.push({ ref: f.ref, reason: "for-anyone" }) : f.value === h ? l.push({ ref: f.ref, reason: "filled" }) : c.push({ ref: f.ref, value: { value: h } })); + for (const d of t.view().snapshot?.fields ?? []) { + if (d.purpose !== "date-signed" || d.kind !== "text" && d.kind !== "combobox" || !n.mayFill(d)) continue; + const h = r.valueFor(d); + typeof h == "string" && (d.assignment.kind === "anyone" ? l.push({ ref: d.ref, reason: "for-anyone" }) : d.value === h ? l.push({ ref: d.ref, reason: "filled" }) : c.push({ ref: d.ref, value: { value: h } })); } if (c.length === 0) return { applied: [], skipped: l, failed: [] }; - const { applied: u, failed: d } = await o(c, a, "form.setSigningDate"); - return { applied: u, skipped: l, failed: d }; + const { applied: u, failed: f } = await o(c, a, "form.setSigningDate"); + return { applied: u, skipped: l, failed: f }; } } }; } @@ -49720,13 +49751,13 @@ const hW = (e, t, n) => { diagnostics: [] }, SSe = (e) => e.kind === "objectNumber" ? { kind: "objectNumber", objectNumber: e.objectNumber } : { kind: "name", name: e.name }; function xSe(e, t, { fill: n }) { - const { fields: r, rights: o } = t, s = (c) => c.kind !== "pushbutton" && c.kind !== "signature" && o.mayFill(c), i = async (c, l, u, d) => { + const { fields: r, rights: o } = t, s = (c) => c.kind !== "pushbutton" && c.kind !== "signature" && o.mayFill(c), i = async (c, l, u, f) => { r.view().snapshot || await r.settled(); - const { selected: f } = hW( + const { selected: d } = hW( r.view().snapshot?.fields ?? [], c, l - ), h = f.filter(s).map((g) => g.ref); + ), h = d.filter(s).map((g) => g.ref); return h.length === 0 ? null : n( { label: { key: "form.reset", count: h.length }, @@ -49734,25 +49765,25 @@ function xSe(e, t, { fill: n }) { scripts: { kind: "recalculate" }, origin: u }, - d + f ); }; return { api: { reset: async (c, l) => { - for (const d of c ?? []) { - const f = yt(r.view(), d); - f && o.assertMayFill(f, "form.reset"); + for (const f of c ?? []) { + const d = yt(r.view(), f); + d && o.assertMayFill(d, "form.reset"); } if (c && c.length === 0) return { fields: [] }; const u = await i(c ? c.map(SSe) : null, !1, "user", l); return { fields: u ? zve(u.before, u.after) : [] }; }, resetFormAction: async (c, l, u = "user") => { - const d = await i(c, l, u); - if (!d) return ASe; - const { result: f } = d; - return f.status === "unchanged" ? { ...f, status: "applied" } : f; + const f = await i(c, l, u); + if (!f) return ASe; + const { result: d } = f; + return d.status === "unchanged" ? { ...d, status: "applied" } : d; } } }; @@ -49796,16 +49827,16 @@ function ISe(e, { keyOf: t, fields: n }, r) { const o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new WeakSet(), a = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap(), l = (S) => { const C = yt(n.view(), S), k = yt(n.get(), S); return C && k ? [O8(C), O8(k)] : null; - }, u = (S, C) => s.get(S)?.draft === C, d = (S, C) => { + }, u = (S, C) => s.get(S)?.draft === C, f = (S, C) => { o.get(S) === C && o.delete(S); - }, f = (S, C) => { + }, d = (S, C) => { if (!i.has(C) || !a.has(C) || u(S, C)) return !1; const k = c.get(C); if (!k) return !1; const N = l(C.field); return !N || N.every((w) => !k.includes(w)); }, h = () => { - for (const [S, C] of o) f(S, C) && o.delete(S); + for (const [S, C] of o) d(S, C) && o.delete(S); return [...o]; }, g = (S, C) => { const k = s.get(S); @@ -49821,13 +49852,13 @@ function ISe(e, { keyOf: t, fields: n }, r) { }, p = async (S, C) => { try { const k = await g(S, C); - return k.status === "rejected" ? a.set(C, k) : d(S, C), k; + return k.status === "rejected" ? a.set(C, k) : f(S, C), k; } catch (k) { - throw i.has(C) && d(S, C), k; + throw i.has(C) && f(S, C), k; } }, m = async (S) => { const C = t(S), k = o.get(C); - return k ? f(C, k) ? (o.delete(C), null) : (i.add(k), p(C, k)) : null; + return k ? d(C, k) ? (o.delete(C), null) : (i.add(k), p(C, k)) : null; }, v = async () => Promise.all( h().map(([S, C]) => { const k = a.get(C); @@ -49861,35 +49892,35 @@ const P8 = (e, t) => ({ value: t }); function NSe(e, t, { fill: n }) { - const { validationRejected: r } = t.events, { fields: o, rights: s } = t, i = async (u, d, f, h) => { + const { validationRejected: r } = t.events, { fields: o, rights: s } = t, i = async (u, f, d, h) => { o.view().snapshot || await o.settled(); const g = yt(o.view(), u); - g && s.assertMayFill(g, f); + g && s.assertMayFill(g, d); const { result: p } = await n( { - ops: [P8(u, d)], - scripts: { kind: "commit", field: u, value: d }, + ops: [P8(u, f)], + scripts: { kind: "commit", field: u, value: f }, origin: "user" }, h ); if (p.status === "failed") throw I8(p); const m = yt(o.get(), u); - if (!m) throw new re("not-found", "form", "no form field has this ref"); + if (!m) throw new te("not-found", "form", "no form field has this ref"); return p.status === "rejected" ? (r.emit({ field: m, issues: p.diagnostics }), { field: m, status: "rejected" }) : { field: m, status: p.status }; - }, a = async (u, d, f = "form.setValues") => { + }, a = async (u, f, d = "form.setValues") => { o.view().snapshot || await o.settled(); const h = o.view(), g = [], p = []; for (const m of u) try { const v = yt(h, m.ref); - if (!v) throw new re("not-found", "form", "no form field has this ref"); - s.assertMayFill(v, f), C7(v, m.value), g.push({ ref: v.ref, value: m.value }); + if (!v) throw new te("not-found", "form", "no form field has this ref"); + s.assertMayFill(v, d), C7(v, m.value), g.push({ ref: v.ref, value: m.value }); } catch (v) { - p.push({ ref: m.ref, error: Br(qe("form", v)) }); + p.push({ ref: m.ref, error: Br(ze("form", v)) }); } if (g.length === 0) return { applied: [], failed: p }; - $a(d); + $a(f); try { const { result: m } = await n( { @@ -49897,12 +49928,12 @@ function NSe(e, t, { fill: n }) { scripts: { kind: "recalculate" }, origin: "user" }, - d + f ); if (m.status === "failed") throw I8(m); return { applied: g.map((v) => v.ref), failed: p }; } catch (m) { - const v = Br(qe("form", m)); + const v = Br(ze("form", m)); return { applied: [], failed: [...p, ...g.map(({ ref: S }) => ({ ref: S, error: v }))] @@ -49913,19 +49944,19 @@ function NSe(e, t, { fill: n }) { /** Several fields' plain values as one change, for the verbs that write them (write/prefill.ts). */ fillPlain: a, /** A text field's write, for the text being typed (write/typing.ts). */ - setText: (u, d) => i(u, { value: d }, "form.setValue"), + setText: (u, f) => i(u, { value: f }, "form.setValue"), api: { - setValue: (u, d, f) => i(u, d, "form.setValue", f), - setValues: async (u, d) => { - $a(d); - const { applied: f, failed: h } = await a(u, d); - return { applied: f, skipped: [], failed: h }; + setValue: (u, f, d) => i(u, f, "form.setValue", d), + setValues: async (u, f) => { + $a(f); + const { applied: d, failed: h } = await a(u, f); + return { applied: d, skipped: [], failed: h }; }, - importValues: async (u, d) => { - $a(d), o.view().snapshot || await o.settled(); - const f = o.view(), h = [], g = [], p = /* @__PURE__ */ new Map(); + importValues: async (u, f) => { + $a(f), o.view().snapshot || await o.settled(); + const d = o.view(), h = [], g = [], p = /* @__PURE__ */ new Map(); for (const [S, C] of Object.entries(u)) { - const k = yt(f, { kind: "fqn", name: S }); + const k = yt(d, { kind: "fqn", name: S }); if (!k) { h.push({ ref: S, reason: "the form has no field with this name" }); continue; @@ -49941,7 +49972,7 @@ function NSe(e, t, { fill: n }) { } g.push({ ref: k.ref, value: N }), p.set(JSON.stringify(k.ref), S); } - const { applied: m, failed: v } = await a(g, d); + const { applied: m, failed: v } = await a(g, f); return { applied: m, skipped: h, @@ -49958,10 +49989,10 @@ function OSe(e) { const t = qAe(e), { events: n, rights: r } = t, o = e.settings(), s = Ake(e, t), i = Wke(e, t), a = Fke(t), c = Kke(e, t, { validationOf: s.validationOf, inPageOrder: s.inPageOrder - }), l = uSe(e, t), u = NSe(e, t, l), d = ISe(e, t, u.setText), f = vSe(e, t, u.fillPlain), h = gSe(e, t), g = xSe(e, t, l), p = rSe(e, t), m = pSe(e, t), v = mSe(e, t), S = GAe(e, t, l), C = CSe(e, t, l), k = fSe(e, t, { + }), l = uSe(e, t), u = NSe(e, t, l), f = ISe(e, t, u.setText), d = vSe(e, t, u.fillPlain), h = gSe(e, t), g = xSe(e, t, l), p = rSe(e, t), m = pSe(e, t), v = mSe(e, t), S = GAe(e, t, l), C = CSe(e, t, l), k = fSe(e, t, { setValue: u.api.setValue, activateWidget: S.api.activateWidget - }), N = tu("form", [ + }), N = nu("form", [ o.api, s.api, i.api, @@ -49969,9 +50000,9 @@ function OSe(e) { c.api, c.host, u.api, - d.api, f.api, - f.host, + d.api, + d.host, h.api, g.api, p.api, @@ -50012,7 +50043,7 @@ const Ln = Ss, PSe = (e) => ({ token: Ln, scope: "document", requires: [Cn], - optional: [vt, Lr, Wo, Xa, Zt, vo], + optional: [vt, Lr, qo, Xa, tn, ko], state: Zve, settings: { defaults: lke, registered: e }, create: OSe @@ -50041,7 +50072,7 @@ const Ln = Ss, PSe = (e) => ({ designAssignment: F2, designing: !1 } -}), vs = sn("signature", { +}), vs = an("signature", { hint: "add signaturePlugin() from '@embedpdf/plugin-signature' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -50094,17 +50125,17 @@ function LSe({ onBlur: c, style: l }) { - const [u] = De(() => Yie(s)), d = wi(u.subscribe, u.get, u.get), f = Re(null); - return Ke(() => f.current ? die(f.current) : void 0, []), Ke(() => u.setConfirmed(s), [u, s]), /* @__PURE__ */ P( + const [u] = je(() => Yie(s)), f = wi(u.subscribe, u.get, u.get), d = Re(null); + return Ke(() => d.current ? die(d.current) : void 0, []), Ke(() => u.setConfirmed(s), [u, s]), /* @__PURE__ */ P( "select", { - ref: f, + ref: d, "aria-label": e, ...e2(t), multiple: r, size: Math.max(2, o.length), disabled: n, - value: r ? d : d[0] ?? "", + value: r ? f : f[0] ?? "", onFocus: a, onBlur: c, onChange: (h) => u.choose( @@ -50116,11 +50147,11 @@ function LSe({ } ); } -function zm({ visible: e, color: t }) { +function Wm({ visible: e, color: t }) { return e ? /* @__PURE__ */ P("span", { "aria-hidden": "true", "data-embedpdf-form-focus-ring": "", style: Zie(t) }) : null; } function DSe() { - const e = nu((r) => r.accent), t = M8((r) => r.focus), n = M8((r) => r.fields); + const e = ru((r) => r.accent), t = M8((r) => r.focus), n = M8((r) => r.fields); return ft(() => jie({ focus: t, fields: n }, e), [e, t, n]); } function jSe(e, t = !0) { @@ -50152,14 +50183,14 @@ function FSe(e, t) { }; }, [n, e]); } -function Wm(e) { +function qm(e) { const t = bt(Ln), n = Re(e); return n.current = e, fi(() => { const r = n.current; r && t.activateWidget(r); }, [t]); } -function cu({ +function lu({ item: e, page: t, colors: n, @@ -50170,7 +50201,7 @@ function cu({ children: a, ...c }) { - const l = bt(Ln), u = Et(pW), { onPress: d, ...f } = FSe(e.fieldRef, e.annotationRef), h = jSe(d, !u), g = zo(e.box, t.transform), p = e.annotationRef, m = wt(Ln, (C) => C.getLayerMode() === "fill"), v = !e.disabled && !u && m, S = e.control === "toggle" && e.kind === "radio"; + const l = bt(Ln), u = Ct(pW), { onPress: f, ...d } = FSe(e.fieldRef, e.annotationRef), h = jSe(f, !u), g = Wo(e.box, t.transform), p = e.annotationRef, m = wt(Ln, (C) => C.getLayerMode() === "fill"), v = !e.disabled && !u && m, S = e.control === "toggle" && e.kind === "radio"; return Ke( () => h.current && p && v ? Vae(h.current, l, p, { radio: S, custom: s, focusable: o }) : void 0, [h, l, p, v, S, s, o] @@ -50206,13 +50237,13 @@ function cu({ "div", { ref: h, - ...f, + ...d, ...c, onFocus: (C) => { - f.onFocus?.(C), c.onFocus?.(C); + d.onFocus?.(C), c.onFocus?.(C); }, onBlur: (C) => { - f.onBlur?.(C), c.onBlur?.(C); + d.onBlur?.(C), c.onBlur?.(C); }, onClick: i, style: { ...LB(e, g, n, { edge: r }), ...c.style }, @@ -50221,7 +50252,7 @@ function cu({ ); } function H2({ item: e, page: t }) { - const n = wt(Ln, (o) => o.getSettings().fields.placeholder), r = zo(e.box, t.transform); + const n = wt(Ln, (o) => o.getSettings().fields.placeholder), r = Wo(e.box, t.transform); return /* @__PURE__ */ P( "span", { @@ -50233,13 +50264,13 @@ function H2({ item: e, page: t }) { ); } function gW(e) { - const [t, n] = De(!1); + const [t, n] = je(!1); return Ke(() => { e || n(!1); }, [e]), [t && e, n]; } const VSe = Ei(function({ item: t, page: n, colors: r }) { - const o = bt(Ln), s = Wm(t.annotationRef), i = ft( + const o = bt(Ln), s = qm(t.annotationRef), i = ft( () => Jie(o, t.fieldRef, t.value), // eslint-disable-next-line react-hooks/exhaustive-deps [o, t.key] @@ -50249,11 +50280,11 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { i.getState ); Ke(() => i.setValue(t.value), [i, t.value]); - const l = zo(t.box, n.transform); - zt(Xa, (f) => f.getPaintFontsEpoch(), 0); + const l = Wo(t.box, n.transform); + Gt(Xa, (d) => d.getPaintFontsEpoch(), 0); const u = t.annotationRef ? o.getTextEditorLayout(t.annotationRef, c) : null; D2(u ? u.programs : bW); - const d = { + const f = { value: c, maxLength: t.maxLength ?? void 0, "aria-label": t.label, @@ -50265,10 +50296,10 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { ...e2(t.required), disabled: t.disabled, onFocus: i.focus, - onChange: (f) => i.input(f.target.value), + onChange: (d) => i.input(d.target.value), onBlur: i.blur, - onKeyDown: (f) => { - i.keyDown(f.key, t.multiline) && f.currentTarget.blur(); + onKeyDown: (d) => { + i.keyDown(d.key, t.multiline) && d.currentTarget.blur(); }, style: Qie(t, l, r, a, u) }; @@ -50276,7 +50307,7 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { // A click runs the widget's action too, as in Acrobat: the editor's // focus click bubbles here, a read-only field's lands here directly. /* @__PURE__ */ P( - cu, + lu, { item: t, page: n, @@ -50284,7 +50315,7 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { onClick: s, title: t.hint ?? void 0, children: [ - t.multiline ? /* @__PURE__ */ P("textarea", { ...d }) : /* @__PURE__ */ P("input", { ...d, type: t.password ? "password" : "text" }), + t.multiline ? /* @__PURE__ */ P("textarea", { ...f }) : /* @__PURE__ */ P("input", { ...f, type: t.password ? "password" : "text" }), t.placeholder !== null && c === "" ? /* @__PURE__ */ P(H2, { item: t, page: n }) : null ] } @@ -50295,9 +50326,9 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { page: n, colors: r }) { - const o = bt(Ln), s = Wm(t.annotationRef), [i, a] = De(!1), c = () => Gie(o, t, s), l = t.kind === "radio" ? t.inGroup : null; + const o = bt(Ln), s = qm(t.annotationRef), [i, a] = je(!1), c = () => Gie(o, t, s), l = t.kind === "radio" ? t.inGroup : null; return /* @__PURE__ */ P( - cu, + lu, { item: t, page: n, @@ -50316,7 +50347,7 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { (u.key === " " || u.key === "Enter") && (u.preventDefault(), c()); }, style: { cursor: t.disabled ? "default" : "pointer", outline: "none" }, - children: /* @__PURE__ */ P(zm, { visible: i, color: r.focus }) + children: /* @__PURE__ */ P(Wm, { visible: i, color: r.focus }) } ); }), USe = Ei(function({ @@ -50324,9 +50355,9 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { page: n, colors: r }) { - const o = bt(Ln), s = Wm(t.annotationRef), [i, a] = De(!1); + const o = bt(Ln), s = qm(t.annotationRef), [i, a] = je(!1); return /* @__PURE__ */ P( - cu, + lu, { item: t, page: n, @@ -50358,7 +50389,7 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { } ), t.placeholder !== null ? /* @__PURE__ */ P(H2, { item: t, page: n }) : null, - /* @__PURE__ */ P(zm, { visible: i, color: r.focus }) + /* @__PURE__ */ P(Wm, { visible: i, color: r.focus }) ] } ); @@ -50367,11 +50398,11 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { page: n, colors: r }) { - const o = bt(Ln), s = Wm(t.annotationRef), [i, a] = De(!1), c = zo(t.box, n.transform), l = wt( + const o = bt(Ln), s = qm(t.annotationRef), [i, a] = je(!1), c = Wo(t.box, n.transform), l = wt( Ln, (u) => t.annotationRef ? u.getWidgetFontCss(t.annotationRef) : null ); - return D2(l ? l.programs : bW), /* @__PURE__ */ P(cu, { item: t, page: n, colors: r, edge: !1, onClick: s, children: [ + return D2(l ? l.programs : bW), /* @__PURE__ */ P(lu, { item: t, page: n, colors: r, edge: !1, onClick: s, children: [ /* @__PURE__ */ P( LSe, { @@ -50389,16 +50420,16 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { style: Xie(t, c, r, l) } ), - /* @__PURE__ */ P(zm, { visible: i, color: r.focus }) + /* @__PURE__ */ P(Wm, { visible: i, color: r.focus }) ] }); }), HSe = Ei(function({ item: t, page: n, colors: r }) { - const o = Wm(t.annotationRef), [s, i] = De(!1); + const o = qm(t.annotationRef), [s, i] = je(!1); return /* @__PURE__ */ P( - cu, + lu, { item: t, page: n, @@ -50422,7 +50453,7 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { } } ), - /* @__PURE__ */ P(zm, { visible: s && !t.disabled, color: r.focus }) + /* @__PURE__ */ P(Wm, { visible: s && !t.disabled, color: r.focus }) ] } ); @@ -50431,13 +50462,13 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { page: n, colors: r }) { - const o = Rt(vs), s = t.fieldRef, i = zt( + const o = Bt(vs), s = t.fieldRef, i = Gt( vs, (u) => u.getSignature(s)?.signed ?? t.signed, t.signed ), a = o !== null && (i || !t.disabled), [c, l] = gW(a); return /* @__PURE__ */ P( - cu, + lu, { item: t, page: n, @@ -50458,7 +50489,7 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { } ) : null, t.placeholder !== null ? /* @__PURE__ */ P(H2, { item: t, page: n }) : null, - /* @__PURE__ */ P(zm, { visible: c, color: r.focus }) + /* @__PURE__ */ P(Wm, { visible: c, color: r.focus }) ] } ); @@ -50467,9 +50498,9 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { page: n, colors: r }) { - const o = Rt(vs), s = o !== null && !t.disabled, [i, a] = gW(s); + const o = Bt(vs), s = o !== null && !t.disabled, [i, a] = gW(s); return /* @__PURE__ */ P( - cu, + lu, { item: t, page: n, @@ -50490,7 +50521,7 @@ const VSe = Ei(function({ item: t, page: n, colors: r }) { } ) : null, t.placeholder !== null ? /* @__PURE__ */ P(H2, { item: t, page: n }) : null, - /* @__PURE__ */ P(zm, { visible: i, color: r.focus }) + /* @__PURE__ */ P(Wm, { visible: i, color: r.focus }) ] } ); @@ -50518,20 +50549,20 @@ const qSe = (e, t) => e === t ? !0 : !e || !t ? !1 : e.kind === "picture" ? t.ki colors: o, look: s }) { - const i = bt(Ln), a = Wm(t.annotationRef), c = wt(Ln, (g) => g.isWidgetFocused(t.ref)), l = Uae(t, r.transform), u = Re({ form: i, field: t.fieldRef, activate: a }); + const i = bt(Ln), a = qm(t.annotationRef), c = wt(Ln, (g) => g.isWidgetFocused(t.ref)), l = Uae(t, r.transform), u = Re({ form: i, field: t.fieldRef, activate: a }); u.current = { form: i, field: t.fieldRef, activate: a }; - const d = ft( + const f = ft( () => Hae( (g) => u.current.form.setValue(u.current.field, g), () => u.current.activate() ), [] - ), f = n.component, h = /* @__PURE__ */ P("div", { style: l.nativeStyle, children: [ + ), d = n.component, h = /* @__PURE__ */ P("div", { style: l.nativeStyle, children: [ s && yW(s, t.rect, l.pictureStyle), /* @__PURE__ */ P(pW.Provider, { value: !0, children: mW(t, r, o) }) ] }); return /* @__PURE__ */ P( - cu, + lu, { item: t, page: r, @@ -50539,15 +50570,15 @@ const qSe = (e, t) => e === t ? !0 : !e || !t ? !1 : e.kind === "picture" ? t.ki edge: !1, custom: !0, onClick: (g) => { - !Wae(g.nativeEvent) && Kae(t) && d.click(); + !Wae(g.nativeEvent) && Kae(t) && f.click(); }, children: /* @__PURE__ */ P("div", { style: l.frameStyle, children: /* @__PURE__ */ P( - f, + d, { widget: t, frame: l.frame, native: h, - setValue: d.setValue, + setValue: f.setValue, focused: c } ) }) @@ -50558,27 +50589,27 @@ function JSe(e, t) { return e.item === t.item && e.control === t.control && e.page === t.page && e.colors === t.colors && qSe(e.look, t.look); } function YSe({ controls: e }) { - const t = qo(), n = bt(Ln), r = DSe(), o = wt(Ln, (d) => d.getLayerMode()); + const t = Go(), n = bt(Ln), r = DSe(), o = wt(Ln, (f) => f.getLayerMode()); M9(t.ref, "formFields"), Ke(() => { n.ensureLoaded(t.ref); }, [n, t.ref]); const s = wt( Ln, - (d) => d.listWidgets(t.ref), + (f) => f.listWidgets(t.ref), pi ), i = ZSe(t), a = o === "design" ? QSe : s, c = ft(() => { - const d = /* @__PURE__ */ new Map(); + const f = /* @__PURE__ */ new Map(); if (e?.length) - for (const f of a) { - const h = $ae(f, e); - h && d.set(oe(f.ref), h); + for (const d of a) { + const h = $ae(d, e); + h && f.set(oe(d.ref), h); } - return d; + return f; }, [a, e]), l = ft( - () => c.size === 0 ? i : i.filter(({ key: d }) => !c.has(d)), + () => c.size === 0 ? i : i.filter(({ key: f }) => !c.has(f)), [i, c] ), u = ft( - () => c.size === 0 ? XSe : new Map(i.map(({ key: d, look: f }) => [d, f])), + () => c.size === 0 ? XSe : new Map(i.map(({ key: f, look: d }) => [f, d])), [i, c] ); return /* @__PURE__ */ P( @@ -50588,19 +50619,19 @@ function YSe({ controls: e }) { ...o === "show" ? w5 : {}, children: [ /* @__PURE__ */ P(exe, { page: t, looks: l }), - a.map((d) => { - const f = `${d.key}:${d.annotObjectNumber}`, h = oe(d.ref), g = c.get(h); + a.map((f) => { + const d = `${f.key}:${f.annotObjectNumber}`, h = oe(f.ref), g = c.get(h); return g ? /* @__PURE__ */ P( GSe, { - item: d, + item: f, control: g, page: t, colors: r, look: u.get(h) ?? null }, - f - ) : mW(d, t, r, f); + d + ) : mW(f, t, r, d); }) ] } @@ -50612,11 +50643,11 @@ function ZSe(e) { Ln, (c) => c.listShownWidgets(e.ref), pi - ), r = wt(Ln, (c) => c.getAppearanceEpoch(e.ref)), o = zt( + ), r = wt(Ln, (c) => c.getAppearanceEpoch(e.ref)), o = Gt( Pr, (c) => c.getAppearanceScale(e.transform.renderScale), 0 - ), [s, i] = De(null), [a] = De(KU); + ), [s, i] = je(null), [a] = je(KU); return Ke(() => () => a.release(), [a]), Ke(() => { if (o) return HU( @@ -50649,7 +50680,7 @@ const exe = Ei(function({ }) { return /* @__PURE__ */ P(nt, { children: n.map(({ key: r, widget: o, look: s }) => { if (!s) return null; - const i = zo(o.rect, t.transform); + const i = Wo(o.rect, t.transform); return yW( s, o.rect, @@ -50695,8 +50726,8 @@ function yW(e, t, n, r) { ); } const bW = Object.freeze([]); -wo(TSe); -const M8 = jm(Ss); +vo(TSe); +const M8 = Fm(Ss); function txe(e) { const t = e.borderStyle === "beveled" || e.borderStyle === "inset"; return Math.max(0, e.borderWidth) * (t ? 2 : 1); @@ -50722,34 +50753,34 @@ function nxe(e, t) { } const rxe = "signature:armed-mark", oxe = 30, sxe = (e, t) => e.page.objectNumber === t.page.objectNumber && e.rot === t.rot && (e.into && oe(e.into)) === (t.into && oe(t.into)) && e.box.x === t.box.x && e.box.y === t.box.y && e.box.width === t.box.width && e.box.height === t.box.height; function ixe(e, t, n, r, o = null, s = null) { - const i = (d, f) => n.listWidgets(d).find((h) => h.annotObjectNumber === f.annotObjectNumber) ?? null, a = (d, f) => f.field.kind === "signature" && (t.getSignature(f.field.ref)?.signed === !0 || f.field.valueEntry.kind !== "none") || (i(d, f)?.disabled ?? !0), c = (d) => { - if (!d.page) return null; - const f = r.getArmedAsset(e); - if (!f || r.getLibrary(f.libraryId)?.kind !== _5) + const i = (f, d) => n.listWidgets(f).find((h) => h.annotObjectNumber === d.annotObjectNumber) ?? null, a = (f, d) => d.field.kind === "signature" && (t.getSignature(d.field.ref)?.signed === !0 || d.field.valueEntry.kind !== "none") || (i(f, d)?.disabled ?? !0), c = (f) => { + if (!f.page) return null; + const d = r.getArmedAsset(e); + if (!d || r.getLibrary(d.libraryId)?.kind !== _5) return null; - const h = n.getWidgetAt(d.page.ref, d.page.point); - return h && (h.field.kind === "signature" || h.imageBox) ? { page: d.page.ref, hit: h, assetId: f.id } : null; + const h = n.getWidgetAt(f.page.ref, f.page.point); + return h && (h.field.kind === "signature" || h.imageBox) ? { page: f.page.ref, hit: h, assetId: d.id } : null; }; let l = null; - const u = (d, f) => { - (d === null || l === null || !sxe(d, l)) && (l = d), o?.hoverGhostIn(l), s?.claimCursor(rxe, f ? "not-allowed" : null, oxe); + const u = (f, d) => { + (f === null || l === null || !sxe(f, l)) && (l = f), o?.hoverGhostIn(l), s?.claimCursor(rxe, d ? "not-allowed" : null, oxe); }; return { id: "signature:armed-mark-on-field", priority: rz + 1, - enabledFor: (d) => d.id === Vd, - onHover: (d) => { - const f = c(d); - if (!f) return u(null, !1); - const { page: h, hit: g } = f; + enabledFor: (f) => f.id === Ud, + onHover: (f) => { + const d = c(f); + if (!d) return u(null, !1); + const { page: h, hit: g } = d; if (a(h, g)) return u(null, !0); const p = i(h, g), m = o?.getArmedStamp(), v = p && m ? nxe(p, m) : null; u(v && p && { page: h, box: v.box, rot: v.rot, into: p.ref }, !1); }, - onPointerDown: (d) => { - const f = c(d); - if (!f) return !1; - const { page: h, hit: g, assetId: p } = f; + onPointerDown: (f) => { + const d = c(f); + if (!d) return !1; + const { page: h, hit: g, assetId: p } = d; return a(h, g) || (r.disarm(e), t.placeMark({ assetId: p }, { field: g.field.ref }).catch((m) => globalThis.console?.error("[signature] placing the mark failed:", m))), !0; } }; @@ -50769,34 +50800,33 @@ function axe(e, t) { ) ); } -const qr = (e) => async (...t) => { +const Gr = (e) => async (...t) => { try { return await e(...t); } catch (n) { - throw qe("signature", n); + throw ze("signature", n); } }; -function cxe(e, { store: t }, { validate: n }, r, { findSignature: o, getVerdict: s }) { +function cxe(e, { store: t }, { validate: n }, r, { findSignature: o, findVerdict: s }) { const { requireSignatures: i } = t; return { api: { - refresh: qr(async (a) => { + refresh: Gr(async (a) => { await e.cancellable(a?.signal, r.refresh()); }), - validate: qr(n), - validateField: qr( + validate: Gr(n), + validateField: Gr( async (a, c) => { - await n(c); - const l = s(a); + const l = s(a, await n(c)); if (!l) - throw new re("not-found", "signature", "no signed field at that address"); + throw new te("not-found", "signature", "no signed field at that address"); return l; } ), - analyzeChanges: qr( + analyzeChanges: Gr( async (a, c) => e.cancellable(c?.signal, i().analyze(a)) ), - readRevision: qr( + readRevision: Gr( async (a, c) => { e.assertAllowed("doc.download", "signature.readRevision"); const l = i(); @@ -50804,10 +50834,10 @@ function cxe(e, { store: t }, { validate: n }, r, { findSignature: o, getVerdict if ("revisionIndex" in a) u = a.revisionIndex; else { - const d = o(a); - if (!d?.signed || d.revisionIndex === null) - throw new re("not-found", "signature", "no signed revision at that address"); - u = d.revisionIndex; + const f = o(a); + if (!f?.signed || f.revisionIndex === null) + throw new te("not-found", "signature", "no signed revision at that address"); + u = f.revisionIndex; } return e.cancellable(c?.signal, l.downloadRevision(u)); } @@ -50880,45 +50910,45 @@ const L8 = [], yxe = [], bxe = (e) => !("kind" in e) || e.kind === "objectNumber function vxe(e, { authority: t, siblings: n }, r) { const { form: o } = n, s = () => r.get().snapshot, i = tt( () => [s(), e.state.get().verdicts], - (d, f) => { + (d, h) => { if (!d) return { all: L8, signed: L8, unsigned: yxe }; - const h = (p) => f?.find((m) => m.signature.index === p.index) ?? null, g = d.signatures.map( - (p) => ({ ...p, verdict: h(p) }) + const g = (m) => h?.find((v) => v.signature.index === m.index) ?? null, p = d.signatures.map( + (m) => ({ ...m, verdict: g(m) }) ); return { - all: g, - signed: g.filter((p) => p.signed), - unsigned: d.signatures.filter((p) => !p.signed).map((p) => p.field) + all: p, + signed: p.filter((m) => m.signed), + unsigned: d.signatures.filter((m) => !m.signed).map((m) => m.field) }; } ), a = () => i().unsigned.filter((d) => t.canSign(d)), c = (d) => { - const f = s(); - if (!f) return null; - const h = bxe(d); - if (h) { - const g = f.signatures.find( - (m) => m.widget?.objectNumber === h.objectNumber + const h = s(); + if (!h) return null; + const g = bxe(d); + if (g) { + const p = h.signatures.find( + (v) => v.widget?.objectNumber === g.objectNumber ); - if (g) return g; - const p = o.getFieldForWidget(h); - return p ? c(p.ref) : null; + if (p) return p; + const m = o.getFieldForWidget(g); + return m ? c(m.ref) : null; } - return wxe(d) ? f.signatures.find( - (g) => d.kind === "fqn" ? g.fieldName === d.name : Rv(g.field, d) + return wxe(d) ? h.signatures.find( + (p) => d.kind === "fqn" ? p.fieldName === d.name : Rv(p.field, d) ) ?? null : null; }, l = (d) => { - const f = c(d); - return f ? i().all.find((h) => h.index === f.index) ?? null : null; - }, u = (d) => { - const f = c(d); - return f ? e.state.get().verdicts?.find((h) => h.signature.index === f.index) ?? null : null; - }; + const h = c(d); + return h ? i().all.find((g) => g.index === h.index) ?? null : null; + }, u = (d, h) => { + const g = c(d); + return g ? h?.find((p) => p.signature.index === g.index) ?? null : null; + }, f = (d) => u(d, e.state.get().verdicts); return { snapshot: s, findSignature: c, listOwnUnsigned: a, - getVerdict: u, + findVerdict: u, api: { getSnapshot: s, getStatus: r.getStatus, @@ -50926,7 +50956,7 @@ function vxe(e, { authority: t, siblings: n }, r) { listUnsignedFields: () => i().unsigned, getSignature: l, listVerdicts: () => e.state.get().verdicts, - getVerdict: u, + getVerdict: f, getProtection: () => s()?.protection ?? null, getPending: () => r.get().pending, isBusy: () => e.state.get().busy, @@ -50943,24 +50973,24 @@ function kxe(e, { form: t }) { }, o = async (l) => { const u = l ?? n.get().signingKey; if (!u) - throw new re( + throw new te( "invalid-input", "signature", "no key: set the `key` setting or pass one with the call" ); return typeof u == "function" ? u() : u; }, s = (l) => l === void 0 ? n.get().timestampAuthority : l, i = () => n.get().trust ?? void 0, a = (l, u) => { - const d = t.get(u); - return d !== null && e.allowsField(l, d); + const f = t.get(u); + return f !== null && e.allowsField(l, f); }; return { mode: r, resolveKey: o, resolveTimestampAuthority: s, timestampTrust: i, - assertAllowedField: (l, u, d) => { - const f = t.get(u); - f && e.assertAllowedField(l, f, d); + assertAllowedField: (l, u, f) => { + const d = t.get(u); + d && e.assertAllowedField(l, d, f); }, canSign: (l) => a("sign", l), // A mark in a signature field is its signer's to place: what the engine asks for. @@ -50996,11 +51026,11 @@ function Axe(e) { }), t; } function Sxe({ stamp: e }) { - const t = async (r) => new Uint8Array((await Vo(r)).bytes); + const t = async (r) => new Uint8Array((await $o(r)).bytes); return { bytesOf: t, markBytes: async (r) => { if ("assetId" in r) { const o = e()?.getAssetBytes(r.assetId); - if (!o) throw new re("not-found", "signature", `unknown mark '${r.assetId}'`); + if (!o) throw new te("not-found", "signature", `unknown mark '${r.assetId}'`); return o; } return t(r.source); @@ -51025,7 +51055,7 @@ function Exe(e) { }, requireSignatures: () => { const s = e.doc.signatures; if (!s) - throw new re( + throw new te( "unsupported", "signature", "this engine does not implement signatures" @@ -51033,7 +51063,7 @@ function Exe(e) { return s; }, documentId: () => { const s = e.documentId; - if (!s) throw new re("not-ready", "signature", "no document id"); + if (!s) throw new te("not-ready", "signature", "no document id"); return s; } }; } @@ -51071,13 +51101,13 @@ function Pxe(e, { events: t }, { validateNow: n, revalidateSoon: r }) { }; }, fold: mxe, - onChanged: ({ cause: c, event: l, previous: u, next: d }) => { - const f = d.snapshot?.protection ?? null; - f && !Oxe(u.snapshot?.protection ?? null, f) && s.emit({ protection: f }), l?.type === "signatures.completed" && o.emit({ + onChanged: ({ cause: c, event: l, previous: u, next: f }) => { + const d = f.snapshot?.protection ?? null; + d && !Oxe(u.snapshot?.protection ?? null, d) && s.emit({ protection: d }), l?.type === "signatures.completed" && o.emit({ field: l.signature.field, result: hxe(l), origin: l.origin - }), bO(d.snapshot) && (c === "load" ? n() : u.snapshot !== d.snapshot && r()); + }), bO(f.snapshot) && (c === "load" ? n() : u.snapshot !== f.snapshot && r()); } }); return { @@ -51098,39 +51128,54 @@ function Pxe(e, { events: t }, { validateNow: n, revalidateSoon: r }) { } const Rxe = 300; function Txe(e, { events: t }) { - const { validated: n } = t, r = e.settings(), o = async (c) => { - if (!e.doc.signatures) return []; - const { validateSignatures: l } = await e.cancellable( - c?.signal, - import("./index-BCXWVSWX.js") - ), u = await e.cancellable( - c?.signal, - l(e.doc, { + const { validated: n } = t, r = e.settings(), o = e.latest("validation"), s = (d, h) => e.cancellable(d, e.whileOpen(h)), i = async (d) => { + if (!e.doc.signatures) return null; + const { validateSignatures: h } = await s( + d.signal, + import("./index-Cp6ojw-X.js") + ); + return s( + d.signal, + h(e.doc, { trust: r.get().trust, - validationTime: c?.validationTime, - until: c?.until ?? "working-copy" + validationTime: d.validationTime, + until: d.until ?? "working-copy" }) ); - return e.state.update(uxe, u), n.emit({ verdicts: u }), u; + }, a = (d) => { + e.state.update(uxe, d), e.isOpen() && n.emit({ verdicts: d }); + }, c = async (d = {}) => { + const h = await i(d); + if (!h) return []; + if (!e.isOpen()) + throw new te( + "instance-closed", + "signature", + "the document closed during validate()" + ); + return a(h), h; }; - let s = null; - const i = () => { - s?.(), s = null; - }, a = () => { - o().catch( - (c) => globalThis.console?.error("[signature] validation failed:", c) - ); + let l = null; + const u = () => { + l?.(), l = null; + }, f = () => { + o.run(async (d) => { + const h = await i({ signal: d.signal }); + h && d.commit(() => a(h)); + }).catch((d) => { + Xn(d, "operation-cancelled") || Xn(d, "instance-closed") || globalThis.console?.error("[signature] validation failed:", d); + }); }; return { - validate: o, + validate: c, /** Judge now; a scheduled re-judgement is superseded. */ validateNow: () => { - i(), a(); + u(), f(); }, /** Judge once the edits pause. */ revalidateSoon: () => { - i(), s = e.clock.after(Rxe, () => { - s = null, a(); + u(), l = e.clock.after(Rxe, () => { + l = null, f(); }); } }; @@ -51142,35 +51187,35 @@ function Mxe(e, { authority: o, siblings: s }, { findSignature: i }, a) { - const { filled: c, cleared: l } = t, { withBusy: u } = n, { markBytes: d } = r, f = async (m, v, S) => { + const { filled: c, cleared: l } = t, { withBusy: u } = n, { markBytes: f } = r, d = async (m, v, S) => { if (!e.doc.forms.setSignatureAppearance) - throw new re( + throw new te( "unsupported", "signature", "this engine cannot draw into a signature field" ); const k = i(m); if (k?.signed) - throw new re("conflict", "signature", `'${k.fieldName}' is signed`); + throw new te("conflict", "signature", `'${k.fieldName}' is signed`); if (S?.signal?.aborted) - throw new re("operation-cancelled", "signature", "cancelled", { + throw new te("operation-cancelled", "signature", "cancelled", { cause: S.signal.reason }); const N = { type: "forms.setSignatureAppearance", field: m, appearance: v }, w = { key: v ? "signature.fillField" : "signature.clearField" }; await e.cancellable(S?.signal, e.changes.stage({ label: w, ops: [N] }).result); }, h = async (m, v, S) => (o.assertAllowedField("sign", m, "signature.fillField"), u(async () => { - await f(m, await d(v), S), a.clearIfTarget(m), c.emit({ field: m }); + await d(m, await f(v), S), a.clearIfTarget(m), c.emit({ field: m }); })), g = async (m, v, S) => u(async () => { - await s.form.setButtonImage(m, { source: await d(v) }, S), a.clearIfTarget(m), c.emit({ field: m }); + await s.form.setButtonImage(m, { source: await f(v) }, S), a.clearIfTarget(m), c.emit({ field: m }); }), p = async (m, v) => (o.assertAllowedField("sign", m, "signature.clearField"), u(async () => { - await f(m, null, v), l.emit({ field: m }); + await d(m, null, v), l.emit({ field: m }); })); return { fillField: h, fillImageField: g, api: { - fillField: qr(h), - clearField: qr(p) + fillField: Gr(h), + clearField: Gr(p) } }; } @@ -51190,20 +51235,20 @@ const j8 = (e) => e.filter( function Dxe(e, { store: t, siblings: n, authority: r }, { snapshot: o, findSignature: s, listOwnUnsigned: i, api: a }, { mirror: c }, { seal: l, writeTyping: u, - assertMaySign: d, - cancelled: f + assertMaySign: f, + cancelled: d }) { const { withBusy: h } = t, { form: g } = n, { resolveKey: p } = r, m = e.settings(); let v = !1; const S = (b) => { const E = b ?? i()[0]; if (!E) - throw new re("not-found", "signature", "no signature field is left for you to sign"); + throw new te("not-found", "signature", "no signature field is left for you to sign"); const I = s(E); if (!I) - throw new re("not-found", "signature", "no signature field at that address"); + throw new te("not-found", "signature", "no signature field at that address"); if (I.signed) - throw new re("conflict", "signature", `'${I.fieldName}' is signed`); + throw new te("conflict", "signature", `'${I.fieldName}' is signed`); return { field: I.field, name: I.fieldName }; }, C = (b, E, I) => { const O = E && !b.missing.some((R) => R.name === E.name) ? [...b.missing, E] : b.missing, T = [ @@ -51217,7 +51262,7 @@ function Dxe(e, { store: t, siblings: n, authority: r }, { snapshot: o, findSign }, N = async (b) => { const I = (await g.setSigningDate({ signal: b })).failed[0]; if (I) - throw new re(I.error.code, "signature", I.error.message, { + throw new te(I.error.code, "signature", I.error.message, { details: { field: I.ref } }); }, w = (b, E, I) => { @@ -51228,8 +51273,8 @@ function Dxe(e, { store: t, siblings: n, authority: r }, { snapshot: o, findSign const T = I ?? j8(g.getSnapshot()?.fields ?? []); return { lock: T.length > 0 ? { action: "include", fields: [...T] } : void 0, own: T }; }, y = async (b, E, I) => { - const O = await g.validateConfirmed({ signal: I }), { fields: T } = O.snapshot, R = T.find((B) => B.name === b); - if (!R) throw new re("not-found", "signature", `'${b}' is no longer a field`); + const O = await g.validateConfirmed({ signal: I }), { fields: T } = O.snapshot, R = T.find((_) => _.name === b); + if (!R) throw new te("not-found", "signature", `'${b}' is no longer a field`); const M = C( O, Lxe(O.snapshot, R) ? null : R, @@ -51239,8 +51284,8 @@ function Dxe(e, { store: t, siblings: n, authority: r }, { snapshot: o, findSign const F = j8(T); return E.own && !_xe(E.own, F) ? { status: "changed", filled: F } : null; }, x = async (b, E, I, { lock: O, signal: T, ...R }, M) => { - const F = await u(), B = F.length > 0 ? await k(b, T, F) : null; - if (B) return B; + const F = await u(), _ = F.length > 0 ? await k(b, T, F) : null; + if (_) return _; const $ = w(b, O, M); try { const D = await l( @@ -51248,8 +51293,8 @@ function Dxe(e, { store: t, siblings: n, authority: r }, { snapshot: o, findSign { signal: T }, { afterPrepare: async () => { - const _ = await y(E, $, T); - if (_) throw new D8(_); + const B = await y(E, $, T); + if (B) throw new D8(B); } } ); @@ -51259,22 +51304,22 @@ function Dxe(e, { store: t, siblings: n, authority: r }, { snapshot: o, findSign throw D; } }; - return { api: { finish: qr(async (b = {}) => { + return { api: { finish: Gr(async (b = {}) => { const { field: E, signingKey: I, ...O } = b, { signal: T } = O; - if (T?.aborted) throw f(T); + if (T?.aborted) throw d(T); o() || await e.cancellable(T, c.settled()), g.getSnapshot() || await g.refresh({ signal: T }); const { field: R, name: M } = S(E); - if (d({ field: R, certify: O.certify }, "signature.finish"), v) - throw new re("conflict", "signature", "another finish() is running"); + if (f({ field: R, certify: O.certify }, "signature.finish"), v) + throw new te("conflict", "signature", "another finish() is running"); const F = a.getPending(); if (F) - throw new re( + throw new te( "conflict", "signature", `a signing is pending (${F.signingId}); complete or cancel it first` ); if (!I && !m.get().signingKey) - throw new re( + throw new te( "invalid-input", "signature", "no key: set the `key` setting or pass one with the call" @@ -51283,17 +51328,17 @@ function Dxe(e, { store: t, siblings: n, authority: r }, { snapshot: o, findSign try { return await h(async () => { await N(T); - const B = await k(R, T, await u()); - if (B) return B; + const _ = await k(R, T, await u()); + if (_) return _; const $ = await e.cancellable(T, p(I)); - await e.cancellable(T, import("./index-BCXWVSWX.js")), await N(T); + await e.cancellable(T, import("./index-Cp6ojw-X.js")), await N(T); let D = null; - for (let _ = 0; _ < Bxe; _ += 1) { + for (let B = 0; B < Bxe; B += 1) { const L = await x(R, M, $, O, D); if (L.status !== "changed") return L; ({ filled: D } = L); } - throw new re( + throw new te( "conflict", "signature", "the form kept changing while it was being signed; nothing is signed" @@ -51330,13 +51375,13 @@ function Fxe(e, { fillField: a, fillImageField: c }) { - const { signRequested: l } = t, { documentId: u } = n, { mode: d } = r, { stamp: f, annotation: h, form: g } = o, p = e.settings(); - return { api: { placeMark: qr(async (v, S, C) => { + const { signRequested: l } = t, { documentId: u } = n, { mode: f } = r, { stamp: d, annotation: h, form: g } = o, p = e.settings(); + return { api: { placeMark: Gr(async (v, S, C) => { if (!("field" in S)) { if ("assetId" in v) { - const y = f(); + const y = d(); if (!y) - throw new re("unsupported", "signature", "no stamp plugin to place an asset"); + throw new te("unsupported", "signature", "no stamp plugin to place an asset"); return { status: "placed", annotation: (await y.placeAsset(v.assetId, S, { documentId: u(), signal: C?.signal @@ -51344,20 +51389,20 @@ function Fxe(e, { } const N = h(); if (!N) - throw new re("unsupported", "signature", "no annotation plugin to place a mark"); + throw new te("unsupported", "signature", "no annotation plugin to place a mark"); return { status: "placed", annotation: (await N.stamps.place({ source: v.source }, S, C)).annotation.ref }; } const k = g.get(S.field); if (k?.kind === "pushbutton") { if (!k.takesImage) - throw new re( + throw new te( "invalid-input", "signature", `'${k.name}' is a push button that takes no image, so no mark goes into it` ); return await c(S.field, v, C), { status: "filled", field: S.field }; } - switch (d()) { + switch (f()) { case "sign": return p.get().allowCertify && !bO(s()) ? (l.emit({ field: S.field, mark: v }), { status: "requested", field: S.field }) : { status: "signed", @@ -51379,7 +51424,7 @@ function Vxe(e, { marks: r, siblings: o }, { api: s }, i, a, { afterSeal: c }) { - const { withBusy: l, requireSignatures: u } = t, { resolveKey: d, resolveTimestampAuthority: f, timestampTrust: h, assertAllowedField: g } = n, { bytesOf: p, markBytes: m } = r, { form: v } = o, S = /* @__PURE__ */ new Map(), C = 16384, k = (R) => new re("operation-cancelled", "signature", "signing cancelled", { + const { withBusy: l, requireSignatures: u } = t, { resolveKey: f, resolveTimestampAuthority: d, timestampTrust: h, assertAllowedField: g } = n, { bytesOf: p, markBytes: m } = r, { form: v } = o, S = /* @__PURE__ */ new Map(), C = 16384, k = (R) => new te("operation-cancelled", "signature", "signing cancelled", { cause: R.reason }), N = (R) => { const M = u(); @@ -51396,32 +51441,34 @@ function Vxe(e, { const R = await x(); if (R.length === 0) return; const M = R.map((F) => `'${F.name}'`).join(", "); - throw new re( + throw new te( "invalid-input", "signature", `the form refuses what is typed in ${M}; nothing is signed`, { details: { fields: R.map((F) => F.ref) } } ); }, b = async (R, M, F = {}) => { - const B = M?.signal, $ = N(B), { certificateCommonName: D, sign: _ } = await e.cancellable( - B, - import("./index-BCXWVSWX.js") - ), L = await e.cancellable(B, d(R.signingKey)), j = L.kind === "raw" && L.certificateChain[0] ? D(L.certificateChain[0]) : null, H = { ...j ? { name: j } : {}, ...R.signer }, Y = await e.cancellable(B, y(R)), ue = f(R.timestampAuthority); + const _ = M?.signal, $ = N(_), { certificateCommonName: D, sign: B } = await e.cancellable( + _, + import("./index-Cp6ojw-X.js") + ), L = await e.cancellable(_, f(R.signingKey)), j = L.kind === "raw" && L.certificateChain[0] ? D(L.certificateChain[0]) : null, H = { ...j ? { name: j } : {}, ...R.signer }, Y = await e.cancellable(_, y(R)), le = d(R.timestampAuthority); await F.beforePrepare?.(); - const le = B || F.afterPrepare ? async () => { - if (B?.aborted) throw k(B); + const ie = _ || F.afterPrepare ? async () => { + if (_?.aborted) throw k(_); await F.afterPrepare?.(); - } : null, pe = await _($, { + } : null, pe = await B($, { field: R.field, key: L, signer: H, certify: R.certify, lock: R.lock, ...Y ? { appearance: Y } : {}, - ...ue ? { timestampAuthority: ue, timestampTrust: h() } : {}, - ...le ? { afterPrepare: le } : {} + // Left out, `sign()` of core-signature works it out from the key and the authority. + ...R.contentsSizeBytes !== void 0 ? { contentsSizeBytes: R.contentsSizeBytes } : {}, + ...le ? { timestampAuthority: le, timestampTrust: h() } : {}, + ...ie ? { afterPrepare: ie } : {} }); - return i.clearIfTarget(R.field), c(pe, B); + return i.clearIfTarget(R.field), c(pe, _); }, E = async (R, M) => { if (w(R, "signature.sign"), M?.signal?.aborted) throw k(M.signal); return l(() => b(R, M, { beforePrepare: A })); @@ -51430,9 +51477,9 @@ function Vxe(e, { const F = M?.signal; if (F?.aborted) throw k(F); return l(async () => { - const B = u(), $ = await e.cancellable(F, y(R)), D = f(R.timestampAuthority); + const _ = u(), $ = await e.cancellable(F, y(R)), D = d(R.timestampAuthority), B = R.contentsSizeBytes ?? (D ? C : void 0); await A(); - const _ = B.prepare({ + const L = _.prepare({ field: R.field, signer: R.signer, certify: R.certify, @@ -51440,25 +51487,24 @@ function Vxe(e, { subFilter: R.subFilter, digest: R.digest, ...$ ? { appearance: $ } : {}, - // The token has to fit the room reserved now: the completion can't make more. - ...D ? { contentsSizeBytes: C } : {} - }), L = await e.cancellable(F, _); - return S.set(L.signingId, { prepared: L, timestampAuthority: D }), L; + ...B !== void 0 ? { contentsSizeBytes: B } : {} + }), j = await e.cancellable(F, L); + return S.set(j.signingId, { prepared: j, timestampAuthority: D }), j; }); }, O = async (R, M, F) => { if (F?.signal?.aborted) throw k(F.signal); return l(async () => { - const B = u(), $ = S.get(R); + const _ = u(), $ = S.get(R); if (!$) - throw new re( + throw new te( "not-found", "signature", `no signing '${R}' was prepared in this session` ); - const { completeSignature: D } = await import("./index-BCXWVSWX.js"), { timestampAuthority: _ } = $, L = await D({ signatures: B }, { + const { completeSignature: D } = await import("./index-Cp6ojw-X.js"), { timestampAuthority: B } = $, L = await D({ signatures: _ }, { prepared: $.prepared, cms: M, - ..._ ? { timestampAuthority: _, timestampTrust: h() } : {} + ...B ? { timestampAuthority: B, timestampTrust: h() } : {} }); return S.delete(R), i.clearIfTarget(L.signature.field), c(L, F?.signal); }); @@ -51479,38 +51525,38 @@ function Vxe(e, { assertMaySign: w, cancelled: k, api: { - sign: qr(E), - prepareSignature: qr(I), - completeSignature: qr(O), - cancelPending: qr(T) + sign: Gr(E), + prepareSignature: Gr(I), + completeSignature: Gr(O), + cancelPending: Gr(T) } }; } function $xe(e, { store: t, authority: n }, { findSignature: r }, { validateNow: o }) { const s = e.settings(), { withBusy: i } = t, { timestampTrust: a } = n, c = () => { e.assertAllowed("doc.sign", "signature.addValidationInfo"); - const { revocation: f, trust: h, documentTimestamp: g, timestampAuthority: p } = s.get(); - if (!f || !h) - throw new re( + const { revocation: d, trust: h, documentTimestamp: g, timestampAuthority: p } = s.get(); + if (!d || !h) + throw new te( "invalid-input", "signature", "adding validation data needs the `revocation` and `trust` settings" ); if (g && !p) - throw new re( + throw new te( "invalid-input", "signature", "the `documentTimestamp` setting needs the `timestampAuthority` setting" ); - return { revocation: f, trust: h, stampWith: g ? p : null }; - }, l = async (f, h, g) => { - const { revocation: p, trust: m, stampWith: v } = c(), S = await e.cancellable(h, import("./index-BCXWVSWX.js")), { added: C, verdicts: k } = await e.cancellable( + return { revocation: d, trust: h, stampWith: g ? p : null }; + }, l = async (d, h, g) => { + const { revocation: p, trust: m, stampWith: v } = c(), S = await e.cancellable(h, import("./index-Cp6ojw-X.js")), { added: C, verdicts: k } = await e.cancellable( h, - S.addValidationInfo(e.doc, { trust: m, revocation: p, ...f ? { fields: f } : {} }) + S.addValidationInfo(e.doc, { trust: m, revocation: p, ...d ? { fields: d } : {} }) ); if (g?.({ added: C, documentTimestamp: null }), !v) return { added: C, documentTimestamp: null }; const N = k.filter( - ({ signature: x }) => f ? f.some( + ({ signature: x }) => d ? d.some( (A) => A.kind === "fqn" ? x.fieldName === A.name : Rv(x.field, A) ) : x.kind === "signature" ); @@ -51522,27 +51568,27 @@ function $xe(e, { store: t, authority: n }, { findSignature: r }, { validateNow: return { added: C, documentTimestamp: y.signature.field }; }; return { - afterSeal: async (f, h) => { + afterSeal: async (d, h) => { if (!s.get().revocation || !e.allows("doc.sign")) - return { ...f, validationInfo: null, validationInfoError: null }; + return { ...d, validationInfo: null, validationInfoError: null }; let g = null; try { - return g = await l([f.signature.field], h, (p) => { + return g = await l([d.signature.field], h, (p) => { g = p; - }), { ...f, validationInfo: g, validationInfoError: null }; + }), { ...d, validationInfo: g, validationInfoError: null }; } catch (p) { - return { ...f, validationInfo: g, validationInfoError: qe("signature", p) }; + return { ...d, validationInfo: g, validationInfoError: ze("signature", p) }; } finally { o(); } }, api: { - addValidationInfo: qr(async (f, h) => { + addValidationInfo: Gr(async (d, h) => { let g; - if (f) { - const p = r(f); + if (d) { + const p = r(d); if (!p?.signed) - throw new re("not-found", "signature", "no signed field at that address"); + throw new te("not-found", "signature", "no signed field at that address"); g = [p.field]; } return i(async () => { @@ -51557,14 +51603,14 @@ function $xe(e, { store: t, authority: n }, { findSignature: r }, { validateNow: }; } function Uxe(e) { - const t = Cxe(e), { events: n, authority: r } = t, o = e.settings(), s = Txe(e, t), i = Pxe(e, t, s), a = vxe(e, t, i.mirror), c = cxe(e, t, s, i.mirror, a), l = jxe(e, t, a), u = $xe(e, t, a, s), d = Vxe(e, t, a, l, i, u), f = Mxe(e, t, a, l), h = Fxe(e, t, a, d, f), g = Dxe(e, t, a, i, d), p = tu("signature", [ + const t = Cxe(e), { events: n, authority: r } = t, o = e.settings(), s = Txe(e, t), i = Pxe(e, t, s), a = vxe(e, t, i.mirror), c = cxe(e, t, s, i.mirror, a), l = jxe(e, t, a), u = $xe(e, t, a, s), f = Vxe(e, t, a, l, i, u), d = Mxe(e, t, a, l), h = Fxe(e, t, a, f, d), g = Dxe(e, t, a, i, f), p = nu("signature", [ o.api, a.api, c.api, l.api, - d.api, - u.api, f.api, + u.api, + d.api, h.api, g.api, { @@ -51641,7 +51687,7 @@ function Jxe(e) { return typeof t.byteOffset == "number" && typeof t.byteLength == "number" && Tv(t.buffer); } function kW(e) { - const t = ct(e), n = new Uint8Array(t.byteLength); + const t = lt(e), n = new Uint8Array(t.byteLength); return n.set(t), n; } function L5(e) { @@ -51656,13 +51702,13 @@ function Tv(e) { function SW(e) { return Jxe(e); } -function vm(e) { +function km(e) { return Tv(e) || SW(e); } function Mv(e) { - if (!vm(e)) throw new TypeError("Expected ArrayBuffer, SharedArrayBuffer, or ArrayBufferView"); + if (!km(e)) throw new TypeError("Expected ArrayBuffer, SharedArrayBuffer, or ArrayBufferView"); } -function ct(e) { +function lt(e) { return Mv(e), Tv(e) ? new Uint8Array(e) : new Uint8Array(e.buffer, e.byteOffset, e.byteLength); } function D5(e) { @@ -51671,14 +51717,14 @@ function D5(e) { function br(e) { if (Mv(e), L5(e)) return e; const t = new ArrayBuffer(e.byteLength); - return new Uint8Array(t).set(ct(e)), t; + return new Uint8Array(t).set(lt(e)), t; } function Yxe(e) { return Mv(e), Tv(e) ? e : e.byteOffset === 0 && e.byteLength === e.buffer.byteLength ? e.buffer : kW(e).buffer; } function j5(e, t) { if (Mv(e), ArrayBuffer.isView(e) && e.constructor === t) return e; - const n = ct(e), r = Gxe(t); + const n = lt(e), r = Gxe(t); if (n.byteOffset % r !== 0 || n.byteLength % r !== 0) throw new RangeError(`Cannot create ${t.name} over unaligned byte range`); return vW(t) ? new t(n.buffer, n.byteOffset, n.byteLength) : new t(n.buffer, n.byteOffset, n.byteLength / r); } @@ -51689,7 +51735,7 @@ function xW(e) { const t = []; let n = 0; for (const s of e) { - const i = ct(s); + const i = lt(s); t.push(i), n += i.byteLength; } const r = new Uint8Array(n); @@ -51700,16 +51746,16 @@ function xW(e) { } function Xxe(e, t, ...n) { let r, o; - typeof t == "function" ? (r = Array.from(e), o = t) : vm(e) ? r = [ + typeof t == "function" ? (r = Array.from(e), o = t) : km(e) ? r = [ e, t, ...n - ].filter(vm) : (r = Array.from(e), t && r.push(t), r.push(...n)); + ].filter(km) : (r = Array.from(e), t && r.push(t), r.push(...n)); const s = xW(r); return o ? j5(s, o) : s.buffer; } function Zxe(e, t, n = {}) { - const r = ct(e), o = ct(t); + const r = lt(e), o = lt(t); if (!n.constantTime && r.byteLength !== o.byteLength) return !1; const s = Math.max(r.byteLength, o.byteLength); let i = r.byteLength ^ o.byteLength; @@ -51741,14 +51787,14 @@ function r2e(e) { return new TextEncoder().encode(e); } function z2(e, t) { - return typeof e == "string" ? t?.encoding === "utf8" ? r2e(e) : n2e(e) : ct(e); + return typeof e == "string" ? t?.encoding === "utf8" ? r2e(e) : n2e(e) : lt(e); } function W2(e, t, n) { for (let r = 0; r < t.byteLength; r++) if (e[n + r] !== t[r]) return !1; return !0; } function EW(e, t, n) { - const r = ct(e), o = z2(t, n), [s, i] = e2e(r.byteLength, n); + const r = lt(e), o = z2(t, n), [s, i] = e2e(r.byteLength, n); if (o.byteLength === 0) return s; const a = i - o.byteLength; if (a < s) return -1; @@ -51756,7 +51802,7 @@ function EW(e, t, n) { return -1; } function o2e(e, t, n) { - const r = ct(e), o = z2(t, n), [s, i] = t2e(r.byteLength, n); + const r = lt(e), o = z2(t, n), [s, i] = t2e(r.byteLength, n); if (o.byteLength === 0) return i; const a = i - o.byteLength; if (a < s) return -1; @@ -51767,26 +51813,26 @@ function s2e(e, t, n) { return EW(e, t, n) !== -1; } function i2e(e, t, n) { - const r = ct(e), o = z2(t, n); + const r = lt(e), o = z2(t, n); return o.byteLength > r.byteLength ? !1 : W2(r, o, 0); } function a2e(e, t, n) { - const r = ct(e), o = z2(t, n); + const r = lt(e), o = z2(t, n); return o.byteLength > r.byteLength ? !1 : W2(r, o, r.byteLength - o.byteLength); } function c2e(e, t, n) { - const r = ct(e), o = F8(t, 0, r.byteLength), s = F8(n, r.byteLength, r.byteLength); + const r = lt(e), o = F8(t, 0, r.byteLength), s = F8(n, r.byteLength, r.byteLength); return s <= o ? r.subarray(o, o) : r.subarray(o, s); } function l2e(e, t) { - const n = ct(e), r = Number.isFinite(t) ? Math.max(0, Math.trunc(t)) : 0; + const n = lt(e), r = Number.isFinite(t) ? Math.max(0, Math.trunc(t)) : 0; return r >= n.byteLength ? n : n.subarray(n.byteLength - r); } function u2e(e) { return D5(e); } function d2e(e, t) { - const n = ct(e), r = ct(t), o = Math.min(n.byteLength, r.byteLength); + const n = lt(e), r = lt(t), o = Math.min(n.byteLength, r.byteLength); for (let s = 0; s < o; s++) { if (n[s] < r[s]) return -1; if (n[s] > r[s]) return 1; @@ -51800,7 +51846,7 @@ var V8 = Object.defineProperty, ec = (e, t) => { enumerable: !0 }); return V8(n, Symbol.toStringTag, { value: "Module" }), n; -}, Kt = /* @__PURE__ */ ec({ +}, Wt = /* @__PURE__ */ ec({ assertBufferSource: () => Mv, compare: () => d2e, concat: () => Xxe, @@ -51813,7 +51859,7 @@ var V8 = Object.defineProperty, ec = (e, t) => { isArrayBuffer: () => L5, isArrayBufferLike: () => Tv, isArrayBufferView: () => SW, - isBufferSource: () => vm, + isBufferSource: () => km, isSharedArrayBuffer: () => AW, lastIndexOf: () => o2e, slice: () => c2e, @@ -51821,7 +51867,7 @@ var V8 = Object.defineProperty, ec = (e, t) => { tail: () => l2e, toArrayBuffer: () => br, toArrayBufferLike: () => Yxe, - toUint8Array: () => ct, + toUint8Array: () => lt, toUint8ArrayCopy: () => D5, toView: () => j5, toViewCopy: () => Qxe @@ -51832,7 +51878,7 @@ var V8 = Object.defineProperty, ec = (e, t) => { is: () => CW }); function F5(e) { - const t = ct(e); + const t = lt(e); let n = ""; for (const r of t) n += String.fromCharCode(r); return n; @@ -51850,7 +51896,7 @@ const f2e = { decode: V5, is: CW }; -var Xn = /* @__PURE__ */ ec({ +var Zn = /* @__PURE__ */ ec({ decode: () => U5, encode: () => $5, format: () => OW, @@ -51966,7 +52012,7 @@ function IW(e, t = {}) { } } function $5(e, t = {}) { - const n = ct(e), r = t.case ?? "lower", o = Array.from(n, (i) => { + const n = lt(e), r = t.case ?? "lower", o = Array.from(n, (i) => { const a = i.toString(16).padStart(2, "0"); return r === "upper" ? a.toUpperCase() : a; }); @@ -52034,7 +52080,7 @@ function RW(e) { return new TextEncoder().encode(e); } function TW(e) { - return new TextDecoder("utf-8", { fatal: !1 }).decode(ct(e)); + return new TextDecoder("utf-8", { fatal: !1 }).decode(lt(e)); } const E2e = { encode: RW, @@ -52085,7 +52131,7 @@ function K5(e) { return t === "" || I2e.test(t); } function DW(e, t) { - const n = ct(e), r = _W(); + const n = lt(e), r = _W(); return r ? r.from(n).toString("base64") : btoa(F5(n)); } function jW(e, t) { @@ -52101,7 +52147,7 @@ const tx = { normalize: q2, pad: LW }; -var St = /* @__PURE__ */ ec({ +var xt = /* @__PURE__ */ ec({ base64url: () => P2e, decode: () => VW, encode: () => FW, @@ -52131,7 +52177,7 @@ const P2e = { is: H5, normalize: G2 }; -var Cl = /* @__PURE__ */ ec({ +var Il = /* @__PURE__ */ ec({ decode: () => $W, decodeBigInt: () => q5, encode: () => W5, @@ -52168,7 +52214,7 @@ function W5(e, t = {}) { function q5(e, t = {}) { const n = z5(t.bitsPerByte), r = BigInt(n), o = 1 << n; let s = 0n; - for (const i of ct(e)) { + for (const i of lt(e)) { if (i >= o) throw new RangeError(`Byte 0x${i.toString(16)} exceeds ${n} bits`); s = s << r | BigInt(i); } @@ -52177,7 +52223,7 @@ function q5(e, t = {}) { function $W(e, t = {}) { const n = z5(t.bitsPerByte), r = 2 ** n; let o = 0; - for (const s of ct(e)) { + for (const s of lt(e)) { if (s >= r) throw new RangeError(`Byte 0x${s.toString(16)} exceeds ${n} bits`); if (o > (Number.MAX_SAFE_INTEGER - s) / r) throw new RangeError("Value exceeds Number.MAX_SAFE_INTEGER; use decodeBigInt instead"); o = o * r + s; @@ -52212,7 +52258,7 @@ function UW(e, t = {}) { return W5(s, { length: o }); } function G5(e) { - const t = ct(e); + const t = lt(e); if (!t.byteLength) throw new RangeError("Two's complement input must not be empty"); const n = q5(t); return t[0] & 128 ? n - (1n << BigInt(t.byteLength * 8)) : n; @@ -52223,7 +52269,7 @@ function KW(e) { return Number(t); } function HW(e) { - const t = ct(e); + const t = lt(e); if (t.byteLength < 2) return t.byteLength === 1; const n = t[0] === 0 && (t[1] & 128) === 0, r = t[0] === 255 && (t[1] & 128) !== 0; return !n && !r; @@ -52307,7 +52353,7 @@ function nc(e) { constructor(...r) { super(...r); const o = r[0] || {}; - this.isHexOnly = o.isHexOnly ?? !1, this.valueHexView = o.valueHex ? ct(o.valueHex) : J2; + this.isHexOnly = o.isHexOnly ?? !1, this.valueHexView = o.valueHex ? lt(o.valueHex) : J2; } fromBER(r, o, s, i) { const a = r instanceof ArrayBuffer ? new Uint8Array(r) : r; @@ -52322,12 +52368,12 @@ function nc(e) { return { ...super.toJSON(), isHexOnly: this.isHexOnly, - valueHex: Xn.encode(this.valueHexView) + valueHex: Zn.encode(this.valueHexView) }; } }, t.NAME = "hexBlock", t; } -var Tg, Lv = (Tg = class { +var Mg, Lv = (Mg = class { static blockName() { return this.NAME; } @@ -52338,7 +52384,7 @@ var Tg, Lv = (Tg = class { this.valueBeforeDecodeView = new Uint8Array(t); } constructor({ blockLength: t = 0, error: n = "", warnings: r = [], valueBeforeDecode: o = J2 } = {}) { - this.blockLength = t, this.error = n, this.warnings = r, this.valueBeforeDecodeView = ct(o); + this.blockLength = t, this.error = n, this.warnings = r, this.valueBeforeDecodeView = lt(o); } toJSON() { return { @@ -52346,43 +52392,43 @@ var Tg, Lv = (Tg = class { blockLength: this.blockLength, error: this.error, warnings: this.warnings, - valueBeforeDecode: Xn.encode(this.valueBeforeDecodeView) + valueBeforeDecode: Zn.encode(this.valueBeforeDecodeView) }; } -}, Tg.NAME = "baseBlock", Tg), Mg, Xr = (Mg = class extends Lv { +}, Mg.NAME = "baseBlock", Mg), Bg, Zr = (Bg = class extends Lv { fromBER(t, n, r, o) { throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'"); } toBER(t, n) { throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'"); } -}, Mg.NAME = "valueBlock", Mg); +}, Bg.NAME = "valueBlock", Bg); function J5(e) { try { - return Cl.decode(e, { bitsPerByte: 7 }); + return Il.decode(e, { bitsPerByte: 7 }); } catch { return; } } function nx(e) { try { - return Cl.encode(e, { bitsPerByte: 7 }); + return Il.encode(e, { bitsPerByte: 7 }); } catch { return; } } function zW(e) { if (!e.byteLength) return BigInt(0); - const t = BigInt(`0x${Xn.encode(e)}`); + const t = BigInt(`0x${Zn.encode(e)}`); return e[0] & 128 ? t - (BigInt(1) << BigInt(e.byteLength * 8)) : t; } function V2e(e) { const t = ((e < 0 ? -e - BigInt(1) : e).toString(2).length >> 3) + 1, n = e < 0 ? e + (BigInt(1) << BigInt(t * 8)) : e; - return Xn.decode(n.toString(16).padStart(t * 2, "0")); + return Zn.decode(n.toString(16).padStart(t * 2, "0")); } -var Bg, Dv = (Bg = class extends nc(Lv) { +var _g, Dv = (_g = class extends nc(Lv) { constructor({ idBlock: t = {} } = {}) { - super(), t ? (this.isHexOnly = t.isHexOnly ?? !1, this.valueHexView = t.valueHex ? ct(t.valueHex) : J2, this.tagClass = t.tagClass ?? -1, this.tagNumber = t.tagNumber ?? -1, this.isConstructed = t.isConstructed ?? !1) : (this.tagClass = -1, this.tagNumber = -1, this.isConstructed = !1); + super(), t ? (this.isHexOnly = t.isHexOnly ?? !1, this.valueHexView = t.valueHex ? lt(t.valueHex) : J2, this.tagClass = t.tagClass ?? -1, this.tagNumber = t.tagNumber ?? -1, this.isConstructed = t.isConstructed ?? !1) : (this.tagClass = -1, this.tagNumber = -1, this.isConstructed = !1); } toBER(t = !1) { let n = 0; @@ -52430,7 +52476,7 @@ var Bg, Dv = (Bg = class extends nc(Lv) { return r.buffer; } fromBER(t, n, r) { - const o = ct(t); + const o = lt(t); if (!tc(this, o, n, r)) return -1; const s = Number.isInteger(n) && Number.isInteger(r), i = s ? o : o.subarray(n, n + r), a = s ? n : 0, c = s ? r : i.length; if (c === 0) @@ -52464,10 +52510,10 @@ var Bg, Dv = (Bg = class extends nc(Lv) { if (u++, (i[a + h] & 128) === 0) break; } this.blockLength = u + 1; - const d = this.valueHexView = new Uint8Array(u); - for (let h = 0; h < u; h++) d[h] = i[a + h + 1] & 127; - const f = this.blockLength <= 9 ? J5(d) : void 0; - f !== void 0 ? this.tagNumber = f : (this.isHexOnly = !0, this.warnings.push("Tag too long, represented as hex-coded")); + const f = this.valueHexView = new Uint8Array(u); + for (let h = 0; h < u; h++) f[h] = i[a + h + 1] & 127; + const d = this.blockLength <= 9 ? J5(f) : void 0; + d !== void 0 ? this.tagNumber = d : (this.isHexOnly = !0, this.warnings.push("Tag too long, represented as hex-coded")); } if (this.tagClass === 1 && this.isConstructed) switch (this.tagNumber) { case 1: @@ -52495,14 +52541,14 @@ var Bg, Dv = (Bg = class extends nc(Lv) { isConstructed: this.isConstructed }; } -}, Bg.NAME = "identificationBlock", Bg); +}, _g.NAME = "identificationBlock", _g); const $2e = Dv.prototype.toBER, U2e = Dv.prototype.fromBER; -var _g, jv = (_g = class extends Lv { +var Lg, jv = (Lg = class extends Lv { constructor({ lenBlock: t = {} } = {}) { super(), this.isIndefiniteForm = t.isIndefiniteForm ?? !1, this.longFormUsed = t.longFormUsed ?? !1, this.length = t.length ?? 0; } fromBER(t, n, r) { - const o = ct(t); + const o = lt(t); if (!tc(this, o, n, r)) return -1; const s = Number.isInteger(n) && Number.isInteger(r), i = s ? o : o.subarray(n, n + r), a = s ? n : 0, c = s ? r : i.length; if (c === 0) @@ -52518,10 +52564,10 @@ var _g, jv = (_g = class extends Lv { return this.error = "Too big integer", -1; if (l + 1 > c) return this.error = "End of input reached before message was fully decoded", -1; - const u = n + 1, d = o.subarray(u, u + l); - d[0] === 0 && this.warnings.push("Needlessly long encoded length"); + const u = n + 1, f = o.subarray(u, u + l); + f[0] === 0 && this.warnings.push("Needlessly long encoded length"); try { - this.length = Cl.decode(d); + this.length = Il.decode(f); } catch { return this.error = "Too big integer", -1; } @@ -52534,7 +52580,7 @@ var _g, jv = (_g = class extends Lv { if (this.longFormUsed) { let o; try { - o = Cl.encode(this.length); + o = Il.encode(this.length); } catch { return this.error = "Too big length", ks; } @@ -52550,7 +52596,7 @@ var _g, jv = (_g = class extends Lv { length: this.length }; } -}, _g.NAME = "lengthBlock", _g); +}, Lg.NAME = "lengthBlock", Lg); const K2e = jv.prototype.toBER, H2e = jv.prototype.fromBER, Ue = {}, z2e = Z2e(Uint8Array.prototype, "slice"), W2e = Object.getOwnPropertyDescriptor(Uint8Array.prototype, "constructor")?.value, q2e = Object.getOwnPropertyDescriptor(Array.prototype, Symbol.iterator)?.value, H8 = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), "byteLength")?.get, G2e = 16384, WW = 64; let cA; function J2e(e, t) { @@ -52564,7 +52610,7 @@ function J2e(e, t) { ...e }; } -function dn(e, t) { +function fn(e, t) { const n = Object.getOwnPropertyDescriptor(e, t); if (!(!n || !("value" in n))) return n.value; @@ -52633,7 +52679,7 @@ function eEe(e, t, n) { } return !1; } -function km(e, t, n, r) { +function Am(e, t, n, r) { if (Object.prototype.hasOwnProperty.call(e, n) || Object.getPrototypeOf(e) !== t) return !1; const o = Object.getOwnPropertyDescriptor(t, n); return !!o && "value" in o && o.value === r; @@ -52667,23 +52713,23 @@ function Y5(e, t = !1) { } } function nEe(e, t, n) { - if (Object.getPrototypeOf(e) !== n.LocalIdentificationBlock.prototype || !km(e, n.LocalIdentificationBlock.prototype, "toBER", n.originalIdentificationToBER)) return !1; - const r = dn(e, "tagClass"), o = dn(e, "tagNumber"), s = dn(e, "isConstructed"), i = dn(e, "isHexOnly"), a = dn(e, "valueHexView"); + if (Object.getPrototypeOf(e) !== n.LocalIdentificationBlock.prototype || !Am(e, n.LocalIdentificationBlock.prototype, "toBER", n.originalIdentificationToBER)) return !1; + const r = fn(e, "tagClass"), o = fn(e, "tagNumber"), s = fn(e, "isConstructed"), i = fn(e, "isHexOnly"), a = fn(e, "valueHexView"); return typeof r != "number" || !Number.isInteger(r) || r < 1 || r > 4 || typeof o != "number" || !Number.isInteger(o) || o < 0 || s !== t || typeof i != "boolean" ? !1 : i ? !!Y5(a) : Number.isSafeInteger(o); } function rEe(e, t, n) { - if (Object.getPrototypeOf(e) !== n.LocalLengthBlock.prototype || !km(e, n.LocalLengthBlock.prototype, "toBER", n.originalLengthToBER)) return !1; - const r = dn(e, "isIndefiniteForm"), o = dn(e, "longFormUsed"), s = Object.getOwnPropertyDescriptor(e, "length"), i = s && "value" in s ? s.value : void 0, a = Object.getOwnPropertyDescriptor(e, "longFormUsed"); + if (Object.getPrototypeOf(e) !== n.LocalLengthBlock.prototype || !Am(e, n.LocalLengthBlock.prototype, "toBER", n.originalLengthToBER)) return !1; + const r = fn(e, "isIndefiniteForm"), o = fn(e, "longFormUsed"), s = Object.getOwnPropertyDescriptor(e, "length"), i = s && "value" in s ? s.value : void 0, a = Object.getOwnPropertyDescriptor(e, "longFormUsed"); return typeof r == "boolean" && (r === !1 || t) && typeof o == "boolean" && !!a && "value" in a && a.writable === !0 && !!s && "value" in s && s.writable === !0 && typeof i == "number" && Number.isSafeInteger(i) && i >= 0; } function oEe(e, t, n) { - const r = dn(e, "idBlock"), o = dn(e, "lenBlock"); + const r = fn(e, "idBlock"), o = fn(e, "lenBlock"); return !!r && !!o && nEe(r, t, n) && rEe(o, t, n); } function sEe(e, t) { - const n = dn(e, "valueBlock"); - if (!n || Object.getPrototypeOf(n) !== t.LocalConstructedValueBlock.prototype || !km(n, t.LocalConstructedValueBlock.prototype, "toBER", t.originalConstructedToBER)) return; - const r = dn(n, "value"); + const n = fn(e, "valueBlock"); + if (!n || Object.getPrototypeOf(n) !== t.LocalConstructedValueBlock.prototype || !Am(n, t.LocalConstructedValueBlock.prototype, "toBER", t.originalConstructedToBER)) return; + const r = fn(n, "value"); if (!Array.isArray(r) || Object.getPrototypeOf(r) !== Array.prototype) return; const o = Object.getOwnPropertyDescriptor(r, "length"); if (!o || !("value" in o) || o.value !== 1 || Object.prototype.hasOwnProperty.call(r, Symbol.iterator)) return; @@ -52694,11 +52740,11 @@ function sEe(e, t) { return i.value; } function iEe(e, t) { - const n = dn(e, "valueBlock"); - if (!n || Object.getPrototypeOf(n) !== t.LocalBitStringValueBlock.prototype || !km(n, t.LocalBitStringValueBlock.prototype, "toBER", t.originalBitStringToBER) || dn(n, "isConstructed") !== !1) return; - const r = dn(n, "unusedBits"); + const n = fn(e, "valueBlock"); + if (!n || Object.getPrototypeOf(n) !== t.LocalBitStringValueBlock.prototype || !Am(n, t.LocalBitStringValueBlock.prototype, "toBER", t.originalBitStringToBER) || fn(n, "isConstructed") !== !1) return; + const r = fn(n, "unusedBits"); if (typeof r != "number" || !Number.isInteger(r) || r < 0 || r > 7) return; - const o = Y5(dn(n, "valueHexView"), !0); + const o = Y5(fn(n, "valueHexView"), !0); if (o) return { payload: o, @@ -52706,15 +52752,15 @@ function iEe(e, t) { }; } function aEe(e, t, n) { - const r = dn(e, "valueBlock"); + const r = fn(e, "valueBlock"); if (r) { if (t === "integer") { - if (Object.getPrototypeOf(r) !== n.LocalIntegerValueBlock.prototype || !km(r, n.LocalIntegerValueBlock.prototype, "toBER", n.originalIntegerToBER)) return; + if (Object.getPrototypeOf(r) !== n.LocalIntegerValueBlock.prototype || !Am(r, n.LocalIntegerValueBlock.prototype, "toBER", n.originalIntegerToBER)) return; } else if (t === "octet") { - if (Object.getPrototypeOf(r) !== n.LocalOctetStringValueBlock.prototype || !km(r, n.LocalOctetStringValueBlock.prototype, "toBER", n.originalOctetStringToBER) || dn(r, "isConstructed") !== !1) return; + if (Object.getPrototypeOf(r) !== n.LocalOctetStringValueBlock.prototype || !Am(r, n.LocalOctetStringValueBlock.prototype, "toBER", n.originalOctetStringToBER) || fn(r, "isConstructed") !== !1) return; } else if (Object.getPrototypeOf(r) !== n.LocalPrimitiveValueBlock.prototype || !tEe(r, "toBER", n.originalPrimitiveToBER, n.LocalPrimitiveValueBlock)) return; - if (!(t === "primitive" && dn(r, "isHexOnly") !== !0) && typeof dn(r, "isHexOnly") == "boolean") - return Y5(dn(r, "valueHexView")); + if (!(t === "primitive" && fn(r, "isHexOnly") !== !0) && typeof fn(r, "isHexOnly") == "boolean") + return Y5(fn(r, "valueHexView")); } } function cEe(e, t) { @@ -52740,21 +52786,21 @@ function GW(e, t, n) { if (!cEe(e, n)) return; const r = U1(e, "BitString", n) ? "bit" : U1(e, "Integer", n) ? "integer" : U1(e, "OctetString", n) ? "octet" : U1(e, "Primitive", n) ? "primitive" : void 0, o = r === void 0 && lEe(e, n); if (!r && !o || !oEe(e, o, n)) return; - const s = dn(e, "idBlock"), i = dn(e, "lenBlock"); + const s = fn(e, "idBlock"), i = fn(e, "lenBlock"); if (!s || !i) return; if (r) { - const u = r === "bit" ? iEe(e, n) : void 0, d = r === "bit" ? u?.payload : aEe(e, r, n); - return d ? { + const u = r === "bit" ? iEe(e, n) : void 0, f = r === "bit" ? u?.payload : aEe(e, r, n); + return f ? { block: e, kind: r, idBlock: s, lenBlock: i, indefinite: !1, - payload: d, + payload: f, prefix: u?.prefix } : void 0; } - const a = sEe(e, n), c = a && GW(a, t + 1, n), l = dn(i, "isIndefiniteForm"); + const a = sEe(e, n), c = a && GW(a, t + 1, n), l = fn(i, "isIndefiniteForm"); return c ? { block: e, kind: "constructed", @@ -52799,9 +52845,9 @@ function uEe(e, t = !1) { const o = JW(r, t, n), s = new Uint8Array(o.total); return YW(o, s, 0, t), s.buffer; } -var Lg, ir = (Lg = class extends Lv { +var Dg, ar = (Dg = class extends Lv { constructor({ name: t = "", optional: n = !1, primitiveSchema: r, ...o } = {}, s) { - super(o), this.name = t, this.optional = n, r && (this.primitiveSchema = r), this.idBlock = new Dv(o), this.lenBlock = new jv(o), this.valueBlock = s ? new s(o) : new Xr(o); + super(o), this.name = t, this.optional = n, r && (this.primitiveSchema = r), this.idBlock = new Dv(o), this.lenBlock = new jv(o), this.valueBlock = s ? new s(o) : new Zr(o); } fromBER(t, n, r, o) { const s = this.valueBlock.fromBER(t, n, this.lenBlock.isIndefiniteForm ? r : this.lenBlock.length, o); @@ -52836,25 +52882,25 @@ var Lg, ir = (Lg = class extends Lv { return this.primitiveSchema && (t.primitiveSchema = this.primitiveSchema.toJSON()), t; } toString(t = "ascii") { - return t === "ascii" ? this.onAsciiEncoding() : Xn.encode(this.toBER()); + return t === "ascii" ? this.onAsciiEncoding() : Zn.encode(this.toBER()); } onAsciiEncoding() { - return `${this.constructor.NAME} : ${Xn.encode(this.valueBlock.valueBeforeDecodeView)}`; + return `${this.constructor.NAME} : ${Zn.encode(this.valueBlock.valueBeforeDecodeView)}`; } isEqual(t) { if (this === t) return !0; if (!(t instanceof this.constructor)) return !1; const n = this.toBER(), r = t.toBER(); - return Kt.equal(n, r); + return Wt.equal(n, r); } -}, Lg.NAME = "BaseBlock", Lg); -const dEe = ir.prototype.toBER; +}, Dg.NAME = "BaseBlock", Dg); +const dEe = ar.prototype.toBER; function QW(e) { if (e instanceof Ue.Constructed) for (const t of e.valueBlock.value) QW(t) && (e.lenBlock.isIndefiniteForm = !0); return !!e.lenBlock?.isIndefiniteForm; } -var Dg, fEe = (Dg = class extends ir { +var jg, fEe = (jg = class extends ar { getValue() { return this.valueBlock.value; } @@ -52877,17 +52923,17 @@ var Dg, fEe = (Dg = class extends ir { onAsciiEncoding() { return `${this.constructor.NAME} : '${this.valueBlock.value}'`; } -}, Dg.NAME = "BaseStringBlock", Dg), jg, Q5 = (jg = class extends nc(Xr) { +}, jg.NAME = "BaseStringBlock", jg), Fg, Q5 = (Fg = class extends nc(Zr) { constructor({ isHexOnly: t = !0, ...n } = {}) { super(n), this.isHexOnly = t; } -}, jg.NAME = "PrimitiveValueBlock", jg); +}, Fg.NAME = "PrimitiveValueBlock", Fg); const hEe = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Q5.prototype), "toBER")?.value; -var Wd, Je = (Wd = class extends ir { +var Gd, Je = (Gd = class extends ar { constructor(t = {}) { super(t, Q5), this.idBlock.isConstructed = !1; } -}, Ue.Primitive = Wd, Wd.NAME = "PRIMITIVE", Wd); +}, Ue.Primitive = Gd, Gd.NAME = "PRIMITIVE", Gd); let XW; function pEe(e) { XW = { @@ -52914,8 +52960,8 @@ function yEe(e, t, n, r) { if (l !== 2 && l !== 5 && l !== 48 || (i = e[t + 1], i >= 128 || i > n - 2) || l === 5 && i !== 0 || !gEe(r) || i > Object.getOwnPropertyDescriptor(r, "maxContentLength").value) return; const u = l === 2 ? "Integer" : l === 5 ? "Null" : "Sequence"; if (s = o[u], !mEe(Ue, u, s)) return; - const d = Object.getOwnPropertyDescriptor(Dv.prototype, "fromBER"), f = Object.getOwnPropertyDescriptor(jv.prototype, "fromBER"); - if (!d || !("value" in d) || d.value !== U2e || !f || !("value" in f) || f.value !== H2e) return; + const f = Object.getOwnPropertyDescriptor(Dv.prototype, "fromBER"), d = Object.getOwnPropertyDescriptor(jv.prototype, "fromBER"); + if (!f || !("value" in f) || f.value !== U2e || !d || !("value" in d) || d.value !== H2e) return; } catch { return; } @@ -52940,7 +52986,7 @@ function Fv(e = {}) { }; } function kEe(e) { - const t = new ir({}, Xr); + const t = new ar({}, Zr); return t.error = e, { offset: -1, result: t @@ -52971,7 +53017,7 @@ function Z5(e, t = 0, n = e.length, r = Fv()) { const o = yEe(e, t, n, r); if (o) return o; const s = t; - let i = new ir({}, Xr); + let i = new ar({}, Zr); if (!tc(i, e, t, n)) return { offset: -1, result: i @@ -53010,7 +53056,7 @@ function Z5(e, t = 0, n = e.length, r = Fv()) { offset: -1, result: i }; - let d = ir; + let f = ar; switch (i.idBlock.tagClass) { case 1: if (i.idBlock.tagNumber >= 37 && i.idBlock.isHexOnly === !1) @@ -53025,37 +53071,37 @@ function Z5(e, t = 0, n = e.length, r = Fv()) { offset: -1, result: i }; - d = Ue.EndOfContent; + f = Ue.EndOfContent; break; case 1: - d = Ue.Boolean; + f = Ue.Boolean; break; case 2: - d = Ue.Integer; + f = Ue.Integer; break; case 3: - d = Ue.BitString; + f = Ue.BitString; break; case 4: - d = Ue.OctetString; + f = Ue.OctetString; break; case 5: - d = Ue.Null; + f = Ue.Null; break; case 6: - d = Ue.ObjectIdentifier; + f = Ue.ObjectIdentifier; break; case 10: - d = Ue.Enumerated; + f = Ue.Enumerated; break; case 12: - d = Ue.Utf8String; + f = Ue.Utf8String; break; case 13: - d = Ue.RelativeObjectIdentifier; + f = Ue.RelativeObjectIdentifier; break; case 14: - d = Ue.TIME; + f = Ue.TIME; break; case 15: return i.error = "[UNIVERSAL 15] is reserved by ASN.1 standard", { @@ -53063,96 +53109,96 @@ function Z5(e, t = 0, n = e.length, r = Fv()) { result: i }; case 16: - d = Ue.Sequence; + f = Ue.Sequence; break; case 17: - d = Ue.Set; + f = Ue.Set; break; case 18: - d = Ue.NumericString; + f = Ue.NumericString; break; case 19: - d = Ue.PrintableString; + f = Ue.PrintableString; break; case 20: - d = Ue.TeletexString; + f = Ue.TeletexString; break; case 21: - d = Ue.VideotexString; + f = Ue.VideotexString; break; case 22: - d = Ue.IA5String; + f = Ue.IA5String; break; case 23: - d = Ue.UTCTime; + f = Ue.UTCTime; break; case 24: - d = Ue.GeneralizedTime; + f = Ue.GeneralizedTime; break; case 25: - d = Ue.GraphicString; + f = Ue.GraphicString; break; case 26: - d = Ue.VisibleString; + f = Ue.VisibleString; break; case 27: - d = Ue.GeneralString; + f = Ue.GeneralString; break; case 28: - d = Ue.UniversalString; + f = Ue.UniversalString; break; case 29: - d = Ue.CharacterString; + f = Ue.CharacterString; break; case 30: - d = Ue.BmpString; + f = Ue.BmpString; break; case 31: - d = Ue.DATE; + f = Ue.DATE; break; case 32: - d = Ue.TimeOfDay; + f = Ue.TimeOfDay; break; case 33: - d = Ue.DateTime; + f = Ue.DateTime; break; case 34: - d = Ue.Duration; + f = Ue.Duration; break; default: { - const f = i.idBlock.isConstructed ? new Ue.Constructed() : new Ue.Primitive(); - f.idBlock = i.idBlock, f.lenBlock = i.lenBlock, f.warnings = i.warnings, i = f; + const d = i.idBlock.isConstructed ? new Ue.Constructed() : new Ue.Primitive(); + d.idBlock = i.idBlock, d.lenBlock = i.lenBlock, d.warnings = i.warnings, i = d; } } break; default: - d = i.idBlock.isConstructed ? Ue.Constructed : Ue.Primitive; + f = i.idBlock.isConstructed ? Ue.Constructed : Ue.Primitive; } - return i = xEe(i, d), c = i.fromBER(e, t, l, r), i.valueBeforeDecodeView = e.subarray(s, s + i.blockLength), { + return i = xEe(i, f), c = i.fromBER(e, t, l, r), i.valueBeforeDecodeView = e.subarray(s, s + i.blockLength), { offset: c, result: i }; } -function hn(e, t = {}) { +function pn(e, t = {}) { if (!e.byteLength) { - const r = new ir({}, Xr); + const r = new ar({}, Zr); return r.error = "Input buffer has zero length", { offset: -1, result: r }; } - const n = ct(e); + const n = lt(e); return Z5(t.copyInput === !1 ? n : n.slice(), 0, e.byteLength, Fv(t)); } function EEe(e, t) { return e ? 1 : t; } -var Fg, Ua = (Fg = class extends Xr { +var Vg, Ua = (Vg = class extends Zr { constructor({ value: t = [], isIndefiniteForm: n = !1, ...r } = {}) { super(r), this.value = t, this.isIndefiniteForm = n; } fromBER(t, n, r, o) { - const s = ct(t), i = o ?? Fv(); + const s = lt(t), i = o ?? Fv(); if (!tc(this, s, n, r)) return -1; if (this.valueBeforeDecodeView = s.subarray(n, n + r), this.valueBeforeDecodeView.length === 0) return this.warnings.push("Zero buffer length"), n; @@ -53179,9 +53225,9 @@ var Fg, Ua = (Fg = class extends Xr { for (const n of this.value) t.value.push(n.toJSON()); return t; } -}, Fg.NAME = "ConstructedValueBlock", Fg); +}, Vg.NAME = "ConstructedValueBlock", Vg); const CEe = Ua.prototype.toBER; -var qd, ee = (qd = class extends ir { +var Jd, ne = (Jd = class extends ar { constructor(t = {}) { super(t, Ua), this.idBlock.isConstructed = !0; } @@ -53200,22 +53246,22 @@ var qd, ee = (qd = class extends ir { ${t.join(` `)}` : `${n} :`; } -}, Ue.Constructed = qd, qd.NAME = "CONSTRUCTED", qd), Vg, IEe = (Vg = class extends Xr { +}, Ue.Constructed = Jd, Jd.NAME = "CONSTRUCTED", Jd), $g, IEe = ($g = class extends Zr { fromBER(t, n, r) { return n; } toBER(t) { return ks; } -}, Vg.override = "EndOfContentValueBlock", Vg), Gd; -Gd = class extends ir { +}, $g.override = "EndOfContentValueBlock", $g), Yd; +Yd = class extends ar { constructor(t = {}) { super(t, IEe), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 0; } -}, Ue.EndOfContent = Gd, Gd.NAME = D2e; -var Jd, fn = (Jd = class extends ir { +}, Ue.EndOfContent = Yd, Yd.NAME = D2e; +var Qd, hn = (Qd = class extends ar { constructor(t = {}) { - super(t, Xr), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 5; + super(t, Zr), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 5; } fromBER(t, n, r) { return this.lenBlock.length > 0 && this.warnings.push("Non-zero length of value block for Null type"), this.idBlock.error.length || (this.blockLength += this.idBlock.blockLength), this.lenBlock.error.length || (this.blockLength += this.lenBlock.blockLength), this.blockLength += r, n + r > t.byteLength ? (this.error = "End of input reached before message was fully decoded (inconsistent offset and length values)", -1) : n + r; @@ -53231,7 +53277,7 @@ var Jd, fn = (Jd = class extends ir { onAsciiEncoding() { return `${this.constructor.NAME}`; } -}, Ue.Null = Jd, Jd.NAME = "NULL", Jd), $g, NEe = ($g = class extends nc(Xr) { +}, Ue.Null = Qd, Qd.NAME = "NULL", Qd), Ug, NEe = (Ug = class extends nc(Zr) { get value() { for (const t of this.valueHexView) if (t > 0) return !0; return !1; @@ -53240,10 +53286,10 @@ var Jd, fn = (Jd = class extends ir { this.valueHexView[0] = t ? 255 : 0; } constructor({ value: t, ...n } = {}) { - super(n), n.valueHex ? this.valueHexView = ct(n.valueHex) : this.valueHexView = /* @__PURE__ */ new Uint8Array(1), t && (this.value = t); + super(n), n.valueHex ? this.valueHexView = lt(n.valueHex) : this.valueHexView = /* @__PURE__ */ new Uint8Array(1), t && (this.value = t); } fromBER(t, n, r) { - const o = ct(t); + const o = lt(t); return tc(this, o, n, r) ? (this.valueHexView = o.subarray(n, n + r), r > 1 && this.warnings.push("Boolean value encoded in more then 1 octet"), this.isHexOnly = !0, r > 1 && !aA.isMinimal(this.valueHexView) && this.warnings.push("Needlessly long format"), this.blockLength = r, n + r) : -1; } toBER() { @@ -53255,7 +53301,7 @@ var Jd, fn = (Jd = class extends ir { value: this.value }; } -}, $g.NAME = "BooleanValueBlock", $g), Yd, Ql = (Yd = class extends ir { +}, Ug.NAME = "BooleanValueBlock", Ug), Xd, Xl = (Xd = class extends ar { getValue() { return this.valueBlock.value; } @@ -53268,7 +53314,7 @@ var Jd, fn = (Jd = class extends ir { onAsciiEncoding() { return `${this.constructor.NAME} : ${this.getValue}`; } -}, Ue.Boolean = Yd, Yd.NAME = "BOOLEAN", Yd), Ug, eT = (Ug = class extends nc(Ua) { +}, Ue.Boolean = Xd, Xd.NAME = "BOOLEAN", Xd), Kg, eT = (Kg = class extends nc(Ua) { constructor({ isConstructed: t = !1, ...n } = {}) { super(n), this.isConstructed = t; } @@ -53298,9 +53344,9 @@ var Jd, fn = (Jd = class extends ir { isConstructed: this.isConstructed }; } -}, Ug.NAME = "OctetStringValueBlock", Ug); +}, Kg.NAME = "OctetStringValueBlock", Kg); const OEe = eT.prototype.toBER; -var Nl, Oe = (Nl = class extends ir { +var Ol, Oe = (Ol = class extends ar { constructor({ idBlock: t = {}, lenBlock: n = {}, ...r } = {}) { r.isConstructed ?? (r.isConstructed = !!r.value?.length), super({ idBlock: { @@ -53330,15 +53376,15 @@ var Nl, Oe = (Nl = class extends ir { return super.fromBER(t, n, r, o); } onAsciiEncoding() { - return this.valueBlock.isConstructed || this.valueBlock.value && this.valueBlock.value.length ? ee.prototype.onAsciiEncoding.call(this) : `${this.constructor.NAME} : ${Xn.encode(this.valueBlock.valueHexView)}`; + return this.valueBlock.isConstructed || this.valueBlock.value && this.valueBlock.value.length ? ne.prototype.onAsciiEncoding.call(this) : `${this.constructor.NAME} : ${Zn.encode(this.valueBlock.valueHexView)}`; } getValue() { if (!this.idBlock.isConstructed) return this.valueBlock.valueHexView.slice().buffer; const t = []; - for (const n of this.valueBlock.value) n instanceof Nl && t.push(n.valueBlock.valueHexView); + for (const n of this.valueBlock.value) n instanceof Ol && t.push(n.valueBlock.valueHexView); return z0(t); } -}, Ue.OctetString = Nl, Nl.NAME = j2e, Nl), Kg, tT = (Kg = class extends nc(Ua) { +}, Ue.OctetString = Ol, Ol.NAME = j2e, Ol), Hg, tT = (Hg = class extends nc(Ua) { constructor({ unusedBits: t = 0, isConstructed: n = !1, ...r } = {}) { super(r), this.unusedBits = t, this.isConstructed = n, this.blockLength = this.valueHexView.byteLength; } @@ -53362,7 +53408,7 @@ var Nl, Oe = (Nl = class extends ir { } return s; } - const i = ct(t); + const i = lt(t); if (!tc(this, i, n, r)) return -1; const a = i.subarray(n, n + r); if (this.unusedBits = a[0], this.unusedBits > 7) @@ -53396,9 +53442,9 @@ var Nl, Oe = (Nl = class extends ir { isConstructed: this.isConstructed }; } -}, Kg.NAME = "BitStringValueBlock", Kg); +}, Hg.NAME = "BitStringValueBlock", Hg); const PEe = tT.prototype.toBER; -var Qd, ht = (Qd = class extends ir { +var Zd, pt = (Zd = class extends ar { constructor({ idBlock: t = {}, lenBlock: n = {}, ...r } = {}) { r.isConstructed ?? (r.isConstructed = !!r.value?.length), super({ idBlock: { @@ -53416,7 +53462,7 @@ var Qd, ht = (Qd = class extends ir { return this.valueBlock.isConstructed = this.idBlock.isConstructed, this.valueBlock.isIndefiniteForm = this.lenBlock.isIndefiniteForm, super.fromBER(t, n, r, o); } onAsciiEncoding() { - if (this.valueBlock.isConstructed || this.valueBlock.value && this.valueBlock.value.length) return ee.prototype.onAsciiEncoding.call(this); + if (this.valueBlock.isConstructed || this.valueBlock.value && this.valueBlock.value.length) return ne.prototype.onAsciiEncoding.call(this); { const t = [], n = this.valueBlock.valueHexView; for (const o of n) t.push(o.toString(2).padStart(8, "0")); @@ -53424,7 +53470,7 @@ var Qd, ht = (Qd = class extends ir { return `${this.constructor.NAME} : ${r.substring(0, r.length - this.valueBlock.unusedBits)}`; } } -}, Ue.BitString = Qd, Qd.NAME = F2e, Qd), Xd, Y2 = (Xd = class extends nc(Xr) { +}, Ue.BitString = Zd, Zd.NAME = F2e, Zd), ef, Y2 = (ef = class extends nc(Zr) { setValueHex() { this.valueHexView.length >= 4 ? (this.warnings.push("Too big Integer for decoding, hex only"), this.isHexOnly = !0, this._valueDec = 0) : (this.isHexOnly = !1, this.valueHexView.length > 0 && (aA.isMinimal(this.valueHexView) || this.warnings.push("Needlessly long format"), this._valueDec = aA.decode(this.valueHexView))); } @@ -53474,16 +53520,16 @@ var Qd, ht = (Qd = class extends ir { toString() { return zW(this.valueHexView).toString(10); } -}, Xd.NAME = "IntegerValueBlock", Object.defineProperty(Xd.prototype, "valueHex", { +}, ef.NAME = "IntegerValueBlock", Object.defineProperty(ef.prototype, "valueHex", { set: function(t) { this.valueHexView = new Uint8Array(t), this.setValueHex(); }, get: function() { return this.valueHexView.slice().buffer; } -}), Xd); +}), ef); const REe = Y2.prototype.toBER, TEe = Y2.prototype.toString; -var Bs, de = (Bs = class extends ir { +var Bs, ue = (Bs = class extends ar { constructor(t = {}) { super(t, Y2), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 2; } @@ -53504,17 +53550,17 @@ var Bs, de = (Bs = class extends ir { onAsciiEncoding() { return `${this.constructor.NAME} : ${this.valueBlock.toString()}`; } -}, Ue.Integer = Bs, Bs.NAME = "INTEGER", Bs), Zd, Df = (Zd = class extends de { +}, Ue.Integer = Bs, Bs.NAME = "INTEGER", Bs), tf, Ff = (tf = class extends ue { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 10; } -}, Ue.Enumerated = Zd, Zd.NAME = "ENUMERATED", Zd), Hg, W8 = (Hg = class extends nc(Xr) { +}, Ue.Enumerated = tf, tf.NAME = "ENUMERATED", tf), zg, W8 = (zg = class extends nc(Zr) { constructor({ valueDec: t = -1, isFirstSid: n = !1, ...r } = {}) { super(r), this.valueDec = t, this.isFirstSid = n; } fromBER(t, n, r) { if (!r) return n; - const o = ct(t); + const o = lt(t); if (!tc(this, o, n, r)) return -1; const s = o.subarray(n, n + r); if (this.blockLength === 0 && Number.isInteger(n) && Number.isInteger(r)) { @@ -53568,7 +53614,7 @@ var Bs, de = (Bs = class extends ir { } toString() { let t = ""; - if (this.isHexOnly) t = Xn.encode(this.valueHexView); + if (this.isHexOnly) t = Zn.encode(this.valueHexView); else if (this.isFirstSid) { let n = this.valueDec; this.valueDec <= 39 ? t = "0." : this.valueDec <= 79 ? (t = "1.", n -= 40) : (t = "2.", n -= 80), t += n.toString(); @@ -53582,7 +53628,7 @@ var Bs, de = (Bs = class extends ir { isFirstSid: this.isFirstSid }; } -}, Hg.NAME = "sidBlock", Hg), zg, MEe = (zg = class extends Xr { +}, zg.NAME = "sidBlock", zg), Wg, MEe = (Wg = class extends Zr { constructor({ value: t = "", ...n } = {}) { super(n), this.value = [], t && this.fromString(t); } @@ -53655,7 +53701,7 @@ var Bs, de = (Bs = class extends ir { for (let n = 0; n < this.value.length; n++) t.sidArray.push(this.value[n].toJSON()); return t; } -}, zg.NAME = "ObjectIdentifierValueBlock", zg), ef, Ve = (ef = class extends ir { +}, Wg.NAME = "ObjectIdentifierValueBlock", Wg), nf, $e = (nf = class extends ar { getValue() { return this.valueBlock.toString(); } @@ -53674,13 +53720,13 @@ var Bs, de = (Bs = class extends ir { value: this.getValue() }; } -}, Ue.ObjectIdentifier = ef, ef.NAME = "OBJECT IDENTIFIER", ef), Wg, q8 = (Wg = class extends nc(Lv) { +}, Ue.ObjectIdentifier = nf, nf.NAME = "OBJECT IDENTIFIER", nf), qg, q8 = (qg = class extends nc(Lv) { constructor({ valueDec: t = 0, ...n } = {}) { super(n), this.valueDec = t; } fromBER(t, n, r) { if (r === 0) return n; - const o = ct(t); + const o = lt(t); if (!tc(this, o, n, r)) return -1; const s = o.subarray(n, n + r); if (this.blockLength === 0 && Number.isInteger(n) && Number.isInteger(r)) { @@ -53725,7 +53771,7 @@ var Bs, de = (Bs = class extends ir { } toString() { let t = ""; - return this.isHexOnly ? t = Xn.encode(this.valueHexView) : t = this.valueDec.toString(), t; + return this.isHexOnly ? t = Zn.encode(this.valueHexView) : t = this.valueDec.toString(), t; } toJSON() { return { @@ -53733,7 +53779,7 @@ var Bs, de = (Bs = class extends ir { valueDec: this.valueDec }; } -}, Wg.NAME = "relativeSidBlock", Wg), qg, BEe = (qg = class extends Xr { +}, qg.NAME = "relativeSidBlock", qg), Gg, BEe = (Gg = class extends Zr { constructor({ value: t = "", ...n } = {}) { super(n), this.value = [], t && this.fromString(t); } @@ -53786,8 +53832,8 @@ var Bs, de = (Bs = class extends ir { for (let n = 0; n < this.value.length; n++) t.sidArray.push(this.value[n].toJSON()); return t; } -}, qg.NAME = "RelativeObjectIdentifierValueBlock", qg), tf; -tf = class extends ir { +}, Gg.NAME = "RelativeObjectIdentifierValueBlock", Gg), rf; +rf = class extends ar { getValue() { return this.valueBlock.toString(); } @@ -53806,16 +53852,16 @@ tf = class extends ir { value: this.getValue() }; } -}, Ue.RelativeObjectIdentifier = tf, tf.NAME = "RelativeObjectIdentifier"; -var nf, z = (nf = class extends ee { +}, Ue.RelativeObjectIdentifier = rf, rf.NAME = "RelativeObjectIdentifier"; +var of, z = (of = class extends ne { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 16; } -}, Ue.Sequence = nf, nf.NAME = "SEQUENCE", nf), rf, An = (rf = class extends ee { +}, Ue.Sequence = of, of.NAME = "SEQUENCE", of), sf, An = (sf = class extends ne { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 17; } -}, Ue.Set = rf, rf.NAME = "SET", rf), Gg, _Ee = (Gg = class extends nc(Xr) { +}, Ue.Set = sf, sf.NAME = "SET", sf), Jg, _Ee = (Jg = class extends nc(Zr) { constructor({ ...t } = {}) { super(t), this.isHexOnly = !0, this.value = ""; } @@ -53825,27 +53871,27 @@ var nf, z = (nf = class extends ee { value: this.value }; } -}, Gg.NAME = "StringValueBlock", Gg), Jg, LEe = (Jg = class extends _Ee { -}, Jg.NAME = "SimpleStringValueBlock", Jg), Yg, Go = (Yg = class extends fEe { +}, Jg.NAME = "StringValueBlock", Jg), Yg, LEe = (Yg = class extends _Ee { +}, Yg.NAME = "SimpleStringValueBlock", Yg), Qg, Jo = (Qg = class extends fEe { constructor({ ...t } = {}) { super(t, LEe); } fromBuffer(t) { - this.valueBlock.value = String.fromCharCode.apply(null, ct(t)); + this.valueBlock.value = String.fromCharCode.apply(null, lt(t)); } fromString(t) { const n = t.length, r = this.valueBlock.valueHexView = new Uint8Array(n); for (let o = 0; o < n; o++) r[o] = t.charCodeAt(o); this.valueBlock.value = t; } -}, Yg.NAME = "SIMPLE STRING", Yg); +}, Qg.NAME = "SIMPLE STRING", Qg); const DEe = new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 }), jEe = /\p{Cs}/u; -var Qg, FEe = (Qg = class extends Go { +var Xg, FEe = (Xg = class extends Jo { fromBuffer(t) { - this.valueBlock.valueHexView = ct(t); + this.valueBlock.valueHexView = lt(t); try { this.valueBlock.value = DEe.decode(this.valueBlock.valueHexView); } catch (n) { @@ -53856,32 +53902,32 @@ var Qg, FEe = (Qg = class extends Go { if (jEe.test(t)) throw new TypeError("The string contains lone surrogates and cannot be encoded as UTF-8"); this.valueBlock.valueHexView = x2e.encode(t), this.valueBlock.value = t; } -}, Qg.NAME = "Utf8StringValueBlock", Qg), of, ki = (of = class extends FEe { +}, Xg.NAME = "Utf8StringValueBlock", Xg), af, ki = (af = class extends FEe { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 12; } -}, Ue.Utf8String = of, of.NAME = "UTF8String", of), Xg, VEe = (Xg = class extends Go { +}, Ue.Utf8String = af, af.NAME = "UTF8String", af), Zg, VEe = (Zg = class extends Jo { checkValue(t) { return t.length % 2 !== 0 ? "BMPString value length must be a multiple of 2" : ""; } fromBuffer(t) { - this.valueBlock.value = K8.decode(t), this.valueBlock.valueHexView = ct(t); + this.valueBlock.value = K8.decode(t), this.valueBlock.valueHexView = lt(t); } fromString(t) { this.valueBlock.value = t, this.valueBlock.valueHexView = K8.encode(t); } -}, Xg.NAME = "BmpStringValueBlock", Xg), sf, kO = (sf = class extends VEe { +}, Zg.NAME = "BmpStringValueBlock", Zg), cf, kO = (cf = class extends VEe { constructor({ ...t } = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 30; } -}, Ue.BmpString = sf, sf.NAME = "BMPString", sf); +}, Ue.BmpString = cf, cf.NAME = "BMPString", cf); const $Ee = 1114111, G8 = 65533; -var Zg, UEe = (Zg = class extends Go { +var em, UEe = (em = class extends Jo { checkValue(t) { return t.length % 4 !== 0 ? "UniversalString value length must be a multiple of 4" : ""; } fromBuffer(t) { - const n = ct(t), r = new DataView(n.buffer, n.byteOffset, n.byteLength), o = n.length >> 2, s = []; + const n = lt(t), r = new DataView(n.buffer, n.byteOffset, n.byteLength), o = n.length >> 2, s = []; for (let a = 0; a < o; a++) { const c = r.getUint32(a * 4); if (c > $Ee) @@ -53897,50 +53943,50 @@ var Zg, UEe = (Zg = class extends Go { } fromString(t) { const n = Array.from(t, (o) => o.codePointAt(0)), r = this.valueBlock.valueHexView = new Uint8Array(n.length * 4); - for (let o = 0; o < n.length; o++) r.set(Cl.encode(n[o], { length: 4 }), o * 4); + for (let o = 0; o < n.length; o++) r.set(Il.encode(n[o], { length: 4 }), o * 4); this.valueBlock.value = t; } -}, Zg.NAME = "UniversalStringValueBlock", Zg), af, AO = (af = class extends UEe { +}, em.NAME = "UniversalStringValueBlock", em), lf, AO = (lf = class extends UEe { constructor({ ...t } = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 28; } -}, Ue.UniversalString = af, af.NAME = "UniversalString", af), cf, lA = (cf = class extends Go { +}, Ue.UniversalString = lf, lf.NAME = "UniversalString", lf), uf, lA = (uf = class extends Jo { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 18; } -}, Ue.NumericString = cf, cf.NAME = "NumericString", cf), lf, ia = (lf = class extends Go { +}, Ue.NumericString = uf, uf.NAME = "NumericString", uf), df, ia = (df = class extends Jo { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 19; } -}, Ue.PrintableString = lf, lf.NAME = "PrintableString", lf), uf, SO = (uf = class extends Go { +}, Ue.PrintableString = df, df.NAME = "PrintableString", df), ff, SO = (ff = class extends Jo { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 20; } -}, Ue.TeletexString = uf, uf.NAME = "TeletexString", uf), df, KEe = (df = class extends Go { +}, Ue.TeletexString = ff, ff.NAME = "TeletexString", ff), hf, KEe = (hf = class extends Jo { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 21; } -}, Ue.VideotexString = df, df.NAME = "VideotexString", df), ff, ZW = (ff = class extends Go { +}, Ue.VideotexString = hf, hf.NAME = "VideotexString", hf), pf, ZW = (pf = class extends Jo { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 22; } -}, Ue.IA5String = ff, ff.NAME = "IA5String", ff), hf, HEe = (hf = class extends Go { +}, Ue.IA5String = pf, pf.NAME = "IA5String", pf), gf, HEe = (gf = class extends Jo { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 25; } -}, Ue.GraphicString = hf, hf.NAME = "GraphicString", hf), pf, eq = (pf = class extends Go { +}, Ue.GraphicString = gf, gf.NAME = "GraphicString", gf), mf, eq = (mf = class extends Jo { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 26; } -}, Ue.VisibleString = pf, pf.NAME = "VisibleString", pf), gf, zEe = (gf = class extends Go { +}, Ue.VisibleString = mf, mf.NAME = "VisibleString", mf), yf, zEe = (yf = class extends Jo { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 27; } -}, Ue.GeneralString = gf, gf.NAME = "GeneralString", gf), mf, WEe = (mf = class extends Go { +}, Ue.GeneralString = yf, yf.NAME = "GeneralString", yf), bf, WEe = (bf = class extends Jo { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 29; } -}, Ue.CharacterString = mf, mf.NAME = "CharacterString", mf), yf, W0 = (yf = class extends eq { +}, Ue.CharacterString = bf, bf.NAME = "CharacterString", bf), wf, W0 = (wf = class extends eq { constructor({ value: t, valueDate: n, ...r } = {}) { if (super(r), this.year = 0, this.month = 0, this.day = 0, this.hour = 0, this.minute = 0, this.second = 0, t) { this.fromString(t), this.valueBlock.valueHexView = new Uint8Array(t.length); @@ -53949,7 +53995,7 @@ var Zg, UEe = (Zg = class extends Go { n && (this.fromDate(n), this.valueBlock.valueHexView = new Uint8Array(this.toBuffer())), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 23; } fromBuffer(t) { - this.fromString(String.fromCharCode.apply(null, ct(t))); + this.fromString(String.fromCharCode.apply(null, lt(t))); } toBuffer() { this.checkYear(); @@ -53996,7 +54042,7 @@ var Zg, UEe = (Zg = class extends Go { second: this.second }; } -}, Ue.UTCTime = yf, yf.NAME = "UTCTime", yf), bf, Yt = (bf = class extends W0 { +}, Ue.UTCTime = wf, wf.NAME = "UTCTime", wf), vf, Xt = (vf = class extends W0 { constructor(t = {}) { super(t), this.millisecond ?? (this.millisecond = 0), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 24; } @@ -54014,30 +54060,30 @@ var Zg, UEe = (Zg = class extends Go { if (t[t.length - 1] === "Z") r = t.substring(0, t.length - 1), n = !0; else { - const d = new Number(t[t.length - 1]); - if (isNaN(d.valueOf())) throw new Error("Wrong input string for conversion"); + const f = new Number(t[t.length - 1]); + if (isNaN(f.valueOf())) throw new Error("Wrong input string for conversion"); r = t; } if (n) { if (r.indexOf("+") !== -1) throw new Error("Wrong input string for conversion"); if (r.indexOf("-") !== -1) throw new Error("Wrong input string for conversion"); } else { - let d = 1, f = r.indexOf("+"), h = ""; - if (f === -1 && (f = r.indexOf("-"), d = -1), f !== -1) { - if (h = r.substring(f + 1), r = r.substring(0, f), h.length !== 2 && h.length !== 4) throw new Error("Wrong input string for conversion"); + let f = 1, d = r.indexOf("+"), h = ""; + if (d === -1 && (d = r.indexOf("-"), f = -1), d !== -1) { + if (h = r.substring(d + 1), r = r.substring(0, d), h.length !== 2 && h.length !== 4) throw new Error("Wrong input string for conversion"); let g = parseInt(h.substring(0, 2), 10); if (isNaN(g.valueOf())) throw new Error("Wrong input string for conversion"); - if (a = d * g, h.length === 4) { + if (a = f * g, h.length === 4) { if (g = parseInt(h.substring(2, 4), 10), isNaN(g.valueOf())) throw new Error("Wrong input string for conversion"); - c = d * g; + c = f * g; } } } let l = r.indexOf("."); if (l === -1 && (l = r.indexOf(",")), l !== -1) { - const d = /* @__PURE__ */ new Number(`0${r.substring(l)}`); - if (isNaN(d.valueOf())) throw new Error("Wrong input string for conversion"); - s = d.valueOf(), o = r.substring(0, l); + const f = /* @__PURE__ */ new Number(`0${r.substring(l)}`); + if (isNaN(f.valueOf())) throw new Error("Wrong input string for conversion"); + s = f.valueOf(), o = r.substring(0, l); } else o = r; switch (!0) { case o.length === 8: @@ -54045,20 +54091,20 @@ var Zg, UEe = (Zg = class extends Go { break; case o.length === 10: if (i = /(\d{4})(\d{2})(\d{2})(\d{2})/gi, l !== -1) { - let d = 60 * s; - this.minute = Math.floor(d), d = 60 * (d - this.minute), this.second = Math.floor(d), d = 1e3 * (d - this.second), this.millisecond = Math.floor(d); + let f = 60 * s; + this.minute = Math.floor(f), f = 60 * (f - this.minute), this.second = Math.floor(f), f = 1e3 * (f - this.second), this.millisecond = Math.floor(f); } break; case o.length === 12: if (i = /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/gi, l !== -1) { - let d = 60 * s; - this.second = Math.floor(d), d = 1e3 * (d - this.second), this.millisecond = Math.floor(d); + let f = 60 * s; + this.second = Math.floor(f), f = 1e3 * (f - this.second), this.millisecond = Math.floor(f); } break; case o.length === 14: if (i = /(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/gi, l !== -1) { - const d = 1e3 * s; - this.millisecond = Math.floor(d); + const f = 1e3 * s; + this.millisecond = Math.floor(f); } break; default: @@ -54066,31 +54112,31 @@ var Zg, UEe = (Zg = class extends Go { } const u = i.exec(o); if (u === null) throw new Error("Wrong input string for conversion"); - for (let d = 1; d < u.length; d++) switch (d) { + for (let f = 1; f < u.length; f++) switch (f) { case 1: - this.year = parseInt(u[d], 10); + this.year = parseInt(u[f], 10); break; case 2: - this.month = parseInt(u[d], 10); + this.month = parseInt(u[f], 10); break; case 3: - this.day = parseInt(u[d], 10); + this.day = parseInt(u[f], 10); break; case 4: - this.hour = parseInt(u[d], 10) + a; + this.hour = parseInt(u[f], 10) + a; break; case 5: - this.minute = parseInt(u[d], 10) + c; + this.minute = parseInt(u[f], 10) + c; break; case 6: - this.second = parseInt(u[d], 10); + this.second = parseInt(u[f], 10); break; default: throw new Error("Wrong input string for conversion"); } if (n === !1) { - const d = new Date(this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond); - this.year = d.getUTCFullYear(), this.month = d.getUTCMonth(), this.day = d.getUTCDay(), this.hour = d.getUTCHours(), this.minute = d.getUTCMinutes(), this.second = d.getUTCSeconds(), this.millisecond = d.getUTCMilliseconds(); + const f = new Date(this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond); + this.year = f.getUTCFullYear(), this.month = f.getUTCMonth(), this.day = f.getUTCDay(), this.hour = f.getUTCHours(), this.minute = f.getUTCMinutes(), this.second = f.getUTCSeconds(), this.millisecond = f.getUTCMilliseconds(); } } toString(t = "iso") { @@ -54106,45 +54152,45 @@ var Zg, UEe = (Zg = class extends Go { millisecond: this.millisecond }; } -}, Ue.GeneralizedTime = bf, bf.NAME = "GeneralizedTime", bf), wf; -wf = class extends ki { +}, Ue.GeneralizedTime = vf, vf.NAME = "GeneralizedTime", vf), kf; +kf = class extends ki { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 31; } -}, Ue.DATE = wf, wf.NAME = "DATE"; -var vf; -vf = class extends ki { +}, Ue.DATE = kf, kf.NAME = "DATE"; +var Af; +Af = class extends ki { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 32; } -}, Ue.TimeOfDay = vf, vf.NAME = "TimeOfDay"; -var kf; -kf = class extends ki { +}, Ue.TimeOfDay = Af, Af.NAME = "TimeOfDay"; +var Sf; +Sf = class extends ki { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 33; } -}, Ue.DateTime = kf, kf.NAME = "DateTime"; -var Af; -Af = class extends ki { +}, Ue.DateTime = Sf, Sf.NAME = "DateTime"; +var xf; +xf = class extends ki { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 34; } -}, Ue.Duration = Af, Af.NAME = "Duration"; -var Sf; -Sf = class extends ki { +}, Ue.Duration = xf, xf.NAME = "Duration"; +var Ef; +Ef = class extends ki { constructor(t = {}) { super(t), this.idBlock.tagClass = 1, this.idBlock.tagNumber = 14; } -}, Ue.TIME = Sf, Sf.NAME = "TIME"; +}, Ue.TIME = Ef, Ef.NAME = "TIME"; var Xe = class { constructor({ name: e = "", optional: t = !1 } = {}) { this.name = e, this.optional = t; } -}, Xt = class extends Xe { +}, en = class extends Xe { constructor({ value: e = [], ...t } = {}) { super(t), this.value = e; } -}, ot = class extends Xe { +}, st = class extends Xe { constructor({ value: e = new Xe(), local: t = !1, ...n } = {}) { super(n), this.value = e, this.local = t; } @@ -54153,21 +54199,21 @@ var Xe = class { return this.dataView.slice().buffer; } set data(e) { - this.dataView = ct(e); + this.dataView = lt(e); } constructor({ data: e = J2 } = {}) { - this.dataView = ct(e); + this.dataView = lt(e); } fromBER(e, t, n) { const r = t + n; - return this.dataView = ct(e).subarray(t, r), r; + return this.dataView = lt(e).subarray(t, r), r; } toBER(e) { return this.dataView.slice().buffer; } }; function Ee(e, t, n) { - if (n instanceof Xt) { + if (n instanceof en) { for (const o of n.value) if (Ee(e, t, o).verified) return { verified: !0, result: e @@ -54270,7 +54316,7 @@ function Ee(e, t, n) { verified: !1, result: { error: "Unknown error" } }, i = n.valueBlock.value.length; - if (i > 0 && n.valueBlock.value[0] instanceof ot && (i = t.valueBlock.value.length), i === 0) return { + if (i > 0 && n.valueBlock.value[0] instanceof st && (i = t.valueBlock.value.length), i === 0) return { verified: !0, result: e }; @@ -54293,7 +54339,7 @@ function Ee(e, t, n) { }; return e.error = "Inconsistent length between ASN.1 data and schema", n.name && (n.name = n.name.replace(/^\s+|\s+$/g, ""), n.name && (delete e[n.name], c.name = n.name)), c; } - } else if (n.valueBlock.value[0] instanceof ot) { + } else if (n.valueBlock.value[0] instanceof st) { if (s = Ee(e, t.valueBlock.value[a], n.valueBlock.value[0].value), s.verified === !1) if (n.valueBlock.value[0].optional) o++; else @@ -54335,15 +54381,15 @@ function Ee(e, t, n) { }; } J2e({ - BitString: ht, - Integer: de, + BitString: pt, + Integer: ue, OctetString: Oe, Primitive: Je, - Constructed: ee, + Constructed: ne, Sequence: z, Set: An }, { - BaseBlock: ir, + BaseBlock: ar, ViewWriter: _v, LocalIdentificationBlock: Dv, LocalLengthBlock: jv, @@ -54364,11 +54410,11 @@ J2e({ originalPrimitiveToBER: hEe }); pEe({ - Integer: de, - Null: fn, + Integer: ue, + Null: hn, Sequence: z }); -var Co = class xo { +var Io = class Eo { constructor(t = {}) { et(this, "_buffer"); et(this, "_view"); @@ -54436,14 +54482,14 @@ var Co = class xo { return r; } copy(t = 0, n = this.length - t) { - if (!t && !this.length) return new xo(); + if (!t && !this.length) return new Eo(); if (t < 0 || t > this.length - 1) throw new Error(`Wrong start position: ${t}`); - return new xo({ buffer: this._buffer.slice(t, t + n) }); + return new Eo({ buffer: this._buffer.slice(t, t + n) }); } slice(t = 0, n = this.length) { - if (!t && !this.length) return new xo(); + if (!t && !this.length) return new Eo(); if (t < 0 || t > this.length - 1) throw new Error(`Wrong start position: ${t}`); - return new xo({ buffer: this._buffer.slice(t, n) }); + return new Eo({ buffer: this._buffer.slice(t, n) }); } realloc(t) { const n = new ArrayBuffer(t), r = new Uint8Array(n); @@ -54472,13 +54518,13 @@ var Co = class xo { const l = []; for (let u = 0; u < c; u++) l.push(t.view[u]); for (let u = 0; u <= i - c; u++) { - let d = !0; - const f = a ? s - c - u : s + u; - for (let h = 0; h < c; h++) if (this.view[h + f] != l[h]) { - d = !1; + let f = !0; + const d = a ? s - c - u : s + u; + for (let h = 0; h < c; h++) if (this.view[h + d] != l[h]) { + f = !1; break; } - if (d) return a ? s - c - u : s + c + u; + if (f) return a ? s - c - u : s + c + u; } return -1; } @@ -54491,9 +54537,9 @@ var Co = class xo { for (let l = 0; l < t.length; l++) { const u = this.findPattern(t[l], s, i, a); if (u != -1) { - let d = !1; - const f = t[l].length; - a ? u - f >= c.position - c.length && (d = !0) : u - f <= c.position - c.length && (d = !0), d && (c.position = u, c.id = l, c.length = f); + let f = !1; + const d = t[l].length; + a ? u - d >= c.position - c.length && (f = !0) : u - d <= c.position - c.length && (f = !0), f && (c.position = u, c.id = l, c.length = d); } } return c; @@ -54521,8 +54567,8 @@ var Co = class xo { const c = Array.from(t.view); for (let l = 0; l <= s - a; l++) { let u = !0; - const d = o + l; - for (let f = 0; f < a; f++) if (this.view[f + d] != c[f]) { + const f = o + l; + for (let d = 0; d < a; d++) if (this.view[d + f] != c[d]) { u = !1; break; } @@ -54541,16 +54587,16 @@ var Co = class xo { id: -1, position: 0 }, - value: new xo() + value: new Eo() }; let l = i; for (; l > 0; ) { if (c.right = this.findFirstIn(t, a ? s - i + l : s + i - l, l, a), c.right.id == -1) { - i = l, a ? s -= i : s = c.left.position, c.value = new xo({ buffer: this._buffer.slice(s, s + i) }); + i = l, a ? s -= i : s = c.left.position, c.value = new Eo({ buffer: this._buffer.slice(s, s + i) }); break; } if (c.right.position != (a ? c.left.position - t[c.right.id].length : c.left.position + t[c.right.id].length)) { - a ? (s = c.right.position + t[c.right.id].length, i = c.left.position - c.right.position - t[c.right.id].length) : (s = c.left.position, i = c.right.position - c.left.position - t[c.right.id].length), c.value = new xo({ buffer: this._buffer.slice(s, s + i) }); + a ? (s = c.right.position + t[c.right.id].length, i = c.left.position - c.right.position - t[c.right.id].length) : (s = c.left.position, i = c.right.position - c.left.position - t[c.right.id].length), c.value = new Eo({ buffer: this._buffer.slice(s, s + i) }); break; } c.left = c.right, l -= t[c.right.id].length; @@ -54573,7 +54619,7 @@ var Co = class xo { id: -1, position: o }, - value: new xo() + value: new Eo() }; do { const c = a.right.position; @@ -54596,12 +54642,12 @@ var Co = class xo { const c = this.skipNotPatterns(t, s, i, a); if (c == -1) return { position: -1, - value: new xo() + value: new Eo() }; const l = this.skipPatterns(t, c, i - (a ? s - c : c - s), a); return a ? (s = l, i = c - l) : (s = c, i = l - c), { position: l, - value: new xo({ buffer: this._buffer.slice(s, s + i) }) + value: new Eo({ buffer: this._buffer.slice(s, s + i) }) }; } findAllSequences(t, n, r) { @@ -54609,7 +54655,7 @@ var Co = class xo { const i = []; let a = { position: o, - value: new xo() + value: new Eo() }; do { const c = a.position; @@ -54645,7 +54691,7 @@ var Co = class xo { right: u[0] }), l.splice(c - 1, 1), u.splice(0, 1), c = 0; } - return s.sort((d, f) => d.left - f.left), s; + return s.sort((f, d) => f.left - d.left), s; } findPairedArrays(t, n, r, o) { const { start: s, length: i } = this.prepareFindParameters(r, o), a = []; @@ -54670,7 +54716,7 @@ var Co = class xo { right: u[0] }), l.splice(c - 1, 1), u.splice(0, 1), c = 0; } - return a.sort((d, f) => d.left.position - f.left.position), a; + return a.sort((f, d) => f.left.position - d.left.position), a; } replacePattern(t, n, r, o, s = null) { let i = [], a; @@ -54683,24 +54729,24 @@ var Co = class xo { if (i = this.findAllIn([t], l, u), i.length == 0) return c; } else i = s; c.searchPatternPositions.push(...Array.from(i, (g) => g.position)); - const d = t.length - n.length, f = new ArrayBuffer(this.view.length - i.length * d), h = new Uint8Array(f); + const f = t.length - n.length, d = new ArrayBuffer(this.view.length - i.length * f), h = new Uint8Array(d); for (h.set(new Uint8Array(this.buffer, 0, l)), a = 0; a < i.length; a++) { const g = a == 0 ? l : i[a - 1].position; - h.set(new Uint8Array(this.buffer, g, i[a].position - t.length - g), g - a * d), h.set(n.view, i[a].position - t.length - a * d), c.replacePatternPositions.push(i[a].position - t.length - a * d); + h.set(new Uint8Array(this.buffer, g, i[a].position - t.length - g), g - a * f), h.set(n.view, i[a].position - t.length - a * f), c.replacePatternPositions.push(i[a].position - t.length - a * f); } - return a--, h.set(new Uint8Array(this.buffer, i[a].position, this.length - i[a].position), i[a].position - t.length + n.length - a * d), this.buffer = f, this.view = new Uint8Array(this.buffer), c.status = 1, c; + return a--, h.set(new Uint8Array(this.buffer, i[a].position, this.length - i[a].position), i[a].position - t.length + n.length - a * f), this.buffer = d, this.view = new Uint8Array(this.buffer), c.status = 1, c; } skipPatterns(t, n, r, o) { const { start: s, length: i, backward: a } = this.prepareFindParameters(n, r, o); let c = s; for (let l = 0; l < t.length; l++) { - const u = t[l].length, d = a ? c - u : c; - let f = !0; - for (let h = 0; h < u; h++) if (this.view[h + d] != t[l].view[h]) { - f = !1; + const u = t[l].length, f = a ? c - u : c; + let d = !0; + for (let h = 0; h < u; h++) if (this.view[h + f] != t[l].view[h]) { + d = !1; break; } - if (f) { + if (d) { if (l = -1, a) { if (c -= u, c <= 0) return c; } else if (c += u, c >= s + i) return c; @@ -54713,9 +54759,9 @@ var Co = class xo { let c = -1; for (let l = 0; l < i; l++) { for (let u = 0; u < t.length; u++) { - const d = t[u].length, f = a ? s - l - d : s + l; + const f = t[u].length, d = a ? s - l - f : s + l; let h = !0; - for (let g = 0; g < d; g++) if (this.view[g + f] != t[u].view[g]) { + for (let g = 0; g < f; g++) if (this.view[g + d] != t[u].view[g]) { h = !1; break; } @@ -54737,16 +54783,16 @@ var Co = class xo { } }; const qEe = 16777216; -var _d, i0 = (_d = class { +var Dd, i0 = (Dd = class { constructor(t = {}) { - et(this, "_stream", new Co()); + et(this, "_stream", new Io()); et(this, "_length", 0); et(this, "_start", 0); et(this, "backward", !1); et(this, "appendBlock", 0); et(this, "prevLength", 0); et(this, "prevStart", 0); - "view" in t ? this.stream = new Co({ view: t.view }) : "buffer" in t ? this.stream = new Co({ buffer: t.buffer }) : "string" in t ? this.stream = new Co({ string: t.string }) : "hexstring" in t ? this.stream = new Co({ hexstring: t.hexstring }) : "stream" in t ? this.stream = t.stream.slice() : this.stream = new Co(), "backward" in t && t.backward && (this.backward = t.backward, this._start = this.stream.length), "length" in t && t.length > 0 && (this._length = t.length), "start" in t && t.start && t.start > 0 && (this._start = t.start), "appendBlock" in t && t.appendBlock && t.appendBlock > 0 && (this.appendBlock = t.appendBlock); + "view" in t ? this.stream = new Io({ view: t.view }) : "buffer" in t ? this.stream = new Io({ buffer: t.buffer }) : "string" in t ? this.stream = new Io({ string: t.string }) : "hexstring" in t ? this.stream = new Io({ hexstring: t.hexstring }) : "stream" in t ? this.stream = t.stream.slice() : this.stream = new Io(), "backward" in t && t.backward && (this.backward = t.backward, this._start = this.stream.length), "length" in t && t.length > 0 && (this._length = t.length), "start" in t && t.start && t.start > 0 && (this._start = t.start), "appendBlock" in t && t.appendBlock && t.appendBlock > 0 && (this.appendBlock = t.appendBlock); } set stream(t) { this._stream = t, this.prevLength = this._length, this._length = t.length, this.prevStart = this._start, this._start = 0; @@ -54815,7 +54861,7 @@ var _d, i0 = (_d = class { id: -1, position: 0 }, - value: new Co() + value: new Io() }; } else if (r.left.id != -1 && r.left.position > this._start + t[r.left.id].length + n) return { @@ -54827,7 +54873,7 @@ var _d, i0 = (_d = class { id: -1, position: 0 }, - value: new Co() + value: new Io() }; return this.backward ? r.left.id == -1 ? this.start = 0 : this.start = r.left.position : r.right.id == -1 ? this.start = this._start + this._length : this.start = r.right.position, r; } @@ -54842,11 +54888,11 @@ var _d, i0 = (_d = class { if (this.backward) { if (o.position < this._start - o.value.length - r) return { position: -1, - value: new Co() + value: new Io() }; } else if (o.position > this._start + o.value.length + r) return { position: -1, - value: new Co() + value: new Io() }; return this.start = o.position, o; } @@ -54952,9 +54998,9 @@ var _d, i0 = (_d = class { return n & r ? -(r - (n ^ r)) : n; } beforeAppend(t) { - this._start + t > this._stream.length && (t > this.appendBlock && (this.appendBlock = t + _d.APPEND_BLOCK), this._stream.realloc(this._stream.length + this.appendBlock)); + this._start + t > this._stream.length && (t > this.appendBlock && (this.appendBlock = t + Dd.APPEND_BLOCK), this._stream.realloc(this._stream.length + this.appendBlock)); } -}, et(_d, "APPEND_BLOCK", 1e3), _d); +}, et(Dd, "APPEND_BLOCK", 1e3), Dd); const K1 = BigInt(2 ** 32 - 1), J8 = /* @__PURE__ */ BigInt(32); function GEe(e, t = !1) { return t ? { h: Number(e & K1), l: Number(e >> J8 & K1) } : { h: Number(e >> J8 & K1) | 0, l: Number(e & K1) | 0 }; @@ -54973,7 +55019,7 @@ function XEe(e, t, n, r) { const o = YEe(n), s = QEe(n); e.setUint32(t, r ? s : o, r), e.setUint32(t + 4, r ? o : s, r); } -const Y8 = (e, t, n) => e >>> n, Q8 = (e, t, n) => e << 32 - n | t >>> n, ph = (e, t, n) => e >>> n | t << 32 - n, gh = (e, t, n) => e << 32 - n | t >>> n, H1 = (e, t, n) => e << 64 - n | t >>> n - 32, z1 = (e, t, n) => e >>> n - 32 | t << 64 - n; +const Y8 = (e, t, n) => e >>> n, Q8 = (e, t, n) => e << 32 - n | t >>> n, mh = (e, t, n) => e >>> n | t << 32 - n, yh = (e, t, n) => e << 32 - n | t >>> n, H1 = (e, t, n) => e << 64 - n | t >>> n - 32, z1 = (e, t, n) => e >>> n - 32 | t << 64 - n; function Li(e, t, n, r) { const o = (t >>> 0) + (r >>> 0); return { h: e + n + (o / 2 ** 32 | 0) | 0, l: o | 0 }; @@ -55012,7 +55058,7 @@ function aCe(e, t) { if (!(e.length >= n)) throw new RangeError('"output" expected length >= ' + n); } -function Am(...e) { +function Sm(...e) { for (let t = 0; t < e.length; t++) e[t].fill(0); } @@ -55087,8 +55133,8 @@ class rT { const a = t === n ? r : VC(t), c = this.outputLen, l = c / 4, u = this.get(); if (c % 4 || l > u.length) throw new Error("invalid outputLen"); - for (let d = 0; d < l; d++) - a.setUint32(4 * d, u[d], s); + for (let f = 0; f < l; f++) + a.setUint32(4 * f, u[f], s); } digest() { const { buffer: t, outputLen: n } = this; @@ -55153,7 +55199,7 @@ const lCe = /* @__PURE__ */ Uint32Array.from([ 2562383102, 271733878, 3285377520 -]), hc = /* @__PURE__ */ new Uint32Array(80); +]), pc = /* @__PURE__ */ new Uint32Array(80); class fCe extends rT { constructor() { super(64, 20, 8, !1); @@ -55175,23 +55221,23 @@ class fCe extends rT { } process(n, r) { for (let l = 0; l < 16; l++, r += 4) - hc[l] = n.getUint32(r, !1); + pc[l] = n.getUint32(r, !1); for (let l = 16; l < 80; l++) - hc[l] = $C(hc[l - 3] ^ hc[l - 8] ^ hc[l - 14] ^ hc[l - 16], 1); + pc[l] = $C(pc[l - 3] ^ pc[l - 8] ^ pc[l - 14] ^ pc[l - 16], 1); let { A: o, B: s, C: i, D: a, E: c } = this; for (let l = 0; l < 80; l++) { - let u, d; - l < 20 ? (u = nq(s, i, a), d = 1518500249) : l < 40 ? (u = s ^ i ^ a, d = 1859775393) : l < 60 ? (u = rq(s, i, a), d = 2400959708) : (u = s ^ i ^ a, d = 3395469782); - const f = $C(o, 5) + u + c + d + hc[l] | 0; - c = a, a = i, i = $C(s, 30), s = o, o = f; + let u, f; + l < 20 ? (u = nq(s, i, a), f = 1518500249) : l < 40 ? (u = s ^ i ^ a, f = 1859775393) : l < 60 ? (u = rq(s, i, a), f = 2400959708) : (u = s ^ i ^ a, f = 3395469782); + const d = $C(o, 5) + u + c + f + pc[l] | 0; + c = a, a = i, i = $C(s, 30), s = o, o = d; } o = o + this.A | 0, s = s + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, c = c + this.E | 0, this.set(o, s, i, a, c); } roundClean() { - Am(hc); + Sm(pc); } destroy() { - this.destroyed = !0, this.set(0, 0, 0, 0, 0), Am(this.buffer); + this.destroyed = !0, this.set(0, 0, 0, 0, 0), Sm(this.buffer); } } const hCe = /* @__PURE__ */ Q2(() => new fCe()), pCe = /* @__PURE__ */ Uint32Array.from([ @@ -55259,7 +55305,7 @@ const hCe = /* @__PURE__ */ Q2(() => new fCe()), pCe = /* @__PURE__ */ Uint32Arr 2756734187, 3204031479, 3329325298 -]), pc = /* @__PURE__ */ new Uint32Array(64); +]), gc = /* @__PURE__ */ new Uint32Array(64); class gCe extends rT { constructor(n, r) { super(64, n, 8, !1); @@ -55289,24 +55335,24 @@ class gCe extends rT { return (n || (n = new this.constructor())).set(...this.get()), this._cloneIntoMeta(n); } process(n, r) { - for (let f = 0; f < 16; f++, r += 4) - pc[f] = n.getUint32(r, !1); - for (let f = 16; f < 64; f++) { - const h = pc[f - 15], g = pc[f - 2], p = Cs(h, 7) ^ Cs(h, 18) ^ h >>> 3, m = Cs(g, 17) ^ Cs(g, 19) ^ g >>> 10; - pc[f] = m + pc[f - 7] + p + pc[f - 16] | 0; + for (let d = 0; d < 16; d++, r += 4) + gc[d] = n.getUint32(r, !1); + for (let d = 16; d < 64; d++) { + const h = gc[d - 15], g = gc[d - 2], p = Cs(h, 7) ^ Cs(h, 18) ^ h >>> 3, m = Cs(g, 17) ^ Cs(g, 19) ^ g >>> 10; + gc[d] = m + gc[d - 7] + p + gc[d - 16] | 0; } - let { A: o, B: s, C: i, D: a, E: c, F: l, G: u, H: d } = this; - for (let f = 0; f < 64; f++) { - const h = Cs(c, 6) ^ Cs(c, 11) ^ Cs(c, 25), g = d + h + nq(c, l, u) + pCe[f] + pc[f] | 0, m = (Cs(o, 2) ^ Cs(o, 13) ^ Cs(o, 22)) + rq(o, s, i) | 0; - d = u, u = l, l = c, c = a + g | 0, a = i, i = s, s = o, o = g + m | 0; + let { A: o, B: s, C: i, D: a, E: c, F: l, G: u, H: f } = this; + for (let d = 0; d < 64; d++) { + const h = Cs(c, 6) ^ Cs(c, 11) ^ Cs(c, 25), g = f + h + nq(c, l, u) + pCe[d] + gc[d] | 0, m = (Cs(o, 2) ^ Cs(o, 13) ^ Cs(o, 22)) + rq(o, s, i) | 0; + f = u, u = l, l = c, c = a + g | 0, a = i, i = s, s = o, o = g + m | 0; } - o = o + this.A | 0, s = s + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, c = c + this.E | 0, l = l + this.F | 0, u = u + this.G | 0, d = d + this.H | 0, this.set(o, s, i, a, c, l, u, d); + o = o + this.A | 0, s = s + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, c = c + this.E | 0, l = l + this.F | 0, u = u + this.G | 0, f = f + this.H | 0, this.set(o, s, i, a, c, l, u, f); } roundClean() { - Am(pc); + Sm(gc); } destroy() { - this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), Am(this.buffer); + this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), Sm(this.buffer); } } class mCe extends gCe { @@ -55395,7 +55441,7 @@ const oq = JEe([ "0x597f299cfc657e2a", "0x5fcb6fab3ad6faec", "0x6c44198c4a475817" -].map((e) => BigInt(e))), yCe = oq[0], bCe = oq[1], gc = /* @__PURE__ */ new Uint32Array(80), mc = /* @__PURE__ */ new Uint32Array(80); +].map((e) => BigInt(e))), yCe = oq[0], bCe = oq[1], mc = /* @__PURE__ */ new Uint32Array(80), yc = /* @__PURE__ */ new Uint32Array(80); class sq extends rT { constructor(n, r) { super(128, n, 16, !1); @@ -55424,37 +55470,37 @@ class sq extends rT { } // prettier-ignore get() { - const { Ah: n, Al: r, Bh: o, Bl: s, Ch: i, Cl: a, Dh: c, Dl: l, Eh: u, El: d, Fh: f, Fl: h, Gh: g, Gl: p, Hh: m, Hl: v } = this; - return [n, r, o, s, i, a, c, l, u, d, f, h, g, p, m, v]; + const { Ah: n, Al: r, Bh: o, Bl: s, Ch: i, Cl: a, Dh: c, Dl: l, Eh: u, El: f, Fh: d, Fl: h, Gh: g, Gl: p, Hh: m, Hl: v } = this; + return [n, r, o, s, i, a, c, l, u, f, d, h, g, p, m, v]; } // prettier-ignore - set(n, r, o, s, i, a, c, l, u, d, f, h, g, p, m, v) { - this.Ah = n | 0, this.Al = r | 0, this.Bh = o | 0, this.Bl = s | 0, this.Ch = i | 0, this.Cl = a | 0, this.Dh = c | 0, this.Dl = l | 0, this.Eh = u | 0, this.El = d | 0, this.Fh = f | 0, this.Fl = h | 0, this.Gh = g | 0, this.Gl = p | 0, this.Hh = m | 0, this.Hl = v | 0; + set(n, r, o, s, i, a, c, l, u, f, d, h, g, p, m, v) { + this.Ah = n | 0, this.Al = r | 0, this.Bh = o | 0, this.Bl = s | 0, this.Ch = i | 0, this.Cl = a | 0, this.Dh = c | 0, this.Dl = l | 0, this.Eh = u | 0, this.El = f | 0, this.Fh = d | 0, this.Fl = h | 0, this.Gh = g | 0, this.Gl = p | 0, this.Hh = m | 0, this.Hl = v | 0; } _cloneInto(n) { return (n || (n = new this.constructor())).set(...this.get()), this._cloneIntoMeta(n); } process(n, r) { for (let k = 0; k < 16; k++, r += 4) - gc[k] = n.getUint32(r), mc[k] = n.getUint32(r += 4); + mc[k] = n.getUint32(r), yc[k] = n.getUint32(r += 4); for (let k = 16; k < 80; k++) { - const N = gc[k - 15] | 0, w = mc[k - 15] | 0, y = ph(N, w, 1) ^ ph(N, w, 8) ^ Y8(N, w, 7), x = gh(N, w, 1) ^ gh(N, w, 8) ^ Q8(N, w, 7), A = gc[k - 2] | 0, b = mc[k - 2] | 0, E = ph(A, b, 19) ^ H1(A, b, 61) ^ Y8(A, b, 6), I = gh(A, b, 19) ^ z1(A, b, 61) ^ Q8(A, b, 6), O = tCe(x, I, mc[k - 7], mc[k - 16]), T = nCe(O, y, E, gc[k - 7], gc[k - 16]); - gc[k] = T | 0, mc[k] = O | 0; + const N = mc[k - 15] | 0, w = yc[k - 15] | 0, y = mh(N, w, 1) ^ mh(N, w, 8) ^ Y8(N, w, 7), x = yh(N, w, 1) ^ yh(N, w, 8) ^ Q8(N, w, 7), A = mc[k - 2] | 0, b = yc[k - 2] | 0, E = mh(A, b, 19) ^ H1(A, b, 61) ^ Y8(A, b, 6), I = yh(A, b, 19) ^ z1(A, b, 61) ^ Q8(A, b, 6), O = tCe(x, I, yc[k - 7], yc[k - 16]), T = nCe(O, y, E, mc[k - 7], mc[k - 16]); + mc[k] = T | 0, yc[k] = O | 0; } - let { Ah: o, Al: s, Bh: i, Bl: a, Ch: c, Cl: l, Dh: u, Dl: d, Eh: f, El: h, Fh: g, Fl: p, Gh: m, Gl: v, Hh: S, Hl: C } = this; + let { Ah: o, Al: s, Bh: i, Bl: a, Ch: c, Cl: l, Dh: u, Dl: f, Eh: d, El: h, Fh: g, Fl: p, Gh: m, Gl: v, Hh: S, Hl: C } = this; for (let k = 0; k < 80; k++) { - const N = ph(f, h, 14) ^ ph(f, h, 18) ^ H1(f, h, 41), w = gh(f, h, 14) ^ gh(f, h, 18) ^ z1(f, h, 41), y = f & g ^ ~f & m, x = h & p ^ ~h & v, A = rCe(C, w, x, bCe[k], mc[k]), b = oCe(A, S, N, y, yCe[k], gc[k]), E = A | 0, I = ph(o, s, 28) ^ H1(o, s, 34) ^ H1(o, s, 39), O = gh(o, s, 28) ^ z1(o, s, 34) ^ z1(o, s, 39), T = o & i ^ o & c ^ i & c, R = s & a ^ s & l ^ a & l; - S = m | 0, C = v | 0, m = g | 0, v = p | 0, g = f | 0, p = h | 0, { h: f, l: h } = Li(u | 0, d | 0, b | 0, E | 0), u = c | 0, d = l | 0, c = i | 0, l = a | 0, i = o | 0, a = s | 0; + const N = mh(d, h, 14) ^ mh(d, h, 18) ^ H1(d, h, 41), w = yh(d, h, 14) ^ yh(d, h, 18) ^ z1(d, h, 41), y = d & g ^ ~d & m, x = h & p ^ ~h & v, A = rCe(C, w, x, bCe[k], yc[k]), b = oCe(A, S, N, y, yCe[k], mc[k]), E = A | 0, I = mh(o, s, 28) ^ H1(o, s, 34) ^ H1(o, s, 39), O = yh(o, s, 28) ^ z1(o, s, 34) ^ z1(o, s, 39), T = o & i ^ o & c ^ i & c, R = s & a ^ s & l ^ a & l; + S = m | 0, C = v | 0, m = g | 0, v = p | 0, g = d | 0, p = h | 0, { h: d, l: h } = Li(u | 0, f | 0, b | 0, E | 0), u = c | 0, f = l | 0, c = i | 0, l = a | 0, i = o | 0, a = s | 0; const M = ZEe(E, O, R); o = eCe(M, b, I, T), s = M | 0; } - ({ h: o, l: s } = Li(this.Ah | 0, this.Al | 0, o | 0, s | 0)), { h: i, l: a } = Li(this.Bh | 0, this.Bl | 0, i | 0, a | 0), { h: c, l } = Li(this.Ch | 0, this.Cl | 0, c | 0, l | 0), { h: u, l: d } = Li(this.Dh | 0, this.Dl | 0, u | 0, d | 0), { h: f, l: h } = Li(this.Eh | 0, this.El | 0, f | 0, h | 0), { h: g, l: p } = Li(this.Fh | 0, this.Fl | 0, g | 0, p | 0), { h: m, l: v } = Li(this.Gh | 0, this.Gl | 0, m | 0, v | 0), { h: S, l: C } = Li(this.Hh | 0, this.Hl | 0, S | 0, C | 0), this.set(o, s, i, a, c, l, u, d, f, h, g, p, m, v, S, C); + ({ h: o, l: s } = Li(this.Ah | 0, this.Al | 0, o | 0, s | 0)), { h: i, l: a } = Li(this.Bh | 0, this.Bl | 0, i | 0, a | 0), { h: c, l } = Li(this.Ch | 0, this.Cl | 0, c | 0, l | 0), { h: u, l: f } = Li(this.Dh | 0, this.Dl | 0, u | 0, f | 0), { h: d, l: h } = Li(this.Eh | 0, this.El | 0, d | 0, h | 0), { h: g, l: p } = Li(this.Fh | 0, this.Fl | 0, g | 0, p | 0), { h: m, l: v } = Li(this.Gh | 0, this.Gl | 0, m | 0, v | 0), { h: S, l: C } = Li(this.Hh | 0, this.Hl | 0, S | 0, C | 0), this.set(o, s, i, a, c, l, u, f, d, h, g, p, m, v, S, C); } roundClean() { - Am(gc, mc); + Sm(mc, yc); } destroy() { - this.destroyed = !0, Am(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this.destroyed = !0, Sm(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } } class wCe extends sq { @@ -55511,9 +55557,9 @@ const kCe = /* @__PURE__ */ Q2( * */ const Dn = /* @__PURE__ */ new ArrayBuffer(0); -var Ol, Ut = (Ol = class extends TypeError { +var Pl, zt = (Pl = class extends TypeError { constructor(...t) { - super(...t), this.name = Ol.NAME; + super(...t), this.name = Pl.NAME; } static isType(t, n) { if (typeof n == "string") { @@ -55527,12 +55573,12 @@ var Ol, Ut = (Ol = class extends TypeError { static assert(t, n, ...r) { for (const s of r) if (this.isType(t, s)) return; const o = r.map((s) => s instanceof Function && "name" in s ? s.name : `${s}`); - throw new Ol(`Parameter '${n}' is not of type ${o.length > 1 ? `(${o.join(" or ")})` : o[0]}`); + throw new Pl(`Parameter '${n}' is not of type ${o.length > 1 ? `(${o.join(" or ")})` : o[0]}`); } -}, Ol.NAME = "ArgumentError", Ol), aa, Ct = (aa = class extends TypeError { +}, Pl.NAME = "ArgumentError", Pl), aa, Ot = (aa = class extends TypeError { static assert(...t) { let n = null, r, o; - typeof t[0] == "string" ? (n = t[0], r = t[1], o = t.slice(2)) : (r = t[0], o = t.slice(1)), Ut.assert(r, "parameters", "object"); + typeof t[0] == "string" ? (n = t[0], r = t[1], o = t.slice(2)) : (r = t[0], o = t.slice(1)), zt.assert(r, "parameters", "object"); for (const s of o) { const i = r[s]; if (i == null) throw new aa(s, n); @@ -55554,12 +55600,12 @@ var Ol, Ut = (Ol = class extends TypeError { constructor(t) { super(t), this.name = "AsnError"; } -}, em, Ce = (em = class { +}, tm, Ce = (tm = class { static blockName() { return this.CLASS_NAME; } static fromBER(t) { - const n = hn(t); + const n = pn(t); ke.assert(n, this.name); try { return new this({ schema: n.result }); @@ -55586,17 +55632,17 @@ var Ol, Ut = (Ol = class extends TypeError { const r = n.toBER(); switch (t.toLowerCase()) { case "hex": - return Xn.encode(r); + return Zn.encode(r); case "base64": return vO.encode(r); case "base64url": - return St.encode(r); + return xt.encode(r); default: throw new Error(`Unknown type of encoding '${t}'`); } } -}, em.CLASS_NAME = "PkiObject", em); -function sl(e) { +}, tm.CLASS_NAME = "PkiObject", tm); +function il(e) { let t = !1, n = ""; const r = e.trim(); for (let o = 0; o < r.length; o++) r.charCodeAt(o) === 32 ? t === !1 && (t = !0) : (t && (n += " ", t = !1), n += r[o]); @@ -55621,7 +55667,7 @@ var _s, xO = (_s = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.type || "" }), new Xe({ name: n.value || "" })] + value: [new $e({ name: n.type || "" }), new Xe({ name: n.value || "" })] }); } fromSchema(t) { @@ -55633,7 +55679,7 @@ var _s, xO = (_s = class extends Ce { ke.assertSchema(n, this.className), this.type = n.result.type.valueBlock.toString(), this.value = n.result.typeValue; } toSchema() { - return new z({ value: [new Ve({ value: this.type }), this.value] }); + return new z({ value: [new $e({ value: this.type }), this.value] }); } toJSON() { const t = { type: this.type }; @@ -55654,7 +55700,7 @@ var _s, xO = (_s = class extends Ce { zEe.blockName(), WEe.blockName() ]; - if (t instanceof ArrayBuffer) return Kt.equal(this.value.valueBeforeDecodeView, t); + if (t instanceof ArrayBuffer) return Wt.equal(this.value.valueBeforeDecodeView, t); if (t.constructor.blockName() === _s.blockName()) { if (this.type !== t.type) return !1; const r = [!1, !1], o = this.value.constructor.blockName(); @@ -55662,16 +55708,16 @@ var _s, xO = (_s = class extends Ce { o === s && (r[0] = !0), t.value.constructor.blockName() === s && (r[1] = !0); if (r[0] !== r[1]) return !1; if (r[0] && r[1]) { - const s = sl(this.value.valueBlock.value), i = sl(t.value.valueBlock.value); + const s = il(this.value.valueBlock.value), i = il(t.value.valueBlock.value); if (s.localeCompare(i) !== 0) return !1; - } else if (!Kt.equal(this.value.valueBeforeDecodeView, t.value.valueBeforeDecodeView)) return !1; + } else if (!Wt.equal(this.value.valueBeforeDecodeView, t.value.valueBeforeDecodeView)) return !1; return !0; } return !1; } }, _s.CLASS_NAME = "AttributeTypeAndValue", _s); const W1 = "typesAndValues", t4 = "valueBeforeDecode"; -var Ls, Qt = (Ls = class extends Ce { +var Ls, Zt = (Ls = class extends Ce { constructor(t = {}) { super(), this.typesAndValues = t.typesAndValues ?? Ls.defaultValues("typesAndValues"), this.valueBeforeDecode = t.valueBeforeDecode ?? Ls.defaultValues("valueBeforeDecode"), t.schema && this.fromSchema(t.schema); } @@ -55699,9 +55745,9 @@ var Ls, Qt = (Ls = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.repeatedSequence || "", - value: new An({ value: [new ot({ + value: new An({ value: [new st({ name: n.repeatedSet || "", value: xO.schema(n.typeAndValue || {}) })] }) @@ -55718,7 +55764,7 @@ var Ls, Qt = (Ls = class extends Ce { } toSchema() { if (this.valueBeforeDecode.byteLength === 0) return new z({ value: [new An({ value: Array.from(this.typesAndValues, (n) => n.toSchema()) })] }); - const t = hn(this.valueBeforeDecode); + const t = pn(this.valueBeforeDecode); if (ke.assert(t, "RelativeDistinguishedNames"), !(t.result instanceof z)) throw new Error("ASN.1 result should be SEQUENCE"); return t.result; } @@ -55731,7 +55777,7 @@ var Ls, Qt = (Ls = class extends Ce { for (const [n, r] of this.typesAndValues.entries()) if (r.isEqual(t.typesAndValues[n]) === !1) return !1; return !0; } - return t instanceof ArrayBuffer ? Kt.equal(this.valueBeforeDecode, t) : !1; + return t instanceof ArrayBuffer ? Wt.equal(this.valueBeforeDecode, t) : !1; } }, Ls.CLASS_NAME = "RelativeDistinguishedNames", Ls); const n4 = "type", r4 = "value"; @@ -55740,23 +55786,23 @@ function xCe(e = {}, t = !1) { return new z({ optional: t, value: [ - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 2, tagNumber: 1 }, name: n.country_name || "", - value: [new Xt({ value: [new lA(), new ia()] })] + value: [new en({ value: [new lA(), new ia()] })] }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 2, tagNumber: 2 }, name: n.administration_domain_name || "", - value: [new Xt({ value: [new lA(), new ia()] })] + value: [new en({ value: [new lA(), new ia()] })] }), new Je({ optional: !0, @@ -55776,14 +55822,14 @@ function xCe(e = {}, t = !1) { name: n.terminal_identifier || "", isHexOnly: !0 }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 2 }, name: n.private_domain_name || "", - value: [new Xt({ value: [new lA(), new ia()] })] + value: [new en({ value: [new lA(), new ia()] })] }), new Je({ optional: !0, @@ -55803,7 +55849,7 @@ function xCe(e = {}, t = !1) { }, isHexOnly: !0 }), - new ee({ + new ne({ optional: !0, name: n.personal_name || "", idBlock: { @@ -55844,14 +55890,14 @@ function xCe(e = {}, t = !1) { }) ] }), - new ee({ + new ne({ optional: !0, name: n.organizational_unit_names || "", idBlock: { tagClass: 3, tagNumber: 6 }, - value: [new ot({ value: new ia() })] + value: [new st({ value: new ia() })] }) ] }); @@ -55872,7 +55918,7 @@ function CCe(e = !1) { tagNumber: 0 }, isHexOnly: !0 - }), new ee({ + }), new ne({ optional: !0, idBlock: { tagClass: 3, @@ -55882,7 +55928,7 @@ function CCe(e = !1) { })] }); } -var ss, Dt = (ss = class extends Ce { +var ss, Vt = (ss = class extends Ce { constructor(t = {}) { super(), this.type = t.type ?? ss.defaultValues("type"), this.value = t.value ?? ss.defaultValues("value"), t.schema && this.fromSchema(t.schema); } @@ -55908,14 +55954,14 @@ var ss, Dt = (ss = class extends Ce { } static schema(t = {}) { const n = t.names ?? {}; - return new Xt({ value: [ - new ee({ + return new en({ value: [ + new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, name: n.blockName || "", - value: [new Ve(), new ee({ + value: [new $e(), new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -55937,7 +55983,7 @@ var ss, Dt = (ss = class extends Ce { tagNumber: 2 } }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 3 @@ -55949,39 +55995,39 @@ var ss, Dt = (ss = class extends Ce { CCe(!0) ] }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 4 }, name: n.blockName || "", - value: [Qt.schema(n.directoryName || {})] + value: [Zt.schema(n.directoryName || {})] }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 5 }, name: n.blockName || "", - value: [new ee({ + value: [new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new Xt({ value: [ + value: [new en({ value: [ new SO(), new ia(), new AO(), new ki(), new kO() ] })] - }), new ee({ + }), new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, - value: [new Xt({ value: [ + value: [new en({ value: [ new SO(), new ia(), new AO(), @@ -56048,7 +56094,7 @@ var ss, Dt = (ss = class extends Ce { { const r = n.result.blockName; r.idBlock.tagClass = 1, r.idBlock.tagNumber = 22; - const o = r.toBER(!1), s = hn(o); + const o = r.toBER(!1), s = pn(o); ke.assert(s, "GeneralName value"), this.value = s.result.valueBlock.value; } break; @@ -56056,7 +56102,7 @@ var ss, Dt = (ss = class extends Ce { this.value = n.result.blockName; break; case 4: - this.value = new Qt({ schema: n.result.directoryName }); + this.value = new Zt({ schema: n.result.directoryName }); break; case 5: this.value = n.result.ediPartyName; @@ -56067,7 +56113,7 @@ var ss, Dt = (ss = class extends Ce { case 8: { const r = n.result.blockName; r.idBlock.tagClass = 1, r.idBlock.tagNumber = 6; - const o = r.toBER(!1), s = hn(o); + const o = r.toBER(!1), s = pn(o); ke.assert(s, "GeneralName registeredID"), this.value = s.result.valueBlock.toString(); } } @@ -56077,7 +56123,7 @@ var ss, Dt = (ss = class extends Ce { case 0: case 3: case 5: - return new ee({ + return new ne({ idBlock: { tagClass: 3, tagNumber: this.type @@ -56091,7 +56137,7 @@ var ss, Dt = (ss = class extends Ce { return t.idBlock.tagClass = 3, t.idBlock.tagNumber = this.type, t; } case 4: - return new ee({ + return new ne({ idBlock: { tagClass: 3, tagNumber: 4 @@ -56103,7 +56149,7 @@ var ss, Dt = (ss = class extends Ce { return t.idBlock.tagClass = 3, t.idBlock.tagNumber = this.type, t; } case 8: { - const t = new Ve({ value: this.value }); + const t = new $e({ value: this.value }); return t.idBlock.tagClass = 3, t.idBlock.tagNumber = this.type, t; } default: @@ -56133,7 +56179,7 @@ var ca, ox = (ca = class extends Ce { case qy: return ""; case Gy: - return new Dt(); + return new Vt(); default: return super.defaultValues(t); } @@ -56142,7 +56188,7 @@ var ca, ox = (ca = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.accessMethod || "" }), Dt.schema(n.accessLocation || {})] + value: [new $e({ name: n.accessMethod || "" }), Vt.schema(n.accessLocation || {})] }); } fromSchema(t) { @@ -56151,10 +56197,10 @@ var ca, ox = (ca = class extends Ce { accessMethod: qy, accessLocation: { names: { blockName: Gy } } } })); - ke.assertSchema(n, this.className), this.accessMethod = n.result.accessMethod.valueBlock.toString(), this.accessLocation = new Dt({ schema: n.result.accessLocation }); + ke.assertSchema(n, this.className), this.accessMethod = n.result.accessMethod.valueBlock.toString(), this.accessLocation = new Vt({ schema: n.result.accessLocation }); } toSchema() { - return new z({ value: [new Ve({ value: this.accessMethod }), this.accessLocation.toSchema()] }); + return new z({ value: [new $e({ value: this.accessMethod }), this.accessLocation.toSchema()] }); } toJSON() { return { @@ -56164,7 +56210,7 @@ var ca, ox = (ca = class extends Ce { } }, ca.CLASS_NAME = "AccessDescription", ca); const q1 = "seconds", G1 = "millis", J1 = "micros"; -var is, mh = (is = class extends Ce { +var is, bh = (is = class extends Ce { constructor(t = {}) { super(), "seconds" in t && (this.seconds = t.seconds ?? is.defaultValues("seconds")), "millis" in t && (this.millis = t.millis ?? is.defaultValues("millis")), "micros" in t && (this.micros = t.micros ?? is.defaultValues("micros")), t.schema && this.fromSchema(t.schema); } @@ -56194,7 +56240,7 @@ var is, mh = (is = class extends Ce { name: n.blockName || "", optional: !0, value: [ - new de({ + new ue({ optional: !0, name: n.seconds || "" }), @@ -56229,18 +56275,18 @@ var is, mh = (is = class extends Ce { micros: J1 } })); if (ke.assertSchema(n, this.className), "seconds" in n.result && (this.seconds = n.result.seconds.valueBlock.valueDec), "millis" in n.result) { - const r = new de({ valueHex: n.result.millis.valueBlock.valueHex }); + const r = new ue({ valueHex: n.result.millis.valueBlock.valueHex }); this.millis = r.valueBlock.valueDec; } if ("micros" in n.result) { - const r = new de({ valueHex: n.result.micros.valueBlock.valueHex }); + const r = new ue({ valueHex: n.result.micros.valueBlock.valueHex }); this.micros = r.valueBlock.valueDec; } } toSchema() { const t = []; - if (this.seconds !== void 0 && t.push(new de({ value: this.seconds })), this.millis !== void 0) { - const n = new de({ value: this.millis }); + if (this.seconds !== void 0 && t.push(new ue({ value: this.seconds })), this.millis !== void 0) { + const n = new ue({ value: this.millis }); t.push(new Je({ idBlock: { tagClass: 3, @@ -56250,7 +56296,7 @@ var is, mh = (is = class extends Ce { })); } if (this.micros !== void 0) { - const n = new de({ value: this.micros }); + const n = new ue({ value: this.micros }); t.push(new Je({ idBlock: { tagClass: 3, @@ -56267,7 +56313,7 @@ var is, mh = (is = class extends Ce { } }, is.CLASS_NAME = "Accuracy", is); const Y1 = "algorithmId", vy = "algorithmParams", aq = "algorithm", EO = "params", NCe = [aq, EO]; -var Ds, fe = (Ds = class extends Ce { +var Ds, de = (Ds = class extends Ce { constructor(t = {}) { super(), this.algorithmId = t[Y1] ?? Ds.defaultValues(Y1), vy in t && (this.algorithmParams = t[vy] ?? Ds.defaultValues(vy)), t.schema && this.fromSchema(t.schema); } @@ -56296,7 +56342,7 @@ var Ds, fe = (Ds = class extends Ce { return new z({ name: n.blockName || "", optional: n.optional || !1, - value: [new Ve({ name: n.algorithmIdentifier || "" }), new Xe({ + value: [new $e({ name: n.algorithmIdentifier || "" }), new Xe({ name: n.algorithmParams || "", optional: !0 })] @@ -56312,7 +56358,7 @@ var Ds, fe = (Ds = class extends Ce { } toSchema() { const t = []; - return t.push(new Ve({ value: this.algorithmId })), this.algorithmParams && !(this.algorithmParams instanceof Xe) && t.push(this.algorithmParams), new z({ value: t }); + return t.push(new $e({ value: this.algorithmId })), this.algorithmParams && !(this.algorithmParams instanceof Xe) && t.push(this.algorithmParams), new z({ value: t }); } toJSON() { const t = { algorithmId: this.algorithmId }; @@ -56322,14 +56368,14 @@ var Ds, fe = (Ds = class extends Ce { return !(t instanceof Ds) || this.algorithmId !== t.algorithmId ? !1 : this.algorithmParams ? t.algorithmParams ? JSON.stringify(this.algorithmParams) === JSON.stringify(t.algorithmParams) : !1 : !t.algorithmParams; } }, Ds.CLASS_NAME = "AlgorithmIdentifier", Ds); -const Mh = "altNames", OCe = [Mh]; -var Pl, o4 = (Pl = class extends Ce { +const Bh = "altNames", OCe = [Bh]; +var Rl, o4 = (Rl = class extends Ce { constructor(t = {}) { - super(), this.altNames = t[Mh] ?? Pl.defaultValues(Mh), t.schema && this.fromSchema(t.schema); + super(), this.altNames = t[Bh] ?? Rl.defaultValues(Bh), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Mh: + case Bh: return []; default: return super.defaultValues(t); @@ -56339,16 +56385,16 @@ var Pl, o4 = (Pl = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.altNames || "", - value: Dt.schema() + value: Vt.schema() })] }); } fromSchema(t) { for (const r of OCe) delete t[r]; - const n = Ee(t, t, Pl.schema({ names: { altNames: Mh } })); - ke.assertSchema(n, this.className), Mh in n.result && (this.altNames = Array.from(n.result.altNames, (r) => new Dt({ schema: r }))); + const n = Ee(t, t, Rl.schema({ names: { altNames: Bh } })); + ke.assertSchema(n, this.className), Bh in n.result && (this.altNames = Array.from(n.result.altNames, (r) => new Vt({ schema: r }))); } toSchema() { return new z({ value: Array.from(this.altNames, (t) => t.toSchema()) }); @@ -56356,17 +56402,17 @@ var Pl, o4 = (Pl = class extends Ce { toJSON() { return { altNames: Array.from(this.altNames, (t) => t.toJSON()) }; } -}, Pl.CLASS_NAME = "AltName", Pl); -const Bh = "type", _h = "values", PCe = [Bh, _h]; +}, Rl.CLASS_NAME = "AltName", Rl); +const _h = "type", Lh = "values", PCe = [_h, Lh]; var la, En = (la = class extends Ce { constructor(t = {}) { - super(), this.type = t[Bh] ?? la.defaultValues(Bh), this.values = t[_h] ?? la.defaultValues(_h), t.schema && this.fromSchema(t.schema); + super(), this.type = t[_h] ?? la.defaultValues(_h), this.values = t[Lh] ?? la.defaultValues(Lh), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Bh: - return ""; case _h: + return ""; + case Lh: return []; default: return super.defaultValues(t); @@ -56374,9 +56420,9 @@ var la, En = (la = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case Bh: - return n === ""; case _h: + return n === ""; + case Lh: return n.length === 0; default: return super.defaultValues(t); @@ -56386,9 +56432,9 @@ var la, En = (la = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.type || "" }), new An({ + value: [new $e({ name: n.type || "" }), new An({ name: n.setName || "", - value: [new ot({ + value: [new st({ name: n.values || "", value: new Xe() })] @@ -56398,13 +56444,13 @@ var la, En = (la = class extends Ce { fromSchema(t) { for (const r of PCe) delete t[r]; const n = Ee(t, t, la.schema({ names: { - type: Bh, - values: _h + type: _h, + values: Lh } })); ke.assertSchema(n, this.className), this.type = n.result.type.valueBlock.toString(), this.values = n.result.values; } toSchema() { - return new z({ value: [new Ve({ value: this.type }), new An({ value: this.values })] }); + return new z({ value: [new $e({ value: this.type }), new An({ value: this.values })] }); } toJSON() { return { @@ -56414,7 +56460,7 @@ var la, En = (la = class extends Ce { } }, la.CLASS_NAME = "Attribute", la); const Jy = "notBeforeTime", Yy = "notAfterTime", RCe = [Jy, Yy]; -var ua, Ag = (ua = class extends Ce { +var ua, Sg = (ua = class extends Ce { constructor(t = {}) { super(), this.notBeforeTime = t[Jy] ?? ua.defaultValues(Jy), this.notAfterTime = t[Yy] ?? ua.defaultValues(Yy), t.schema && this.fromSchema(t.schema); } @@ -56431,7 +56477,7 @@ var ua, Ag = (ua = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Yt({ name: n.notBeforeTime || "" }), new Yt({ name: n.notAfterTime || "" })] + value: [new Xt({ name: n.notBeforeTime || "" }), new Xt({ name: n.notAfterTime || "" })] }); } fromSchema(t) { @@ -56443,7 +56489,7 @@ var ua, Ag = (ua = class extends Ce { ke.assertSchema(n, this.className), this.notBeforeTime = n.result.notBeforeTime.toDate(), this.notAfterTime = n.result.notAfterTime.toDate(); } toSchema() { - return new z({ value: [new Yt({ valueDate: this.notBeforeTime }), new Yt({ valueDate: this.notAfterTime })] }); + return new z({ value: [new Xt({ valueDate: this.notBeforeTime }), new Xt({ valueDate: this.notAfterTime })] }); } toJSON() { return { @@ -56453,9 +56499,9 @@ var ua, Ag = (ua = class extends Ce { } }, ua.CLASS_NAME = "AttCertValidityPeriod", ua); const ky = "names", s4 = "generalNames"; -var Rl, hr = (Rl = class extends Ce { +var Tl, pr = (Tl = class extends Ce { constructor(t = {}) { - super(), this.names = t[ky] ?? Rl.defaultValues(ky), t.schema && this.fromSchema(t.schema); + super(), this.names = t[ky] ?? Tl.defaultValues(ky), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -56470,19 +56516,19 @@ var Rl, hr = (Rl = class extends Ce { return new z({ optional: n, name: r.blockName || "", - value: [new ot({ + value: [new st({ name: r.generalNames || "", - value: Dt.schema() + value: Vt.schema() })] }); } fromSchema(t) { for (const r of [ky, s4]) delete t[r]; - const n = Ee(t, t, Rl.schema({ names: { + const n = Ee(t, t, Tl.schema({ names: { blockName: ky, generalNames: s4 } })); - ke.assertSchema(n, this.className), this.names = Array.from(n.result.generalNames, (r) => new Dt({ schema: r })); + ke.assertSchema(n, this.className), this.names = Array.from(n.result.generalNames, (r) => new Vt({ schema: r })); } toSchema() { return new z({ value: Array.from(this.names, (t) => t.toSchema()) }); @@ -56490,24 +56536,24 @@ var Rl, hr = (Rl = class extends Ce { toJSON() { return { names: Array.from(this.names, (t) => t.toJSON()) }; } -}, Rl.CLASS_NAME = "GeneralNames", Rl); -const TCe = "2.5.29.9", MCe = "2.5.29.16", BCe = "2.5.29.17", cq = "2.5.29.18", _Ce = "2.5.29.19", LCe = "2.5.29.20", DCe = "2.5.29.27", jCe = "2.5.29.21", FCe = "2.5.29.24", lq = "2.5.29.28", uq = "2.5.29.29", VCe = "2.5.29.30", dq = "2.5.29.31", oT = "2.5.29.46", $Ce = "2.5.29.32", UCe = "2.5.29.32.0", KCe = "1.3.6.1.4.1.311.21.10", HCe = "2.5.29.33", fq = "2.5.29.35", zCe = "2.5.29.36", WCe = "2.5.29.37", sT = "1.3.6.1.5.5.7.1.1", qCe = "1.3.6.1.5.5.7.1.11", hq = "1.3.6.1.4.1.11129.2.4.2", GCe = "1.3.6.1.4.1.311.21.7", JCe = "1.3.6.1.4.1.311.21.1", YCe = "1.3.6.1.5.5.7.1.3", iT = "1.2.840.113549.1.7.1", QCe = "1.2.840.113549.1.7.2", pq = "1.2.840.113549.1.7.3", gq = "1.2.840.113549.1.7.6", i4 = "1.2.840.113549.1.9.22.1", XCe = "1.2.840.113549.1.9.22.2", a4 = "1.2.840.113549.1.9.22.3", c4 = "1.2.840.113549.1.9.23.1", Cu = "keyIdentifier", Iu = "authorityCertIssuer", Nu = "authorityCertSerialNumber", ZCe = [ - Cu, +}, Tl.CLASS_NAME = "GeneralNames", Tl); +const TCe = "2.5.29.9", MCe = "2.5.29.16", BCe = "2.5.29.17", cq = "2.5.29.18", _Ce = "2.5.29.19", LCe = "2.5.29.20", DCe = "2.5.29.27", jCe = "2.5.29.21", FCe = "2.5.29.24", lq = "2.5.29.28", uq = "2.5.29.29", VCe = "2.5.29.30", dq = "2.5.29.31", oT = "2.5.29.46", $Ce = "2.5.29.32", UCe = "2.5.29.32.0", KCe = "1.3.6.1.4.1.311.21.10", HCe = "2.5.29.33", fq = "2.5.29.35", zCe = "2.5.29.36", WCe = "2.5.29.37", sT = "1.3.6.1.5.5.7.1.1", qCe = "1.3.6.1.5.5.7.1.11", hq = "1.3.6.1.4.1.11129.2.4.2", GCe = "1.3.6.1.4.1.311.21.7", JCe = "1.3.6.1.4.1.311.21.1", YCe = "1.3.6.1.5.5.7.1.3", iT = "1.2.840.113549.1.7.1", QCe = "1.2.840.113549.1.7.2", pq = "1.2.840.113549.1.7.3", gq = "1.2.840.113549.1.7.6", i4 = "1.2.840.113549.1.9.22.1", XCe = "1.2.840.113549.1.9.22.2", a4 = "1.2.840.113549.1.9.22.3", c4 = "1.2.840.113549.1.9.23.1", Iu = "keyIdentifier", Nu = "authorityCertIssuer", Ou = "authorityCertSerialNumber", ZCe = [ Iu, - Nu + Nu, + Ou ]; var js, mq = (js = class extends Ce { constructor(t = {}) { - super(), Cu in t && (this.keyIdentifier = t[Cu] ?? js.defaultValues(Cu)), Iu in t && (this.authorityCertIssuer = t[Iu] ?? js.defaultValues(Iu)), Nu in t && (this.authorityCertSerialNumber = t[Nu] ?? js.defaultValues(Nu)), t.schema && this.fromSchema(t.schema); + super(), Iu in t && (this.keyIdentifier = t[Iu] ?? js.defaultValues(Iu)), Nu in t && (this.authorityCertIssuer = t[Nu] ?? js.defaultValues(Nu)), Ou in t && (this.authorityCertSerialNumber = t[Ou] ?? js.defaultValues(Ou)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Cu: - return new Oe(); case Iu: - return []; + return new Oe(); case Nu: - return new de(); + return []; + case Ou: + return new ue(); default: return super.defaultValues(t); } @@ -56525,15 +56571,15 @@ var js, mq = (js = class extends Ce { tagNumber: 0 } }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 1 }, - value: [new ot({ + value: [new st({ name: n.authorityCertIssuer || "", - value: Dt.schema() + value: Vt.schema() })] }), new Je({ @@ -56550,11 +56596,11 @@ var js, mq = (js = class extends Ce { fromSchema(t) { for (const r of ZCe) delete t[r]; const n = Ee(t, t, js.schema({ names: { - keyIdentifier: Cu, - authorityCertIssuer: Iu, - authorityCertSerialNumber: Nu + keyIdentifier: Iu, + authorityCertIssuer: Nu, + authorityCertSerialNumber: Ou } })); - ke.assertSchema(n, this.className), Cu in n.result && (this.keyIdentifier = new Oe({ valueHex: n.result.keyIdentifier.valueBlock.valueHex })), Iu in n.result && (this.authorityCertIssuer = Array.from(n.result.authorityCertIssuer, (r) => new Dt({ schema: r }))), Nu in n.result && (this.authorityCertSerialNumber = new de({ valueHex: n.result.authorityCertSerialNumber.valueBlock.valueHex })); + ke.assertSchema(n, this.className), Iu in n.result && (this.keyIdentifier = new Oe({ valueHex: n.result.keyIdentifier.valueBlock.valueHex })), Nu in n.result && (this.authorityCertIssuer = Array.from(n.result.authorityCertIssuer, (r) => new Vt({ schema: r }))), Ou in n.result && (this.authorityCertSerialNumber = new ue({ valueHex: n.result.authorityCertSerialNumber.valueBlock.valueHex })); } toSchema() { const t = []; @@ -56564,7 +56610,7 @@ var js, mq = (js = class extends Ce { tagNumber: 0 }, valueHex: this.keyIdentifier.valueBlock.valueHexView - })), this.authorityCertIssuer && t.push(new ee({ + })), this.authorityCertIssuer && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 @@ -56583,14 +56629,14 @@ var js, mq = (js = class extends Ce { return this.keyIdentifier && (t.keyIdentifier = this.keyIdentifier.toJSON()), this.authorityCertIssuer && (t.authorityCertIssuer = Array.from(this.authorityCertIssuer, (n) => n.toJSON())), this.authorityCertSerialNumber && (t.authorityCertSerialNumber = this.authorityCertSerialNumber.toJSON()), t; } }, js.CLASS_NAME = "AuthorityKeyIdentifier", js); -const wu = "pathLenConstraint", vu = "cA"; +const vu = "pathLenConstraint", ku = "cA"; var da, aT = (da = class extends Ce { constructor(t = {}) { - super(), this.cA = t[vu] ?? !1, wu in t && (this.pathLenConstraint = t[wu] ?? 0), t.schema && this.fromSchema(t.schema); + super(), this.cA = t[ku] ?? !1, vu in t && (this.pathLenConstraint = t[vu] ?? 0), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case vu: + case ku: return !1; default: return super.defaultValues(t); @@ -56600,36 +56646,36 @@ var da, aT = (da = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ql({ + value: [new Xl({ optional: !0, name: n.cA || "" - }), new de({ + }), new ue({ optional: !0, name: n.pathLenConstraint || "" })] }); } fromSchema(t) { - for (const r of [vu, wu]) delete t[r]; + for (const r of [ku, vu]) delete t[r]; const n = Ee(t, t, da.schema({ names: { - cA: vu, - pathLenConstraint: wu + cA: ku, + pathLenConstraint: vu } })); - ke.assertSchema(n, this.className), vu in n.result && (this.cA = n.result.cA.valueBlock.value), wu in n.result && (n.result.pathLenConstraint.valueBlock.isHexOnly ? this.pathLenConstraint = n.result.pathLenConstraint : this.pathLenConstraint = n.result.pathLenConstraint.valueBlock.valueDec); + ke.assertSchema(n, this.className), ku in n.result && (this.cA = n.result.cA.valueBlock.value), vu in n.result && (n.result.pathLenConstraint.valueBlock.isHexOnly ? this.pathLenConstraint = n.result.pathLenConstraint : this.pathLenConstraint = n.result.pathLenConstraint.valueBlock.valueDec); } toSchema() { const t = []; - return this.cA !== da.defaultValues(vu) && t.push(new Ql({ value: this.cA })), wu in this && (this.pathLenConstraint instanceof de ? t.push(this.pathLenConstraint) : t.push(new de({ value: this.pathLenConstraint }))), new z({ value: t }); + return this.cA !== da.defaultValues(ku) && t.push(new Xl({ value: this.cA })), vu in this && (this.pathLenConstraint instanceof ue ? t.push(this.pathLenConstraint) : t.push(new ue({ value: this.pathLenConstraint }))), new z({ value: t }); } toJSON() { const t = {}; - return this.cA !== da.defaultValues(vu) && (t.cA = this.cA), wu in this && (this.pathLenConstraint instanceof de ? t.pathLenConstraint = this.pathLenConstraint.toJSON() : t.pathLenConstraint = this.pathLenConstraint), t; + return this.cA !== da.defaultValues(ku) && (t.cA = this.cA), vu in this && (this.pathLenConstraint instanceof ue ? t.pathLenConstraint = this.pathLenConstraint.toJSON() : t.pathLenConstraint = this.pathLenConstraint), t; } }, da.CLASS_NAME = "BasicConstraints", da); const KC = "certificateIndex", HC = "keyIndex"; -var Tl, eIe = (Tl = class extends Ce { +var Ml, eIe = (Ml = class extends Ce { constructor(t = {}) { - super(), this.certificateIndex = t[KC] ?? Tl.defaultValues(KC), this.keyIndex = t[HC] ?? Tl.defaultValues(HC), t.schema && this.fromSchema(t.schema); + super(), this.certificateIndex = t[KC] ?? Ml.defaultValues(KC), this.keyIndex = t[HC] ?? Ml.defaultValues(HC), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -56641,22 +56687,22 @@ var Tl, eIe = (Tl = class extends Ce { } } static schema() { - return new de(); + return new ue(); } fromSchema(t) { - if (t.constructor.blockName() !== de.blockName()) throw new Error("Object's schema was not verified against input data for CAVersion"); + if (t.constructor.blockName() !== ue.blockName()) throw new Error("Object's schema was not verified against input data for CAVersion"); let n = t.valueBlock.valueHex.slice(0); const r = new Uint8Array(n); switch (!0) { case n.byteLength < 4: { - const d = /* @__PURE__ */ new ArrayBuffer(4); - new Uint8Array(d).set(r, 4 - n.byteLength), n = d.slice(0); + const f = /* @__PURE__ */ new ArrayBuffer(4); + new Uint8Array(f).set(r, 4 - n.byteLength), n = f.slice(0); } break; case n.byteLength > 4: { - const d = /* @__PURE__ */ new ArrayBuffer(4); - new Uint8Array(d).set(r.slice(0, 4)), n = d.slice(0); + const f = /* @__PURE__ */ new ArrayBuffer(4); + new Uint8Array(f).set(r.slice(0, 4)), n = f.slice(0); } } const o = n.slice(0, 2), s = new Uint8Array(o); @@ -56678,7 +56724,7 @@ var Tl, eIe = (Tl = class extends Ce { const s = /* @__PURE__ */ new ArrayBuffer(2), i = new Uint16Array(s); i[0] = this.keyIndex; const a = new Uint8Array(s); - return o = a[0], a[0] = a[1], a[1] = o, new de({ valueHex: Kt.concat(s, t) }); + return o = a[0], a[0] = a[1], a[1] = o, new ue({ valueHex: Wt.concat(s, t) }); } toJSON() { return { @@ -56686,7 +56732,7 @@ var Tl, eIe = (Tl = class extends Ce { keyIndex: this.keyIndex }; } -}, Tl.CLASS_NAME = "CAVersion", Tl); +}, Ml.CLASS_NAME = "CAVersion", Ml); const Qy = "policyQualifierId", Xy = "qualifier", tIe = [Qy, Xy]; var fa, l4 = (fa = class extends Ce { constructor(t = {}) { @@ -56706,7 +56752,7 @@ var fa, l4 = (fa = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.policyQualifierId || "" }), new Xe({ name: n.qualifier || "" })] + value: [new $e({ name: n.policyQualifierId || "" }), new Xe({ name: n.qualifier || "" })] }); } fromSchema(t) { @@ -56718,7 +56764,7 @@ var fa, l4 = (fa = class extends Ce { ke.assertSchema(n, this.className), this.policyQualifierId = n.result.policyQualifierId.valueBlock.toString(), this.qualifier = n.result.qualifier; } toSchema() { - return new z({ value: [new Ve({ value: this.policyQualifierId }), this.qualifier] }); + return new z({ value: [new $e({ value: this.policyQualifierId }), this.qualifier] }); } toJSON() { return { @@ -56746,9 +56792,9 @@ var ha, u4 = (ha = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.policyIdentifier || "" }), new z({ + value: [new $e({ name: n.policyIdentifier || "" }), new z({ optional: !0, - value: [new ot({ + value: [new st({ name: n.policyQualifiers || "", value: l4.schema() })] @@ -56765,7 +56811,7 @@ var ha, u4 = (ha = class extends Ce { } toSchema() { const t = []; - return t.push(new Ve({ value: this.policyIdentifier })), this.policyQualifiers && t.push(new z({ value: Array.from(this.policyQualifiers, (n) => n.toSchema()) })), new z({ value: t }); + return t.push(new $e({ value: this.policyIdentifier })), this.policyQualifiers && t.push(new z({ value: Array.from(this.policyQualifiers, (n) => n.toSchema()) })), new z({ value: t }); } toJSON() { const t = { policyIdentifier: this.policyIdentifier }; @@ -56773,9 +56819,9 @@ var ha, u4 = (ha = class extends Ce { } }, ha.CLASS_NAME = "PolicyInformation", ha); const Zy = "certificatePolicies", rIe = [Zy]; -var Ml, d4 = (Ml = class extends Ce { +var Bl, d4 = (Bl = class extends Ce { constructor(t = {}) { - super(), this.certificatePolicies = t[Zy] ?? Ml.defaultValues(Zy), t.schema && this.fromSchema(t.schema); + super(), this.certificatePolicies = t[Zy] ?? Bl.defaultValues(Zy), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -56789,7 +56835,7 @@ var Ml, d4 = (Ml = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.certificatePolicies || "", value: u4.schema() })] @@ -56797,7 +56843,7 @@ var Ml, d4 = (Ml = class extends Ce { } fromSchema(t) { for (const r of rIe) delete t[r]; - const n = Ee(t, t, Ml.schema({ names: { certificatePolicies: Zy } })); + const n = Ee(t, t, Bl.schema({ names: { certificatePolicies: Zy } })); ke.assertSchema(n, this.className), this.certificatePolicies = Array.from(n.result.certificatePolicies, (r) => new u4({ schema: r })); } toSchema() { @@ -56806,7 +56852,7 @@ var Ml, d4 = (Ml = class extends Ce { toJSON() { return { certificatePolicies: Array.from(this.certificatePolicies, (t) => t.toJSON()) }; } -}, Ml.CLASS_NAME = "CertificatePolicies", Ml); +}, Bl.CLASS_NAME = "CertificatePolicies", Bl); const eb = "templateID", ji = "templateMajorVersion", Fi = "templateMinorVersion", oIe = [ eb, ji, @@ -56832,12 +56878,12 @@ var sIe = class tb extends Ce { return new z({ name: n.blockName || "", value: [ - new Ve({ name: n.templateID || "" }), - new de({ + new $e({ name: n.templateID || "" }), + new ue({ name: n.templateMajorVersion || "", optional: !0 }), - new de({ + new ue({ name: n.templateMinorVersion || "", optional: !0 }) @@ -56855,31 +56901,31 @@ var sIe = class tb extends Ce { } toSchema() { const t = []; - return t.push(new Ve({ value: this.templateID })), ji in this && t.push(new de({ value: this.templateMajorVersion })), Fi in this && t.push(new de({ value: this.templateMinorVersion })), new z({ value: t }); + return t.push(new $e({ value: this.templateID })), ji in this && t.push(new ue({ value: this.templateMajorVersion })), Fi in this && t.push(new ue({ value: this.templateMinorVersion })), new z({ value: t }); } toJSON() { const t = { templateID: this.templateID }; return ji in this && (t.templateMajorVersion = this.templateMajorVersion), Fi in this && (t.templateMinorVersion = this.templateMinorVersion), t; } }; -const Ou = "distributionPoint", yq = "distributionPointNames", Pu = "reasons", Ru = "cRLIssuer", bq = "cRLIssuerNames", iIe = [ - Ou, - yq, +const Pu = "distributionPoint", yq = "distributionPointNames", Ru = "reasons", Tu = "cRLIssuer", bq = "cRLIssuerNames", iIe = [ Pu, + yq, Ru, + Tu, bq ]; var Fs, NO = (Fs = class extends Ce { constructor(t = {}) { - super(), Ou in t && (this.distributionPoint = t[Ou] ?? Fs.defaultValues(Ou)), Pu in t && (this.reasons = t[Pu] ?? Fs.defaultValues(Pu)), Ru in t && (this.cRLIssuer = t[Ru] ?? Fs.defaultValues(Ru)), t.schema && this.fromSchema(t.schema); + super(), Pu in t && (this.distributionPoint = t[Pu] ?? Fs.defaultValues(Pu)), Ru in t && (this.reasons = t[Ru] ?? Fs.defaultValues(Ru)), Tu in t && (this.cRLIssuer = t[Tu] ?? Fs.defaultValues(Tu)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Ou: - return []; case Pu: - return new ht(); + return []; case Ru: + return new pt(); + case Tu: return []; default: return super.defaultValues(t); @@ -56890,31 +56936,31 @@ var Fs, NO = (Fs = class extends Ce { return new z({ name: n.blockName || "", value: [ - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new Xt({ value: [new ee({ + value: [new en({ value: [new ne({ name: n.distributionPoint || "", optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new ot({ + value: [new st({ name: n.distributionPointNames || "", - value: Dt.schema() + value: Vt.schema() })] - }), new ee({ + }), new ne({ name: n.distributionPoint || "", optional: !0, idBlock: { tagClass: 3, tagNumber: 1 }, - value: Qt.schema().valueBlock.value + value: Zt.schema().valueBlock.value })] })] }), new Je({ @@ -56925,16 +56971,16 @@ var Fs, NO = (Fs = class extends Ce { tagNumber: 1 } }), - new ee({ + new ne({ name: n.cRLIssuer || "", optional: !0, idBlock: { tagClass: 3, tagNumber: 2 }, - value: [new ot({ + value: [new st({ name: n.cRLIssuerNames || "", - value: Dt.schema() + value: Vt.schema() })] }) ] @@ -56943,31 +56989,31 @@ var Fs, NO = (Fs = class extends Ce { fromSchema(t) { for (const r of iIe) delete t[r]; const n = Ee(t, t, Fs.schema({ names: { - distributionPoint: Ou, + distributionPoint: Pu, distributionPointNames: yq, - reasons: Pu, - cRLIssuer: Ru, + reasons: Ru, + cRLIssuer: Tu, cRLIssuerNames: bq } })); - ke.assertSchema(n, this.className), Ou in n.result && (n.result.distributionPoint.idBlock.tagNumber === 0 && (this.distributionPoint = Array.from(n.result.distributionPointNames, (r) => new Dt({ schema: r }))), n.result.distributionPoint.idBlock.tagNumber === 1 && (this.distributionPoint = new Qt({ schema: new z({ value: n.result.distributionPoint.valueBlock.value }) }))), Pu in n.result && (this.reasons = new ht({ valueHex: n.result.reasons.valueBlock.valueHex })), Ru in n.result && (this.cRLIssuer = Array.from(n.result.cRLIssuerNames, (r) => new Dt({ schema: r }))); + ke.assertSchema(n, this.className), Pu in n.result && (n.result.distributionPoint.idBlock.tagNumber === 0 && (this.distributionPoint = Array.from(n.result.distributionPointNames, (r) => new Vt({ schema: r }))), n.result.distributionPoint.idBlock.tagNumber === 1 && (this.distributionPoint = new Zt({ schema: new z({ value: n.result.distributionPoint.valueBlock.value }) }))), Ru in n.result && (this.reasons = new pt({ valueHex: n.result.reasons.valueBlock.valueHex })), Tu in n.result && (this.cRLIssuer = Array.from(n.result.cRLIssuerNames, (r) => new Vt({ schema: r }))); } toSchema() { const t = []; if (this.distributionPoint) { let n; - this.distributionPoint instanceof Array ? n = new ee({ + this.distributionPoint instanceof Array ? n = new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: Array.from(this.distributionPoint, (r) => r.toSchema()) - }) : n = new ee({ + }) : n = new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, value: [this.distributionPoint.toSchema()] - }), t.push(new ee({ + }), t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -56981,7 +57027,7 @@ var Fs, NO = (Fs = class extends Ce { tagNumber: 1 }, valueHex: this.reasons.valueBlock.valueHexView - })), this.cRLIssuer && t.push(new ee({ + })), this.cRLIssuer && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 2 @@ -56995,9 +57041,9 @@ var Fs, NO = (Fs = class extends Ce { } }, Fs.CLASS_NAME = "DistributionPoint", Fs); const nb = "distributionPoints", aIe = [nb]; -var Bl, OO = (Bl = class extends Ce { +var _l, OO = (_l = class extends Ce { constructor(t = {}) { - super(), this.distributionPoints = t[nb] ?? Bl.defaultValues(nb), t.schema && this.fromSchema(t.schema); + super(), this.distributionPoints = t[nb] ?? _l.defaultValues(nb), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -57011,7 +57057,7 @@ var Bl, OO = (Bl = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.distributionPoints || "", value: NO.schema() })] @@ -57019,7 +57065,7 @@ var Bl, OO = (Bl = class extends Ce { } fromSchema(t) { for (const r of aIe) delete t[r]; - const n = Ee(t, t, Bl.schema({ names: { distributionPoints: nb } })); + const n = Ee(t, t, _l.schema({ names: { distributionPoints: nb } })); ke.assertSchema(n, this.className), this.distributionPoints = Array.from(n.result.distributionPoints, (r) => new NO({ schema: r })); } toSchema() { @@ -57028,11 +57074,11 @@ var Bl, OO = (Bl = class extends Ce { toJSON() { return { distributionPoints: Array.from(this.distributionPoints, (t) => t.toJSON()) }; } -}, Bl.CLASS_NAME = "CRLDistributionPoints", Bl); +}, _l.CLASS_NAME = "CRLDistributionPoints", _l); const rb = "keyPurposes", cIe = [rb]; -var _l, sx = (_l = class extends Ce { +var Ll, sx = (Ll = class extends Ce { constructor(t = {}) { - super(), this.keyPurposes = t[rb] ?? _l.defaultValues(rb), t.schema && this.fromSchema(t.schema); + super(), this.keyPurposes = t[rb] ?? Ll.defaultValues(rb), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -57046,28 +57092,28 @@ var _l, sx = (_l = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.keyPurposes || "", - value: new Ve() + value: new $e() })] }); } fromSchema(t) { for (const r of cIe) delete t[r]; - const n = Ee(t, t, _l.schema({ names: { keyPurposes: rb } })); + const n = Ee(t, t, Ll.schema({ names: { keyPurposes: rb } })); ke.assertSchema(n, this.className), this.keyPurposes = Array.from(n.result.keyPurposes, (r) => r.valueBlock.toString()); } toSchema() { - return new z({ value: Array.from(this.keyPurposes, (t) => new Ve({ value: t })) }); + return new z({ value: Array.from(this.keyPurposes, (t) => new $e({ value: t })) }); } toJSON() { return { keyPurposes: Array.from(this.keyPurposes) }; } -}, _l.CLASS_NAME = "ExtKeyUsage", _l); +}, Ll.CLASS_NAME = "ExtKeyUsage", Ll); const Ay = "accessDescriptions"; -var Ll, PO = (Ll = class extends Ce { +var Dl, PO = (Dl = class extends Ce { constructor(t = {}) { - super(), this.accessDescriptions = t[Ay] ?? Ll.defaultValues(Ay), t.schema && this.fromSchema(t.schema); + super(), this.accessDescriptions = t[Ay] ?? Dl.defaultValues(Ay), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -57081,7 +57127,7 @@ var Ll, PO = (Ll = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.accessDescriptions || "", value: ox.schema() })] @@ -57089,7 +57135,7 @@ var Ll, PO = (Ll = class extends Ce { } fromSchema(t) { for (const r of [Ay]) delete t[r]; - const n = Ee(t, t, Ll.schema({ names: { accessDescriptions: Ay } })); + const n = Ee(t, t, Dl.schema({ names: { accessDescriptions: Ay } })); ke.assertSchema(n, this.className), this.accessDescriptions = Array.from(n.result.accessDescriptions, (r) => new ox({ schema: r })); } toSchema() { @@ -57098,34 +57144,34 @@ var Ll, PO = (Ll = class extends Ce { toJSON() { return { accessDescriptions: Array.from(this.accessDescriptions, (t) => t.toJSON()) }; } -}, Ll.CLASS_NAME = "InfoAccess", Ll); -const Tu = "distributionPoint", wq = "distributionPointNames", Ac = "onlyContainsUserCerts", Sc = "onlyContainsCACerts", xc = "onlySomeReasons", Ec = "indirectCRL", Cc = "onlyContainsAttributeCerts", lIe = [ - Tu, +}, Dl.CLASS_NAME = "InfoAccess", Dl); +const Mu = "distributionPoint", wq = "distributionPointNames", Sc = "onlyContainsUserCerts", xc = "onlyContainsCACerts", Ec = "onlySomeReasons", Cc = "indirectCRL", Ic = "onlyContainsAttributeCerts", lIe = [ + Mu, wq, - Ac, Sc, xc, Ec, - Cc + Cc, + Ic ]; var kn, uIe = (kn = class extends Ce { constructor(t = {}) { - super(), Tu in t && (this.distributionPoint = t[Tu] ?? kn.defaultValues(Tu)), this.onlyContainsUserCerts = t[Ac] ?? kn.defaultValues(Ac), this.onlyContainsCACerts = t[Sc] ?? kn.defaultValues(Sc), xc in t && (this.onlySomeReasons = t[xc] ?? kn.defaultValues(xc)), this.indirectCRL = t[Ec] ?? kn.defaultValues(Ec), this.onlyContainsAttributeCerts = t[Cc] ?? kn.defaultValues(Cc), t.schema && this.fromSchema(t.schema); + super(), Mu in t && (this.distributionPoint = t[Mu] ?? kn.defaultValues(Mu)), this.onlyContainsUserCerts = t[Sc] ?? kn.defaultValues(Sc), this.onlyContainsCACerts = t[xc] ?? kn.defaultValues(xc), Ec in t && (this.onlySomeReasons = t[Ec] ?? kn.defaultValues(Ec)), this.indirectCRL = t[Cc] ?? kn.defaultValues(Cc), this.onlyContainsAttributeCerts = t[Ic] ?? kn.defaultValues(Ic), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Tu: + case Mu: return []; - case Ac: - return !1; case Sc: return !1; case xc: - return 0; - case Ec: return !1; + case Ec: + return 0; case Cc: return !1; + case Ic: + return !1; default: return super.defaultValues(t); } @@ -57135,29 +57181,29 @@ var kn, uIe = (kn = class extends Ce { return new z({ name: n.blockName || "", value: [ - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new Xt({ value: [new ee({ + value: [new en({ value: [new ne({ name: n.distributionPoint || "", idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new ot({ + value: [new st({ name: n.distributionPointNames || "", - value: Dt.schema() + value: Vt.schema() })] - }), new ee({ + }), new ne({ name: n.distributionPoint || "", idBlock: { tagClass: 3, tagNumber: 1 }, - value: Qt.schema().valueBlock.value + value: Zt.schema().valueBlock.value })] })] }), new Je({ @@ -57206,41 +57252,41 @@ var kn, uIe = (kn = class extends Ce { fromSchema(t) { for (const r of lIe) delete t[r]; const n = Ee(t, t, kn.schema({ names: { - distributionPoint: Tu, + distributionPoint: Mu, distributionPointNames: wq, - onlyContainsUserCerts: Ac, - onlyContainsCACerts: Sc, - onlySomeReasons: xc, - indirectCRL: Ec, - onlyContainsAttributeCerts: Cc + onlyContainsUserCerts: Sc, + onlyContainsCACerts: xc, + onlySomeReasons: Ec, + indirectCRL: Cc, + onlyContainsAttributeCerts: Ic } })); - if (ke.assertSchema(n, this.className), Tu in n.result) switch (!0) { + if (ke.assertSchema(n, this.className), Mu in n.result) switch (!0) { case n.result.distributionPoint.idBlock.tagNumber === 0: - this.distributionPoint = Array.from(n.result.distributionPointNames, (r) => new Dt({ schema: r })); + this.distributionPoint = Array.from(n.result.distributionPointNames, (r) => new Vt({ schema: r })); break; case n.result.distributionPoint.idBlock.tagNumber === 1: - this.distributionPoint = new Qt({ schema: new z({ value: n.result.distributionPoint.valueBlock.value }) }); + this.distributionPoint = new Zt({ schema: new z({ value: n.result.distributionPoint.valueBlock.value }) }); break; default: throw new Error("Unknown tagNumber for distributionPoint: {$asn1.result.distributionPoint.idBlock.tagNumber}"); } - if (Ac in n.result) { + if (Sc in n.result) { const r = new Uint8Array(n.result.onlyContainsUserCerts.valueBlock.valueHex); this.onlyContainsUserCerts = r[0] !== 0; } - if (Sc in n.result) { + if (xc in n.result) { const r = new Uint8Array(n.result.onlyContainsCACerts.valueBlock.valueHex); this.onlyContainsCACerts = r[0] !== 0; } - if (xc in n.result) { + if (Ec in n.result) { const r = new Uint8Array(n.result.onlySomeReasons.valueBlock.valueHex); this.onlySomeReasons = r[0]; } - if (Ec in n.result) { + if (Cc in n.result) { const r = new Uint8Array(n.result.indirectCRL.valueBlock.valueHex); this.indirectCRL = r[0] !== 0; } - if (Cc in n.result) { + if (Ic in n.result) { const r = new Uint8Array(n.result.onlyContainsAttributeCerts.valueBlock.valueHex); this.onlyContainsAttributeCerts = r[0] !== 0; } @@ -57249,13 +57295,13 @@ var kn, uIe = (kn = class extends Ce { const t = []; if (this.distributionPoint) { let n; - this.distributionPoint instanceof Array ? n = new ee({ + this.distributionPoint instanceof Array ? n = new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: Array.from(this.distributionPoint, (r) => r.toSchema()) - }) : (n = this.distributionPoint.toSchema(), n.idBlock.tagClass = 3, n.idBlock.tagNumber = 1), t.push(new ee({ + }) : (n = this.distributionPoint.toSchema(), n.idBlock.tagClass = 3, n.idBlock.tagNumber = 1), t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -57263,13 +57309,13 @@ var kn, uIe = (kn = class extends Ce { value: [n] })); } - if (this.onlyContainsUserCerts !== kn.defaultValues(Ac) && t.push(new Je({ + if (this.onlyContainsUserCerts !== kn.defaultValues(Sc) && t.push(new Je({ idBlock: { tagClass: 3, tagNumber: 1 }, valueHex: new Uint8Array([255]).buffer - })), this.onlyContainsCACerts !== kn.defaultValues(Sc) && t.push(new Je({ + })), this.onlyContainsCACerts !== kn.defaultValues(xc) && t.push(new Je({ idBlock: { tagClass: 3, tagNumber: 2 @@ -57285,13 +57331,13 @@ var kn, uIe = (kn = class extends Ce { valueHex: n })); } - return this.indirectCRL !== kn.defaultValues(Ec) && t.push(new Je({ + return this.indirectCRL !== kn.defaultValues(Cc) && t.push(new Je({ idBlock: { tagClass: 3, tagNumber: 4 }, valueHex: new Uint8Array([255]).buffer - })), this.onlyContainsAttributeCerts !== kn.defaultValues(Cc) && t.push(new Je({ + })), this.onlyContainsAttributeCerts !== kn.defaultValues(Ic) && t.push(new Je({ idBlock: { tagClass: 3, tagNumber: 5 @@ -57301,25 +57347,25 @@ var kn, uIe = (kn = class extends Ce { } toJSON() { const t = {}; - return this.distributionPoint && (this.distributionPoint instanceof Array ? t.distributionPoint = Array.from(this.distributionPoint, (n) => n.toJSON()) : t.distributionPoint = this.distributionPoint.toJSON()), this.onlyContainsUserCerts !== kn.defaultValues(Ac) && (t.onlyContainsUserCerts = this.onlyContainsUserCerts), this.onlyContainsCACerts !== kn.defaultValues(Sc) && (t.onlyContainsCACerts = this.onlyContainsCACerts), xc in this && (t.onlySomeReasons = this.onlySomeReasons), this.indirectCRL !== kn.defaultValues(Ec) && (t.indirectCRL = this.indirectCRL), this.onlyContainsAttributeCerts !== kn.defaultValues(Cc) && (t.onlyContainsAttributeCerts = this.onlyContainsAttributeCerts), t; + return this.distributionPoint && (this.distributionPoint instanceof Array ? t.distributionPoint = Array.from(this.distributionPoint, (n) => n.toJSON()) : t.distributionPoint = this.distributionPoint.toJSON()), this.onlyContainsUserCerts !== kn.defaultValues(Sc) && (t.onlyContainsUserCerts = this.onlyContainsUserCerts), this.onlyContainsCACerts !== kn.defaultValues(xc) && (t.onlyContainsCACerts = this.onlyContainsCACerts), Ec in this && (t.onlySomeReasons = this.onlySomeReasons), this.indirectCRL !== kn.defaultValues(Cc) && (t.indirectCRL = this.indirectCRL), this.onlyContainsAttributeCerts !== kn.defaultValues(Ic) && (t.onlyContainsAttributeCerts = this.onlyContainsAttributeCerts), t; } }, kn.CLASS_NAME = "IssuingDistributionPoint", kn); -const ob = "base", Lh = "minimum", Ic = "maximum", dIe = [ +const ob = "base", Dh = "minimum", Nc = "maximum", dIe = [ ob, - Lh, - Ic + Dh, + Nc ]; var Vs, Q1 = (Vs = class extends Ce { constructor(t = {}) { - super(), this.base = t[ob] ?? Vs.defaultValues(ob), this.minimum = t[Lh] ?? Vs.defaultValues(Lh), Ic in t && (this.maximum = t[Ic] ?? Vs.defaultValues(Ic)), t.schema && this.fromSchema(t.schema); + super(), this.base = t[ob] ?? Vs.defaultValues(ob), this.minimum = t[Dh] ?? Vs.defaultValues(Dh), Nc in t && (this.maximum = t[Nc] ?? Vs.defaultValues(Nc)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case ob: - return new Dt(); - case Lh: + return new Vt(); + case Dh: return 0; - case Ic: + case Nc: return 0; default: return super.defaultValues(t); @@ -57330,22 +57376,22 @@ var Vs, Q1 = (Vs = class extends Ce { return new z({ name: n.blockName || "", value: [ - Dt.schema(n.base || {}), - new ee({ + Vt.schema(n.base || {}), + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new de({ name: n.minimum || "" })] + value: [new ue({ name: n.minimum || "" })] }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 1 }, - value: [new de({ name: n.maximum || "" })] + value: [new ue({ name: n.maximum || "" })] }) ] }); @@ -57354,16 +57400,16 @@ var Vs, Q1 = (Vs = class extends Ce { for (const r of dIe) delete t[r]; const n = Ee(t, t, Vs.schema({ names: { base: { names: { blockName: ob } }, - minimum: Lh, - maximum: Ic + minimum: Dh, + maximum: Nc } })); - ke.assertSchema(n, this.className), this.base = new Dt({ schema: n.result.base }), Lh in n.result && (n.result.minimum.valueBlock.isHexOnly ? this.minimum = n.result.minimum : this.minimum = n.result.minimum.valueBlock.valueDec), Ic in n.result && (n.result.maximum.valueBlock.isHexOnly ? this.maximum = n.result.maximum : this.maximum = n.result.maximum.valueBlock.valueDec); + ke.assertSchema(n, this.className), this.base = new Vt({ schema: n.result.base }), Dh in n.result && (n.result.minimum.valueBlock.isHexOnly ? this.minimum = n.result.minimum : this.minimum = n.result.minimum.valueBlock.valueDec), Nc in n.result && (n.result.maximum.valueBlock.isHexOnly ? this.maximum = n.result.maximum : this.maximum = n.result.maximum.valueBlock.valueDec); } toSchema() { const t = []; if (t.push(this.base.toSchema()), this.minimum !== 0) { let n = 0; - this.minimum instanceof de ? n = this.minimum : n = new de({ value: this.minimum }), t.push(new ee({ + this.minimum instanceof ue ? n = this.minimum : n = new ue({ value: this.minimum }), t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -57372,9 +57418,9 @@ var Vs, Q1 = (Vs = class extends Ce { value: [n] })); } - if (Ic in this) { + if (Nc in this) { let n = 0; - this.maximum instanceof de ? n = this.maximum : n = new de({ value: this.maximum }), t.push(new ee({ + this.maximum instanceof ue ? n = this.maximum : n = new ue({ value: this.maximum }), t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -57390,15 +57436,15 @@ var Vs, Q1 = (Vs = class extends Ce { return this.minimum !== 0 && (typeof this.minimum == "number" ? t.minimum = this.minimum : t.minimum = this.minimum.toJSON()), this.maximum !== void 0 && (typeof this.maximum == "number" ? t.maximum = this.maximum : t.maximum = this.maximum.toJSON()), t; } }, Vs.CLASS_NAME = "GeneralSubtree", Vs); -const Mu = "permittedSubtrees", Bu = "excludedSubtrees", fIe = [Mu, Bu]; +const Bu = "permittedSubtrees", _u = "excludedSubtrees", fIe = [Bu, _u]; var pa, hIe = (pa = class extends Ce { constructor(t = {}) { - super(), Mu in t && (this.permittedSubtrees = t[Mu] ?? pa.defaultValues(Mu)), Bu in t && (this.excludedSubtrees = t[Bu] ?? pa.defaultValues(Bu)), t.schema && this.fromSchema(t.schema); + super(), Bu in t && (this.permittedSubtrees = t[Bu] ?? pa.defaultValues(Bu)), _u in t && (this.excludedSubtrees = t[_u] ?? pa.defaultValues(_u)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Mu: case Bu: + case _u: return []; default: return super.defaultValues(t); @@ -57408,23 +57454,23 @@ var pa, hIe = (pa = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ee({ + value: [new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new ot({ + value: [new st({ name: n.permittedSubtrees || "", value: Q1.schema() })] - }), new ee({ + }), new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 1 }, - value: [new ot({ + value: [new st({ name: n.excludedSubtrees || "", value: Q1.schema() })] @@ -57434,20 +57480,20 @@ var pa, hIe = (pa = class extends Ce { fromSchema(t) { for (const r of fIe) delete t[r]; const n = Ee(t, t, pa.schema({ names: { - permittedSubtrees: Mu, - excludedSubtrees: Bu + permittedSubtrees: Bu, + excludedSubtrees: _u } })); - ke.assertSchema(n, this.className), Mu in n.result && (this.permittedSubtrees = Array.from(n.result.permittedSubtrees, (r) => new Q1({ schema: r }))), Bu in n.result && (this.excludedSubtrees = Array.from(n.result.excludedSubtrees, (r) => new Q1({ schema: r }))); + ke.assertSchema(n, this.className), Bu in n.result && (this.permittedSubtrees = Array.from(n.result.permittedSubtrees, (r) => new Q1({ schema: r }))), _u in n.result && (this.excludedSubtrees = Array.from(n.result.excludedSubtrees, (r) => new Q1({ schema: r }))); } toSchema() { const t = []; - return this.permittedSubtrees && t.push(new ee({ + return this.permittedSubtrees && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: Array.from(this.permittedSubtrees, (n) => n.toSchema()) - })), this.excludedSubtrees && t.push(new ee({ + })), this.excludedSubtrees && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 @@ -57505,24 +57551,24 @@ var ga, gIe = (ga = class extends Ce { if (ke.assertSchema(n, this.className), Vi in n.result) { const r = n.result.requireExplicitPolicy; r.idBlock.tagClass = 1, r.idBlock.tagNumber = 2; - const o = r.toBER(!1), s = hn(o); + const o = r.toBER(!1), s = pn(o); ke.assert(s, "Integer"), this.requireExplicitPolicy = s.result.valueBlock.valueDec; } if ($i in n.result) { const r = n.result.inhibitPolicyMapping; r.idBlock.tagClass = 1, r.idBlock.tagNumber = 2; - const o = r.toBER(!1), s = hn(o); + const o = r.toBER(!1), s = pn(o); ke.assert(s, "Integer"), this.inhibitPolicyMapping = s.result.valueBlock.valueDec; } } toSchema() { const t = []; if (Vi in this) { - const n = new de({ value: this.requireExplicitPolicy }); + const n = new ue({ value: this.requireExplicitPolicy }); n.idBlock.tagClass = 3, n.idBlock.tagNumber = 0, t.push(n); } if ($i in this) { - const n = new de({ value: this.inhibitPolicyMapping }); + const n = new ue({ value: this.inhibitPolicyMapping }); n.idBlock.tagClass = 3, n.idBlock.tagNumber = 1, t.push(n); } return new z({ value: t }); @@ -57551,7 +57597,7 @@ var ma, f4 = (ma = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.issuerDomainPolicy || "" }), new Ve({ name: n.subjectDomainPolicy || "" })] + value: [new $e({ name: n.issuerDomainPolicy || "" }), new $e({ name: n.subjectDomainPolicy || "" })] }); } fromSchema(t) { @@ -57563,7 +57609,7 @@ var ma, f4 = (ma = class extends Ce { ke.assertSchema(n, this.className), this.issuerDomainPolicy = n.result.issuerDomainPolicy.valueBlock.toString(), this.subjectDomainPolicy = n.result.subjectDomainPolicy.valueBlock.toString(); } toSchema() { - return new z({ value: [new Ve({ value: this.issuerDomainPolicy }), new Ve({ value: this.subjectDomainPolicy })] }); + return new z({ value: [new $e({ value: this.issuerDomainPolicy }), new $e({ value: this.subjectDomainPolicy })] }); } toJSON() { return { @@ -57573,9 +57619,9 @@ var ma, f4 = (ma = class extends Ce { } }, ma.CLASS_NAME = "PolicyMapping", ma); const ab = "mappings", yIe = [ab]; -var Dl, bIe = (Dl = class extends Ce { +var jl, bIe = (jl = class extends Ce { constructor(t = {}) { - super(), this.mappings = t[ab] ?? Dl.defaultValues(ab), t.schema && this.fromSchema(t.schema); + super(), this.mappings = t[ab] ?? jl.defaultValues(ab), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -57589,7 +57635,7 @@ var Dl, bIe = (Dl = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.mappings || "", value: f4.schema() })] @@ -57597,7 +57643,7 @@ var Dl, bIe = (Dl = class extends Ce { } fromSchema(t) { for (const r of yIe) delete t[r]; - const n = Ee(t, t, Dl.schema({ names: { mappings: ab } })); + const n = Ee(t, t, jl.schema({ names: { mappings: ab } })); ke.assertSchema(n, this.className), this.mappings = Array.from(n.result.mappings, (r) => new f4({ schema: r })); } toSchema() { @@ -57606,18 +57652,18 @@ var Dl, bIe = (Dl = class extends Ce { toJSON() { return { mappings: Array.from(this.mappings, (t) => t.toJSON()) }; } -}, Dl.CLASS_NAME = "PolicyMappings", Dl); -const Nc = "notBefore", Oc = "notAfter", wIe = [Nc, Oc]; +}, jl.CLASS_NAME = "PolicyMappings", jl); +const Oc = "notBefore", Pc = "notAfter", wIe = [Oc, Pc]; var ya, vIe = (ya = class extends Ce { constructor(t = {}) { - super(), Nc in t && (this.notBefore = t[Nc] ?? ya.defaultValues(Nc)), Oc in t && (this.notAfter = t[Oc] ?? ya.defaultValues(Oc)), t.schema && this.fromSchema(t.schema); + super(), Oc in t && (this.notBefore = t[Oc] ?? ya.defaultValues(Oc)), Pc in t && (this.notAfter = t[Pc] ?? ya.defaultValues(Pc)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Nc: - return /* @__PURE__ */ new Date(); case Oc: return /* @__PURE__ */ new Date(); + case Pc: + return /* @__PURE__ */ new Date(); default: return super.defaultValues(t); } @@ -57646,32 +57692,32 @@ var ya, vIe = (ya = class extends Ce { fromSchema(t) { for (const r of wIe) delete t[r]; const n = Ee(t, t, ya.schema({ names: { - notBefore: Nc, - notAfter: Oc + notBefore: Oc, + notAfter: Pc } })); - if (ke.assertSchema(n, this.className), Nc in n.result) { - const r = new Yt(); + if (ke.assertSchema(n, this.className), Oc in n.result) { + const r = new Xt(); r.fromBuffer(n.result.notBefore.valueBlock.valueHex), this.notBefore = r.toDate(); } - if (Oc in n.result) { - const r = new Yt({ valueHex: n.result.notAfter.valueBlock.valueHex }); + if (Pc in n.result) { + const r = new Xt({ valueHex: n.result.notAfter.valueBlock.valueHex }); r.fromBuffer(n.result.notAfter.valueBlock.valueHex), this.notAfter = r.toDate(); } } toSchema() { const t = []; - return Nc in this && t.push(new Je({ + return Oc in this && t.push(new Je({ idBlock: { tagClass: 3, tagNumber: 0 }, - valueHex: new Yt({ valueDate: this.notBefore }).valueBlock.valueHexView - })), Oc in this && t.push(new Je({ + valueHex: new Xt({ valueDate: this.notBefore }).valueBlock.valueHexView + })), Pc in this && t.push(new Je({ idBlock: { tagClass: 3, tagNumber: 1 }, - valueHex: new Yt({ valueDate: this.notAfter }).valueBlock.valueHexView + valueHex: new Xt({ valueDate: this.notAfter }).valueBlock.valueHexView })), new z({ value: t }); } toJSON() { @@ -57679,27 +57725,27 @@ var ya, vIe = (ya = class extends Ce { return this.notBefore && (t.notBefore = this.notBefore), this.notAfter && (t.notAfter = this.notAfter), t; } }, ya.CLASS_NAME = "PrivateKeyUsagePeriod", ya); -const Dh = "id", Ui = "type", jh = "values", kIe = [Dh, Ui], AIe = [jh]; +const jh = "id", Ui = "type", Fh = "values", kIe = [jh, Ui], AIe = [Fh]; var ba, h4 = (ba = class extends Ce { constructor(t = {}) { - super(), this.id = t[Dh] ?? ba.defaultValues(Dh), Ui in t && (this.type = t[Ui] ?? ba.defaultValues(Ui)), t.schema && this.fromSchema(t.schema); + super(), this.id = t[jh] ?? ba.defaultValues(jh), Ui in t && (this.type = t[Ui] ?? ba.defaultValues(Ui)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Dh: + case jh: return ""; case Ui: - return new fn(); + return new hn(); default: return super.defaultValues(t); } } static compareWithDefault(t, n) { switch (t) { - case Dh: + case jh: return n === ""; case Ui: - return n instanceof fn; + return n instanceof hn; default: return super.defaultValues(t); } @@ -57708,7 +57754,7 @@ var ba, h4 = (ba = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.id || "" }), new Xe({ + value: [new $e({ name: n.id || "" }), new Xe({ name: n.type || "", optional: !0 })] @@ -57717,26 +57763,26 @@ var ba, h4 = (ba = class extends Ce { fromSchema(t) { for (const r of kIe) delete t[r]; const n = Ee(t, t, ba.schema({ names: { - id: Dh, + id: jh, type: Ui } })); ke.assertSchema(n, this.className), this.id = n.result.id.valueBlock.toString(), Ui in n.result && (this.type = n.result.type); } toSchema() { - const t = [new Ve({ value: this.id })]; + const t = [new $e({ value: this.id })]; return Ui in this && t.push(this.type), new z({ value: t }); } toJSON() { const t = { id: this.id }; return this.type && (t.type = this.type.toJSON()), t; } -}, ba.CLASS_NAME = "QCStatement", ba), jl, SIe = (jl = class extends Ce { +}, ba.CLASS_NAME = "QCStatement", ba), Fl, SIe = (Fl = class extends Ce { constructor(t = {}) { - super(), this.values = t[jh] ?? jl.defaultValues(jh), t.schema && this.fromSchema(t.schema); + super(), this.values = t[Fh] ?? Fl.defaultValues(Fh), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case jh: + case Fh: return []; default: return super.defaultValues(t); @@ -57744,7 +57790,7 @@ var ba, h4 = (ba = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case jh: + case Fh: return n.length === 0; default: return super.defaultValues(t); @@ -57754,7 +57800,7 @@ var ba, h4 = (ba = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.values || "", value: h4.schema(n.value || {}) })] @@ -57762,7 +57808,7 @@ var ba, h4 = (ba = class extends Ce { } fromSchema(t) { for (const r of AIe) delete t[r]; - const n = Ee(t, t, jl.schema({ names: { values: jh } })); + const n = Ee(t, t, Fl.schema({ names: { values: Fh } })); ke.assertSchema(n, this.className), this.values = Array.from(n.result.values, (r) => new h4({ schema: r })); } toSchema() { @@ -57771,7 +57817,7 @@ var ba, h4 = (ba = class extends Ce { toJSON() { return { values: Array.from(this.values, (t) => t.toJSON()) }; } -}, jl.CLASS_NAME = "QCStatements", jl), Po, Sg = (Po = class { +}, Fl.CLASS_NAME = "QCStatements", Fl), Ro, xg = (Ro = class { static register(t, n, r) { this.namedCurves[t.toLowerCase()] = this.namedCurves[n] = { name: t, @@ -57782,9 +57828,9 @@ var ba, h4 = (ba = class extends Ce { static find(t) { return this.namedCurves[t.toLowerCase()] || null; } -}, Po.namedCurves = {}, Po.register("P-256", "1.2.840.10045.3.1.7", 32), Po.register("P-384", "1.3.132.0.34", 48), Po.register("P-521", "1.3.132.0.35", 66), Po.register("brainpoolP256r1", "1.3.36.3.3.2.8.1.1.7", 32), Po.register("brainpoolP384r1", "1.3.36.3.3.2.8.1.1.11", 48), Po.register("brainpoolP512r1", "1.3.36.3.3.2.8.1.1.13", 64), Po); +}, Ro.namedCurves = {}, Ro.register("P-256", "1.2.840.10045.3.1.7", 32), Ro.register("P-384", "1.3.132.0.34", 48), Ro.register("P-521", "1.3.132.0.35", 66), Ro.register("brainpoolP256r1", "1.3.36.3.3.2.8.1.1.7", 32), Ro.register("brainpoolP384r1", "1.3.36.3.3.2.8.1.1.11", 48), Ro.register("brainpoolP512r1", "1.3.36.3.3.2.8.1.1.13", 64), Ro); const X1 = "x", Z1 = "y", ek = "namedCurve"; -var as, il = (as = class extends Ce { +var as, al = (as = class extends Ce { constructor(t = {}) { super(), this.x = t[X1] ?? as.defaultValues(X1), this.y = t[Z1] ?? as.defaultValues(Z1), this.namedCurve = t[ek] ?? as.defaultValues(ek), t.json && this.fromJSON(t.json), t.schema && this.fromSchema(t.schema); } @@ -57803,7 +57849,7 @@ var as, il = (as = class extends Ce { switch (t) { case X1: case Z1: - return n instanceof ArrayBuffer && Kt.equal(n, as.defaultValues(t)); + return n instanceof ArrayBuffer && Wt.equal(n, as.defaultValues(t)); case ek: return typeof n == "string" && n === as.defaultValues(t); default: @@ -57814,37 +57860,37 @@ var as, il = (as = class extends Ce { return new rx(); } fromSchema(t) { - const n = ct(t); + const n = lt(t); if (n[0] !== 4) throw new Error("Object's schema was not verified against input data for ECPublicKey"); - const r = Sg.find(this.namedCurve); + const r = xg.find(this.namedCurve); if (!r) throw new Error(`Incorrect curve OID: ${this.namedCurve}`); const o = r.size; if (n.byteLength !== o * 2 + 1) throw new Error("Object's schema was not verified against input data for ECPublicKey"); this.namedCurve = r.name, this.x = n.slice(1, o + 1).buffer, this.y = n.slice(1 + o, o * 2 + 1).buffer; } toSchema() { - return new rx({ data: Kt.concat(new Uint8Array([4]), this.x, this.y) }); + return new rx({ data: Wt.concat(new Uint8Array([4]), this.x, this.y) }); } toJSON() { - const t = Sg.find(this.namedCurve); + const t = xg.find(this.namedCurve); return { crv: t ? t.name : this.namedCurve, - x: St.encode(this.x), - y: St.encode(this.y) + x: xt.encode(this.x), + y: xt.encode(this.y) }; } fromJSON(t) { - Ct.assert("json", t, "crv", "x", "y"); + Ot.assert("json", t, "crv", "x", "y"); let n = 0; - const r = Sg.find(t.crv); + const r = xg.find(t.crv); r && (this.namedCurve = r.id, n = r.size); - const o = St.decode(t.x, { allowPadding: !0 }); + const o = xt.decode(t.x, { allowPadding: !0 }); if (o.byteLength < n) { this.x = new ArrayBuffer(n); const i = new Uint8Array(this.x), a = new Uint8Array(o); i.set(a, 1); } else this.x = o.slice(0, n).buffer; - const s = St.decode(t.y, { allowPadding: !0 }); + const s = xt.decode(t.y, { allowPadding: !0 }); if (s.byteLength < n) { this.y = new ArrayBuffer(n); const i = new Uint8Array(this.y), a = new Uint8Array(s); @@ -57860,9 +57906,9 @@ var wa, p4 = (wa = class extends Ce { static defaultValues(t) { switch (t) { case cb: - return new de(); + return new ue(); case lb: - return new de(); + return new ue(); default: return super.defaultValues(t); } @@ -57871,7 +57917,7 @@ var wa, p4 = (wa = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new de({ name: n.modulus || "" }), new de({ name: n.publicExponent || "" })] + value: [new ue({ name: n.modulus || "" }), new ue({ name: n.publicExponent || "" })] }); } fromSchema(t) { @@ -57887,12 +57933,12 @@ var wa, p4 = (wa = class extends Ce { } toJSON() { return { - n: St.encode(this.modulus.valueBlock.valueHexView), - e: St.encode(this.publicExponent.valueBlock.valueHexView) + n: xt.encode(this.modulus.valueBlock.valueHexView), + e: xt.encode(this.publicExponent.valueBlock.valueHexView) }; } fromJSON(t) { - Ct.assert("json", t, "n", "e"), this.modulus = new de({ valueHex: St.decode(t.n, { allowPadding: !0 }) }), this.publicExponent = new de({ valueHex: St.decode(t.e, { allowPadding: !0 }) }); + Ot.assert("json", t, "n", "e"), this.modulus = new ue({ valueHex: xt.decode(t.n, { allowPadding: !0 }) }), this.publicExponent = new ue({ valueHex: xt.decode(t.e, { allowPadding: !0 }) }); } }, wa.CLASS_NAME = "RSAPublicKey", wa); const ub = "algorithm", db = "subjectPublicKey", EIe = [ub, db]; @@ -57901,9 +57947,9 @@ var va, mi = (va = class extends Ce { if (this._parsedKey === void 0) { switch (this.algorithm.algorithmId) { case "1.2.840.10045.2.1": - if ("algorithmParams" in this.algorithm && this.algorithm.algorithmParams.constructor.blockName() === Ve.blockName()) + if ("algorithmParams" in this.algorithm && this.algorithm.algorithmParams.constructor.blockName() === $e.blockName()) try { - this._parsedKey = new il({ + this._parsedKey = new al({ namedCurve: this.algorithm.algorithmParams.valueBlock.toString(), schema: this.subjectPublicKey.valueBlock.valueHexView }); @@ -57912,7 +57958,7 @@ var va, mi = (va = class extends Ce { break; case "1.2.840.113549.1.1.1": case "1.2.840.113549.1.1.10": { - const t = hn(this.subjectPublicKey.valueBlock.valueHexView); + const t = pn(this.subjectPublicKey.valueBlock.valueHexView); if (t.offset !== -1) try { this._parsedKey = new p4({ schema: t.result }); } catch { @@ -57934,9 +57980,9 @@ var va, mi = (va = class extends Ce { static defaultValues(t) { switch (t) { case ub: - return new fe(); + return new de(); case db: - return new ht(); + return new pt(); default: return super.defaultValues(t); } @@ -57945,7 +57991,7 @@ var va, mi = (va = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [fe.schema(n.algorithm || {}), new ht({ name: n.subjectPublicKey || "" })] + value: [de.schema(n.algorithm || {}), new pt({ name: n.subjectPublicKey || "" })] }); } fromSchema(t) { @@ -57954,7 +58000,7 @@ var va, mi = (va = class extends Ce { algorithm: { names: { blockName: ub } }, subjectPublicKey: db } })); - ke.assertSchema(n, this.className), this.algorithm = new fe({ schema: n.result.algorithm }), this.subjectPublicKey = n.result.subjectPublicKey; + ke.assertSchema(n, this.className), this.algorithm = new de({ schema: n.result.algorithm }), this.subjectPublicKey = n.result.subjectPublicKey; } toSchema() { return new z({ value: [this.algorithm.toSchema(), this.subjectPublicKey] }); @@ -57980,27 +58026,27 @@ var va, mi = (va = class extends Ce { if ("kty" in t) { switch (t.kty.toUpperCase()) { case "EC": - this.parsedKey = new il({ json: t }), this.algorithm = new fe({ + this.parsedKey = new al({ json: t }), this.algorithm = new de({ algorithmId: "1.2.840.10045.2.1", - algorithmParams: new Ve({ value: this.parsedKey.namedCurve }) + algorithmParams: new $e({ value: this.parsedKey.namedCurve }) }); break; case "RSA": - this.parsedKey = new p4({ json: t }), this.algorithm = new fe({ + this.parsedKey = new p4({ json: t }), this.algorithm = new de({ algorithmId: "1.2.840.113549.1.1.1", - algorithmParams: new fn() + algorithmParams: new hn() }); break; default: throw new Error(`Invalid value for "kty" parameter: ${t.kty}`); } - this.subjectPublicKey = new ht({ valueHex: this.parsedKey.toSchema().toBER(!1) }); + this.subjectPublicKey = new pt({ valueHex: this.parsedKey.toSchema().toBER(!1) }); } } async importKey(t, n = Ye(!0)) { try { if (!t) throw new Error("Need to provide publicKey input parameter"); - const r = await n.exportKey("spki", t), o = hn(r); + const r = await n.exportKey("spki", t), o = pn(r); try { this.fromSchema(o.result); } catch { @@ -58012,40 +58058,40 @@ var va, mi = (va = class extends Ce { } } }, va.CLASS_NAME = "PublicKeyInfo", va); -const Fh = "version", Vh = "privateKey", Xo = "namedCurve", Pc = "publicKey", CIe = [ - Fh, +const Vh = "version", $h = "privateKey", Xo = "namedCurve", Rc = "publicKey", CIe = [ Vh, + $h, Xo, - Pc + Rc ]; -var $r, g4 = ($r = class extends Ce { +var Ur, g4 = (Ur = class extends Ce { constructor(t = {}) { - super(), this.version = t[Fh] ?? $r.defaultValues(Fh), this.privateKey = t[Vh] ?? $r.defaultValues(Vh), Xo in t && (this.namedCurve = t[Xo] ?? $r.defaultValues(Xo)), Pc in t && (this.publicKey = t[Pc] ?? $r.defaultValues(Pc)), t.json && this.fromJSON(t.json), t.schema && this.fromSchema(t.schema); + super(), this.version = t[Vh] ?? Ur.defaultValues(Vh), this.privateKey = t[$h] ?? Ur.defaultValues($h), Xo in t && (this.namedCurve = t[Xo] ?? Ur.defaultValues(Xo)), Rc in t && (this.publicKey = t[Rc] ?? Ur.defaultValues(Rc)), t.json && this.fromJSON(t.json), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Fh: - return 1; case Vh: + return 1; + case $h: return new Oe(); case Xo: return ""; - case Pc: - return new il(); + case Rc: + return new al(); default: return super.defaultValues(t); } } static compareWithDefault(t, n) { switch (t) { - case Fh: - return n === $r.defaultValues(t); case Vh: - return n.isEqual($r.defaultValues(t)); + return n === Ur.defaultValues(t); + case $h: + return n.isEqual(Ur.defaultValues(t)); case Xo: return n === ""; - case Pc: - return il.compareWithDefault(Xo, n.namedCurve) && il.compareWithDefault("x", n.x) && il.compareWithDefault("y", n.y); + case Rc: + return al.compareWithDefault(Xo, n.namedCurve) && al.compareWithDefault("x", n.x) && al.compareWithDefault("y", n.y); default: return super.defaultValues(t); } @@ -58055,61 +58101,61 @@ var $r, g4 = ($r = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || "" }), + new ue({ name: n.version || "" }), new Oe({ name: n.privateKey || "" }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new Ve({ name: n.namedCurve || "" })] + value: [new $e({ name: n.namedCurve || "" })] }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 1 }, - value: [new ht({ name: n.publicKey || "" })] + value: [new pt({ name: n.publicKey || "" })] }) ] }); } fromSchema(t) { for (const r of CIe) delete t[r]; - const n = Ee(t, t, $r.schema({ names: { - version: Fh, - privateKey: Vh, + const n = Ee(t, t, Ur.schema({ names: { + version: Vh, + privateKey: $h, namedCurve: Xo, - publicKey: Pc + publicKey: Rc } })); - if (ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.privateKey = n.result.privateKey, Xo in n.result && (this.namedCurve = n.result.namedCurve.valueBlock.toString()), Pc in n.result) { + if (ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.privateKey = n.result.privateKey, Xo in n.result && (this.namedCurve = n.result.namedCurve.valueBlock.toString()), Rc in n.result) { const r = { schema: n.result.publicKey.valueBlock.valueHex }; - Xo in this && (r.namedCurve = this.namedCurve), this.publicKey = new il(r); + Xo in this && (r.namedCurve = this.namedCurve), this.publicKey = new al(r); } } toSchema() { - const t = [new de({ value: this.version }), this.privateKey]; - return this.namedCurve && t.push(new ee({ + const t = [new ue({ value: this.version }), this.privateKey]; + return this.namedCurve && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new Ve({ value: this.namedCurve })] - })), this.publicKey && t.push(new ee({ + value: [new $e({ value: this.namedCurve })] + })), this.publicKey && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, - value: [new ht({ valueHex: this.publicKey.toSchema().toBER(!1) })] + value: [new pt({ valueHex: this.publicKey.toSchema().toBER(!1) })] })), new z({ value: t }); } toJSON() { - if (!this.namedCurve || $r.compareWithDefault(Xo, this.namedCurve)) throw new Error('Not enough information for making JSON: absent "namedCurve" value'); - const t = Sg.find(this.namedCurve), n = { + if (!this.namedCurve || Ur.compareWithDefault(Xo, this.namedCurve)) throw new Error('Not enough information for making JSON: absent "namedCurve" value'); + const t = xg.find(this.namedCurve), n = { crv: t ? t.name : this.namedCurve, - d: St.encode(this.privateKey.valueBlock.valueHexView) + d: xt.encode(this.privateKey.valueBlock.valueHexView) }; if (this.publicKey) { const r = this.publicKey.toJSON(); @@ -58118,18 +58164,18 @@ var $r, g4 = ($r = class extends Ce { return n; } fromJSON(t) { - Ct.assert("json", t, "crv", "d"); + Ot.assert("json", t, "crv", "d"); let n = 0; - const r = Sg.find(t.crv); + const r = xg.find(t.crv); r && (this.namedCurve = r.id, n = r.size); - const o = St.decode(t.d); + const o = xt.decode(t.d); if (o.byteLength < n) { const s = new ArrayBuffer(n), i = new Uint8Array(s), a = new Uint8Array(o); i.set(a, 1), this.privateKey = new Oe({ valueHex: s }); } else this.privateKey = new Oe({ valueHex: o.slice(0, n) }); - t.x && t.y && (this.publicKey = new il({ json: t })); + t.x && t.y && (this.publicKey = new al({ json: t })); } -}, $r.CLASS_NAME = "ECPrivateKey", $r); +}, Ur.CLASS_NAME = "ECPrivateKey", Ur); const fb = "prime", hb = "exponent", pb = "coefficient", IIe = [ fb, hb, @@ -58142,11 +58188,11 @@ var $s, zC = ($s = class extends Ce { static defaultValues(t) { switch (t) { case fb: - return new de(); + return new ue(); case hb: - return new de(); + return new ue(); case pb: - return new de(); + return new ue(); default: return super.defaultValues(t); } @@ -58156,9 +58202,9 @@ var $s, zC = ($s = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.prime || "" }), - new de({ name: n.exponent || "" }), - new de({ name: n.coefficient || "" }) + new ue({ name: n.prime || "" }), + new ue({ name: n.exponent || "" }), + new ue({ name: n.coefficient || "" }) ] }); } @@ -58180,16 +58226,16 @@ var $s, zC = ($s = class extends Ce { } toJSON() { return { - r: St.encode(this.prime.valueBlock.valueHexView), - d: St.encode(this.exponent.valueBlock.valueHexView), - t: St.encode(this.coefficient.valueBlock.valueHexView) + r: xt.encode(this.prime.valueBlock.valueHexView), + d: xt.encode(this.exponent.valueBlock.valueHexView), + t: xt.encode(this.coefficient.valueBlock.valueHexView) }; } fromJSON(t) { - Ct.assert("json", t, "r", "d", "r"), this.prime = new de({ valueHex: St.decode(t.r) }), this.exponent = new de({ valueHex: St.decode(t.d) }), this.coefficient = new de({ valueHex: St.decode(t.t) }); + Ot.assert("json", t, "r", "d", "r"), this.prime = new ue({ valueHex: xt.decode(t.r) }), this.exponent = new ue({ valueHex: xt.decode(t.d) }), this.coefficient = new ue({ valueHex: xt.decode(t.t) }); } }, $s.CLASS_NAME = "OtherPrimeInfo", $s); -const gb = "version", mb = "modulus", yb = "publicExponent", bb = "privateExponent", wb = "prime1", vb = "prime2", kb = "exponent1", Ab = "exponent2", Sb = "coefficient", _u = "otherPrimeInfos", NIe = [ +const gb = "version", mb = "modulus", yb = "publicExponent", bb = "privateExponent", wb = "prime1", vb = "prime2", kb = "exponent1", Ab = "exponent2", Sb = "coefficient", Lu = "otherPrimeInfos", NIe = [ gb, mb, yb, @@ -58199,33 +58245,33 @@ const gb = "version", mb = "modulus", yb = "publicExponent", bb = "privateExpone kb, Ab, Sb, - _u + Lu ]; -var er, m4 = (er = class extends Ce { +var tr, m4 = (tr = class extends Ce { constructor(t = {}) { - super(), this.version = t[gb] ?? er.defaultValues(gb), this.modulus = t[mb] ?? er.defaultValues(mb), this.publicExponent = t[yb] ?? er.defaultValues(yb), this.privateExponent = t[bb] ?? er.defaultValues(bb), this.prime1 = t[wb] ?? er.defaultValues(wb), this.prime2 = t[vb] ?? er.defaultValues(vb), this.exponent1 = t[kb] ?? er.defaultValues(kb), this.exponent2 = t[Ab] ?? er.defaultValues(Ab), this.coefficient = t[Sb] ?? er.defaultValues(Sb), _u in t && (this.otherPrimeInfos = t[_u] ?? er.defaultValues(_u)), t.json && this.fromJSON(t.json), t.schema && this.fromSchema(t.schema); + super(), this.version = t[gb] ?? tr.defaultValues(gb), this.modulus = t[mb] ?? tr.defaultValues(mb), this.publicExponent = t[yb] ?? tr.defaultValues(yb), this.privateExponent = t[bb] ?? tr.defaultValues(bb), this.prime1 = t[wb] ?? tr.defaultValues(wb), this.prime2 = t[vb] ?? tr.defaultValues(vb), this.exponent1 = t[kb] ?? tr.defaultValues(kb), this.exponent2 = t[Ab] ?? tr.defaultValues(Ab), this.coefficient = t[Sb] ?? tr.defaultValues(Sb), Lu in t && (this.otherPrimeInfos = t[Lu] ?? tr.defaultValues(Lu)), t.json && this.fromJSON(t.json), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case gb: return 0; case mb: - return new de(); + return new ue(); case yb: - return new de(); + return new ue(); case bb: - return new de(); + return new ue(); case wb: - return new de(); + return new ue(); case vb: - return new de(); + return new ue(); case kb: - return new de(); + return new ue(); case Ab: - return new de(); + return new ue(); case Sb: - return new de(); - case _u: + return new ue(); + case Lu: return []; default: return super.defaultValues(t); @@ -58236,18 +58282,18 @@ var er, m4 = (er = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || "" }), - new de({ name: n.modulus || "" }), - new de({ name: n.publicExponent || "" }), - new de({ name: n.privateExponent || "" }), - new de({ name: n.prime1 || "" }), - new de({ name: n.prime2 || "" }), - new de({ name: n.exponent1 || "" }), - new de({ name: n.exponent2 || "" }), - new de({ name: n.coefficient || "" }), + new ue({ name: n.version || "" }), + new ue({ name: n.modulus || "" }), + new ue({ name: n.publicExponent || "" }), + new ue({ name: n.privateExponent || "" }), + new ue({ name: n.prime1 || "" }), + new ue({ name: n.prime2 || "" }), + new ue({ name: n.exponent1 || "" }), + new ue({ name: n.exponent2 || "" }), + new ue({ name: n.coefficient || "" }), new z({ optional: !0, - value: [new ot({ + value: [new st({ name: n.otherPrimeInfosName || "", value: zC.schema(n.otherPrimeInfo || {}) })] @@ -58257,7 +58303,7 @@ var er, m4 = (er = class extends Ce { } fromSchema(t) { for (const r of NIe) delete t[r]; - const n = Ee(t, t, er.schema({ names: { + const n = Ee(t, t, tr.schema({ names: { version: gb, modulus: mb, publicExponent: yb, @@ -58267,50 +58313,50 @@ var er, m4 = (er = class extends Ce { exponent1: kb, exponent2: Ab, coefficient: Sb, - otherPrimeInfo: { names: { blockName: _u } } + otherPrimeInfo: { names: { blockName: Lu } } } })); - ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.modulus = n.result.modulus.convertFromDER(256), this.publicExponent = n.result.publicExponent, this.privateExponent = n.result.privateExponent.convertFromDER(256), this.prime1 = n.result.prime1.convertFromDER(128), this.prime2 = n.result.prime2.convertFromDER(128), this.exponent1 = n.result.exponent1.convertFromDER(128), this.exponent2 = n.result.exponent2.convertFromDER(128), this.coefficient = n.result.coefficient.convertFromDER(128), _u in n.result && (this.otherPrimeInfos = Array.from(n.result.otherPrimeInfos, (r) => new zC({ schema: r }))); + ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.modulus = n.result.modulus.convertFromDER(256), this.publicExponent = n.result.publicExponent, this.privateExponent = n.result.privateExponent.convertFromDER(256), this.prime1 = n.result.prime1.convertFromDER(128), this.prime2 = n.result.prime2.convertFromDER(128), this.exponent1 = n.result.exponent1.convertFromDER(128), this.exponent2 = n.result.exponent2.convertFromDER(128), this.coefficient = n.result.coefficient.convertFromDER(128), Lu in n.result && (this.otherPrimeInfos = Array.from(n.result.otherPrimeInfos, (r) => new zC({ schema: r }))); } toSchema() { const t = []; - return t.push(new de({ value: this.version })), t.push(this.modulus.convertToDER()), t.push(this.publicExponent), t.push(this.privateExponent.convertToDER()), t.push(this.prime1.convertToDER()), t.push(this.prime2.convertToDER()), t.push(this.exponent1.convertToDER()), t.push(this.exponent2.convertToDER()), t.push(this.coefficient.convertToDER()), this.otherPrimeInfos && t.push(new z({ value: Array.from(this.otherPrimeInfos, (n) => n.toSchema()) })), new z({ value: t }); + return t.push(new ue({ value: this.version })), t.push(this.modulus.convertToDER()), t.push(this.publicExponent), t.push(this.privateExponent.convertToDER()), t.push(this.prime1.convertToDER()), t.push(this.prime2.convertToDER()), t.push(this.exponent1.convertToDER()), t.push(this.exponent2.convertToDER()), t.push(this.coefficient.convertToDER()), this.otherPrimeInfos && t.push(new z({ value: Array.from(this.otherPrimeInfos, (n) => n.toSchema()) })), new z({ value: t }); } toJSON() { const t = { - n: St.encode(this.modulus.valueBlock.valueHexView), - e: St.encode(this.publicExponent.valueBlock.valueHexView), - d: St.encode(this.privateExponent.valueBlock.valueHexView), - p: St.encode(this.prime1.valueBlock.valueHexView), - q: St.encode(this.prime2.valueBlock.valueHexView), - dp: St.encode(this.exponent1.valueBlock.valueHexView), - dq: St.encode(this.exponent2.valueBlock.valueHexView), - qi: St.encode(this.coefficient.valueBlock.valueHexView) + n: xt.encode(this.modulus.valueBlock.valueHexView), + e: xt.encode(this.publicExponent.valueBlock.valueHexView), + d: xt.encode(this.privateExponent.valueBlock.valueHexView), + p: xt.encode(this.prime1.valueBlock.valueHexView), + q: xt.encode(this.prime2.valueBlock.valueHexView), + dp: xt.encode(this.exponent1.valueBlock.valueHexView), + dq: xt.encode(this.exponent2.valueBlock.valueHexView), + qi: xt.encode(this.coefficient.valueBlock.valueHexView) }; return this.otherPrimeInfos && (t.oth = Array.from(this.otherPrimeInfos, (n) => n.toJSON())), t; } fromJSON(t) { - Ct.assert("json", t, "n", "e", "d", "p", "q", "dp", "dq", "qi"), this.modulus = new de({ valueHex: St.decode(t.n) }), this.publicExponent = new de({ valueHex: St.decode(t.e) }), this.privateExponent = new de({ valueHex: St.decode(t.d) }), this.prime1 = new de({ valueHex: St.decode(t.p) }), this.prime2 = new de({ valueHex: St.decode(t.q) }), this.exponent1 = new de({ valueHex: St.decode(t.dp) }), this.exponent2 = new de({ valueHex: St.decode(t.dq) }), this.coefficient = new de({ valueHex: St.decode(t.qi) }), t.oth && (this.otherPrimeInfos = Array.from(t.oth, (n) => new zC({ json: n }))); + Ot.assert("json", t, "n", "e", "d", "p", "q", "dp", "dq", "qi"), this.modulus = new ue({ valueHex: xt.decode(t.n) }), this.publicExponent = new ue({ valueHex: xt.decode(t.e) }), this.privateExponent = new ue({ valueHex: xt.decode(t.d) }), this.prime1 = new ue({ valueHex: xt.decode(t.p) }), this.prime2 = new ue({ valueHex: xt.decode(t.q) }), this.exponent1 = new ue({ valueHex: xt.decode(t.dp) }), this.exponent2 = new ue({ valueHex: xt.decode(t.dq) }), this.coefficient = new ue({ valueHex: xt.decode(t.qi) }), t.oth && (this.otherPrimeInfos = Array.from(t.oth, (n) => new zC({ json: n }))); } -}, er.CLASS_NAME = "RSAPrivateKey", er); -const xb = "version", Eb = "privateKeyAlgorithm", Cb = "privateKey", Lu = "attributes", tk = "parsedKey", OIe = [ +}, tr.CLASS_NAME = "RSAPrivateKey", tr); +const xb = "version", Eb = "privateKeyAlgorithm", Cb = "privateKey", Du = "attributes", tk = "parsedKey", OIe = [ xb, Eb, Cb, - Lu + Du ]; -var Ro, ix = (Ro = class extends Ce { +var To, ix = (To = class extends Ce { constructor(t = {}) { - super(), this.version = t[xb] ?? Ro.defaultValues(xb), this.privateKeyAlgorithm = t[Eb] ?? Ro.defaultValues(Eb), this.privateKey = t[Cb] ?? Ro.defaultValues(Cb), Lu in t && (this.attributes = t[Lu] ?? Ro.defaultValues(Lu)), tk in t && (this.parsedKey = t[tk] ?? Ro.defaultValues(tk)), t.json && this.fromJSON(t.json), t.schema && this.fromSchema(t.schema); + super(), this.version = t[xb] ?? To.defaultValues(xb), this.privateKeyAlgorithm = t[Eb] ?? To.defaultValues(Eb), this.privateKey = t[Cb] ?? To.defaultValues(Cb), Du in t && (this.attributes = t[Du] ?? To.defaultValues(Du)), tk in t && (this.parsedKey = t[tk] ?? To.defaultValues(tk)), t.json && this.fromJSON(t.json), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case xb: return 0; case Eb: - return new fe(); + return new de(); case Cb: return new Oe(); - case Lu: + case Du: return []; case tk: return {}; @@ -58323,16 +58369,16 @@ var Ro, ix = (Ro = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || "" }), - fe.schema(n.privateKeyAlgorithm || {}), + new ue({ name: n.version || "" }), + de.schema(n.privateKeyAlgorithm || {}), new Oe({ name: n.privateKey || "" }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new ot({ + value: [new st({ name: n.attributes || "", value: En.schema() })] @@ -58342,22 +58388,22 @@ var Ro, ix = (Ro = class extends Ce { } fromSchema(t) { for (const r of OIe) delete t[r]; - const n = Ee(t, t, Ro.schema({ names: { + const n = Ee(t, t, To.schema({ names: { version: xb, privateKeyAlgorithm: { names: { blockName: Eb } }, privateKey: Cb, - attributes: Lu + attributes: Du } })); - switch (ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.privateKeyAlgorithm = new fe({ schema: n.result.privateKeyAlgorithm }), this.privateKey = n.result.privateKey, Lu in n.result && (this.attributes = Array.from(n.result.attributes, (r) => new En({ schema: r }))), this.privateKeyAlgorithm.algorithmId) { + switch (ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.privateKeyAlgorithm = new de({ schema: n.result.privateKeyAlgorithm }), this.privateKey = n.result.privateKey, Du in n.result && (this.attributes = Array.from(n.result.attributes, (r) => new En({ schema: r }))), this.privateKeyAlgorithm.algorithmId) { case "1.2.840.113549.1.1.1": { - const r = hn(this.privateKey.valueBlock.valueHexView); + const r = pn(this.privateKey.valueBlock.valueHexView); r.offset !== -1 && (this.parsedKey = new m4({ schema: r.result })); } break; case "1.2.840.10045.2.1": - if ("algorithmParams" in this.privateKeyAlgorithm && this.privateKeyAlgorithm.algorithmParams instanceof Ve) { - const r = hn(this.privateKey.valueBlock.valueHexView); + if ("algorithmParams" in this.privateKeyAlgorithm && this.privateKeyAlgorithm.algorithmParams instanceof $e) { + const r = pn(this.privateKey.valueBlock.valueHexView); r.offset !== -1 && (this.parsedKey = new g4({ namedCurve: this.privateKeyAlgorithm.algorithmParams.valueBlock.toString(), schema: r.result @@ -58367,11 +58413,11 @@ var Ro, ix = (Ro = class extends Ce { } toSchema() { const t = [ - new de({ value: this.version }), + new ue({ value: this.version }), this.privateKeyAlgorithm.toSchema(), this.privateKey ]; - return this.attributes && t.push(new ee({ + return this.attributes && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -58404,15 +58450,15 @@ var Ro, ix = (Ro = class extends Ce { if ("kty" in t) { switch (t.kty.toUpperCase()) { case "EC": - this.parsedKey = new g4({ json: t }), this.privateKeyAlgorithm = new fe({ + this.parsedKey = new g4({ json: t }), this.privateKeyAlgorithm = new de({ algorithmId: "1.2.840.10045.2.1", - algorithmParams: new Ve({ value: this.parsedKey.namedCurve }) + algorithmParams: new $e({ value: this.parsedKey.namedCurve }) }); break; case "RSA": - this.parsedKey = new m4({ json: t }), this.privateKeyAlgorithm = new fe({ + this.parsedKey = new m4({ json: t }), this.privateKeyAlgorithm = new de({ algorithmId: "1.2.840.113549.1.1.1", - algorithmParams: new fn() + algorithmParams: new hn() }); break; default: @@ -58421,15 +58467,15 @@ var Ro, ix = (Ro = class extends Ce { this.privateKey = new Oe({ valueHex: this.parsedKey.toSchema().toBER(!1) }); } } -}, Ro.CLASS_NAME = "PrivateKeyInfo", Ro); -const $h = "contentType", Uh = "contentEncryptionAlgorithm", Du = "encryptedContent", PIe = [ - $h, +}, To.CLASS_NAME = "PrivateKeyInfo", To); +const Uh = "contentType", Kh = "contentEncryptionAlgorithm", ju = "encryptedContent", PIe = [ Uh, - Du + Kh, + ju ], y4 = 1024; var Us, Ir = (Us = class extends Ce { constructor(t = {}) { - if (super(), this.contentType = t[$h] ?? Us.defaultValues($h), this.contentEncryptionAlgorithm = t[Uh] ?? Us.defaultValues(Uh), Du in t && t.encryptedContent && (this.encryptedContent = t.encryptedContent, this.encryptedContent.idBlock.tagClass === 1 && this.encryptedContent.idBlock.tagNumber === 4 && this.encryptedContent.idBlock.isConstructed === !1 && !t.disableSplit)) { + if (super(), this.contentType = t[Uh] ?? Us.defaultValues(Uh), this.contentEncryptionAlgorithm = t[Kh] ?? Us.defaultValues(Kh), ju in t && t.encryptedContent && (this.encryptedContent = t.encryptedContent, this.encryptedContent.idBlock.tagClass === 1 && this.encryptedContent.idBlock.tagNumber === 4 && this.encryptedContent.idBlock.isConstructed === !1 && !t.disableSplit)) { const n = new Oe({ idBlock: { isConstructed: !0 }, isConstructed: !0 @@ -58448,11 +58494,11 @@ var Us, Ir = (Us = class extends Ce { } static defaultValues(t) { switch (t) { - case $h: - return ""; case Uh: - return new fe(); - case Du: + return ""; + case Kh: + return new de(); + case ju: return new Oe(); default: return super.defaultValues(t); @@ -58460,12 +58506,12 @@ var Us, Ir = (Us = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case $h: - return n === ""; case Uh: + return n === ""; + case Kh: return n.algorithmId === "" && !("algorithmParams" in n); - case Du: - return n.isEqual(Us.defaultValues(Du)); + case ju: + return n.isEqual(Us.defaultValues(ju)); default: return super.defaultValues(t); } @@ -58475,15 +58521,15 @@ var Us, Ir = (Us = class extends Ce { return new z({ name: n.blockName || "", value: [ - new Ve({ name: n.contentType || "" }), - fe.schema(n.contentEncryptionAlgorithm || {}), - new Xt({ value: [new ee({ + new $e({ name: n.contentType || "" }), + de.schema(n.contentEncryptionAlgorithm || {}), + new en({ value: [new ne({ name: n.encryptedContent || "", idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new ot({ value: new Oe() })] + value: [new st({ value: new Oe() })] }), new Je({ name: n.encryptedContent || "", idBlock: { @@ -58497,15 +58543,15 @@ var Us, Ir = (Us = class extends Ce { fromSchema(t) { for (const r of PIe) delete t[r]; const n = Ee(t, t, Us.schema({ names: { - contentType: $h, - contentEncryptionAlgorithm: { names: { blockName: Uh } }, - encryptedContent: Du + contentType: Uh, + contentEncryptionAlgorithm: { names: { blockName: Kh } }, + encryptedContent: ju } })); - ke.assertSchema(n, this.className), this.contentType = n.result.contentType.valueBlock.toString(), this.contentEncryptionAlgorithm = new fe({ schema: n.result.contentEncryptionAlgorithm }), Du in n.result && (this.encryptedContent = n.result.encryptedContent, this.encryptedContent.idBlock.tagClass = 1, this.encryptedContent.idBlock.tagNumber = 4); + ke.assertSchema(n, this.className), this.contentType = n.result.contentType.valueBlock.toString(), this.contentEncryptionAlgorithm = new de({ schema: n.result.contentEncryptionAlgorithm }), ju in n.result && (this.encryptedContent = n.result.encryptedContent, this.encryptedContent.idBlock.tagClass = 1, this.encryptedContent.idBlock.tagNumber = 4); } toSchema() { const t = { isIndefiniteForm: !1 }, n = []; - if (n.push(new Ve({ value: this.contentType })), n.push(this.contentEncryptionAlgorithm.toSchema()), this.encryptedContent) { + if (n.push(new $e({ value: this.contentType })), n.push(this.contentEncryptionAlgorithm.toSchema()), this.encryptedContent) { t.isIndefiniteForm = this.encryptedContent.idBlock.isConstructed; const r = this.encryptedContent; r.idBlock.tagClass = 3, r.idBlock.tagNumber = 0, r.lenBlock.isIndefiniteForm = this.encryptedContent.idBlock.isConstructed, n.push(r); @@ -58527,34 +58573,34 @@ var Us, Ir = (Us = class extends Ce { return Oe.prototype.getValue.call(this.encryptedContent); } }, Us.CLASS_NAME = "EncryptedContentInfo", Us); -const Rc = "hashAlgorithm", Tc = "maskGenAlgorithm", Mc = "saltLength", Bc = "trailerField", RIe = [ - Rc, +const Tc = "hashAlgorithm", Mc = "maskGenAlgorithm", Bc = "saltLength", _c = "trailerField", RIe = [ Tc, Mc, - Bc + Bc, + _c ]; var Un, WC = (Un = class extends Ce { constructor(t = {}) { - super(), this.hashAlgorithm = t[Rc] ?? Un.defaultValues(Rc), this.maskGenAlgorithm = t[Tc] ?? Un.defaultValues(Tc), this.saltLength = t[Mc] ?? Un.defaultValues(Mc), this.trailerField = t[Bc] ?? Un.defaultValues(Bc), t.schema && this.fromSchema(t.schema); + super(), this.hashAlgorithm = t[Tc] ?? Un.defaultValues(Tc), this.maskGenAlgorithm = t[Mc] ?? Un.defaultValues(Mc), this.saltLength = t[Bc] ?? Un.defaultValues(Bc), this.trailerField = t[_c] ?? Un.defaultValues(_c), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Rc: - return new fe({ + case Tc: + return new de({ algorithmId: "1.3.14.3.2.26", - algorithmParams: new fn() + algorithmParams: new hn() }); - case Tc: - return new fe({ + case Mc: + return new de({ algorithmId: "1.2.840.113549.1.1.8", - algorithmParams: new fe({ + algorithmParams: new de({ algorithmId: "1.3.14.3.2.26", - algorithmParams: new fn() + algorithmParams: new hn() }).toSchema() }); - case Mc: - return 20; case Bc: + return 20; + case _c: return 1; default: return super.defaultValues(t); @@ -58565,37 +58611,37 @@ var Un, WC = (Un = class extends Ce { return new z({ name: n.blockName || "", value: [ - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, optional: !0, - value: [fe.schema(n.hashAlgorithm || {})] + value: [de.schema(n.hashAlgorithm || {})] }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, optional: !0, - value: [fe.schema(n.maskGenAlgorithm || {})] + value: [de.schema(n.maskGenAlgorithm || {})] }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 2 }, optional: !0, - value: [new de({ name: n.saltLength || "" })] + value: [new ue({ name: n.saltLength || "" })] }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 3 }, optional: !0, - value: [new de({ name: n.trailerField || "" })] + value: [new ue({ name: n.trailerField || "" })] }) ] }); @@ -58603,68 +58649,68 @@ var Un, WC = (Un = class extends Ce { fromSchema(t) { for (const r of RIe) delete t[r]; const n = Ee(t, t, Un.schema({ names: { - hashAlgorithm: { names: { blockName: Rc } }, - maskGenAlgorithm: { names: { blockName: Tc } }, - saltLength: Mc, - trailerField: Bc + hashAlgorithm: { names: { blockName: Tc } }, + maskGenAlgorithm: { names: { blockName: Mc } }, + saltLength: Bc, + trailerField: _c } })); - ke.assertSchema(n, this.className), Rc in n.result && (this.hashAlgorithm = new fe({ schema: n.result.hashAlgorithm })), Tc in n.result && (this.maskGenAlgorithm = new fe({ schema: n.result.maskGenAlgorithm })), Mc in n.result && (this.saltLength = n.result.saltLength.valueBlock.valueDec), Bc in n.result && (this.trailerField = n.result.trailerField.valueBlock.valueDec); + ke.assertSchema(n, this.className), Tc in n.result && (this.hashAlgorithm = new de({ schema: n.result.hashAlgorithm })), Mc in n.result && (this.maskGenAlgorithm = new de({ schema: n.result.maskGenAlgorithm })), Bc in n.result && (this.saltLength = n.result.saltLength.valueBlock.valueDec), _c in n.result && (this.trailerField = n.result.trailerField.valueBlock.valueDec); } toSchema() { const t = []; - return this.hashAlgorithm.isEqual(Un.defaultValues(Rc)) || t.push(new ee({ + return this.hashAlgorithm.isEqual(Un.defaultValues(Tc)) || t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: [this.hashAlgorithm.toSchema()] - })), this.maskGenAlgorithm.isEqual(Un.defaultValues(Tc)) || t.push(new ee({ + })), this.maskGenAlgorithm.isEqual(Un.defaultValues(Mc)) || t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, value: [this.maskGenAlgorithm.toSchema()] - })), this.saltLength !== Un.defaultValues(Mc) && t.push(new ee({ + })), this.saltLength !== Un.defaultValues(Bc) && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 2 }, - value: [new de({ value: this.saltLength })] - })), this.trailerField !== Un.defaultValues(Bc) && t.push(new ee({ + value: [new ue({ value: this.saltLength })] + })), this.trailerField !== Un.defaultValues(_c) && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 3 }, - value: [new de({ value: this.trailerField })] + value: [new ue({ value: this.trailerField })] })), new z({ value: t }); } toJSON() { const t = {}; - return this.hashAlgorithm.isEqual(Un.defaultValues(Rc)) || (t.hashAlgorithm = this.hashAlgorithm.toJSON()), this.maskGenAlgorithm.isEqual(Un.defaultValues(Tc)) || (t.maskGenAlgorithm = this.maskGenAlgorithm.toJSON()), this.saltLength !== Un.defaultValues(Mc) && (t.saltLength = this.saltLength), this.trailerField !== Un.defaultValues(Bc) && (t.trailerField = this.trailerField), t; + return this.hashAlgorithm.isEqual(Un.defaultValues(Tc)) || (t.hashAlgorithm = this.hashAlgorithm.toJSON()), this.maskGenAlgorithm.isEqual(Un.defaultValues(Mc)) || (t.maskGenAlgorithm = this.maskGenAlgorithm.toJSON()), this.saltLength !== Un.defaultValues(Bc) && (t.saltLength = this.saltLength), this.trailerField !== Un.defaultValues(_c) && (t.trailerField = this.trailerField), t; } }, Un.CLASS_NAME = "RSASSAPSSParams", Un); -const Kh = "salt", Ib = "iterationCount", Zo = "keyLength", Ki = "prf", TIe = [ - Kh, +const Hh = "salt", Ib = "iterationCount", Zo = "keyLength", Ki = "prf", TIe = [ + Hh, Ib, Zo, Ki ]; var Ar, a0 = (Ar = class extends Ce { constructor(t = {}) { - super(), this.salt = t[Kh] ?? Ar.defaultValues(Kh), this.iterationCount = t[Ib] ?? Ar.defaultValues(Ib), Zo in t && (this.keyLength = t[Zo] ?? Ar.defaultValues(Zo)), Ki in t && (this.prf = t[Ki] ?? Ar.defaultValues(Ki)), t.schema && this.fromSchema(t.schema); + super(), this.salt = t[Hh] ?? Ar.defaultValues(Hh), this.iterationCount = t[Ib] ?? Ar.defaultValues(Ib), Zo in t && (this.keyLength = t[Zo] ?? Ar.defaultValues(Zo)), Ki in t && (this.prf = t[Ki] ?? Ar.defaultValues(Ki)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Kh: + case Hh: return {}; case Ib: return -1; case Zo: return 0; case Ki: - return new fe({ + return new de({ algorithmId: "1.3.14.3.2.26", - algorithmParams: new fn() + algorithmParams: new hn() }); default: return super.defaultValues(t); @@ -58675,21 +58721,21 @@ var Ar, a0 = (Ar = class extends Ce { return new z({ name: n.blockName || "", value: [ - new Xt({ value: [new Oe({ name: n.saltPrimitive || "" }), fe.schema(n.saltConstructed || {})] }), - new de({ name: n.iterationCount || "" }), - new de({ + new en({ value: [new Oe({ name: n.saltPrimitive || "" }), de.schema(n.saltConstructed || {})] }), + new ue({ name: n.iterationCount || "" }), + new ue({ name: n.keyLength || "", optional: !0 }), - fe.schema(n.prf || { names: { optional: !0 } }) + de.schema(n.prf || { names: { optional: !0 } }) ] }); } fromSchema(t) { for (const r of TIe) delete t[r]; const n = Ee(t, t, Ar.schema({ names: { - saltPrimitive: Kh, - saltConstructed: { names: { blockName: Kh } }, + saltPrimitive: Hh, + saltConstructed: { names: { blockName: Hh } }, iterationCount: Ib, keyLength: Zo, prf: { names: { @@ -58697,11 +58743,11 @@ var Ar, a0 = (Ar = class extends Ce { optional: !0 } } } })); - ke.assertSchema(n, this.className), this.salt = n.result.salt, this.iterationCount = n.result.iterationCount.valueBlock.valueDec, Zo in n.result && (this.keyLength = n.result.keyLength.valueBlock.valueDec), Ki in n.result && (this.prf = new fe({ schema: n.result.prf })); + ke.assertSchema(n, this.className), this.salt = n.result.salt, this.iterationCount = n.result.iterationCount.valueBlock.valueDec, Zo in n.result && (this.keyLength = n.result.keyLength.valueBlock.valueDec), Ki in n.result && (this.prf = new de({ schema: n.result.prf })); } toSchema() { const t = []; - return t.push(this.salt), t.push(new de({ value: this.iterationCount })), Zo in this && Ar.defaultValues(Zo) !== this.keyLength && t.push(new de({ value: this.keyLength })), this.prf && Ar.defaultValues(Ki).isEqual(this.prf) === !1 && t.push(this.prf.toSchema()), new z({ value: t }); + return t.push(this.salt), t.push(new ue({ value: this.iterationCount })), Zo in this && Ar.defaultValues(Zo) !== this.keyLength && t.push(new ue({ value: this.keyLength })), this.prf && Ar.defaultValues(Ki).isEqual(this.prf) === !1 && t.push(this.prf.toSchema()), new z({ value: t }); } toJSON() { const t = { @@ -58719,9 +58765,9 @@ var ka, b4 = (ka = class extends Ce { static defaultValues(t) { switch (t) { case Nb: - return new fe(); + return new de(); case Ob: - return new fe(); + return new de(); default: return super.defaultValues(t); } @@ -58730,7 +58776,7 @@ var ka, b4 = (ka = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [fe.schema(n.keyDerivationFunc || {}), fe.schema(n.encryptionScheme || {})] + value: [de.schema(n.keyDerivationFunc || {}), de.schema(n.encryptionScheme || {})] }); } fromSchema(t) { @@ -58739,7 +58785,7 @@ var ka, b4 = (ka = class extends Ce { keyDerivationFunc: { names: { blockName: Nb } }, encryptionScheme: { names: { blockName: Ob } } } })); - ke.assertSchema(n, this.className), this.keyDerivationFunc = new fe({ schema: n.result.keyDerivationFunc }), this.encryptionScheme = new fe({ schema: n.result.encryptionScheme }); + ke.assertSchema(n, this.className), this.keyDerivationFunc = new de({ schema: n.result.keyDerivationFunc }), this.encryptionScheme = new de({ schema: n.result.encryptionScheme }); } toSchema() { return new z({ value: [this.keyDerivationFunc.toSchema(), this.encryptionScheme.toSchema()] }); @@ -58816,16 +58862,16 @@ async function w4(e, t, n, r, o) { const c = new Uint8Array(n); let l = new TextDecoder().decode(n); new TextEncoder().encode(l).some((C, k) => C !== c[k]) && (l = String.fromCharCode(...c)); - const u = new Uint8Array(l.length * 2 + 2), d = new DataView(u.buffer); - for (let C = 0; C < l.length; C++) d.setUint16(C * 2, l.charCodeAt(C), !1); - d.setUint16(l.length * 2, 0, !1); - const f = new Uint8Array(i).fill(3), h = new Uint8Array(r), g = new Uint8Array(i * Math.ceil(h.length / i)).map((C, k) => h[k % h.length]), p = new Uint8Array(i * Math.ceil(u.length / i)).map((C, k) => u[k % u.length]); + const u = new Uint8Array(l.length * 2 + 2), f = new DataView(u.buffer); + for (let C = 0; C < l.length; C++) f.setUint16(C * 2, l.charCodeAt(C), !1); + f.setUint16(l.length * 2, 0, !1); + const d = new Uint8Array(i).fill(3), h = new Uint8Array(r), g = new Uint8Array(i * Math.ceil(h.length / i)).map((C, k) => h[k % h.length]), p = new Uint8Array(i * Math.ceil(u.length / i)).map((C, k) => u[k % u.length]); let m = new Uint8Array(g.length + p.length); m.set(g), m.set(p, g.length); const v = Math.ceil((t >> 3) / s), S = []; for (let C = 0; C < v; C++) { - let k = new Uint8Array(f.length + m.length); - k.set(f), k.set(m, f.length); + let k = new Uint8Array(d.length + m.length); + k.set(d), k.set(m, d.length); for (let x = 0; x < o; x++) k = a(k); const N = new Uint8Array(i).map((x, A) => k[A % k.length]), w = Math.ceil(h.length / i) + Math.ceil(u.length / i), y = []; for (let x = 0; x < w; x++) { @@ -58855,19 +58901,19 @@ var q0 = class extends BIe { return this.subtle.importKey("raw", t, n, r, o); case "spki": { - const a = hn(br(t)); + const a = pn(br(t)); ke.assert(a, "keyData"); const c = new mi(); try { c.fromSchema(a.result); } catch { - throw new Ut("Incorrect keyData"); + throw new zt("Incorrect keyData"); } switch (i.name.toUpperCase()) { case "RSA-PSS": { if (o = ["verify"], s.kty = "RSA", s.ext = r, s.key_ops = o, !["1.2.840.113549.1.1.1", "1.2.840.113549.1.1.10"].includes(c.algorithm.algorithmId)) throw new Error(`Incorrect public key algorithm: ${c.algorithm.algorithmId}`); - if (!i.hash) throw new Ct("hash", "algorithm.hash", "Incorrect hash algorithm: Hash algorithm is missed"); + if (!i.hash) throw new Ot("hash", "algorithm.hash", "Incorrect hash algorithm: Hash algorithm is missed"); switch (i.hash.name.toUpperCase()) { case "SHA-1": s.alg = "PS1"; @@ -58891,7 +58937,7 @@ var q0 = class extends BIe { case "RSASSA-PKCS1-V1_5": { if (o = ["verify"], s.kty = "RSA", s.ext = r, s.key_ops = o, c.algorithm.algorithmId !== "1.2.840.113549.1.1.1") throw new Error(`Incorrect public key algorithm: ${c.algorithm.algorithmId}`); - if (!i.hash) throw new Ct("hash", "algorithm.hash", "Incorrect hash algorithm: Hash algorithm is missed"); + if (!i.hash) throw new Ot("hash", "algorithm.hash", "Incorrect hash algorithm: Hash algorithm is missed"); switch (i.hash.name.toUpperCase()) { case "SHA-1": s.alg = "RS1"; @@ -58929,7 +58975,7 @@ var q0 = class extends BIe { { if (s.kty = "RSA", s.ext = r, s.key_ops = o, this.name.toLowerCase() === "safari") s.alg = "RSA-OAEP"; else { - if (!i.hash) throw new Ct("hash", "algorithm.hash", "Incorrect hash algorithm: Hash algorithm is missed"); + if (!i.hash) throw new Ot("hash", "algorithm.hash", "Incorrect hash algorithm: Hash algorithm is missed"); switch (i.hash.name.toUpperCase()) { case "SHA-1": s.alg = "RSA-OAEP"; @@ -58965,7 +59011,7 @@ var q0 = class extends BIe { break; case "pkcs8": { - const a = new ix(), c = hn(br(t)); + const a = new ix(), c = pn(br(t)); ke.assert(c, "keyData"); try { a.fromSchema(c.result); @@ -59883,7 +59929,7 @@ var q0 = class extends BIe { return t; } async encryptEncryptedContentInfo(e) { - Ct.assert(e, "password", "contentEncryptionAlgorithm", "hmacHashAlgorithm", "iterationCount", "contentToEncrypt", "contentToEncrypt", "contentType"); + Ot.assert(e, "password", "contentEncryptionAlgorithm", "hmacHashAlgorithm", "iterationCount", "contentToEncrypt", "contentToEncrypt", "contentType"); const t = this.getOIDByAlgorithm(e.contentEncryptionAlgorithm, !0, "contentEncryptionAlgorithm"), n = this.getOIDByAlgorithm({ name: "PBKDF2" }, !0, "PBKDF2"), r = this.getOIDByAlgorithm({ name: "HMAC", hash: { name: e.hmacHashAlgorithm } @@ -59894,31 +59940,31 @@ var q0 = class extends BIe { const c = new Uint8Array(e.contentToEncrypt), l = new a0({ salt: new Oe({ valueHex: i }), iterationCount: e.iterationCount, - prf: new fe({ + prf: new de({ algorithmId: r, - algorithmParams: new fn() + algorithmParams: new hn() }) - }), u = new Uint8Array(e.password), d = await this.importKey("raw", u, "PBKDF2", !1, ["deriveKey"]), f = await this.deriveKey({ + }), u = new Uint8Array(e.password), f = await this.importKey("raw", u, "PBKDF2", !1, ["deriveKey"]), d = await this.deriveKey({ name: "PBKDF2", hash: { name: e.hmacHashAlgorithm }, salt: a, iterations: e.iterationCount - }, d, e.contentEncryptionAlgorithm, !1, ["encrypt"]), h = await this.encrypt({ + }, f, e.contentEncryptionAlgorithm, !1, ["encrypt"]), h = await this.encrypt({ name: e.contentEncryptionAlgorithm.name, iv: s - }, f, c), g = new b4({ - keyDerivationFunc: new fe({ + }, d, c), g = new b4({ + keyDerivationFunc: new de({ algorithmId: n, algorithmParams: l.toSchema() }), - encryptionScheme: new fe({ + encryptionScheme: new de({ algorithmId: t, algorithmParams: new Oe({ valueHex: o }) }) }); return new Ir({ contentType: e.contentType, - contentEncryptionAlgorithm: new fe({ + contentEncryptionAlgorithm: new de({ algorithmId: "1.2.840.113549.1.5.13", algorithmParams: g.toSchema() }), @@ -59926,7 +59972,7 @@ var q0 = class extends BIe { }); } async decryptEncryptedContentInfo(e) { - if (Ct.assert(e, "password", "encryptedContentInfo"), e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId !== "1.2.840.113549.1.5.13") throw new Error(`Unknown "contentEncryptionAlgorithm": ${e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId}`); + if (Ot.assert(e, "password", "encryptedContentInfo"), e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId !== "1.2.840.113549.1.5.13") throw new Error(`Unknown "contentEncryptionAlgorithm": ${e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId}`); let t; try { t = new b4({ schema: e.encryptedContentInfo.contentEncryptionAlgorithm.algorithmParams }); @@ -59942,20 +59988,20 @@ var q0 = class extends BIe { const r = this.getAlgorithmByOID(t.encryptionScheme.algorithmId, !0), o = t.encryptionScheme.algorithmParams.valueBlock.valueHex, s = new Uint8Array(o), i = n.salt.valueBlock.valueHex, a = new Uint8Array(i), c = n.iterationCount; let l = "SHA-1"; n.prf && (l = this.getAlgorithmByOID(n.prf.algorithmId, !0).hash.name); - const u = await this.importKey("raw", e.password, "PBKDF2", !1, ["deriveKey"]), d = await this.deriveKey({ + const u = await this.importKey("raw", e.password, "PBKDF2", !1, ["deriveKey"]), f = await this.deriveKey({ name: "PBKDF2", hash: { name: l }, salt: a, iterations: c - }, u, r, !1, ["decrypt"]), f = e.encryptedContentInfo.getEncryptedContent(); + }, u, r, !1, ["decrypt"]), d = e.encryptedContentInfo.getEncryptedContent(); return this.decrypt({ name: r.name, iv: s - }, d, f); + }, f, d); } async stampDataWithPassword(e) { if (!(e instanceof Object)) throw new Error('Parameters must have type "Object"'); - Ct.assert(e, "password", "hashAlgorithm", "iterationCount", "salt", "contentToStamp"); + Ot.assert(e, "password", "hashAlgorithm", "iterationCount", "salt", "contentToStamp"); let t; switch (e.hashAlgorithm.toLowerCase()) { case "sha-1": @@ -59981,7 +60027,7 @@ var q0 = class extends BIe { return this.sign(n, o, new Uint8Array(e.contentToStamp)); } async verifyDataStampedWithPassword(e) { - Ct.assert(e, "password", "hashAlgorithm", "salt", "iterationCount", "contentToVerify", "signatureToVerify"); + Ot.assert(e, "password", "hashAlgorithm", "salt", "iterationCount", "contentToVerify", "signatureToVerify"); let t = 0; switch (e.hashAlgorithm.toLowerCase()) { case "sha-1": @@ -60008,7 +60054,7 @@ var q0 = class extends BIe { } async getSignatureParameters(e, t = "SHA-1") { this.getOIDByAlgorithm({ name: t }, !0, "hashAlgorithm"); - const n = new fe(), r = this.getAlgorithmParameters(e.algorithm.name, "sign"); + const n = new de(), r = this.getAlgorithmParameters(e.algorithm.name, "sign"); if (!Object.keys(r.algorithm).length) throw new Error("Parameter 'algorithm' is empty"); const o = r.algorithm; switch ("hash" in e.algorithm && e.algorithm.hash && e.algorithm.hash.name ? o.hash.name = e.algorithm.hash.name : o.hash.name = t, e.algorithm.name.toUpperCase()) { @@ -60029,10 +60075,10 @@ var q0 = class extends BIe { o.saltLength = 64; } const s = {}; - o.hash.name.toUpperCase() !== "SHA-1" && (s.hashAlgorithm = new fe({ + o.hash.name.toUpperCase() !== "SHA-1" && (s.hashAlgorithm = new de({ algorithmId: this.getOIDByAlgorithm({ name: o.hash.name }, !0, "hashAlgorithm"), - algorithmParams: new fn() - }), s.maskGenAlgorithm = new fe({ + algorithmParams: new hn() + }), s.maskGenAlgorithm = new de({ algorithmId: "1.2.840.113549.1.1.8", algorithmParams: s.hashAlgorithm.toSchema() })), o.saltLength !== 20 && (s.saltLength = o.saltLength); @@ -60082,10 +60128,10 @@ var q0 = class extends BIe { r.algorithmId === "1.2.840.113549.1.1.10" ? l = r.algorithmId : l = n.algorithm.algorithmId; const u = this.getAlgorithmByOID(l, !0); if (c.algorithm = this.getAlgorithmParameters(u.name, "importKey"), "hash" in c.algorithm.algorithm && (c.algorithm.algorithm.hash.name = o), u.name === "ECDSA") { - let d = !1; - if ("algorithmParams" in n.algorithm && "idBlock" in n.algorithm.algorithmParams && n.algorithm.algorithmParams.idBlock.tagClass === 1 && n.algorithm.algorithmParams.idBlock.tagNumber === 6 && (d = !0), d === !1) throw new Error("Incorrect type for ECDSA public key parameters"); - const f = this.getAlgorithmByOID(n.algorithm.algorithmParams.valueBlock.toString(), !0); - c.algorithm.algorithm.namedCurve = f.name; + let f = !1; + if ("algorithmParams" in n.algorithm && "idBlock" in n.algorithm.algorithmParams && n.algorithm.algorithmParams.idBlock.tagClass === 1 && n.algorithm.algorithmParams.idBlock.tagNumber === 6 && (f = !0), f === !1) throw new Error("Incorrect type for ECDSA public key parameters"); + const d = this.getAlgorithmByOID(n.algorithm.algorithmParams.valueBlock.toString(), !0); + c.algorithm.algorithm.namedCurve = d.name; } s = await this.getPublicKey(n, null, c); } else { @@ -60096,9 +60142,9 @@ var q0 = class extends BIe { "hash" in i.algorithm && (i.algorithm.hash.name = o); let a = t.valueBlock.valueHexView; if (s.algorithm.name === "ECDSA") { - const c = Sg.find(s.algorithm.namedCurve); + const c = xg.find(s.algorithm.namedCurve); if (!c) throw new Error("Unsupported named curve in use"); - const l = hn(a); + const l = pn(a); ke.assert(l, "Signature value"), a = DIe(l.result, c.size); } if (s.algorithm.name === "RSA-PSS") { @@ -60165,11 +60211,11 @@ function Ye(e = !1) { } function LIe(e) { if (e.byteLength % 2 !== 0) return Dn; - const t = e.byteLength / 2, n = new de({ valueHex: A4(new Uint8Array(e, 0, t)) }), r = new de({ valueHex: A4(new Uint8Array(e, t, t)) }); + const t = e.byteLength / 2, n = new ue({ valueHex: A4(new Uint8Array(e, 0, t)) }), r = new ue({ valueHex: A4(new Uint8Array(e, t, t)) }); return new z({ value: [n, r] }).toBER(!1); } function DIe(e, t) { - if (!(e instanceof z && e.valueBlock.value.length === 2 && e.valueBlock.value[0] instanceof de && e.valueBlock.value[1] instanceof de)) return Dn; + if (!(e instanceof z && e.valueBlock.value.length === 2 && e.valueBlock.value[0] instanceof ue && e.valueBlock.value[1] instanceof ue)) return Dn; const n = e.valueBlock.value[0].convertFromDER().valueBlock.valueHexView, r = e.valueBlock.value[1].convertFromDER().valueBlock.valueHexView, o = new Uint8Array(t * 2); return o.set(n, t - n.byteLength), o.set(r, 2 * t - r.byteLength), o.buffer; } @@ -60181,13 +60227,13 @@ async function jIe(e, t, n, r, o) { case "SHA-512": break; default: - throw new Ut(`Unknown hash function: ${e}`); + throw new zt(`Unknown hash function: ${e}`); } - if (Ut.assert(t, "zBuffer", "ArrayBuffer"), t.byteLength === 0) throw new Ut("'zBuffer' has zero length, error"); - if (Ut.assert(r, "SharedInfo", "ArrayBuffer"), n > 255) throw new Ut("Please set 'Counter' argument to value less or equal to 255"); + if (zt.assert(t, "zBuffer", "ArrayBuffer"), t.byteLength === 0) throw new zt("'zBuffer' has zero length, error"); + if (zt.assert(r, "SharedInfo", "ArrayBuffer"), n > 255) throw new zt("Please set 'Counter' argument to value less or equal to 255"); const s = /* @__PURE__ */ new ArrayBuffer(4), i = new Uint8Array(s); i[0] = 0, i[1] = 0, i[2] = 0, i[3] = n; - const a = Kt.concat(t, s, r); + const a = Wt.concat(t, s, r); return { counter: n, result: await o.digest({ name: e }, a) @@ -60209,18 +60255,18 @@ async function k4(e, t, n, r, o = Ye(!0)) { s = 512; break; default: - throw new Ut(`Unknown hash function: ${e}`); + throw new zt(`Unknown hash function: ${e}`); } - if (Ut.assert(t, "Zbuffer", "ArrayBuffer"), t.byteLength === 0) throw new Ut("'Zbuffer' has zero length, error"); - Ut.assert(r, "SharedInfo", "ArrayBuffer"); + if (zt.assert(t, "Zbuffer", "ArrayBuffer"), t.byteLength === 0) throw new zt("'Zbuffer' has zero length, error"); + zt.assert(r, "SharedInfo", "ArrayBuffer"); const a = n / s; Math.floor(a) > 0 && (i = Math.floor(a), a - i > 0 && i++); const c = []; for (let u = 1; u <= i; u++) c.push(await jIe(e, t, u, r, o)); - const l = Kt.concat(c.map((u) => u.result)); + const l = Wt.concat(c.map((u) => u.result)); if (n >>= 3, l.byteLength > n) { - const u = new ArrayBuffer(n), d = new Uint8Array(u), f = new Uint8Array(l); - for (let h = 0; h < n; h++) d[h] = f[h]; + const u = new ArrayBuffer(n), f = new Uint8Array(u), d = new Uint8Array(l); + for (let h = 0; h < n; h++) f[h] = d[h]; return u; } return l; @@ -60236,7 +60282,7 @@ function A4(e) { return n.slice(); } const qC = "type", GC = "value", TO = "utcTimeName", MO = "generalTimeName", FIe = [TO, MO]; -var Aa, or = (Aa = class extends Ce { +var Aa, sr = (Aa = class extends Ce { constructor(t = {}) { super(), this.type = t[qC] ?? Aa.defaultValues(qC), this.value = t[GC] ?? Aa.defaultValues(GC), t.schema && this.fromSchema(t.schema); } @@ -60252,9 +60298,9 @@ var Aa, or = (Aa = class extends Ce { } static schema(t = {}, n = !1) { const r = t.names ?? {}; - return new Xt({ + return new en({ optional: n, - value: [new W0({ name: r.utcTimeName || "" }), new Yt({ name: r.generalTimeName || "" })] + value: [new W0({ name: r.utcTimeName || "" }), new Xt({ name: r.generalTimeName || "" })] }); } fromSchema(t) { @@ -60266,7 +60312,7 @@ var Aa, or = (Aa = class extends Ce { ke.assertSchema(n, this.className), TO in n.result && (this.type = 0, this.value = n.result.utcTimeName.toDate()), MO in n.result && (this.type = 1, this.value = n.result.generalTimeName.toDate()); } toSchema() { - return this.type === 0 ? new W0({ valueDate: this.value }) : this.type === 1 ? new Yt({ valueDate: this.value }) : {}; + return this.type === 0 ? new W0({ valueDate: this.value }) : this.type === 1 ? new Xt({ valueDate: this.value }) : {}; } toJSON() { return { @@ -60275,8 +60321,8 @@ var Aa, or = (Aa = class extends Ce { }; } }, Aa.CLASS_NAME = "Time", Aa); -const JC = "tbs", _c = "version", uA = "serialNumber", dA = "signature", fA = "issuer", hA = "notBefore", pA = "notAfter", gA = "subject", mA = "subjectPublicKeyInfo", Pb = "issuerUniqueID", Rb = "subjectUniqueID", Tb = "extensions", Mb = "signatureAlgorithm", Bb = "signatureValue", ko = "tbsCertificate", ax = `${ko}.${_c}`, cT = `${ko}.${uA}`, lT = `${ko}.${dA}`, uT = `${ko}.${fA}`, cx = `${ko}.${hA}`, lx = `${ko}.${pA}`, dT = `${ko}.${gA}`, fT = `${ko}.${mA}`, ux = `${ko}.${Pb}`, dx = `${ko}.${Rb}`, c0 = `${ko}.${Tb}`, VIe = [ - ko, +const JC = "tbs", Lc = "version", uA = "serialNumber", dA = "signature", fA = "issuer", hA = "notBefore", pA = "notAfter", gA = "subject", mA = "subjectPublicKeyInfo", Pb = "issuerUniqueID", Rb = "subjectUniqueID", Tb = "extensions", Mb = "signatureAlgorithm", Bb = "signatureValue", Ao = "tbsCertificate", ax = `${Ao}.${Lc}`, cT = `${Ao}.${uA}`, lT = `${Ao}.${dA}`, uT = `${Ao}.${fA}`, cx = `${Ao}.${hA}`, lx = `${Ao}.${pA}`, dT = `${Ao}.${gA}`, fT = `${Ao}.${mA}`, ux = `${Ao}.${Pb}`, dx = `${Ao}.${Rb}`, c0 = `${Ao}.${Tb}`, VIe = [ + Ao, ax, cT, lT, @@ -60294,30 +60340,30 @@ const JC = "tbs", _c = "version", uA = "serialNumber", dA = "signature", fA = "i function $Ie(e = {}) { const t = e.names ?? {}; return new z({ - name: t.blockName || ko, + name: t.blockName || Ao, value: [ - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new de({ name: t.tbsCertificateVersion || ax })] + value: [new ue({ name: t.tbsCertificateVersion || ax })] }), - new de({ name: t.tbsCertificateSerialNumber || cT }), - fe.schema(t.signature || { names: { blockName: lT } }), - Qt.schema(t.issuer || { names: { blockName: uT } }), + new ue({ name: t.tbsCertificateSerialNumber || cT }), + de.schema(t.signature || { names: { blockName: lT } }), + Zt.schema(t.issuer || { names: { blockName: uT } }), new z({ name: t.tbsCertificateValidity || "tbsCertificate.validity", - value: [or.schema(t.notBefore || { names: { + value: [sr.schema(t.notBefore || { names: { utcTimeName: cx, generalTimeName: cx - } }), or.schema(t.notAfter || { names: { + } }), sr.schema(t.notAfter || { names: { utcTimeName: lx, generalTimeName: lx } })] }), - Qt.schema(t.subject || { names: { blockName: dT } }), + Zt.schema(t.subject || { names: { blockName: dT } }), mi.schema(t.subjectPublicKeyInfo || { names: { blockName: fT } }), new Je({ name: t.tbsCertificateIssuerUniqueID || ux, @@ -60335,7 +60381,7 @@ function $Ie(e = {}) { tagNumber: 2 } }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, @@ -60346,7 +60392,7 @@ function $Ie(e = {}) { ] }); } -var rn, Mr = (rn = class extends Ce { +var on, Mr = (on = class extends Ce { get tbs() { return br(this.tbsView); } @@ -60354,26 +60400,26 @@ var rn, Mr = (rn = class extends Ce { this.tbsView = new Uint8Array(t); } constructor(t = {}) { - super(), this.tbsView = new Uint8Array(t[JC] ?? rn.defaultValues(JC)), this.version = t[_c] ?? rn.defaultValues(_c), this.serialNumber = t[uA] ?? rn.defaultValues(uA), this.signature = t[dA] ?? rn.defaultValues(dA), this.issuer = t[fA] ?? rn.defaultValues(fA), this.notBefore = t[hA] ?? rn.defaultValues(hA), this.notAfter = t[pA] ?? rn.defaultValues(pA), this.subject = t[gA] ?? rn.defaultValues(gA), this.subjectPublicKeyInfo = t[mA] ?? rn.defaultValues(mA), Pb in t && (this.issuerUniqueID = t[Pb] ?? rn.defaultValues(Pb)), Rb in t && (this.subjectUniqueID = t[Rb] ?? rn.defaultValues(Rb)), Tb in t && (this.extensions = t[Tb] ?? rn.defaultValues(Tb)), this.signatureAlgorithm = t[Mb] ?? rn.defaultValues(Mb), this.signatureValue = t[Bb] ?? rn.defaultValues(Bb), t.schema && this.fromSchema(t.schema); + super(), this.tbsView = new Uint8Array(t[JC] ?? on.defaultValues(JC)), this.version = t[Lc] ?? on.defaultValues(Lc), this.serialNumber = t[uA] ?? on.defaultValues(uA), this.signature = t[dA] ?? on.defaultValues(dA), this.issuer = t[fA] ?? on.defaultValues(fA), this.notBefore = t[hA] ?? on.defaultValues(hA), this.notAfter = t[pA] ?? on.defaultValues(pA), this.subject = t[gA] ?? on.defaultValues(gA), this.subjectPublicKeyInfo = t[mA] ?? on.defaultValues(mA), Pb in t && (this.issuerUniqueID = t[Pb] ?? on.defaultValues(Pb)), Rb in t && (this.subjectUniqueID = t[Rb] ?? on.defaultValues(Rb)), Tb in t && (this.extensions = t[Tb] ?? on.defaultValues(Tb)), this.signatureAlgorithm = t[Mb] ?? on.defaultValues(Mb), this.signatureValue = t[Bb] ?? on.defaultValues(Bb), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case JC: return Dn; - case _c: + case Lc: return 0; case uA: - return new de(); + return new ue(); case dA: - return new fe(); + return new de(); case fA: - return new Qt(); + return new Zt(); case hA: - return new or(); + return new sr(); case pA: - return new or(); + return new sr(); case gA: - return new Qt(); + return new Zt(); case mA: return new mi(); case Pb: @@ -60383,9 +60429,9 @@ var rn, Mr = (rn = class extends Ce { case Tb: return []; case Mb: - return new fe(); + return new de(); case Bb: - return new ht(); + return new pt(); default: return super.defaultValues(t); } @@ -60396,25 +60442,25 @@ var rn, Mr = (rn = class extends Ce { name: n.blockName || "", value: [ $Ie(n.tbsCertificate), - fe.schema(n.signatureAlgorithm || { names: { blockName: Mb } }), - new ht({ name: n.signatureValue || Bb }) + de.schema(n.signatureAlgorithm || { names: { blockName: Mb } }), + new pt({ name: n.signatureValue || Bb }) ] }); } fromSchema(t) { for (const r of VIe) delete t[r]; - const n = Ee(t, t, rn.schema({ names: { tbsCertificate: { names: { extensions: { names: { extensions: c0 } } } } } })); - ke.assertSchema(n, this.className), this.tbsView = n.result.tbsCertificate.valueBeforeDecodeView, ax in n.result && (this.version = n.result[ax].valueBlock.valueDec), this.serialNumber = n.result[cT], this.signature = new fe({ schema: n.result[lT] }), this.issuer = new Qt({ schema: n.result[uT] }), this.notBefore = new or({ schema: n.result[cx] }), this.notAfter = new or({ schema: n.result[lx] }), this.subject = new Qt({ schema: n.result[dT] }), this.subjectPublicKeyInfo = new mi({ schema: n.result[fT] }), ux in n.result && (this.issuerUniqueID = n.result[ux].valueBlock.valueHex), dx in n.result && (this.subjectUniqueID = n.result[dx].valueBlock.valueHex), c0 in n.result && (this.extensions = Array.from(n.result[c0], (r) => new Bn({ schema: r }))), this.signatureAlgorithm = new fe({ schema: n.result.signatureAlgorithm }), this.signatureValue = n.result.signatureValue; + const n = Ee(t, t, on.schema({ names: { tbsCertificate: { names: { extensions: { names: { extensions: c0 } } } } } })); + ke.assertSchema(n, this.className), this.tbsView = n.result.tbsCertificate.valueBeforeDecodeView, ax in n.result && (this.version = n.result[ax].valueBlock.valueDec), this.serialNumber = n.result[cT], this.signature = new de({ schema: n.result[lT] }), this.issuer = new Zt({ schema: n.result[uT] }), this.notBefore = new sr({ schema: n.result[cx] }), this.notAfter = new sr({ schema: n.result[lx] }), this.subject = new Zt({ schema: n.result[dT] }), this.subjectPublicKeyInfo = new mi({ schema: n.result[fT] }), ux in n.result && (this.issuerUniqueID = n.result[ux].valueBlock.valueHex), dx in n.result && (this.subjectUniqueID = n.result[dx].valueBlock.valueHex), c0 in n.result && (this.extensions = Array.from(n.result[c0], (r) => new Bn({ schema: r }))), this.signatureAlgorithm = new de({ schema: n.result.signatureAlgorithm }), this.signatureValue = n.result.signatureValue; } encodeTBS() { const t = []; - return _c in this && this.version !== rn.defaultValues(_c) && t.push(new ee({ + return Lc in this && this.version !== on.defaultValues(Lc) && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new de({ value: this.version })] + value: [new ue({ value: this.version })] })), t.push(this.serialNumber), t.push(this.signature.toSchema()), t.push(this.issuer.toSchema()), t.push(new z({ value: [this.notBefore.toSchema(), this.notAfter.toSchema()] })), t.push(this.subject.toSchema()), t.push(this.subjectPublicKeyInfo.toSchema()), this.issuerUniqueID && t.push(new Je({ optional: !0, idBlock: { @@ -60429,7 +60475,7 @@ var rn, Mr = (rn = class extends Ce { tagNumber: 2 }, valueHex: this.subjectUniqueID - })), this.extensions && t.push(new ee({ + })), this.extensions && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -60441,8 +60487,8 @@ var rn, Mr = (rn = class extends Ce { toSchema(t = !1) { let n; if (t === !1) { - if (!this.tbsView.byteLength) return rn.schema().value[0]; - const r = hn(this.tbsView); + if (!this.tbsView.byteLength) return on.schema().value[0]; + const r = pn(this.tbsView); ke.assert(r, "TBS Certificate"), n = r.result; } else n = this.encodeTBS(); return new z({ value: [ @@ -60453,7 +60499,7 @@ var rn, Mr = (rn = class extends Ce { } toJSON() { const t = { - tbs: Xn.encode(this.tbsView), + tbs: Zn.encode(this.tbsView), version: this.version, serialNumber: this.serialNumber.toJSON(), signature: this.signature.toJSON(), @@ -60465,7 +60511,7 @@ var rn, Mr = (rn = class extends Ce { signatureAlgorithm: this.signatureAlgorithm.toJSON(), signatureValue: this.signatureValue.toJSON() }; - return _c in this && this.version !== rn.defaultValues(_c) && (t.version = this.version), this.issuerUniqueID && (t.issuerUniqueID = Xn.encode(this.issuerUniqueID)), this.subjectUniqueID && (t.subjectUniqueID = Xn.encode(this.subjectUniqueID)), this.extensions && (t.extensions = Array.from(this.extensions, (n) => n.toJSON())), t; + return Lc in this && this.version !== on.defaultValues(Lc) && (t.version = this.version), this.issuerUniqueID && (t.issuerUniqueID = Zn.encode(this.issuerUniqueID)), this.subjectUniqueID && (t.subjectUniqueID = Zn.encode(this.subjectUniqueID)), this.extensions && (t.extensions = Array.from(this.extensions, (n) => n.toJSON())), t; } async getPublicKey(t, n = Ye(!0)) { return n.getPublicKey(this.subjectPublicKeyInfo, this.signatureAlgorithm, t); @@ -60478,14 +60524,14 @@ var rn, Mr = (rn = class extends Ce { const o = await r.getSignatureParameters(t, n), s = o.parameters; this.signature = o.signatureAlgorithm, this.signatureAlgorithm = o.signatureAlgorithm, this.tbsView = new Uint8Array(this.encodeTBS().toBER()); const i = await r.signWithPrivateKey(this.tbsView, t, s); - this.signatureValue = new ht({ valueHex: i }); + this.signatureValue = new pt({ valueHex: i }); } async verify(t, n = Ye(!0)) { let r; if (t ? r = t.subjectPublicKeyInfo : this.issuer.isEqual(this.subject) && (r = this.subjectPublicKeyInfo), !(r instanceof mi)) throw new Error("Please provide issuer certificate as a parameter"); return n.verifyWithPublicKey(this.tbsView, this.signatureValue, r, this.signatureAlgorithm); } -}, rn.CLASS_NAME = "Certificate", rn); +}, on.CLASS_NAME = "Certificate", on); function Sq(e, t = null) { if (t && e.issuer.isEqual(t.issuer) && e.serialNumber.isEqual(t.serialNumber)) return null; let n = !1; @@ -60498,9 +60544,9 @@ function Sq(e, t = null) { return n ? e : null; } const YC = "version", QC = "logID", XC = "extensions", ZC = "timestamp", eI = "hashAlgorithm", tI = "signatureAlgorithm", nI = "signature", S4 = "none", x4 = "md5", E4 = "sha1", C4 = "sha224", I4 = "sha256", N4 = "sha384", O4 = "sha512", P4 = "anonymous", R4 = "rsa", T4 = "dsa", M4 = "ecdsa"; -var no, UIe = (no = class extends Ce { +var ro, UIe = (ro = class extends Ce { constructor(t = {}) { - super(), this.version = t[YC] ?? no.defaultValues(YC), this.logID = t[QC] ?? no.defaultValues(QC), this.timestamp = t[ZC] ?? no.defaultValues(ZC), this.extensions = t[XC] ?? no.defaultValues(XC), this.hashAlgorithm = t[eI] ?? no.defaultValues(eI), this.signatureAlgorithm = t[tI] ?? no.defaultValues(tI), this.signature = t[nI] ?? no.defaultValues(nI), "stream" in t && t.stream && this.fromStream(t.stream), t.schema && this.fromSchema(t.schema); + super(), this.version = t[YC] ?? ro.defaultValues(YC), this.logID = t[QC] ?? ro.defaultValues(QC), this.timestamp = t[ZC] ?? ro.defaultValues(ZC), this.extensions = t[XC] ?? ro.defaultValues(XC), this.hashAlgorithm = t[eI] ?? ro.defaultValues(eI), this.signatureAlgorithm = t[tI] ?? ro.defaultValues(tI), this.signature = t[nI] ?? ro.defaultValues(nI), "stream" in t && t.stream && this.fromStream(t.stream), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -60522,13 +60568,13 @@ var no, UIe = (no = class extends Ce { } fromSchema(t) { if (!(t instanceof rx)) throw new Error("Object's schema was not verified against input data for SignedCertificateTimestamp"); - const n = new i0({ stream: new Co({ buffer: t.data }) }); + const n = new i0({ stream: new Io({ buffer: t.data }) }); this.fromStream(n); } fromStream(t) { const n = t.getUint16(); if (this.version = t.getBlock(1)[0], this.version === 0) { - this.logID = new Uint8Array(t.getBlock(32)).buffer.slice(0), this.timestamp = new Date(Number(Cl.decodeBigInt(t.getBlock(8)))); + this.logID = new Uint8Array(t.getBlock(32)).buffer.slice(0), this.timestamp = new Date(Number(Il.decodeBigInt(t.getBlock(8)))); const r = t.getUint16(); switch (this.extensions = new Uint8Array(t.getBlock(r)).buffer.slice(0), t.getBlock(1)[0]) { case 0: @@ -60581,7 +60627,7 @@ var no, UIe = (no = class extends Ce { } toStream() { const t = new i0(); - t.appendUint16(47 + this.extensions.byteLength + this.signature.byteLength), t.appendChar(this.version), t.appendView(new Uint8Array(this.logID)), t.appendView(Cl.encode(this.timestamp.valueOf(), { length: 8 })), t.appendUint16(this.extensions.byteLength), this.extensions.byteLength && t.appendView(new Uint8Array(this.extensions)); + t.appendUint16(47 + this.extensions.byteLength + this.signature.byteLength), t.appendChar(this.version), t.appendView(new Uint8Array(this.logID)), t.appendView(Il.encode(this.timestamp.valueOf(), { length: 8 })), t.appendUint16(this.extensions.byteLength), this.extensions.byteLength && t.appendView(new Uint8Array(this.extensions)); let n; switch (this.hashAlgorithm.toLowerCase()) { case S4: @@ -60631,12 +60677,12 @@ var no, UIe = (no = class extends Ce { toJSON() { return { version: this.version, - logID: Xn.encode(this.logID, { case: "upper" }), + logID: Zn.encode(this.logID, { case: "upper" }), timestamp: this.timestamp, - extensions: Xn.encode(this.extensions, { case: "upper" }), + extensions: Zn.encode(this.extensions, { case: "upper" }), hashAlgorithm: this.hashAlgorithm, signatureAlgorithm: this.signatureAlgorithm, - signature: Xn.encode(this.signature, { case: "upper" }) + signature: Zn.encode(this.signature, { case: "upper" }) }; } async verify(t, n, r = 0, o = Ye(!0)) { @@ -60649,14 +60695,14 @@ var no, UIe = (no = class extends Ce { } if (!i) throw new Error(`Public key not found for CT with logId: ${s}`); const c = br(vO.decode(i)), l = mi.fromBER(c); - return a.appendChar(0), a.appendChar(0), a.appendView(Cl.encode(this.timestamp.valueOf(), { length: 8 })), a.appendUint16(r), r === 0 && a.appendUint24(n.byteLength), a.appendView(new Uint8Array(n)), a.appendUint16(this.extensions.byteLength), this.extensions.byteLength !== 0 && a.appendView(new Uint8Array(this.extensions)), o.verifyWithPublicKey(a.buffer.slice(0, a.length), new Oe({ valueHex: this.signature }), l, { algorithmId: "" }, "SHA-256"); + return a.appendChar(0), a.appendChar(0), a.appendView(Il.encode(this.timestamp.valueOf(), { length: 8 })), a.appendUint16(r), r === 0 && a.appendUint24(n.byteLength), a.appendView(new Uint8Array(n)), a.appendUint16(this.extensions.byteLength), this.extensions.byteLength !== 0 && a.appendView(new Uint8Array(this.extensions)), o.verifyWithPublicKey(a.buffer.slice(0, a.length), new Oe({ valueHex: this.signature }), l, { algorithmId: "" }, "SHA-256"); } -}, no.CLASS_NAME = "SignedCertificateTimestamp", no); -new Ve({ value: hq }).valueBlock.toBER(!1); +}, ro.CLASS_NAME = "SignedCertificateTimestamp", ro); +new $e({ value: hq }).valueBlock.toBER(!1); const nk = "timestamps"; -var xf, KIe = (xf = class extends Ce { +var Cf, KIe = (Cf = class extends Ce { constructor(t = {}) { - super(), this.timestamps = t[nk] ?? xf.defaultValues(nk), t.schema && this.fromSchema(t.schema); + super(), this.timestamps = t[nk] ?? Cf.defaultValues(nk), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -60683,7 +60729,7 @@ var xf, KIe = (xf = class extends Ce { } fromSchema(t) { if (!(t instanceof Oe)) throw new Error("Object's schema was not verified against input data for SignedCertificateTimestampList"); - const n = new i0({ stream: new Co({ buffer: t.valueBlock.valueHex }) }); + const n = new i0({ stream: new Io({ buffer: t.valueBlock.valueHex }) }); if (n.getUint16() !== n.length) throw new Error("Object's schema was not verified against input data for SignedCertificateTimestampList"); for (; n.length; ) this.timestamps.push(new UIe({ stream: n })); } @@ -60702,11 +60748,11 @@ var xf, KIe = (xf = class extends Ce { toJSON() { return { timestamps: Array.from(this.timestamps, (t) => t.toJSON()) }; } -}, xf.CLASS_NAME = "SignedCertificateTimestampList", xf); +}, Cf.CLASS_NAME = "SignedCertificateTimestampList", Cf); const _b = "attributes", HIe = [_b]; -var Fl, zIe = (Fl = class extends Ce { +var Vl, zIe = (Vl = class extends Ce { constructor(t = {}) { - super(), this.attributes = t[_b] ?? Fl.defaultValues(_b), t.schema && this.fromSchema(t.schema); + super(), this.attributes = t[_b] ?? Vl.defaultValues(_b), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -60720,7 +60766,7 @@ var Fl, zIe = (Fl = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.attributes || "", value: En.schema() })] @@ -60728,7 +60774,7 @@ var Fl, zIe = (Fl = class extends Ce { } fromSchema(t) { for (const r of HIe) delete t[r]; - const n = Ee(t, t, Fl.schema({ names: { attributes: _b } })); + const n = Ee(t, t, Vl.schema({ names: { attributes: _b } })); ke.assertSchema(n, this.className), this.attributes = Array.from(n.result.attributes, (r) => new En({ schema: r })); } toSchema() { @@ -60737,12 +60783,12 @@ var Fl, zIe = (Fl = class extends Ce { toJSON() { return { attributes: Array.from(this.attributes, (t) => t.toJSON()) }; } -}, Fl.CLASS_NAME = "SubjectDirectoryAttributes", Fl), WIe = class an { +}, Vl.CLASS_NAME = "SubjectDirectoryAttributes", Vl), WIe = class cn { static getItems() { - return this.types || (this.types = {}, an.register(BCe, "SubjectAltName", o4), an.register(cq, "IssuerAltName", o4), an.register(fq, "AuthorityKeyIdentifier", mq), an.register(_Ce, "BasicConstraints", aT), an.register(JCe, "MicrosoftCaVersion", eIe), an.register($Ce, "CertificatePolicies", d4), an.register(KCe, "CertificatePoliciesMicrosoft", d4), an.register(GCe, "MicrosoftCertTemplateV2", sIe), an.register(dq, "CRLDistributionPoints", OO), an.register(oT, "FreshestCRL", OO), an.register(WCe, "ExtKeyUsage", sx), an.register(uq, "CertificateIssuer", hr), an.register(sT, "AuthorityInfoAccess", PO), an.register(qCe, "SubjectInfoAccess", PO), an.register(lq, "IssuingDistributionPoint", uIe), an.register(VCe, "NameConstraints", hIe), an.register(zCe, "PolicyConstraints", gIe), an.register(HCe, "PolicyMappings", bIe), an.register(MCe, "PrivateKeyUsagePeriod", vIe), an.register(YCe, "QCStatements", SIe), an.register(hq, "SignedCertificateTimestampList", KIe), an.register(TCe, "SubjectDirectoryAttributes", zIe)), this.types; + return this.types || (this.types = {}, cn.register(BCe, "SubjectAltName", o4), cn.register(cq, "IssuerAltName", o4), cn.register(fq, "AuthorityKeyIdentifier", mq), cn.register(_Ce, "BasicConstraints", aT), cn.register(JCe, "MicrosoftCaVersion", eIe), cn.register($Ce, "CertificatePolicies", d4), cn.register(KCe, "CertificatePoliciesMicrosoft", d4), cn.register(GCe, "MicrosoftCertTemplateV2", sIe), cn.register(dq, "CRLDistributionPoints", OO), cn.register(oT, "FreshestCRL", OO), cn.register(WCe, "ExtKeyUsage", sx), cn.register(uq, "CertificateIssuer", pr), cn.register(sT, "AuthorityInfoAccess", PO), cn.register(qCe, "SubjectInfoAccess", PO), cn.register(lq, "IssuingDistributionPoint", uIe), cn.register(VCe, "NameConstraints", hIe), cn.register(zCe, "PolicyConstraints", gIe), cn.register(HCe, "PolicyMappings", bIe), cn.register(MCe, "PrivateKeyUsagePeriod", vIe), cn.register(YCe, "QCStatements", SIe), cn.register(hq, "SignedCertificateTimestampList", KIe), cn.register(TCe, "SubjectDirectoryAttributes", zIe)), this.types; } static fromBER(t, n) { - const r = hn(n); + const r = pn(n); if (r.offset === -1) return null; const o = this.find(t); if (o) try { @@ -60763,12 +60809,12 @@ var Fl, zIe = (Fl = class extends Ce { }; } }; -const Lb = "extnID", Lc = "critical", Db = "extnValue", rk = "parsedValue", qIe = [ +const Lb = "extnID", Dc = "critical", Db = "extnValue", rk = "parsedValue", qIe = [ Lb, - Lc, + Dc, Db ]; -var ro, Bn = (ro = class extends Ce { +var oo, Bn = (oo = class extends Ce { get parsedValue() { if (this._parsedValue === void 0) { const t = WIe.fromBER(this.extnID, this.extnValue.valueBlock.valueHexView); @@ -60780,13 +60826,13 @@ var ro, Bn = (ro = class extends Ce { this._parsedValue = t; } constructor(t = {}) { - super(), this.extnID = t[Lb] ?? ro.defaultValues(Lb), this.critical = t[Lc] ?? ro.defaultValues(Lc), Db in t ? this.extnValue = new Oe({ valueHex: t.extnValue }) : this.extnValue = ro.defaultValues(Db), rk in t && (this.parsedValue = t[rk] ?? ro.defaultValues(rk)), t.schema && this.fromSchema(t.schema); + super(), this.extnID = t[Lb] ?? oo.defaultValues(Lb), this.critical = t[Dc] ?? oo.defaultValues(Dc), Db in t ? this.extnValue = new Oe({ valueHex: t.extnValue }) : this.extnValue = oo.defaultValues(Db), rk in t && (this.parsedValue = t[rk] ?? oo.defaultValues(rk)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case Lb: return ""; - case Lc: + case Dc: return !1; case Db: return new Oe(); @@ -60801,8 +60847,8 @@ var ro, Bn = (ro = class extends Ce { return new z({ name: n.blockName || "", value: [ - new Ve({ name: n.extnID || "" }), - new Ql({ + new $e({ name: n.extnID || "" }), + new Xl({ name: n.critical || "", optional: !0 }), @@ -60812,29 +60858,29 @@ var ro, Bn = (ro = class extends Ce { } fromSchema(t) { for (const r of qIe) delete t[r]; - const n = Ee(t, t, ro.schema({ names: { + const n = Ee(t, t, oo.schema({ names: { extnID: Lb, - critical: Lc, + critical: Dc, extnValue: Db } })); - ke.assertSchema(n, this.className), this.extnID = n.result.extnID.valueBlock.toString(), Lc in n.result && (this.critical = n.result.critical.valueBlock.value), this.extnValue = n.result.extnValue; + ke.assertSchema(n, this.className), this.extnID = n.result.extnID.valueBlock.toString(), Dc in n.result && (this.critical = n.result.critical.valueBlock.value), this.extnValue = n.result.extnValue; } toSchema() { const t = []; - return t.push(new Ve({ value: this.extnID })), this.critical !== ro.defaultValues(Lc) && t.push(new Ql({ value: this.critical })), t.push(this.extnValue), new z({ value: t }); + return t.push(new $e({ value: this.extnID })), this.critical !== oo.defaultValues(Dc) && t.push(new Xl({ value: this.critical })), t.push(this.extnValue), new z({ value: t }); } toJSON() { const t = { extnID: this.extnID, extnValue: this.extnValue.toJSON() }; - return this.critical !== ro.defaultValues(Lc) && (t.critical = this.critical), this.parsedValue && this.parsedValue.toJSON && (t.parsedValue = this.parsedValue.toJSON()), t; + return this.critical !== oo.defaultValues(Dc) && (t.critical = this.critical), this.parsedValue && this.parsedValue.toJSON && (t.parsedValue = this.parsedValue.toJSON()), t; } -}, ro.CLASS_NAME = "Extension", ro); +}, oo.CLASS_NAME = "Extension", oo); const jb = "extensions", GIe = [jb]; -var Vl, jn = (Vl = class extends Ce { +var $l, jn = ($l = class extends Ce { constructor(t = {}) { - super(), this.extensions = t[jb] ?? Vl.defaultValues(jb), t.schema && this.fromSchema(t.schema); + super(), this.extensions = t[jb] ?? $l.defaultValues(jb), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -60849,7 +60895,7 @@ var Vl, jn = (Vl = class extends Ce { return new z({ optional: n, name: r.blockName || "", - value: [new ot({ + value: [new st({ name: r.extensions || "", value: Bn.schema(r.extension || {}) })] @@ -60857,7 +60903,7 @@ var Vl, jn = (Vl = class extends Ce { } fromSchema(t) { for (const r of GIe) delete t[r]; - const n = Ee(t, t, Vl.schema({ names: { extensions: jb } })); + const n = Ee(t, t, $l.schema({ names: { extensions: jb } })); ke.assertSchema(n, this.className), this.extensions = Array.from(n.result.extensions, (r) => new Bn({ schema: r })); } toSchema() { @@ -60866,24 +60912,24 @@ var Vl, jn = (Vl = class extends Ce { toJSON() { return { extensions: this.extensions.map((t) => t.toJSON()) }; } -}, Vl.CLASS_NAME = "Extensions", Vl); -const Fb = "issuer", Vb = "serialNumber", ju = "issuerUID", JIe = [ +}, $l.CLASS_NAME = "Extensions", $l); +const Fb = "issuer", Vb = "serialNumber", Fu = "issuerUID", JIe = [ Fb, Vb, - ju + Fu ]; var Ks, Ka = (Ks = class extends Ce { constructor(t = {}) { - super(), this.issuer = t[Fb] ?? Ks.defaultValues(Fb), this.serialNumber = t[Vb] ?? Ks.defaultValues(Vb), ju in t && (this.issuerUID = t[ju] ?? Ks.defaultValues(ju)), t.schema && this.fromSchema(t.schema); + super(), this.issuer = t[Fb] ?? Ks.defaultValues(Fb), this.serialNumber = t[Vb] ?? Ks.defaultValues(Vb), Fu in t && (this.issuerUID = t[Fu] ?? Ks.defaultValues(Fu)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case Fb: - return new hr(); + return new pr(); case Vb: - return new de(); - case ju: - return new ht(); + return new ue(); + case Fu: + return new pt(); default: return super.defaultValues(t); } @@ -60893,9 +60939,9 @@ var Ks, Ka = (Ks = class extends Ce { return new z({ name: n.blockName || "", value: [ - hr.schema(n.issuer || {}), - new de({ name: n.serialNumber || "" }), - new ht({ + pr.schema(n.issuer || {}), + new ue({ name: n.serialNumber || "" }), + new pt({ optional: !0, name: n.issuerUID || "" }) @@ -60907,9 +60953,9 @@ var Ks, Ka = (Ks = class extends Ce { const n = Ee(t, t, Ks.schema({ names: { issuer: { names: { blockName: Fb } }, serialNumber: Vb, - issuerUID: ju + issuerUID: Fu } })); - ke.assertSchema(n, this.className), this.issuer = new hr({ schema: n.result.issuer }), this.serialNumber = n.result.serialNumber, ju in n.result && (this.issuerUID = n.result.issuerUID); + ke.assertSchema(n, this.className), this.issuer = new pr({ schema: n.result.issuer }), this.serialNumber = n.result.serialNumber, Fu in n.result && (this.issuerUID = n.result.issuerUID); } toSchema() { const t = new z({ value: [this.issuer.toSchema(), this.serialNumber] }); @@ -60923,43 +60969,43 @@ var Ks, Ka = (Ks = class extends Ce { return this.issuerUID && (t.issuerUID = this.issuerUID.toJSON()), t; } }, Ks.CLASS_NAME = "IssuerSerial", Ks); -const $b = "version", Fu = "baseCertificateID", Vu = "subjectName", Ub = "issuer", Kb = "signature", Hb = "serialNumber", zb = "attrCertValidityPeriod", Wb = "attributes", $u = "issuerUniqueID", Uu = "extensions", YIe = [ +const $b = "version", Vu = "baseCertificateID", $u = "subjectName", Ub = "issuer", Kb = "signature", Hb = "serialNumber", zb = "attrCertValidityPeriod", Wb = "attributes", Uu = "issuerUniqueID", Ku = "extensions", YIe = [ $b, - Fu, Vu, + $u, Ub, Kb, Hb, zb, Wb, - $u, - Uu + Uu, + Ku ]; -var tr, rI = (tr = class extends Ce { +var nr, rI = (nr = class extends Ce { constructor(t = {}) { - super(), this.version = t[$b] ?? tr.defaultValues($b), Fu in t && (this.baseCertificateID = t[Fu] ?? tr.defaultValues(Fu)), Vu in t && (this.subjectName = t[Vu] ?? tr.defaultValues(Vu)), this.issuer = t[Ub] ?? tr.defaultValues(Ub), this.signature = t[Kb] ?? tr.defaultValues(Kb), this.serialNumber = t[Hb] ?? tr.defaultValues(Hb), this.attrCertValidityPeriod = t[zb] ?? tr.defaultValues(zb), this.attributes = t[Wb] ?? tr.defaultValues(Wb), $u in t && (this.issuerUniqueID = t[$u] ?? tr.defaultValues($u)), Uu in t && (this.extensions = t[Uu] ?? tr.defaultValues(Uu)), t.schema && this.fromSchema(t.schema); + super(), this.version = t[$b] ?? nr.defaultValues($b), Vu in t && (this.baseCertificateID = t[Vu] ?? nr.defaultValues(Vu)), $u in t && (this.subjectName = t[$u] ?? nr.defaultValues($u)), this.issuer = t[Ub] ?? nr.defaultValues(Ub), this.signature = t[Kb] ?? nr.defaultValues(Kb), this.serialNumber = t[Hb] ?? nr.defaultValues(Hb), this.attrCertValidityPeriod = t[zb] ?? nr.defaultValues(zb), this.attributes = t[Wb] ?? nr.defaultValues(Wb), Uu in t && (this.issuerUniqueID = t[Uu] ?? nr.defaultValues(Uu)), Ku in t && (this.extensions = t[Ku] ?? nr.defaultValues(Ku)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case $b: return 0; - case Fu: - return new Ka(); case Vu: - return new hr(); + return new Ka(); + case $u: + return new pr(); case Ub: - return new hr(); + return new pr(); case Kb: - return new fe(); - case Hb: return new de(); + case Hb: + return new ue(); case zb: - return new Ag(); + return new Sg(); case Wb: return []; - case $u: - return new ht(); case Uu: + return new pt(); + case Ku: return new jn(); default: return super.defaultValues(t); @@ -60970,31 +61016,31 @@ var tr, rI = (tr = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || "" }), - new Xt({ value: [new ee({ + new ue({ name: n.version || "" }), + new en({ value: [new ne({ name: n.baseCertificateID || "", idBlock: { tagClass: 3, tagNumber: 0 }, value: Ka.schema().valueBlock.value - }), new ee({ + }), new ne({ name: n.subjectName || "", idBlock: { tagClass: 3, tagNumber: 1 }, - value: hr.schema().valueBlock.value + value: pr.schema().valueBlock.value })] }), - hr.schema({ names: { blockName: n.issuer || "" } }), - fe.schema(n.signature || {}), - new de({ name: n.serialNumber || "" }), - Ag.schema(n.attrCertValidityPeriod || {}), + pr.schema({ names: { blockName: n.issuer || "" } }), + de.schema(n.signature || {}), + new ue({ name: n.serialNumber || "" }), + Sg.schema(n.attrCertValidityPeriod || {}), new z({ name: n.attributes || "", - value: [new ot({ value: En.schema() })] + value: [new st({ value: En.schema() })] }), - new ht({ + new pt({ optional: !0, name: n.issuerUniqueID || "" }), @@ -61004,29 +61050,29 @@ var tr, rI = (tr = class extends Ce { } fromSchema(t) { for (const r of YIe) delete t[r]; - const n = Ee(t, t, tr.schema({ names: { + const n = Ee(t, t, nr.schema({ names: { version: $b, - baseCertificateID: Fu, - subjectName: Vu, + baseCertificateID: Vu, + subjectName: $u, issuer: Ub, signature: { names: { blockName: Kb } }, serialNumber: Hb, attrCertValidityPeriod: { names: { blockName: zb } }, attributes: Wb, - issuerUniqueID: $u, - extensions: { names: { blockName: Uu } } + issuerUniqueID: Uu, + extensions: { names: { blockName: Ku } } } })); - ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, Fu in n.result && (this.baseCertificateID = new Ka({ schema: new z({ value: n.result.baseCertificateID.valueBlock.value }) })), Vu in n.result && (this.subjectName = new hr({ schema: new z({ value: n.result.subjectName.valueBlock.value }) })), this.issuer = n.result.issuer, this.signature = new fe({ schema: n.result.signature }), this.serialNumber = n.result.serialNumber, this.attrCertValidityPeriod = new Ag({ schema: n.result.attrCertValidityPeriod }), this.attributes = Array.from(n.result.attributes.valueBlock.value, (r) => new En({ schema: r })), $u in n.result && (this.issuerUniqueID = n.result.issuerUniqueID), Uu in n.result && (this.extensions = new jn({ schema: n.result.extensions })); + ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, Vu in n.result && (this.baseCertificateID = new Ka({ schema: new z({ value: n.result.baseCertificateID.valueBlock.value }) })), $u in n.result && (this.subjectName = new pr({ schema: new z({ value: n.result.subjectName.valueBlock.value }) })), this.issuer = n.result.issuer, this.signature = new de({ schema: n.result.signature }), this.serialNumber = n.result.serialNumber, this.attrCertValidityPeriod = new Sg({ schema: n.result.attrCertValidityPeriod }), this.attributes = Array.from(n.result.attributes.valueBlock.value, (r) => new En({ schema: r })), Uu in n.result && (this.issuerUniqueID = n.result.issuerUniqueID), Ku in n.result && (this.extensions = new jn({ schema: n.result.extensions })); } toSchema() { - const t = new z({ value: [new de({ value: this.version })] }); - return this.baseCertificateID && t.valueBlock.value.push(new ee({ + const t = new z({ value: [new ue({ value: this.version })] }); + return this.baseCertificateID && t.valueBlock.value.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: this.baseCertificateID.toSchema().valueBlock.value - })), this.subjectName && t.valueBlock.value.push(new ee({ + })), this.subjectName && t.valueBlock.value.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 @@ -61038,7 +61084,7 @@ var tr, rI = (tr = class extends Ce { const t = { version: this.version }; return this.baseCertificateID && (t.baseCertificateID = this.baseCertificateID.toJSON()), this.subjectName && (t.subjectName = this.subjectName.toJSON()), t.issuer = this.issuer.toJSON(), t.signature = this.signature.toJSON(), t.serialNumber = this.serialNumber.toJSON(), t.attrCertValidityPeriod = this.attrCertValidityPeriod.toJSON(), t.attributes = Array.from(this.attributes, (n) => n.toJSON()), this.issuerUniqueID && (t.issuerUniqueID = this.issuerUniqueID.toJSON()), this.extensions && (t.extensions = this.extensions.toJSON()), t; } -}, tr.CLASS_NAME = "AttributeCertificateInfoV1", tr); +}, nr.CLASS_NAME = "AttributeCertificateInfoV1", nr); const qb = "acinfo", Gb = "signatureAlgorithm", Jb = "signatureValue", QIe = [ qb, Jb, @@ -61053,9 +61099,9 @@ var Hs, BO = (Hs = class extends Ce { case qb: return new rI(); case Gb: - return new fe(); + return new de(); case Jb: - return new ht(); + return new pt(); default: return super.defaultValues(t); } @@ -61066,8 +61112,8 @@ var Hs, BO = (Hs = class extends Ce { name: n.blockName || "", value: [ rI.schema(n.acinfo || {}), - fe.schema(n.signatureAlgorithm || {}), - new ht({ name: n.signatureValue || "" }) + de.schema(n.signatureAlgorithm || {}), + new pt({ name: n.signatureValue || "" }) ] }); } @@ -61078,7 +61124,7 @@ var Hs, BO = (Hs = class extends Ce { signatureAlgorithm: { names: { blockName: Gb } }, signatureValue: Jb } })); - ke.assertSchema(n, this.className), this.acinfo = new rI({ schema: n.result.acinfo }), this.signatureAlgorithm = new fe({ schema: n.result.signatureAlgorithm }), this.signatureValue = n.result.signatureValue; + ke.assertSchema(n, this.className), this.acinfo = new rI({ schema: n.result.acinfo }), this.signatureAlgorithm = new de({ schema: n.result.signatureAlgorithm }), this.signatureValue = n.result.signatureValue; } toSchema() { return new z({ value: [ @@ -61095,26 +61141,26 @@ var Hs, BO = (Hs = class extends Ce { }; } }, Hs.CLASS_NAME = "AttributeCertificateV1", Hs); -const Yb = "digestedObjectType", Ku = "otherObjectTypeID", Qb = "digestAlgorithm", Xb = "objectDigest", XIe = [ +const Yb = "digestedObjectType", Hu = "otherObjectTypeID", Qb = "digestAlgorithm", Xb = "objectDigest", XIe = [ Yb, - Ku, + Hu, Qb, Xb ]; -var cs, xg = (cs = class extends Ce { +var cs, Eg = (cs = class extends Ce { constructor(t = {}) { - super(), this.digestedObjectType = t[Yb] ?? cs.defaultValues(Yb), Ku in t && (this.otherObjectTypeID = t[Ku] ?? cs.defaultValues(Ku)), this.digestAlgorithm = t[Qb] ?? cs.defaultValues(Qb), this.objectDigest = t[Xb] ?? cs.defaultValues(Xb), t.schema && this.fromSchema(t.schema); + super(), this.digestedObjectType = t[Yb] ?? cs.defaultValues(Yb), Hu in t && (this.otherObjectTypeID = t[Hu] ?? cs.defaultValues(Hu)), this.digestAlgorithm = t[Qb] ?? cs.defaultValues(Qb), this.objectDigest = t[Xb] ?? cs.defaultValues(Xb), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case Yb: - return new Df(); - case Ku: - return new Ve(); + return new Ff(); + case Hu: + return new $e(); case Qb: - return new fe(); + return new de(); case Xb: - return new ht(); + return new pt(); default: return super.defaultValues(t); } @@ -61124,13 +61170,13 @@ var cs, xg = (cs = class extends Ce { return new z({ name: n.blockName || "", value: [ - new Df({ name: n.digestedObjectType || "" }), - new Ve({ + new Ff({ name: n.digestedObjectType || "" }), + new $e({ optional: !0, name: n.otherObjectTypeID || "" }), - fe.schema(n.digestAlgorithm || {}), - new ht({ name: n.objectDigest || "" }) + de.schema(n.digestAlgorithm || {}), + new pt({ name: n.objectDigest || "" }) ] }); } @@ -61138,11 +61184,11 @@ var cs, xg = (cs = class extends Ce { for (const r of XIe) delete t[r]; const n = Ee(t, t, cs.schema({ names: { digestedObjectType: Yb, - otherObjectTypeID: Ku, + otherObjectTypeID: Hu, digestAlgorithm: { names: { blockName: Qb } }, objectDigest: Xb } })); - ke.assertSchema(n, this.className), this.digestedObjectType = n.result.digestedObjectType, Ku in n.result && (this.otherObjectTypeID = n.result.otherObjectTypeID), this.digestAlgorithm = new fe({ schema: n.result.digestAlgorithm }), this.objectDigest = n.result.objectDigest; + ke.assertSchema(n, this.className), this.digestedObjectType = n.result.digestedObjectType, Hu in n.result && (this.otherObjectTypeID = n.result.otherObjectTypeID), this.digestAlgorithm = new de({ schema: n.result.digestAlgorithm }), this.objectDigest = n.result.objectDigest; } toSchema() { const t = new z({ value: [this.digestedObjectType] }); @@ -61157,23 +61203,23 @@ var cs, xg = (cs = class extends Ce { return this.otherObjectTypeID && (t.otherObjectTypeID = this.otherObjectTypeID.toJSON()), t; } }, cs.CLASS_NAME = "ObjectDigestInfo", cs); -const Hu = "issuerName", zu = "baseCertificateID", Wu = "objectDigestInfo", ZIe = [ - Hu, +const zu = "issuerName", Wu = "baseCertificateID", qu = "objectDigestInfo", ZIe = [ zu, - Wu + Wu, + qu ]; var zs, B4 = (zs = class extends Ce { constructor(t = {}) { - super(), Hu in t && (this.issuerName = t[Hu] ?? zs.defaultValues(Hu)), zu in t && (this.baseCertificateID = t[zu] ?? zs.defaultValues(zu)), Wu in t && (this.objectDigestInfo = t[Wu] ?? zs.defaultValues(Wu)), t.schema && this.fromSchema(t.schema); + super(), zu in t && (this.issuerName = t[zu] ?? zs.defaultValues(zu)), Wu in t && (this.baseCertificateID = t[Wu] ?? zs.defaultValues(Wu)), qu in t && (this.objectDigestInfo = t[qu] ?? zs.defaultValues(qu)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Hu: - return new hr(); case zu: - return new Ka(); + return new pr(); case Wu: - return new xg(); + return new Ka(); + case qu: + return new Eg(); default: return super.defaultValues(t); } @@ -61183,8 +61229,8 @@ var zs, B4 = (zs = class extends Ce { return new z({ name: n.blockName || "", value: [ - hr.schema({ names: { blockName: n.issuerName } }, !0), - new ee({ + pr.schema({ names: { blockName: n.issuerName } }, !0), + new ne({ optional: !0, name: n.baseCertificateID || "", idBlock: { @@ -61193,14 +61239,14 @@ var zs, B4 = (zs = class extends Ce { }, value: Ka.schema().valueBlock.value }), - new ee({ + new ne({ optional: !0, name: n.objectDigestInfo || "", idBlock: { tagClass: 3, tagNumber: 1 }, - value: xg.schema().valueBlock.value + value: Eg.schema().valueBlock.value }) ] }); @@ -61208,21 +61254,21 @@ var zs, B4 = (zs = class extends Ce { fromSchema(t) { for (const r of ZIe) delete t[r]; const n = Ee(t, t, zs.schema({ names: { - issuerName: Hu, - baseCertificateID: zu, - objectDigestInfo: Wu + issuerName: zu, + baseCertificateID: Wu, + objectDigestInfo: qu } })); - ke.assertSchema(n, this.className), Hu in n.result && (this.issuerName = new hr({ schema: n.result.issuerName })), zu in n.result && (this.baseCertificateID = new Ka({ schema: new z({ value: n.result.baseCertificateID.valueBlock.value }) })), Wu in n.result && (this.objectDigestInfo = new xg({ schema: new z({ value: n.result.objectDigestInfo.valueBlock.value }) })); + ke.assertSchema(n, this.className), zu in n.result && (this.issuerName = new pr({ schema: n.result.issuerName })), Wu in n.result && (this.baseCertificateID = new Ka({ schema: new z({ value: n.result.baseCertificateID.valueBlock.value }) })), qu in n.result && (this.objectDigestInfo = new Eg({ schema: new z({ value: n.result.objectDigestInfo.valueBlock.value }) })); } toSchema() { const t = new z(); - return this.issuerName && t.valueBlock.value.push(this.issuerName.toSchema()), this.baseCertificateID && t.valueBlock.value.push(new ee({ + return this.issuerName && t.valueBlock.value.push(this.issuerName.toSchema()), this.baseCertificateID && t.valueBlock.value.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: this.baseCertificateID.toSchema().valueBlock.value - })), this.objectDigestInfo && t.valueBlock.value.push(new ee({ + })), this.objectDigestInfo && t.valueBlock.value.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 @@ -61235,23 +61281,23 @@ var zs, B4 = (zs = class extends Ce { return this.issuerName && (t.issuerName = this.issuerName.toJSON()), this.baseCertificateID && (t.baseCertificateID = this.baseCertificateID.toJSON()), this.objectDigestInfo && (t.objectDigestInfo = this.objectDigestInfo.toJSON()), t; } }, zs.CLASS_NAME = "V2Form", zs); -const qu = "baseCertificateID", Gu = "entityName", Ju = "objectDigestInfo", eNe = [ - qu, +const Gu = "baseCertificateID", Ju = "entityName", Yu = "objectDigestInfo", eNe = [ Gu, - Ju + Ju, + Yu ]; var Ws, oI = (Ws = class extends Ce { constructor(t = {}) { - super(), qu in t && (this.baseCertificateID = t[qu] ?? Ws.defaultValues(qu)), Gu in t && (this.entityName = t[Gu] ?? Ws.defaultValues(Gu)), Ju in t && (this.objectDigestInfo = t[Ju] ?? Ws.defaultValues(Ju)), t.schema && this.fromSchema(t.schema); + super(), Gu in t && (this.baseCertificateID = t[Gu] ?? Ws.defaultValues(Gu)), Ju in t && (this.entityName = t[Ju] ?? Ws.defaultValues(Ju)), Yu in t && (this.objectDigestInfo = t[Yu] ?? Ws.defaultValues(Yu)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case qu: - return new Ka(); case Gu: - return new hr(); + return new Ka(); case Ju: - return new xg(); + return new pr(); + case Yu: + return new Eg(); default: return super.defaultValues(t); } @@ -61261,7 +61307,7 @@ var Ws, oI = (Ws = class extends Ce { return new z({ name: n.blockName || "", value: [ - new ee({ + new ne({ optional: !0, name: n.baseCertificateID || "", idBlock: { @@ -61270,23 +61316,23 @@ var Ws, oI = (Ws = class extends Ce { }, value: Ka.schema().valueBlock.value }), - new ee({ + new ne({ optional: !0, name: n.entityName || "", idBlock: { tagClass: 3, tagNumber: 1 }, - value: hr.schema().valueBlock.value + value: pr.schema().valueBlock.value }), - new ee({ + new ne({ optional: !0, name: n.objectDigestInfo || "", idBlock: { tagClass: 3, tagNumber: 2 }, - value: xg.schema().valueBlock.value + value: Eg.schema().valueBlock.value }) ] }); @@ -61294,27 +61340,27 @@ var Ws, oI = (Ws = class extends Ce { fromSchema(t) { for (const r of eNe) delete t[r]; const n = Ee(t, t, Ws.schema({ names: { - baseCertificateID: qu, - entityName: Gu, - objectDigestInfo: Ju + baseCertificateID: Gu, + entityName: Ju, + objectDigestInfo: Yu } })); - ke.assertSchema(n, this.className), qu in n.result && (this.baseCertificateID = new Ka({ schema: new z({ value: n.result.baseCertificateID.valueBlock.value }) })), Gu in n.result && (this.entityName = new hr({ schema: new z({ value: n.result.entityName.valueBlock.value }) })), Ju in n.result && (this.objectDigestInfo = new xg({ schema: new z({ value: n.result.objectDigestInfo.valueBlock.value }) })); + ke.assertSchema(n, this.className), Gu in n.result && (this.baseCertificateID = new Ka({ schema: new z({ value: n.result.baseCertificateID.valueBlock.value }) })), Ju in n.result && (this.entityName = new pr({ schema: new z({ value: n.result.entityName.valueBlock.value }) })), Yu in n.result && (this.objectDigestInfo = new Eg({ schema: new z({ value: n.result.objectDigestInfo.valueBlock.value }) })); } toSchema() { const t = new z(); - return this.baseCertificateID && t.valueBlock.value.push(new ee({ + return this.baseCertificateID && t.valueBlock.value.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: this.baseCertificateID.toSchema().valueBlock.value - })), this.entityName && t.valueBlock.value.push(new ee({ + })), this.entityName && t.valueBlock.value.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, value: this.entityName.toSchema().valueBlock.value - })), this.objectDigestInfo && t.valueBlock.value.push(new ee({ + })), this.objectDigestInfo && t.valueBlock.value.push(new ne({ idBlock: { tagClass: 3, tagNumber: 2 @@ -61327,7 +61373,7 @@ var Ws, oI = (Ws = class extends Ce { return this.baseCertificateID && (t.baseCertificateID = this.baseCertificateID.toJSON()), this.entityName && (t.entityName = this.entityName.toJSON()), this.objectDigestInfo && (t.objectDigestInfo = this.objectDigestInfo.toJSON()), t; } }, Ws.CLASS_NAME = "Holder", Ws); -const Zb = "version", ew = "holder", tw = "issuer", nw = "signature", rw = "serialNumber", ow = "attrCertValidityPeriod", sw = "attributes", Yu = "issuerUniqueID", Qu = "extensions", tNe = [ +const Zb = "version", ew = "holder", tw = "issuer", nw = "signature", rw = "serialNumber", ow = "attrCertValidityPeriod", sw = "attributes", Qu = "issuerUniqueID", Xu = "extensions", tNe = [ Zb, ew, tw, @@ -61335,12 +61381,12 @@ const Zb = "version", ew = "holder", tw = "issuer", nw = "signature", rw = "seri rw, ow, sw, - Yu, - Qu + Qu, + Xu ]; -var lr, sI = (lr = class extends Ce { +var ur, sI = (ur = class extends Ce { constructor(t = {}) { - super(), this.version = t[Zb] ?? lr.defaultValues(Zb), this.holder = t[ew] ?? lr.defaultValues(ew), this.issuer = t[tw] ?? lr.defaultValues(tw), this.signature = t[nw] ?? lr.defaultValues(nw), this.serialNumber = t[rw] ?? lr.defaultValues(rw), this.attrCertValidityPeriod = t[ow] ?? lr.defaultValues(ow), this.attributes = t[sw] ?? lr.defaultValues(sw), Yu in t && (this.issuerUniqueID = t[Yu] ?? lr.defaultValues(Yu)), Qu in t && (this.extensions = t[Qu] ?? lr.defaultValues(Qu)), t.schema && this.fromSchema(t.schema); + super(), this.version = t[Zb] ?? ur.defaultValues(Zb), this.holder = t[ew] ?? ur.defaultValues(ew), this.issuer = t[tw] ?? ur.defaultValues(tw), this.signature = t[nw] ?? ur.defaultValues(nw), this.serialNumber = t[rw] ?? ur.defaultValues(rw), this.attrCertValidityPeriod = t[ow] ?? ur.defaultValues(ow), this.attributes = t[sw] ?? ur.defaultValues(sw), Qu in t && (this.issuerUniqueID = t[Qu] ?? ur.defaultValues(Qu)), Xu in t && (this.extensions = t[Xu] ?? ur.defaultValues(Xu)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -61351,16 +61397,16 @@ var lr, sI = (lr = class extends Ce { case tw: return {}; case nw: - return new fe(); - case rw: return new de(); + case rw: + return new ue(); case ow: - return new Ag(); + return new Sg(); case sw: return []; - case Yu: - return new ht(); case Qu: + return new pt(); + case Xu: return new jn(); default: return super.defaultValues(t); @@ -61371,9 +61417,9 @@ var lr, sI = (lr = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || "" }), + new ue({ name: n.version || "" }), oI.schema(n.holder || {}), - new Xt({ value: [hr.schema({ names: { blockName: n.issuer || "" } }), new ee({ + new en({ value: [pr.schema({ names: { blockName: n.issuer || "" } }), new ne({ name: n.issuer || "", idBlock: { tagClass: 3, @@ -61381,14 +61427,14 @@ var lr, sI = (lr = class extends Ce { }, value: B4.schema().valueBlock.value })] }), - fe.schema(n.signature || {}), - new de({ name: n.serialNumber || "" }), - Ag.schema(n.attrCertValidityPeriod || {}), + de.schema(n.signature || {}), + new ue({ name: n.serialNumber || "" }), + Sg.schema(n.attrCertValidityPeriod || {}), new z({ name: n.attributes || "", - value: [new ot({ value: En.schema() })] + value: [new st({ value: En.schema() })] }), - new ht({ + new pt({ optional: !0, name: n.issuerUniqueID || "" }), @@ -61398,7 +61444,7 @@ var lr, sI = (lr = class extends Ce { } fromSchema(t) { for (const r of tNe) delete t[r]; - const n = Ee(t, t, lr.schema({ names: { + const n = Ee(t, t, ur.schema({ names: { version: Zb, holder: { names: { blockName: ew } }, issuer: tw, @@ -61406,8 +61452,8 @@ var lr, sI = (lr = class extends Ce { serialNumber: rw, attrCertValidityPeriod: { names: { blockName: ow } }, attributes: sw, - issuerUniqueID: Yu, - extensions: { names: { blockName: Qu } } + issuerUniqueID: Qu, + extensions: { names: { blockName: Xu } } } })); switch (ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.holder = new oI({ schema: n.result.holder }), n.result.issuer.idBlock.tagClass) { case 3: @@ -61416,13 +61462,13 @@ var lr, sI = (lr = class extends Ce { default: throw new Error("Incorrect value for 'issuer' in AttributeCertificateInfoV2"); } - this.signature = new fe({ schema: n.result.signature }), this.serialNumber = n.result.serialNumber, this.attrCertValidityPeriod = new Ag({ schema: n.result.attrCertValidityPeriod }), this.attributes = Array.from(n.result.attributes.valueBlock.value, (r) => new En({ schema: r })), Yu in n.result && (this.issuerUniqueID = n.result.issuerUniqueID), Qu in n.result && (this.extensions = new jn({ schema: n.result.extensions })); + this.signature = new de({ schema: n.result.signature }), this.serialNumber = n.result.serialNumber, this.attrCertValidityPeriod = new Sg({ schema: n.result.attrCertValidityPeriod }), this.attributes = Array.from(n.result.attributes.valueBlock.value, (r) => new En({ schema: r })), Qu in n.result && (this.issuerUniqueID = n.result.issuerUniqueID), Xu in n.result && (this.extensions = new jn({ schema: n.result.extensions })); } toSchema() { const t = new z({ value: [ - new de({ value: this.version }), + new ue({ value: this.version }), this.holder.toSchema(), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -61448,13 +61494,13 @@ var lr, sI = (lr = class extends Ce { }; return this.issuerUniqueID && (t.issuerUniqueID = this.issuerUniqueID.toJSON()), this.extensions && (t.extensions = this.extensions.toJSON()), t; } -}, lr.CLASS_NAME = "AttributeCertificateInfoV2", lr); +}, ur.CLASS_NAME = "AttributeCertificateInfoV2", ur); const iw = "acinfo", aw = "signatureAlgorithm", cw = "signatureValue", nNe = [ iw, aw, cw ]; -var qs, Bd = (qs = class extends Ce { +var qs, Ld = (qs = class extends Ce { constructor(t = {}) { super(), this.acinfo = t[iw] ?? qs.defaultValues(iw), this.signatureAlgorithm = t[aw] ?? qs.defaultValues(aw), this.signatureValue = t[cw] ?? qs.defaultValues(cw), t.schema && this.fromSchema(t.schema); } @@ -61463,9 +61509,9 @@ var qs, Bd = (qs = class extends Ce { case iw: return new sI(); case aw: - return new fe(); + return new de(); case cw: - return new ht(); + return new pt(); default: return super.defaultValues(t); } @@ -61476,8 +61522,8 @@ var qs, Bd = (qs = class extends Ce { name: n.blockName || "", value: [ sI.schema(n.acinfo || {}), - fe.schema(n.signatureAlgorithm || {}), - new ht({ name: n.signatureValue || "" }) + de.schema(n.signatureAlgorithm || {}), + new pt({ name: n.signatureValue || "" }) ] }); } @@ -61488,7 +61534,7 @@ var qs, Bd = (qs = class extends Ce { signatureAlgorithm: { names: { blockName: aw } }, signatureValue: cw } })); - ke.assertSchema(n, this.className), this.acinfo = new sI({ schema: n.result.acinfo }), this.signatureAlgorithm = new fe({ schema: n.result.signatureAlgorithm }), this.signatureValue = n.result.signatureValue; + ke.assertSchema(n, this.className), this.acinfo = new sI({ schema: n.result.acinfo }), this.signatureAlgorithm = new de({ schema: n.result.signatureAlgorithm }), this.signatureValue = n.result.signatureValue; } toSchema() { return new z({ value: [ @@ -61505,16 +61551,16 @@ var qs, Bd = (qs = class extends Ce { }; } }, qs.CLASS_NAME = "AttributeCertificateV2", qs); -const Xu = "contentType", Hh = "content", rNe = [Xu, Hh]; -var oo, Yn = (oo = class extends Ce { +const Zu = "contentType", zh = "content", rNe = [Zu, zh]; +var so, Yn = (so = class extends Ce { constructor(t = {}) { - super(), this.contentType = t[Xu] ?? oo.defaultValues(Xu), this.content = t[Hh] ?? oo.defaultValues(Hh), t.schema && this.fromSchema(t.schema); + super(), this.contentType = t[Zu] ?? so.defaultValues(Zu), this.content = t[zh] ?? so.defaultValues(zh), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Xu: + case Zu: return ""; - case Hh: + case zh: return new Xe(); default: return super.defaultValues(t); @@ -61522,9 +61568,9 @@ var oo, Yn = (oo = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case Xu: - return typeof n == "string" && n === this.defaultValues(Xu); - case Hh: + case Zu: + return typeof n == "string" && n === this.defaultValues(Zu); + case zh: return n instanceof Xe; default: return super.defaultValues(t); @@ -61535,22 +61581,22 @@ var oo, Yn = (oo = class extends Ce { return "optional" in n || (n.optional = !1), new z({ name: n.blockName || "ContentInfo", optional: n.optional, - value: [new Ve({ name: n.contentType || Xu }), new ee({ + value: [new $e({ name: n.contentType || Zu }), new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new Xe({ name: n.content || Hh })] + value: [new Xe({ name: n.content || zh })] })] }); } fromSchema(t) { for (const r of rNe) delete t[r]; - const n = Ee(t, t, oo.schema()); + const n = Ee(t, t, so.schema()); ke.assertSchema(n, this.className), this.contentType = n.result.contentType.valueBlock.toString(), this.content = n.result.content; } toSchema() { - return new z({ value: [new Ve({ value: this.contentType }), new ee({ + return new z({ value: [new $e({ value: this.contentType }), new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -61562,19 +61608,19 @@ var oo, Yn = (oo = class extends Ce { const t = { contentType: this.contentType }; return this.content instanceof Xe || (t.content = this.content.toJSON()), t; } -}, oo.CLASS_NAME = "ContentInfo", oo.DATA = iT, oo.SIGNED_DATA = QCe, oo.ENVELOPED_DATA = pq, oo.ENCRYPTED_DATA = gq, oo); -const zh = "certId", Wh = "certValue", yh = "parsedValue", oNe = [zh, Wh]; +}, so.CLASS_NAME = "ContentInfo", so.DATA = iT, so.SIGNED_DATA = QCe, so.ENVELOPED_DATA = pq, so.ENCRYPTED_DATA = gq, so); +const Wh = "certId", qh = "certValue", wh = "parsedValue", oNe = [Wh, qh]; var Gs, sNe = (Gs = class extends Ce { constructor(t = {}) { - super(), this.certId = t[zh] ?? Gs.defaultValues(zh), this.certValue = t[Wh] ?? Gs.defaultValues(Wh), yh in t && (this.parsedValue = t[yh] ?? Gs.defaultValues(yh)), t.schema && this.fromSchema(t.schema); + super(), this.certId = t[Wh] ?? Gs.defaultValues(Wh), this.certValue = t[qh] ?? Gs.defaultValues(qh), wh in t && (this.parsedValue = t[wh] ?? Gs.defaultValues(wh)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case zh: - return ""; case Wh: + return ""; + case qh: return new Xe(); - case yh: + case wh: return {}; default: return super.defaultValues(t); @@ -61582,11 +61628,11 @@ var Gs, sNe = (Gs = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case zh: - return n === ""; case Wh: + return n === ""; + case qh: return n instanceof Xe; - case yh: + case wh: return n instanceof Object && Object.keys(n).length === 0; default: return super.defaultValues(t); @@ -61596,7 +61642,7 @@ var Gs, sNe = (Gs = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.id || "id" }), new ee({ + value: [new $e({ name: n.id || "id" }), new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -61608,8 +61654,8 @@ var Gs, sNe = (Gs = class extends Ce { fromSchema(t) { for (const o of oNe) delete t[o]; const n = Ee(t, t, Gs.schema({ names: { - id: zh, - value: Wh + id: Wh, + value: qh } })); ke.assertSchema(n, this.className), this.certId = n.result.certId.valueBlock.toString(), this.certValue = n.result.certValue; const r = this.certValue.valueBlock.valueHexView; @@ -61618,11 +61664,11 @@ var Gs, sNe = (Gs = class extends Ce { try { this.parsedValue = Mr.fromBER(r); } catch { - Bd.fromBER(r); + Ld.fromBER(r); } break; case a4: - this.parsedValue = Bd.fromBER(r); + this.parsedValue = Ld.fromBER(r); break; case XCe: default: @@ -61630,7 +61676,7 @@ var Gs, sNe = (Gs = class extends Ce { } } toSchema() { - return yh in this && ("acinfo" in this.parsedValue ? this.certId = a4 : this.certId = i4, this.certValue = new Oe({ valueHex: this.parsedValue.toSchema().toBER(!1) })), new z({ value: [new Ve({ value: this.certId }), new ee({ + return wh in this && ("acinfo" in this.parsedValue ? this.certId = a4 : this.certId = i4, this.certValue = new Oe({ valueHex: this.parsedValue.toSchema().toBER(!1) })), new z({ value: [new $e({ value: this.certId }), new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -61645,22 +61691,22 @@ var Gs, sNe = (Gs = class extends Ce { }; } }, Gs.CLASS_NAME = "CertBag", Gs); -const lw = "userCertificate", qh = "revocationDate", Zu = "crlEntryExtensions", iNe = [ +const lw = "userCertificate", Gh = "revocationDate", ed = "crlEntryExtensions", iNe = [ lw, - qh, - Zu + Gh, + ed ]; var Js, xq = (Js = class extends Ce { constructor(t = {}) { - super(), this.userCertificate = t[lw] ?? Js.defaultValues(lw), this.revocationDate = t[qh] ?? Js.defaultValues(qh), Zu in t && (this.crlEntryExtensions = t[Zu] ?? Js.defaultValues(Zu)), t.schema && this.fromSchema(t.schema); + super(), this.userCertificate = t[lw] ?? Js.defaultValues(lw), this.revocationDate = t[Gh] ?? Js.defaultValues(Gh), ed in t && (this.crlEntryExtensions = t[ed] ?? Js.defaultValues(ed)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case lw: - return new de(); - case qh: - return new or(); - case Zu: + return new ue(); + case Gh: + return new sr(); + case ed: return new jn(); default: return super.defaultValues(t); @@ -61671,19 +61717,19 @@ var Js, xq = (Js = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.userCertificate || lw }), - or.schema({ names: { - utcTimeName: n.revocationDate || qh, - generalTimeName: n.revocationDate || qh + new ue({ name: n.userCertificate || lw }), + sr.schema({ names: { + utcTimeName: n.revocationDate || Gh, + generalTimeName: n.revocationDate || Gh } }), - jn.schema({ names: { blockName: n.crlEntryExtensions || Zu } }, !0) + jn.schema({ names: { blockName: n.crlEntryExtensions || ed } }, !0) ] }); } fromSchema(t) { for (const r of iNe) delete t[r]; const n = Ee(t, t, Js.schema()); - ke.assertSchema(n, this.className), this.userCertificate = n.result.userCertificate, this.revocationDate = new or({ schema: n.result.revocationDate }), Zu in n.result && (this.crlEntryExtensions = new jn({ schema: n.result.crlEntryExtensions })); + ke.assertSchema(n, this.className), this.userCertificate = n.result.userCertificate, this.revocationDate = new sr({ schema: n.result.revocationDate }), ed in n.result && (this.crlEntryExtensions = new jn({ schema: n.result.crlEntryExtensions })); } toSchema() { const t = [this.userCertificate, this.revocationDate.toSchema()]; @@ -61714,33 +61760,33 @@ function cNe(e = {}) { return new z({ name: t.blockName || rc, value: [ - new de({ + new ue({ optional: !0, name: t.tbsCertListVersion || fx, value: 2 }), - fe.schema(t.signature || { names: { blockName: hT } }), - Qt.schema(t.issuer || { names: { blockName: pT } }), - or.schema(t.tbsCertListThisUpdate || { names: { + de.schema(t.signature || { names: { blockName: hT } }), + Zt.schema(t.issuer || { names: { blockName: pT } }), + sr.schema(t.tbsCertListThisUpdate || { names: { utcTimeName: hx, generalTimeName: hx } }), - or.schema(t.tbsCertListNextUpdate || { names: { + sr.schema(t.tbsCertListNextUpdate || { names: { utcTimeName: G0, generalTimeName: G0 } }, !0), new z({ optional: !0, - value: [new ot({ + value: [new st({ name: t.tbsCertListRevokedCertificates || px, value: new z({ value: [ - new de(), - or.schema(), + new ue(), + sr.schema(), jn.schema({}, !0) ] }) })] }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, @@ -61780,21 +61826,21 @@ var Rn, J0 = (Rn = class extends Ce { case Sy: return 0; case aI: - return new fe(); + return new de(); case cI: - return new Qt(); + return new Zt(); case lI: - return new or(); + return new sr(); case ok: - return new or(); + return new sr(); case sk: return []; case ik: return new jn(); case uw: - return new fe(); + return new de(); case dw: - return new ht(); + return new pt(); default: return super.defaultValues(t); } @@ -61805,19 +61851,19 @@ var Rn, J0 = (Rn = class extends Ce { name: n.blockName || "CertificateList", value: [ cNe(t), - fe.schema(n.signatureAlgorithm || { names: { blockName: uw } }), - new ht({ name: n.signatureValue || dw }) + de.schema(n.signatureAlgorithm || { names: { blockName: uw } }), + new pt({ name: n.signatureValue || dw }) ] }); } fromSchema(t) { for (const r of aNe) delete t[r]; const n = Ee(t, t, Rn.schema()); - ke.assertSchema(n, this.className), this.tbsView = n.result.tbsCertList.valueBeforeDecodeView, fx in n.result && (this.version = n.result[fx].valueBlock.valueDec), this.signature = new fe({ schema: n.result[hT] }), this.issuer = new Qt({ schema: n.result[pT] }), this.thisUpdate = new or({ schema: n.result[hx] }), G0 in n.result && (this.nextUpdate = new or({ schema: n.result[G0] })), px in n.result && (this.revokedCertificates = Array.from(n.result[px], (r) => new xq({ schema: r }))), gx in n.result && (this.crlExtensions = new jn({ schema: n.result[gx] })), this.signatureAlgorithm = new fe({ schema: n.result.signatureAlgorithm }), this.signatureValue = n.result.signatureValue; + ke.assertSchema(n, this.className), this.tbsView = n.result.tbsCertList.valueBeforeDecodeView, fx in n.result && (this.version = n.result[fx].valueBlock.valueDec), this.signature = new de({ schema: n.result[hT] }), this.issuer = new Zt({ schema: n.result[pT] }), this.thisUpdate = new sr({ schema: n.result[hx] }), G0 in n.result && (this.nextUpdate = new sr({ schema: n.result[G0] })), px in n.result && (this.revokedCertificates = Array.from(n.result[px], (r) => new xq({ schema: r }))), gx in n.result && (this.crlExtensions = new jn({ schema: n.result[gx] })), this.signatureAlgorithm = new de({ schema: n.result.signatureAlgorithm }), this.signatureValue = n.result.signatureValue; } encodeTBS() { const t = []; - return this.version !== Rn.defaultValues(Sy) && t.push(new de({ value: this.version })), t.push(this.signature.toSchema()), t.push(this.issuer.toSchema()), t.push(this.thisUpdate.toSchema()), this.nextUpdate && t.push(this.nextUpdate.toSchema()), this.revokedCertificates && t.push(new z({ value: Array.from(this.revokedCertificates, (n) => n.toSchema()) })), this.crlExtensions && t.push(new ee({ + return this.version !== Rn.defaultValues(Sy) && t.push(new ue({ value: this.version })), t.push(this.signature.toSchema()), t.push(this.issuer.toSchema()), t.push(this.thisUpdate.toSchema()), this.nextUpdate && t.push(this.nextUpdate.toSchema()), this.revokedCertificates && t.push(new z({ value: Array.from(this.revokedCertificates, (n) => n.toSchema()) })), this.crlExtensions && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -61832,7 +61878,7 @@ var Rn, J0 = (Rn = class extends Ce { n = this.encodeTBS(); else { if (!this.tbsView.byteLength) return Rn.schema(); - const r = hn(this.tbsView); + const r = pn(this.tbsView); ke.assert(r, "TBS Certificate Revocation List"), n = r.result; } return new z({ value: [ @@ -61843,7 +61889,7 @@ var Rn, J0 = (Rn = class extends Ce { } toJSON() { const t = { - tbs: Xn.encode(this.tbsView), + tbs: Zn.encode(this.tbsView), version: this.version, signature: this.signature.toJSON(), issuer: this.issuer.toJSON(), @@ -61863,7 +61909,7 @@ var Rn, J0 = (Rn = class extends Ce { const o = await r.getSignatureParameters(t, n), { parameters: s } = o; this.signature = o.signatureAlgorithm, this.signatureAlgorithm = o.signatureAlgorithm, this.tbsView = new Uint8Array(this.encodeTBS().toBER()); const i = await r.signWithPrivateKey(this.tbsView, t, s); - this.signatureValue = new ht({ valueHex: i }); + this.signatureValue = new pt({ valueHex: i }); } async verify(t = {}, n = Ye(!0)) { let r; @@ -61877,16 +61923,16 @@ var Rn, J0 = (Rn = class extends Ce { return n.verifyWithPublicKey(this.tbsView, this.signatureValue, r, this.signatureAlgorithm); } }, Rn.CLASS_NAME = "CertificateRevocationList", Rn); -const Gh = "crlId", Jh = "crlValue", xy = "parsedValue", uNe = [Gh, Jh]; +const Jh = "crlId", Yh = "crlValue", xy = "parsedValue", uNe = [Jh, Yh]; var Ys, dNe = (Ys = class extends Ce { constructor(t = {}) { - super(), this.crlId = t[Gh] ?? Ys.defaultValues(Gh), this.crlValue = t[Jh] ?? Ys.defaultValues(Jh), xy in t && (this.parsedValue = t[xy] ?? Ys.defaultValues(xy)), t.schema && this.fromSchema(t.schema); + super(), this.crlId = t[Jh] ?? Ys.defaultValues(Jh), this.crlValue = t[Yh] ?? Ys.defaultValues(Yh), xy in t && (this.parsedValue = t[xy] ?? Ys.defaultValues(xy)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Gh: - return ""; case Jh: + return ""; + case Yh: return new Xe(); case xy: return {}; @@ -61896,9 +61942,9 @@ var Ys, dNe = (Ys = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case Gh: - return n === ""; case Jh: + return n === ""; + case Yh: return n instanceof Xe; case xy: return n instanceof Object && Object.keys(n).length === 0; @@ -61910,7 +61956,7 @@ var Ys, dNe = (Ys = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.id || "id" }), new ee({ + value: [new $e({ name: n.id || "id" }), new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -61922,8 +61968,8 @@ var Ys, dNe = (Ys = class extends Ce { fromSchema(t) { for (const r of uNe) delete t[r]; const n = Ee(t, t, Ys.schema({ names: { - id: Gh, - value: Jh + id: Jh, + value: Yh } })); switch (ke.assertSchema(n, this.className), this.crlId = n.result.crlId.valueBlock.toString(), this.crlValue = n.result.crlValue, this.crlId) { case c4: @@ -61934,7 +61980,7 @@ var Ys, dNe = (Ys = class extends Ce { } } toSchema() { - return this.parsedValue && (this.crlId = c4, this.crlValue = new Oe({ valueHex: this.parsedValue.toSchema().toBER(!1) })), new z({ value: [new Ve({ value: this.crlId }), new ee({ + return this.parsedValue && (this.crlId = c4, this.crlValue = new Oe({ valueHex: this.parsedValue.toSchema().toBER(!1) })), new z({ value: [new $e({ value: this.crlId }), new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -61949,22 +61995,22 @@ var Ys, dNe = (Ys = class extends Ce { }; } }, Ys.CLASS_NAME = "CRLBag", Ys); -const Yh = "version", Qh = "encryptedContentInfo", Dc = "unprotectedAttrs", fNe = [ - Yh, +const Qh = "version", Xh = "encryptedContentInfo", jc = "unprotectedAttrs", fNe = [ Qh, - Dc + Xh, + jc ]; var Qs, mx = (Qs = class extends Ce { constructor(t = {}) { - super(), this.version = t[Yh] ?? Qs.defaultValues(Yh), this.encryptedContentInfo = t[Qh] ?? Qs.defaultValues(Qh), Dc in t && (this.unprotectedAttrs = t[Dc] ?? Qs.defaultValues(Dc)), t.schema && this.fromSchema(t.schema); + super(), this.version = t[Qh] ?? Qs.defaultValues(Qh), this.encryptedContentInfo = t[Xh] ?? Qs.defaultValues(Xh), jc in t && (this.unprotectedAttrs = t[jc] ?? Qs.defaultValues(jc)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Yh: - return 0; case Qh: + return 0; + case Xh: return new Ir(); - case Dc: + case jc: return []; default: return super.defaultValues(t); @@ -61972,11 +62018,11 @@ var Qs, mx = (Qs = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case Yh: - return n === 0; case Qh: + return n === 0; + case Xh: return Ir.compareWithDefault("contentType", n.contentType) && Ir.compareWithDefault("contentEncryptionAlgorithm", n.contentEncryptionAlgorithm) && Ir.compareWithDefault("encryptedContent", n.encryptedContent); - case Dc: + case jc: return n.length === 0; default: return super.defaultValues(t); @@ -61987,15 +62033,15 @@ var Qs, mx = (Qs = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || "" }), + new ue({ name: n.version || "" }), Ir.schema(n.encryptedContentInfo || {}), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 1 }, - value: [new ot({ + value: [new st({ name: n.unprotectedAttrs || "", value: En.schema() })] @@ -62006,15 +62052,15 @@ var Qs, mx = (Qs = class extends Ce { fromSchema(t) { for (const r of fNe) delete t[r]; const n = Ee(t, t, Qs.schema({ names: { - version: Yh, - encryptedContentInfo: { names: { blockName: Qh } }, - unprotectedAttrs: Dc + version: Qh, + encryptedContentInfo: { names: { blockName: Xh } }, + unprotectedAttrs: jc } })); - ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.encryptedContentInfo = new Ir({ schema: n.result.encryptedContentInfo }), Dc in n.result && (this.unprotectedAttrs = Array.from(n.result.unprotectedAttrs, (r) => new En({ schema: r }))); + ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.encryptedContentInfo = new Ir({ schema: n.result.encryptedContentInfo }), jc in n.result && (this.unprotectedAttrs = Array.from(n.result.unprotectedAttrs, (r) => new En({ schema: r }))); } toSchema() { const t = []; - return t.push(new de({ value: this.version })), t.push(this.encryptedContentInfo.toSchema()), this.unprotectedAttrs && t.push(new ee({ + return t.push(new ue({ value: this.version })), t.push(this.encryptedContentInfo.toSchema()), this.unprotectedAttrs && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -62031,7 +62077,7 @@ var Qs, mx = (Qs = class extends Ce { return this.unprotectedAttrs && (t.unprotectedAttrs = Array.from(this.unprotectedAttrs, (n) => n.toJSON())), t; } async encrypt(t, n = Ye(!0)) { - Ut.assert(t, "parameters", "object"); + zt.assert(t, "parameters", "object"); const r = { ...t, contentType: "1.2.840.113549.1.7.1" @@ -62039,7 +62085,7 @@ var Qs, mx = (Qs = class extends Ce { this.encryptedContentInfo = await n.encryptEncryptedContentInfo(r); } async decrypt(t, n = Ye(!0)) { - Ut.assert(t, "parameters", "object"); + zt.assert(t, "parameters", "object"); const r = { ...t, encryptedContentInfo: this.encryptedContentInfo @@ -62047,16 +62093,16 @@ var Qs, mx = (Qs = class extends Ce { return n.decryptEncryptedContentInfo(r); } }, Qs.CLASS_NAME = "EncryptedData", Qs); -const ed = "encryptionAlgorithm", jc = "encryptedData", Ey = "parsedValue", hNe = [ed, jc]; +const td = "encryptionAlgorithm", Fc = "encryptedData", Ey = "parsedValue", hNe = [td, Fc]; var ls, pNe = (ls = class extends Ce { constructor(t = {}) { - super(), this.encryptionAlgorithm = t[ed] ?? ls.defaultValues(ed), this.encryptedData = t[jc] ?? ls.defaultValues(jc), Ey in t && (this.parsedValue = t[Ey] ?? ls.defaultValues(Ey)), t.schema && this.fromSchema(t.schema); + super(), this.encryptionAlgorithm = t[td] ?? ls.defaultValues(td), this.encryptedData = t[Fc] ?? ls.defaultValues(Fc), Ey in t && (this.parsedValue = t[Ey] ?? ls.defaultValues(Ey)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case ed: - return new fe(); - case jc: + case td: + return new de(); + case Fc: return new Oe(); case Ey: return {}; @@ -62066,9 +62112,9 @@ var ls, pNe = (ls = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case ed: - return fe.compareWithDefault("algorithmId", n.algorithmId) && !("algorithmParams" in n); - case jc: + case td: + return de.compareWithDefault("algorithmId", n.algorithmId) && !("algorithmParams" in n); + case Fc: return n.isEqual(ls.defaultValues(t)); case Ey: return n instanceof Object && Object.keys(n).length === 0; @@ -62080,19 +62126,19 @@ var ls, pNe = (ls = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [fe.schema(n.encryptionAlgorithm || { names: { blockName: ed } }), new Xt({ value: [new Oe({ name: n.encryptedData || jc }), new Oe({ + value: [de.schema(n.encryptionAlgorithm || { names: { blockName: td } }), new en({ value: [new Oe({ name: n.encryptedData || Fc }), new Oe({ idBlock: { isConstructed: !0 }, - name: n.encryptedData || jc + name: n.encryptedData || Fc })] })] }); } fromSchema(t) { for (const r of hNe) delete t[r]; const n = Ee(t, t, ls.schema({ names: { - encryptionAlgorithm: { names: { blockName: ed } }, - encryptedData: jc + encryptionAlgorithm: { names: { blockName: td } }, + encryptedData: Fc } })); - ke.assertSchema(n, this.className), this.encryptionAlgorithm = new fe({ schema: n.result.encryptionAlgorithm }), this.encryptedData = n.result.encryptedData; + ke.assertSchema(n, this.className), this.encryptionAlgorithm = new de({ schema: n.result.encryptionAlgorithm }), this.encryptedData = n.result.encryptedData; } toSchema() { return new z({ value: [this.encryptionAlgorithm.toSchema(), this.encryptedData] }); @@ -62120,16 +62166,16 @@ var ls, pNe = (ls = class extends Ce { this.encryptionAlgorithm = r.encryptedContentInfo.contentEncryptionAlgorithm, this.encryptedData = r.encryptedContentInfo.encryptedContent; } }, ls.CLASS_NAME = "PKCS8ShroudedKeyBag", ls); -const Xh = "secretTypeId", Zh = "secretValue", gNe = [Xh, Zh]; +const Zh = "secretTypeId", ep = "secretValue", gNe = [Zh, ep]; var Sa, mNe = (Sa = class extends Ce { constructor(t = {}) { - super(), this.secretTypeId = t[Xh] ?? Sa.defaultValues(Xh), this.secretValue = t[Zh] ?? Sa.defaultValues(Zh), t.schema && this.fromSchema(t.schema); + super(), this.secretTypeId = t[Zh] ?? Sa.defaultValues(Zh), this.secretValue = t[ep] ?? Sa.defaultValues(ep), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Xh: - return ""; case Zh: + return ""; + case ep: return new Xe(); default: return super.defaultValues(t); @@ -62137,9 +62183,9 @@ var Sa, mNe = (Sa = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case Xh: - return n === ""; case Zh: + return n === ""; + case ep: return n instanceof Xe; default: return super.defaultValues(t); @@ -62149,7 +62195,7 @@ var Sa, mNe = (Sa = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.id || "id" }), new ee({ + value: [new $e({ name: n.id || "id" }), new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -62161,13 +62207,13 @@ var Sa, mNe = (Sa = class extends Ce { fromSchema(t) { for (const r of gNe) delete t[r]; const n = Ee(t, t, Sa.schema({ names: { - id: Xh, - value: Zh + id: Zh, + value: ep } })); ke.assertSchema(n, this.className), this.secretTypeId = n.result.secretTypeId.valueBlock.toString(), this.secretValue = n.result.secretValue; } toSchema() { - return new z({ value: [new Ve({ value: this.secretTypeId }), new ee({ + return new z({ value: [new $e({ value: this.secretTypeId }), new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -62183,9 +62229,9 @@ var Sa, mNe = (Sa = class extends Ce { } }, Sa.CLASS_NAME = "SecretBag", Sa); //! NOTE Bag type must be imported after the SafeBagValueFactory declaration -var yNe = class td { +var yNe = class nd { static getItems() { - return this.items || (this.items = {}, td.register("1.2.840.113549.1.12.10.1.1", ix), td.register("1.2.840.113549.1.12.10.1.2", pNe), td.register("1.2.840.113549.1.12.10.1.3", sNe), td.register("1.2.840.113549.1.12.10.1.4", dNe), td.register("1.2.840.113549.1.12.10.1.5", mNe), td.register("1.2.840.113549.1.12.10.1.6", fw)), this.items; + return this.items || (this.items = {}, nd.register("1.2.840.113549.1.12.10.1.1", ix), nd.register("1.2.840.113549.1.12.10.1.2", pNe), nd.register("1.2.840.113549.1.12.10.1.3", sNe), nd.register("1.2.840.113549.1.12.10.1.4", dNe), nd.register("1.2.840.113549.1.12.10.1.5", mNe), nd.register("1.2.840.113549.1.12.10.1.6", fw)), this.items; } static register(t, n) { this.getItems()[t] = n; @@ -62194,20 +62240,20 @@ var yNe = class td { return this.getItems()[t] || null; } }; -const nd = "bagId", rd = "bagValue", Hi = "bagAttributes", bNe = [ - nd, +const rd = "bagId", od = "bagValue", Hi = "bagAttributes", bNe = [ rd, + od, Hi ]; var Xs, _4 = (Xs = class extends Ce { constructor(t = {}) { - super(), this.bagId = t[nd] ?? Xs.defaultValues(nd), this.bagValue = t[rd] ?? Xs.defaultValues(rd), Hi in t && (this.bagAttributes = t[Hi] ?? Xs.defaultValues(Hi)), t.schema && this.fromSchema(t.schema); + super(), this.bagId = t[rd] ?? Xs.defaultValues(rd), this.bagValue = t[od] ?? Xs.defaultValues(od), Hi in t && (this.bagAttributes = t[Hi] ?? Xs.defaultValues(Hi)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case nd: - return ""; case rd: + return ""; + case od: return new Xe(); case Hi: return []; @@ -62217,9 +62263,9 @@ var Xs, _4 = (Xs = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case nd: - return n === ""; case rd: + return n === ""; + case od: return n instanceof Xe; case Hi: return n.length === 0; @@ -62232,17 +62278,17 @@ var Xs, _4 = (Xs = class extends Ce { return new z({ name: n.blockName || "", value: [ - new Ve({ name: n.bagId || nd }), - new ee({ + new $e({ name: n.bagId || rd }), + new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new Xe({ name: n.bagValue || rd })] + value: [new Xe({ name: n.bagValue || od })] }), new An({ optional: !0, - value: [new ot({ + value: [new st({ name: n.bagAttributes || Hi, value: En.schema() })] @@ -62253,8 +62299,8 @@ var Xs, _4 = (Xs = class extends Ce { fromSchema(t) { for (const o of bNe) delete t[o]; const n = Ee(t, t, Xs.schema({ names: { - bagId: nd, - bagValue: rd, + bagId: rd, + bagValue: od, bagAttributes: Hi } })); ke.assertSchema(n, this.className), this.bagId = n.result.bagId.valueBlock.toString(); @@ -62263,7 +62309,7 @@ var Xs, _4 = (Xs = class extends Ce { this.bagValue = new r({ schema: n.result.bagValue }), Hi in n.result && (this.bagAttributes = Array.from(n.result.bagAttributes, (o) => new En({ schema: o }))); } toSchema() { - const t = [new Ve({ value: this.bagId }), new ee({ + const t = [new $e({ value: this.bagId }), new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -62280,14 +62326,14 @@ var Xs, _4 = (Xs = class extends Ce { return this.bagAttributes && (t.bagAttributes = Array.from(this.bagAttributes, (n) => n.toJSON())), t; } }, Xs.CLASS_NAME = "SafeBag", Xs); -const bh = "safeBags"; -var $l, fw = ($l = class extends Ce { +const vh = "safeBags"; +var Ul, fw = (Ul = class extends Ce { constructor(t = {}) { - super(), this.safeBags = t[bh] ?? $l.defaultValues(bh), t.schema && this.fromSchema(t.schema); + super(), this.safeBags = t[vh] ?? Ul.defaultValues(vh), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case bh: + case vh: return []; default: return super.defaultValues(t); @@ -62295,7 +62341,7 @@ var $l, fw = ($l = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case bh: + case vh: return n.length === 0; default: return super.defaultValues(t); @@ -62305,15 +62351,15 @@ var $l, fw = ($l = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.safeBags || "", value: _4.schema() })] }); } fromSchema(t) { - for (const r of [bh]) delete t[r]; - const n = Ee(t, t, $l.schema({ names: { safeBags: bh } })); + for (const r of [vh]) delete t[r]; + const n = Ee(t, t, Ul.schema({ names: { safeBags: vh } })); ke.assertSchema(n, this.className), this.safeBags = Array.from(n.result.safeBags, (r) => new _4({ schema: r })); } toSchema() { @@ -62322,7 +62368,7 @@ var $l, fw = ($l = class extends Ce { toJSON() { return { safeBags: Array.from(this.safeBags, (t) => t.toJSON()) }; } -}, $l.CLASS_NAME = "SafeContents", $l); +}, Ul.CLASS_NAME = "SafeContents", Ul); const hw = "otherCertFormat", pw = "otherCert", wNe = [hw, pw]; var yA = class bA extends Ce { constructor(t = {}) { @@ -62342,7 +62388,7 @@ var yA = class bA extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.otherCertFormat || hw }), new Xe({ name: n.otherCert || pw })] + value: [new $e({ name: n.otherCertFormat || hw }), new Xe({ name: n.otherCert || pw })] }); } fromSchema(t) { @@ -62351,7 +62397,7 @@ var yA = class bA extends Ce { ke.assertSchema(n, this.className), this.otherCertFormat = n.result.otherCertFormat.valueBlock.toString(), this.otherCert = n.result.otherCert; } toSchema() { - return new z({ value: [new Ve({ value: this.otherCertFormat }), this.otherCert] }); + return new z({ value: [new $e({ value: this.otherCertFormat }), this.otherCert] }); } toJSON() { const t = { otherCertFormat: this.otherCertFormat }; @@ -62359,9 +62405,9 @@ var yA = class bA extends Ce { } }; const gw = "certificates", vNe = [gw]; -var Ul, Eg = (Ul = class extends Ce { +var Kl, Cg = (Kl = class extends Ce { constructor(t = {}) { - super(), this.certificates = t[gw] ?? Ul.defaultValues(gw), t.schema && this.fromSchema(t.schema); + super(), this.certificates = t[gw] ?? Kl.defaultValues(gw), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -62375,32 +62421,32 @@ var Ul, Eg = (Ul = class extends Ce { const n = t.names ?? {}; return new An({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.certificates || gw, - value: new Xt({ value: [ + value: new en({ value: [ Mr.schema(), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: [new Xe()] }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, value: [new z()] }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 2 }, - value: Bd.schema().valueBlock.value + value: Ld.schema().valueBlock.value }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 3 @@ -62413,16 +62459,16 @@ var Ul, Eg = (Ul = class extends Ce { } fromSchema(t) { for (const r of vNe) delete t[r]; - const n = Ee(t, t, Ul.schema()); + const n = Ee(t, t, Kl.schema()); ke.assertSchema(n, this.className), this.certificates = Array.from(n.result.certificates || [], (r) => { const o = r.idBlock.tagNumber; if (r.idBlock.tagClass === 1) return new Mr({ schema: r }); const s = new z({ value: r.valueBlock.value }); switch (o) { case 1: - return s.valueBlock.value[0].valueBlock.value[0].valueBlock.valueDec === 1 ? new Bd({ schema: s }) : new BO({ schema: s }); + return s.valueBlock.value[0].valueBlock.value[0].valueBlock.valueDec === 1 ? new Ld({ schema: s }) : new BO({ schema: s }); case 2: - return new Bd({ schema: s }); + return new Ld({ schema: s }); case 3: return new yA({ schema: s }); } @@ -62435,15 +62481,15 @@ var Ul, Eg = (Ul = class extends Ce { case t instanceof Mr: return t.toSchema(); case t instanceof BO: - return new ee({ + return new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, value: t.toSchema().valueBlock.value }); - case t instanceof Bd: - return new ee({ + case t instanceof Ld: + return new ne({ idBlock: { tagClass: 3, tagNumber: 2 @@ -62451,7 +62497,7 @@ var Ul, Eg = (Ul = class extends Ce { value: t.toSchema().valueBlock.value }); case t instanceof yA: - return new ee({ + return new ne({ idBlock: { tagClass: 3, tagNumber: 3 @@ -62465,7 +62511,7 @@ var Ul, Eg = (Ul = class extends Ce { toJSON() { return { certificates: Array.from(this.certificates, (t) => t.toJSON()) }; } -}, Ul.CLASS_NAME = "CertificateSet", Ul); +}, Kl.CLASS_NAME = "CertificateSet", Kl); const mw = "otherRevInfoFormat", yw = "otherRevInfo", kNe = [mw, yw]; var xa, wA = (xa = class extends Ce { constructor(t = {}) { @@ -62485,7 +62531,7 @@ var xa, wA = (xa = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.otherRevInfoFormat || mw }), new Xe({ name: n.otherRevInfo || yw })] + value: [new $e({ name: n.otherRevInfoFormat || mw }), new Xe({ name: n.otherRevInfo || yw })] }); } fromSchema(t) { @@ -62494,7 +62540,7 @@ var xa, wA = (xa = class extends Ce { ke.assertSchema(n, this.className), this.otherRevInfoFormat = n.result.otherRevInfoFormat.valueBlock.toString(), this.otherRevInfo = n.result.otherRevInfo; } toSchema() { - return new z({ value: [new Ve({ value: this.otherRevInfoFormat }), this.otherRevInfo] }); + return new z({ value: [new $e({ value: this.otherRevInfoFormat }), this.otherRevInfo] }); } toJSON() { const t = { otherRevInfoFormat: this.otherRevInfoFormat }; @@ -62520,14 +62566,14 @@ var Ea, vA = (Ea = class extends Ce { const n = t.names ?? {}; return new An({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.crls || "", - value: new Xt({ value: [J0.schema(), new ee({ + value: new en({ value: [J0.schema(), new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, - value: [new Ve(), new Xe()] + value: [new $e(), new Xe()] })] }) })] }); @@ -62551,16 +62597,16 @@ var Ea, vA = (Ea = class extends Ce { }; } }, Ea.CLASS_NAME = "RevocationInfoChoices", Ea); -const ww = "certs", od = "crls", SNe = [ww, od]; -var Kl, dI = (Kl = class extends Ce { +const ww = "certs", sd = "crls", SNe = [ww, sd]; +var Hl, dI = (Hl = class extends Ce { constructor(t = {}) { - super(), this.crls = t[od] ?? Kl.defaultValues(od), t.schema && this.fromSchema(t.schema); + super(), this.crls = t[sd] ?? Hl.defaultValues(sd), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case ww: - return new Eg(); - case od: + return new Cg(); + case sd: return new vA(); default: return super.defaultValues(t); @@ -62570,7 +62616,7 @@ var Kl, dI = (Kl = class extends Ce { switch (t) { case ww: return n.certificates.length === 0; - case od: + case sd: return n.crls.length === 0 && n.otherRevocationInfos.length === 0; default: return super.defaultValues(t); @@ -62580,15 +62626,15 @@ var Kl, dI = (Kl = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ee({ + value: [new ne({ name: n.certs || "", optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: Eg.schema().valueBlock.value - }), new ee({ + value: Cg.schema().valueBlock.value + }), new ne({ name: n.crls || "", optional: !0, idBlock: { @@ -62601,21 +62647,21 @@ var Kl, dI = (Kl = class extends Ce { } fromSchema(t) { for (const r of SNe) delete t[r]; - const n = Ee(t, t, Kl.schema({ names: { + const n = Ee(t, t, Hl.schema({ names: { certs: ww, - crls: od + crls: sd } })); - ke.assertSchema(n, this.className), ww in n.result && (this.certs = new Eg({ schema: new An({ value: n.result.certs.valueBlock.value }) })), od in n.result && (this.crls = new vA({ schema: new An({ value: n.result.crls.valueBlock.value }) })); + ke.assertSchema(n, this.className), ww in n.result && (this.certs = new Cg({ schema: new An({ value: n.result.certs.valueBlock.value }) })), sd in n.result && (this.crls = new vA({ schema: new An({ value: n.result.crls.valueBlock.value }) })); } toSchema() { const t = []; - return this.certs && t.push(new ee({ + return this.certs && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: this.certs.toSchema().valueBlock.value - })), this.crls && t.push(new ee({ + })), this.crls && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 @@ -62627,7 +62673,7 @@ var Kl, dI = (Kl = class extends Ce { const t = {}; return this.certs && (t.certs = this.certs.toJSON()), this.crls && (t.crls = this.crls.toJSON()), t; } -}, Kl.CLASS_NAME = "OriginatorInfo", Kl); +}, Hl.CLASS_NAME = "OriginatorInfo", Hl); const vw = "issuer", kw = "serialNumber", xNe = [vw, kw]; var Ca, mr = (Ca = class extends Ce { constructor(t = {}) { @@ -62636,9 +62682,9 @@ var Ca, mr = (Ca = class extends Ce { static defaultValues(t) { switch (t) { case vw: - return new Qt(); + return new Zt(); case kw: - return new de(); + return new ue(); default: return super.defaultValues(t); } @@ -62647,7 +62693,7 @@ var Ca, mr = (Ca = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [Qt.schema(n.issuer || {}), new de({ name: n.serialNumber || "" })] + value: [Zt.schema(n.issuer || {}), new ue({ name: n.serialNumber || "" })] }); } fromSchema(t) { @@ -62656,7 +62702,7 @@ var Ca, mr = (Ca = class extends Ce { issuer: { names: { blockName: vw } }, serialNumber: kw } })); - ke.assertSchema(n, this.className), this.issuer = new Qt({ schema: n.result.issuer }), this.serialNumber = n.result.serialNumber; + ke.assertSchema(n, this.className), this.issuer = new Zt({ schema: n.result.issuer }), this.serialNumber = n.result.serialNumber; } toSchema() { return new z({ value: [this.issuer.toSchema(), this.serialNumber] }); @@ -62695,7 +62741,7 @@ var Ia, CNe = (Ia = class extends Ce { } static schema(t = {}) { const n = t.names ?? {}; - return new Xt({ value: [mr.schema({ names: { blockName: n.blockName || "" } }), new Je({ + return new en({ value: [mr.schema({ names: { blockName: n.blockName || "" } }), new Je({ name: n.blockName || "", idBlock: { tagClass: 3, @@ -62731,25 +62777,25 @@ var Ia, CNe = (Ia = class extends Ce { return (this.variant === 1 || this.variant === 2) && this.value && (t.value = this.value.toJSON()), t; } }, Ia.CLASS_NAME = "RecipientIdentifier", Ia); -const sd = "version", ep = "rid", tp = "keyEncryptionAlgorithm", np = "encryptedKey", ck = "recipientCertificate", INe = [ - sd, - ep, +const id = "version", tp = "rid", np = "keyEncryptionAlgorithm", rp = "encryptedKey", ck = "recipientCertificate", INe = [ + id, tp, - np + np, + rp ]; -var Ur, _O = (Ur = class extends Ce { +var Kr, _O = (Kr = class extends Ce { constructor(t = {}) { - super(), this.version = t[sd] ?? Ur.defaultValues(sd), this.rid = t[ep] ?? Ur.defaultValues(ep), this.keyEncryptionAlgorithm = t[tp] ?? Ur.defaultValues(tp), this.encryptedKey = t[np] ?? Ur.defaultValues(np), this.recipientCertificate = t[ck] ?? Ur.defaultValues(ck), t.schema && this.fromSchema(t.schema); + super(), this.version = t[id] ?? Kr.defaultValues(id), this.rid = t[tp] ?? Kr.defaultValues(tp), this.keyEncryptionAlgorithm = t[np] ?? Kr.defaultValues(np), this.encryptedKey = t[rp] ?? Kr.defaultValues(rp), this.recipientCertificate = t[ck] ?? Kr.defaultValues(ck), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case sd: + case id: return -1; - case ep: - return {}; case tp: - return new fe(); + return {}; case np: + return new de(); + case rp: return new Oe(); case ck: return new Mr(); @@ -62759,13 +62805,13 @@ var Ur, _O = (Ur = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case sd: - return n === Ur.defaultValues(sd); - case ep: - return Object.keys(n).length === 0; + case id: + return n === Kr.defaultValues(id); case tp: + return Object.keys(n).length === 0; case np: - return n.isEqual(Ur.defaultValues(t)); + case rp: + return n.isEqual(Kr.defaultValues(t)); case ck: return !1; default: @@ -62777,26 +62823,26 @@ var Ur, _O = (Ur = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || "" }), + new ue({ name: n.version || "" }), CNe.schema(n.rid || {}), - fe.schema(n.keyEncryptionAlgorithm || {}), + de.schema(n.keyEncryptionAlgorithm || {}), new Oe({ name: n.encryptedKey || "" }) ] }); } fromSchema(t) { for (const r of INe) delete t[r]; - const n = Ee(t, t, Ur.schema({ names: { - version: sd, - rid: { names: { blockName: ep } }, - keyEncryptionAlgorithm: { names: { blockName: tp } }, - encryptedKey: np + const n = Ee(t, t, Kr.schema({ names: { + version: id, + rid: { names: { blockName: tp } }, + keyEncryptionAlgorithm: { names: { blockName: np } }, + encryptedKey: rp } })); - ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, n.result.rid.idBlock.tagClass === 3 ? this.rid = new Oe({ valueHex: n.result.rid.valueBlock.valueHex }) : this.rid = new mr({ schema: n.result.rid }), this.keyEncryptionAlgorithm = new fe({ schema: n.result.keyEncryptionAlgorithm }), this.encryptedKey = n.result.encryptedKey; + ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, n.result.rid.idBlock.tagClass === 3 ? this.rid = new Oe({ valueHex: n.result.rid.valueBlock.valueHex }) : this.rid = new mr({ schema: n.result.rid }), this.keyEncryptionAlgorithm = new de({ schema: n.result.keyEncryptionAlgorithm }), this.encryptedKey = n.result.encryptedKey; } toSchema() { const t = []; - return this.rid instanceof mr ? (this.version = 0, t.push(new de({ value: this.version })), t.push(this.rid.toSchema())) : (this.version = 2, t.push(new de({ value: this.version })), t.push(new Je({ + return this.rid instanceof mr ? (this.version = 0, t.push(new ue({ value: this.version })), t.push(this.rid.toSchema())) : (this.version = 2, t.push(new ue({ value: this.version })), t.push(new Je({ idBlock: { tagClass: 3, tagNumber: 0 @@ -62812,26 +62858,26 @@ var Ur, _O = (Ur = class extends Ce { encryptedKey: this.encryptedKey.toJSON() }; } -}, Ur.CLASS_NAME = "KeyTransRecipientInfo", Ur); -const rp = "algorithm", op = "publicKey", NNe = [rp, op]; +}, Kr.CLASS_NAME = "KeyTransRecipientInfo", Kr); +const op = "algorithm", sp = "publicKey", NNe = [op, sp]; var Zs, LO = (Zs = class extends Ce { constructor(t = {}) { - super(), this.algorithm = t[rp] ?? Zs.defaultValues(rp), this.publicKey = t[op] ?? Zs.defaultValues(op), t.schema && this.fromSchema(t.schema); + super(), this.algorithm = t[op] ?? Zs.defaultValues(op), this.publicKey = t[sp] ?? Zs.defaultValues(sp), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case rp: - return new fe(); case op: - return new ht(); + return new de(); + case sp: + return new pt(); default: return super.defaultValues(t); } } static compareWithDefault(t, n) { switch (t) { - case rp: case op: + case sp: return n.isEqual(Zs.defaultValues(t)); default: return super.defaultValues(t); @@ -62841,16 +62887,16 @@ var Zs, LO = (Zs = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [fe.schema(n.algorithm || {}), new ht({ name: n.publicKey || "" })] + value: [de.schema(n.algorithm || {}), new pt({ name: n.publicKey || "" })] }); } fromSchema(t) { for (const r of NNe) delete t[r]; const n = Ee(t, t, Zs.schema({ names: { - algorithm: { names: { blockName: rp } }, - publicKey: op + algorithm: { names: { blockName: op } }, + publicKey: sp } })); - ke.assertSchema(n, this.className), this.algorithm = new fe({ schema: n.result.algorithm }), this.publicKey = n.result.publicKey; + ke.assertSchema(n, this.className), this.algorithm = new de({ schema: n.result.algorithm }), this.publicKey = n.result.publicKey; } toSchema() { return new z({ value: [this.algorithm.toSchema(), this.publicKey] }); @@ -62889,7 +62935,7 @@ var Na, kA = (Na = class extends Ce { } static schema(t = {}) { const n = t.names ?? {}; - return new Xt({ value: [ + return new en({ value: [ mr.schema({ names: { blockName: n.blockName || "" } }), new Je({ idBlock: { @@ -62898,7 +62944,7 @@ var Na, kA = (Na = class extends Ce { }, name: n.blockName || "" }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 1 @@ -62932,14 +62978,14 @@ var Na, kA = (Na = class extends Ce { return (this.variant === 1 || this.variant === 2 || this.variant === 3) && (t.value = this.value.toJSON()), t; } }, Na.CLASS_NAME = "OriginatorIdentifierOrKey", Na); -const sp = "keyAttrId", Is = "keyAttr", PNe = [sp, Is]; -var Oa, Cg = (Oa = class extends Ce { +const ip = "keyAttrId", Is = "keyAttr", PNe = [ip, Is]; +var Oa, Ig = (Oa = class extends Ce { constructor(t = {}) { - super(), this.keyAttrId = t[sp] ?? Oa.defaultValues(sp), Is in t && (this.keyAttr = t[Is] ?? Oa.defaultValues(Is)), t.schema && this.fromSchema(t.schema); + super(), this.keyAttrId = t[ip] ?? Oa.defaultValues(ip), Is in t && (this.keyAttr = t[Is] ?? Oa.defaultValues(Is)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case sp: + case ip: return ""; case Is: return {}; @@ -62949,7 +62995,7 @@ var Oa, Cg = (Oa = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case sp: + case ip: return typeof n == "string" && n === ""; case Is: return Object.keys(n).length === 0; @@ -62962,7 +63008,7 @@ var Oa, Cg = (Oa = class extends Ce { return new z({ optional: n.optional || !0, name: n.blockName || "", - value: [new Ve({ name: n.keyAttrId || "" }), new Xe({ + value: [new $e({ name: n.keyAttrId || "" }), new Xe({ optional: !0, name: n.keyAttr || "" })] @@ -62971,48 +63017,48 @@ var Oa, Cg = (Oa = class extends Ce { fromSchema(t) { for (const r of PNe) delete t[r]; const n = Ee(t, t, Oa.schema({ names: { - keyAttrId: sp, + keyAttrId: ip, keyAttr: Is } })); ke.assertSchema(n, this.className), this.keyAttrId = n.result.keyAttrId.valueBlock.toString(), Is in n.result && (this.keyAttr = n.result.keyAttr); } toSchema() { const t = []; - return t.push(new Ve({ value: this.keyAttrId })), Is in this && t.push(this.keyAttr), new z({ value: t }); + return t.push(new $e({ value: this.keyAttrId })), Is in this && t.push(this.keyAttr), new z({ value: t }); } toJSON() { const t = { keyAttrId: this.keyAttrId }; return Is in this && (t.keyAttr = this.keyAttr.toJSON()), t; } }, Oa.CLASS_NAME = "OtherKeyAttribute", Oa); -const id = "subjectKeyIdentifier", Fc = "date", Vc = "other", RNe = [ - id, - Fc, - Vc +const ad = "subjectKeyIdentifier", Vc = "date", $c = "other", RNe = [ + ad, + Vc, + $c ]; var us, DO = (us = class extends Ce { constructor(t = {}) { - super(), this.subjectKeyIdentifier = t[id] ?? us.defaultValues(id), Fc in t && (this.date = t[Fc] ?? us.defaultValues(Fc)), Vc in t && (this.other = t[Vc] ?? us.defaultValues(Vc)), t.schema && this.fromSchema(t.schema); + super(), this.subjectKeyIdentifier = t[ad] ?? us.defaultValues(ad), Vc in t && (this.date = t[Vc] ?? us.defaultValues(Vc)), $c in t && (this.other = t[$c] ?? us.defaultValues($c)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case id: + case ad: return new Oe(); - case Fc: - return new Yt(); case Vc: - return new Cg(); + return new Xt(); + case $c: + return new Ig(); default: return super.defaultValues(t); } } static compareWithDefault(t, n) { switch (t) { - case id: - return n.isEqual(us.defaultValues(id)); - case Fc: - return n.year === 0 && n.month === 0 && n.day === 0 && n.hour === 0 && n.minute === 0 && n.second === 0 && n.millisecond === 0; + case ad: + return n.isEqual(us.defaultValues(ad)); case Vc: + return n.year === 0 && n.month === 0 && n.day === 0 && n.hour === 0 && n.minute === 0 && n.second === 0 && n.millisecond === 0; + case $c: return n.keyAttrId === "" && !("keyAttr" in n); default: return super.defaultValues(t); @@ -63024,22 +63070,22 @@ var us, DO = (us = class extends Ce { name: n.blockName || "", value: [ new Oe({ name: n.subjectKeyIdentifier || "" }), - new Yt({ + new Xt({ optional: !0, name: n.date || "" }), - Cg.schema(n.other || {}) + Ig.schema(n.other || {}) ] }); } fromSchema(t) { for (const r of RNe) delete t[r]; const n = Ee(t, t, us.schema({ names: { - subjectKeyIdentifier: id, - date: Fc, - other: { names: { blockName: Vc } } + subjectKeyIdentifier: ad, + date: Vc, + other: { names: { blockName: $c } } } })); - ke.assertSchema(n, this.className), this.subjectKeyIdentifier = n.result.subjectKeyIdentifier, Fc in n.result && (this.date = n.result.date), Vc in n.result && (this.other = new Cg({ schema: n.result.other })); + ke.assertSchema(n, this.className), this.subjectKeyIdentifier = n.result.subjectKeyIdentifier, Vc in n.result && (this.date = n.result.date), $c in n.result && (this.other = new Ig({ schema: n.result.other })); } toSchema() { const t = []; @@ -63077,7 +63123,7 @@ var Pa, l0 = (Pa = class extends Ce { } static schema(t = {}) { const n = t.names ?? {}; - return new Xt({ value: [mr.schema(n.issuerAndSerialNumber || { names: { blockName: n.blockName || "" } }), new ee({ + return new en({ value: [mr.schema(n.issuerAndSerialNumber || { names: { blockName: n.blockName || "" } }), new ne({ name: n.blockName || "", idBlock: { tagClass: 3, @@ -63096,7 +63142,7 @@ var Pa, l0 = (Pa = class extends Ce { case 1: return this.value.toSchema(); case 2: - return new ee({ + return new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -63112,16 +63158,16 @@ var Pa, l0 = (Pa = class extends Ce { return (this.variant === 1 || this.variant === 2) && (t.value = this.value.toJSON()), t; } }, Pa.CLASS_NAME = "KeyAgreeRecipientIdentifier", Pa); -const ip = "rid", ad = "encryptedKey", MNe = [ip, ad]; +const ap = "rid", cd = "encryptedKey", MNe = [ap, cd]; var ei, jO = (ei = class extends Ce { constructor(t = {}) { - super(), this.rid = t[ip] ?? ei.defaultValues(ip), this.encryptedKey = t[ad] ?? ei.defaultValues(ad), t.schema && this.fromSchema(t.schema); + super(), this.rid = t[ap] ?? ei.defaultValues(ap), this.encryptedKey = t[cd] ?? ei.defaultValues(cd), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case ip: + case ap: return new l0(); - case ad: + case cd: return new Oe(); default: return super.defaultValues(t); @@ -63129,10 +63175,10 @@ var ei, jO = (ei = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case ip: + case ap: return n.variant === -1 && !("value" in n); - case ad: - return n.isEqual(ei.defaultValues(ad)); + case cd: + return n.isEqual(ei.defaultValues(cd)); default: return super.defaultValues(t); } @@ -63147,8 +63193,8 @@ var ei, jO = (ei = class extends Ce { fromSchema(t) { for (const r of MNe) delete t[r]; const n = Ee(t, t, ei.schema({ names: { - rid: { names: { blockName: ip } }, - encryptedKey: ad + rid: { names: { blockName: ap } }, + encryptedKey: cd } })); ke.assertSchema(n, this.className), this.rid = new l0({ schema: n.result.rid }), this.encryptedKey = n.result.encryptedKey; } @@ -63163,9 +63209,9 @@ var ei, jO = (ei = class extends Ce { } }, ei.CLASS_NAME = "RecipientEncryptedKey", ei); const fk = "encryptedKeys", Eq = "RecipientEncryptedKeys", BNe = [Eq]; -var Hl, AA = (Hl = class extends Ce { +var zl, AA = (zl = class extends Ce { constructor(t = {}) { - super(), this.encryptedKeys = t[fk] ?? Hl.defaultValues(fk), t.schema && this.fromSchema(t.schema); + super(), this.encryptedKeys = t[fk] ?? zl.defaultValues(fk), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -63187,7 +63233,7 @@ var Hl, AA = (Hl = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.RecipientEncryptedKeys || "", value: jO.schema() })] @@ -63195,7 +63241,7 @@ var Hl, AA = (Hl = class extends Ce { } fromSchema(t) { for (const r of BNe) delete t[r]; - const n = Ee(t, t, Hl.schema({ names: { RecipientEncryptedKeys: Eq } })); + const n = Ee(t, t, zl.schema({ names: { RecipientEncryptedKeys: Eq } })); ke.assertSchema(n, this.className), this.encryptedKeys = Array.from(n.result.RecipientEncryptedKeys, (r) => new jO({ schema: r })); } toSchema() { @@ -63204,29 +63250,29 @@ var Hl, AA = (Hl = class extends Ce { toJSON() { return { encryptedKeys: Array.from(this.encryptedKeys, (t) => t.toJSON()) }; } -}, Hl.CLASS_NAME = "RecipientEncryptedKeys", Hl); -const ap = "version", cp = "originator", zi = "ukm", lp = "keyEncryptionAlgorithm", up = "recipientEncryptedKeys", hk = "recipientCertificate", pk = "recipientPublicKey", _Ne = [ - ap, +}, zl.CLASS_NAME = "RecipientEncryptedKeys", zl); +const cp = "version", lp = "originator", zi = "ukm", up = "keyEncryptionAlgorithm", dp = "recipientEncryptedKeys", hk = "recipientCertificate", pk = "recipientPublicKey", _Ne = [ cp, - zi, lp, - up + zi, + up, + dp ]; var Sr, FO = (Sr = class extends Ce { constructor(t = {}) { - super(), this.version = t[ap] ?? Sr.defaultValues(ap), this.originator = t[cp] ?? Sr.defaultValues(cp), zi in t && (this.ukm = t[zi] ?? Sr.defaultValues(zi)), this.keyEncryptionAlgorithm = t[lp] ?? Sr.defaultValues(lp), this.recipientEncryptedKeys = t[up] ?? Sr.defaultValues(up), this.recipientCertificate = t[hk] ?? Sr.defaultValues(hk), this.recipientPublicKey = t[pk] ?? Sr.defaultValues(pk), t.schema && this.fromSchema(t.schema); + super(), this.version = t[cp] ?? Sr.defaultValues(cp), this.originator = t[lp] ?? Sr.defaultValues(lp), zi in t && (this.ukm = t[zi] ?? Sr.defaultValues(zi)), this.keyEncryptionAlgorithm = t[up] ?? Sr.defaultValues(up), this.recipientEncryptedKeys = t[dp] ?? Sr.defaultValues(dp), this.recipientCertificate = t[hk] ?? Sr.defaultValues(hk), this.recipientPublicKey = t[pk] ?? Sr.defaultValues(pk), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case ap: - return 0; case cp: + return 0; + case lp: return new kA(); case zi: return new Oe(); - case lp: - return new fe(); case up: + return new de(); + case dp: return new AA(); case hk: return new Mr(); @@ -63238,15 +63284,15 @@ var Sr, FO = (Sr = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case ap: - return n === 0; case cp: + return n === 0; + case lp: return n.variant === -1 && !("value" in n); case zi: return n.isEqual(Sr.defaultValues(zi)); - case lp: - return n.algorithmId === "" && !("algorithmParams" in n); case up: + return n.algorithmId === "" && !("algorithmParams" in n); + case dp: return n.encryptedKeys.length === 0; case hk: return !1; @@ -63261,15 +63307,15 @@ var Sr, FO = (Sr = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || "" }), - new ee({ + new ue({ name: n.version || "" }), + new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: [kA.schema(n.originator || {})] }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, @@ -63277,7 +63323,7 @@ var Sr, FO = (Sr = class extends Ce { }, value: [new Oe({ name: n.ukm || "" })] }), - fe.schema(n.keyEncryptionAlgorithm || {}), + de.schema(n.keyEncryptionAlgorithm || {}), AA.schema(n.recipientEncryptedKeys || {}) ] }); @@ -63285,23 +63331,23 @@ var Sr, FO = (Sr = class extends Ce { fromSchema(t) { for (const r of _Ne) delete t[r]; const n = Ee(t, t, Sr.schema({ names: { - version: ap, - originator: { names: { blockName: cp } }, + version: cp, + originator: { names: { blockName: lp } }, ukm: zi, - keyEncryptionAlgorithm: { names: { blockName: lp } }, - recipientEncryptedKeys: { names: { blockName: up } } + keyEncryptionAlgorithm: { names: { blockName: up } }, + recipientEncryptedKeys: { names: { blockName: dp } } } })); - ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.originator = new kA({ schema: n.result.originator }), zi in n.result && (this.ukm = n.result.ukm), this.keyEncryptionAlgorithm = new fe({ schema: n.result.keyEncryptionAlgorithm }), this.recipientEncryptedKeys = new AA({ schema: n.result.recipientEncryptedKeys }); + ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.originator = new kA({ schema: n.result.originator }), zi in n.result && (this.ukm = n.result.ukm), this.keyEncryptionAlgorithm = new de({ schema: n.result.keyEncryptionAlgorithm }), this.recipientEncryptedKeys = new AA({ schema: n.result.recipientEncryptedKeys }); } toSchema() { const t = []; - return t.push(new de({ value: this.version })), t.push(new ee({ + return t.push(new ue({ value: this.version })), t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: [this.originator.toSchema()] - })), this.ukm && t.push(new ee({ + })), this.ukm && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -63320,34 +63366,34 @@ var Sr, FO = (Sr = class extends Ce { return this.ukm && (t.ukm = this.ukm.toJSON()), t; } }, Sr.CLASS_NAME = "KeyAgreeRecipientInfo", Sr); -const cd = "keyIdentifier", $c = "date", Uc = "other", LNe = [ - cd, - $c, - Uc +const ld = "keyIdentifier", Uc = "date", Kc = "other", LNe = [ + ld, + Uc, + Kc ]; var ds, SA = (ds = class extends Ce { constructor(t = {}) { - super(), this.keyIdentifier = t[cd] ?? ds.defaultValues(cd), $c in t && (this.date = t[$c] ?? ds.defaultValues($c)), Uc in t && (this.other = t[Uc] ?? ds.defaultValues(Uc)), t.schema && this.fromSchema(t.schema); + super(), this.keyIdentifier = t[ld] ?? ds.defaultValues(ld), Uc in t && (this.date = t[Uc] ?? ds.defaultValues(Uc)), Kc in t && (this.other = t[Kc] ?? ds.defaultValues(Kc)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case cd: + case ld: return new Oe(); - case $c: - return new Yt(); case Uc: - return new Cg(); + return new Xt(); + case Kc: + return new Ig(); default: return super.defaultValues(t); } } static compareWithDefault(t, n) { switch (t) { - case cd: - return n.isEqual(ds.defaultValues(cd)); - case $c: - return n.year === 0 && n.month === 0 && n.day === 0 && n.hour === 0 && n.minute === 0 && n.second === 0 && n.millisecond === 0; + case ld: + return n.isEqual(ds.defaultValues(ld)); case Uc: + return n.year === 0 && n.month === 0 && n.day === 0 && n.hour === 0 && n.minute === 0 && n.second === 0 && n.millisecond === 0; + case Kc: return n.compareWithDefault("keyAttrId", n.keyAttrId) && !("keyAttr" in n); default: return super.defaultValues(t); @@ -63359,22 +63405,22 @@ var ds, SA = (ds = class extends Ce { name: n.blockName || "", value: [ new Oe({ name: n.keyIdentifier || "" }), - new Yt({ + new Xt({ optional: !0, name: n.date || "" }), - Cg.schema(n.other || {}) + Ig.schema(n.other || {}) ] }); } fromSchema(t) { for (const r of LNe) delete t[r]; const n = Ee(t, t, ds.schema({ names: { - keyIdentifier: cd, - date: $c, - other: { names: { blockName: Uc } } + keyIdentifier: ld, + date: Uc, + other: { names: { blockName: Kc } } } })); - ke.assertSchema(n, this.className), this.keyIdentifier = n.result.keyIdentifier, $c in n.result && (this.date = n.result.date), Uc in n.result && (this.other = new Cg({ schema: n.result.other })); + ke.assertSchema(n, this.className), this.keyIdentifier = n.result.keyIdentifier, Uc in n.result && (this.date = n.result.date), Kc in n.result && (this.other = new Ig({ schema: n.result.other })); } toSchema() { const t = []; @@ -63385,25 +63431,25 @@ var ds, SA = (ds = class extends Ce { return this.date && (t.date = this.date), this.other && (t.other = this.other.toJSON()), t; } }, ds.CLASS_NAME = "KEKIdentifier", ds); -const dp = "version", fp = "kekid", hp = "keyEncryptionAlgorithm", ld = "encryptedKey", gk = "preDefinedKEK", DNe = [ - dp, +const fp = "version", hp = "kekid", pp = "keyEncryptionAlgorithm", ud = "encryptedKey", gk = "preDefinedKEK", DNe = [ fp, hp, - ld + pp, + ud ]; -var Kr, VO = (Kr = class extends Ce { +var Hr, VO = (Hr = class extends Ce { constructor(t = {}) { - super(), this.version = t[dp] ?? Kr.defaultValues(dp), this.kekid = t[fp] ?? Kr.defaultValues(fp), this.keyEncryptionAlgorithm = t[hp] ?? Kr.defaultValues(hp), this.encryptedKey = t[ld] ?? Kr.defaultValues(ld), this.preDefinedKEK = t[gk] ?? Kr.defaultValues(gk), t.schema && this.fromSchema(t.schema); + super(), this.version = t[fp] ?? Hr.defaultValues(fp), this.kekid = t[hp] ?? Hr.defaultValues(hp), this.keyEncryptionAlgorithm = t[pp] ?? Hr.defaultValues(pp), this.encryptedKey = t[ud] ?? Hr.defaultValues(ud), this.preDefinedKEK = t[gk] ?? Hr.defaultValues(gk), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case dp: - return 0; case fp: - return new SA(); + return 0; case hp: - return new fe(); - case ld: + return new SA(); + case pp: + return new de(); + case ud: return new Oe(); case gk: return Dn; @@ -63414,13 +63460,13 @@ var Kr, VO = (Kr = class extends Ce { static compareWithDefault(t, n) { switch (t) { case "KEKRecipientInfo": - return n === Kr.defaultValues(dp); - case fp: - return n.compareWithDefault("keyIdentifier", n.keyIdentifier) && !("date" in n) && !("other" in n); + return n === Hr.defaultValues(fp); case hp: + return n.compareWithDefault("keyIdentifier", n.keyIdentifier) && !("date" in n) && !("other" in n); + case pp: return n.algorithmId === "" && !("algorithmParams" in n); - case ld: - return n.isEqual(Kr.defaultValues(ld)); + case ud: + return n.isEqual(Hr.defaultValues(ud)); case gk: return n.byteLength === 0; default: @@ -63432,26 +63478,26 @@ var Kr, VO = (Kr = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || "" }), + new ue({ name: n.version || "" }), SA.schema(n.kekid || {}), - fe.schema(n.keyEncryptionAlgorithm || {}), + de.schema(n.keyEncryptionAlgorithm || {}), new Oe({ name: n.encryptedKey || "" }) ] }); } fromSchema(t) { for (const r of DNe) delete t[r]; - const n = Ee(t, t, Kr.schema({ names: { - version: dp, - kekid: { names: { blockName: fp } }, - keyEncryptionAlgorithm: { names: { blockName: hp } }, - encryptedKey: ld + const n = Ee(t, t, Hr.schema({ names: { + version: fp, + kekid: { names: { blockName: hp } }, + keyEncryptionAlgorithm: { names: { blockName: pp } }, + encryptedKey: ud } })); - ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.kekid = new SA({ schema: n.result.kekid }), this.keyEncryptionAlgorithm = new fe({ schema: n.result.keyEncryptionAlgorithm }), this.encryptedKey = n.result.encryptedKey; + ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.kekid = new SA({ schema: n.result.kekid }), this.keyEncryptionAlgorithm = new de({ schema: n.result.keyEncryptionAlgorithm }), this.encryptedKey = n.result.encryptedKey; } toSchema() { return new z({ value: [ - new de({ value: this.version }), + new ue({ value: this.version }), this.kekid.toSchema(), this.keyEncryptionAlgorithm.toSchema(), this.encryptedKey @@ -63465,26 +63511,26 @@ var Kr, VO = (Kr = class extends Ce { encryptedKey: this.encryptedKey.toJSON() }; } -}, Kr.CLASS_NAME = "KEKRecipientInfo", Kr); -const pp = "version", Kc = "keyDerivationAlgorithm", gp = "keyEncryptionAlgorithm", ud = "encryptedKey", mk = "password", jNe = [ - pp, - Kc, +}, Hr.CLASS_NAME = "KEKRecipientInfo", Hr); +const gp = "version", Hc = "keyDerivationAlgorithm", mp = "keyEncryptionAlgorithm", dd = "encryptedKey", mk = "password", jNe = [ gp, - ud + Hc, + mp, + dd ]; -var so, $O = (so = class extends Ce { +var io, $O = (io = class extends Ce { constructor(t = {}) { - super(), this.version = t[pp] ?? so.defaultValues(pp), Kc in t && (this.keyDerivationAlgorithm = t[Kc] ?? so.defaultValues(Kc)), this.keyEncryptionAlgorithm = t[gp] ?? so.defaultValues(gp), this.encryptedKey = t[ud] ?? so.defaultValues(ud), this.password = t[mk] ?? so.defaultValues(mk), t.schema && this.fromSchema(t.schema); + super(), this.version = t[gp] ?? io.defaultValues(gp), Hc in t && (this.keyDerivationAlgorithm = t[Hc] ?? io.defaultValues(Hc)), this.keyEncryptionAlgorithm = t[mp] ?? io.defaultValues(mp), this.encryptedKey = t[dd] ?? io.defaultValues(dd), this.password = t[mk] ?? io.defaultValues(mk), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case pp: - return -1; - case Kc: - return new fe(); case gp: - return new fe(); - case ud: + return -1; + case Hc: + return new de(); + case mp: + return new de(); + case dd: return new Oe(); case mk: return Dn; @@ -63494,13 +63540,13 @@ var so, $O = (so = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case pp: - return n === -1; - case Kc: case gp: + return n === -1; + case Hc: + case mp: return n.algorithmId === "" && !("algorithmParams" in n); - case ud: - return n.isEqual(so.defaultValues(ud)); + case dd: + return n.isEqual(io.defaultValues(dd)); case mk: return n.byteLength === 0; default: @@ -63512,34 +63558,34 @@ var so, $O = (so = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || "" }), - new ee({ + new ue({ name: n.version || "" }), + new ne({ name: n.keyDerivationAlgorithm || "", optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: fe.schema().valueBlock.value + value: de.schema().valueBlock.value }), - fe.schema(n.keyEncryptionAlgorithm || {}), + de.schema(n.keyEncryptionAlgorithm || {}), new Oe({ name: n.encryptedKey || "" }) ] }); } fromSchema(t) { for (const r of jNe) delete t[r]; - const n = Ee(t, t, so.schema({ names: { - version: pp, - keyDerivationAlgorithm: Kc, - keyEncryptionAlgorithm: { names: { blockName: gp } }, - encryptedKey: ud + const n = Ee(t, t, io.schema({ names: { + version: gp, + keyDerivationAlgorithm: Hc, + keyEncryptionAlgorithm: { names: { blockName: mp } }, + encryptedKey: dd } })); - ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, Kc in n.result && (this.keyDerivationAlgorithm = new fe({ schema: new z({ value: n.result.keyDerivationAlgorithm.valueBlock.value }) })), this.keyEncryptionAlgorithm = new fe({ schema: n.result.keyEncryptionAlgorithm }), this.encryptedKey = n.result.encryptedKey; + ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, Hc in n.result && (this.keyDerivationAlgorithm = new de({ schema: new z({ value: n.result.keyDerivationAlgorithm.valueBlock.value }) })), this.keyEncryptionAlgorithm = new de({ schema: n.result.keyEncryptionAlgorithm }), this.encryptedKey = n.result.encryptedKey; } toSchema() { const t = []; - return t.push(new de({ value: this.version })), this.keyDerivationAlgorithm && t.push(new ee({ + return t.push(new ue({ value: this.version })), this.keyDerivationAlgorithm && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -63555,17 +63601,17 @@ var so, $O = (so = class extends Ce { }; return this.keyDerivationAlgorithm && (t.keyDerivationAlgorithm = this.keyDerivationAlgorithm.toJSON()), t; } -}, so.CLASS_NAME = "PasswordRecipientInfo", so); -const mp = "oriType", dd = "oriValue", FNe = [mp, dd]; +}, io.CLASS_NAME = "PasswordRecipientInfo", io); +const yp = "oriType", fd = "oriValue", FNe = [yp, fd]; var ti, L4 = (ti = class extends Ce { constructor(t = {}) { - super(), this.oriType = t[mp] ?? ti.defaultValues(mp), this.oriValue = t[dd] ?? ti.defaultValues(dd), t.schema && this.fromSchema(t.schema); + super(), this.oriType = t[yp] ?? ti.defaultValues(yp), this.oriValue = t[fd] ?? ti.defaultValues(fd), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case mp: + case yp: return ""; - case dd: + case fd: return {}; default: return super.defaultValues(t); @@ -63573,9 +63619,9 @@ var ti, L4 = (ti = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case mp: + case yp: return n === ""; - case dd: + case fd: return Object.keys(n).length === 0; default: return super.defaultValues(t); @@ -63585,27 +63631,27 @@ var ti, L4 = (ti = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.oriType || "" }), new Xe({ name: n.oriValue || "" })] + value: [new $e({ name: n.oriType || "" }), new Xe({ name: n.oriValue || "" })] }); } fromSchema(t) { for (const r of FNe) delete t[r]; const n = Ee(t, t, ti.schema({ names: { - oriType: mp, - oriValue: dd + oriType: yp, + oriValue: fd } })); ke.assertSchema(n, this.className), this.oriType = n.result.oriType.valueBlock.toString(), this.oriValue = n.result.oriValue; } toSchema() { - return new z({ value: [new Ve({ value: this.oriType }), this.oriValue] }); + return new z({ value: [new $e({ value: this.oriType }), this.oriValue] }); } toJSON() { const t = { oriType: this.oriType }; - return ti.compareWithDefault(dd, this.oriValue) || (t.oriValue = this.oriValue.toJSON()), t; + return ti.compareWithDefault(fd, this.oriValue) || (t.oriValue = this.oriValue.toJSON()), t; } }, ti.CLASS_NAME = "OtherRecipientInfo", ti); const yk = "variant", Ny = "value", VNe = ["blockName"]; -var ni, wh = (ni = class extends Ce { +var ni, kh = (ni = class extends Ce { constructor(t = {}) { super(), this.variant = t[yk] ?? ni.defaultValues(yk), Ny in t && (this.value = t[Ny] ?? ni.defaultValues(Ny)), t.schema && this.fromSchema(t.schema); } @@ -63631,9 +63677,9 @@ var ni, wh = (ni = class extends Ce { } static schema(t = {}) { const n = t.names ?? {}; - return new Xt({ value: [ + return new en({ value: [ _O.schema({ names: { blockName: n.blockName || "" } }), - new ee({ + new ne({ name: n.blockName || "", idBlock: { tagClass: 3, @@ -63641,7 +63687,7 @@ var ni, wh = (ni = class extends Ce { }, value: FO.schema().valueBlock.value }), - new ee({ + new ne({ name: n.blockName || "", idBlock: { tagClass: 3, @@ -63649,7 +63695,7 @@ var ni, wh = (ni = class extends Ce { }, value: VO.schema().valueBlock.value }), - new ee({ + new ne({ name: n.blockName || "", idBlock: { tagClass: 3, @@ -63657,7 +63703,7 @@ var ni, wh = (ni = class extends Ce { }, value: $O.schema().valueBlock.value }), - new ee({ + new ne({ name: n.blockName || "", idBlock: { tagClass: 3, @@ -63693,7 +63739,7 @@ var ni, wh = (ni = class extends Ce { } } toSchema() { - Ct.assertEmpty(this.value, "value", "RecipientInfo"); + Ot.assertEmpty(this.value, "value", "RecipientInfo"); const t = this.value.toSchema(); switch (this.variant) { case 1: @@ -63711,32 +63757,32 @@ var ni, wh = (ni = class extends Ce { return this.value && this.variant >= 1 && this.variant <= 4 && (t.value = this.value.toJSON()), t; } }, ni.CLASS_NAME = "RecipientInfo", ni); -const Hc = "hashAlgorithm", zc = "maskGenAlgorithm", Wc = "pSourceAlgorithm", $Ne = [ - Hc, +const zc = "hashAlgorithm", Wc = "maskGenAlgorithm", qc = "pSourceAlgorithm", $Ne = [ zc, - Wc + Wc, + qc ]; -var ur, fI = (ur = class extends Ce { +var dr, fI = (dr = class extends Ce { constructor(t = {}) { - super(), this.hashAlgorithm = t[Hc] ?? ur.defaultValues(Hc), this.maskGenAlgorithm = t[zc] ?? ur.defaultValues(zc), this.pSourceAlgorithm = t[Wc] ?? ur.defaultValues(Wc), t.schema && this.fromSchema(t.schema); + super(), this.hashAlgorithm = t[zc] ?? dr.defaultValues(zc), this.maskGenAlgorithm = t[Wc] ?? dr.defaultValues(Wc), this.pSourceAlgorithm = t[qc] ?? dr.defaultValues(qc), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Hc: - return new fe({ + case zc: + return new de({ algorithmId: "1.3.14.3.2.26", - algorithmParams: new fn() + algorithmParams: new hn() }); - case zc: - return new fe({ + case Wc: + return new de({ algorithmId: "1.2.840.113549.1.1.8", - algorithmParams: new fe({ + algorithmParams: new de({ algorithmId: "1.3.14.3.2.26", - algorithmParams: new fn() + algorithmParams: new hn() }).toSchema() }); - case Wc: - return new fe({ + case qc: + return new de({ algorithmId: "1.2.840.113549.1.1.9", algorithmParams: new Oe({ valueHex: new Uint8Array([ 218, @@ -63770,57 +63816,57 @@ var ur, fI = (ur = class extends Ce { return new z({ name: n.blockName || "", value: [ - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, optional: !0, - value: [fe.schema(n.hashAlgorithm || {})] + value: [de.schema(n.hashAlgorithm || {})] }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, optional: !0, - value: [fe.schema(n.maskGenAlgorithm || {})] + value: [de.schema(n.maskGenAlgorithm || {})] }), - new ee({ + new ne({ idBlock: { tagClass: 3, tagNumber: 2 }, optional: !0, - value: [fe.schema(n.pSourceAlgorithm || {})] + value: [de.schema(n.pSourceAlgorithm || {})] }) ] }); } fromSchema(t) { for (const r of $Ne) delete t[r]; - const n = Ee(t, t, ur.schema({ names: { - hashAlgorithm: { names: { blockName: Hc } }, - maskGenAlgorithm: { names: { blockName: zc } }, - pSourceAlgorithm: { names: { blockName: Wc } } + const n = Ee(t, t, dr.schema({ names: { + hashAlgorithm: { names: { blockName: zc } }, + maskGenAlgorithm: { names: { blockName: Wc } }, + pSourceAlgorithm: { names: { blockName: qc } } } })); - ke.assertSchema(n, this.className), Hc in n.result && (this.hashAlgorithm = new fe({ schema: n.result.hashAlgorithm })), zc in n.result && (this.maskGenAlgorithm = new fe({ schema: n.result.maskGenAlgorithm })), Wc in n.result && (this.pSourceAlgorithm = new fe({ schema: n.result.pSourceAlgorithm })); + ke.assertSchema(n, this.className), zc in n.result && (this.hashAlgorithm = new de({ schema: n.result.hashAlgorithm })), Wc in n.result && (this.maskGenAlgorithm = new de({ schema: n.result.maskGenAlgorithm })), qc in n.result && (this.pSourceAlgorithm = new de({ schema: n.result.pSourceAlgorithm })); } toSchema() { const t = []; - return this.hashAlgorithm.isEqual(ur.defaultValues(Hc)) || t.push(new ee({ + return this.hashAlgorithm.isEqual(dr.defaultValues(zc)) || t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: [this.hashAlgorithm.toSchema()] - })), this.maskGenAlgorithm.isEqual(ur.defaultValues(zc)) || t.push(new ee({ + })), this.maskGenAlgorithm.isEqual(dr.defaultValues(Wc)) || t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, value: [this.maskGenAlgorithm.toSchema()] - })), this.pSourceAlgorithm.isEqual(ur.defaultValues(Wc)) || t.push(new ee({ + })), this.pSourceAlgorithm.isEqual(dr.defaultValues(qc)) || t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 2 @@ -63830,25 +63876,25 @@ var ur, fI = (ur = class extends Ce { } toJSON() { const t = {}; - return this.hashAlgorithm.isEqual(ur.defaultValues(Hc)) || (t.hashAlgorithm = this.hashAlgorithm.toJSON()), this.maskGenAlgorithm.isEqual(ur.defaultValues(zc)) || (t.maskGenAlgorithm = this.maskGenAlgorithm.toJSON()), this.pSourceAlgorithm.isEqual(ur.defaultValues(Wc)) || (t.pSourceAlgorithm = this.pSourceAlgorithm.toJSON()), t; + return this.hashAlgorithm.isEqual(dr.defaultValues(zc)) || (t.hashAlgorithm = this.hashAlgorithm.toJSON()), this.maskGenAlgorithm.isEqual(dr.defaultValues(Wc)) || (t.maskGenAlgorithm = this.maskGenAlgorithm.toJSON()), this.pSourceAlgorithm.isEqual(dr.defaultValues(qc)) || (t.pSourceAlgorithm = this.pSourceAlgorithm.toJSON()), t; } -}, ur.CLASS_NAME = "RSAESOAEPParams", ur); -const yp = "keyInfo", qc = "entityUInfo", bp = "suppPubInfo", UNe = [ - yp, - qc, - bp +}, dr.CLASS_NAME = "RSAESOAEPParams", dr); +const bp = "keyInfo", Gc = "entityUInfo", wp = "suppPubInfo", UNe = [ + bp, + Gc, + wp ]; var fs, D4 = (fs = class extends Ce { constructor(t = {}) { - super(), this.keyInfo = t[yp] ?? fs.defaultValues(yp), qc in t && (this.entityUInfo = t[qc] ?? fs.defaultValues(qc)), this.suppPubInfo = t[bp] ?? fs.defaultValues(bp), t.schema && this.fromSchema(t.schema); + super(), this.keyInfo = t[bp] ?? fs.defaultValues(bp), Gc in t && (this.entityUInfo = t[Gc] ?? fs.defaultValues(Gc)), this.suppPubInfo = t[wp] ?? fs.defaultValues(wp), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case yp: - return new fe(); - case qc: - return new Oe(); case bp: + return new de(); + case Gc: + return new Oe(); + case wp: return new Oe(); default: return super.defaultValues(t); @@ -63856,9 +63902,9 @@ var fs, D4 = (fs = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case yp: - case qc: case bp: + case Gc: + case wp: return n.isEqual(fs.defaultValues(t)); default: return super.defaultValues(t); @@ -63869,8 +63915,8 @@ var fs, D4 = (fs = class extends Ce { return new z({ name: n.blockName || "", value: [ - fe.schema(n.keyInfo || {}), - new ee({ + de.schema(n.keyInfo || {}), + new ne({ name: n.entityUInfo || "", idBlock: { tagClass: 3, @@ -63879,7 +63925,7 @@ var fs, D4 = (fs = class extends Ce { optional: !0, value: [new Oe()] }), - new ee({ + new ne({ name: n.suppPubInfo || "", idBlock: { tagClass: 3, @@ -63893,21 +63939,21 @@ var fs, D4 = (fs = class extends Ce { fromSchema(t) { for (const r of UNe) delete t[r]; const n = Ee(t, t, fs.schema({ names: { - keyInfo: { names: { blockName: yp } }, - entityUInfo: qc, - suppPubInfo: bp + keyInfo: { names: { blockName: bp } }, + entityUInfo: Gc, + suppPubInfo: wp } })); - ke.assertSchema(n, this.className), this.keyInfo = new fe({ schema: n.result.keyInfo }), qc in n.result && (this.entityUInfo = n.result.entityUInfo.valueBlock.value[0]), this.suppPubInfo = n.result.suppPubInfo.valueBlock.value[0]; + ke.assertSchema(n, this.className), this.keyInfo = new de({ schema: n.result.keyInfo }), Gc in n.result && (this.entityUInfo = n.result.entityUInfo.valueBlock.value[0]), this.suppPubInfo = n.result.suppPubInfo.valueBlock.value[0]; } toSchema() { const t = []; - return t.push(this.keyInfo.toSchema()), this.entityUInfo && t.push(new ee({ + return t.push(this.keyInfo.toSchema()), this.entityUInfo && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, value: [this.entityUInfo] - })), t.push(new ee({ + })), t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 2 @@ -63923,12 +63969,12 @@ var fs, D4 = (fs = class extends Ce { return this.entityUInfo && (t.entityUInfo = this.entityUInfo.toJSON()), t; } }, fs.CLASS_NAME = "ECCCMSSharedInfo", fs); -const wp = "version", Gc = "originatorInfo", vp = "recipientInfos", kp = "encryptedContentInfo", Jc = "unprotectedAttrs", KNe = [ - wp, - Gc, +const vp = "version", Jc = "originatorInfo", kp = "recipientInfos", Ap = "encryptedContentInfo", Yc = "unprotectedAttrs", KNe = [ vp, + Jc, kp, - Jc + Ap, + Yc ], j4 = { kdfAlgorithm: "SHA-512", kekEncryptionLength: 256 @@ -63937,21 +63983,21 @@ const wp = "version", Gc = "originatorInfo", vp = "recipientInfos", kp = "encryp "P-384": 384, "P-521": 528 }; -var io, F4 = (io = class extends Ce { +var ao, F4 = (ao = class extends Ce { constructor(t = {}) { - super(), this.version = t[wp] ?? io.defaultValues(wp), Gc in t && (this.originatorInfo = t[Gc] ?? io.defaultValues(Gc)), this.recipientInfos = t[vp] ?? io.defaultValues(vp), this.encryptedContentInfo = t[kp] ?? io.defaultValues(kp), Jc in t && (this.unprotectedAttrs = t[Jc] ?? io.defaultValues(Jc)), this.policy = { disableSplit: !!t.disableSplit }, t.schema && this.fromSchema(t.schema); + super(), this.version = t[vp] ?? ao.defaultValues(vp), Jc in t && (this.originatorInfo = t[Jc] ?? ao.defaultValues(Jc)), this.recipientInfos = t[kp] ?? ao.defaultValues(kp), this.encryptedContentInfo = t[Ap] ?? ao.defaultValues(Ap), Yc in t && (this.unprotectedAttrs = t[Yc] ?? ao.defaultValues(Yc)), this.policy = { disableSplit: !!t.disableSplit }, t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case wp: + case vp: return 0; - case Gc: + case Jc: return new dI(); - case vp: - return []; case kp: + return []; + case Ap: return new Ir(); - case Jc: + case Yc: return []; default: return super.defaultValues(t); @@ -63959,14 +64005,14 @@ var io, F4 = (io = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case wp: - return n === io.defaultValues(t); - case Gc: - return n.certs.certificates.length === 0 && n.crls.crls.length === 0; case vp: + return n === ao.defaultValues(t); case Jc: - return n.length === 0; + return n.certs.certificates.length === 0 && n.crls.crls.length === 0; case kp: + case Yc: + return n.length === 0; + case Ap: return Ir.compareWithDefault("contentType", n.contentType) && Ir.compareWithDefault("contentEncryptionAlgorithm", n.contentEncryptionAlgorithm) && Ir.compareWithDefault("encryptedContent", n.encryptedContent); default: return super.defaultValues(t); @@ -63977,8 +64023,8 @@ var io, F4 = (io = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || "" }), - new ee({ + new ue({ name: n.version || "" }), + new ne({ name: n.originatorInfo || "", optional: !0, idBlock: { @@ -63987,18 +64033,18 @@ var io, F4 = (io = class extends Ce { }, value: dI.schema().valueBlock.value }), - new An({ value: [new ot({ + new An({ value: [new st({ name: n.recipientInfos || "", - value: wh.schema() + value: kh.schema() })] }), Ir.schema(n.encryptedContentInfo || {}), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 1 }, - value: [new ot({ + value: [new st({ name: n.unprotectedAttrs || "", value: En.schema() })] @@ -64008,25 +64054,25 @@ var io, F4 = (io = class extends Ce { } fromSchema(t) { for (const r of KNe) delete t[r]; - const n = Ee(t, t, io.schema({ names: { - version: wp, - originatorInfo: Gc, - recipientInfos: vp, - encryptedContentInfo: { names: { blockName: kp } }, - unprotectedAttrs: Jc + const n = Ee(t, t, ao.schema({ names: { + version: vp, + originatorInfo: Jc, + recipientInfos: kp, + encryptedContentInfo: { names: { blockName: Ap } }, + unprotectedAttrs: Yc } })); - ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, Gc in n.result && (this.originatorInfo = new dI({ schema: new z({ value: n.result.originatorInfo.valueBlock.value }) })), this.recipientInfos = Array.from(n.result.recipientInfos, (r) => new wh({ schema: r })), this.encryptedContentInfo = new Ir({ schema: n.result.encryptedContentInfo }), Jc in n.result && (this.unprotectedAttrs = Array.from(n.result.unprotectedAttrs, (r) => new En({ schema: r }))); + ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, Jc in n.result && (this.originatorInfo = new dI({ schema: new z({ value: n.result.originatorInfo.valueBlock.value }) })), this.recipientInfos = Array.from(n.result.recipientInfos, (r) => new kh({ schema: r })), this.encryptedContentInfo = new Ir({ schema: n.result.encryptedContentInfo }), Yc in n.result && (this.unprotectedAttrs = Array.from(n.result.unprotectedAttrs, (r) => new En({ schema: r }))); } toSchema() { const t = []; - return t.push(new de({ value: this.version })), this.originatorInfo && t.push(new ee({ + return t.push(new ue({ value: this.version })), this.originatorInfo && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, value: this.originatorInfo.toSchema().valueBlock.value - })), t.push(new An({ value: Array.from(this.recipientInfos, (n) => n.toSchema()) })), t.push(this.encryptedContentInfo.toSchema()), this.unprotectedAttrs && t.push(new ee({ + })), t.push(new An({ value: Array.from(this.recipientInfos, (n) => n.toSchema()) })), t.push(this.encryptedContentInfo.toSchema()), this.unprotectedAttrs && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -64057,20 +64103,20 @@ var io, F4 = (io = class extends Ce { let i, a; if (s.useOAEP === !0) { i = o.getOIDByAlgorithm({ name: "RSA-OAEP" }, !0, "keyEncryptionAlgorithm"); - const l = new fe({ + const l = new de({ algorithmId: o.getOIDByAlgorithm({ name: s.oaepHashAlgorithm }, !0, "RSAES-OAEP-params"), - algorithmParams: new fn() + algorithmParams: new hn() }); a = new fI({ hashAlgorithm: l, - maskGenAlgorithm: new fe({ + maskGenAlgorithm: new de({ algorithmId: "1.2.840.113549.1.1.8", algorithmParams: l.toSchema() }) }).toSchema(); } else { if (i = o.getOIDByAlgorithm({ name: "RSAES-PKCS1-v1_5" }), i === "") throw new Error("Can not find OID for RSAES-PKCS1-v1_5"); - a = new fn(); + a = new hn(); } const c = new _O({ version: 0, @@ -64078,13 +64124,13 @@ var io, F4 = (io = class extends Ce { issuer: t.issuer, serialNumber: t.serialNumber }), - keyEncryptionAlgorithm: new fe({ + keyEncryptionAlgorithm: new de({ algorithmId: i, algorithmParams: a }), recipientCertificate: t }); - this.recipientInfos.push(new wh({ + this.recipientInfos.push(new kh({ variant: 1, value: c })); @@ -64108,7 +64154,7 @@ var io, F4 = (io = class extends Ce { return !0; } addRecipientByPreDefinedData(t, n = {}, r, o = Ye(!0)) { - if (Ut.assert(t, "preDefinedData", "ArrayBuffer"), !t.byteLength) throw new Error("Pre-defined data could have zero length"); + if (zt.assert(t, "preDefinedData", "ArrayBuffer"), !t.byteLength) throw new Error("Pre-defined data could have zero length"); if (!n.keyIdentifier) { const s = /* @__PURE__ */ new ArrayBuffer(16), i = new Uint8Array(s); o.getRandomValues(i), n.keyIdentifier = s; @@ -64116,19 +64162,19 @@ var io, F4 = (io = class extends Ce { switch (n.hmacHashAlgorithm || (n.hmacHashAlgorithm = "SHA-512"), n.iterationCount === void 0 && (n.iterationCount = 2048), n.keyEncryptionAlgorithm || (n.keyEncryptionAlgorithm = { name: "AES-KW", length: 256 - }), n.keyEncryptionAlgorithmParams || (n.keyEncryptionAlgorithmParams = new fn()), r) { + }), n.keyEncryptionAlgorithmParams || (n.keyEncryptionAlgorithmParams = new hn()), r) { case 1: { const s = o.getOIDByAlgorithm(n.keyEncryptionAlgorithm, !0, "keyEncryptionAlgorithm"), i = new VO({ version: 4, kekid: new SA({ keyIdentifier: new Oe({ valueHex: n.keyIdentifier }) }), - keyEncryptionAlgorithm: new fe({ + keyEncryptionAlgorithm: new de({ algorithmId: s, algorithmParams: n.keyEncryptionAlgorithmParams }), preDefinedKEK: t }); - this.recipientInfos.push(new wh({ + this.recipientInfos.push(new kh({ variant: 3, value: i })); @@ -64144,25 +64190,25 @@ var io, F4 = (io = class extends Ce { }, !0, "hmacHashAlgorithm"), l = new a0({ salt: new Oe({ valueHex: i }), iterationCount: n.iterationCount, - prf: new fe({ + prf: new de({ algorithmId: c, - algorithmParams: new fn() + algorithmParams: new hn() }) - }), u = o.getOIDByAlgorithm(n.keyEncryptionAlgorithm, !0, "keyEncryptionAlgorithm"), d = new $O({ + }), u = o.getOIDByAlgorithm(n.keyEncryptionAlgorithm, !0, "keyEncryptionAlgorithm"), f = new $O({ version: 0, - keyDerivationAlgorithm: new fe({ + keyDerivationAlgorithm: new de({ algorithmId: s, algorithmParams: l.toSchema() }), - keyEncryptionAlgorithm: new fe({ + keyEncryptionAlgorithm: new de({ algorithmId: u, algorithmParams: n.keyEncryptionAlgorithmParams }), password: t }); - this.recipientInfos.push(new wh({ + this.recipientInfos.push(new kh({ variant: 4, - value: d + value: f })); } break; @@ -64178,7 +64224,7 @@ var io, F4 = (io = class extends Ce { this._addKeyAgreeRecipientInfo(i, s, { recipientPublicKey: t }, o); } _addKeyAgreeRecipientInfo(t, n, r, o = Ye(!0)) { - const s = new jO({ rid: t }), i = new fe({ algorithmId: o.getOIDByAlgorithm({ + const s = new jO({ rid: t }), i = new de({ algorithmId: o.getOIDByAlgorithm({ name: "AES-KW", length: n.kekEncryptionLength }, !0, "keyEncryptionAlgorithm") }), a = o.getOIDByAlgorithm({ @@ -64189,15 +64235,15 @@ var io, F4 = (io = class extends Ce { const u = { version: 3, ukm: new Oe({ valueHex: c }), - keyEncryptionAlgorithm: new fe({ + keyEncryptionAlgorithm: new de({ algorithmId: a, algorithmParams: i.toSchema() }), recipientEncryptedKeys: new AA({ encryptedKeys: [s] }) - }, d = new FO(Object.assign(u, r)); - this.recipientInfos.push(new wh({ + }, f = new FO(Object.assign(u, r)); + this.recipientInfos.push(new kh({ variant: 2, - value: d + value: f })); } async encrypt(t, n, r = Ye(!0)) { @@ -64210,21 +64256,21 @@ var io, F4 = (io = class extends Ce { this.version = 2, this.encryptedContentInfo = new Ir({ disableSplit: this.policy.disableSplit, contentType: "1.2.840.113549.1.7.1", - contentEncryptionAlgorithm: new fe({ + contentEncryptionAlgorithm: new de({ algorithmId: a, algorithmParams: new Oe({ valueHex: o }) }), encryptedContent: new Oe({ valueHex: l }) }); - const d = async (m) => { + const f = async (m) => { const v = this.recipientInfos[m].value; let S, C; if (v.recipientPublicKey) S = v.recipientPublicKey.algorithm.namedCurve, C = v.recipientPublicKey; else if (v.recipientCertificate) { - const B = v.recipientCertificate.subjectPublicKeyInfo.algorithm.algorithmParams; - if (B.constructor.blockName() !== Ve.blockName()) throw new Error(`Incorrect "recipientCertificate" for index ${m}`); - switch (B.valueBlock.toString()) { + const _ = v.recipientCertificate.subjectPublicKeyInfo.algorithm.algorithmParams; + if (_.constructor.blockName() !== $e.blockName()) throw new Error(`Incorrect "recipientCertificate" for index ${m}`); + switch (_.valueBlock.toString()) { case "1.2.840.10045.3.1.7": S = "P-256"; break; @@ -64251,18 +64297,18 @@ var io, F4 = (io = class extends Ce { }, !0, ["deriveBits"]), w = await r.exportKey("spki", N.publicKey), y = await r.deriveBits({ name: "ECDH", public: C - }, N.privateKey, k), x = new fe({ schema: v.keyEncryptionAlgorithm.algorithmParams }), A = r.getAlgorithmByOID(x.algorithmId, !0, "aesKWAlgorithm"); + }, N.privateKey, k), x = new de({ schema: v.keyEncryptionAlgorithm.algorithmParams }), A = r.getAlgorithmByOID(x.algorithmId, !0, "aesKWAlgorithm"); let b = A.length; const E = /* @__PURE__ */ new ArrayBuffer(4), I = new Uint8Array(E); - for (let B = 3; B >= 0; B--) - I[B] = b, b >>= 8; + for (let _ = 3; _ >= 0; _--) + I[_] = b, b >>= 8; const O = new D4({ - keyInfo: new fe({ algorithmId: x.algorithmId }), + keyInfo: new de({ algorithmId: x.algorithmId }), entityUInfo: v.ukm, suppPubInfo: new Oe({ valueHex: E }) }).toSchema().toBER(!1), T = await k4(r.getAlgorithmByOID(v.keyEncryptionAlgorithm.algorithmId, !0, "ecdhAlgorithm").kdf, y, A.length, O, r), R = await r.importKey("raw", T, { name: "AES-KW" }, !0, ["wrapKey"]), M = await r.wrapKey("raw", c, R, { name: "AES-KW" }), F = new kA(); return F.variant = 3, F.value = LO.fromBER(w), v.originator = F, v.recipientEncryptedKeys.encryptedKeys[0].encryptedKey = new Oe({ valueHex: M }), { ecdhPrivateKey: N.privateKey }; - }, f = async (m) => { + }, d = async (m) => { const v = this.recipientInfos[m].value, S = r.getAlgorithmByOID(v.keyEncryptionAlgorithm.algorithmId, !0, "keyEncryptionAlgorithm"); if (S.name === "RSA-OAEP") { const N = v.keyEncryptionAlgorithm.algorithmParams, w = new fI({ schema: N }); @@ -64299,10 +64345,10 @@ var io, F4 = (io = class extends Ce { }, p = []; for (let m = 0; m < this.recipientInfos.length; m++) switch (this.recipientInfos[m].variant) { case 1: - p.push(await f(m)); + p.push(await d(m)); break; case 2: - p.push(await d(m)); + p.push(await f(m)); break; case 3: p.push(await h(m)); @@ -64324,11 +64370,11 @@ var io, F4 = (io = class extends Ce { const k = m.originator; if (o.recipientCertificate) { const R = o.recipientCertificate.subjectPublicKeyInfo.algorithm.algorithmParams; - if (R.constructor.blockName() !== Ve.blockName()) throw new Error(`Incorrect "recipientCertificate" for index ${p}`); + if (R.constructor.blockName() !== $e.blockName()) throw new Error(`Incorrect "recipientCertificate" for index ${p}`); v = R.valueBlock.toString(); } else if (k.value.algorithm.algorithmParams) { const R = k.value.algorithm.algorithmParams; - if (R.constructor.blockName() !== Ve.blockName()) throw new Error(`Incorrect originator for index ${p}`); + if (R.constructor.blockName() !== $e.blockName()) throw new Error(`Incorrect originator for index ${p}`); v = R.valueBlock.toString(); } else throw new Error('Parameter "recipientCertificate" is mandatory for "KeyAgreeRecipientInfo" if algorithm params are missing from originator'); if (!o.recipientPrivateKey) throw new Error('Parameter "recipientPrivateKey" is mandatory for "KeyAgreeRecipientInfo"'); @@ -64346,10 +64392,10 @@ var io, F4 = (io = class extends Ce { throw new Error(`Incorrect curve OID for index ${p}`); } let N, w = r; - vm(o.recipientPrivateKey) ? N = await r.importKey("pkcs8", o.recipientPrivateKey, { + km(o.recipientPrivateKey) ? N = await r.importKey("pkcs8", o.recipientPrivateKey, { name: "ECDH", namedCurve: S - }, !0, ["deriveBits"]) : (N = o.recipientPrivateKey, "crypto" in o && o.crypto && (w = o.crypto.subtle)), "algorithmParams" in k.value.algorithm || (k.value.algorithm.algorithmParams = new Ve({ value: v })); + }, !0, ["deriveBits"]) : (N = o.recipientPrivateKey, "crypto" in o && o.crypto && (w = o.crypto.subtle)), "algorithmParams" in k.value.algorithm || (k.value.algorithm.algorithmParams = new $e({ value: v })); const y = k.value.toSchema().toBER(!1), x = await r.importKey("spki", y, { name: "ECDH", namedCurve: S @@ -64359,15 +64405,15 @@ var io, F4 = (io = class extends Ce { }, N, C); async function b(R) { R = R || !1; - const M = new fe({ schema: m.keyEncryptionAlgorithm.algorithmParams }), F = r.getAlgorithmByOID(M.algorithmId, !0, "kwAlgorithm"); - let B = F.length; + const M = new de({ schema: m.keyEncryptionAlgorithm.algorithmParams }), F = r.getAlgorithmByOID(M.algorithmId, !0, "kwAlgorithm"); + let _ = F.length; const $ = /* @__PURE__ */ new ArrayBuffer(4), D = new Uint8Array($); for (let H = 3; H >= 0; H--) - D[H] = B, B >>= 8; - const _ = { algorithmId: M.algorithmId }; - R && (_.algorithmParams = new fn()); + D[H] = _, _ >>= 8; + const B = { algorithmId: M.algorithmId }; + R && (B.algorithmParams = new hn()); const L = new D4({ - keyInfo: new fe(_), + keyInfo: new de(B), entityUInfo: m.ukm, suppPubInfo: new Oe({ valueHex: $ }) }).toSchema().toBER(!1), j = r.getAlgorithmByOID(m.keyEncryptionAlgorithm.algorithmId, !0, "ecdhAlgorithm"); @@ -64392,7 +64438,7 @@ var io, F4 = (io = class extends Ce { if (v.hash = r.getAlgorithmByOID(x.hashAlgorithm.algorithmId), !("name" in v.hash)) throw new Error(`Incorrect OID for hash algorithm: ${x.hashAlgorithm.algorithmId}`); } let S, C = r; - vm(o.recipientPrivateKey) ? S = await r.importKey("pkcs8", o.recipientPrivateKey, v, !0, ["decrypt"]) : (S = o.recipientPrivateKey, "crypto" in o && o.crypto && (C = o.crypto.subtle)); + km(o.recipientPrivateKey) ? S = await r.importKey("pkcs8", o.recipientPrivateKey, v, !0, ["decrypt"]) : (S = o.recipientPrivateKey, "crypto" in o && o.crypto && (C = o.crypto.subtle)); const k = await C.decrypt(S.algorithm, S, m.encryptedKey.valueBlock.valueHexView), N = this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId, w = r.getAlgorithmByOID(N, !0, "contentEncryptionAlgorithm"); if (!("name" in w)) throw new Error(`Incorrect "contentEncryptionAlgorithm": ${N}`); return r.importKey("raw", k, w, !0, ["decrypt"]); @@ -64438,23 +64484,23 @@ var io, F4 = (io = class extends Ce { default: throw new Error(`Unknown recipient type in array with index ${t}`); } - const u = this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId, d = r.getAlgorithmByOID(u, !0, "contentEncryptionAlgorithm"), f = this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmParams.valueBlock.valueHex, h = new Uint8Array(f); + const u = this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmId, f = r.getAlgorithmByOID(u, !0, "contentEncryptionAlgorithm"), d = this.encryptedContentInfo.contentEncryptionAlgorithm.algorithmParams.valueBlock.valueHex, h = new Uint8Array(d); if (!this.encryptedContentInfo.encryptedContent) throw new Error("Required property `encryptedContent` is empty"); const g = this.encryptedContentInfo.getEncryptedContent(); return r.decrypt({ - name: d.name, + name: f.name, iv: h }, l, g); } -}, io.CLASS_NAME = "EnvelopedData", io); -const vh = "safeContents", Oy = "parsedValue", V4 = "contentInfos"; +}, ao.CLASS_NAME = "EnvelopedData", ao); +const Ah = "safeContents", Oy = "parsedValue", V4 = "contentInfos"; var Ra, $4 = (Ra = class extends Ce { constructor(t = {}) { - super(), this.safeContents = t[vh] ?? Ra.defaultValues(vh), Oy in t && (this.parsedValue = t[Oy] ?? Ra.defaultValues(Oy)), t.schema && this.fromSchema(t.schema); + super(), this.safeContents = t[Ah] ?? Ra.defaultValues(Ah), Oy in t && (this.parsedValue = t[Oy] ?? Ra.defaultValues(Oy)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case vh: + case Ah: return []; case Oy: return {}; @@ -64464,7 +64510,7 @@ var Ra, $4 = (Ra = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case vh: + case Ah: return n.length === 0; case Oy: return n instanceof Object && Object.keys(n).length === 0; @@ -64476,7 +64522,7 @@ var Ra, $4 = (Ra = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new ot({ + value: [new st({ name: n.contentInfos || "", value: Yn.schema() })] @@ -64494,14 +64540,14 @@ var Ra, $4 = (Ra = class extends Ce { return { safeContents: Array.from(this.safeContents, (t) => t.toJSON()) }; } async parseInternalValues(t, n = Ye(!0)) { - if (Ct.assert(t, vh), Ut.assert(t.safeContents, vh, "Array"), t.safeContents.length !== this.safeContents.length) throw new Ut('Length of "parameters.safeContents" must be equal to "this.safeContents.length"'); + if (Ot.assert(t, Ah), zt.assert(t.safeContents, Ah, "Array"), t.safeContents.length !== this.safeContents.length) throw new zt('Length of "parameters.safeContents" must be equal to "this.safeContents.length"'); this.parsedValue = { safeContents: [] }; for (const [r, o] of this.safeContents.entries()) { const s = t.safeContents[r], i = `parameters.safeContents[${r}]`; switch (o.contentType) { case iT: { - Ut.assert(o.content, "this.safeContents[j].content", Oe); + zt.assert(o.content, "this.safeContents[j].content", Oe); const a = o.content.getValue(); this.parsedValue.safeContents.push({ privacyMode: 0, @@ -64512,21 +64558,21 @@ var Ra, $4 = (Ra = class extends Ce { case pq: { const a = new F4({ schema: o.content }); - Ct.assert(i, s, "recipientCertificate", "recipientKey"); - const c = s, l = c.recipientCertificate, u = c.recipientKey, d = await a.decrypt(0, { + Ot.assert(i, s, "recipientCertificate", "recipientKey"); + const c = s, l = c.recipientCertificate, u = c.recipientKey, f = await a.decrypt(0, { recipientCertificate: l, recipientPrivateKey: u }, n); this.parsedValue.safeContents.push({ privacyMode: 2, - value: fw.fromBER(d) + value: fw.fromBER(f) }); } break; case gq: { const a = new mx({ schema: o.content }); - Ct.assert(i, s, "password"); + Ot.assert(i, s, "password"); const c = s.password, l = await a.decrypt({ password: c }, n); this.parsedValue.safeContents.push({ privacyMode: 1, @@ -64541,10 +64587,10 @@ var Ra, $4 = (Ra = class extends Ce { } async makeInternalValues(t, n = Ye(!0)) { if (!this.parsedValue) throw new Error('Please run "parseValues" first or add "parsedValue" manually'); - if (Ut.assert(this.parsedValue, "this.parsedValue", "object"), Ut.assert(this.parsedValue.safeContents, "this.parsedValue.safeContents", "Array"), Ut.assert(t, "parameters", "object"), Ct.assert(t, "safeContents"), Ut.assert(t.safeContents, "parameters.safeContents", "Array"), t.safeContents.length !== this.parsedValue.safeContents.length) throw new Ut('Length of "parameters.safeContents" must be equal to "this.parsedValue.safeContents"'); + if (zt.assert(this.parsedValue, "this.parsedValue", "object"), zt.assert(this.parsedValue.safeContents, "this.parsedValue.safeContents", "Array"), zt.assert(t, "parameters", "object"), Ot.assert(t, "safeContents"), zt.assert(t.safeContents, "parameters.safeContents", "Array"), t.safeContents.length !== this.parsedValue.safeContents.length) throw new zt('Length of "parameters.safeContents" must be equal to "this.parsedValue.safeContents"'); this.safeContents = []; for (const [r, o] of this.parsedValue.safeContents.entries()) - switch (Ct.assert("content", o, "privacyMode", "value"), Ut.assert(o.value, "content.value", fw), o.privacyMode) { + switch (Ot.assert("content", o, "privacyMode", "value"), zt.assert(o.value, "content.value", fw), o.privacyMode) { case 0: { const s = o.value.toSchema().toBER(!1); @@ -64566,7 +64612,7 @@ var Ra, $4 = (Ra = class extends Ce { case 2: { const s = new F4(), i = o.value.toSchema().toBER(!1), a = t.safeContents[r]; - switch (Ct.assert(`parameters.safeContents[${r}]`, a, "encryptingCertificate", "encryptionAlgorithm"), !0) { + switch (Ot.assert(`parameters.safeContents[${r}]`, a, "encryptingCertificate", "encryptionAlgorithm"), !0) { case a.encryptionAlgorithm.name.toLowerCase() === "aes-cbc": case a.encryptionAlgorithm.name.toLowerCase() === "aes-gcm": break; @@ -64594,41 +64640,41 @@ var Ra, $4 = (Ra = class extends Ce { return this; } }, Ra.CLASS_NAME = "AuthenticatedSafe", Ra); -const fd = "hashAlgorithm", Ap = "issuerNameHash", Sp = "issuerKeyHash", hd = "serialNumber", zNe = [ - fd, - Ap, +const hd = "hashAlgorithm", Sp = "issuerNameHash", xp = "issuerKeyHash", pd = "serialNumber", zNe = [ + hd, Sp, - hd + xp, + pd ]; -var ao, zr = (ao = class extends Ce { +var co, Wr = (co = class extends Ce { static async create(t, n, r = Ye(!0)) { - const o = new ao(); + const o = new co(); return await o.createForCertificate(t, n, r), o; } constructor(t = {}) { - super(), this.hashAlgorithm = t[fd] ?? ao.defaultValues(fd), this.issuerNameHash = t[Ap] ?? ao.defaultValues(Ap), this.issuerKeyHash = t[Sp] ?? ao.defaultValues(Sp), this.serialNumber = t[hd] ?? ao.defaultValues(hd), t.schema && this.fromSchema(t.schema); + super(), this.hashAlgorithm = t[hd] ?? co.defaultValues(hd), this.issuerNameHash = t[Sp] ?? co.defaultValues(Sp), this.issuerKeyHash = t[xp] ?? co.defaultValues(xp), this.serialNumber = t[pd] ?? co.defaultValues(pd), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case fd: - return new fe(); - case Ap: - case Sp: - return new Oe(); case hd: return new de(); + case Sp: + case xp: + return new Oe(); + case pd: + return new ue(); default: return super.defaultValues(t); } } static compareWithDefault(t, n) { switch (t) { - case fd: + case hd: return n.algorithmId === "" && !("algorithmParams" in n); - case Ap: case Sp: - case hd: - return n.isEqual(ao.defaultValues(hd)); + case xp: + case pd: + return n.isEqual(co.defaultValues(pd)); default: return super.defaultValues(t); } @@ -64638,22 +64684,22 @@ var ao, zr = (ao = class extends Ce { return new z({ name: n.blockName || "", value: [ - fe.schema(n.hashAlgorithmObject || { names: { blockName: n.hashAlgorithm || "" } }), + de.schema(n.hashAlgorithmObject || { names: { blockName: n.hashAlgorithm || "" } }), new Oe({ name: n.issuerNameHash || "" }), new Oe({ name: n.issuerKeyHash || "" }), - new de({ name: n.serialNumber || "" }) + new ue({ name: n.serialNumber || "" }) ] }); } fromSchema(t) { for (const r of zNe) delete t[r]; - const n = Ee(t, t, ao.schema({ names: { - hashAlgorithm: fd, - issuerNameHash: Ap, - issuerKeyHash: Sp, - serialNumber: hd + const n = Ee(t, t, co.schema({ names: { + hashAlgorithm: hd, + issuerNameHash: Sp, + issuerKeyHash: xp, + serialNumber: pd } })); - ke.assertSchema(n, this.className), this.hashAlgorithm = new fe({ schema: n.result.hashAlgorithm }), this.issuerNameHash = n.result.issuerNameHash, this.issuerKeyHash = n.result.issuerKeyHash, this.serialNumber = n.result.serialNumber; + ke.assertSchema(n, this.className), this.hashAlgorithm = new de({ schema: n.result.hashAlgorithm }), this.issuerNameHash = n.result.issuerNameHash, this.issuerKeyHash = n.result.issuerKeyHash, this.serialNumber = n.result.serialNumber; } toSchema() { return new z({ value: [ @@ -64672,14 +64718,14 @@ var ao, zr = (ao = class extends Ce { }; } isEqual(t) { - return !(this.hashAlgorithm.algorithmId !== t.hashAlgorithm.algorithmId || !Kt.equal(this.issuerNameHash.valueBlock.valueHexView, t.issuerNameHash.valueBlock.valueHexView) || !Kt.equal(this.issuerKeyHash.valueBlock.valueHexView, t.issuerKeyHash.valueBlock.valueHexView) || !this.serialNumber.isEqual(t.serialNumber)); + return !(this.hashAlgorithm.algorithmId !== t.hashAlgorithm.algorithmId || !Wt.equal(this.issuerNameHash.valueBlock.valueHexView, t.issuerNameHash.valueBlock.valueHexView) || !Wt.equal(this.issuerKeyHash.valueBlock.valueHexView, t.issuerKeyHash.valueBlock.valueHexView) || !this.serialNumber.isEqual(t.serialNumber)); } async createForCertificate(t, n, r = Ye(!0)) { - Ct.assert(n, fd, "issuerCertificate"); + Ot.assert(n, hd, "issuerCertificate"); const o = r.getOIDByAlgorithm({ name: n.hashAlgorithm }, !0, "hashAlgorithm"); - this.hashAlgorithm = new fe({ + this.hashAlgorithm = new de({ algorithmId: o, - algorithmParams: new fn() + algorithmParams: new hn() }); const s = n.issuerCertificate; this.serialNumber = t.serialNumber; @@ -64688,28 +64734,28 @@ var ao, zr = (ao = class extends Ce { const a = s.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView, c = await r.digest({ name: n.hashAlgorithm }, a); this.issuerKeyHash = new Oe({ valueHex: c }); } -}, ao.CLASS_NAME = "CertID", ao); -const xp = "certID", Ep = "certStatus", Cp = "thisUpdate", Yc = "nextUpdate", pd = "singleExtensions", WNe = [ - xp, +}, co.CLASS_NAME = "CertID", co); +const Ep = "certID", Cp = "certStatus", Ip = "thisUpdate", Qc = "nextUpdate", gd = "singleExtensions", WNe = [ Ep, Cp, - Yc, - pd + Ip, + Qc, + gd ]; -var co, UO = (co = class extends Ce { +var lo, UO = (lo = class extends Ce { constructor(t = {}) { - super(), this.certID = t[xp] ?? co.defaultValues(xp), this.certStatus = t[Ep] ?? co.defaultValues(Ep), this.thisUpdate = t[Cp] ?? co.defaultValues(Cp), Yc in t && (this.nextUpdate = t[Yc] ?? co.defaultValues(Yc)), pd in t && (this.singleExtensions = t[pd] ?? co.defaultValues(pd)), t.schema && this.fromSchema(t.schema); + super(), this.certID = t[Ep] ?? lo.defaultValues(Ep), this.certStatus = t[Cp] ?? lo.defaultValues(Cp), this.thisUpdate = t[Ip] ?? lo.defaultValues(Ip), Qc in t && (this.nextUpdate = t[Qc] ?? lo.defaultValues(Qc)), gd in t && (this.singleExtensions = t[gd] ?? lo.defaultValues(gd)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case xp: - return new zr(); case Ep: - return {}; + return new Wr(); case Cp: - case Yc: + return {}; + case Ip: + case Qc: return new Date(0, 0, 0); - case pd: + case gd: return []; default: return super.defaultValues(t); @@ -64717,13 +64763,13 @@ var co, UO = (co = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case xp: - return zr.compareWithDefault("hashAlgorithm", n.hashAlgorithm) && zr.compareWithDefault("issuerNameHash", n.issuerNameHash) && zr.compareWithDefault("issuerKeyHash", n.issuerKeyHash) && zr.compareWithDefault("serialNumber", n.serialNumber); case Ep: - return Object.keys(n).length === 0; + return Wr.compareWithDefault("hashAlgorithm", n.hashAlgorithm) && Wr.compareWithDefault("issuerNameHash", n.issuerNameHash) && Wr.compareWithDefault("issuerKeyHash", n.issuerKeyHash) && Wr.compareWithDefault("serialNumber", n.serialNumber); case Cp: - case Yc: - return n === co.defaultValues(t); + return Object.keys(n).length === 0; + case Ip: + case Qc: + return n === lo.defaultValues(t); default: return super.defaultValues(t); } @@ -64733,8 +64779,8 @@ var co, UO = (co = class extends Ce { return new z({ name: n.blockName || "", value: [ - zr.schema(n.certID || {}), - new Xt({ value: [ + Wr.schema(n.certID || {}), + new en({ value: [ new Je({ name: n.certStatus || "", idBlock: { @@ -64742,19 +64788,19 @@ var co, UO = (co = class extends Ce { tagNumber: 0 } }), - new ee({ + new ne({ name: n.certStatus || "", idBlock: { tagClass: 3, tagNumber: 1 }, - value: [new Yt(), new ee({ + value: [new Xt(), new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new Df()] + value: [new Ff()] })] }), new Je({ @@ -64766,16 +64812,16 @@ var co, UO = (co = class extends Ce { lenBlock: { length: 1 } }) ] }), - new Yt({ name: n.thisUpdate || "" }), - new ee({ + new Xt({ name: n.thisUpdate || "" }), + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new Yt({ name: n.nextUpdate || "" })] + value: [new Xt({ name: n.nextUpdate || "" })] }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, @@ -64788,24 +64834,24 @@ var co, UO = (co = class extends Ce { } fromSchema(t) { for (const r of WNe) delete t[r]; - const n = Ee(t, t, co.schema({ names: { - certID: { names: { blockName: xp } }, - certStatus: Ep, - thisUpdate: Cp, - nextUpdate: Yc, - singleExtensions: { names: { blockName: pd } } + const n = Ee(t, t, lo.schema({ names: { + certID: { names: { blockName: Ep } }, + certStatus: Cp, + thisUpdate: Ip, + nextUpdate: Qc, + singleExtensions: { names: { blockName: gd } } } })); - ke.assertSchema(n, this.className), this.certID = new zr({ schema: n.result.certID }), this.certStatus = n.result.certStatus, this.thisUpdate = n.result.thisUpdate.toDate(), Yc in n.result && (this.nextUpdate = n.result.nextUpdate.toDate()), pd in n.result && (this.singleExtensions = Array.from(n.result.singleExtensions.valueBlock.value, (r) => new Bn({ schema: r }))); + ke.assertSchema(n, this.className), this.certID = new Wr({ schema: n.result.certID }), this.certStatus = n.result.certStatus, this.thisUpdate = n.result.thisUpdate.toDate(), Qc in n.result && (this.nextUpdate = n.result.nextUpdate.toDate()), gd in n.result && (this.singleExtensions = Array.from(n.result.singleExtensions.valueBlock.value, (r) => new Bn({ schema: r }))); } toSchema() { const t = []; - return t.push(this.certID.toSchema()), t.push(this.certStatus), t.push(new Yt({ valueDate: this.thisUpdate })), this.nextUpdate && t.push(new ee({ + return t.push(this.certID.toSchema()), t.push(this.certStatus), t.push(new Xt({ valueDate: this.thisUpdate })), this.nextUpdate && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new Yt({ valueDate: this.nextUpdate })] - })), this.singleExtensions && t.push(new ee({ + value: [new Xt({ valueDate: this.nextUpdate })] + })), this.singleExtensions && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 @@ -64821,16 +64867,16 @@ var co, UO = (co = class extends Ce { }; return this.nextUpdate && (t.nextUpdate = this.nextUpdate), this.singleExtensions && (t.singleExtensions = Array.from(this.singleExtensions, (n) => n.toJSON())), t; } -}, co.CLASS_NAME = "SingleResponse", co); -const bk = "tbs", gd = "version", Aw = "responderID", Sw = "producedAt", xw = "responses", Ip = "responseExtensions", Qf = "ResponseData", xA = `${Qf}.${gd}`, Np = `${Qf}.${Aw}`, KO = `${Qf}.${Sw}`, HO = `${Qf}.${xw}`, EA = `${Qf}.${Ip}`, qNe = [ - Qf, +}, lo.CLASS_NAME = "SingleResponse", lo); +const bk = "tbs", md = "version", Aw = "responderID", Sw = "producedAt", xw = "responses", Np = "responseExtensions", Zf = "ResponseData", xA = `${Zf}.${md}`, Op = `${Zf}.${Aw}`, KO = `${Zf}.${Sw}`, HO = `${Zf}.${xw}`, EA = `${Zf}.${Np}`, qNe = [ + Zf, xA, - Np, + Op, KO, HO, EA ]; -var xr, yc = (xr = class extends Ce { +var xr, bc = (xr = class extends Ce { get tbs() { return br(this.tbsView); } @@ -64838,11 +64884,11 @@ var xr, yc = (xr = class extends Ce { this.tbsView = new Uint8Array(t); } constructor(t = {}) { - super(), this.tbsView = new Uint8Array(t[bk] ?? xr.defaultValues(bk)), gd in t && (this.version = t[gd] ?? xr.defaultValues(gd)), this.responderID = t[Aw] ?? xr.defaultValues(Aw), this.producedAt = t[Sw] ?? xr.defaultValues(Sw), this.responses = t[xw] ?? xr.defaultValues(xw), Ip in t && (this.responseExtensions = t[Ip] ?? xr.defaultValues(Ip)), t.schema && this.fromSchema(t.schema); + super(), this.tbsView = new Uint8Array(t[bk] ?? xr.defaultValues(bk)), md in t && (this.version = t[md] ?? xr.defaultValues(md)), this.responderID = t[Aw] ?? xr.defaultValues(Aw), this.producedAt = t[Sw] ?? xr.defaultValues(Sw), this.responses = t[xw] ?? xr.defaultValues(xw), Np in t && (this.responseExtensions = t[Np] ?? xr.defaultValues(Np)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case gd: + case md: return 0; case bk: return Dn; @@ -64851,7 +64897,7 @@ var xr, yc = (xr = class extends Ce { case Sw: return new Date(0, 0, 0); case xw: - case Ip: + case Np: return []; default: return super.defaultValues(t); @@ -64866,7 +64912,7 @@ var xr, yc = (xr = class extends Ce { case Sw: return n === xr.defaultValues(t); case xw: - case Ip: + case Np: return n.length === 0; default: return super.defaultValues(t); @@ -64875,37 +64921,37 @@ var xr, yc = (xr = class extends Ce { static schema(t = {}) { const n = t.names ?? {}; return new z({ - name: n.blockName || Qf, + name: n.blockName || Zf, value: [ - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new de({ name: n.version || xA })] + value: [new ue({ name: n.version || xA })] }), - new Xt({ value: [new ee({ - name: n.responderID || Np, + new en({ value: [new ne({ + name: n.responderID || Op, idBlock: { tagClass: 3, tagNumber: 1 }, - value: [Qt.schema(n.ResponseDataByName || { names: { blockName: "ResponseData.byName" } })] - }), new ee({ - name: n.responderID || Np, + value: [Zt.schema(n.ResponseDataByName || { names: { blockName: "ResponseData.byName" } })] + }), new ne({ + name: n.responderID || Op, idBlock: { tagClass: 3, tagNumber: 2 }, value: [new Oe({ name: n.ResponseDataByKey || "ResponseData.byKey" })] })] }), - new Yt({ name: n.producedAt || KO }), - new z({ value: [new ot({ + new Xt({ name: n.producedAt || KO }), + new z({ value: [new st({ name: HO, value: UO.schema(n.response || {}) })] }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, @@ -64919,35 +64965,35 @@ var xr, yc = (xr = class extends Ce { fromSchema(t) { for (const r of qNe) delete t[r]; const n = Ee(t, t, xr.schema()); - ke.assertSchema(n, this.className), this.tbsView = n.result.ResponseData.valueBeforeDecodeView, xA in n.result && (this.version = n.result[xA].valueBlock.valueDec), n.result[Np].idBlock.tagNumber === 1 ? this.responderID = new Qt({ schema: n.result[Np].valueBlock.value[0] }) : this.responderID = n.result[Np].valueBlock.value[0], this.producedAt = n.result[KO].toDate(), this.responses = Array.from(n.result[HO], (r) => new UO({ schema: r })), EA in n.result && (this.responseExtensions = Array.from(n.result[EA].valueBlock.value, (r) => new Bn({ schema: r }))); + ke.assertSchema(n, this.className), this.tbsView = n.result.ResponseData.valueBeforeDecodeView, xA in n.result && (this.version = n.result[xA].valueBlock.valueDec), n.result[Op].idBlock.tagNumber === 1 ? this.responderID = new Zt({ schema: n.result[Op].valueBlock.value[0] }) : this.responderID = n.result[Op].valueBlock.value[0], this.producedAt = n.result[KO].toDate(), this.responses = Array.from(n.result[HO], (r) => new UO({ schema: r })), EA in n.result && (this.responseExtensions = Array.from(n.result[EA].valueBlock.value, (r) => new Bn({ schema: r }))); } toSchema(t = !1) { let n; if (t === !1) { if (!this.tbsView.byteLength) return xr.schema(); - const r = hn(this.tbsView); + const r = pn(this.tbsView); ke.assert(r, "TBS Response Data"), n = r.result; } else { const r = []; - gd in this && r.push(new ee({ + md in this && r.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new de({ value: this.version })] - })), this.responderID instanceof Qt ? r.push(new ee({ + value: [new ue({ value: this.version })] + })), this.responderID instanceof Zt ? r.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, value: [this.responderID.toSchema()] - })) : r.push(new ee({ + })) : r.push(new ne({ idBlock: { tagClass: 3, tagNumber: 2 }, value: [this.responderID] - })), r.push(new Yt({ valueDate: this.producedAt })), r.push(new z({ value: Array.from(this.responses, (o) => o.toSchema()) })), this.responseExtensions && r.push(new ee({ + })), r.push(new Xt({ valueDate: this.producedAt })), r.push(new z({ value: Array.from(this.responses, (o) => o.toSchema()) })), this.responseExtensions && r.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 @@ -64959,17 +65005,17 @@ var xr, yc = (xr = class extends Ce { } toJSON() { const t = {}; - return gd in this && (t.version = this.version), this.responderID && (t.responderID = this.responderID), this.producedAt && (t.producedAt = this.producedAt), this.responses && (t.responses = Array.from(this.responses, (n) => n.toJSON())), this.responseExtensions && (t.responseExtensions = Array.from(this.responseExtensions, (n) => n.toJSON())), t; + return md in this && (t.version = this.version), this.responderID && (t.responderID = this.responderID), this.producedAt && (t.producedAt = this.producedAt), this.responses && (t.responses = Array.from(this.responses, (n) => n.toJSON())), this.responseExtensions && (t.responseExtensions = Array.from(this.responseExtensions, (n) => n.toJSON())), t; } }, xr.CLASS_NAME = "ResponseData", xr); const hI = "trustedCerts", pI = "certs", gI = "crls", mI = "ocsps", yI = "checkDate", bI = "findOrigin", wI = "findIssuer"; -var Ef, Py = (Ef = class extends Error { +var If, Py = (If = class extends Error { constructor(t, n) { - super(n), this.name = Ef.NAME, this.code = t, this.message = n; + super(n), this.name = If.NAME, this.code = t, this.message = n; } -}, Ef.NAME = "ChainValidationError", Ef); +}, If.NAME = "ChainValidationError", If); function GNe(e, t) { - for (let n = 0; n < t.length; n++) if (Kt.equal(e.tbsView, t[n].tbsView)) return !0; + for (let n = 0; n < t.length; n++) if (Wt.equal(e.tbsView, t[n].tbsView)) return !0; return !1; } var Cq = class Iq { @@ -64979,9 +65025,9 @@ var Cq = class Iq { static defaultFindOrigin(t, n) { t.tbsView.byteLength === 0 && (t.tbsView = new Uint8Array(t.encodeTBS().toBER())); for (const r of n.certs) - if (r.tbsView.byteLength === 0 && (r.tbsView = new Uint8Array(r.encodeTBS().toBER())), Kt.equal(t.tbsView, r.tbsView)) return "Intermediate Certificates"; + if (r.tbsView.byteLength === 0 && (r.tbsView = new Uint8Array(r.encodeTBS().toBER())), Wt.equal(t.tbsView, r.tbsView)) return "Intermediate Certificates"; for (const r of n.trustedCerts) - if (r.tbsView.byteLength === 0 && (r.tbsView = new Uint8Array(r.encodeTBS().toBER())), Kt.equal(t.tbsView, r.tbsView)) return "Trusted Certificates"; + if (r.tbsView.byteLength === 0 && (r.tbsView = new Uint8Array(r.encodeTBS().toBER())), Wt.equal(t.tbsView, r.tbsView)) return "Trusted Certificates"; return "Unknown"; } async defaultFindIssuer(t, n, r = Ye(!0)) { @@ -64999,12 +65045,12 @@ var Cq = class Iq { } function c(l) { if (s !== null && l.extensions) { - let d = !1; - for (const f of l.extensions) if (f.extnID === "2.5.29.14" && f.parsedValue) { - d = !0, Kt.equal(f.parsedValue.valueBlock.valueHex, s.valueBlock.valueHexView) && o.push(l); + let f = !1; + for (const d of l.extensions) if (d.extnID === "2.5.29.14" && d.parsedValue) { + f = !0, Wt.equal(d.parsedValue.valueBlock.valueHex, s.valueBlock.valueHexView) && o.push(l); break; } - if (d) return; + if (f) return; } let u = !1; a !== null && (u = l.serialNumber.isEqual(a)), i !== null ? l.subject.isEqual(i) && u && o.push(l) : t.issuer.isEqual(l.subject) && o.push(l); @@ -65057,7 +65103,7 @@ var Cq = class Iq { const S = await this.findIssuer(g, this, p); if (S.length === 0) throw new Error("No valid certificate paths found"); for (let C = 0; C < S.length; C++) { - if (Kt.equal(S[C].tbsView, g.tbsView)) { + if (Wt.equal(S[C].tbsView, g.tbsView)) { m.push([S[C]]); continue; } @@ -65228,19 +65274,19 @@ var Cq = class Iq { }; r.push(...this.trustedCerts), r.push(...this.certs); for (let g = 0; g < r.length; g++) for (let p = 0; p < r.length; p++) - if (g !== p && Kt.equal(r[g].tbsView, r[p].tbsView)) { + if (g !== p && Wt.equal(r[g].tbsView, r[p].tbsView)) { r.splice(p, 1), g = 0; break; } const l = r[r.length - 1]; let u; - const d = [l]; + const f = [l]; if (u = await o(l, n), u.length === 0) throw new Py(60, "Unable to find certificate path"); for (let g = u.length - 1; g >= 0; g--) { let p = !1; for (let m = 0; m < u[g].length; m++) { const v = u[g][m]; - for (let S = 0; S < this.trustedCerts.length; S++) if (Kt.equal(v.tbsView, this.trustedCerts[S].tbsView)) { + for (let S = 0; S < this.trustedCerts.length; S++) if (Wt.equal(v.tbsView, this.trustedCerts[S].tbsView)) { p = !0; break; } @@ -65249,17 +65295,17 @@ var Cq = class Iq { p || u.splice(g, 1); } if (u.length === 0) throw new Py(97, "No valid certificate paths found"); - let f = u[0].length, h = 0; - for (let g = 0; g < u.length; g++) u[g].length < f && (f = u[g].length, h = g); - for (let g = 0; g < u[h].length; g++) d.push(u[h][g]); - if (u = await c(d, this.checkDate), u.result === !1) throw u; - return d; + let d = u[0].length, h = 0; + for (let g = 0; g < u.length; g++) u[g].length < d && (d = u[g].length, h = g); + for (let g = 0; g < u[h].length; g++) f.push(u[h][g]); + if (u = await c(f, this.checkDate), u.result === !1) throw u; + return f; } async verify(t = {}, n = Ye(!0)) { function r(c, l) { - const u = sl(c), d = sl(l), f = u.split("."), h = d.split("."), g = f.length, p = h.length; + const u = il(c), f = il(l), d = u.split("."), h = f.split("."), g = d.length, p = h.length; if (g === 0 || p === 0 || g < p) return !1; - for (let m = 0; m < g; m++) if (f[m].length === 0) return !1; + for (let m = 0; m < g; m++) if (d[m].length === 0) return !1; for (let m = 0; m < p; m++) if (h[m].length === 0) { if (m === 0) { if (p === 1) return !1; @@ -65268,46 +65314,46 @@ var Cq = class Iq { return !1; } for (let m = 0; m < p; m++) - if (h[p - 1 - m].length !== 0 && f[g - 1 - m].localeCompare(h[p - 1 - m]) !== 0) + if (h[p - 1 - m].length !== 0 && d[g - 1 - m].localeCompare(h[p - 1 - m]) !== 0) return !1; return !0; } function o(c, l) { - const u = sl(c), d = sl(l), f = u.split("@"), h = d.split("@"); - if (f.length === 0 || h.length === 0 || f.length < h.length) return !1; + const u = il(c), f = il(l), d = u.split("@"), h = f.split("@"); + if (d.length === 0 || h.length === 0 || d.length < h.length) return !1; if (h.length === 1) { - if (r(f[1], h[0])) { - const g = f[1].split("."), p = h[0].split("."); + if (r(d[1], h[0])) { + const g = d[1].split("."), p = h[0].split("."); return p[0].length === 0 ? !0 : g.length === p.length; } return !1; } - return u.localeCompare(d) === 0; + return u.localeCompare(f) === 0; } function s(c, l) { - let u = sl(c); - const d = sl(l), f = u.split("/"); - if (d.split("/").length > 1) return !1; - if (f.length > 1) { - for (let h = 0; h < f.length; h++) if (f[h].length > 0 && f[h].charAt(f[h].length - 1) !== ":") { - u = f[h].split(":")[0]; + let u = il(c); + const f = il(l), d = u.split("/"); + if (f.split("/").length > 1) return !1; + if (d.length > 1) { + for (let h = 0; h < d.length; h++) if (d[h].length > 0 && d[h].charAt(d[h].length - 1) !== ":") { + u = d[h].split(":")[0]; break; } } - if (r(u, d)) { - const h = u.split("."), g = d.split("."); + if (r(u, f)) { + const h = u.split("."), g = f.split("."); return g[0].length === 0 ? !0 : h.length === g.length; } return !1; } function i(c, l) { - const u = c.valueBlock.valueHexView, d = l.valueBlock.valueHexView; - if (u.length === 4 && d.length === 8) { - for (let f = 0; f < 4; f++) if ((u[f] ^ d[f]) & d[f + 4]) return !1; + const u = c.valueBlock.valueHexView, f = l.valueBlock.valueHexView; + if (u.length === 4 && f.length === 8) { + for (let d = 0; d < 4; d++) if ((u[d] ^ f[d]) & f[d + 4]) return !1; return !0; } - if (u.length === 16 && d.length === 32) { - for (let f = 0; f < 16; f++) if ((u[f] ^ d[f]) & d[f + 16]) return !1; + if (u.length === 16 && f.length === 32) { + for (let d = 0; d < 16; d++) if ((u[d] ^ f[d]) & f[d + 16]) return !1; return !0; } return !1; @@ -65315,23 +65361,23 @@ var Cq = class Iq { function a(c, l) { if (c.typesAndValues.length === 0 || l.typesAndValues.length === 0) return !0; if (c.typesAndValues.length < l.typesAndValues.length) return !1; - let u = !0, d = 0; - for (let f = 0; f < l.typesAndValues.length; f++) { + let u = !0, f = 0; + for (let d = 0; d < l.typesAndValues.length; d++) { let h = !1; - for (let g = d; g < c.typesAndValues.length; g++) - if (h = c.typesAndValues[g].isEqual(l.typesAndValues[f]), c.typesAndValues[g].type === l.typesAndValues[f].type && (u = u && h), h === !0) - if (d === 0 || d === g) { - d = g + 1; + for (let g = f; g < c.typesAndValues.length; g++) + if (h = c.typesAndValues[g].isEqual(l.typesAndValues[d]), c.typesAndValues[g].type === l.typesAndValues[d].type && (u = u && h), h === !0) + if (f === 0 || f === g) { + f = g + 1; break; } else return !1; if (h === !1) return !1; } - return d === 0 ? !1 : u; + return f === 0 ? !1 : u; } try { if (this.certs.length === 0) throw new Error("Empty certificate array"); - const c = t.passedWhenNotRevValues || !1, l = t.initialPolicySet || ["2.5.29.32.0"], u = t.initialExplicitPolicy || !1, d = t.initialPolicyMappingInhibit || !1, f = t.initialInhibitPolicy || !1, h = t.initialPermittedSubtreesSet || [], g = t.initialExcludedSubtreesSet || [], p = t.initialRequiredNameForms || []; - let m = u, v = d, S = f; + const c = t.passedWhenNotRevValues || !1, l = t.initialPolicySet || ["2.5.29.32.0"], u = t.initialExplicitPolicy || !1, f = t.initialPolicyMappingInhibit || !1, d = t.initialInhibitPolicy || !1, h = t.initialPermittedSubtreesSet || [], g = t.initialExcludedSubtreesSet || [], p = t.initialRequiredNameForms || []; + let m = u, v = f, S = d; const C = [ !1, !1, @@ -65349,10 +65395,10 @@ var Cq = class Iq { const T = new Array(this.certs.length - 1), R = new Array(this.certs.length - 1); let M = m ? this.certs.length - 1 : -1; for (let D = this.certs.length - 2; D >= 0; D--, b++) { - const _ = this.certs[D]; - if (_.extensions) { - for (let L = 0; L < _.extensions.length; L++) { - const j = _.extensions[L]; + const B = this.certs[D]; + if (B.extensions) { + for (let L = 0; L < B.extensions.length; L++) { + const j = B.extensions[L]; if (j.extnID === "2.5.29.32") { R[D] = j.parsedValue; for (let H = 0; H < E.length; H++) if (E[H] === "2.5.29.32.0") { @@ -65361,15 +65407,15 @@ var Cq = class Iq { } for (let H = 0; H < j.parsedValue.certificatePolicies.length; H++) { let Y = -1; - const ue = j.parsedValue.certificatePolicies[H].policyIdentifier; - for (let le = 0; le < E.length; le++) if (ue === E[le]) { - Y = le; + const le = j.parsedValue.certificatePolicies[H].policyIdentifier; + for (let ie = 0; ie < E.length; ie++) if (le === E[ie]) { + Y = ie; break; } if (Y === -1) { - E.push(ue); - const le = new Array(this.certs.length - 1); - le[D] = !0, I.push(le); + E.push(le); + const ie = new Array(this.certs.length - 1); + ie[D] = !0, I.push(ie); } else I[Y][D] = !0; } } @@ -65394,27 +65440,27 @@ var Cq = class Iq { m === !1 && C[0] === !0 && (k--, k === 0 && (m = !0, M = D, C[0] = !1)), v === !1 && C[1] === !0 && (N--, N === 0 && (v = !0, C[1] = !1)), S === !1 && C[2] === !0 && (w--, w === 0 && (S = !0, C[2] = !1)); } } - for (let D = 0; D < this.certs.length - 1; D++) if (D < this.certs.length - 2 && typeof T[D + 1] < "u") for (let _ = 0; _ < T[D + 1].mappings.length; _++) { - if (T[D + 1].mappings[_].issuerDomainPolicy === "2.5.29.32.0" || T[D + 1].mappings[_].subjectDomainPolicy === "2.5.29.32.0") return { + for (let D = 0; D < this.certs.length - 1; D++) if (D < this.certs.length - 2 && typeof T[D + 1] < "u") for (let B = 0; B < T[D + 1].mappings.length; B++) { + if (T[D + 1].mappings[B].issuerDomainPolicy === "2.5.29.32.0" || T[D + 1].mappings[B].subjectDomainPolicy === "2.5.29.32.0") return { result: !1, resultCode: 99, resultMessage: 'The "anyPolicy" should not be a part of policy mapping scheme' }; let L = -1, j = -1; for (let H = 0; H < E.length; H++) - E[H] === T[D + 1].mappings[_].issuerDomainPolicy && (L = H), E[H] === T[D + 1].mappings[_].subjectDomainPolicy && (j = H); + E[H] === T[D + 1].mappings[B].issuerDomainPolicy && (L = H), E[H] === T[D + 1].mappings[B].subjectDomainPolicy && (j = H); typeof I[L][D] < "u" && delete I[L][D]; - for (let H = 0; H < R[D].certificatePolicies.length; H++) if (T[D + 1].mappings[_].subjectDomainPolicy === R[D].certificatePolicies[H].policyIdentifier && L !== -1 && j !== -1) + for (let H = 0; H < R[D].certificatePolicies.length; H++) if (T[D + 1].mappings[B].subjectDomainPolicy === R[D].certificatePolicies[H].policyIdentifier && L !== -1 && j !== -1) for (let Y = 0; Y <= D; Y++) typeof I[j][Y] < "u" && (I[L][Y] = !0, delete I[j][Y]); } - for (let D = 0; D < E.length; D++) if (E[D] === "2.5.29.32.0") for (let _ = 0; _ < M; _++) delete I[D][_]; + for (let D = 0; D < E.length; D++) if (E[D] === "2.5.29.32.0") for (let B = 0; B < M; B++) delete I[D][B]; const F = []; for (let D = 0; D < I.length; D++) { - let _ = !0; + let B = !0; for (let L = 0; L < this.certs.length - 1; L++) { let j = !1; if (L < M && E[D] === "2.5.29.32.0" && E.length > 1) { - _ = !1; + B = !1; break; } if (typeof I[D][L] > "u") { @@ -65425,45 +65471,45 @@ var Cq = class Iq { } } if (!j) { - _ = !1; + B = !1; break; } } } - _ === !0 && F.push(E[D]); + B === !0 && F.push(E[D]); } - let B = []; - if (l.length === 1 && l[0] === "2.5.29.32.0" && m === !1) B = l; - else if (F.length === 1 && F[0] === "2.5.29.32.0") B = l; - else for (let D = 0; D < F.length; D++) for (let _ = 0; _ < l.length; _++) if (l[_] === F[D] || l[_] === "2.5.29.32.0") { - B.push(F[D]); + let _ = []; + if (l.length === 1 && l[0] === "2.5.29.32.0" && m === !1) _ = l; + else if (F.length === 1 && F[0] === "2.5.29.32.0") _ = l; + else for (let D = 0; D < F.length; D++) for (let B = 0; B < l.length; B++) if (l[B] === F[D] || l[B] === "2.5.29.32.0") { + _.push(F[D]); break; } const $ = { - result: B.length > 0, + result: _.length > 0, resultCode: 0, - resultMessage: B.length > 0 ? "" : 'Zero "userConstrPolicies" array, no intersections with "authConstrPolicies"', + resultMessage: _.length > 0 ? "" : 'Zero "userConstrPolicies" array, no intersections with "authConstrPolicies"', authConstrPolicies: F, - userConstrPolicies: B, + userConstrPolicies: _, explicitPolicyIndicator: m, policyMappings: T, certificatePath: this.certs }; - if (B.length === 0 || $.result === !1) return $; + if (_.length === 0 || $.result === !1) return $; b = 1; for (let D = this.certs.length - 2; D >= 0; D--, b++) { - const _ = this.certs[D]; + const B = this.certs[D]; let L = [], j = [], H = []; - if (_.extensions) for (let pe = 0; pe < _.extensions.length; pe++) { - const ge = _.extensions[pe]; - ge.extnID === "2.5.29.30" && ("permittedSubtrees" in ge.parsedValue && (j = j.concat(ge.parsedValue.permittedSubtrees)), "excludedSubtrees" in ge.parsedValue && (H = H.concat(ge.parsedValue.excludedSubtrees))), ge.extnID === "2.5.29.17" && (L = L.concat(ge.parsedValue.altNames)); + if (B.extensions) for (let pe = 0; pe < B.extensions.length; pe++) { + const ve = B.extensions[pe]; + ve.extnID === "2.5.29.30" && ("permittedSubtrees" in ve.parsedValue && (j = j.concat(ve.parsedValue.permittedSubtrees)), "excludedSubtrees" in ve.parsedValue && (H = H.concat(ve.parsedValue.excludedSubtrees))), ve.extnID === "2.5.29.17" && (L = L.concat(ve.parsedValue.altNames)); } let Y = A.length <= 0; for (let pe = 0; pe < A.length; pe++) switch (A[pe].base.type) { case 4: - if (A[pe].base.value.typesAndValues.length !== _.subject.typesAndValues.length) continue; + if (A[pe].base.value.typesAndValues.length !== B.subject.typesAndValues.length) continue; Y = !0; - for (let ge = 0; ge < _.subject.typesAndValues.length; ge++) if (_.subject.typesAndValues[ge].type !== A[pe].base.value.typesAndValues[ge].type) { + for (let ve = 0; ve < B.subject.typesAndValues.length; ve++) if (B.subject.typesAndValues[ve].type !== A[pe].base.value.typesAndValues[ve].type) { Y = !1; break; } @@ -65471,7 +65517,7 @@ var Cq = class Iq { } if (Y === !1) throw $.result = !1, $.resultCode = 21, $.resultMessage = "No necessary name form found", $; - const ue = [ + const le = [ [], [], [], @@ -65480,76 +65526,76 @@ var Cq = class Iq { ]; for (let pe = 0; pe < y.length; pe++) switch (y[pe].base.type) { case 1: - ue[0].push(y[pe]); + le[0].push(y[pe]); break; case 2: - ue[1].push(y[pe]); + le[1].push(y[pe]); break; case 4: - ue[2].push(y[pe]); + le[2].push(y[pe]); break; case 6: - ue[3].push(y[pe]); + le[3].push(y[pe]); break; case 7: - ue[4].push(y[pe]); + le[4].push(y[pe]); } for (let pe = 0; pe < 5; pe++) { - let ge = !1, Me = !1; - const Be = ue[pe]; - for (let te = 0; te < Be.length; te++) { + let ve = !1, _e = !1; + const Be = le[pe]; + for (let ee = 0; ee < Be.length; ee++) { switch (pe) { case 0: if (L.length > 0) - for (let he = 0; he < L.length; he++) L[he].type === 1 && (Me = !0, ge = ge || o(L[he].value, Be[te].base.value)); - else for (let he = 0; he < _.subject.typesAndValues.length; he++) (_.subject.typesAndValues[he].type === "1.2.840.113549.1.9.1" || _.subject.typesAndValues[he].type === "0.9.2342.19200300.100.1.3") && (Me = !0, ge = ge || o(_.subject.typesAndValues[he].value.valueBlock.value, Be[te].base.value)); + for (let he = 0; he < L.length; he++) L[he].type === 1 && (_e = !0, ve = ve || o(L[he].value, Be[ee].base.value)); + else for (let he = 0; he < B.subject.typesAndValues.length; he++) (B.subject.typesAndValues[he].type === "1.2.840.113549.1.9.1" || B.subject.typesAndValues[he].type === "0.9.2342.19200300.100.1.3") && (_e = !0, ve = ve || o(B.subject.typesAndValues[he].value.valueBlock.value, Be[ee].base.value)); break; case 1: if (L.length > 0) - for (let he = 0; he < L.length; he++) L[he].type === 2 && (Me = !0, ge = ge || r(L[he].value, Be[te].base.value)); + for (let he = 0; he < L.length; he++) L[he].type === 2 && (_e = !0, ve = ve || r(L[he].value, Be[ee].base.value)); break; case 2: - Me = !0, ge = a(_.subject, Be[te].base.value); + _e = !0, ve = a(B.subject, Be[ee].base.value); break; case 3: if (L.length > 0) - for (let he = 0; he < L.length; he++) L[he].type === 6 && (Me = !0, ge = ge || s(L[he].value, Be[te].base.value)); + for (let he = 0; he < L.length; he++) L[he].type === 6 && (_e = !0, ve = ve || s(L[he].value, Be[ee].base.value)); break; case 4: if (L.length > 0) - for (let he = 0; he < L.length; he++) L[he].type === 7 && (Me = !0, ge = ge || i(L[he].value, Be[te].base.value)); + for (let he = 0; he < L.length; he++) L[he].type === 7 && (_e = !0, ve = ve || i(L[he].value, Be[ee].base.value)); } - if (ge) break; + if (ve) break; } - if (ge === !1 && Be.length > 0 && Me) + if (ve === !1 && Be.length > 0 && _e) throw $.result = !1, $.resultCode = 41, $.resultMessage = 'Failed to meet "permitted sub-trees" name constraint', $; } - let le = !1; + let ie = !1; for (let pe = 0; pe < x.length; pe++) { switch (x[pe].base.type) { case 1: if (L.length >= 0) - for (let ge = 0; ge < L.length; ge++) L[ge].type === 1 && (le = le || o(L[ge].value, x[pe].base.value)); - else for (let ge = 0; ge < _.subject.typesAndValues.length; ge++) (_.subject.typesAndValues[ge].type === "1.2.840.113549.1.9.1" || _.subject.typesAndValues[ge].type === "0.9.2342.19200300.100.1.3") && (le = le || o(_.subject.typesAndValues[ge].value.valueBlock.value, x[pe].base.value)); + for (let ve = 0; ve < L.length; ve++) L[ve].type === 1 && (ie = ie || o(L[ve].value, x[pe].base.value)); + else for (let ve = 0; ve < B.subject.typesAndValues.length; ve++) (B.subject.typesAndValues[ve].type === "1.2.840.113549.1.9.1" || B.subject.typesAndValues[ve].type === "0.9.2342.19200300.100.1.3") && (ie = ie || o(B.subject.typesAndValues[ve].value.valueBlock.value, x[pe].base.value)); break; case 2: if (L.length > 0) - for (let ge = 0; ge < L.length; ge++) L[ge].type === 2 && (le = le || r(L[ge].value, x[pe].base.value)); + for (let ve = 0; ve < L.length; ve++) L[ve].type === 2 && (ie = ie || r(L[ve].value, x[pe].base.value)); break; case 4: - le = le || a(_.subject, x[pe].base.value); + ie = ie || a(B.subject, x[pe].base.value); break; case 6: if (L.length > 0) - for (let ge = 0; ge < L.length; ge++) L[ge].type === 6 && (le = le || s(L[ge].value, x[pe].base.value)); + for (let ve = 0; ve < L.length; ve++) L[ve].type === 6 && (ie = ie || s(L[ve].value, x[pe].base.value)); break; case 7: if (L.length > 0) - for (let ge = 0; ge < L.length; ge++) L[ge].type === 7 && (le = le || i(L[ge].value, x[pe].base.value)); + for (let ve = 0; ve < L.length; ve++) L[ve].type === 7 && (ie = ie || i(L[ve].value, x[pe].base.value)); } - if (le) break; + if (ie) break; } - if (le === !0) + if (ie === !0) throw $.result = !1, $.resultCode = 42, $.resultMessage = 'Failed to meet "excluded sub-trees" name constraint', $; y = y.concat(j), x = x.concat(H); } @@ -65573,25 +65619,25 @@ var Cq = class Iq { } } }; -const CA = "tbsResponseData", Ew = "signatureAlgorithm", Cw = "signature", Op = "certs", Vv = "BasicOCSPResponse", zO = `${Vv}.${CA}`, WO = `${Vv}.${Ew}`, qO = `${Vv}.${Cw}`, IA = `${Vv}.${Op}`, JNe = [ +const CA = "tbsResponseData", Ew = "signatureAlgorithm", Cw = "signature", Pp = "certs", Vv = "BasicOCSPResponse", zO = `${Vv}.${CA}`, WO = `${Vv}.${Ew}`, qO = `${Vv}.${Cw}`, IA = `${Vv}.${Pp}`, JNe = [ zO, WO, qO, IA ], U4 = "1.3.6.1.5.5.7.3.9", YNe = "2.5.29.15", QNe = "2.5.29.37"; -var on, u0 = (on = class extends Ce { +var sn, u0 = (sn = class extends Ce { constructor(t = {}) { - super(), this.tbsResponseData = t[CA] ?? on.defaultValues(CA), this.signatureAlgorithm = t[Ew] ?? on.defaultValues(Ew), this.signature = t[Cw] ?? on.defaultValues(Cw), Op in t && (this.certs = t[Op] ?? on.defaultValues(Op)), t.schema && this.fromSchema(t.schema); + super(), this.tbsResponseData = t[CA] ?? sn.defaultValues(CA), this.signatureAlgorithm = t[Ew] ?? sn.defaultValues(Ew), this.signature = t[Cw] ?? sn.defaultValues(Cw), Pp in t && (this.certs = t[Pp] ?? sn.defaultValues(Pp)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case CA: - return new yc(); + return new bc(); case Ew: - return new fe(); + return new de(); case Cw: - return new ht(); - case Op: + return new pt(); + case Pp: return []; default: return super.defaultValues(t); @@ -65600,14 +65646,14 @@ var on, u0 = (on = class extends Ce { static compareWithDefault(t, n) { switch (t) { case "type": { - let r = yc.compareWithDefault("tbs", n.tbs) && yc.compareWithDefault("responderID", n.responderID) && yc.compareWithDefault("producedAt", n.producedAt) && yc.compareWithDefault("responses", n.responses); - return "responseExtensions" in n && (r = r && yc.compareWithDefault("responseExtensions", n.responseExtensions)), r; + let r = bc.compareWithDefault("tbs", n.tbs) && bc.compareWithDefault("responderID", n.responderID) && bc.compareWithDefault("producedAt", n.producedAt) && bc.compareWithDefault("responses", n.responses); + return "responseExtensions" in n && (r = r && bc.compareWithDefault("responseExtensions", n.responseExtensions)), r; } case Ew: return n.algorithmId === "" && !("algorithmParams" in n); case Cw: - return n.isEqual(on.defaultValues(t)); - case Op: + return n.isEqual(sn.defaultValues(t)); + case Pp: return n.length === 0; default: return super.defaultValues(t); @@ -65618,16 +65664,16 @@ var on, u0 = (on = class extends Ce { return new z({ name: n.blockName || Vv, value: [ - yc.schema(n.tbsResponseData || { names: { blockName: zO } }), - fe.schema(n.signatureAlgorithm || { names: { blockName: WO } }), - new ht({ name: n.signature || qO }), - new ee({ + bc.schema(n.tbsResponseData || { names: { blockName: zO } }), + de.schema(n.signatureAlgorithm || { names: { blockName: WO } }), + new pt({ name: n.signature || qO }), + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new z({ value: [new ot({ + value: [new z({ value: [new st({ name: IA, value: Mr.schema(n.certs || {}) })] })] @@ -65637,12 +65683,12 @@ var on, u0 = (on = class extends Ce { } fromSchema(t) { for (const r of JNe) delete t[r]; - const n = Ee(t, t, on.schema()); - ke.assertSchema(n, this.className), this.tbsResponseData = new yc({ schema: n.result[zO] }), this.signatureAlgorithm = new fe({ schema: n.result[WO] }), this.signature = n.result[qO], IA in n.result && (this.certs = Array.from(n.result[IA], (r) => new Mr({ schema: r }))); + const n = Ee(t, t, sn.schema()); + ke.assertSchema(n, this.className), this.tbsResponseData = new bc({ schema: n.result[zO] }), this.signatureAlgorithm = new de({ schema: n.result[WO] }), this.signature = n.result[qO], IA in n.result && (this.certs = Array.from(n.result[IA], (r) => new Mr({ schema: r }))); } toSchema() { const t = []; - return t.push(this.tbsResponseData.toSchema()), t.push(this.signatureAlgorithm.toSchema()), t.push(this.signature), this.certs && t.push(new ee({ + return t.push(this.tbsResponseData.toSchema()), t.push(this.signatureAlgorithm.toSchema()), t.push(this.signature), this.certs && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -65667,7 +65713,7 @@ var on, u0 = (on = class extends Ce { const c = r.getAlgorithmByOID(a.certID.hashAlgorithm.algorithmId, !0, "CertID.hashAlgorithm"); if (!s[c.name]) { s[c.name] = 1; - const l = new zr(); + const l = new Wr(); i.push(l), await l.createForCertificate(t, { hashAlgorithm: c.name, issuerCertificate: n @@ -65702,66 +65748,66 @@ var on, u0 = (on = class extends Ce { if (!("name" in s)) throw new Error("Empty algorithm"); this.signatureAlgorithm = o.signatureAlgorithm, this.tbsResponseData.tbsView = new Uint8Array(this.tbsResponseData.toSchema(!0).toBER()); const i = await r.signWithPrivateKey(this.tbsResponseData.tbsView, t, { algorithm: s }); - this.signature = new ht({ valueHex: i }); + this.signature = new pt({ valueHex: i }); } async verify(t = {}, n = Ye(!0)) { if (!this.certs || this.certs.length === 0) throw new Error("No certificates attached to the BasicOCSPResponse"); - const r = this.certs, o = t.trustedCerts || [], s = t.issuerCerts || [], i = t.trustedResponders || [], a = await on.collectResponderCandidates(r, this.tbsResponseData.responderID, n); + const r = this.certs, o = t.trustedCerts || [], s = t.issuerCerts || [], i = t.trustedResponders || [], a = await sn.collectResponderCandidates(r, this.tbsResponseData.responderID, n); if (a.length === 0) throw new Error("No certificate matching the OCSP responderID was found in the response"); const c = []; - let l = null, u = !1, d = !1; - for (const f of a) { - const h = r[f]; + let l = null, u = !1, f = !1; + for (const d of a) { + const h = r[d]; let g; try { g = await this.verifyResponseSignature(h, n); } catch (p) { - l === null && (l = p), c.push(`candidate #${f} signature error: ${p.message}`); + l === null && (l = p), c.push(`candidate #${d} signature error: ${p.message}`); continue; } if (!g) { u = !0; continue; } - d = !0; + f = !0; try { - const p = i.length > 0 && on.containsCertificateByDer(i, h); + const p = i.length > 0 && sn.containsCertificateByDer(i, h); let m = []; - p || (m = await on.validateSignerChain(h, r, s, o, n)); + p || (m = await sn.validateSignerChain(h, r, s, o, n)); const v = []; for (const C of [ ...s, ...r, ...o, ...m - ]) on.containsCertificateByDer(v, C) || v.push(C); + ]) sn.containsCertificateByDer(v, C) || v.push(C); let S = !0; - for (const C of this.tbsResponseData.responses) if (!await on.isAuthorizedResponderForCertID(h, C.certID, v, i, n)) { + for (const C of this.tbsResponseData.responses) if (!await sn.isAuthorizedResponderForCertID(h, C.certID, v, i, n)) { S = !1; break; } if (S) return !0; - c.push(`candidate #${f}: responder is not authorized for all SingleResponses`); + c.push(`candidate #${d}: responder is not authorized for all SingleResponses`); } catch (p) { - c.push(`candidate #${f}: ${p.message}`); + c.push(`candidate #${d}: ${p.message}`); } } if (u && c.length === 0 && l === null) return !1; - throw d ? new Error(`OCSP responder verification failed. Reasons: ${c.join("; ")}`) : l || new Error(`OCSP responder verification failed. Reasons: ${c.join("; ")}`); + throw f ? new Error(`OCSP responder verification failed. Reasons: ${c.join("; ")}`) : l || new Error(`OCSP responder verification failed. Reasons: ${c.join("; ")}`); } static containsCertificateByDer(t, n) { const r = n.toSchema(!0).toBER(!1); - return t.some((o) => Kt.equal(o.toSchema(!0).toBER(!1), r)); + return t.some((o) => Wt.equal(o.toSchema(!0).toBER(!1), r)); } static async collectResponderCandidates(t, n, r = Ye(!0)) { const o = []; - if (n instanceof Qt) + if (n instanceof Zt) for (const [s, i] of t.entries()) i.subject.isEqual(n) && o.push(s); else if (n instanceof Oe) for (const [s, i] of t.entries()) { const a = i.subjectPublicKeyInfo.subjectPublicKey; if (!a.valueBlock?.valueHexView) continue; const c = await r.digest({ name: "sha-1" }, a.valueBlock.valueHexView); - Kt.equal(c, n.valueBlock.valueHex) && o.push(s); + Wt.equal(c, n.valueBlock.valueHex) && o.push(s); } else throw new Error("Unsupported OCSP responderID type"); return o; @@ -65772,7 +65818,7 @@ var on, u0 = (on = class extends Ce { static async validateSignerChain(t, n, r, o, s = Ye(!0)) { const i = [], a = (l) => { const u = Sq(l, t); - u && !on.containsCertificateByDer(i, u) && i.push(u); + u && !sn.containsCertificateByDer(i, u) && i.push(u); }; for (const l of r) a(l); for (const l of n) a(l); @@ -65788,10 +65834,10 @@ var on, u0 = (on = class extends Ce { const o = r.getAlgorithmByOID(t.hashAlgorithm.algorithmId, !1); if (!o || !("name" in o)) return []; const s = o.name, i = []; - for (const c of n) on.containsCertificateByDer(i, c) || i.push(c); + for (const c of n) sn.containsCertificateByDer(i, c) || i.push(c); const a = []; for (const c of i) { - const l = new zr(); + const l = new Wr(); try { await l.createForCertificate(c, { hashAlgorithm: s, @@ -65800,7 +65846,7 @@ var on, u0 = (on = class extends Ce { } catch { continue; } - l.hashAlgorithm.algorithmId === t.hashAlgorithm.algorithmId && Kt.equal(l.issuerNameHash.valueBlock.valueHexView, t.issuerNameHash.valueBlock.valueHexView) && Kt.equal(l.issuerKeyHash.valueBlock.valueHexView, t.issuerKeyHash.valueBlock.valueHexView) && a.push(c); + l.hashAlgorithm.algorithmId === t.hashAlgorithm.algorithmId && Wt.equal(l.issuerNameHash.valueBlock.valueHexView, t.issuerNameHash.valueBlock.valueHexView) && Wt.equal(l.issuerKeyHash.valueBlock.valueHexView, t.issuerKeyHash.valueBlock.valueHexView) && a.push(c); } return a; } @@ -65810,17 +65856,17 @@ var on, u0 = (on = class extends Ce { const s = o.name; try { const i = await r.digest({ name: s }, t.subject.toSchema().toBER(!1)); - if (!Kt.equal(new Uint8Array(i), n.issuerNameHash.valueBlock.valueHexView)) return !1; + if (!Wt.equal(new Uint8Array(i), n.issuerNameHash.valueBlock.valueHexView)) return !1; const a = t.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView, c = await r.digest({ name: s }, a); - return Kt.equal(new Uint8Array(c), n.issuerKeyHash.valueBlock.valueHexView); + return Wt.equal(new Uint8Array(c), n.issuerKeyHash.valueBlock.valueHexView); } catch { return !1; } } static async isAuthorizedResponderForCertID(t, n, r, o, s = Ye(!0)) { - if (o.length > 0 && on.containsCertificateByDer(o, t) || await on.certificateMatchesIssuerID(t, n, s)) return !0; - if (!on.certHasOCSPSigningEKU(t) || !on.certKeyUsagePermitsDigitalSignature(t)) return !1; - const i = await on.findIssuersForCertID(n, r, s); + if (o.length > 0 && sn.containsCertificateByDer(o, t) || await sn.certificateMatchesIssuerID(t, n, s)) return !0; + if (!sn.certHasOCSPSigningEKU(t) || !sn.certKeyUsagePermitsDigitalSignature(t)) return !1; + const i = await sn.findIssuersForCertID(n, r, s); for (const a of i) if (t.issuer.isEqual(a.subject)) try { @@ -65835,7 +65881,7 @@ var on, u0 = (on = class extends Ce { const r = n.parsedValue; if (r instanceof sx) return r.keyPurposes.includes(U4); try { - const o = hn(n.extnValue.valueBlock.valueHexView); + const o = pn(n.extnValue.valueBlock.valueHexView); return o.offset === -1 || !(o.result instanceof z) ? !1 : new sx({ schema: o.result }).keyPurposes.includes(U4); } catch { return !1; @@ -65845,17 +65891,17 @@ var on, u0 = (on = class extends Ce { const n = t.extensions?.find((r) => r.extnID === YNe); if (!n) return !0; try { - const r = hn(n.extnValue.valueBlock.valueHexView); - if (r.offset === -1 || !(r.result instanceof ht)) return !1; + const r = pn(n.extnValue.valueBlock.valueHexView); + if (r.offset === -1 || !(r.result instanceof pt)) return !1; const o = new Uint8Array(r.result.valueBlock.valueHexView); return o.length === 0 ? !1 : (o[0] & 128) !== 0; } catch { return !1; } } -}, on.CLASS_NAME = "BasicOCSPResponse", on); -const vI = "tbs", kI = "version", AI = "subject", SI = "subjectPublicKeyInfo", kh = "attributes", Iw = "signatureAlgorithm", Nw = "signatureValue", qm = "CertificationRequestInfo", gT = `${qm}.version`, mT = `${qm}.subject`, yT = `${qm}.subjectPublicKeyInfo`, yx = `${qm}.attributes`, XNe = [ - qm, +}, sn.CLASS_NAME = "BasicOCSPResponse", sn); +const vI = "tbs", kI = "version", AI = "subject", SI = "subjectPublicKeyInfo", Sh = "attributes", Iw = "signatureAlgorithm", Nw = "signatureValue", Gm = "CertificationRequestInfo", gT = `${Gm}.version`, mT = `${Gm}.subject`, yT = `${Gm}.subjectPublicKeyInfo`, yx = `${Gm}.attributes`, XNe = [ + Gm, gT, mT, yT, @@ -65866,18 +65912,18 @@ const vI = "tbs", kI = "version", AI = "subject", SI = "subjectPublicKeyInfo", k function ZNe(e = {}) { const t = e.names ?? {}; return new z({ - name: t.CertificationRequestInfo || qm, + name: t.CertificationRequestInfo || Gm, value: [ - new de({ name: t.CertificationRequestInfoVersion || gT }), - Qt.schema(t.subject || { names: { blockName: mT } }), + new ue({ name: t.CertificationRequestInfoVersion || gT }), + Zt.schema(t.subject || { names: { blockName: mT } }), mi.schema({ names: { blockName: yT } }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new ot({ + value: [new st({ optional: !0, name: t.CertificationRequestInfoAttributes || yx, value: En.schema(t.attributes || {}) @@ -65895,7 +65941,7 @@ Er = class extends Ce { this.tbsView = new Uint8Array(t); } constructor(t = {}) { - super(), this.tbsView = new Uint8Array(t[vI] ?? Er.defaultValues(vI)), this.version = t[kI] ?? Er.defaultValues(kI), this.subject = t[AI] ?? Er.defaultValues(AI), this.subjectPublicKeyInfo = t[SI] ?? Er.defaultValues(SI), kh in t && (this.attributes = t[kh] ?? Er.defaultValues(kh)), this.signatureAlgorithm = t[Iw] ?? Er.defaultValues(Iw), this.signatureValue = t[Nw] ?? Er.defaultValues(Nw), t.schema && this.fromSchema(t.schema); + super(), this.tbsView = new Uint8Array(t[vI] ?? Er.defaultValues(vI)), this.version = t[kI] ?? Er.defaultValues(kI), this.subject = t[AI] ?? Er.defaultValues(AI), this.subjectPublicKeyInfo = t[SI] ?? Er.defaultValues(SI), Sh in t && (this.attributes = t[Sh] ?? Er.defaultValues(Sh)), this.signatureAlgorithm = t[Iw] ?? Er.defaultValues(Iw), this.signatureValue = t[Nw] ?? Er.defaultValues(Nw), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -65904,15 +65950,15 @@ Er = class extends Ce { case kI: return 0; case AI: - return new Qt(); + return new Zt(); case SI: return new mi(); - case kh: + case Sh: return []; case Iw: - return new fe(); + return new de(); case Nw: - return new ht(); + return new pt(); default: return super.defaultValues(t); } @@ -65923,23 +65969,23 @@ Er = class extends Ce { ZNe(n.certificationRequestInfo || {}), new z({ name: n.signatureAlgorithm || Iw, - value: [new Ve(), new Xe({ optional: !0 })] + value: [new $e(), new Xe({ optional: !0 })] }), - new ht({ name: n.signatureValue || Nw }) + new pt({ name: n.signatureValue || Nw }) ] }); } fromSchema(t) { for (const r of XNe) delete t[r]; const n = Ee(t, t, Er.schema()); - ke.assertSchema(n, this.className), this.tbsView = n.result.CertificationRequestInfo.valueBeforeDecodeView, this.version = n.result[gT].valueBlock.valueDec, this.subject = new Qt({ schema: n.result[mT] }), this.subjectPublicKeyInfo = new mi({ schema: n.result[yT] }), yx in n.result && (this.attributes = Array.from(n.result[yx], (r) => new En({ schema: r }))), this.signatureAlgorithm = new fe({ schema: n.result.signatureAlgorithm }), this.signatureValue = n.result.signatureValue; + ke.assertSchema(n, this.className), this.tbsView = n.result.CertificationRequestInfo.valueBeforeDecodeView, this.version = n.result[gT].valueBlock.valueDec, this.subject = new Zt({ schema: n.result[mT] }), this.subjectPublicKeyInfo = new mi({ schema: n.result[yT] }), yx in n.result && (this.attributes = Array.from(n.result[yx], (r) => new En({ schema: r }))), this.signatureAlgorithm = new de({ schema: n.result.signatureAlgorithm }), this.signatureValue = n.result.signatureValue; } encodeTBS() { const t = [ - new de({ value: this.version }), + new ue({ value: this.version }), this.subject.toSchema(), this.subjectPublicKeyInfo.toSchema() ]; - return kh in this && t.push(new ee({ + return Sh in this && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -65951,7 +65997,7 @@ Er = class extends Ce { let n; if (t === !1) { if (this.tbsView.byteLength === 0) return Er.schema(); - const r = hn(this.tbsView); + const r = pn(this.tbsView); ke.assert(r, "PKCS#10 Certificate Request"), n = r.result; } else n = this.encodeTBS(); return new z({ value: [ @@ -65962,21 +66008,21 @@ Er = class extends Ce { } toJSON() { const t = { - tbs: Xn.encode(this.tbsView), + tbs: Zn.encode(this.tbsView), version: this.version, subject: this.subject.toJSON(), subjectPublicKeyInfo: this.subjectPublicKeyInfo.toJSON(), signatureAlgorithm: this.signatureAlgorithm.toJSON(), signatureValue: this.signatureValue.toJSON() }; - return kh in this && (t.attributes = Array.from(this.attributes || [], (n) => n.toJSON())), t; + return Sh in this && (t.attributes = Array.from(this.attributes || [], (n) => n.toJSON())), t; } async sign(t, n = "SHA-1", r = Ye(!0)) { if (!t) throw new Error("Need to provide a private key for signing"); const o = await r.getSignatureParameters(t, n), s = o.parameters; this.signatureAlgorithm = o.signatureAlgorithm, this.tbsView = new Uint8Array(this.encodeTBS().toBER()); const i = await r.signWithPrivateKey(this.tbsView, t, s); - this.signatureValue = new ht({ valueHex: i }); + this.signatureValue = new pt({ valueHex: i }); } async verify(t = Ye(!0)) { return t.verifyWithPublicKey(this.tbsView, this.signatureValue, this.subjectPublicKeyInfo, this.signatureAlgorithm); @@ -65985,16 +66031,16 @@ Er = class extends Ce { return n.getPublicKey(this.subjectPublicKeyInfo, this.signatureAlgorithm, t); } }, Er.CLASS_NAME = "CertificationRequest"; -const md = "digestAlgorithm", yd = "digest", eOe = [md, yd]; -var ri, Pp = (ri = class extends Ce { +const yd = "digestAlgorithm", bd = "digest", eOe = [yd, bd]; +var ri, Rp = (ri = class extends Ce { constructor(t = {}) { - super(), this.digestAlgorithm = t[md] ?? ri.defaultValues(md), this.digest = t[yd] ?? ri.defaultValues(yd), t.schema && this.fromSchema(t.schema); + super(), this.digestAlgorithm = t[yd] ?? ri.defaultValues(yd), this.digest = t[bd] ?? ri.defaultValues(bd), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case md: - return new fe(); case yd: + return new de(); + case bd: return new Oe(); default: return super.defaultValues(t); @@ -66002,9 +66048,9 @@ var ri, Pp = (ri = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case md: - return fe.compareWithDefault("algorithmId", n.algorithmId) && !("algorithmParams" in n); case yd: + return de.compareWithDefault("algorithmId", n.algorithmId) && !("algorithmParams" in n); + case bd: return n.isEqual(ri.defaultValues(t)); default: return super.defaultValues(t); @@ -66014,16 +66060,16 @@ var ri, Pp = (ri = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [fe.schema(n.digestAlgorithm || { names: { blockName: md } }), new Oe({ name: n.digest || yd })] + value: [de.schema(n.digestAlgorithm || { names: { blockName: yd } }), new Oe({ name: n.digest || bd })] }); } fromSchema(t) { for (const r of eOe) delete t[r]; const n = Ee(t, t, ri.schema({ names: { - digestAlgorithm: { names: { blockName: md } }, - digest: yd + digestAlgorithm: { names: { blockName: yd } }, + digest: bd } })); - ke.assertSchema(n, this.className), this.digestAlgorithm = new fe({ schema: n.result.digestAlgorithm }), this.digest = n.result.digest; + ke.assertSchema(n, this.className), this.digestAlgorithm = new de({ schema: n.result.digestAlgorithm }), this.digest = n.result.digest; } toSchema() { return new z({ value: [this.digestAlgorithm.toSchema(), this.digest] }); @@ -66035,10 +66081,10 @@ var ri, Pp = (ri = class extends Ce { }; } }, ri.CLASS_NAME = "DigestInfo", ri); -const Rp = "eContentType", es = "eContent", tOe = [Rp, es]; -var To, Tp = (To = class extends Ce { +const Tp = "eContentType", es = "eContent", tOe = [Tp, es]; +var Mo, Mp = (Mo = class extends Ce { constructor(t = {}) { - if (super(), this.eContentType = t[Rp] ?? To.defaultValues(Rp), es in t && (this.eContent = t[es] ?? To.defaultValues(es), this.eContent.idBlock.tagClass === 1 && this.eContent.idBlock.tagNumber === 4 && this.eContent.idBlock.isConstructed === !1)) { + if (super(), this.eContentType = t[Tp] ?? Mo.defaultValues(Tp), es in t && (this.eContent = t[es] ?? Mo.defaultValues(es), this.eContent.idBlock.tagClass === 1 && this.eContent.idBlock.tagNumber === 4 && this.eContent.idBlock.isConstructed === !1)) { const n = new Oe({ idBlock: { isConstructed: !0 }, isConstructed: !0 @@ -66057,7 +66103,7 @@ var To, Tp = (To = class extends Ce { } static defaultValues(t) { switch (t) { - case Rp: + case Tp: return ""; case es: return new Oe(); @@ -66067,10 +66113,10 @@ var To, Tp = (To = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case Rp: + case Tp: return n === ""; case es: - return n.idBlock.tagClass === 1 && n.idBlock.tagNumber === 4 ? n.isEqual(To.defaultValues(es)) : !1; + return n.idBlock.tagClass === 1 && n.idBlock.tagNumber === 4 ? n.isEqual(Mo.defaultValues(es)) : !1; default: return super.defaultValues(t); } @@ -66079,7 +66125,7 @@ var To, Tp = (To = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.eContentType || "" }), new ee({ + value: [new $e({ name: n.eContentType || "" }), new ne({ optional: !0, idBlock: { tagClass: 3, @@ -66091,15 +66137,15 @@ var To, Tp = (To = class extends Ce { } fromSchema(t) { for (const r of tOe) delete t[r]; - const n = Ee(t, t, To.schema({ names: { - eContentType: Rp, + const n = Ee(t, t, Mo.schema({ names: { + eContentType: Tp, eContent: es } })); ke.assertSchema(n, this.className), this.eContentType = n.result.eContentType.valueBlock.toString(), es in n.result && (this.eContent = n.result.eContent); } toSchema() { const t = []; - return t.push(new Ve({ value: this.eContentType })), this.eContent && To.compareWithDefault(es, this.eContent) === !1 && t.push(new ee({ + return t.push(new $e({ value: this.eContentType })), this.eContent && Mo.compareWithDefault(es, this.eContent) === !1 && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -66110,23 +66156,23 @@ var To, Tp = (To = class extends Ce { } toJSON() { const t = { eContentType: this.eContentType }; - return this.eContent && To.compareWithDefault(es, this.eContent) === !1 && (t.eContent = this.eContent.toJSON()), t; + return this.eContent && Mo.compareWithDefault(es, this.eContent) === !1 && (t.eContent = this.eContent.toJSON()), t; } -}, To.CLASS_NAME = "EncapsulatedContentInfo", To); -const bd = "mac", wd = "macSalt", Wi = "iterations", nOe = [ - bd, +}, Mo.CLASS_NAME = "EncapsulatedContentInfo", Mo); +const wd = "mac", vd = "macSalt", Wi = "iterations", nOe = [ wd, + vd, Wi ]; -var Mo, ku = (Mo = class extends Ce { +var Bo, Au = (Bo = class extends Ce { constructor(t = {}) { - super(), this.mac = t[bd] ?? Mo.defaultValues(bd), this.macSalt = t[wd] ?? Mo.defaultValues(wd), Wi in t && (this.iterations = t[Wi] ?? Mo.defaultValues(Wi)), t.schema && this.fromSchema(t.schema); + super(), this.mac = t[wd] ?? Bo.defaultValues(wd), this.macSalt = t[vd] ?? Bo.defaultValues(vd), Wi in t && (this.iterations = t[Wi] ?? Bo.defaultValues(Wi)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case bd: - return new Pp(); case wd: + return new Rp(); + case vd: return new Oe(); case Wi: return 1; @@ -66136,12 +66182,12 @@ var Mo, ku = (Mo = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case bd: - return Pp.compareWithDefault("digestAlgorithm", n.digestAlgorithm) && Pp.compareWithDefault("digest", n.digest); case wd: - return n.isEqual(Mo.defaultValues(t)); + return Rp.compareWithDefault("digestAlgorithm", n.digestAlgorithm) && Rp.compareWithDefault("digest", n.digest); + case vd: + return n.isEqual(Bo.defaultValues(t)); case Wi: - return n === Mo.defaultValues(t); + return n === Bo.defaultValues(t); default: return super.defaultValues(t); } @@ -66152,9 +66198,9 @@ var Mo, ku = (Mo = class extends Ce { name: n.blockName || "", optional: n.optional || !0, value: [ - Pp.schema(n.mac || { names: { blockName: bd } }), - new Oe({ name: n.macSalt || wd }), - new de({ + Rp.schema(n.mac || { names: { blockName: wd } }), + new Oe({ name: n.macSalt || vd }), + new ue({ optional: !0, name: n.iterations || Wi }) @@ -66163,16 +66209,16 @@ var Mo, ku = (Mo = class extends Ce { } fromSchema(t) { for (const r of nOe) delete t[r]; - const n = Ee(t, t, Mo.schema({ names: { - mac: { names: { blockName: bd } }, - macSalt: wd, + const n = Ee(t, t, Bo.schema({ names: { + mac: { names: { blockName: wd } }, + macSalt: vd, iterations: Wi } })); - ke.assertSchema(n, this.className), this.mac = new Pp({ schema: n.result.mac }), this.macSalt = n.result.macSalt, Wi in n.result && (this.iterations = n.result.iterations.valueBlock.valueDec); + ke.assertSchema(n, this.className), this.mac = new Rp({ schema: n.result.mac }), this.macSalt = n.result.macSalt, Wi in n.result && (this.iterations = n.result.iterations.valueBlock.valueDec); } toSchema() { const t = [this.mac.toSchema(), this.macSalt]; - return this.iterations !== void 0 && t.push(new de({ value: this.iterations })), new z({ value: t }); + return this.iterations !== void 0 && t.push(new ue({ value: this.iterations })), new z({ value: t }); } toJSON() { const t = { @@ -66181,15 +66227,15 @@ var Mo, ku = (Mo = class extends Ce { }; return this.iterations !== void 0 && (t.iterations = this.iterations), t; } -}, Mo.CLASS_NAME = "MacData", Mo); +}, Bo.CLASS_NAME = "MacData", Bo); const NA = "hashAlgorithm", OA = "hashedMessage", rOe = [NA, OA]; var hs, Ms = (hs = class extends Ce { static async create(t, n, r = Ye(!0)) { const o = r.getOIDByAlgorithm({ name: t }, !0, "hashAlgorithm"), s = await r.digest(t, n); return new hs({ - hashAlgorithm: new fe({ + hashAlgorithm: new de({ algorithmId: o, - algorithmParams: new fn() + algorithmParams: new hn() }), hashedMessage: new Oe({ valueHex: s }) }); @@ -66200,7 +66246,7 @@ var hs, Ms = (hs = class extends Ce { static defaultValues(t) { switch (t) { case NA: - return new fe(); + return new de(); case OA: return new Oe(); default: @@ -66221,7 +66267,7 @@ var hs, Ms = (hs = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [fe.schema(n.hashAlgorithm || {}), new Oe({ name: n.hashedMessage || "" })] + value: [de.schema(n.hashAlgorithm || {}), new Oe({ name: n.hashedMessage || "" })] }); } fromSchema(t) { @@ -66230,7 +66276,7 @@ var hs, Ms = (hs = class extends Ce { hashAlgorithm: { names: { blockName: NA } }, hashedMessage: OA } })); - ke.assertSchema(n, this.className), this.hashAlgorithm = new fe({ schema: n.result.hashAlgorithm }), this.hashedMessage = n.result.hashedMessage; + ke.assertSchema(n, this.className), this.hashAlgorithm = new de({ schema: n.result.hashAlgorithm }), this.hashedMessage = n.result.hashedMessage; } toSchema() { return new z({ value: [this.hashAlgorithm.toSchema(), this.hashedMessage] }); @@ -66242,16 +66288,16 @@ var hs, Ms = (hs = class extends Ce { }; } }, hs.CLASS_NAME = "MessageImprint", hs); -const Mp = "reqCert", Qc = "singleRequestExtensions", oOe = [Mp, Qc]; +const Bp = "reqCert", Xc = "singleRequestExtensions", oOe = [Bp, Xc]; var oi, GO = (oi = class extends Ce { constructor(t = {}) { - super(), this.reqCert = t[Mp] ?? oi.defaultValues(Mp), Qc in t && (this.singleRequestExtensions = t[Qc] ?? oi.defaultValues(Qc)), t.schema && this.fromSchema(t.schema); + super(), this.reqCert = t[Bp] ?? oi.defaultValues(Bp), Xc in t && (this.singleRequestExtensions = t[Xc] ?? oi.defaultValues(Xc)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Mp: - return new zr(); - case Qc: + case Bp: + return new Wr(); + case Xc: return []; default: return super.defaultValues(t); @@ -66259,9 +66305,9 @@ var oi, GO = (oi = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case Mp: + case Bp: return n.isEqual(oi.defaultValues(t)); - case Qc: + case Xc: return n.length === 0; default: return super.defaultValues(t); @@ -66271,7 +66317,7 @@ var oi, GO = (oi = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [zr.schema(n.reqCert || {}), new ee({ + value: [Wr.schema(n.reqCert || {}), new ne({ optional: !0, idBlock: { tagClass: 3, @@ -66284,14 +66330,14 @@ var oi, GO = (oi = class extends Ce { fromSchema(t) { for (const r of oOe) delete t[r]; const n = Ee(t, t, oi.schema({ names: { - reqCert: { names: { blockName: Mp } }, - extensions: { names: { blockName: Qc } } + reqCert: { names: { blockName: Bp } }, + extensions: { names: { blockName: Xc } } } })); - ke.assertSchema(n, this.className), this.reqCert = new zr({ schema: n.result.reqCert }), Qc in n.result && (this.singleRequestExtensions = Array.from(n.result.singleRequestExtensions.valueBlock.value, (r) => new Bn({ schema: r }))); + ke.assertSchema(n, this.className), this.reqCert = new Wr({ schema: n.result.reqCert }), Xc in n.result && (this.singleRequestExtensions = Array.from(n.result.singleRequestExtensions.valueBlock.value, (r) => new Bn({ schema: r }))); } toSchema() { const t = []; - return t.push(this.reqCert.toSchema()), this.singleRequestExtensions && t.push(new ee({ + return t.push(this.reqCert.toSchema()), this.singleRequestExtensions && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -66305,14 +66351,14 @@ var oi, GO = (oi = class extends Ce { return this.singleRequestExtensions && (t.singleRequestExtensions = Array.from(this.singleRequestExtensions, (n) => n.toJSON())), t; } }, oi.CLASS_NAME = "Request", oi); -const wk = "tbs", Bp = "version", _p = "requestorName", vk = "requestList", Lp = "requestExtensions", Gm = "TBSRequest", PA = `${Gm}.${Bp}`, RA = `${Gm}.${_p}`, JO = `${Gm}.requests`, TA = `${Gm}.${Lp}`, sOe = [ - Gm, +const wk = "tbs", _p = "version", Lp = "requestorName", vk = "requestList", Dp = "requestExtensions", Jm = "TBSRequest", PA = `${Jm}.${_p}`, RA = `${Jm}.${Lp}`, JO = `${Jm}.requests`, TA = `${Jm}.${Dp}`, sOe = [ + Jm, PA, RA, JO, TA ]; -var Hr, bc = (Hr = class extends Ce { +var zr, wc = (zr = class extends Ce { get tbs() { return br(this.tbsView); } @@ -66320,18 +66366,18 @@ var Hr, bc = (Hr = class extends Ce { this.tbsView = new Uint8Array(t); } constructor(t = {}) { - super(), this.tbsView = new Uint8Array(t[wk] ?? Hr.defaultValues(wk)), Bp in t && (this.version = t[Bp] ?? Hr.defaultValues(Bp)), _p in t && (this.requestorName = t[_p] ?? Hr.defaultValues(_p)), this.requestList = t[vk] ?? Hr.defaultValues(vk), Lp in t && (this.requestExtensions = t[Lp] ?? Hr.defaultValues(Lp)), t.schema && this.fromSchema(t.schema); + super(), this.tbsView = new Uint8Array(t[wk] ?? zr.defaultValues(wk)), _p in t && (this.version = t[_p] ?? zr.defaultValues(_p)), Lp in t && (this.requestorName = t[Lp] ?? zr.defaultValues(Lp)), this.requestList = t[vk] ?? zr.defaultValues(vk), Dp in t && (this.requestExtensions = t[Dp] ?? zr.defaultValues(Dp)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { case wk: return Dn; - case Bp: - return 0; case _p: - return new Dt(); - case vk: + return 0; case Lp: + return new Vt(); + case vk: + case Dp: return []; default: return super.defaultValues(t); @@ -66341,12 +66387,12 @@ var Hr, bc = (Hr = class extends Ce { switch (t) { case wk: return n.byteLength === 0; - case Bp: - return n === Hr.defaultValues(t); case _p: - return n.type === Dt.defaultValues("type") && Object.keys(n.value).length === 0; - case vk: + return n === zr.defaultValues(t); case Lp: + return n.type === Vt.defaultValues("type") && Object.keys(n.value).length === 0; + case vk: + case Dp: return n.length === 0; default: return super.defaultValues(t); @@ -66355,32 +66401,32 @@ var Hr, bc = (Hr = class extends Ce { static schema(t = {}) { const n = t.names ?? {}; return new z({ - name: n.blockName || Gm, + name: n.blockName || Jm, value: [ - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new de({ name: n.TBSRequestVersion || PA })] + value: [new ue({ name: n.TBSRequestVersion || PA })] }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 1 }, - value: [Dt.schema(n.requestorName || { names: { blockName: RA } })] + value: [Vt.schema(n.requestorName || { names: { blockName: RA } })] }), new z({ name: n.requestList || "TBSRequest.requestList", - value: [new ot({ + value: [new st({ name: n.requests || JO, value: GO.schema(n.requestNames || {}) })] }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, @@ -66393,31 +66439,31 @@ var Hr, bc = (Hr = class extends Ce { } fromSchema(t) { for (const r of sOe) delete t[r]; - const n = Ee(t, t, Hr.schema()); - ke.assertSchema(n, this.className), this.tbsView = n.result.TBSRequest.valueBeforeDecodeView, PA in n.result && (this.version = n.result[PA].valueBlock.valueDec), RA in n.result && (this.requestorName = new Dt({ schema: n.result[RA] })), this.requestList = Array.from(n.result[JO], (r) => new GO({ schema: r })), TA in n.result && (this.requestExtensions = Array.from(n.result[TA].valueBlock.value, (r) => new Bn({ schema: r }))); + const n = Ee(t, t, zr.schema()); + ke.assertSchema(n, this.className), this.tbsView = n.result.TBSRequest.valueBeforeDecodeView, PA in n.result && (this.version = n.result[PA].valueBlock.valueDec), RA in n.result && (this.requestorName = new Vt({ schema: n.result[RA] })), this.requestList = Array.from(n.result[JO], (r) => new GO({ schema: r })), TA in n.result && (this.requestExtensions = Array.from(n.result[TA].valueBlock.value, (r) => new Bn({ schema: r }))); } toSchema(t = !1) { let n; if (t === !1) { - if (this.tbsView.byteLength === 0) return Hr.schema(); - const r = hn(this.tbsView); + if (this.tbsView.byteLength === 0) return zr.schema(); + const r = pn(this.tbsView); if (ke.assert(r, "TBS Request"), !(r.result instanceof z)) throw new Error("ASN.1 result should be SEQUENCE"); n = r.result; } else { const r = []; - this.version !== void 0 && r.push(new ee({ + this.version !== void 0 && r.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new de({ value: this.version })] - })), this.requestorName && r.push(new ee({ + value: [new ue({ value: this.version })] + })), this.requestorName && r.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 }, value: [this.requestorName.toSchema()] - })), r.push(new z({ value: Array.from(this.requestList, (o) => o.toSchema()) })), this.requestExtensions && r.push(new ee({ + })), r.push(new z({ value: Array.from(this.requestList, (o) => o.toSchema()) })), this.requestExtensions && r.push(new ne({ idBlock: { tagClass: 3, tagNumber: 2 @@ -66431,19 +66477,19 @@ var Hr, bc = (Hr = class extends Ce { const t = {}; return this.version != null && (t.version = this.version), this.requestorName && (t.requestorName = this.requestorName.toJSON()), t.requestList = Array.from(this.requestList, (n) => n.toJSON()), this.requestExtensions && (t.requestExtensions = Array.from(this.requestExtensions, (n) => n.toJSON())), t; } -}, Hr.CLASS_NAME = "TBSRequest", Hr); -const Ah = "signatureAlgorithm", Sh = "signature", wc = "certs"; -var ps, xh = (ps = class extends Ce { +}, zr.CLASS_NAME = "TBSRequest", zr); +const xh = "signatureAlgorithm", Eh = "signature", vc = "certs"; +var ps, Ch = (ps = class extends Ce { constructor(t = {}) { - super(), this.signatureAlgorithm = t[Ah] ?? ps.defaultValues(Ah), this.signature = t[Sh] ?? ps.defaultValues(Sh), wc in t && (this.certs = t[wc] ?? ps.defaultValues(wc)), t.schema && this.fromSchema(t.schema); + super(), this.signatureAlgorithm = t[xh] ?? ps.defaultValues(xh), this.signature = t[Eh] ?? ps.defaultValues(Eh), vc in t && (this.certs = t[vc] ?? ps.defaultValues(vc)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Ah: - return new fe(); - case Sh: - return new ht(); - case wc: + case xh: + return new de(); + case Eh: + return new pt(); + case vc: return []; default: return super.defaultValues(t); @@ -66451,11 +66497,11 @@ var ps, xh = (ps = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case Ah: + case xh: return n.algorithmId === "" && !("algorithmParams" in n); - case Sh: + case Eh: return n.isEqual(ps.defaultValues(t)); - case wc: + case vc: return n.length === 0; default: return super.defaultValues(t); @@ -66466,15 +66512,15 @@ var ps, xh = (ps = class extends Ce { return new z({ name: n.blockName || "", value: [ - fe.schema(n.signatureAlgorithm || {}), - new ht({ name: n.signature || "" }), - new ee({ + de.schema(n.signatureAlgorithm || {}), + new pt({ name: n.signature || "" }), + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new z({ value: [new ot({ + value: [new z({ value: [new st({ name: n.certs || "", value: Mr.schema({}) })] })] @@ -66484,20 +66530,20 @@ var ps, xh = (ps = class extends Ce { } fromSchema(t) { for (const r of [ - Ah, - Sh, - wc + xh, + Eh, + vc ]) delete t[r]; const n = Ee(t, t, ps.schema({ names: { - signatureAlgorithm: { names: { blockName: Ah } }, - signature: Sh, - certs: wc + signatureAlgorithm: { names: { blockName: xh } }, + signature: Eh, + certs: vc } })); - ke.assertSchema(n, this.className), this.signatureAlgorithm = new fe({ schema: n.result.signatureAlgorithm }), this.signature = n.result.signature, wc in n.result && (this.certs = Array.from(n.result.certs, (r) => new Mr({ schema: r }))); + ke.assertSchema(n, this.className), this.signatureAlgorithm = new de({ schema: n.result.signatureAlgorithm }), this.signature = n.result.signature, vc in n.result && (this.certs = Array.from(n.result.certs, (r) => new Mr({ schema: r }))); } toSchema() { const t = []; - return t.push(this.signatureAlgorithm.toSchema()), t.push(this.signature), this.certs && t.push(new ee({ + return t.push(this.signatureAlgorithm.toSchema()), t.push(this.signature), this.certs && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -66514,27 +66560,27 @@ var ps, xh = (ps = class extends Ce { return this.certs && (t.certs = Array.from(this.certs, (n) => n.toJSON())), t; } }, ps.CLASS_NAME = "Signature", ps); -const Dp = "tbsRequest", Xc = "optionalSignature", iOe = [Dp, Xc]; +const jp = "tbsRequest", Zc = "optionalSignature", iOe = [jp, Zc]; var Ta, aOe = (Ta = class extends Ce { constructor(t = {}) { - super(), this.tbsRequest = t[Dp] ?? Ta.defaultValues(Dp), Xc in t && (this.optionalSignature = t[Xc] ?? Ta.defaultValues(Xc)), t.schema && this.fromSchema(t.schema); + super(), this.tbsRequest = t[jp] ?? Ta.defaultValues(jp), Zc in t && (this.optionalSignature = t[Zc] ?? Ta.defaultValues(Zc)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Dp: - return new bc(); - case Xc: - return new xh(); + case jp: + return new wc(); + case Zc: + return new Ch(); default: return super.defaultValues(t); } } static compareWithDefault(t, n) { switch (t) { - case Dp: - return bc.compareWithDefault("tbs", n.tbs) && bc.compareWithDefault("version", n.version) && bc.compareWithDefault("requestorName", n.requestorName) && bc.compareWithDefault("requestList", n.requestList) && bc.compareWithDefault("requestExtensions", n.requestExtensions); - case Xc: - return xh.compareWithDefault("signatureAlgorithm", n.signatureAlgorithm) && xh.compareWithDefault("signature", n.signature) && xh.compareWithDefault("certs", n.certs); + case jp: + return wc.compareWithDefault("tbs", n.tbs) && wc.compareWithDefault("version", n.version) && wc.compareWithDefault("requestorName", n.requestorName) && wc.compareWithDefault("requestList", n.requestList) && wc.compareWithDefault("requestExtensions", n.requestExtensions); + case Zc: + return Ch.compareWithDefault("signatureAlgorithm", n.signatureAlgorithm) && Ch.compareWithDefault("signature", n.signature) && Ch.compareWithDefault("certs", n.certs); default: return super.defaultValues(t); } @@ -66543,24 +66589,24 @@ var Ta, aOe = (Ta = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "OCSPRequest", - value: [bc.schema(n.tbsRequest || { names: { blockName: Dp } }), new ee({ + value: [wc.schema(n.tbsRequest || { names: { blockName: jp } }), new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [xh.schema(n.optionalSignature || { names: { blockName: Xc } })] + value: [Ch.schema(n.optionalSignature || { names: { blockName: Zc } })] })] }); } fromSchema(t) { for (const r of iOe) delete t[r]; const n = Ee(t, t, Ta.schema()); - ke.assertSchema(n, this.className), this.tbsRequest = new bc({ schema: n.result.tbsRequest }), Xc in n.result && (this.optionalSignature = new xh({ schema: n.result.optionalSignature })); + ke.assertSchema(n, this.className), this.tbsRequest = new wc({ schema: n.result.tbsRequest }), Zc in n.result && (this.optionalSignature = new Ch({ schema: n.result.optionalSignature })); } toSchema(t = !1) { const n = []; - return n.push(this.tbsRequest.toSchema(t)), this.optionalSignature && n.push(new ee({ + return n.push(this.tbsRequest.toSchema(t)), this.optionalSignature && n.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -66574,29 +66620,29 @@ var Ta, aOe = (Ta = class extends Ce { return this.optionalSignature && (t.optionalSignature = this.optionalSignature.toJSON()), t; } async createForCertificate(t, n, r = Ye(!0)) { - const o = new zr(); + const o = new Wr(); await o.createForCertificate(t, n, r), this.tbsRequest.requestList.push(new GO({ reqCert: o })); } async sign(t, n = "SHA-1", r = Ye(!0)) { - if (Ct.assertEmpty(t, "privateKey", "OCSPRequest.sign method"), !this.optionalSignature) throw new Error('Need to create "optionalSignature" field before signing'); + if (Ot.assertEmpty(t, "privateKey", "OCSPRequest.sign method"), !this.optionalSignature) throw new Error('Need to create "optionalSignature" field before signing'); const o = await r.getSignatureParameters(t, n), s = o.parameters; this.optionalSignature.signatureAlgorithm = o.signatureAlgorithm; const i = this.tbsRequest.toSchema(!0).toBER(!1), a = await r.signWithPrivateKey(i, t, s); - this.optionalSignature.signature = new ht({ valueHex: a }); + this.optionalSignature.signature = new pt({ valueHex: a }); } verify() { } }, Ta.CLASS_NAME = "OCSPRequest", Ta); -const jp = "responseType", Fp = "response", cOe = [jp, Fp]; -var si, Vp = (si = class extends Ce { +const Fp = "responseType", Vp = "response", cOe = [Fp, Vp]; +var si, $p = (si = class extends Ce { constructor(t = {}) { - super(), this.responseType = t[jp] ?? si.defaultValues(jp), this.response = t[Fp] ?? si.defaultValues(Fp), t.schema && this.fromSchema(t.schema); + super(), this.responseType = t[Fp] ?? si.defaultValues(Fp), this.response = t[Vp] ?? si.defaultValues(Vp), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case jp: - return ""; case Fp: + return ""; + case Vp: return new Oe(); default: return super.defaultValues(t); @@ -66604,9 +66650,9 @@ var si, Vp = (si = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case jp: - return n === ""; case Fp: + return n === ""; + case Vp: return n.isEqual(si.defaultValues(t)); default: return super.defaultValues(t); @@ -66616,19 +66662,19 @@ var si, Vp = (si = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "", - value: [new Ve({ name: n.responseType || "" }), new Oe({ name: n.response || "" })] + value: [new $e({ name: n.responseType || "" }), new Oe({ name: n.response || "" })] }); } fromSchema(t) { for (const r of cOe) delete t[r]; const n = Ee(t, t, si.schema({ names: { - responseType: jp, - response: Fp + responseType: Fp, + response: Vp } })); ke.assertSchema(n, this.className), this.responseType = n.result.responseType.valueBlock.toString(), this.response = n.result.response; } toSchema() { - return new z({ value: [new Ve({ value: this.responseType }), this.response] }); + return new z({ value: [new $e({ value: this.responseType }), this.response] }); } toJSON() { return { @@ -66637,27 +66683,27 @@ var si, Vp = (si = class extends Ce { }; } }, si.CLASS_NAME = "ResponseBytes", si); -const Eh = "responseStatus", Di = "responseBytes"; +const Ih = "responseStatus", Di = "responseBytes"; var ii, lOe = (ii = class extends Ce { constructor(t = {}) { - super(), this.responseStatus = t[Eh] ?? ii.defaultValues(Eh), Di in t && (this.responseBytes = t[Di] ?? ii.defaultValues(Di)), t.schema && this.fromSchema(t.schema); + super(), this.responseStatus = t[Ih] ?? ii.defaultValues(Ih), Di in t && (this.responseBytes = t[Di] ?? ii.defaultValues(Di)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Eh: - return new Df(); + case Ih: + return new Ff(); case Di: - return new Vp(); + return new $p(); default: return super.defaultValues(t); } } static compareWithDefault(t, n) { switch (t) { - case Eh: + case Ih: return n.isEqual(ii.defaultValues(t)); case Di: - return Vp.compareWithDefault("responseType", n.responseType) && Vp.compareWithDefault("response", n.response); + return $p.compareWithDefault("responseType", n.responseType) && $p.compareWithDefault("response", n.response); default: return super.defaultValues(t); } @@ -66666,24 +66712,24 @@ var ii, lOe = (ii = class extends Ce { const n = t.names ?? {}; return new z({ name: n.blockName || "OCSPResponse", - value: [new Df({ name: n.responseStatus || Eh }), new ee({ + value: [new Ff({ name: n.responseStatus || Ih }), new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [Vp.schema(n.responseBytes || { names: { blockName: Di } })] + value: [$p.schema(n.responseBytes || { names: { blockName: Di } })] })] }); } fromSchema(t) { - for (const r of [Eh, Di]) delete t[r]; + for (const r of [Ih, Di]) delete t[r]; const n = Ee(t, t, ii.schema()); - ke.assertSchema(n, this.className), this.responseStatus = n.result.responseStatus, Di in n.result && (this.responseBytes = new Vp({ schema: n.result.responseBytes })); + ke.assertSchema(n, this.className), this.responseStatus = n.result.responseStatus, Di in n.result && (this.responseBytes = new $p({ schema: n.result.responseBytes })); } toSchema() { const t = []; - return t.push(this.responseStatus), this.responseBytes && t.push(new ee({ + return t.push(this.responseStatus), this.responseBytes && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -66703,7 +66749,7 @@ var ii, lOe = (ii = class extends Ce { }; if (!this.responseBytes || this.responseBytes.responseType !== "1.3.6.1.5.5.7.48.1.1") return s; try { - const i = hn(this.responseBytes.response.valueBlock.valueHexView); + const i = pn(this.responseBytes.response.valueBlock.valueHexView); ke.assert(i, "Basic OCSP response"), o = new u0({ schema: i.result }); } catch { return s; @@ -66723,7 +66769,7 @@ var ii, lOe = (ii = class extends Ce { throw new Error(`Unknown ResponseBytes type: ${this.responseBytes?.responseType || "Unknown"}`); } }, ii.CLASS_NAME = "OCSPResponse", ii); -const Au = "type", qi = "attributes", kk = "encodedValue", uOe = [qi]; +const Su = "type", qi = "attributes", kk = "encodedValue", uOe = [qi]; function dOe(e) { const t = e.map((n) => ({ value: n, @@ -66738,13 +66784,13 @@ function dOe(e) { return 0; }), t.map((n) => n.value); } -var Cr, eo = (Cr = class extends Ce { +var Cr, to = (Cr = class extends Ce { constructor(t = {}) { - super(), this.type = t[Au] ?? Cr.defaultValues(Au), this.attributes = t[qi] ?? Cr.defaultValues(qi), this.encodedValue = t[kk] ?? Cr.defaultValues(kk), t.schema && this.fromSchema(t.schema); + super(), this.type = t[Su] ?? Cr.defaultValues(Su), this.attributes = t[qi] ?? Cr.defaultValues(qi), this.encodedValue = t[kk] ?? Cr.defaultValues(kk), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Au: + case Su: return -1; case qi: return []; @@ -66756,8 +66802,8 @@ var Cr, eo = (Cr = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case Au: - return n === Cr.defaultValues(Au); + case Su: + return n === Cr.defaultValues(Su); case qi: return n.length === 0; case kk: @@ -66768,14 +66814,14 @@ var Cr, eo = (Cr = class extends Ce { } static schema(t = {}) { const n = t.names ?? {}; - return new ee({ + return new ne({ name: n.blockName || "", optional: !0, idBlock: { tagClass: 3, tagNumber: n.tagNumber || 0 }, - value: [new ot({ + value: [new st({ name: n.attributes || "", value: En.schema() })] @@ -66796,9 +66842,9 @@ var Cr, eo = (Cr = class extends Ce { this.attributes = Array.from(n.result.attributes, (o) => new En({ schema: o })); } toSchema() { - if (Cr.compareWithDefault(Au, this.type) || Cr.compareWithDefault(qi, this.attributes)) throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class'); + if (Cr.compareWithDefault(Su, this.type) || Cr.compareWithDefault(qi, this.attributes)) throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class'); let t = Array.from(this.attributes, (n) => n.toSchema()); - return this.type === 0 && this.encodedValue.byteLength === 0 && (t = dOe(t)), new ee({ + return this.type === 0 && this.encodedValue.byteLength === 0 && (t = dOe(t)), new ne({ optional: !0, idBlock: { tagClass: 3, @@ -66808,14 +66854,14 @@ var Cr, eo = (Cr = class extends Ce { }); } toJSON() { - if (Cr.compareWithDefault(Au, this.type) || Cr.compareWithDefault(qi, this.attributes)) throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class'); + if (Cr.compareWithDefault(Su, this.type) || Cr.compareWithDefault(qi, this.attributes)) throw new Error('Incorrectly initialized "SignedAndUnsignedAttributes" class'); return { type: this.type, attributes: Array.from(this.attributes, (t) => t.toJSON()) }; } }, Cr.CLASS_NAME = "SignedAndUnsignedAttributes", Cr); -const $p = "version", vd = "sid", Up = "digestAlgorithm", Zc = "signedAttrs", Kp = "signatureAlgorithm", Ow = "signature", el = "unsignedAttrs", lu = "SignerInfo", YO = `${lu}.${$p}`, Pw = `${lu}.${vd}`, QO = `${lu}.${Up}`, MA = `${lu}.${Zc}`, XO = `${lu}.${Kp}`, ZO = `${lu}.${Ow}`, BA = `${lu}.${el}`, fOe = [ +const Up = "version", kd = "sid", Kp = "digestAlgorithm", el = "signedAttrs", Hp = "signatureAlgorithm", Ow = "signature", tl = "unsignedAttrs", uu = "SignerInfo", YO = `${uu}.${Up}`, Pw = `${uu}.${kd}`, QO = `${uu}.${Kp}`, MA = `${uu}.${el}`, XO = `${uu}.${Hp}`, ZO = `${uu}.${Ow}`, BA = `${uu}.${tl}`, fOe = [ YO, Pw, QO, @@ -66824,45 +66870,45 @@ const $p = "version", vd = "sid", Up = "digestAlgorithm", Zc = "signedAttrs", Kp ZO, BA ]; -var cn, eP = (cn = class extends Ce { +var ln, eP = (ln = class extends Ce { constructor(t = {}) { - super(), this.version = t[$p] ?? cn.defaultValues($p), this.sid = t[vd] ?? cn.defaultValues(vd), this.digestAlgorithm = t[Up] ?? cn.defaultValues(Up), Zc in t && (this.signedAttrs = t[Zc] ?? cn.defaultValues(Zc)), this.signatureAlgorithm = t[Kp] ?? cn.defaultValues(Kp), this.signature = t[Ow] ?? cn.defaultValues(Ow), el in t && (this.unsignedAttrs = t[el] ?? cn.defaultValues(el)), t.schema && this.fromSchema(t.schema); + super(), this.version = t[Up] ?? ln.defaultValues(Up), this.sid = t[kd] ?? ln.defaultValues(kd), this.digestAlgorithm = t[Kp] ?? ln.defaultValues(Kp), el in t && (this.signedAttrs = t[el] ?? ln.defaultValues(el)), this.signatureAlgorithm = t[Hp] ?? ln.defaultValues(Hp), this.signature = t[Ow] ?? ln.defaultValues(Ow), tl in t && (this.unsignedAttrs = t[tl] ?? ln.defaultValues(tl)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case $p: + case Up: return 0; - case vd: + case kd: return new Xe(); - case Up: - return new fe(); - case Zc: - return new eo({ type: 0 }); case Kp: - return new fe(); + return new de(); + case el: + return new to({ type: 0 }); + case Hp: + return new de(); case Ow: return new Oe(); - case el: - return new eo({ type: 1 }); + case tl: + return new to({ type: 1 }); default: return super.defaultValues(t); } } static compareWithDefault(t, n) { switch (t) { - case $p: - return cn.defaultValues($p) === n; - case vd: - return n instanceof Xe; case Up: - return n instanceof fe ? n.isEqual(cn.defaultValues(Up)) : !1; - case Zc: - return eo.compareWithDefault("type", n.type) && eo.compareWithDefault("attributes", n.attributes) && eo.compareWithDefault("encodedValue", n.encodedValue); + return ln.defaultValues(Up) === n; + case kd: + return n instanceof Xe; case Kp: - return n instanceof fe ? n.isEqual(cn.defaultValues(Kp)) : !1; - case Ow: + return n instanceof de ? n.isEqual(ln.defaultValues(Kp)) : !1; case el: - return eo.compareWithDefault("type", n.type) && eo.compareWithDefault("attributes", n.attributes) && eo.compareWithDefault("encodedValue", n.encodedValue); + return to.compareWithDefault("type", n.type) && to.compareWithDefault("attributes", n.attributes) && to.compareWithDefault("encodedValue", n.encodedValue); + case Hp: + return n instanceof de ? n.isEqual(ln.defaultValues(Hp)) : !1; + case Ow: + case tl: + return to.compareWithDefault("type", n.type) && to.compareWithDefault("attributes", n.attributes) && to.compareWithDefault("encodedValue", n.encodedValue); default: return super.defaultValues(t); } @@ -66870,10 +66916,10 @@ var cn, eP = (cn = class extends Ce { static schema(t = {}) { const n = t.names ?? {}; return new z({ - name: lu, + name: uu, value: [ - new de({ name: n.version || YO }), - new Xt({ value: [mr.schema(n.sidSchema || { names: { blockName: Pw } }), new Xt({ value: [new ee({ + new ue({ name: n.version || YO }), + new en({ value: [mr.schema(n.sidSchema || { names: { blockName: Pw } }), new en({ value: [new ne({ optional: !0, name: n.sid || Pw, idBlock: { @@ -66889,14 +66935,14 @@ var cn, eP = (cn = class extends Ce { tagNumber: 0 } })] })] }), - fe.schema(n.digestAlgorithm || { names: { blockName: QO } }), - eo.schema(n.signedAttrs || { names: { + de.schema(n.digestAlgorithm || { names: { blockName: QO } }), + to.schema(n.signedAttrs || { names: { blockName: MA, tagNumber: 0 } }), - fe.schema(n.signatureAlgorithm || { names: { blockName: XO } }), + de.schema(n.signatureAlgorithm || { names: { blockName: XO } }), new Oe({ name: n.signature || ZO }), - eo.schema(n.unsignedAttrs || { names: { + to.schema(n.unsignedAttrs || { names: { blockName: BA, tagNumber: 1 } }) @@ -66905,34 +66951,34 @@ var cn, eP = (cn = class extends Ce { } fromSchema(t) { for (const o of fOe) delete t[o]; - const n = Ee(t, t, cn.schema()); + const n = Ee(t, t, ln.schema()); ke.assertSchema(n, this.className), this.version = n.result[YO].valueBlock.valueDec; const r = n.result[Pw]; - r.idBlock.tagClass === 1 ? this.sid = new mr({ schema: r }) : this.sid = r, this.digestAlgorithm = new fe({ schema: n.result[QO] }), MA in n.result && (this.signedAttrs = new eo({ + r.idBlock.tagClass === 1 ? this.sid = new mr({ schema: r }) : this.sid = r, this.digestAlgorithm = new de({ schema: n.result[QO] }), MA in n.result && (this.signedAttrs = new to({ type: 0, schema: n.result[MA] - })), this.signatureAlgorithm = new fe({ schema: n.result[XO] }), this.signature = n.result[ZO], BA in n.result && (this.unsignedAttrs = new eo({ + })), this.signatureAlgorithm = new de({ schema: n.result[XO] }), this.signature = n.result[ZO], BA in n.result && (this.unsignedAttrs = new to({ type: 1, schema: n.result[BA] })); } toSchema() { - if (cn.compareWithDefault(vd, this.sid)) throw new Error('Incorrectly initialized "SignerInfo" class'); + if (ln.compareWithDefault(kd, this.sid)) throw new Error('Incorrectly initialized "SignerInfo" class'); const t = []; - return t.push(new de({ value: this.version })), this.sid instanceof mr ? t.push(this.sid.toSchema()) : t.push(this.sid), t.push(this.digestAlgorithm.toSchema()), this.signedAttrs && cn.compareWithDefault(Zc, this.signedAttrs) === !1 && t.push(this.signedAttrs.toSchema()), t.push(this.signatureAlgorithm.toSchema()), t.push(this.signature), this.unsignedAttrs && cn.compareWithDefault(el, this.unsignedAttrs) === !1 && t.push(this.unsignedAttrs.toSchema()), new z({ value: t }); + return t.push(new ue({ value: this.version })), this.sid instanceof mr ? t.push(this.sid.toSchema()) : t.push(this.sid), t.push(this.digestAlgorithm.toSchema()), this.signedAttrs && ln.compareWithDefault(el, this.signedAttrs) === !1 && t.push(this.signedAttrs.toSchema()), t.push(this.signatureAlgorithm.toSchema()), t.push(this.signature), this.unsignedAttrs && ln.compareWithDefault(tl, this.unsignedAttrs) === !1 && t.push(this.unsignedAttrs.toSchema()), new z({ value: t }); } toJSON() { - if (cn.compareWithDefault(vd, this.sid)) throw new Error('Incorrectly initialized "SignerInfo" class'); + if (ln.compareWithDefault(kd, this.sid)) throw new Error('Incorrectly initialized "SignerInfo" class'); const t = { version: this.version, digestAlgorithm: this.digestAlgorithm.toJSON(), signatureAlgorithm: this.signatureAlgorithm.toJSON(), signature: this.signature.toJSON() }; - return this.sid instanceof Xe || (t.sid = this.sid.toJSON()), this.signedAttrs && cn.compareWithDefault(Zc, this.signedAttrs) === !1 && (t.signedAttrs = this.signedAttrs.toJSON()), this.unsignedAttrs && cn.compareWithDefault(el, this.unsignedAttrs) === !1 && (t.unsignedAttrs = this.unsignedAttrs.toJSON()), t; + return this.sid instanceof Xe || (t.sid = this.sid.toJSON()), this.signedAttrs && ln.compareWithDefault(el, this.signedAttrs) === !1 && (t.signedAttrs = this.signedAttrs.toJSON()), this.unsignedAttrs && ln.compareWithDefault(tl, this.unsignedAttrs) === !1 && (t.unsignedAttrs = this.unsignedAttrs.toJSON()), t; } -}, cn.CLASS_NAME = "SignerInfo", cn); -const Rw = "version", Tw = "policy", Mw = "messageImprint", Bw = "serialNumber", _w = "genTime", kd = "ordering", Ad = "nonce", Hp = "accuracy", zp = "tsa", Wp = "extensions", xs = "TSTInfo", tP = `${xs}.${Rw}`, nP = `${xs}.${Tw}`, rP = `${xs}.${Mw}`, oP = `${xs}.${Bw}`, sP = `${xs}.${_w}`, _A = `${xs}.${Hp}`, LA = `${xs}.${kd}`, DA = `${xs}.${Ad}`, jA = `${xs}.${zp}`, FA = `${xs}.${Wp}`, hOe = [ +}, ln.CLASS_NAME = "SignerInfo", ln); +const Rw = "version", Tw = "policy", Mw = "messageImprint", Bw = "serialNumber", _w = "genTime", Ad = "ordering", Sd = "nonce", zp = "accuracy", Wp = "tsa", qp = "extensions", xs = "TSTInfo", tP = `${xs}.${Rw}`, nP = `${xs}.${Tw}`, rP = `${xs}.${Mw}`, oP = `${xs}.${Bw}`, sP = `${xs}.${_w}`, _A = `${xs}.${zp}`, LA = `${xs}.${Ad}`, DA = `${xs}.${Sd}`, jA = `${xs}.${Wp}`, FA = `${xs}.${qp}`, hOe = [ tP, nP, rP, @@ -66946,7 +66992,7 @@ const Rw = "version", Tw = "policy", Mw = "messageImprint", Bw = "serialNumber", ]; var Kn, pOe = (Kn = class extends Ce { constructor(t = {}) { - super(), this.version = t[Rw] ?? Kn.defaultValues(Rw), this.policy = t[Tw] ?? Kn.defaultValues(Tw), this.messageImprint = t[Mw] ?? Kn.defaultValues(Mw), this.serialNumber = t[Bw] ?? Kn.defaultValues(Bw), this.genTime = t[_w] ?? Kn.defaultValues(_w), Hp in t && (this.accuracy = t[Hp] ?? Kn.defaultValues(Hp)), kd in t && (this.ordering = t[kd] ?? Kn.defaultValues(kd)), Ad in t && (this.nonce = t[Ad] ?? Kn.defaultValues(Ad)), zp in t && (this.tsa = t[zp] ?? Kn.defaultValues(zp)), Wp in t && (this.extensions = t[Wp] ?? Kn.defaultValues(Wp)), t.schema && this.fromSchema(t.schema); + super(), this.version = t[Rw] ?? Kn.defaultValues(Rw), this.policy = t[Tw] ?? Kn.defaultValues(Tw), this.messageImprint = t[Mw] ?? Kn.defaultValues(Mw), this.serialNumber = t[Bw] ?? Kn.defaultValues(Bw), this.genTime = t[_w] ?? Kn.defaultValues(_w), zp in t && (this.accuracy = t[zp] ?? Kn.defaultValues(zp)), Ad in t && (this.ordering = t[Ad] ?? Kn.defaultValues(Ad)), Sd in t && (this.nonce = t[Sd] ?? Kn.defaultValues(Sd)), Wp in t && (this.tsa = t[Wp] ?? Kn.defaultValues(Wp)), qp in t && (this.extensions = t[qp] ?? Kn.defaultValues(qp)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -66957,18 +67003,18 @@ var Kn, pOe = (Kn = class extends Ce { case Mw: return new Ms(); case Bw: - return new de(); + return new ue(); case _w: return new Date(0, 0, 0); - case Hp: - return new mh(); - case kd: - return !1; - case Ad: - return new de(); case zp: - return new Dt(); + return new bh(); + case Ad: + return !1; + case Sd: + return new ue(); case Wp: + return new Vt(); + case qp: return []; default: return super.defaultValues(t); @@ -66979,18 +67025,18 @@ var Kn, pOe = (Kn = class extends Ce { case Rw: case Tw: case _w: - case kd: - return n === Kn.defaultValues(kd); + case Ad: + return n === Kn.defaultValues(Ad); case Mw: return Ms.compareWithDefault("hashAlgorithm", n.hashAlgorithm) && Ms.compareWithDefault("hashedMessage", n.hashedMessage); case Bw: - case Ad: - return n.isEqual(Kn.defaultValues(Ad)); - case Hp: - return mh.compareWithDefault("seconds", n.seconds) && mh.compareWithDefault("millis", n.millis) && mh.compareWithDefault("micros", n.micros); + case Sd: + return n.isEqual(Kn.defaultValues(Sd)); case zp: - return Dt.compareWithDefault("type", n.type) && Dt.compareWithDefault("value", n.value); + return bh.compareWithDefault("seconds", n.seconds) && bh.compareWithDefault("millis", n.millis) && bh.compareWithDefault("micros", n.micros); case Wp: + return Vt.compareWithDefault("type", n.type) && Vt.compareWithDefault("value", n.value); + case qp: return n.length === 0; default: return super.defaultValues(t); @@ -67001,35 +67047,35 @@ var Kn, pOe = (Kn = class extends Ce { return new z({ name: n.blockName || xs, value: [ - new de({ name: n.version || tP }), - new Ve({ name: n.policy || nP }), + new ue({ name: n.version || tP }), + new $e({ name: n.policy || nP }), Ms.schema(n.messageImprint || { names: { blockName: rP } }), - new de({ name: n.serialNumber || oP }), - new Yt({ name: n.genTime || sP }), - mh.schema(n.accuracy || { names: { blockName: _A } }), - new Ql({ + new ue({ name: n.serialNumber || oP }), + new Xt({ name: n.genTime || sP }), + bh.schema(n.accuracy || { names: { blockName: _A } }), + new Xl({ name: n.ordering || LA, optional: !0 }), - new de({ + new ue({ name: n.nonce || DA, optional: !0 }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [Dt.schema(n.tsa || { names: { blockName: jA } })] + value: [Vt.schema(n.tsa || { names: { blockName: jA } })] }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 1 }, - value: [new ot({ + value: [new st({ name: n.extensions || FA, value: Bn.schema(n.extension || {}) })] @@ -67040,18 +67086,18 @@ var Kn, pOe = (Kn = class extends Ce { fromSchema(t) { for (const r of hOe) delete t[r]; const n = Ee(t, t, Kn.schema()); - ke.assertSchema(n, this.className), this.version = n.result[tP].valueBlock.valueDec, this.policy = n.result[nP].valueBlock.toString(), this.messageImprint = new Ms({ schema: n.result[rP] }), this.serialNumber = n.result[oP], this.genTime = n.result[sP].toDate(), _A in n.result && (this.accuracy = new mh({ schema: n.result[_A] })), LA in n.result && (this.ordering = n.result[LA].valueBlock.value), DA in n.result && (this.nonce = n.result[DA]), jA in n.result && (this.tsa = new Dt({ schema: n.result[jA] })), FA in n.result && (this.extensions = Array.from(n.result[FA], (r) => new Bn({ schema: r }))); + ke.assertSchema(n, this.className), this.version = n.result[tP].valueBlock.valueDec, this.policy = n.result[nP].valueBlock.toString(), this.messageImprint = new Ms({ schema: n.result[rP] }), this.serialNumber = n.result[oP], this.genTime = n.result[sP].toDate(), _A in n.result && (this.accuracy = new bh({ schema: n.result[_A] })), LA in n.result && (this.ordering = n.result[LA].valueBlock.value), DA in n.result && (this.nonce = n.result[DA]), jA in n.result && (this.tsa = new Vt({ schema: n.result[jA] })), FA in n.result && (this.extensions = Array.from(n.result[FA], (r) => new Bn({ schema: r }))); } toSchema() { const t = []; - return t.push(new de({ value: this.version })), t.push(new Ve({ value: this.policy })), t.push(this.messageImprint.toSchema()), t.push(this.serialNumber), t.push(new Yt({ valueDate: this.genTime })), this.accuracy && t.push(this.accuracy.toSchema()), this.ordering !== void 0 && t.push(new Ql({ value: this.ordering })), this.nonce && t.push(this.nonce), this.tsa && t.push(new ee({ + return t.push(new ue({ value: this.version })), t.push(new $e({ value: this.policy })), t.push(this.messageImprint.toSchema()), t.push(this.serialNumber), t.push(new Xt({ valueDate: this.genTime })), this.accuracy && t.push(this.accuracy.toSchema()), this.ordering !== void 0 && t.push(new Xl({ value: this.ordering })), this.nonce && t.push(this.nonce), this.tsa && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, value: [this.tsa.toSchema()] - })), this.extensions && t.push(new ee({ + })), this.extensions && t.push(new ne({ optional: !0, idBlock: { tagClass: 3, @@ -67078,10 +67124,10 @@ var Kn, pOe = (Kn = class extends Ce { if (t.notAfter && this.genTime > t.notAfter) throw new Error("Generation time for TSTInfo object is more than notAfter value"); const o = n.getAlgorithmByOID(this.messageImprint.hashAlgorithm.algorithmId, !0, "MessageImprint.hashAlgorithm"), s = await n.digest(o.name, new Uint8Array(r)); - return Kt.equal(s, this.messageImprint.hashedMessage.valueBlock.valueHexView); + return Wt.equal(s, this.messageImprint.hashedMessage.valueBlock.valueHexView); } }, Kn.CLASS_NAME = "TSTInfo", Kn); -const qp = "version", Lw = "digestAlgorithms", Dw = "encapContentInfo", Gp = "certificates", Jp = "crls", jw = "signerInfos", Ry = "ocsps", Xf = "SignedData", iP = `${Xf}.${qp}`, VA = `${Xf}.${Lw}`, aP = `${Xf}.${Dw}`, $A = `${Xf}.${Gp}`, UA = `${Xf}.${Jp}`, KA = `${Xf}.${jw}`, gOe = [ +const Gp = "version", Lw = "digestAlgorithms", Dw = "encapContentInfo", Jp = "certificates", Yp = "crls", jw = "signerInfos", Ry = "ocsps", eh = "SignedData", iP = `${eh}.${Gp}`, VA = `${eh}.${Lw}`, aP = `${eh}.${Dw}`, $A = `${eh}.${Jp}`, UA = `${eh}.${Yp}`, KA = `${eh}.${jw}`, gOe = [ iP, VA, aP, @@ -67089,26 +67135,26 @@ const qp = "version", Lw = "digestAlgorithms", Dw = "encapContentInfo", Gp = "ce UA, KA ]; -var cr = class extends Error { +var lr = class extends Error { constructor({ message: e, code: t = 0, date: n = /* @__PURE__ */ new Date(), signatureVerified: r = null, signerCertificate: o = null, signerCertificateVerified: s = null, timestampSerial: i = null, certificatePath: a = [] }) { super(e), this.name = "SignedDataVerifyError", this.date = n, this.code = t, this.timestampSerial = i, this.signatureVerified = r, this.signerCertificate = o, this.signerCertificateVerified = s, this.certificatePath = a; } -}, nr, bx = (nr = class extends Ce { +}, rr, bx = (rr = class extends Ce { constructor(t = {}) { - super(), this.version = t[qp] ?? nr.defaultValues(qp), this.digestAlgorithms = t[Lw] ?? nr.defaultValues(Lw), this.encapContentInfo = t[Dw] ?? nr.defaultValues(Dw), Gp in t && (this.certificates = t[Gp] ?? nr.defaultValues(Gp)), Jp in t && (this.crls = t[Jp] ?? nr.defaultValues(Jp)), Ry in t && (this.ocsps = t[Ry] ?? nr.defaultValues(Ry)), this.signerInfos = t[jw] ?? nr.defaultValues(jw), t.schema && this.fromSchema(t.schema); + super(), this.version = t[Gp] ?? rr.defaultValues(Gp), this.digestAlgorithms = t[Lw] ?? rr.defaultValues(Lw), this.encapContentInfo = t[Dw] ?? rr.defaultValues(Dw), Jp in t && (this.certificates = t[Jp] ?? rr.defaultValues(Jp)), Yp in t && (this.crls = t[Yp] ?? rr.defaultValues(Yp)), Ry in t && (this.ocsps = t[Ry] ?? rr.defaultValues(Ry)), this.signerInfos = t[jw] ?? rr.defaultValues(jw), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case qp: + case Gp: return 0; case Lw: return []; case Dw: - return new Tp(); - case Gp: - return []; + return new Mp(); case Jp: return []; + case Yp: + return []; case Ry: return []; case jw: @@ -67119,13 +67165,13 @@ var cr = class extends Error { } static compareWithDefault(t, n) { switch (t) { - case qp: - return n === nr.defaultValues(qp); + case Gp: + return n === rr.defaultValues(Gp); case Dw: - return Tp.compareWithDefault("eContentType", n.eContentType) && Tp.compareWithDefault("eContent", n.eContent); + return Mp.compareWithDefault("eContentType", n.eContentType) && Mp.compareWithDefault("eContent", n.eContent); case Lw: - case Gp: case Jp: + case Yp: case Ry: case jw: return n.length === 0; @@ -67136,25 +67182,25 @@ var cr = class extends Error { static schema(t = {}) { const n = t.names ?? {}; return n.optional === void 0 && (n.optional = !1), new z({ - name: n.blockName || Xf, + name: n.blockName || eh, optional: n.optional, value: [ - new de({ name: n.version || iP }), - new An({ value: [new ot({ + new ue({ name: n.version || iP }), + new An({ value: [new st({ name: n.digestAlgorithms || VA, - value: fe.schema() + value: de.schema() })] }), - Tp.schema(n.encapContentInfo || { names: { blockName: aP } }), - new ee({ + Mp.schema(n.encapContentInfo || { names: { blockName: aP } }), + new ne({ name: n.certificates || $A, optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: Eg.schema().valueBlock.value + value: Cg.schema().valueBlock.value }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, @@ -67162,7 +67208,7 @@ var cr = class extends Error { }, value: vA.schema(n.crls || { names: { crls: UA } }).valueBlock.value }), - new An({ value: [new ot({ + new An({ value: [new st({ name: n.signerInfos || KA, value: eP.schema() })] }) @@ -67171,18 +67217,18 @@ var cr = class extends Error { } fromSchema(t) { for (const r of gOe) delete t[r]; - const n = Ee(t, t, nr.schema()); - if (ke.assertSchema(n, this.className), this.version = n.result[iP].valueBlock.valueDec, VA in n.result && (this.digestAlgorithms = Array.from(n.result[VA], (r) => new fe({ schema: r }))), this.encapContentInfo = new Tp({ schema: n.result[aP] }), $A in n.result) { - const r = new Eg({ schema: new An({ value: n.result[$A].valueBlock.value }) }); + const n = Ee(t, t, rr.schema()); + if (ke.assertSchema(n, this.className), this.version = n.result[iP].valueBlock.valueDec, VA in n.result && (this.digestAlgorithms = Array.from(n.result[VA], (r) => new de({ schema: r }))), this.encapContentInfo = new Mp({ schema: n.result[aP] }), $A in n.result) { + const r = new Cg({ schema: new An({ value: n.result[$A].valueBlock.value }) }); this.certificates = r.certificates.slice(0); } UA in n.result && (this.crls = Array.from(n.result[UA], (r) => r.idBlock.tagClass === 1 ? new J0({ schema: r }) : (r.idBlock.tagClass = 1, r.idBlock.tagNumber = 16, new wA({ schema: r })))), KA in n.result && (this.signerInfos = Array.from(n.result[KA], (r) => new eP({ schema: r }))); } toSchema(t = !1) { const n = []; - if (this.certificates && this.certificates.length && this.certificates.some((r) => r instanceof yA) || this.crls && this.crls.length && this.crls.some((r) => r instanceof wA) ? this.version = 5 : this.certificates && this.certificates.length && this.certificates.some((r) => r instanceof Bd) ? this.version = 4 : this.certificates && this.certificates.length && this.certificates.some((r) => r instanceof BO) || this.signerInfos.some((r) => r.version === 3) || this.encapContentInfo.eContentType !== nr.ID_DATA ? this.version = 3 : this.version = 1, n.push(new de({ value: this.version })), n.push(new An({ value: Array.from(this.digestAlgorithms, (r) => r.toSchema()) })), n.push(this.encapContentInfo.toSchema()), this.certificates) { - const r = new Eg({ certificates: this.certificates }).toSchema(); - n.push(new ee({ + if (this.certificates && this.certificates.length && this.certificates.some((r) => r instanceof yA) || this.crls && this.crls.length && this.crls.some((r) => r instanceof wA) ? this.version = 5 : this.certificates && this.certificates.length && this.certificates.some((r) => r instanceof Ld) ? this.version = 4 : this.certificates && this.certificates.length && this.certificates.some((r) => r instanceof BO) || this.signerInfos.some((r) => r.version === 3) || this.encapContentInfo.eContentType !== rr.ID_DATA ? this.version = 3 : this.version = 1, n.push(new ue({ value: this.version })), n.push(new An({ value: Array.from(this.digestAlgorithms, (r) => r.toSchema()) })), n.push(this.encapContentInfo.toSchema()), this.certificates) { + const r = new Cg({ certificates: this.certificates }).toSchema(); + n.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -67190,7 +67236,7 @@ var cr = class extends Error { value: r.valueBlock.value })); } - return this.crls && n.push(new ee({ + return this.crls && n.push(new ne({ idBlock: { tagClass: 3, tagNumber: 1 @@ -67214,16 +67260,16 @@ var cr = class extends Error { return this.certificates && (t.certificates = Array.from(this.certificates, (n) => n.toJSON())), this.crls && (t.crls = Array.from(this.crls, (n) => n.toJSON())), t; } async verify({ signer: t = -1, data: n = Dn, trustedCerts: r = [], checkDate: o = /* @__PURE__ */ new Date(), checkChain: s = !1, passedWhenNotRevValues: i = !1, extendedMode: a = !1, findOrigin: c = null, findIssuer: l = null } = {}, u = Ye(!0)) { - let d = null, f = null; + let f = null, d = null; try { let h = Dn, g = "", p = []; const m = this.signerInfos[t]; - if (!m) throw new cr({ + if (!m) throw new lr({ date: o, code: 1, message: "Unable to get signer by supplied index" }); - if (!this.certificates) throw new cr({ + if (!this.certificates) throw new lr({ date: o, code: 2, message: "No certificates attached to this signed data" @@ -67231,7 +67277,7 @@ var cr = class extends Error { if (m.sid instanceof mr) { for (const k of this.certificates) if (k instanceof Mr && k.issuer.isEqual(m.sid.issuer) && k.serialNumber.isEqual(m.sid.serialNumber)) { - d = k; + f = k; break; } } else { @@ -67239,155 +67285,155 @@ var cr = class extends Error { for (const w of this.certificates) { if (!(w instanceof Mr)) continue; const y = await u.digest({ name: "sha-1" }, w.subjectPublicKeyInfo.subjectPublicKey.valueBlock.valueHexView); - if (Kt.equal(y, N)) { - d = w; + if (Wt.equal(y, N)) { + f = w; break; } } } - if (!d) throw new cr({ + if (!f) throw new lr({ date: o, code: 3, message: "Unable to find signer certificate" }); if (this.encapContentInfo.eContentType === "1.2.840.113549.1.9.16.1.4") { - if (!this.encapContentInfo.eContent) throw new cr({ + if (!this.encapContentInfo.eContent) throw new lr({ date: o, code: 15, message: "Error during verification: TSTInfo eContent is empty", signatureVerified: null, - signerCertificate: d, - timestampSerial: f, + signerCertificate: f, + timestampSerial: d, signerCertificateVerified: !0 }); let k; try { k = pOe.fromBER(this.encapContentInfo.eContent.getValue()); } catch { - throw new cr({ + throw new lr({ date: o, code: 15, message: "Error during verification: TSTInfo wrong ASN.1 schema ", signatureVerified: null, - signerCertificate: d, - timestampSerial: f, + signerCertificate: f, + timestampSerial: d, signerCertificateVerified: !0 }); } - if (o = k.genTime, f = k.serialNumber.valueBlock.valueHexView.slice().buffer, n.byteLength === 0) throw new cr({ + if (o = k.genTime, d = k.serialNumber.valueBlock.valueHexView.slice().buffer, n.byteLength === 0) throw new lr({ date: o, code: 4, message: "Missed detached data input array" }); - if (!await k.verify({ data: n }, u)) throw new cr({ + if (!await k.verify({ data: n }, u)) throw new lr({ date: o, code: 15, message: "Error during verification: TSTInfo verification is failed", signatureVerified: !1, - signerCertificate: d, - timestampSerial: f, + signerCertificate: f, + timestampSerial: d, signerCertificateVerified: !0 }); } if (s) { - const k = this.certificates.filter((x) => x instanceof Mr && !!Sq(x, d)), N = { + const k = this.certificates.filter((x) => x instanceof Mr && !!Sq(x, f)), N = { checkDate: o, certs: k, trustedCerts: r }; l && (N.findIssuer = l), c && (N.findOrigin = c); const w = new Cq(N); - if (w.certs.push(d), this.crls) + if (w.certs.push(f), this.crls) for (const x of this.crls) "thisUpdate" in x ? w.crls.push(x) : x.otherRevInfoFormat === "1.3.6.1.5.5.7.48.1.1" && w.ocsps.push(new u0({ schema: x.otherRevInfo })); this.ocsps && w.ocsps.push(...this.ocsps); const y = await w.verify({ passedWhenNotRevValues: i }, u).catch((x) => { - throw new cr({ + throw new lr({ date: o, code: 5, message: `Validation of signer's certificate failed with error: ${x instanceof Object ? x.resultMessage : x}`, - signerCertificate: d, + signerCertificate: f, signerCertificateVerified: !1 }); }); - if (y.certificatePath && (p = y.certificatePath), !y.result) throw new cr({ + if (y.certificatePath && (p = y.certificatePath), !y.result) throw new lr({ date: o, code: 5, message: `Validation of signer's certificate failed: ${y.resultMessage}`, - signerCertificate: d, + signerCertificate: f, signerCertificateVerified: !1 }); } const v = u.getAlgorithmByOID(m.digestAlgorithm.algorithmId); - if (!("name" in v)) throw new cr({ + if (!("name" in v)) throw new lr({ date: o, code: 7, message: `Unsupported signature algorithm: ${m.digestAlgorithm.algorithmId}`, - signerCertificate: d, + signerCertificate: f, signerCertificateVerified: !0 }); g = v.name; const S = this.encapContentInfo.eContent; if (S) S.idBlock.tagClass === 1 && S.idBlock.tagNumber === 4 ? n = S.getValue() : n = S.valueBlock.valueBeforeDecodeView.slice().buffer; - else if (n.byteLength === 0) throw new cr({ + else if (n.byteLength === 0) throw new lr({ date: o, code: 8, message: "Missed detached data input array", - signerCertificate: d, + signerCertificate: f, signerCertificateVerified: !0 }); if (m.signedAttrs) { let k = !1, N = !1; for (const w of m.signedAttrs.attributes) if (w.type === "1.2.840.113549.1.9.3" && (k = !0), w.type === "1.2.840.113549.1.9.4" && (N = !0, h = w.values[0].valueBlock.valueHex), k && N) break; - if (k === !1) throw new cr({ + if (k === !1) throw new lr({ date: o, code: 9, message: 'Attribute "content-type" is a mandatory attribute for "signed attributes"', - signerCertificate: d, + signerCertificate: f, signerCertificateVerified: !0 }); - if (N === !1) throw new cr({ + if (N === !1) throw new lr({ date: o, code: 10, message: 'Attribute "message-digest" is a mandatory attribute for "signed attributes"', signatureVerified: null, - signerCertificate: d, + signerCertificate: f, signerCertificateVerified: !0 }); } if (m.signedAttrs) { const k = await u.digest(g, new Uint8Array(n)); - if (!Kt.equal(k, h)) throw new cr({ + if (!Wt.equal(k, h)) throw new lr({ date: o, code: 15, message: "Error during verification: Message digest doesn't match", signatureVerified: null, - signerCertificate: d, - timestampSerial: f, + signerCertificate: f, + timestampSerial: d, signerCertificateVerified: !0 }); n = m.signedAttrs.encodedValue; } - const C = m.signatureAlgorithm.algorithmId === "1.2.840.113549.1.1.1" ? await u.verifyWithPublicKey(n, m.signature, d.subjectPublicKeyInfo, m.signatureAlgorithm, g) : await u.verifyWithPublicKey(n, m.signature, d.subjectPublicKeyInfo, m.signatureAlgorithm); + const C = m.signatureAlgorithm.algorithmId === "1.2.840.113549.1.1.1" ? await u.verifyWithPublicKey(n, m.signature, f.subjectPublicKeyInfo, m.signatureAlgorithm, g) : await u.verifyWithPublicKey(n, m.signature, f.subjectPublicKeyInfo, m.signatureAlgorithm); return a ? { date: o, code: 14, message: "", signatureVerified: C, - signerCertificate: d, - timestampSerial: f, + signerCertificate: f, + timestampSerial: d, signerCertificateVerified: !0, certificatePath: p } : C; } catch (h) { - throw h instanceof cr ? h : new cr({ + throw h instanceof lr ? h : new lr({ date: o, code: 15, message: `Error during verification: ${h instanceof Error ? h.message : h}`, signatureVerified: null, - signerCertificate: d, - timestampSerial: f, + signerCertificate: f, + timestampSerial: d, signerCertificateVerified: !0 }); } @@ -67398,49 +67444,49 @@ var cr = class extends Error { if (!i) throw new RangeError("SignerInfo index is out of range"); !i.signedAttrs?.attributes.length && "hash" in t.algorithm && "hash" in t.algorithm && t.algorithm.hash && (r = t.algorithm.hash.name); const a = s.getOIDByAlgorithm({ name: r }, !0, "hashAlgorithm"); - this.digestAlgorithms.filter((d) => d.algorithmId === a).length === 0 && this.digestAlgorithms.push(new fe({ + this.digestAlgorithms.filter((f) => f.algorithmId === a).length === 0 && this.digestAlgorithms.push(new de({ algorithmId: a, - algorithmParams: new fn() - })), i.digestAlgorithm = new fe({ + algorithmParams: new hn() + })), i.digestAlgorithm = new de({ algorithmId: a, - algorithmParams: new fn() + algorithmParams: new hn() }); const c = await s.getSignatureParameters(t, r), l = c.parameters; if (i.signatureAlgorithm = c.signatureAlgorithm, i.signedAttrs) if (i.signedAttrs.encodedValue.byteLength !== 0) o = i.signedAttrs.encodedValue; else { o = i.signedAttrs.toSchema().toBER(); - const d = ct(o); - d[0] = 49; + const f = lt(o); + f[0] = 49; } else { - const d = this.encapContentInfo.eContent; - if (d) - d.idBlock.tagClass === 1 && d.idBlock.tagNumber === 4 ? o = d.getValue() : o = d.valueBlock.valueBeforeDecodeView.slice().buffer; + const f = this.encapContentInfo.eContent; + if (f) + f.idBlock.tagClass === 1 && f.idBlock.tagNumber === 4 ? o = f.getValue() : o = f.valueBlock.valueBeforeDecodeView.slice().buffer; else if (o.byteLength === 0) throw new Error("Missed detached data input array"); } const u = await s.signWithPrivateKey(o, t, l); i.signature = new Oe({ valueHex: u }); } -}, nr.CLASS_NAME = "SignedData", nr.ID_DATA = iT, nr); -const Sd = "version", xd = "authSafe", Gi = "macData", Ty = "parsedValue", mOe = [ - Sd, +}, rr.CLASS_NAME = "SignedData", rr.ID_DATA = iT, rr); +const xd = "version", Ed = "authSafe", Gi = "macData", Ty = "parsedValue", mOe = [ xd, + Ed, Gi ]; -var Bo; -Bo = class extends Ce { +var _o; +_o = class extends Ce { constructor(t = {}) { - super(), this.version = t[Sd] ?? Bo.defaultValues(Sd), this.authSafe = t[xd] ?? Bo.defaultValues(xd), Gi in t && (this.macData = t[Gi] ?? Bo.defaultValues(Gi)), Ty in t && (this.parsedValue = t[Ty] ?? Bo.defaultValues(Ty)), t.schema && this.fromSchema(t.schema); + super(), this.version = t[xd] ?? _o.defaultValues(xd), this.authSafe = t[Ed] ?? _o.defaultValues(Ed), Gi in t && (this.macData = t[Gi] ?? _o.defaultValues(Gi)), Ty in t && (this.parsedValue = t[Ty] ?? _o.defaultValues(Ty)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Sd: - return 3; case xd: + return 3; + case Ed: return new Yn(); case Gi: - return new ku(); + return new Au(); case Ty: return {}; default: @@ -67449,12 +67495,12 @@ Bo = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case Sd: - return n === Bo.defaultValues(t); case xd: + return n === _o.defaultValues(t); + case Ed: return Yn.compareWithDefault("contentType", n.contentType) && Yn.compareWithDefault("content", n.content); case Gi: - return ku.compareWithDefault("mac", n.mac) && ku.compareWithDefault("macSalt", n.macSalt) && ku.compareWithDefault("iterations", n.iterations); + return Au.compareWithDefault("mac", n.mac) && Au.compareWithDefault("macSalt", n.macSalt) && Au.compareWithDefault("iterations", n.iterations); case Ty: return n instanceof Object && Object.keys(n).length === 0; default: @@ -67466,9 +67512,9 @@ Bo = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.version || Sd }), - Yn.schema(n.authSafe || { names: { blockName: xd } }), - ku.schema(n.macData || { names: { + new ue({ name: n.version || xd }), + Yn.schema(n.authSafe || { names: { blockName: Ed } }), + Au.schema(n.macData || { names: { blockName: Gi, optional: !0 } }) @@ -67477,15 +67523,15 @@ Bo = class extends Ce { } fromSchema(t) { for (const r of mOe) delete t[r]; - const n = Ee(t, t, Bo.schema({ names: { - version: Sd, - authSafe: { names: { blockName: xd } }, + const n = Ee(t, t, _o.schema({ names: { + version: xd, + authSafe: { names: { blockName: Ed } }, macData: { names: { blockName: Gi } } } })); - ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.authSafe = new Yn({ schema: n.result.authSafe }), Gi in n.result && (this.macData = new ku({ schema: n.result.macData })); + ke.assertSchema(n, this.className), this.version = n.result.version.valueBlock.valueDec, this.authSafe = new Yn({ schema: n.result.authSafe }), Gi in n.result && (this.macData = new Au({ schema: n.result.macData })); } toSchema() { - const t = [new de({ value: this.version }), this.authSafe.toSchema()]; + const t = [new ue({ value: this.version }), this.authSafe.toSchema()]; return this.macData && t.push(this.macData.toSchema()), new z({ value: t }); } toJSON() { @@ -67496,12 +67542,12 @@ Bo = class extends Ce { return this.macData && (t.macData = this.macData.toJSON()), t; } async makeInternalValues(t = {}, n = Ye(!0)) { - if (Ut.assert(t, "parameters", "object"), !this.parsedValue) throw new Error('Please call "parseValues" function first in order to make "parsedValue" data'); - switch (Ct.assertEmpty(this.parsedValue.integrityMode, "integrityMode", "parsedValue"), Ct.assertEmpty(this.parsedValue.authenticatedSafe, "authenticatedSafe", "parsedValue"), this.parsedValue.integrityMode) { + if (zt.assert(t, "parameters", "object"), !this.parsedValue) throw new Error('Please call "parseValues" function first in order to make "parsedValue" data'); + switch (Ot.assertEmpty(this.parsedValue.integrityMode, "integrityMode", "parsedValue"), Ot.assertEmpty(this.parsedValue.authenticatedSafe, "authenticatedSafe", "parsedValue"), this.parsedValue.integrityMode) { case 0: { - if (!("iterations" in t)) throw new Ct("iterations"); - Ct.assertEmpty(t.pbkdf2HashAlgorithm, "pbkdf2HashAlgorithm"), Ct.assertEmpty(t.hmacHashAlgorithm, "hmacHashAlgorithm"), Ct.assertEmpty(t.password, "password"); + if (!("iterations" in t)) throw new Ot("iterations"); + Ot.assertEmpty(t.pbkdf2HashAlgorithm, "pbkdf2HashAlgorithm"), Ot.assertEmpty(t.hmacHashAlgorithm, "hmacHashAlgorithm"), Ot.assertEmpty(t.password, "password"); const r = /* @__PURE__ */ new ArrayBuffer(64), o = new Uint8Array(r); n.getRandomValues(o); const s = this.parsedValue.authenticatedSafe.toSchema().toBER(!1); @@ -67516,9 +67562,9 @@ Bo = class extends Ce { iterationCount: t.iterations, contentToStamp: s }); - this.macData = new ku({ - mac: new Pp({ - digestAlgorithm: new fe({ algorithmId: n.getOIDByAlgorithm({ name: t.hmacHashAlgorithm }, !0, "hmacHashAlgorithm") }), + this.macData = new Au({ + mac: new Rp({ + digestAlgorithm: new de({ algorithmId: n.getOIDByAlgorithm({ name: t.hmacHashAlgorithm }, !0, "hmacHashAlgorithm") }), digest: new Oe({ valueHex: i }) }), macSalt: new Oe({ valueHex: r }), @@ -67528,11 +67574,11 @@ Bo = class extends Ce { break; case 1: { - if (!("signingCertificate" in t)) throw new Ct("signingCertificate"); - Ct.assertEmpty(t.privateKey, "privateKey"), Ct.assertEmpty(t.hashAlgorithm, "hashAlgorithm"); + if (!("signingCertificate" in t)) throw new Ot("signingCertificate"); + Ot.assertEmpty(t.privateKey, "privateKey"), Ot.assertEmpty(t.hashAlgorithm, "hashAlgorithm"); const r = this.parsedValue.authenticatedSafe.toSchema().toBER(!1), o = new bx({ version: 1, - encapContentInfo: new Tp({ + encapContentInfo: new Mp({ eContentType: "1.2.840.113549.1.7.1", eContent: new Oe({ valueHex: r }) }), @@ -67540,7 +67586,7 @@ Bo = class extends Ce { }), s = await n.digest({ name: t.hashAlgorithm }, new Uint8Array(r)), i = []; i.push(new En({ type: "1.2.840.113549.1.9.3", - values: [new Ve({ value: "1.2.840.113549.1.7.1" })] + values: [new $e({ value: "1.2.840.113549.1.7.1" })] })), i.push(new En({ type: "1.2.840.113549.1.9.5", values: [new W0({ valueDate: /* @__PURE__ */ new Date() })] @@ -67553,7 +67599,7 @@ Bo = class extends Ce { issuer: t.signingCertificate.issuer, serialNumber: t.signingCertificate.serialNumber }), - signedAttrs: new eo({ + signedAttrs: new to({ type: 0, attributes: i }) @@ -67568,10 +67614,10 @@ Bo = class extends Ce { } } async parseInternalValues(t, n = Ye(!0)) { - switch (Ut.assert(t, "parameters", "object"), t.checkIntegrity === void 0 && (t.checkIntegrity = !0), this.parsedValue = {}, this.authSafe.contentType) { + switch (zt.assert(t, "parameters", "object"), t.checkIntegrity === void 0 && (t.checkIntegrity = !0), this.parsedValue = {}, this.authSafe.contentType) { case Yn.DATA: { - Ct.assertEmpty(t.password, "password"), this.parsedValue.integrityMode = 0, Ut.assert(this.authSafe.content, "authSafe.content", Oe); + Ot.assertEmpty(t.password, "password"), this.parsedValue.integrityMode = 0, zt.assert(this.authSafe.content, "authSafe.content", Oe); const r = this.authSafe.content.getValue(); if (this.parsedValue.authenticatedSafe = $4.fromBER(r), t.checkIntegrity) { if (!this.macData) throw new Error('Absent "macData" value, can not check PKCS#12 data integrity'); @@ -67591,7 +67637,7 @@ Bo = class extends Ce { { this.parsedValue.integrityMode = 1; const r = new bx({ schema: this.authSafe.content }), o = r.encapContentInfo.eContent; - Ct.assert(o, "eContent", "cmsSigned.encapContentInfo"), Ut.assert(o, "eContent", Oe); + Ot.assert(o, "eContent", "cmsSigned.encapContentInfo"), zt.assert(o, "eContent", Oe); const s = o.getValue(); if (this.parsedValue.authenticatedSafe = $4.fromBER(s), !await r.verify({ signer: 0, @@ -67603,36 +67649,36 @@ Bo = class extends Ce { throw new Error(`Incorrect value for "this.authSafe.contentType": ${this.authSafe.contentType}`); } } -}, Bo.CLASS_NAME = "PFX"; -const Yp = "status", tl = "statusStrings", nl = "failInfo", yOe = [ - Yp, - tl, - nl +}, _o.CLASS_NAME = "PFX"; +const Qp = "status", nl = "statusStrings", rl = "failInfo", yOe = [ + Qp, + nl, + rl ]; -var _o, Ak = (_o = class extends Ce { +var Lo, Ak = (Lo = class extends Ce { constructor(t = {}) { - super(), this.status = t[Yp] ?? _o.defaultValues(Yp), tl in t && (this.statusStrings = t[tl] ?? _o.defaultValues(tl)), nl in t && (this.failInfo = t[nl] ?? _o.defaultValues(nl)), t.schema && this.fromSchema(t.schema); + super(), this.status = t[Qp] ?? Lo.defaultValues(Qp), nl in t && (this.statusStrings = t[nl] ?? Lo.defaultValues(nl)), rl in t && (this.failInfo = t[rl] ?? Lo.defaultValues(rl)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case Yp: + case Qp: return 2; - case tl: - return []; case nl: - return new ht(); + return []; + case rl: + return new pt(); default: return super.defaultValues(t); } } static compareWithDefault(t, n) { switch (t) { - case Yp: - return n === _o.defaultValues(t); - case tl: - return n.length === 0; + case Qp: + return n === Lo.defaultValues(t); case nl: - return n.isEqual(_o.defaultValues(t)); + return n.length === 0; + case rl: + return n.isEqual(Lo.defaultValues(t)); default: return super.defaultValues(t); } @@ -67642,15 +67688,15 @@ var _o, Ak = (_o = class extends Ce { return new z({ name: n.blockName || "", value: [ - new de({ name: n.status || "" }), + new ue({ name: n.status || "" }), new z({ optional: !0, - value: [new ot({ + value: [new st({ name: n.statusStrings || "", value: new ki() })] }), - new ht({ + new pt({ name: n.failInfo || "", optional: !0 }) @@ -67659,19 +67705,19 @@ var _o, Ak = (_o = class extends Ce { } fromSchema(t) { for (const o of yOe) delete t[o]; - const n = Ee(t, t, _o.schema({ names: { - status: Yp, - statusStrings: tl, - failInfo: nl + const n = Ee(t, t, Lo.schema({ names: { + status: Qp, + statusStrings: nl, + failInfo: rl } })); ke.assertSchema(n, this.className); const r = n.result.status; if (r.valueBlock.isHexOnly === !0 || r.valueBlock.valueDec < 0 || r.valueBlock.valueDec > 5) throw new Error('PKIStatusInfo "status" has invalid value'); - this.status = r.valueBlock.valueDec, tl in n.result && (this.statusStrings = n.result.statusStrings), nl in n.result && (this.failInfo = n.result.failInfo); + this.status = r.valueBlock.valueDec, nl in n.result && (this.statusStrings = n.result.statusStrings), rl in n.result && (this.failInfo = n.result.failInfo); } toSchema() { const t = []; - return t.push(new de({ value: this.status })), this.statusStrings && t.push(new z({ + return t.push(new ue({ value: this.status })), this.statusStrings && t.push(new z({ optional: !0, value: this.statusStrings })), this.failInfo && t.push(this.failInfo), new z({ value: t }); @@ -67680,8 +67726,8 @@ var _o, Ak = (_o = class extends Ce { const t = { status: this.status }; return this.statusStrings && (t.statusStrings = Array.from(this.statusStrings, (n) => n.toJSON())), this.failInfo && (t.failInfo = this.failInfo.toJSON()), t; } -}, _o.CLASS_NAME = "PKIStatusInfo", _o); -const Fw = "version", Vw = "messageImprint", Qp = "reqPolicy", Xp = "nonce", Ji = "certReq", Zp = "extensions", Zf = "TimeStampReq", cP = `${Zf}.${Fw}`, lP = `${Zf}.${Vw}`, HA = `${Zf}.${Qp}`, zA = `${Zf}.${Xp}`, WA = `${Zf}.${Ji}`, qA = `${Zf}.${Zp}`, bOe = [ +}, Lo.CLASS_NAME = "PKIStatusInfo", Lo); +const Fw = "version", Vw = "messageImprint", Xp = "reqPolicy", Zp = "nonce", Ji = "certReq", eg = "extensions", th = "TimeStampReq", cP = `${th}.${Fw}`, lP = `${th}.${Vw}`, HA = `${th}.${Xp}`, zA = `${th}.${Zp}`, WA = `${th}.${Ji}`, qA = `${th}.${eg}`, bOe = [ cP, lP, HA, @@ -67689,9 +67735,9 @@ const Fw = "version", Vw = "messageImprint", Qp = "reqPolicy", Xp = "nonce", Ji WA, qA ]; -var rr, VDe = (rr = class extends Ce { +var or, VDe = (or = class extends Ce { constructor(t = {}) { - super(), this.version = t[Fw] ?? rr.defaultValues(Fw), this.messageImprint = t[Vw] ?? rr.defaultValues(Vw), Qp in t && (this.reqPolicy = t[Qp] ?? rr.defaultValues(Qp)), Xp in t && (this.nonce = t[Xp] ?? rr.defaultValues(Xp)), Ji in t && (this.certReq = t[Ji] ?? rr.defaultValues(Ji)), Zp in t && (this.extensions = t[Zp] ?? rr.defaultValues(Zp)), t.schema && this.fromSchema(t.schema); + super(), this.version = t[Fw] ?? or.defaultValues(Fw), this.messageImprint = t[Vw] ?? or.defaultValues(Vw), Xp in t && (this.reqPolicy = t[Xp] ?? or.defaultValues(Xp)), Zp in t && (this.nonce = t[Zp] ?? or.defaultValues(Zp)), Ji in t && (this.certReq = t[Ji] ?? or.defaultValues(Ji)), eg in t && (this.extensions = t[eg] ?? or.defaultValues(eg)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { @@ -67699,13 +67745,13 @@ var rr, VDe = (rr = class extends Ce { return 0; case Vw: return new Ms(); - case Qp: - return ""; case Xp: - return new de(); + return ""; + case Zp: + return new ue(); case Ji: return !1; - case Zp: + case eg: return []; default: return super.defaultValues(t); @@ -67714,14 +67760,14 @@ var rr, VDe = (rr = class extends Ce { static compareWithDefault(t, n) { switch (t) { case Fw: - case Qp: + case Xp: case Ji: - return n === rr.defaultValues(t); + return n === or.defaultValues(t); case Vw: return Ms.compareWithDefault("hashAlgorithm", n.hashAlgorithm) && Ms.compareWithDefault("hashedMessage", n.hashedMessage); - case Xp: - return n.isEqual(rr.defaultValues(t)); case Zp: + return n.isEqual(or.defaultValues(t)); + case eg: return n.length === 0; default: return super.defaultValues(t); @@ -67730,29 +67776,29 @@ var rr, VDe = (rr = class extends Ce { static schema(t = {}) { const n = t.names ?? {}; return new z({ - name: n.blockName || Zf, + name: n.blockName || th, value: [ - new de({ name: n.version || cP }), + new ue({ name: n.version || cP }), Ms.schema(n.messageImprint || { names: { blockName: lP } }), - new Ve({ + new $e({ name: n.reqPolicy || HA, optional: !0 }), - new de({ + new ue({ name: n.nonce || zA, optional: !0 }), - new Ql({ + new Xl({ name: n.certReq || WA, optional: !0 }), - new ee({ + new ne({ optional: !0, idBlock: { tagClass: 3, tagNumber: 0 }, - value: [new ot({ + value: [new st({ name: n.extensions || qA, value: Bn.schema() })] @@ -67762,12 +67808,12 @@ var rr, VDe = (rr = class extends Ce { } fromSchema(t) { for (const r of bOe) delete t[r]; - const n = Ee(t, t, rr.schema()); + const n = Ee(t, t, or.schema()); ke.assertSchema(n, this.className), this.version = n.result[cP].valueBlock.valueDec, this.messageImprint = new Ms({ schema: n.result[lP] }), HA in n.result && (this.reqPolicy = n.result[HA].valueBlock.toString()), zA in n.result && (this.nonce = n.result[zA]), WA in n.result && (this.certReq = n.result[WA].valueBlock.value), qA in n.result && (this.extensions = Array.from(n.result[qA], (r) => new Bn({ schema: r }))); } toSchema() { const t = []; - return t.push(new de({ value: this.version })), t.push(this.messageImprint.toSchema()), this.reqPolicy && t.push(new Ve({ value: this.reqPolicy })), this.nonce && t.push(this.nonce), Ji in this && rr.compareWithDefault(Ji, this.certReq) === !1 && t.push(new Ql({ value: this.certReq })), this.extensions && t.push(new ee({ + return t.push(new ue({ value: this.version })), t.push(this.messageImprint.toSchema()), this.reqPolicy && t.push(new $e({ value: this.reqPolicy })), this.nonce && t.push(this.nonce), Ji in this && or.compareWithDefault(Ji, this.certReq) === !1 && t.push(new Xl({ value: this.certReq })), this.extensions && t.push(new ne({ idBlock: { tagClass: 3, tagNumber: 0 @@ -67780,19 +67826,19 @@ var rr, VDe = (rr = class extends Ce { version: this.version, messageImprint: this.messageImprint.toJSON() }; - return this.reqPolicy !== void 0 && (t.reqPolicy = this.reqPolicy), this.nonce !== void 0 && (t.nonce = this.nonce.toJSON()), this.certReq !== void 0 && rr.compareWithDefault(Ji, this.certReq) === !1 && (t.certReq = this.certReq), this.extensions && (t.extensions = Array.from(this.extensions, (n) => n.toJSON())), t; + return this.reqPolicy !== void 0 && (t.reqPolicy = this.reqPolicy), this.nonce !== void 0 && (t.nonce = this.nonce.toJSON()), this.certReq !== void 0 && or.compareWithDefault(Ji, this.certReq) === !1 && (t.certReq = this.certReq), this.extensions && (t.extensions = Array.from(this.extensions, (n) => n.toJSON())), t; } -}, rr.CLASS_NAME = "TimeStampReq", rr); -const eg = "status", tg = "timeStampToken", bT = "TimeStampResp", uP = `${bT}.${eg}`, GA = `${bT}.${tg}`, wOe = [uP, GA]; +}, or.CLASS_NAME = "TimeStampReq", or); +const tg = "status", ng = "timeStampToken", bT = "TimeStampResp", uP = `${bT}.${tg}`, GA = `${bT}.${ng}`, wOe = [uP, GA]; var Ma, $De = (Ma = class extends Ce { constructor(t = {}) { - super(), this.status = t[eg] ?? Ma.defaultValues(eg), tg in t && (this.timeStampToken = t[tg] ?? Ma.defaultValues(tg)), t.schema && this.fromSchema(t.schema); + super(), this.status = t[tg] ?? Ma.defaultValues(tg), ng in t && (this.timeStampToken = t[ng] ?? Ma.defaultValues(ng)), t.schema && this.fromSchema(t.schema); } static defaultValues(t) { switch (t) { - case eg: - return new Ak(); case tg: + return new Ak(); + case ng: return new Yn(); default: return super.defaultValues(t); @@ -67800,9 +67846,9 @@ var Ma, $De = (Ma = class extends Ce { } static compareWithDefault(t, n) { switch (t) { - case eg: - return Ak.compareWithDefault(eg, n.status) && !("statusStrings" in n) && !("failInfo" in n); case tg: + return Ak.compareWithDefault(tg, n.status) && !("statusStrings" in n) && !("failInfo" in n); + case ng: return n.contentType === "" && n.content instanceof Xe; default: return super.defaultValues(t); @@ -67897,7 +67943,7 @@ const Oq = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ randomPositiveInteger: Nq, toArrayBuffer: X2, toHex: kOe -}, Symbol.toStringTag, { value: "Module" })), ln = { +}, Symbol.toStringTag, { value: "Module" })), un = { data: "1.2.840.113549.1.7.1", signedData: "1.2.840.113549.1.7.2", contentType: "1.2.840.113549.1.9.3", @@ -67956,15 +68002,15 @@ const Oq = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ /** `id-etsi-ext-valassured-ST-certs`, in ETSI's standard 319 412-1: a short-term certificate. */ validityAssuredShortTerm: "0.4.0.194121.2.1" }, UDe = { - [ln.sha1]: "sha1", - [ln.sha256]: "sha256", - [ln.sha384]: "sha384", - [ln.sha512]: "sha512" + [un.sha1]: "sha1", + [un.sha256]: "sha256", + [un.sha384]: "sha384", + [un.sha512]: "sha512" }, KDe = { - sha1: ln.sha1, - sha256: ln.sha256, - sha384: ln.sha384, - sha512: ln.sha512 + sha1: un.sha1, + sha256: un.sha256, + sha384: un.sha384, + sha512: un.sha512 }, Pq = { sha1: "SHA-1", sha256: "SHA-256", @@ -67985,11 +68031,11 @@ function Tq(e) { } function zDe(e) { const t = Tq(e); - return Rq(t) ? new W0({ valueDate: t }) : new Yt({ valueDate: t }); + return Rq(t) ? new W0({ valueDate: t }) : new Xt({ valueDate: t }); } function d0(e) { const t = Tq(e); - return new or({ type: Rq(t) ? 0 : 1, value: t }); + return new sr({ type: Rq(t) ? 0 : 1, value: t }); } function Z2(e) { const t = e.privateKey.algorithm; @@ -68033,7 +68079,7 @@ function H4(e) { } } async function WDe(e = {}) { - const { selfSignedCertificate: t } = await import("./self-signed-DIdbaT2K.js"), n = e.hash ?? "sha256", r = await Ig(e.algorithm ?? "RSA-PKCS1-v1_5", n, !0), o = await t({ + const { selfSignedCertificate: t } = await import("./self-signed-BsJCIg7s.js"), n = e.hash ?? "sha256", r = await Ng(e.algorithm ?? "RSA-PKCS1-v1_5", n, !0), o = await t({ publicKey: r.publicKey, privateKey: r.privateKey, commonName: e.commonName ?? "EmbedPDF test signer", @@ -68046,7 +68092,7 @@ async function WDe(e = {}) { }), certificate: o, privateKey: r.privateKey }; } async function qDe(e = {}) { - const { timestampAuthorityCertificate: t } = await import("./self-signed-DIdbaT2K.js"), n = await Ig("RSA-PKCS1-v1_5", "sha256", !0), r = await t({ + const { timestampAuthorityCertificate: t } = await import("./self-signed-BsJCIg7s.js"), n = await Ng("RSA-PKCS1-v1_5", "sha256", !0), r = await t({ publicKey: n.publicKey, privateKey: n.privateKey, commonName: e.commonName ?? "EmbedPDF test timestamp authority", @@ -68054,14 +68100,14 @@ async function qDe(e = {}) { }), o = Z2({ privateKey: n.privateKey, certificateChain: [r] - }), { buildTimestampToken: s } = await import("./timestamp-DdhyGESj.js").then((i) => i.t); + }), { buildTimestampToken: s } = await import("./timestamp-YjVubp40.js").then((i) => i.t); return { kind: "cms", certificate: r, sign: ({ digest: i, algorithm: a }) => s({ digest: i, hash: a, authority: o }) }; } -async function Ig(e, t, n) { +async function Ng(e, t, n) { return await globalThis.crypto.subtle.generateKey( e === "ECDSA" ? { name: "ECDSA", namedCurve: "P-256" } : { name: e === "RSA-PSS" ? "RSA-PSS" : "RSASSA-PKCS1-v1_5", @@ -68076,18 +68122,19 @@ async function Ig(e, t, n) { function GDe(e) { return { kind: "cms", + ...e.maxCmsBytes !== void 0 ? { maxCmsBytes: e.maxCmsBytes } : {}, sign: (t) => e.sign(t) }; } const AOe = 250; function JDe(e) { - const { url: t, policy: n, timeoutMs: r = 1e4, retries: o = 1 } = e, s = (l = {}) => ({ authority: t, ...l }), i = (l, u, d) => new J(q.SignatureRefused, l, { details: s(u), cause: d }), a = (l, u) => i(`the timestamp authority at ${t} ${u}`, { reason: l }); + const { url: t, policy: n, timeoutMs: r = 1e4, retries: o = 1 } = e, s = (l = {}) => ({ authority: t, ...l }), i = (l, u, f) => new J(q.SignatureRefused, l, { details: s(u), cause: f }), a = (l, u) => i(`the timestamp authority at ${t} ${u}`, { reason: l }); async function c(l) { - const u = e.fetch ?? globalThis.fetch, d = (g, p) => new J( + const u = e.fetch ?? globalThis.fetch, f = (g, p) => new J( q.Network, `the timestamp authority at ${t} did not answer: ${g}`, { details: s(), cause: p } - ), f = new AbortController(), h = setTimeout(() => f.abort(), r); + ), d = new AbortController(), h = setTimeout(() => d.abort(), r); try { let g; try { @@ -68095,15 +68142,15 @@ function JDe(e) { method: "POST", headers: { "content-type": "application/timestamp-query", ...e.headers }, body: new Uint8Array(l), - signal: f.signal + signal: d.signal }); } catch (p) { - if (f.signal.aborted) throw d(`no reply within ${r} ms`, p); + if (d.signal.aborted) throw f(`no reply within ${r} ms`, p); const m = "document" in globalThis ? ". In a browser most authorities cannot be called directly: call yours through a route on your own server" : ""; - throw d(`${p.message}${m}`, p); + throw f(`${p.message}${m}`, p); } if (g.status >= 500 || g.status === 429) - throw d(`HTTP ${g.status}`); + throw f(`HTTP ${g.status}`); if (!g.ok) throw i( `the timestamp authority at ${t} refused the request: HTTP ${g.status}`, @@ -68112,8 +68159,8 @@ function JDe(e) { try { return new Uint8Array(await g.arrayBuffer()); } catch (p) { - throw d( - f.signal.aborted ? `no reply within ${r} ms` : `the reply broke off: ${p.message}`, + throw f( + d.signal.aborted ? `no reply within ${r} ms` : `the reply broke off: ${p.message}`, p ); } @@ -68124,19 +68171,20 @@ function JDe(e) { return { kind: "cms", hash: e.hash ?? "sha256", - async sign({ digest: l, algorithm: u, subFilter: d }) { - if (d !== "ETSI.RFC3161") + ...e.maxCmsBytes !== void 0 ? { maxCmsBytes: e.maxCmsBytes } : {}, + async sign({ digest: l, algorithm: u, subFilter: f }) { + if (f !== "ETSI.RFC3161") throw new J( q.InvalidArg, "a timestamp authority can't sign a document: pass it as `timestampAuthority`, or sign with `kind: 'timestamp'`", { details: s() } ); - const [f, h, g, p] = await Promise.all([ - import("./timestamp-protocol-DQ1E-rny.js"), - import("./parse-Cv_kCMGz.js"), - import("./timestamp-DdhyGESj.js").then((N) => N.t), + const [d, h, g, p] = await Promise.all([ + import("./timestamp-protocol-C2RoyYm6.js"), + import("./parse-BNZey3Fv.js"), + import("./timestamp-YjVubp40.js").then((N) => N.t), Promise.resolve().then(() => Oq) - ]), m = p.randomPositiveInteger(), v = f.buildTimestampRequest({ digest: l, algorithm: u, policy: n, nonce: m }); + ]), m = p.randomPositiveInteger(), v = d.buildTimestampRequest({ digest: l, algorithm: u, policy: n, nonce: m }); let S; for (let N = 0; ; N++) try { @@ -68148,7 +68196,7 @@ function JDe(e) { } let C; try { - C = f.readTimestampResponse(S); + C = d.readTimestampResponse(S); } catch (N) { throw i( `the timestamp authority at ${t} sent a reply that can't be read: ${N.message}`, @@ -68203,7 +68251,7 @@ async function YDe(e) { const n = e.hash ?? "sha256"; let r = await e.store.load(e.subject); if (!r) { - const { selfSignedCertificate: s } = await import("./self-signed-DIdbaT2K.js"), i = await Ig(e.algorithm ?? "RSA-PKCS1-v1_5", n, !1), a = await s({ + const { selfSignedCertificate: s } = await import("./self-signed-BsJCIg7s.js"), i = await Ng(e.algorithm ?? "RSA-PKCS1-v1_5", n, !1), a = await s({ publicKey: i.publicKey, privateKey: i.privateKey, commonName: e.subject, @@ -68240,8 +68288,8 @@ function XDe(e, t = {}) { })), r), s = async (i, a) => { const c = await o(); return new Promise((l, u) => { - const d = c.transaction(n, i), f = a(d.objectStore(n)); - f.onsuccess = () => l(f.result), f.onerror = () => u(f.error ?? new Error("indexedDB request failed")); + const f = c.transaction(n, i), d = a(f.objectStore(n)); + d.onsuccess = () => l(d.result), d.onerror = () => u(d.error ?? new Error("indexedDB request failed")); }); }; return { @@ -68269,9 +68317,9 @@ function xI(...e) { for (const r of e) t |= 128 >> r; const n = 7 - Math.max(...e); return new Bn({ - extnID: ln.keyUsage, + extnID: un.keyUsage, critical: !0, - extnValue: new ht({ + extnValue: new pt({ valueHex: new Uint8Array([t]).buffer, unusedBits: n }).toBER(!1) @@ -68281,59 +68329,59 @@ const EI = 0, xOe = 1, EOe = 5, COe = 6; async function CI(e) { $v(); const t = new Mr(); - t.version = 2, t.serialNumber = new de({ + t.version = 2, t.serialNumber = new ue({ valueHex: X2(Nq()) }), t.subject.typesAndValues.push( new xO({ - type: ln.commonName, + type: un.commonName, value: new ki({ value: e.commonName }) }) ), t.issuer = e.issuer ? e.issuer.certificate.subject : t.subject, t.notBefore = d0(e.notBefore ?? new Date(Date.now() - f0)), t.notAfter = d0(e.notAfter ?? new Date(Date.now() + 365 * f0)); const n = e.kind === "authority", r = new aT({ cA: n }); if (t.extensions = [ new Bn({ - extnID: ln.basicConstraints, + extnID: un.basicConstraints, critical: !0, extnValue: r.toSchema().toBER(!1), parsedValue: r }), n ? xI(EI, EOe, COe) : e.kind === "signer" ? xI(EI, xOe) : xI(EI) ], e.kind === "responder") { - const c = new sx({ keyPurposes: [ln.ocspSigning] }); + const c = new sx({ keyPurposes: [un.ocspSigning] }); t.extensions.push( new Bn({ - extnID: ln.extendedKeyUsage, + extnID: un.extendedKeyUsage, critical: !1, extnValue: c.toSchema().toBER(!1), parsedValue: c }), new Bn({ - extnID: ln.ocspNoCheck, + extnID: un.ocspNoCheck, critical: !1, - extnValue: new fn().toBER(!1) + extnValue: new hn().toBER(!1) }) ); } e.unrevocable && t.extensions.push( new Bn({ - extnID: e.unrevocable === "no-rev-avail" ? ln.noRevAvail : ln.validityAssuredShortTerm, + extnID: e.unrevocable === "no-rev-avail" ? un.noRevAvail : un.validityAssuredShortTerm, critical: !1, - extnValue: new fn().toBER(!1) + extnValue: new hn().toBER(!1) }) ); const { ocsp: o, crl: s, issuer: i } = e.addresses ?? {}; if (o || i) { - const c = (u) => new Dt({ type: 6, value: u }), l = new PO({ + const c = (u) => new Vt({ type: 6, value: u }), l = new PO({ accessDescriptions: [ ...o ? [ new ox({ - accessMethod: ln.accessOcsp, + accessMethod: un.accessOcsp, accessLocation: c(o) }) ] : [], ...i ? [ new ox({ - accessMethod: ln.accessIssuers, + accessMethod: un.accessIssuers, accessLocation: c(i) }) ] : [] @@ -68341,7 +68389,7 @@ async function CI(e) { }); t.extensions.push( new Bn({ - extnID: ln.authorityInfoAccess, + extnID: un.authorityInfoAccess, critical: !1, extnValue: l.toSchema().toBER(!1), parsedValue: l @@ -68352,13 +68400,13 @@ async function CI(e) { const c = new OO({ distributionPoints: [ new NO({ - distributionPoint: [new Dt({ type: 6, value: s })] + distributionPoint: [new Vt({ type: 6, value: s })] }) ] }); t.extensions.push( new Bn({ - extnID: ln.crlDistributionPoints, + extnID: un.crlDistributionPoints, critical: !1, extnValue: c.toSchema().toBER(!1), parsedValue: c @@ -68373,18 +68421,18 @@ async function CI(e) { async function IOe(e) { const t = $v(); let n = e.asked; - n || (n = new zr(), await n.createForCertificate(e.certificate, { + n || (n = new Wr(), await n.createForCertificate(e.certificate, { hashAlgorithm: e.idHash ?? "SHA-1", issuerCertificate: e.issuer })); - const r = (u) => ({ tagClass: 3, tagNumber: u }), o = e.status === "good" ? new Je({ idBlock: r(0) }) : e.status === "unknown" ? new Je({ idBlock: r(2) }) : new ee({ + const r = (u) => ({ tagClass: 3, tagNumber: u }), o = e.status === "good" ? new Je({ idBlock: r(0) }) : e.status === "unknown" ? new Je({ idBlock: r(2) }) : new ne({ idBlock: r(1), value: [ - new Yt({ valueDate: e.status.revokedAt }), + new Xt({ valueDate: e.status.revokedAt }), ...e.status.reason ? [ - new ee({ + new ne({ idBlock: r(0), - value: [new Df({ value: Mq[e.status.reason] })] + value: [new Ff({ value: Mq[e.status.reason] })] }) ] : [] ] @@ -68403,8 +68451,8 @@ async function IOe(e) { new Uint8Array(e.issuer.toSchema(!0).toBER(!1)) ) || (i.certs = [a]), await i.sign(e.signer.privateKey, "SHA-256"); const l = new lOe(); - return l.responseStatus.valueBlock.valueDec = 0, l.responseBytes = new Vp({ - responseType: ln.ocspBasic, + return l.responseStatus.valueBlock.valueDec = 0, l.responseBytes = new $p({ + responseType: un.ocspBasic, response: new Oe({ valueHex: i.toSchema().toBER(!1) }) }), new Uint8Array(l.toSchema().toBER(!1)); } @@ -68419,9 +68467,9 @@ async function NOe(e) { crlEntryExtensions: new jn({ extensions: [ new Bn({ - extnID: ln.crlReason, + extnID: un.crlReason, critical: !1, - extnValue: new Df({ + extnValue: new Ff({ value: Mq[n.reason] }).toBER(!1) }) @@ -68432,9 +68480,9 @@ async function NOe(e) { )), t.crlExtensions = new jn({ extensions: [ new Bn({ - extnID: ln.crlNumber, + extnID: un.crlNumber, critical: !1, - extnValue: new de({ value: 1 }).toBER(!1) + extnValue: new ue({ value: 1 }).toBER(!1) }), ...e.extensions ?? [] ] @@ -68445,7 +68493,7 @@ async function ZDe(e = {}) { const t = e.now ?? (() => /* @__PURE__ */ new Date()), n = (e.url ?? "http://test-authority.example").replace(/\/$/, ""), r = { ocsp: `${n}/ocsp`, crl: `${n}/crl`, issuer: `${n}/issuer` }, o = e.commonName ?? "EmbedPDF test certificate authority", s = () => ({ notBefore: new Date(t().getTime() - f0), notAfter: new Date(t().getTime() + 365 * f0) - }), i = await Ig("RSA-PKCS1-v1_5", "sha256", !0), a = { + }), i = await Ng("RSA-PKCS1-v1_5", "sha256", !0), a = { certificate: await CI({ kind: "authority", commonName: o, @@ -68454,7 +68502,7 @@ async function ZDe(e = {}) { ...s() }), privateKey: i.privateKey - }, c = await Ig("RSA-PKCS1-v1_5", "sha256", !0), l = { + }, c = await Ng("RSA-PKCS1-v1_5", "sha256", !0), l = { certificate: await CI({ kind: "responder", commonName: `${o} (OCSP responder)`, @@ -68463,11 +68511,11 @@ async function ZDe(e = {}) { ...s() }), privateKey: c.privateKey - }, u = (S) => new Uint8Array(S.toSchema(!0).toBER(!1)), d = u(a.certificate), f = [], h = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Map(), p = (S) => new Uint8Array(S.serialNumber.valueBlock.valueHexView), m = (S) => f.find((C) => wx(p(C), S)) ?? null; + }, u = (S) => new Uint8Array(S.toSchema(!0).toBER(!1)), f = u(a.certificate), d = [], h = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Map(), p = (S) => new Uint8Array(S.serialNumber.valueBlock.valueHexView), m = (S) => d.find((C) => wx(p(C), S)) ?? null; return { - certificate: d, + certificate: f, async issueSigner(S = {}) { - const C = S.hash ?? "sha256", k = await Ig( + const C = S.hash ?? "sha256", k = await Ng( S.algorithm ?? "RSA-PKCS1-v1_5", C, !0 @@ -68481,18 +68529,18 @@ async function ZDe(e = {}) { ...N ? { unrevocable: N } : {}, ...s() }); - f.push(w), N && h.add(w); + d.push(w), N && h.add(w); const y = u(w); return { ...Z2({ privateKey: k.privateKey, - certificateChain: [y, d], + certificateChain: [y, f], hash: C }), certificate: y, privateKey: k.privateKey }; }, revocation: { fetch: async (S) => { if (!S.url.startsWith(n)) throw new Error(`the test certificate authority does not answer at ${S.url}`); - if (S.kind === "issuer") return d; + if (S.kind === "issuer") return f; if (S.kind === "crl") return NOe({ issuer: a, @@ -68504,7 +68552,7 @@ async function ZDe(e = {}) { reason: x.reason })) }); - const C = hn(X2(S.body)); + const C = pn(X2(S.body)); if (C.offset === -1) throw new Error("the OCSP request is not valid DER"); const k = new aOe({ schema: C.result }).tbsRequest.requestList[0]; if (!k) throw new Error("the OCSP request asks about no certificate"); @@ -68525,7 +68573,7 @@ async function ZDe(e = {}) { }); } }, revoke(S, C = {}) { - const k = S instanceof Uint8Array ? S : S.certificate, N = f.find((w) => wx(u(w), k)); + const k = S instanceof Uint8Array ? S : S.certificate, N = d.find((w) => wx(u(w), k)); if (!N) throw new Error("the test certificate authority did not issue this certificate"); if (h.has(N)) @@ -68541,23 +68589,23 @@ const OOe = 250; function e8e(e) { const { url: t, timeoutMs: n = 1e4, retries: r = 1 } = e; async function o(s) { - const i = e.fetch ?? globalThis.fetch, a = (f = {}) => ({ + const i = e.fetch ?? globalThis.fetch, a = (d = {}) => ({ source: s.url, route: t, - ...f - }), c = (f, h) => new J( + ...d + }), c = (d, h) => new J( q.Network, - `${s.url} did not answer through ${t}: ${f}`, + `${s.url} did not answer through ${t}: ${d}`, { details: a(), cause: h } ), l = { kind: s.kind, url: s.url, ...s.kind === "ocsp" ? { body: ROe(s.body) } : {} - }, u = new AbortController(), d = setTimeout(() => u.abort(), n); + }, u = new AbortController(), f = setTimeout(() => u.abort(), n); try { - let f; + let d; try { - f = await i(t, { + d = await i(t, { method: "POST", headers: { "content-type": "application/json", ...e.headers }, body: JSON.stringify(l), @@ -68566,18 +68614,18 @@ function e8e(e) { } catch (h) { throw u.signal.aborted ? c(`no reply within ${n} ms`, h) : c(h.message, h); } - if (f.status >= 500 || f.status === 429) - throw c(`HTTP ${f.status}${await POe(f)}`); - if (!f.ok) { - const h = await Bq(f); + if (d.status >= 500 || d.status === 429) + throw c(`HTTP ${d.status}${await POe(d)}`); + if (!d.ok) { + const h = await Bq(d); throw new J( q.SignatureRefused, - `the route at ${t} refused to ask ${s.url}: ${h.message ?? `HTTP ${f.status}`}`, - { details: a({ httpStatus: f.status, reason: h.reason }) } + `the route at ${t} refused to ask ${s.url}: ${h.message ?? `HTTP ${d.status}`}`, + { details: a({ httpStatus: d.status, reason: h.reason }) } ); } try { - return new Uint8Array(await f.arrayBuffer()); + return new Uint8Array(await d.arrayBuffer()); } catch (h) { throw c( u.signal.aborted ? `no reply within ${n} ms` : `the reply broke off: ${h.message}`, @@ -68585,7 +68633,7 @@ function e8e(e) { ); } } finally { - clearTimeout(d); + clearTimeout(f); } } return { @@ -68623,7 +68671,7 @@ function ROe(e) { function t8e() { return bt(vs); } -const n8e = wo(zxe); +const n8e = vo(zxe); function Sk(e, t) { hR(vs, e, t); } @@ -68687,7 +68735,7 @@ function LOe(e) { name: "links", load: async (g, p) => { if (!e.getPage(p)) - throw new re( + throw new te( "not-found", "link", `page ${p.objectNumber} is not in this document` @@ -68718,7 +68766,7 @@ function LOe(e) { const v = c(g); switch (v.kind) { case "destination": { - const S = p?.stage ?? e.tryGet(Zt); + const S = p?.stage ?? e.tryGet(tn); return S ? (S.goToDestination(v.destination), { status: "revealed" }) : { status: "destination", destination: v.destination }; } case "uri": { @@ -68733,7 +68781,7 @@ function LOe(e) { }, u = (g, p) => { const m = II(g) ? g.target : g, v = II(g) ? { activate: g.activate, ref: g.ref, ...p } : p, S = l(m, v); return n.emit({ target: m, activation: S }), S; - }, d = (g, p) => { + }, f = (g, p) => { let m = null; for (const v of s(g)) BOe(v.bounds, p) && (!m || v.bounds.width * v.bounds.height < m.bounds.width * m.bounds.height) && (m = v); @@ -68743,7 +68791,7 @@ function LOe(e) { api: { listLinks: s, getLink: (g, p) => s(g).find((m) => m.id === p) ?? null, - getLinkAt: d, + getLinkAt: f, readAllLinks: async (g) => { const p = e.document()?.pages ?? []; return await e.cancellable( @@ -68763,7 +68811,7 @@ function LOe(e) { resolve: c, activate: u, activateAt: (g, p, m) => { - const v = e.pageOf(g).ref, S = d(v, p); + const v = e.pageOf(g).ref, S = f(v, p); return S ? u(S, { page: v, ...m }) : null; }, getLabel: (g) => { @@ -68792,12 +68840,12 @@ function LOe(e) { } }; } -const wT = Pf, DOe = () => ({ +const wT = Tf, DOe = () => ({ id: "link", token: wT, scope: "document", requires: [yr], - optional: [Zt, vt, Lr], + optional: [tn, vt, Lr], create: LOe }); function jOe({ @@ -68811,13 +68859,13 @@ function jOe({ ), /* @__PURE__ */ P("a", { ref: n, ...t }); } function FOe() { - const e = Rt(wT); + const e = Bt(wT); Ke(() => e?.registerUriOpener(Rse), [e]); } function VOe({ renderLink: e } = {}) { - const t = qo(), n = bt(Pf); + const t = Go(), n = bt(Tf); FOe(); - const r = Rt(Uf()), o = Rt(Lr), s = ft(() => o ? gR(o.dispatch) : null, [o]), i = wt(Pf, (u) => u.listLinks(t.ref), pi), a = wt(wT, (u) => u.isNavigationEngaged()), c = zt( + const r = Bt(Hf()), o = Bt(Lr), s = ft(() => o ? gR(o.dispatch) : null, [o]), i = wt(Tf, (u) => u.listLinks(t.ref), pi), a = wt(wT, (u) => u.isNavigationEngaged()), c = Gt( Cn, (u) => u.activeToolEnables("annotation-edit"), !1 @@ -68827,7 +68875,7 @@ function VOe({ renderLink: e } = {}) { }, [n, t.ref]), !a || !i.length) return null; const l = eae(i, c); return l.length ? /* @__PURE__ */ P("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: l.map((u) => { - const { box: d, href: f, label: h } = nae( + const { box: f, href: d, label: h } = nae( u, t.transform, (v) => n.getLabel(v) @@ -68835,7 +68883,7 @@ function VOe({ renderLink: e } = {}) { jOe, { onPress: () => k1(o, u, t.ref, "mouseDown"), - href: f ?? void 0, + href: d ?? void 0, target: "_blank", rel: "noopener noreferrer", role: "link", @@ -68843,7 +68891,7 @@ function VOe({ renderLink: e } = {}) { title: h, "aria-label": h, onClick: (v) => { - f && rae(v) || (v.preventDefault(), n.activate(u, g)); + d && rae(v) || (v.preventDefault(), n.activate(u, g)); }, onKeyDown: (v) => { (v.key === "Enter" || v.key === " ") && (v.preventDefault(), n.activate(u, g)); @@ -68855,10 +68903,10 @@ function VOe({ renderLink: e } = {}) { onBlur: () => k1(o, u, t.ref, "blur"), style: { position: "absolute", - left: d.left, - top: d.top, - width: d.width, - height: d.height, + left: f.left, + top: f.top, + width: f.width, + height: f.height, cursor: "pointer", pointerEvents: "auto" } @@ -68979,14 +69027,14 @@ function qOe(e, t, n, r) { return; } s.add(l), u().then( - (d) => { - s.delete(l), e.state.update(HOe, l, d), i(); + (f) => { + s.delete(l), e.state.update(HOe, l, f), i(); }, - (d) => { - s.delete(l), e.state.update(dP, l), e.state.update(q4, l), r(l, d), n.settle(l, { + (f) => { + s.delete(l), e.state.update(dP, l), e.state.update(q4, l), r(l, f), n.settle(l, { ok: !1, - error: new re("operation-failed", "i18n", `locale '${l}' failed to load`, { - details: Br(qe("i18n", d)) + error: new te("operation-failed", "i18n", `locale '${l}' failed to load`, { + details: Br(ze("i18n", f)) }) }), i(); } @@ -69727,7 +69775,7 @@ function ej(e, t, n) { const r = n?.params, o = n?.fallbackKey, s = (a) => Z4(e, a, t, r) ?? (o === void 0 ? void 0 : Z4(e, a, o, r)), i = s(e.locale) ?? s(e.fallbackLocale); return i !== void 0 ? { text: PN(i, n?.params), found: !0 } : n?.fallback !== void 0 ? { text: PN(n.fallback, n.params), found: !1 } : { text: t, found: !1 }; } -const tj = (e) => new re("not-found", "i18n", `unknown locale '${e}': not loaded and not in loaders`); +const tj = (e) => new te("not-found", "i18n", `unknown locale '${e}': not loaded and not in loaders`); function sPe(e) { const t = e.settings(), n = e.events.source(), r = e.events.source(), o = () => e.state.get(); e.state.update(UOe, t.get()); @@ -69760,35 +69808,35 @@ function sPe(e) { S[w] || N.push({ code: w, name: w, direction: "ltr", loaded: !1 }); return N; } - ), d = /* @__PURE__ */ new Map(), f = (S, C) => { - const k = d.get(S); - k && (d.delete(S), C.ok ? k.resolve() : k.reject(C.error)); + ), f = /* @__PURE__ */ new Map(), d = (S, C) => { + const k = f.get(S); + k && (f.delete(S), C.ok ? k.resolve() : k.reject(C.error)); }, h = () => { - for (const [S, C] of d) - d.delete(S), C.reject( - new re("operation-cancelled", "i18n", `switching to '${S}' was replaced`) + for (const [S, C] of f) + f.delete(S), C.reject( + new te("operation-cancelled", "i18n", `switching to '${S}' was replaced`) ); }, g = qOe( e, t, - { settle: f }, - (S, C) => r.emit({ locale: S, error: Br(qe("i18n", C)) }) + { settle: d }, + (S, C) => r.emit({ locale: S, error: Br(ze("i18n", C)) }) ), p = (S, C = {}) => { const { signal: k } = C; if (k?.aborted) - return Promise.reject(new re("operation-cancelled", "i18n", "operation cancelled")); + return Promise.reject(new te("operation-cancelled", "i18n", "operation cancelled")); if (kT(o(), t.get().loaders, S)) return h(), e.state.update(jq, S), Promise.resolve(); if (!o().locales[S] && !t.get().loaders[S]) return Promise.reject(tj(S)); h(); const N = new Promise((w, y) => { - d.set(S, { resolve: w, reject: y }), e.state.update(WOe, S); + f.set(S, { resolve: w, reject: y }), e.state.update(WOe, S); }); return k?.addEventListener( "abort", () => { - d.delete(S) && e.state.update(dP, S); + f.delete(S) && e.state.update(dP, S); }, { once: !0 } ), e.cancellable(k, N); @@ -69804,7 +69852,7 @@ function sPe(e) { if ((k.includes("fallbackLocale") || k.includes("loaders")) && e.state.update(Lq, C), k.includes("locale")) { const N = C.locale ?? C.fallbackLocale; p(N).catch((w) => { - pr(w, "not-found") && console.warn(`[i18n] ${w.message}`); + Xn(w, "not-found") && console.warn(`[i18n] ${w.message}`); }); } S = C; @@ -69837,11 +69885,11 @@ function sPe(e) { const iPe = (e) => ({ id: "i18n", scope: "workspace", - token: vo, + token: ko, state: $Oe, settings: { defaults: Ade, registered: e }, create: sPe -}), aPe = wr(vo, { +}), aPe = wr(ko, { read: (e) => ({ locale: e.getLocale(), direction: e.getDirection(), @@ -69849,13 +69897,13 @@ const iPe = (e) => ({ loading: e.getLoadingLocale() }), empty: { locale: "en", direction: "ltr", locales: [], loading: null } -}), kx = wo(aPe); -function Tt() { - return wt(vo, (e) => e.getTranslator()); +}), kx = vo(aPe); +function _t() { + return wt(ko, (e) => e.getTranslator()); } -const dt = sn("shell", { +const dt = an("shell", { hint: "add shellPlugin() from '@embedpdf/plugin-shell' to your plugins list" -}), h0 = 5, Vq = 3, cPe = ["icon"], lPe = ["default"], ST = (e) => e.kind === "custom" && e.terminal === null, Sm = (e) => e.kind === "command" ? e.command : e.terminal; +}), h0 = 5, Vq = 3, cPe = ["icon"], lPe = ["default"], ST = (e) => e.kind === "custom" && e.terminal === null, xm = (e) => e.kind === "command" ? e.command : e.terminal; function uPe(e, t, n) { const r = typeof t == "string" ? { command: t } : t, o = r.importance ?? e.importance ?? Vq, s = "slot" in r ? { kind: "custom", @@ -69967,13 +70015,13 @@ function Kq(e, t) { function ET(e, t) { const n = ([o, s]) => ET(o, s.length > 0 ? [...t, ...s] : t), r = Object.freeze({ place: (o, s) => n(mPe(e, o, s)), - addBar: (o, s) => n([Ko(e, "bars", o, s), []]), + addBar: (o, s) => n([Ho(e, "bars", o, s), []]), removeBar: (o) => n(yPe(e, typeof o == "string" ? [o] : o)), add: (o, s) => n(bPe(e, o, s)), remove: (o, s) => n(kPe(e, typeof o == "string" ? [o] : o, s)), replace: (o, s) => n(APe(e, o, s)), - addMenu: (o, s) => n([Ko(e, "menus", o, s), []]), - addPanel: (o, s) => n([Ko(e, "panels", o, s), []]), + addMenu: (o, s) => n([Ho(e, "menus", o, s), []]), + addPanel: (o, s) => n([Ho(e, "panels", o, s), []]), panel: (o, s) => n(SPe(e, o, s)), panels: (o) => n([xPe(e, o), []]), removePanel: (o) => n(EPe(e, o)), @@ -69982,13 +70030,13 @@ function ET(e, t) { }); return tE.set(r, { data: e, warnings: t }), r; } -const Il = ["start", "center", "end"], xm = (e) => typeof e == "object" && e !== null && !Array.isArray(e) && "items" in e; -function zd(e, t) { +const Nl = ["start", "center", "end"], Em = (e) => typeof e == "object" && e !== null && !Array.isArray(e) && "items" in e; +function qd(e, t) { const n = e[t]; return Array.isArray(n) ? n : []; } function Ai(e) { - return Array.isArray(e) ? e : xm(e) ? Array.isArray(e.items) ? e.items : [] : [e]; + return Array.isArray(e) ? e : Em(e) ? Array.isArray(e.items) ? e.items : [] : [e]; } function yi(e) { return typeof e == "string" ? e : typeof e != "object" || e === null ? "" : "custom" in e ? e.custom : e.command; @@ -69996,7 +70044,7 @@ function yi(e) { function pPe(e) { return typeof e == "string" ? e : typeof e != "object" || e === null ? null : "custom" in e ? e.command ?? null : e.command; } -function Jm(e) { +function Ym(e) { if (typeof e == "string") return e.length > 0; if (typeof e != "object" || e === null || Array.isArray(e)) return !1; const t = e; @@ -70010,20 +70058,20 @@ function Hq(e) { } function Q0(e) { const t = /* @__PURE__ */ new Set(); - for (const n of Il) - for (const r of zd(e, n)) - for (const o of Ai(r)) Jm(o) && t.add(yi(o)); + for (const n of Nl) + for (const r of qd(e, n)) + for (const o of Ai(r)) Ym(o) && t.add(yi(o)); return [...t]; } -function Xl(e) { +function Zl(e) { if (Array.isArray(e)) return e; const t = e?.items; return Array.isArray(t) ? t : []; } -const jf = (e) => Array.isArray(e) ? e : [], Em = (e) => [ - ...new Set(jf(e).flatMap((t) => Xl(t))) -], As = (e) => e.bars ?? {}, Ff = (e) => e.menus ?? {}, X0 = (e) => e.panels ?? {}; -function Ko(e, t, n, r) { +const Vf = (e) => Array.isArray(e) ? e : [], Cm = (e) => [ + ...new Set(Vf(e).flatMap((t) => Zl(t))) +], As = (e) => e.bars ?? {}, $f = (e) => e.menus ?? {}, X0 = (e) => e.panels ?? {}; +function Ho(e, t, n, r) { return { ...e, [t]: { ...e[t], [n]: r } }; } function gPe(e, t, n) { @@ -70031,14 +70079,14 @@ function gPe(e, t, n) { return { ...e, [t]: o }; } function Z0(e, t) { - return t.length === 0 ? Ai(e).length === 0 ? e : null : xm(e) ? { ...e, items: t } : Array.isArray(e) ? t : t.length === 1 ? t[0] : t; + return t.length === 0 ? Ai(e).length === 0 ? e : null : Em(e) ? { ...e, items: t } : Array.isArray(e) ? t : t.length === 1 ? t[0] : t; } function ev(e, t) { const n = {}; - for (const a of Il) { - const c = zd(e, a); + for (const a of Nl) { + const c = qd(e, a); if (c.length === 0) continue; - const l = c.map((u, d) => t(u, a, d)).filter((u) => u !== null); + const l = c.map((u, f) => t(u, a, f)).filter((u) => u !== null); l.length > 0 && (n[a] = l); } const { start: r, center: o, end: s, ...i } = e; @@ -70050,7 +70098,7 @@ function nE(e, t) { const Ax = (e, t, n, r) => `${e}: "${t}" is not in "${n}"${gr(t, r)}`; function mPe(e, t, n) { const r = As(e)[t]; - return r ? [Ko(e, "bars", t, { ...r, place: n }), []] : [e, [`place: no bar "${t}"${gr(t, Object.keys(As(e)))}`]]; + return r ? [Ho(e, "bars", t, { ...r, place: n }), []] : [e, [`place: no bar "${t}"${gr(t, Object.keys(As(e)))}`]]; } function zq(e, t) { const n = As(e), r = new Set(t.filter((s) => n[s] !== void 0)); @@ -70073,21 +70121,21 @@ function yPe(e, t) { ]; } function bPe(e, t, n) { - if (!Jm(t)) return [e, [`add: ${JSON.stringify(t)} is not an item`]]; + if (!Ym(t)) return [e, [`add: ${JSON.stringify(t)} is not an item`]]; const r = n?.to; if (!r) return [e, [`add: "${yi(t)}" needs a bar or menu to go to ({ to })`]]; const o = As(e)[r]; if (o) return wPe(e, r, o, t, n); - const s = Ff(e)[r]; + const s = $f(e)[r]; if (s) return vPe(e, r, s, t, n); - const i = [...Object.keys(As(e)), ...Object.keys(Ff(e))]; + const i = [...Object.keys(As(e)), ...Object.keys($f(e))]; return [e, [`add: no bar or menu "${r}"${gr(r, i)}`]]; } function wPe(e, t, n, r, o) { const s = yi(r), i = [], a = (h) => h.some((g) => yi(g) === s), c = `add: "${s}" is already in that group of "${t}"`, l = o.before ?? o.after; if (l !== void 0) { - for (const h of Il) { - const g = zd(n, h); + for (const h of Nl) { + const g = qd(n, h); for (let p = 0; p < g.length; p++) { const m = Ai(g[p]), v = m.findIndex((N) => yi(N) === l); if (v === -1) continue; @@ -70096,15 +70144,15 @@ function wPe(e, t, n, r, o) { n, (N, w, y) => w === h && y === p ? Z0(N, C) : N ); - return [Ko(e, "bars", t, k), []]; + return [Ho(e, "bars", t, k), []]; } } i.push(Ax("add", l, t, Q0(n))); } if (o.group !== void 0) - for (const h of Il) { - const g = zd(n, h), p = g.findIndex( - (S) => xm(S) && S.id === o.group + for (const h of Nl) { + const g = qd(n, h), p = g.findIndex( + (S) => Em(S) && S.id === o.group ); if (p === -1) continue; const m = Ai(g[p]); @@ -70113,31 +70161,31 @@ function wPe(e, t, n, r, o) { n, (S, C, k) => C === h && k === p ? Z0(S, [...m, r]) : S ); - return [Ko(e, "bars", t, v), i]; + return [Ho(e, "bars", t, v), i]; } let u = o.section ?? "end"; - Il.includes(u) || (i.push(`add: "${u}" is not a section (start, center or end); using "end"`), u = "end"); - const d = o.group !== void 0 ? { id: o.group, items: [r] } : [r], f = { ...n, [u]: [...zd(n, u), d] }; - return [Ko(e, "bars", t, f), i]; + Nl.includes(u) || (i.push(`add: "${u}" is not a section (start, center or end); using "end"`), u = "end"); + const f = o.group !== void 0 ? { id: o.group, items: [r] } : [r], d = { ...n, [u]: [...qd(n, u), f] }; + return [Ho(e, "bars", t, d), i]; } function vPe(e, t, n, r, o) { const s = typeof r == "string" ? r : "custom" in r ? null : r.command; if (s === null) return [e, [`add: "${t}" is a menu, which holds commands, not your own components`]]; - if (Em(n).includes(s)) + if (Cm(n).includes(s)) return [e, [`add: "${s}" is already in "${t}"`]]; const i = [], a = o.before ?? o.after; if (a !== void 0) { - const c = jf(n), l = c.findIndex((u) => Xl(u).includes(a)); + const c = Vf(n), l = c.findIndex((u) => Zl(u).includes(a)); if (l !== -1) { - const u = Xl(c[l]), d = u.indexOf(a), f = o.before !== void 0 ? d : d + 1, h = [...u.slice(0, f), s, ...u.slice(f)], g = c.map( + const u = Zl(c[l]), f = u.indexOf(a), d = o.before !== void 0 ? f : f + 1, h = [...u.slice(0, d), s, ...u.slice(d)], g = c.map( (p, m) => m === l ? nE(p, h) : p ); - return [Ko(e, "menus", t, g), []]; + return [Ho(e, "menus", t, g), []]; } - i.push(Ax("add", a, t, Em(n))); + i.push(Ax("add", a, t, Cm(n))); } - return [Ko(e, "menus", t, [...jf(n), [s]]), i]; + return [Ho(e, "menus", t, [...Vf(n), [s]]), i]; } function kPe(e, t, n) { const r = n?.from; @@ -70152,37 +70200,37 @@ function kPe(e, t, n) { if (i) { const l = ev( i, - (d) => Z0( - d, - Ai(d).filter((f) => { - const h = yi(f); + (f) => Z0( + f, + Ai(f).filter((d) => { + const h = yi(d); return o.has(h) ? (s.add(h), !1) : !0; }) ) - ), u = t.filter((d) => !s.has(d)); + ), u = t.filter((f) => !s.has(f)); return [ - s.size > 0 ? Ko(e, "bars", r, l) : e, - u.map((d) => Ax("remove", d, r, Q0(i))) + s.size > 0 ? Ho(e, "bars", r, l) : e, + u.map((f) => Ax("remove", f, r, Q0(i))) ]; } - const a = Ff(e)[r]; + const a = $f(e)[r]; if (a) { - const l = jf(a).map( - (d) => nE( - d, - Xl(d).filter((f) => o.has(f) ? (s.add(f), !1) : !0) + const l = Vf(a).map( + (f) => nE( + f, + Zl(f).filter((d) => o.has(d) ? (s.add(d), !1) : !0) ) - ).filter((d) => d !== null), u = t.filter((d) => !s.has(d)); + ).filter((f) => f !== null), u = t.filter((f) => !s.has(f)); return [ - s.size > 0 ? Ko(e, "menus", r, l) : e, - u.map((d) => Ax("remove", d, r, Em(a))) + s.size > 0 ? Ho(e, "menus", r, l) : e, + u.map((f) => Ax("remove", f, r, Cm(a))) ]; } - const c = [...Object.keys(As(e)), ...Object.keys(Ff(e))]; + const c = [...Object.keys(As(e)), ...Object.keys($f(e))]; return [e, [`remove: no bar or menu "${r}"${gr(r, c)}`]]; } function APe(e, t, n) { - if (!Jm(n)) return [e, [`replace: ${JSON.stringify(n)} is not an item`]]; + if (!Ym(n)) return [e, [`replace: ${JSON.stringify(n)} is not an item`]]; let r = !1; const o = {}; for (const [a, c] of Object.entries(As(e))) { @@ -70199,22 +70247,22 @@ function APe(e, t, n) { ); } const s = typeof n == "string" ? n : "custom" in n ? null : n.command, i = {}; - for (const [a, c] of Object.entries(Ff(e))) { - if (s === null || !Em(c).includes(t)) { + for (const [a, c] of Object.entries($f(e))) { + if (s === null || !Cm(c).includes(t)) { i[a] = c; continue; } - r = !0, i[a] = jf(c).map( + r = !0, i[a] = Vf(c).map( (l) => nE( l, - Xl(l).map((u) => u === t ? s : u) + Zl(l).map((u) => u === t ? s : u) ) ); } if (!r) { const a = [ ...Object.values(As(e)).flatMap(Q0), - ...Object.values(Ff(e)).flatMap(Em) + ...Object.values($f(e)).flatMap(Cm) ]; return [e, [`replace: "${t}" is in no bar or menu${gr(t, a)}`]]; } @@ -70231,7 +70279,7 @@ function qq(e, t) { } function SPe(e, t, n) { const r = X0(e)[t]; - return r ? [Ko(e, "panels", t, qq(r, n)), []] : [e, [`panel: no panel "${t}"${gr(t, Object.keys(X0(e)))}`]]; + return r ? [Ho(e, "panels", t, qq(r, n)), []] : [e, [`panel: no panel "${t}"${gr(t, Object.keys(X0(e)))}`]]; } function xPe(e, t) { const n = Object.fromEntries( @@ -70254,12 +70302,12 @@ function EPe(e, t) { ) : a ]) ), o = Object.fromEntries( - Object.entries(Ff(e)).map(([i, a]) => [ + Object.entries($f(e)).map(([i, a]) => [ i, - Em(a).includes(n) ? jf(a).map( + Cm(a).includes(n) ? Vf(a).map( (c) => nE( c, - Xl(c).filter((l) => l !== n) + Zl(c).filter((l) => l !== n) ) ).filter((c) => c !== null) : a ]) @@ -70293,7 +70341,7 @@ function nj(e, t, n) { `${n} ${e === void 0 ? "nothing" : typeof e}, not a layout; showing the default layout` ); } -const OPe = "modes", tv = "mode:view", Zl = (e) => `mode:${e}`, eu = (e) => `panel:${e}`, rj = ["top", "bottom", "start", "end"], PPe = [ +const OPe = "modes", tv = "mode:view", eu = (e) => `mode:${e}`, tu = (e) => `panel:${e}`, rj = ["top", "bottom", "start", "end"], PPe = [ "top-start", "top", "top-end", @@ -70302,7 +70350,7 @@ const OPe = "modes", tv = "mode:view", Zl = (e) => `mode:${e}`, eu = (e) => `pan "bottom-start", "bottom", "bottom-end" -], uu = (e) => Object.entries(e.bars ?? {}).filter( +], du = (e) => Object.entries(e.bars ?? {}).filter( (t) => typeof t[1] == "object" && t[1] !== null ); function Jq(e) { @@ -70315,7 +70363,7 @@ function Yq(e) { return typeof e == "object" && e !== null && "float" in e && PPe.includes(e.float) ? e.float : null; } function TPe(e, t) { - const n = uu(e).filter(([, i]) => Jq(i.place) === t), r = (i) => typeof i == "object" && i !== null && "edge" in i ? i.before !== void 0 ? { id: i.before, after: !1 } : i.after !== void 0 ? { id: i.after, after: !0 } : null : null, o = n.filter(([, i]) => r(i.place) === null).map(([i]) => i); + const n = du(e).filter(([, i]) => Jq(i.place) === t), r = (i) => typeof i == "object" && i !== null && "edge" in i ? i.before !== void 0 ? { id: i.before, after: !1 } : i.after !== void 0 ? { id: i.after, after: !0 } : null : null, o = n.filter(([, i]) => r(i.place) === null).map(([i]) => i); let s = n.filter(([, i]) => r(i.place) !== null); for (let i = !0; i && s.length > 0; ) i = !1, s = s.filter(([a, c]) => { @@ -70325,7 +70373,7 @@ function TPe(e, t) { return [...o, ...s.map(([i]) => i)]; } function MPe(e, t) { - return uu(e).filter(([, n]) => Kv(n.place) === t).map(([n]) => n); + return du(e).filter(([, n]) => Kv(n.place) === t).map(([n]) => n); } function Qq(e, t) { const n = [], r = (o) => { @@ -70341,7 +70389,7 @@ function BPe(e, t) { return Qq(e, TPe(e, t)); } function _Pe(e, t) { - return uu(e).filter(([, n]) => Yq(n.place) === t).map(([n]) => n); + return du(e).filter(([, n]) => Yq(n.place) === t).map(([n]) => n); } function LPe(e, t) { return Qq(e, _Pe(e, t)); @@ -70359,19 +70407,19 @@ function DPe(e, t) { } } function jPe(e, t) { - return uu(e).filter(([, n]) => RPe(n.place) === t).map(([n]) => n); + return du(e).filter(([, n]) => RPe(n.place) === t).map(([n]) => n); } function FPe(e, t) { - return uu(e).filter(([, n]) => Hq(n.place) === t).map(([n]) => n); + return du(e).filter(([, n]) => Hq(n.place) === t).map(([n]) => n); } -function Cm(e) { +function Im(e) { const t = /* @__PURE__ */ new Set(); - for (const [, n] of uu(e)) + for (const [, n] of du(e)) typeof n.mode == "string" && n.mode.length > 0 && t.add(n.mode); return [...t]; } function Xq(e, t) { - return uu(e).filter(([, n]) => n.mode === t).map(([n]) => n); + return du(e).filter(([, n]) => n.mode === t).map(([n]) => n); } const VPe = /* @__PURE__ */ new Set(), $Pe = (e) => { if (typeof e == "string") return e; @@ -70383,7 +70431,7 @@ const VPe = /* @__PURE__ */ new Set(), $Pe = (e) => { return e.variants !== void 0 && (t.variants = e.variants), e.importance !== void 0 && (t.importance = e.importance), e.emphasis === "primary" && (t.emphasis = "primary"), t; }; function UPe(e, t) { - const n = Cm(e).map(Zl).filter((o) => !t.has(o)); + const n = Im(e).map(eu).filter((o) => !t.has(o)); return n.length === 0 ? [] : (t.has(tv) ? n : [tv, ...n]).map((o) => ({ command: o, variants: ["label"], importance: 1 })); } function CT(e, t, n = {}) { @@ -70394,22 +70442,22 @@ function CT(e, t, n = {}) { for (let u = 2; s.has(l); u++) l = `${c}-${u}`; return s.add(l), l; }, a = {}; - for (const c of Il) { + for (const c of Nl) { const l = []; - zd(r, c).forEach((u, d) => { - const f = xm(u) ? u : null, h = /* @__PURE__ */ new Set(); + qd(r, c).forEach((u, f) => { + const d = Em(u) ? u : null, h = /* @__PURE__ */ new Set(); let g = Ai(u).filter((v) => { - if (!Jm(v)) return !1; + if (!Ym(v)) return !1; const S = yi(v); return h.has(S) ? !1 : (h.add(S), typeof v == "object" && "custom" in v ? !0 : !o.has(S)); }); - const p = f?.id === OPe; + const p = d?.id === OPe; if (p && (g = [...UPe(e, o).filter((v) => !h.has(v.command)), ...g]), g.length === 0) return; const m = { - id: i(f?.id ?? `${c}-${d}`), + id: i(d?.id ?? `${c}-${f}`), items: g.map($Pe) }; - p && (m.role = "tabs"), f?.titleKey !== void 0 && (m.labelKey = f.titleKey), f?.shed !== void 0 && (m.shed = f.shed), f?.collapse !== void 0 && (m.collapse = f.collapse), f?.importance !== void 0 && (m.importance = f.importance), f?.dependent === !0 && (m.dependent = !0), l.push(m); + p && (m.role = "tabs"), d?.titleKey !== void 0 && (m.labelKey = d.titleKey), d?.shed !== void 0 && (m.shed = d.shed), d?.collapse !== void 0 && (m.collapse = d.collapse), d?.importance !== void 0 && (m.importance = d.importance), d?.dependent === !0 && (m.dependent = !0), l.push(m); }), l.length > 0 && (a[c] = l); } return { id: t, sections: a }; @@ -70421,9 +70469,9 @@ function IT(e, t) { const n = e.menus?.[t]; if (!n) return null; const r = (o) => [ - ...new Set(Xl(o).filter((s) => typeof s == "string")) + ...new Set(Zl(o).filter((s) => typeof s == "string")) ]; - return jf(n).map((o) => { + return Vf(n).map((o) => { if (Array.isArray(o) || typeof o != "object" || o === null) return { items: r(o) }; const s = o, i = { @@ -70436,7 +70484,7 @@ const oj = /* @__PURE__ */ new WeakMap(); function HPe(e) { const t = oj.get(e); if (t) return t; - const n = Cm(e).map( + const n = Im(e).map( (i) => [i, Xq(e, i).map((a) => eE(CT(e, a)))] ), r = new Map( Object.keys(e.menus ?? {}).map((i) => [ @@ -70444,11 +70492,11 @@ function HPe(e) { IT(e, i).flatMap((a) => a.items) ]) ), o = /* @__PURE__ */ new Set(); - for (const [, i] of uu(e)) - for (const a of Il) - for (const c of zd(i, a)) + for (const [, i] of du(e)) + for (const a of Nl) + for (const c of qd(i, a)) for (const l of Ai(c)) - typeof l == "string" ? o.add(l) : Jm(l) && !("custom" in l) && o.add(l.command); + typeof l == "string" ? o.add(l) : Ym(l) && !("custom" in l) && o.add(l.command); const s = { modes: n, menus: r, buttons: [...o] }; return oj.set(e, s), s; } @@ -70457,10 +70505,10 @@ function zPe(e, t, n = t) { for (const [i, a] of r.modes) a.some( (l) => xT(l, (u) => { - const d = Sm(u); - return d !== null && o(d); + const f = xm(u); + return f !== null && o(f); }) - ) || s.push(Zl(i)); + ) || s.push(eu(i)); for (const i of r.buttons) { const a = n(i)?.menu; a !== void 0 && !(r.menus.get(a) ?? []).some(o) && s.push(i); @@ -70482,9 +70530,9 @@ function JPe(e, t) { if (typeof r != "object" || r === null) return [...n, "the layout is not an object"]; const o = r.bars ?? {}, s = new Set(t.commands), i = new Set(s); - for (const c of Cm(r)) i.add(Zl(c)); - Cm(r).length > 0 && i.add(tv); - for (const c of Object.keys(r.panels ?? {})) i.add(eu(c)); + for (const c of Im(r)) i.add(eu(c)); + Im(r).length > 0 && i.add(tv); + for (const c of Object.keys(r.panels ?? {})) i.add(tu(c)); const a = (c, l) => { !i.has(l) && t.hasCommand?.(l) !== !0 && n.push(`${c}: no command "${l}"${gr(l, i)}`); }; @@ -70494,7 +70542,7 @@ function JPe(e, t) { n.push(`${u} is not a bar`); continue; } - n.push(...YPe(u, c, l.place, r)), l.mode !== void 0 && l.title === void 0 && l.titleKey === void 0 && (s.has(Zl(l.mode)) || n.push( + n.push(...YPe(u, c, l.place, r)), l.mode !== void 0 && l.title === void 0 && l.titleKey === void 0 && (s.has(eu(l.mode)) || n.push( `${u}: its mode "${l.mode}" has no title, so its tab reads "${l.mode}"` )), n.push(...QPe(u, l, a)); } @@ -70548,7 +70596,7 @@ function YPe(e, t, n, r) { function QPe(e, t, n) { const r = [], o = /* @__PURE__ */ new Set(); let s = 0, i = 0; - for (const a of Il) { + for (const a of Nl) { const c = t[a]; if (c !== void 0) { if (!Array.isArray(c)) { @@ -70556,21 +70604,21 @@ function QPe(e, t, n) { continue; } for (const l of c) { - if (xm(l) && l.id !== void 0 && (o.has(l.id) && r.push(`${e}: two groups are called "${l.id}"`), o.add(l.id)), s++, xm(l) && l.dependent !== void 0) { - const d = l.dependent; - d === !0 ? i++ : d !== !1 && r.push( - `${e}: ${l.id === void 0 ? "a group" : `group "${l.id}"`} has dependent ${JSON.stringify(d)}, which is not true or false` + if (Em(l) && l.id !== void 0 && (o.has(l.id) && r.push(`${e}: two groups are called "${l.id}"`), o.add(l.id)), s++, Em(l) && l.dependent !== void 0) { + const f = l.dependent; + f === !0 ? i++ : f !== !1 && r.push( + `${e}: ${l.id === void 0 ? "a group" : `group "${l.id}"`} has dependent ${JSON.stringify(f)}, which is not true or false` ); } const u = /* @__PURE__ */ new Set(); - for (const d of Ai(l)) { - if (!Jm(d)) { - r.push(`${e}: ${JSON.stringify(d)} is not an item`); + for (const f of Ai(l)) { + if (!Ym(f)) { + r.push(`${e}: ${JSON.stringify(f)} is not an item`); continue; } - const f = yi(d); - u.has(f) && r.push(`${e}: "${f}" is twice in one group`), u.add(f), r.push(...XPe(e, f, d)); - const h = pPe(d); + const d = yi(f); + u.has(d) && r.push(`${e}: "${d}" is twice in one group`), u.add(d), r.push(...XPe(e, d, f)); + const h = pPe(f); h !== null && n(e, h); } } @@ -70589,7 +70637,7 @@ function ZPe(e, t, n) { if (!Array.isArray(t)) return [`${e} is not a list of sections`]; const r = [], o = /* @__PURE__ */ new Set(); for (const s of t) - for (const i of Xl(s)) { + for (const i of Zl(s)) { if (typeof i != "string") { r.push(`${e}: ${JSON.stringify(i)} is not a command id`); continue; @@ -70753,8 +70801,8 @@ function lj(e, t, n) { l += 1; continue; } - const d = t.unit(u.unit.key, u.unit.variants[u.variantIndex]); - d === void 0 && (o = !1), r += d ?? 0, s += 1, c = !0; + const f = t.unit(u.unit.key, u.unit.variants[u.variantIndex]); + f === void 0 && (o = !1), r += f ?? 0, s += 1, c = !0; } if (l > 0) { const u = t.groupTrigger(a.group.id); @@ -70808,7 +70856,7 @@ function i6e(e, t, n) { }; } function a6e(e, t) { - const n = Sm(e); + const n = xm(e); if (n === null) return []; const r = t(n)?.menu; return [r ? { kind: "submenu", command: n, menu: r } : { kind: "command", command: n }]; @@ -70828,12 +70876,12 @@ function c6e(e, t, n) { } function l6e(e, t) { const n = $q(e, (o) => { - const s = Sm(o); + const s = xm(o); return s !== null && t(s); }), r = []; for (const o of n.sections) for (const s of o.groups) { - const i = s.units.map(Sm).filter((a) => a !== null); + const i = s.units.map(xm).filter((a) => a !== null); i.length !== 0 && r.push({ id: s.id, labelKey: s.labelKey, commands: i }); } return r; @@ -70855,31 +70903,31 @@ function f6e(e) { } function h6e(e) { const { resolve: t, execute: n, measureKey: r } = e, o = (u) => { - const d = Sm(u); - return d === null ? null : t(d); - }, s = $q(e.bar, (u) => o(u)?.visible === !0), i = e.orientation === "vertical" ? f6e(s) : s, a = i6e(i, e.metrics, e.containerLength), c = (u) => u.map(o).filter((d) => d !== null && d.visible), l = { - unit: (u, d) => { + const f = xm(u); + return f === null ? null : t(f); + }, s = $q(e.bar, (u) => o(u)?.visible === !0), i = e.orientation === "vertical" ? f6e(s) : s, a = i6e(i, e.metrics, e.containerLength), c = (u) => u.map(o).filter((f) => f !== null && f.visible), l = { + unit: (u, f) => { if (u.kind === "custom") return { kind: "custom", key: u.key, - measureKey: r.unit(u.key, d), + measureKey: r.unit(u.key, f), name: u.slot, - variant: d, + variant: f, terminal: o(u), runTerminal: () => { u.terminal !== null && n(u.terminal); }, grow: u.grow }; - const f = t(u.command); + const d = t(u.command); return { kind: "command", key: u.key, - measureKey: r.unit(u.key, d), - command: f ?? e.unregistered(u.command), - variant: d, - run: f ? () => n(u.command) : () => { + measureKey: r.unit(u.key, f), + command: d ?? e.unregistered(u.command), + variant: f, + run: d ? () => n(u.command) : () => { } }; }, @@ -70897,7 +70945,7 @@ function h6e(e) { } }), // The shed children for the live trigger; the whole group for the measured one. - disclosure: (u, d) => ({ + disclosure: (u, f) => ({ kind: "disclosure", key: `${u.id}::trigger`, measureKey: r.groupTrigger(u.id), @@ -70906,7 +70954,7 @@ function h6e(e) { labelKey: u.labelKey, role: u.role, commands: c( - u.units.filter((f) => d || a.units.get(f.key)?.kind === "shed") + u.units.filter((d) => f || a.units.get(d.key)?.kind === "shed") ), execute: n } @@ -71073,7 +71121,7 @@ function OT(e, t) { function S6e(e) { return e.charAt(0).toUpperCase() + e.slice(1); } -const bo = sn("commands", { +const wo = an("commands", { hint: "add commandsPlugin() from '@embedpdf/plugin-commands' to your plugins list" }), Zq = (e, t) => e === t ? !0 : !e || !t ? !1 : e.id === t.id && e.label === t.label && e.icon === t.icon && e.iconAccent?.primary === t.iconAccent?.primary && e.iconAccent?.secondary === t.iconAccent?.secondary && e.menu === t.menu && e.enabled === t.enabled && e.active === t.active && e.pressable === t.pressable && e.visible === t.visible && e.disabledReason === t.disabledReason && e.shortcuts.length === t.shortcuts.length && e.shortcuts.every((n, r) => n === t.shortcuts[r]), eG = (e) => ({ id: e, @@ -71109,7 +71157,7 @@ function N6e(e) { I6e(r) ? n.push(r) : t.set(r.id, pP(r)); return { commands: t, families: n }; } -const tG = (e, t) => t.some((n) => e === n || e.startsWith(`${n}.`)), nG = (e) => e.tryGet(vo)?.getTranslator() ?? null, rG = (e, t) => { +const tG = (e, t) => t.some((n) => e === n || e.startsWith(`${n}.`)), nG = (e) => e.tryGet(ko)?.getTranslator() ?? null, rG = (e, t) => { if (e.labelParams) try { return e.labelParams(t); @@ -71159,7 +71207,7 @@ function T6e(e, t) { const l = c.documentId === null ? null : e.documentHandle(c.documentId); if (!l) return null; const u = a.requires?.find( - (d) => !O6e(l.security, d) + (f) => !O6e(l.security, f) ); return u !== void 0 ? P6e(u) : r(a, c) ? null : a.notAllowedKey ?? sG; }; @@ -71167,11 +71215,11 @@ function T6e(e, t) { const l = nG(c), u = () => oG(a, rG(a, c), l); if (n(a)) return { reason: "turned-off", message: R6e(u(), l) }; - const d = s(a, c); - if (d !== null) - return { reason: "not-allowed", message: iG(d, u(), l) }; - const f = o(a, c); - return f === null ? null : { reason: "locked", message: cG(f, u(), l) }; + const f = s(a, c); + if (f !== null) + return { reason: "not-allowed", message: iG(f, u(), l) }; + const d = o(a, c); + return d === null ? null : { reason: "locked", message: cG(d, u(), l) }; } }; } function M6e(e, t, n) { @@ -71226,13 +71274,13 @@ function D6e(e) { }, s = tt( () => [t.get().commands], (D) => N6e(D) - ), i = e.events.source(), a = e.events.source(), c = (D, _ = {}) => { - const L = D ?? e.get(It).getActiveId(), j = (H) => L ? e.forDocument(H, L) : e.get(H); + ), i = e.events.source(), a = e.events.source(), c = (D, B = {}) => { + const L = D ?? e.get(Pt).getActiveId(), j = (H) => L ? e.forDocument(H, L) : e.get(H); return { documentId: L, appState: t.get().appState, - ..._.args === void 0 ? {} : { args: _.args }, - ..._.signal ? { signal: _.signal } : {}, + ...B.args === void 0 ? {} : { args: B.args }, + ...B.signal ? { signal: B.signal } : {}, get: j, tryGet: (H) => { try { @@ -71245,240 +71293,240 @@ function D6e(e) { }, l = Mn( (D) => [e.storeChangeCount()], (D) => { - const _ = c(D || void 0), L = /* @__PURE__ */ new Map(), j = (H) => (L.has(H) || L.set(H, _.tryGet(H)), L.get(H)); - return { ..._, tryGet: j, get: (H) => j(H) ?? _.get(H) }; + const B = c(D || void 0), L = /* @__PURE__ */ new Map(), j = (H) => (L.has(H) || L.set(H, B.tryGet(H)), L.get(H)); + return { ...B, tryGet: j, get: (H) => j(H) ?? B.get(H) }; } - ), u = /* @__PURE__ */ new WeakMap(), d = (D, _) => { + ), u = /* @__PURE__ */ new WeakMap(), f = (D, B) => { let L = u.get(D); L || (L = /* @__PURE__ */ new Map(), u.set(D, L)); - let j = L.get(_); - return j || (j = pP({ ...D.command(_), id: `${D.prefix}${_}` }), L.set(_, j)), j; - }, f = (D) => { - const { commands: _, families: L } = s(), j = n.get(D) ?? _.get(D); + let j = L.get(B); + return j || (j = pP({ ...D.command(B), id: `${D.prefix}${B}` }), L.set(B, j)), j; + }, d = (D) => { + const { commands: B, families: L } = s(), j = n.get(D) ?? B.get(D); if (j) return j; const H = L.find( (Y) => D.startsWith(Y.prefix) && D.length > Y.prefix.length ); - return H ? d(H, D.slice(H.prefix.length)) : null; + return H ? f(H, D.slice(H.prefix.length)) : null; }, h = tt( () => [r, s()], - (D, { commands: _ }) => { - const L = new Map(_); + (D, { commands: B }) => { + const L = new Map(B); for (const [j, H] of n) L.set(j, H); return [...L.values()]; } - ), g = (D, _, L) => { + ), g = (D, B, L) => { if (!D) return L; try { - return D(_); + return D(B); } catch { return !1; } - }, p = (D, _) => { + }, p = (D, B) => { if (D) try { - return D(_) ?? void 0; + return D(B) ?? void 0; } catch { return; } - }, m = (D, _) => { + }, m = (D, B) => { try { - return D.names(_); + return D.names(B); } catch { return hj; } }, { isTurnedOff: v, notAllowedKeyOf: S, lockedKeyOf: C, refusalOf: k } = T6e( e, t - ), N = (D, _) => { - if (D.active) return g(D.active, _, !1); - const L = _.tryGet(dt); + ), N = (D, B) => { + if (D.active) return g(D.active, B, !1); + const L = B.tryGet(dt); if (!L) return !1; const j = fj(D); return D.menu ? L.isMenuOpen(D.menu) : j ? L.isOpen(j.id) : D.modal ? L.isOpen(D.modal) : !1; - }, w = (D, _) => { - const L = v(D), j = L ? null : S(D, _), H = t.get().notAllowed === "disable", Y = L || j !== null ? null : C(D, _); + }, w = (D, B) => { + const L = v(D), j = L ? null : S(D, B), H = t.get().notAllowed === "disable", Y = L || j !== null ? null : C(D, B); return { - enabled: !(L || j !== null || Y !== null) && g(D.enabled, _, !0), - visible: !L && (j === null || H) && g(D.visible, _, !0), + enabled: !(L || j !== null || Y !== null) && g(D.enabled, B, !0), + visible: !L && (j === null || H) && g(D.visible, B, !0), notAllowedKey: H ? j : null, lockedKey: Y }; - }, y = (D, _) => { - const { definition: L } = D, { enabled: j, visible: H, notAllowedKey: Y, lockedKey: ue } = w(L, _), le = rG(L, _), pe = p(L.iconAccent, _); + }, y = (D, B) => { + const { definition: L } = D, { enabled: j, visible: H, notAllowedKey: Y, lockedKey: le } = w(L, B), ie = rG(L, B), pe = p(L.iconAccent, B); return [ D, - nG(_), - le === void 0 ? void 0 : JSON.stringify(le), + nG(B), + ie === void 0 ? void 0 : JSON.stringify(ie), pe?.primary, pe?.secondary, j, - N(L, _), + N(L, B), H, Y, - ue + le ]; }, A = Mn((D) => [], (D) => { - const _ = Mn( + const B = Mn( (L) => [e.storeChangeCount()], (L) => { - const j = f(L); + const j = d(L); return j ? y(j, l(D)) : _6e; } ); return Mn( - (L) => _(L), - (L, j, H, Y, ue, le, pe, ge, Me, Be, te) => { + (L) => B(L), + (L, j, H, Y, le, ie, pe, ve, _e, Be, ee) => { if (!j) return null; - const he = Y === void 0 ? void 0 : JSON.parse(Y), Te = oG(j.definition, he, H), ze = Be !== null ? iG(Be, Te, H) : te !== null ? cG(te, Te, H) : void 0; + const he = Y === void 0 ? void 0 : JSON.parse(Y), Te = oG(j.definition, he, H), We = Be !== null ? iG(Be, Te, H) : ee !== null ? cG(ee, Te, H) : void 0; return { id: j.definition.id, label: Te, icon: j.definition.icon, - iconAccent: L6e(ue, le), + iconAccent: L6e(le, ie), shortcuts: j.shortcuts, menu: j.definition.menu, enabled: pe, - active: ge, + active: ve, pressable: B6e(j.definition), - visible: Me, + visible: _e, categories: j.definition.categories ?? [], - ...ze === void 0 ? {} : { disabledReason: ze } + ...We === void 0 ? {} : { disabledReason: We } }; } ); - }), b = (D, _) => A(_ ?? "")(D), E = Mn( + }), b = (D, B) => A(B ?? "")(D), E = Mn( (D) => { - const _ = s(), L = l(D); + const B = s(), L = l(D); return [ h(), - _, - ..._.families.map((j) => m(j, L)) + B, + ...B.families.map((j) => m(j, L)) ]; }, - (D, ..._) => { - const [L, { families: j }, ...H] = _, Y = L.map((le) => le.definition.id), ue = new Set(Y); - return j.forEach((le, pe) => { - for (const ge of H[pe] ?? hj) { - const Me = `${le.prefix}${ge}`; - ue.has(Me) || (ue.add(Me), Y.push(Me)); + (D, ...B) => { + const [L, { families: j }, ...H] = B, Y = L.map((ie) => ie.definition.id), le = new Set(Y); + return j.forEach((ie, pe) => { + for (const ve of H[pe] ?? hj) { + const _e = `${ie.prefix}${ve}`; + le.has(_e) || (le.add(_e), Y.push(_e)); } }), Y; } ), I = Mn( - (D) => E(D).map((_) => b(_, D || void 0)), - (D, ..._) => _.filter((L) => L !== null) + (D) => E(D).map((B) => b(B, D || void 0)), + (D, ...B) => B.filter((L) => L !== null) ), O = (D) => I(D ?? ""), T = tt( () => [h()], (D) => D.flatMap( - (_) => _.shortcuts.map((L) => ({ commandId: _.definition.id, shortcut: L })) + (B) => B.shortcuts.map((L) => ({ commandId: B.definition.id, shortcut: L })) ) - ), R = async (D, _) => { + ), R = async (D, B) => { if (D.run) { - await D.run(_); + await D.run(B); return; } - const L = _.tryGet(dt), j = fj(D); + const L = B.tryGet(dt), j = fj(D); L && (D.menu ? L.toggleMenu(D.menu) : j ? L.toggle(j.id, { exclusive: j.exclusive, focus: j.focus }) : D.modal && L.toggle(D.modal, { exclusive: "modal" })); - }, M = async (D, _ = {}) => { - const { signal: L, documentId: j, args: H } = _; + }, M = async (D, B = {}) => { + const { signal: L, documentId: j, args: H } = B; if (L?.aborted) - throw new re("operation-cancelled", "commands", "operation cancelled"); - const Y = f(D); + throw new te("operation-cancelled", "commands", "operation cancelled"); + const Y = d(D); if (!Y) return { status: "rejected", reason: "not-found" }; - const ue = w(Y.definition, l(j ?? "")); - if (!ue.visible) return { status: "rejected", reason: "hidden" }; - if (!ue.enabled) return { status: "rejected", reason: "disabled" }; - const le = c(j, { args: H, signal: L }); + const le = w(Y.definition, l(j ?? "")); + if (!le.visible) return { status: "rejected", reason: "hidden" }; + if (!le.enabled) return { status: "rejected", reason: "disabled" }; + const ie = c(j, { args: H, signal: L }); try { - await e.cancellable(L, R(Y.definition, le)); + await e.cancellable(L, R(Y.definition, ie)); } catch (pe) { - if (L?.aborted && pr(pe, "operation-cancelled")) throw pe; - const ge = qe("commands", pe); + if (L?.aborted && Xn(pe, "operation-cancelled")) throw pe; + const ve = ze("commands", pe); throw a.emit({ commandId: D, - documentId: le.documentId, - error: Br(ge) - }), ge; + documentId: ie.documentId, + error: Br(ve) + }), ve; } finally { e.notify(); } - return i.emit({ commandId: D, documentId: le.documentId, args: H }), { status: "executed" }; - }, F = (D, _) => { - if ((n.has(D.id) || s().commands.has(D.id)) && !_?.replace) - throw new re("conflict", "commands", `duplicate command '${D.id}'`); + return i.emit({ commandId: D, documentId: ie.documentId, args: H }), { status: "executed" }; + }, F = (D, B) => { + if ((n.has(D.id) || s().commands.has(D.id)) && !B?.replace) + throw new te("conflict", "commands", `duplicate command '${D.id}'`); const j = pP(D); return n.set(D.id, j), o(), () => { n.get(D.id) === j && (n.delete(D.id), o()); }; - }, B = M6e( + }, _ = M6e( t, - (D) => f(D)?.definition ?? null, + (D) => d(D)?.definition ?? null, v ); return { api: { ...t.api, registerCommand: F, - registerCommands: (D, _) => { - const L = D.map((j) => F(j, _)); + registerCommands: (D, B) => { + const L = D.map((j) => F(j, B)); return () => L.forEach((j) => j()); }, - hasCommand: (D) => f(D) !== null, - getCommand: (D) => f(D)?.definition ?? null, + hasCommand: (D) => d(D) !== null, + getCommand: (D) => d(D)?.definition ?? null, listCommandIds: () => E(""), resolveCommand: b, listCommands: O, - searchCommands: (D, _) => { + searchCommands: (D, B) => { const L = D.trim().toLowerCase(); - return O(_).filter( + return O(B).filter( (j) => j.visible && (L === "" || j.label.toLowerCase().includes(L) || j.id.includes(L)) ); }, listShortcuts: T, execute: M, - canExecute: (D, _) => { - const L = f(D); + canExecute: (D, B) => { + const L = d(D); if (!L) return !1; - const j = w(L.definition, l(_ ?? "")); + const j = w(L.definition, l(B ?? "")); return j.enabled && j.visible; }, - getRefusal: (D, _) => { - const L = f(D); - return L ? k(L.definition, l(_ ?? "")) : null; + getRefusal: (D, B) => { + const L = d(D); + return L ? k(L.definition, l(B ?? "")) : null; }, - ...B, + ..._, onExecuted: i.on, onExecutionFailed: a.on, // ── host lens ── - matchStroke: (D, _) => { + matchStroke: (D, B) => { let L = null, j = null; for (const H of h()) { - if (_.inTextField && !H.definition.shortcutInTextFields || !H.parsed.some((pe) => v6e(pe, D, _))) continue; - const Y = l(""), ue = k(H.definition, Y), le = g(H.definition.visible, Y, !0); - if (!ue) { - if (le && g(H.definition.enabled, Y, !0)) + if (B.inTextField && !H.definition.shortcutInTextFields || !H.parsed.some((pe) => v6e(pe, D, B))) continue; + const Y = l(""), le = k(H.definition, Y), ie = g(H.definition.visible, Y, !0); + if (!le) { + if (ie && g(H.definition.enabled, Y, !0)) return { commandId: H.definition.id, refusal: null }; L ?? (L = { commandId: H.definition.id, refusal: null }); continue; } - le && (j ?? (j = { commandId: H.definition.id, refusal: ue })); + ie && (j ?? (j = { commandId: H.definition.id, refusal: le })); } return L ?? j; }, getMenuTarget: (D) => { - const _ = f(D); - return _ ? { menu: _.definition.menu } : null; + const B = d(D); + return B ? { menu: B.definition.menu } : null; } } }; } -const rE = bo, j6e = (e) => ({ +const rE = wo, j6e = (e) => ({ id: "commands", scope: "workspace", token: rE, // Labels come from i18n, and commands that open a panel, menu or dialog // go through shell; without them a label is the command's own, and those // commands open nothing. - optional: [vo, dt], + optional: [ko, dt], // Command definitions come from the app and may use any capability. resolvesAnyCapability: !0, // Your app's state is replaced whole, never merged: a new value is the whole new state. @@ -71500,14 +71548,14 @@ const rE = bo, j6e = (e) => ({ }) }); function jr() { - return bt(bo); + return bt(wo); } -const F6e = jm(bo); +const F6e = Fm(wo); function lG(e, t = {}) { return OT(e, { isMac: t.isMac ?? pv() }); } -function go(e) { - const t = bt(bo), n = ar() ?? void 0, r = en( +function mo(e) { + const t = bt(wo), n = cr() ?? void 0, r = nn( () => t.resolveCommand(e, n), Zq ); @@ -71590,11 +71638,11 @@ function gP(e, t) { function H6e(e, t, n, r) { const { from: o } = uG(t), { undo: s, redo: i } = gP(e, r.id), a = { undo: s, redo: i }, c = [...a[o]], l = c.findIndex((u) => u.seq === n.seq); if (l >= 0) { - const u = [...c[l].parts, r].sort((d, f) => d.seq - f.seq); + const u = [...c[l].parts, r].sort((f, d) => f.seq - d.seq); c[l] = { ...c[l], parts: u }; } else { - const u = (f) => o === "undo" ? f.seq < n.seq : f.seq > n.seq, d = c.filter(u).length; - c.splice(d, 0, { ...n, parts: [r] }); + const u = (d) => o === "undo" ? d.seq < n.seq : d.seq > n.seq, f = c.filter(u).length; + c.splice(f, 0, { ...n, parts: [r] }); } return { ...e, ...a, [o]: c, merging: null }; } @@ -71638,7 +71686,7 @@ function J6e(e) { e.state.update(H6e, g, p, m); return { error: S }; } - ), d = (g) => { + ), f = (g) => { e.changes.sendHolds(); const p = NI(e.state.get(), g); if (!p) return; @@ -71682,16 +71730,16 @@ function J6e(e) { ); n.emit({ label: p.label, redo: C, skipped: N }); }); - }, f = () => e.changes.listPending().find((g) => g.held && g.history) ?? null; + }, d = () => e.changes.listPending().find((g) => g.held && g.history) ?? null; return { api: { ...t.api, - undo: () => d("undo"), - redo: () => d("redo"), - canUndo: () => f() !== null || e.state.get().undo.length > 0, - canRedo: () => f() === null && e.state.get().redo.length > 0, - getUndoLabel: () => f()?.label ?? NI(e.state.get(), "undo")?.label ?? null, - getRedoLabel: () => f() === null ? NI(e.state.get(), "redo")?.label ?? null : null, + undo: () => f("undo"), + redo: () => f("redo"), + canUndo: () => d() !== null || e.state.get().undo.length > 0, + canRedo: () => d() === null && e.state.get().redo.length > 0, + getUndoLabel: () => d()?.label ?? NI(e.state.get(), "undo")?.label ?? null, + getRedoLabel: () => d() === null ? NI(e.state.get(), "redo")?.label ?? null : null, clear: l, onUndone: n.on, onUndoFailed: r.on @@ -71710,7 +71758,7 @@ function J6e(e) { } const Y6e = (e) => ({ id: "history", - token: rg, + token: og, scope: "document", state: $6e, settings: { defaults: dce, registered: e }, @@ -71783,17 +71831,17 @@ function iRe(e) { const t = e.events.source(), n = e.events.source(), r = e.events.source(), o = e.events.source(); e.state.onChange(({ previous: l, next: u }) => { if (l.surfaces !== u.surfaces) { - const d = /* @__PURE__ */ new Set([...Object.keys(l.surfaces), ...Object.keys(u.surfaces)]); - for (const f of d) { - const h = l.surfaces[f]?.open ?? !1, g = u.surfaces[f]?.open ?? !1; - h !== g && (g ? t.emit({ id: f, props: u.surfaces[f].props }) : n.emit({ id: f })); + const f = /* @__PURE__ */ new Set([...Object.keys(l.surfaces), ...Object.keys(u.surfaces)]); + for (const d of f) { + const h = l.surfaces[d]?.open ?? !1, g = u.surfaces[d]?.open ?? !1; + h !== g && (g ? t.emit({ id: d, props: u.surfaces[d].props }) : n.emit({ id: d })); } } if (l.openMenus !== u.openMenus) { - for (const d of l.openMenus) - u.openMenus.includes(d) || o.emit({ id: d }); - for (const d of u.openMenus) - l.openMenus.includes(d) || r.emit({ id: d }); + for (const f of l.openMenus) + u.openMenus.includes(f) || o.emit({ id: f }); + for (const f of u.openMenus) + l.openMenus.includes(f) || r.emit({ id: f }); } }); const s = () => e.state.get(), i = Mn( @@ -71845,9 +71893,9 @@ function lRe() { function uRe(e, t) { hR(dt, e, t); } -const dRe = wo(cRe), mj = Object.freeze({}); +const dRe = vo(cRe), mj = Object.freeze({}); function Pi(e) { - const t = Rt(dt), n = zt(dt, (o) => o.isOpen(e), !1), r = zt( + const t = Bt(dt), n = Gt(dt, (o) => o.isOpen(e), !1), r = Gt( dt, (o) => o.getSurface(e)?.props ?? mj, mj @@ -71864,14 +71912,14 @@ function Pi(e) { ); } function o8e(e, t, n = {}) { - const r = Rt(dt), o = zt( + const r = Bt(dt), o = Gt( dt, (a) => a.getSurface(e)?.focusRequest ?? 0, 0 - ), [s] = De(Gae), i = n.select ?? !1; + ), [s] = je(Gae), i = n.select ?? !1; Ke(() => s.follow(t.current, r, o, { select: i })); } -const fRe = "attachments", hRe = "attachment-item", Ps = (e) => e.tryGet($m), Su = (e) => Ps(e)?.getSelected()[0] ?? null; +const fRe = "attachments", hRe = "attachment-item", Ps = (e) => e.tryGet(Um), xu = (e) => Ps(e)?.getSelected()[0] ?? null; async function yj(e, t) { const { bytes: n, name: r, mimeType: o } = await e.download(t); Yx(n, r, o ?? void 0); @@ -71907,18 +71955,18 @@ const bj = (e) => { labelKey: "commands.attachment.save", icon: "download", ...wj, - enabled: (e) => Su(e) !== null, + enabled: (e) => xu(e) !== null, run: async (e) => { - const t = Ps(e), n = Su(e); + const t = Ps(e), n = xu(e); t && n && await yj(t, n); } }, { id: "attachment:go-to", labelKey: "commands.attachment.goTo", - visible: (e) => Su(e)?.home.kind === "page", + visible: (e) => xu(e)?.home.kind === "page", run: (e) => { - const t = Su(e); + const t = xu(e); t && Ps(e)?.reveal(t); } }, @@ -71928,12 +71976,12 @@ const bj = (e) => { icon: "trash", ...vj, allowed: (e) => { - const t = Ps(e), n = Su(e); + const t = Ps(e), n = xu(e); return t ? n ? t.canDelete(n) : t.canCreate() : !0; }, - enabled: (e) => Su(e) !== null, + enabled: (e) => xu(e) !== null, run: async (e) => { - const t = Ps(e), n = Su(e); + const t = Ps(e), n = xu(e); t && n && await t.delete(n); } }, @@ -72014,7 +72062,7 @@ function xx(e) { return e.listOpenSurfaces().find((t) => t.exclusive === "mode")?.id ?? null; } function xRe(e) { - return Cm(e).map((t) => { + return Im(e).map((t) => { const n = Xq(e, t).map((r) => e.bars[r]).find((r) => r.title !== void 0 || r.titleKey !== void 0); return { mode: t, @@ -72025,8 +72073,8 @@ function xRe(e) { } const ERe = (e, t) => e.length === t.length && e.every((n, r) => n.mode === t[r].mode && n.title === t[r].title && n.titleKey === t[r].titleKey); function CRe(e, t) { - return e.filter((n) => !t(Zl(n.mode))).map((n) => { - const r = Zl(n.mode); + return e.filter((n) => !t(eu(n.mode))).map((n) => { + const r = eu(n.mode); return { id: r, label: n.title ?? (n.titleKey === void 0 ? n.mode : void 0), @@ -72063,21 +72111,21 @@ const PRe = { icon: "fileImport", shortcut: "Mod+O", categories: ["documents.open"], - visible: (e) => e.tryGet(It)?.canOpenFiles() ?? !1, + visible: (e) => e.tryGet(Pt)?.canOpenFiles() ?? !1, run: async (e) => { - const t = e.tryGet(It); + const t = e.tryGet(Pt); t && ORe(t, IRe(e.args) ?? await NRe()); } -}, RRe = "outline", yP = "outline-rename", mG = "outline-properties", TRe = "outline-item", pl = (e) => e.tryGet(Vm), p0 = (e) => { - const t = pl(e), [n] = t?.getSelected() ?? []; +}, RRe = "outline", yP = "outline-rename", mG = "outline-properties", TRe = "outline-item", gl = (e) => e.tryGet($m), p0 = (e) => { + const t = gl(e), [n] = t?.getSelected() ?? []; return n ? t?.get(n) ?? null : null; -}, My = (e) => p0(e) !== null, xu = { +}, My = (e) => p0(e) !== null, Eu = { categories: ["outline.editing"], - allowed: (e) => pl(e)?.canEdit() ?? !0, + allowed: (e) => gl(e)?.canEdit() ?? !0, notAllowedKey: "commands.notAllowed.doc-outline-modify" }; async function kj(e, t) { - const n = pl(e); + const n = gl(e); if (!n) return; const r = e.tryGet(dt), o = p0(e); r?.open(RRe), r?.open(yP, { props: { after: o?.ref.objectNumber ?? null } }); @@ -72093,7 +72141,7 @@ const MRe = [ labelKey: "commands.outline.add", icon: "plus", shortcut: "Mod+B", - ...xu, + ...Eu, run: (e) => kj(e, (t) => t ? { parent: t.parent, position: { after: t.ref } @@ -72102,14 +72150,14 @@ const MRe = [ { id: "outline:add-child", labelKey: "commands.outline.addChild", - ...xu, + ...Eu, enabled: My, run: (e) => kj(e, (t) => t ? { parent: t.ref } : {}) }, { id: "outline:rename", labelKey: "commands.outline.rename", - ...xu, + ...Eu, enabled: My, run: (e) => { const t = p0(e); @@ -72119,17 +72167,17 @@ const MRe = [ { id: "outline:set-destination", labelKey: "commands.outline.setDestination", - ...xu, - enabled: (e) => My(e) && pl(e)?.getCurrentViewTarget() != null, + ...Eu, + enabled: (e) => My(e) && gl(e)?.getCurrentViewTarget() != null, run: async (e) => { - const t = pl(e), n = p0(e), r = t?.getCurrentViewTarget() ?? null; + const t = gl(e), n = p0(e), r = t?.getCurrentViewTarget() ?? null; t && n && r && await t.update(n.ref, { target: r }); } }, { id: "outline:properties", labelKey: "commands.outline.properties", - ...xu, + ...Eu, enabled: My, run: (e) => { const t = p0(e); @@ -72143,10 +72191,10 @@ const MRe = [ id: "outline:delete", labelKey: "commands.outline.delete", icon: "trash", - ...xu, + ...Eu, enabled: My, run: async (e) => { - const t = pl(e), n = t?.getSelected() ?? []; + const t = gl(e), n = t?.getSelected() ?? []; t && n.length > 0 && await t.delete(n); } }, @@ -72155,23 +72203,23 @@ const MRe = [ labelKey: "commands.outline.more", icon: "dots", menu: TRe, - ...xu + ...Eu }, { id: "outline:expand-all", labelKey: "commands.outline.expandAll", icon: "chevronsDown", categories: ["outline"], - run: (e) => pl(e)?.expandAll() + run: (e) => gl(e)?.expandAll() }, { id: "outline:collapse-all", labelKey: "commands.outline.collapseAll", icon: "chevronsUp", categories: ["outline"], - run: (e) => pl(e)?.collapseAll() + run: (e) => gl(e)?.collapseAll() } -], BRe = "page", yG = "application/pdf", Os = (e) => e.tryGet(Fm), gl = (e) => Os(e)?.getSelected() ?? [], bP = (e) => gl(e).length > 0, JA = (e) => e.tryGet(It)?.listPages(e.documentId ?? void 0) ?? [], bG = (e) => e.args ?? {}, Ed = { +], BRe = "page", yG = "application/pdf", Os = (e) => e.tryGet(Vm), ml = (e) => Os(e)?.getSelected() ?? [], bP = (e) => ml(e).length > 0, JA = (e) => e.tryGet(Pt)?.listPages(e.documentId ?? void 0) ?? [], bG = (e) => e.args ?? {}, Cd = { categories: ["pages"], allowed: (e) => Os(e)?.canEdit() ?? !0, notAllowedKey: "commands.notAllowed.doc-pages-assemble" @@ -72179,7 +72227,7 @@ const MRe = [ function Aj(e) { const t = bG(e).position; if (t) return t; - const n = new Set(gl(e).map((o) => o.objectNumber)), r = JA(e).filter((o) => n.has(o.ref.objectNumber)).pop(); + const n = new Set(ml(e).map((o) => o.objectNumber)), r = JA(e).filter((o) => n.has(o.ref.objectNumber)).pop(); return r ? { after: r.ref } : "end"; } async function _Re(e) { @@ -72190,16 +72238,16 @@ async function _Re(e) { } function LRe(e) { const t = e.documentId ?? void 0; - return `${e.tryGet(It)?.get(t)?.name?.replace(/\.pdf$/i, "") || "document"}-pages.pdf`; + return `${e.tryGet(Pt)?.get(t)?.name?.replace(/\.pdf$/i, "") || "document"}-pages.pdf`; } const Sj = (e, t, n, r) => ({ id: e, labelKey: t, icon: n, - ...Ed, + ...Cd, enabled: bP, run: async (o) => { - const s = gl(o); + const s = ml(o); s.length > 0 && await Os(o)?.rotateBy(s, r); } }), DRe = [ @@ -72209,13 +72257,13 @@ const Sj = (e, t, n, r) => ({ id: "page:delete", labelKey: "commands.pages.delete", icon: "trash", - ...Ed, + ...Cd, enabled: (e) => { - const t = gl(e).length; + const t = ml(e).length; return t > 0 && t < JA(e).length; }, run: async (e) => { - const t = gl(e); + const t = ml(e); t.length > 0 && await Os(e)?.delete(t); } }, @@ -72223,10 +72271,10 @@ const Sj = (e, t, n, r) => ({ id: "page:duplicate", labelKey: "commands.pages.duplicate", icon: "copy", - ...Ed, + ...Cd, enabled: bP, run: async (e) => { - const t = Os(e), n = gl(e); + const t = Os(e), n = ml(e); if (!t || n.length === 0) return; const { pages: r } = await t.duplicate(n); t.select(r); @@ -72236,7 +72284,7 @@ const Sj = (e, t, n, r) => ({ id: "page:insert-blank", labelKey: "commands.pages.insertBlank", icon: "filePlus", - ...Ed, + ...Cd, run: async (e) => { const t = Os(e); if (!t) return; @@ -72248,7 +72296,7 @@ const Sj = (e, t, n, r) => ({ id: "page:insert-file", labelKey: "commands.pages.insertFile", icon: "fileImport", - ...Ed, + ...Cd, run: async (e) => { const t = Os(e); if (!t) return; @@ -72272,15 +72320,15 @@ const Sj = (e, t, n, r) => ({ notAllowedKey: "commands.notAllowed.doc-download", enabled: bP, run: async (e) => { - const t = gl(e), n = Os(e); + const t = ml(e), n = Os(e); !n || t.length === 0 || Yx(await n.extract(t), LRe(e), yG); } }, { id: "page:select-all", labelKey: "commands.pages.selectAll", - categories: Ed.categories, - enabled: (e) => gl(e).length < JA(e).length, + categories: Cd.categories, + enabled: (e) => ml(e).length < JA(e).length, run: (e) => Os(e)?.select(JA(e).map((t) => t.ref)) }, { @@ -72288,39 +72336,39 @@ const Sj = (e, t, n, r) => ({ labelKey: "commands.pages.more", icon: "dots", menu: BRe, - ...Ed + ...Cd } -], wG = "go-to-page", vG = "shortcuts", xj = "redact-confirm", jRe = "print", Ej = "form-design", FRe = "form-edit", Cj = (e) => e.tryGet(Ss)?.isDesigning() ?? !1, VRe = "embedpdf-custom", at = (e) => e.tryGet(Zt), Ck = (e) => (at(e)?.getPageCount() ?? 0) > 1, Pn = (e) => e.tryGet(yr), jt = (e) => e.tryGet(vt), YA = (e) => e.tryGet(_r), QA = (e) => e.tryGet(Wo), Ik = (e) => QA(e)?.getSnapshot() ?? null, $Re = ele.find((e) => "id" in e && e.id === "document:download"), URe = (e, t) => { - const n = e.tryGet(It), r = e.documentId ?? void 0; +], wG = "go-to-page", vG = "shortcuts", xj = "redact-confirm", jRe = "print", Ej = "form-design", FRe = "form-edit", Cj = (e) => e.tryGet(Ss)?.isDesigning() ?? !1, VRe = "embedpdf-custom", ct = (e) => e.tryGet(tn), Ck = (e) => (ct(e)?.getPageCount() ?? 0) > 1, Pn = (e) => e.tryGet(yr), Ut = (e) => e.tryGet(vt), YA = (e) => e.tryGet(_r), QA = (e) => e.tryGet(qo), Ik = (e) => QA(e)?.getSnapshot() ?? null, $Re = ele.find((e) => "id" in e && e.id === "document:download"), URe = (e, t) => { + const n = e.tryGet(Pt), r = e.documentId ?? void 0; return `${(n?.get(r)?.name ?? "document").replace(/\.pdf$/i, "")} p${(n?.listPages(r).findIndex((o) => o.ref.objectNumber === t.objectNumber) ?? -1) + 1}.png`; -}, Ht = { - allowed: (e) => jt(e)?.canCreate() ?? !0, +}, qt = { + allowed: (e) => Ut(e)?.canCreate() ?? !0, notAllowedKey: "commands.notAllowed.annotations-create" -}, vc = { +}, kc = { allowed: (e) => e.tryGet(Ss)?.canDesign() ?? !0, notAllowedKey: "commands.notAllowed.doc-forms-modify" }, Ij = { allowed: (e) => e.tryGet(Qn)?.canPlace(e.documentId ?? void 0) ?? !0, notAllowedKey: "commands.notAllowed.annotations-create" }, KRe = (e, t) => e === t || !!e && !!t && e.start.page.objectNumber === t.start.page.objectNumber && e.start.index === t.start.index && e.end.page.objectNumber === t.end.page.objectNumber && e.end.index === t.end.index, Nk = (e, t) => ({ - run: (n) => n.tryGet(bo)?.execute(eu(e), { documentId: n.documentId ?? void 0 }), + run: (n) => n.tryGet(wo)?.execute(tu(e), { documentId: n.documentId ?? void 0 }), active: (n) => n.tryGet(dt)?.isOpen(e) ?? !1, - visible: (n) => (n.tryGet(bo)?.hasCommand(eu(e)) ?? !1) && (t?.(n) ?? !0) + visible: (n) => (n.tryGet(wo)?.hasCommand(tu(e)) ?? !1) && (t?.(n) ?? !0) }), OI = (e) => { - const t = at(e)?.getCurrentPage(); + const t = ct(e)?.getCurrentPage(); return t != null && (e.tryGet(gi)?.canMeasure(t) ?? !1); -}, PI = (e) => (jt(e)?.selection.getSelected().length ?? 0) > 0, RI = (e) => { - const t = jt(e); +}, PI = (e) => (Ut(e)?.selection.getSelected().length ?? 0) > 0, RI = (e) => { + const t = Ut(e); return (t?.selection.getSelected() ?? []).every(({ ref: n }) => t.isEditable(n)); -}, Nj = (e) => (jt(e)?.selection.getProperties().properties ?? []).some((t) => t.key === "orientation"), TI = (e) => new Set((jt(e)?.selection.getSelected() ?? []).map((t) => t.subtype)), MI = (e) => { - const t = jt(e)?.selection.getSelected() ?? []; +}, Nj = (e) => (Ut(e)?.selection.getProperties().properties ?? []).some((t) => t.key === "orientation"), TI = (e) => new Set((Ut(e)?.selection.getSelected() ?? []).map((t) => t.subtype)), MI = (e) => { + const t = Ut(e)?.selection.getSelected() ?? []; return t.every((n) => n.subtype === "redact") ? t.map((n) => n.ref) : []; }, Ok = (e) => { - const t = jt(e)?.selection.getProperties(); + const t = Ut(e)?.selection.getProperties(); if (!(!t || !t.properties.some((n) => n.key === "link") || t.mixed.includes("link"))) return t.values.link ?? null; -}, Ng = {}; -Ng.stamp = { icon: "rubberStamp" }; +}, Og = {}; +Og.stamp = { icon: "rubberStamp" }; const kG = (e, t, n) => { if (!n) return null; const r = e.tryGet(vt); @@ -72330,7 +72378,7 @@ const kG = (e, t, n) => { primary: s(n.primary), secondary: n.secondary ? s(n.secondary) : void 0 }; -}, AG = {}, SG = (e, t, n, { feature: r, check: o, accent: s }) => (n && (Ng[t] = { +}, AG = {}, SG = (e, t, n, { feature: r, check: o, accent: s }) => (n && (Og[t] = { icon: n, ...s ? { accent: s } : {} }), AG[t] = r, { @@ -72342,7 +72390,7 @@ const kG = (e, t, n) => { active: (i) => Pn(i)?.getActiveToolId() === t, enabled: (i) => Pn(i) != null, iconAccent: (i) => kG(i, t, s) -}), Ot = (e, t, n, r, o) => ({ +}), Tt = (e, t, n, r, o) => ({ ...SG(e, t, r, o), labelKey: n }), BI = (e, t, n, r, o) => ({ @@ -72350,9 +72398,9 @@ const kG = (e, t, n) => { labelKey: n, icon: r, categories: [o], - ...Ht, + ...qt, visible: (s) => YA(s)?.hasSelection() ?? !1, - run: (s) => jt(s)?.createFromSelection(t), + run: (s) => Ut(s)?.createFromSelection(t), iconAccent: (s) => kG(s, t, { primary: "color" }) }), HRe = (e) => { const t = e?.page; @@ -72360,71 +72408,71 @@ const kG = (e, t, n) => { }, By = (e, t, n) => ({ id: e, labelKey: n, - run: (r) => at(r)?.zoomTo({ level: t }), - enabled: (r) => at(r) != null + run: (r) => ct(r)?.zoomTo({ level: t }), + enabled: (r) => ct(r) != null }), _I = (e, t, n, r) => ({ id: e, labelKey: n, icon: r, - run: (o) => at(o)?.updateSettings({ spread: t }), - active: (o) => at(o)?.getSettings().spread === t, - enabled: (o) => at(o) != null, - locked: (o) => at(o)?.getLock("spread") ?? null + run: (o) => ct(o)?.updateSettings({ spread: t }), + active: (o) => ct(o)?.getSettings().spread === t, + enabled: (o) => ct(o) != null, + locked: (o) => ct(o)?.getLock("spread") ?? null }), Oj = (e, t, n, r) => ({ id: e, labelKey: n, icon: r, - run: (o) => at(o)?.updateSettings({ + run: (o) => ct(o)?.updateSettings({ flow: "continuous", layout: t }), active: (o) => { - const s = at(o)?.getSettings(); + const s = ct(o)?.getSettings(); return s?.flow === "continuous" && s.layout === t; }, - enabled: (o) => at(o) != null, - locked: (o) => at(o)?.getLock("flow") ?? at(o)?.getLock("layout") ?? null + enabled: (o) => ct(o) != null, + locked: (o) => ct(o)?.getLock("flow") ?? ct(o)?.getLock("layout") ?? null }), Pj = [ { id: "zoom:in", labelKey: "commands.zoom.in", icon: "zoomIn", shortcut: ["Mod+=", "Mod+NumpadAdd"], - run: (e) => at(e)?.zoomIn(), - enabled: (e) => at(e)?.canZoomIn() ?? !1 + run: (e) => ct(e)?.zoomIn(), + enabled: (e) => ct(e)?.canZoomIn() ?? !1 }, { id: "zoom:out", labelKey: "commands.zoom.out", icon: "zoomOut", shortcut: ["Mod+-", "Mod+NumpadSubtract"], - run: (e) => at(e)?.zoomOut(), - enabled: (e) => at(e)?.canZoomOut() ?? !1 + run: (e) => ct(e)?.zoomOut(), + enabled: (e) => ct(e)?.canZoomOut() ?? !1 }, { id: "zoom:fit-page", labelKey: "commands.zoom.fitPage", icon: "fitToPage", shortcut: "Mod+0", - run: (e) => at(e)?.fitPage(), - active: (e) => at(e)?.getZoomMode() === dr.FitPage, - enabled: (e) => at(e) != null + run: (e) => ct(e)?.fitPage(), + active: (e) => ct(e)?.getZoomMode() === fr.FitPage, + enabled: (e) => ct(e) != null }, { id: "zoom:fit-width", labelKey: "commands.zoom.fitWidth", icon: "fitToWidth", shortcut: "Mod+1", - run: (e) => at(e)?.fitWidth(), - active: (e) => at(e)?.getZoomMode() === dr.FitWidth, - enabled: (e) => at(e) != null + run: (e) => ct(e)?.fitWidth(), + active: (e) => ct(e)?.getZoomMode() === fr.FitWidth, + enabled: (e) => ct(e) != null }, { id: "zoom:automatic", labelKey: "commands.zoom.automatic", - run: (e) => at(e)?.fitAutomatic(), - active: (e) => at(e)?.getZoomMode() === dr.Automatic, - enabled: (e) => at(e) != null + run: (e) => ct(e)?.fitAutomatic(), + active: (e) => ct(e)?.getZoomMode() === fr.Automatic, + enabled: (e) => ct(e) != null }, By("zoom:50", 0.5, "commands.zoom.p50"), By("zoom:100", 1, "commands.zoom.p100"), @@ -72442,8 +72490,8 @@ const kG = (e, t, n) => { labelKey: "commands.page.next", icon: "chevronRight", shortcut: "ArrowRight", - run: (e) => at(e)?.nextPage(), - enabled: (e) => at(e)?.canGoNext() ?? !1, + run: (e) => ct(e)?.nextPage(), + enabled: (e) => ct(e)?.canGoNext() ?? !1, visible: Ck }, { @@ -72451,31 +72499,31 @@ const kG = (e, t, n) => { labelKey: "commands.page.previous", icon: "chevronLeft", shortcut: "ArrowLeft", - run: (e) => at(e)?.previousPage(), - enabled: (e) => at(e)?.canGoPrevious() ?? !1, + run: (e) => ct(e)?.previousPage(), + enabled: (e) => ct(e)?.canGoPrevious() ?? !1, visible: Ck }, { id: "page:first", labelKey: "commands.page.first", shortcut: "Home", - run: (e) => at(e)?.goToFirstPage(), - enabled: (e) => at(e)?.canGoPrevious() ?? !1, + run: (e) => ct(e)?.goToFirstPage(), + enabled: (e) => ct(e)?.canGoPrevious() ?? !1, visible: Ck }, { id: "page:last", labelKey: "commands.page.last", shortcut: "End", - run: (e) => at(e)?.goToLastPage(), - enabled: (e) => at(e)?.canGoNext() ?? !1, + run: (e) => ct(e)?.goToLastPage(), + enabled: (e) => ct(e)?.canGoNext() ?? !1, visible: Ck }, { id: "page:go-to", labelKey: "commands.page.goTo", run: (e) => { - const t = at(e); + const t = ct(e); if (!t) return; const n = HRe(e.args); if (n === null) { @@ -72484,7 +72532,7 @@ const kG = (e, t, n) => { } t.goToPage(Math.min(Math.max(n, 1), t.getPageCount()) - 1); }, - enabled: (e) => (at(e)?.getPageCount() ?? 0) > 0 + enabled: (e) => (ct(e)?.getPageCount() ?? 0) > 0 }, { id: "tool:pan", @@ -72517,9 +72565,9 @@ const kG = (e, t, n) => { categories: ["snapshots"], allowed: (e) => QA(e)?.canSnapshot() ?? !0, notAllowedKey: "commands.notAllowed.doc-content-copy", - run: (e) => Pn(e)?.activateTool(hg), - active: (e) => Pn(e)?.getActiveToolId() === hg, - enabled: (e) => Pn(e)?.hasTool(hg) ?? !1 + run: (e) => Pn(e)?.activateTool(pg), + active: (e) => Pn(e)?.getActiveToolId() === pg, + enabled: (e) => Pn(e)?.hasTool(pg) ?? !1 }, { id: "menu:document", @@ -72544,10 +72592,10 @@ const kG = (e, t, n) => { icon: "download", shortcut: "Mod+S", categories: ["documents.download"], - allowed: (e) => e.tryGet(It)?.canDownload() ?? !0, + allowed: (e) => e.tryGet(Pt)?.canDownload() ?? !0, notAllowedKey: "commands.notAllowed.doc-download", run: (e) => { - e.tryGet(It) && Promise.resolve($Re.run?.(e)).catch((t) => console.warn("[embedpdf] download failed", t)); + e.tryGet(Pt) && Promise.resolve($Re.run?.(e)).catch((t) => console.warn("[embedpdf] download failed", t)); }, enabled: (e) => e.documentId != null }, @@ -72557,7 +72605,7 @@ const kG = (e, t, n) => { icon: "print", shortcut: "Mod+P", categories: ["documents.print"], - allowed: (e) => e.tryGet(It)?.canPrint() ?? !0, + allowed: (e) => e.tryGet(Pt)?.canPrint() ?? !0, notAllowedKey: "commands.notAllowed.doc-print", modal: jRe, enabled: (e) => e.documentId != null @@ -72571,26 +72619,26 @@ const kG = (e, t, n) => { id: "view:scroll-paged", labelKey: "commands.scroll.paged", icon: "pageByPage", - run: (e) => at(e)?.updateSettings({ flow: "paged" }), - active: (e) => at(e)?.getSettings().flow === "paged", - enabled: (e) => at(e) != null, - locked: (e) => at(e)?.getLock("flow") ?? null + run: (e) => ct(e)?.updateSettings({ flow: "paged" }), + active: (e) => ct(e)?.getSettings().flow === "paged", + enabled: (e) => ct(e) != null, + locked: (e) => ct(e)?.getLock("flow") ?? null }, { id: "view:rotate-clockwise", labelKey: "commands.rotate.clockwise", icon: "rotateClockwise", - run: (e) => at(e)?.rotateViewBy(90), - enabled: (e) => at(e) != null, - locked: (e) => at(e)?.getLock("viewRotation") ?? null + run: (e) => ct(e)?.rotateViewBy(90), + enabled: (e) => ct(e) != null, + locked: (e) => ct(e)?.getLock("viewRotation") ?? null }, { id: "view:rotate-counterclockwise", labelKey: "commands.rotate.counterclockwise", icon: "rotateCounterClockwise", - run: (e) => at(e)?.rotateViewBy(-90), - enabled: (e) => at(e) != null, - locked: (e) => at(e)?.getLock("viewRotation") ?? null + run: (e) => ct(e)?.rotateViewBy(-90), + enabled: (e) => ct(e) != null, + locked: (e) => ct(e)?.getLock("viewRotation") ?? null }, { id: "mode:view", @@ -72604,110 +72652,110 @@ const kG = (e, t, n) => { return t ? xx(t) === null : !0; } }, - Ch("mode:annotate", "commands.mode.annotate", { feature: "annotations" }), - Ch("mode:shapes", "commands.mode.shapes", { feature: "shapes" }), - Ch("mode:insert", "commands.mode.insert"), - Ch("mode:form", "commands.mode.form", { feature: "forms.building" }), - Ch("mode:redact", "commands.mode.redact", { feature: "redaction" }), - Ch("mode:measure", "commands.mode.measure", { feature: "measurement" }), - Ot("tool:highlight", "highlight", "commands.annotate.highlight", "highlight", { + Nh("mode:annotate", "commands.mode.annotate", { feature: "annotations" }), + Nh("mode:shapes", "commands.mode.shapes", { feature: "shapes" }), + Nh("mode:insert", "commands.mode.insert"), + Nh("mode:form", "commands.mode.form", { feature: "forms.building" }), + Nh("mode:redact", "commands.mode.redact", { feature: "redaction" }), + Nh("mode:measure", "commands.mode.measure", { feature: "measurement" }), + Tt("tool:highlight", "highlight", "commands.annotate.highlight", "highlight", { feature: "annotations.highlight", - check: Ht, + check: qt, accent: { primary: "color" } }), - Ot("tool:strikeout", "strikeout", "commands.annotate.strikeout", "strikethrough", { + Tt("tool:strikeout", "strikeout", "commands.annotate.strikeout", "strikethrough", { feature: "annotations.markup", - check: Ht, + check: qt, accent: { primary: "color" } }), - Ot("tool:underline", "underline", "commands.annotate.underline", "underline", { + Tt("tool:underline", "underline", "commands.annotate.underline", "underline", { feature: "annotations.markup", - check: Ht, + check: qt, accent: { primary: "color" } }), - Ot("tool:squiggly", "squiggly", "commands.annotate.squiggly", "squiggly", { + Tt("tool:squiggly", "squiggly", "commands.annotate.squiggly", "squiggly", { feature: "annotations.markup", - check: Ht, + check: qt, accent: { primary: "color" } }), - Ot("tool:ink", "ink", "commands.annotate.ink", "pencilMarker", { + Tt("tool:ink", "ink", "commands.annotate.ink", "pencilMarker", { feature: "annotations.drawing", - check: Ht, + check: qt, accent: { primary: "color" } }), - Ot("tool:ink-highlight", "ink-highlight", "commands.annotate.inkHighlight", "inkHighlighter", { + Tt("tool:ink-highlight", "ink-highlight", "commands.annotate.inkHighlight", "inkHighlighter", { feature: "annotations.drawing", - check: Ht, + check: qt, accent: { primary: "color" } }), - Ot("tool:free-text", "free-text", "commands.annotate.text", "freeText", { + Tt("tool:free-text", "free-text", "commands.annotate.text", "freeText", { feature: "annotations.text", - check: Ht, + check: qt, accent: { primary: "fontColor" } }), - Ot("tool:insert-text", "insert-text", "commands.annotate.insertText", "insertText", { + Tt("tool:insert-text", "insert-text", "commands.annotate.insertText", "insertText", { feature: "annotations.text", - check: Ht, + check: qt, accent: { primary: "color" } }), - Ot("tool:replace-text", "replace-text", "commands.annotate.replaceText", "replaceText", { + Tt("tool:replace-text", "replace-text", "commands.annotate.replaceText", "replaceText", { feature: "annotations.text", - check: Ht, + check: qt, accent: { primary: "color" } }), - Ot("tool:callout", "free-text-callout", "commands.annotate.callout", "callout", { + Tt("tool:callout", "free-text-callout", "commands.annotate.callout", "callout", { feature: "annotations.text", - check: Ht, + check: qt, accent: { primary: "color", secondary: "interiorColor" } }), - Ot("tool:note", "note", "commands.annotate.note", "message", { + Tt("tool:note", "note", "commands.annotate.note", "message", { feature: "annotations.notes", - check: Ht + check: qt }), - Ot("tool:link", "link", "commands.annotate.link", "link", { + Tt("tool:link", "link", "commands.annotate.link", "link", { feature: "annotations.links", - check: Ht + check: qt }), - Ot("tool:square", "square", "commands.shapes.rectangle", "square", { + Tt("tool:square", "square", "commands.shapes.rectangle", "square", { feature: "shapes", - check: Ht, + check: qt, accent: { primary: "color", secondary: "interiorColor" } }), - Ot("tool:circle", "circle", "commands.shapes.circle", "circle", { + Tt("tool:circle", "circle", "commands.shapes.circle", "circle", { feature: "shapes", - check: Ht, + check: qt, accent: { primary: "color", secondary: "interiorColor" } }), - Ot("tool:line", "line", "commands.shapes.line", "line", { + Tt("tool:line", "line", "commands.shapes.line", "line", { feature: "shapes", - check: Ht, + check: qt, accent: { primary: "color" } }), - Ot("tool:arrow", "arrow", "commands.shapes.arrow", "lineArrow", { + Tt("tool:arrow", "arrow", "commands.shapes.arrow", "lineArrow", { feature: "shapes", - check: Ht, + check: qt, accent: { primary: "color" } }), - Ot("tool:polygon", "polygon", "commands.shapes.polygon", "polygon", { + Tt("tool:polygon", "polygon", "commands.shapes.polygon", "polygon", { feature: "shapes", - check: Ht, + check: qt, accent: { primary: "color", secondary: "interiorColor" } }), - Ot("tool:polyline", "polyline", "commands.shapes.polyline", "zigzag", { + Tt("tool:polyline", "polyline", "commands.shapes.polyline", "zigzag", { feature: "shapes", - check: Ht, + check: qt, accent: { primary: "color" } }), { @@ -72718,9 +72766,9 @@ const kG = (e, t, n) => { ...Ij, ...Nk("stamps", (e) => e.tryGet(Qn) != null) }, - Ot("tool:attachment", "attachment", "commands.insert.attachment", "paperclip", { + Tt("tool:attachment", "attachment", "commands.insert.attachment", "paperclip", { feature: "attachments.adding", - check: Ht + check: qt }), { id: "tool:signature", @@ -72730,16 +72778,16 @@ const kG = (e, t, n) => { ...Ij, ...Nk("signatures", (e) => e.tryGet(Qn) != null && e.tryGet(vs) != null) }, - Ot("tool:image", "image", "commands.insert.image", "photo", { + Tt("tool:image", "image", "commands.insert.image", "photo", { feature: "stamps", - check: Ht + check: qt }), { id: "form:design", labelKey: "commands.form.design", icon: "formDesign", categories: ["forms.building"], - ...vc, + ...kc, run: (e) => { const t = Pn(e), n = e.tryGet(dt); if (t) { @@ -72753,35 +72801,35 @@ const kG = (e, t, n) => { active: Cj, enabled: (e) => Pn(e) != null }, - Ot("tool:text-field", "form-text", "commands.form.textfield", "formTextfield", { + Tt("tool:text-field", "form-text", "commands.form.textfield", "formTextfield", { feature: "forms.building", - check: vc + check: kc }), - Ot("tool:checkbox", "form-checkbox", "commands.form.checkbox", "formCheckbox", { + Tt("tool:checkbox", "form-checkbox", "commands.form.checkbox", "formCheckbox", { feature: "forms.building", - check: vc + check: kc }), - Ot("tool:radio", "form-radio", "commands.form.radio", "formRadio", { + Tt("tool:radio", "form-radio", "commands.form.radio", "formRadio", { feature: "forms.building", - check: vc + check: kc }), - Ot("tool:combo-box", "form-combobox", "commands.form.select", "formSelect", { + Tt("tool:combo-box", "form-combobox", "commands.form.select", "formSelect", { feature: "forms.building", - check: vc + check: kc }), - Ot("tool:list-box", "form-listbox", "commands.form.listbox", "formListbox", { + Tt("tool:list-box", "form-listbox", "commands.form.listbox", "formListbox", { feature: "forms.building", - check: vc + check: kc }), - Ot("tool:button", "form-button", "commands.form.button", "formButton", { + Tt("tool:button", "form-button", "commands.form.button", "formButton", { feature: "forms.building", - check: vc + check: kc }), - Ot("tool:signature-field", "form-signature", "commands.form.signature", "signature", { + Tt("tool:signature-field", "form-signature", "commands.form.signature", "signature", { feature: "forms.building", - check: vc + check: kc }), - Ot("tool:redact", "redact", "commands.redact.mark", "redactArea", { + Tt("tool:redact", "redact", "commands.redact.mark", "redactArea", { feature: "redaction", check: { allowed: (e) => e.tryGet(oa)?.canMark() ?? !0, @@ -72818,25 +72866,25 @@ const kG = (e, t, n) => { } }, { - ...Ot("tool:distance", "distance", "measurement.distance", "distance", { + ...Tt("tool:distance", "distance", "measurement.distance", "distance", { feature: "measurement", - check: Ht, + check: qt, accent: { primary: "color" } }), enabled: OI }, { - ...Ot("tool:perimeter", "perimeter", "measurement.perimeter", "perimeter", { + ...Tt("tool:perimeter", "perimeter", "measurement.perimeter", "perimeter", { feature: "measurement", - check: Ht, + check: qt, accent: { primary: "color" } }), enabled: OI }, { - ...Ot("tool:area", "area", "measurement.area", "area", { + ...Tt("tool:area", "area", "measurement.area", "area", { feature: "measurement", - check: Ht, + check: qt, accent: { primary: "color" } }), enabled: OI @@ -72856,15 +72904,15 @@ const kG = (e, t, n) => { id: "annotation:cancel-creation", labelKey: "commands.annotate.cancelCreation", shortcut: "Escape", - enabled: (e) => jt(e)?.draft.get() != null, - run: (e) => jt(e)?.draft.cancel() + enabled: (e) => Ut(e)?.draft.get() != null, + run: (e) => Ut(e)?.draft.cancel() }, { id: "annotation:disarm-stamp", labelKey: "commands.annotate.disarmStamp", shortcut: "Escape", - enabled: (e) => jt(e)?.stamps.isArmed() ?? !1, - run: (e) => jt(e)?.stamps.disarm() + enabled: (e) => Ut(e)?.stamps.isArmed() ?? !1, + run: (e) => Ut(e)?.stamps.disarm() }, { id: "annotation:delete", @@ -72872,10 +72920,10 @@ const kG = (e, t, n) => { icon: "trash", shortcut: ["Delete", "Backspace"], categories: ["annotations"], - run: (e) => void jt(e)?.selection.delete(), + run: (e) => void Ut(e)?.selection.delete(), visible: PI, enabled: (e) => { - const t = jt(e), n = t?.selection.getSelected() ?? []; + const t = Ut(e), n = t?.selection.getSelected() ?? []; return n.length > 0 && n.every(({ ref: r }) => t.canDelete(r) && t.isEditable(r)); } }, @@ -72891,7 +72939,7 @@ const kG = (e, t, n) => { labelKey: "commands.style", icon: "palette", categories: ["annotations"], - ...Nk("style", (e) => (jt(e)?.selection.getProperties().properties.length ?? 0) > 0) + ...Nk("style", (e) => (Ut(e)?.selection.getProperties().properties.length ?? 0) > 0) }, { id: "annotation:stamp-from-selection", @@ -72901,23 +72949,23 @@ const kG = (e, t, n) => { allowed: (e) => e.tryGet(Qn)?.canCreateFromAnnotations(e.documentId ?? void 0) ?? !0, notAllowedKey: "commands.notAllowed.doc-download", run: (e) => { - const t = jt(e), n = e.tryGet(Qn), r = e.documentId; + const t = Ut(e), n = e.tryGet(Qn), r = e.documentId; if (!t || !n || r == null) return; const o = t.selection.getSelected(), s = o[0]?.ref.page; if (s === void 0) return; - const i = e.tryGet(vo), a = i?.t("demo.stampsCustomLabel") ?? "Custom stamp", c = i?.t("demo.stampsCustomLibrary") ?? "My stamps", l = VRe; + const i = e.tryGet(ko), a = i?.t("demo.stampsCustomLabel") ?? "Custom stamp", c = i?.t("demo.stampsCustomLibrary") ?? "My stamps", l = VRe; (n.getLibrary(l) ? Promise.resolve(l) : n.createLibrary(c, { id: l, categories: ["custom"] - }).then(({ library: u }) => u.id)).then((u) => n.createAssetFromAnnotations(s, o.map((d) => d.ref), { + }).then(({ library: u }) => u.id)).then((u) => n.createAssetFromAnnotations(s, o.map((f) => f.ref), { libraryId: u, label: `${a} ${n.listAssets({ libraryId: u }).length + 1}` }, { documentId: r })).then(async () => { const u = e.tryGet(dt); - u && (u.isOpen("stamps") || await e.tryGet(bo)?.execute(eu("stamps"), { documentId: r }), u.updateSurfaceProps("stamps", { libraryId: l })); + u && (u.isOpen("stamps") || await e.tryGet(wo)?.execute(tu("stamps"), { documentId: r }), u.updateSurfaceProps("stamps", { libraryId: l })); }).catch((u) => console.warn("[embedpdf] stamp from selection failed", u)); }, - visible: (e) => e.tryGet(Qn) != null && PI(e) && !TI(e).has("widget") && !TI(e).has("redact") && new Set((jt(e)?.selection.getSelected() ?? []).map((t) => t.ref.page.objectNumber)).size === 1 + visible: (e) => e.tryGet(Qn) != null && PI(e) && !TI(e).has("widget") && !TI(e).has("redact") && new Set((Ut(e)?.selection.getSelected() ?? []).map((t) => t.ref.page.objectNumber)).size === 1 }, { id: "annotation:duplicate", @@ -72926,24 +72974,24 @@ const kG = (e, t, n) => { shortcut: "Mod+D", categories: ["annotations"], allowed: (e) => { - const t = jt(e); + const t = Ut(e); return (t?.selection.getSelected() ?? []).some(({ subtype: n }) => n !== "widget") ? t?.canCreate() ?? !0 : !0; }, - notAllowedKey: Ht.notAllowedKey, - run: (e) => void jt(e)?.selection.duplicate().catch(() => { + notAllowedKey: qt.notAllowedKey, + run: (e) => void Ut(e)?.selection.duplicate().catch(() => { }), visible: (e) => { - const t = jt(e), n = t?.selection.getSelected() ?? []; + const t = Ut(e), n = t?.selection.getSelected() ?? []; return n.length > 0 && RI(e) && n.every(({ ref: r }) => t.isMovable(r)); }, - enabled: (e) => jt(e)?.selection.canDuplicate() ?? !1 + enabled: (e) => Ut(e)?.selection.canDuplicate() ?? !1 }, { id: "annotation:rotate-counterclockwise", labelKey: "commands.annotate.rotateCounterclockwise", icon: "rotateCounterClockwise", categories: ["annotations"], - run: (e) => void jt(e)?.selection.rotateBy(-90).catch(() => { + run: (e) => void Ut(e)?.selection.rotateBy(-90).catch(() => { }), visible: Nj }, @@ -72952,7 +73000,7 @@ const kG = (e, t, n) => { labelKey: "commands.annotate.rotateClockwise", icon: "rotateClockwise", categories: ["annotations"], - run: (e) => void jt(e)?.selection.rotateBy(90).catch(() => { + run: (e) => void Ut(e)?.selection.rotateBy(90).catch(() => { }), visible: Nj }, @@ -72961,16 +73009,16 @@ const kG = (e, t, n) => { labelKey: "commands.annotate.group", icon: "group", categories: ["annotations"], - run: (e) => void jt(e)?.selection.group(), - visible: (e) => (jt(e)?.selection.canGroup() ?? !1) && RI(e) + run: (e) => void Ut(e)?.selection.group(), + visible: (e) => (Ut(e)?.selection.canGroup() ?? !1) && RI(e) }, { id: "annotation:ungroup", labelKey: "commands.annotate.ungroup", icon: "ungroup", categories: ["annotations"], - run: (e) => void jt(e)?.selection.ungroup(), - visible: (e) => (jt(e)?.selection.canUngroup() ?? !1) && RI(e) + run: (e) => void Ut(e)?.selection.ungroup(), + visible: (e) => (Ut(e)?.selection.canUngroup() ?? !1) && RI(e) }, { id: "selection:copy", @@ -73045,7 +73093,7 @@ const kG = (e, t, n) => { icon: "externalLink", run: (e) => { const t = Ok(e); - t && e.tryGet(Pf)?.activate(t); + t && e.tryGet(Tf)?.activate(t); }, visible: (e) => Ok(e) != null }, @@ -73054,7 +73102,7 @@ const kG = (e, t, n) => { labelKey: "commands.annotate.removeLink", icon: "linkOff", categories: ["annotations.links"], - run: (e) => jt(e)?.selection.updateLink(null), + run: (e) => Ut(e)?.selection.updateLink(null), visible: (e) => Ok(e) != null }, { @@ -73069,19 +73117,19 @@ const kG = (e, t, n) => { labelKey: "commands.undo", icon: "arrowBackUp", shortcut: "Mod+z", - run: (e) => e.tryGet(rg)?.undo(), - enabled: (e) => e.tryGet(rg)?.canUndo() ?? !1 + run: (e) => e.tryGet(og)?.undo(), + enabled: (e) => e.tryGet(og)?.canUndo() ?? !1 }, { id: "history:redo", labelKey: "commands.redo", icon: "arrowForwardUp", shortcut: ["Shift+Mod+z", "Mod+y"], - run: (e) => e.tryGet(rg)?.redo(), - enabled: (e) => e.tryGet(rg)?.canRedo() ?? !1 + run: (e) => e.tryGet(og)?.redo(), + enabled: (e) => e.tryGet(og)?.canRedo() ?? !1 } ]; -function Ch(e, t, { feature: n } = {}) { +function Nh(e, t, { feature: n } = {}) { return { id: e, labelKey: t, @@ -73096,23 +73144,23 @@ function zRe(e, t) { return e.flatMap((n) => { const r = `tool:${n.id}`; if (t(r)) return []; - const o = n.extends, s = n.meta ?? {}, i = typeof s.icon == "string" ? s.icon : o && Ng[o]?.icon; + const o = n.extends, s = n.meta ?? {}, i = typeof s.icon == "string" ? s.icon : o && Og[o]?.icon; return [{ ...SG(r, n.id, i || void 0, { feature: o && AG[o] || "annotations", - check: Ht, - ...o && Ng[o]?.accent ? { accent: Ng[o].accent } : {} + check: qt, + ...o && Og[o]?.accent ? { accent: Og[o].accent } : {} }), label: typeof s.label == "string" ? s.label : n.id }]; }); } -const Ih = { +const Oh = { id: "style", items: ["panel:style"], importance: 4, dependent: !0 -}, Nh = { +}, Ph = { id: "history", items: ["history:undo", "history:redo"], importance: 3, @@ -73199,8 +73247,8 @@ const Ih = { ], importance: 2 }, - Ih, - Nh + Oh, + Ph ] }, shapes: { @@ -73223,8 +73271,8 @@ const Ih = { items: ["tool:polygon", "tool:polyline"], importance: 2 }, - Ih, - Nh + Oh, + Ph ] }, insert: { @@ -73247,8 +73295,8 @@ const Ih = { ], importance: 4 }, - Ih, - Nh + Oh, + Ph ] }, form: { @@ -73285,8 +73333,8 @@ const Ih = { items: ["tool:signature-field"], importance: 2 }, - Ih, - Nh + Oh, + Ph ] }, redact: { @@ -73299,8 +73347,8 @@ const Ih = { items: ["tool:redact", "panel:redaction"], importance: 4 }, - Ih, - Nh + Oh, + Ph ] }, measure: { @@ -73327,7 +73375,7 @@ const Ih = { }], importance: 4 }, - Ih + Oh ] }, pager: { @@ -73407,7 +73455,7 @@ const Ih = { ], importance: 1 }], - end: [Nh] + end: [Ph] }, outline: { place: { panel: "outline" }, @@ -73607,11 +73655,11 @@ function ZRe(e, t, n, r) { return !1; } }), a = (l) => { - const u = Rj(l), d = u.filter((g) => !i(g)), f = d.length === u.length ? l : { + const u = Rj(l), f = u.filter((g) => !i(g)), d = f.length === u.length ? l : { ...l, - shortcut: d + shortcut: f }, h = o.get(l.id); - return h ? QRe(f, h) : f; + return h ? QRe(d, h) : d; }, c = new Set(e.map((l) => l.id)); return { commands: [...e.map(a), ...[...o.values()].filter((l) => !c.has(l.id))], @@ -73628,20 +73676,20 @@ const Ri = Fn({ warnBeforeLeaving: !0 }), e5e = Ri.Provider; function t5e() { - return Et(Ri).layout; + return Ct(Ri).layout; } function n5e() { - const { size: e, touch: t } = Et(Ri); + const { size: e, touch: t } = Ct(Ri); return { size: e, touch: t }; } function r5e() { - return Et(Ri).warnBeforeLeaving; + return Ct(Ri).warnBeforeLeaving; } function EG() { - const { onPanelResize: e } = Et(Ri); + const { onPanelResize: e } = Ct(Ri); return (t) => e?.(t); } const MT = { @@ -73682,31 +73730,31 @@ function o5e(e, t) { } const zv = Fn(o5e(xG, MT)), s5e = zv.Provider; function Ti() { - return Et(zv); + return Ct(zv); } function oc() { - return Et(zv).env; + return Ct(zv).env; } function i5e(e) { - return Et(zv).menu(e); + return Ct(zv).menu(e); } function BT(e) { - return Et(zv).strip(e) ?? void 0; + return Ct(zv).strip(e) ?? void 0; } function _T() { - return Et(Ri).viewerCommands; + return Ct(Ri).viewerCommands; } function CG() { - return Et(Ri).icons; + return Ct(Ri).icons; } function IG() { - return Et(Ri).stamp; + return Ct(Ri).stamp; } function s8e() { - return Et(Ri).signature; + return Ct(Ri).signature; } function a5e() { - return Et(Ri).fonts; + return Ct(Ri).fonts; } const c5e = (e) => Array.isArray(e); function l5e(e) { @@ -74321,8 +74369,8 @@ function PG(e, t) { const n = Object.prototype.hasOwnProperty.call(t, e) ? t[e] : void 0; return n !== void 0 ? l5e(n) : u5e(e) ? OG[e] : null; } -const d5e = /* @__PURE__ */ new Set(["chevronLeft", "chevronRight"]), Im = (e) => d5e.has(e) ? "rtl:-scale-x-100" : ""; -function Nt({ name: e, size: t = 20, strokeWidth: n = 2, className: r, title: o, accent: s }) { +const d5e = /* @__PURE__ */ new Set(["chevronLeft", "chevronRight"]), Nm = (e) => d5e.has(e) ? "rtl:-scale-x-100" : ""; +function Rt({ name: e, size: t = 20, strokeWidth: n = 2, className: r, title: o, accent: s }) { const i = PG(e, CG()); return i ? /* @__PURE__ */ P("svg", { width: t, @@ -75250,21 +75298,21 @@ function k5e(e = {}) { a.en = () => c().then((l) => Pk(Mj, l)); } for (const [c, l] of Object.entries(Bj)) { - const u = o.get(c), d = u?.load, f = u?.words; - a[c] = d ? () => Promise.all([l(), d()]).then(([h, g]) => Pk(h, g)) : f ? () => l().then((h) => Pk(h, f)) : l; + const u = o.get(c), f = u?.load, d = u?.words; + a[c] = f ? () => Promise.all([l(), f()]).then(([h, g]) => Pk(h, g)) : d ? () => l().then((h) => Pk(h, d)) : l; } for (const [c, { words: l, load: u }] of o) { if (n(c) !== void 0) continue; - const d = { + const f = { code: c, name: v5e(c), direction: w5e(c) }; - u ? a[c] = () => u().then((f) => ({ - ...d, - translations: f + u ? a[c] = () => u().then((d) => ({ + ...f, + translations: d })) : i.push({ - ...d, + ...f, translations: l ?? {} }); } @@ -75287,7 +75335,7 @@ function A5e({ locale: e, children: t }) { }); } function i8e() { - return Et(TG); + return Ct(TG); } const S5e = { top: !1, @@ -75345,37 +75393,37 @@ function DG(e, t) { typeof e.showPopover == "function" && e.showPopover(); let r = ""; const o = () => { - const d = _G(e), f = n?.getBoundingClientRect() ?? { + const f = _G(e), d = n?.getBoundingClientRect() ?? { left: 0, top: 0, - right: d.width, - bottom: d.height - }, h = Math.max(0, f.left), g = Math.max(0, f.top), p = { + right: f.width, + bottom: f.height + }, h = Math.max(0, d.left), g = Math.max(0, d.top), p = { left: h, top: g, - width: Math.max(0, Math.min(d.width, f.right) - h), - height: Math.max(0, Math.min(d.height, f.bottom) - g) - }, m = `${p.left},${p.top},${p.width},${p.height},${d.width},${d.height}`; - m !== r && (r = m, N5e(e, p), t?.(MG(f, d))); + width: Math.max(0, Math.min(f.width, d.right) - h), + height: Math.max(0, Math.min(f.height, d.bottom) - g) + }, m = `${p.left},${p.top},${p.width},${p.height},${f.width},${f.height}`; + m !== r && (r = m, N5e(e, p), t?.(MG(d, f))); }; o(); const s = new ResizeObserver(o); n && s.observe(n); const i = Qx(o), a = e.ownerDocument, c = () => { if (typeof e.showPopover != "function" || !e.matches(":popover-open")) return; - const d = Gr(a); - e.hidePopover(), e.showPopover(), d && d !== Gr(a) && d.focus({ preventScroll: !0 }); + const f = Jr(a); + e.hidePopover(), e.showPopover(), f && f !== Jr(a) && f.focus({ preventScroll: !0 }); }, l = () => { n && I5e(n) && c(); - }, u = (d) => { - d.newState === "open" && c(); + }, u = (f) => { + f.newState === "open" && c(); }; return a.addEventListener("fullscreenchange", l), n?.addEventListener("toggle", u), () => { a.removeEventListener("fullscreenchange", l), n?.removeEventListener("toggle", u), i(), s.disconnect(), typeof e.hidePopover == "function" && e.matches(":popover-open") && e.hidePopover(); }; } function oE(e, t) { - const n = e.ownerDocument, r = Gr(n), o = (a) => { + const n = e.ownerDocument, r = Jr(n), o = (a) => { a.key !== "Escape" || a.defaultPrevented || (a.preventDefault(), a.stopPropagation(), t.onEscape()); }; e.addEventListener("keydown", o); @@ -75391,14 +75439,14 @@ function oE(e, t) { standDown: i, release: () => { i(); - const a = Gr(n), c = a === null || e.contains(a) || a.hasAttribute("data-epdf-focus-root"); + const a = Jr(n), c = a === null || e.contains(a) || a.hasAttribute("data-epdf-focus-root"); r?.isConnected && c && r.focus(); } }; } const jG = Fn("top"), Wv = jG.Provider; function DT() { - return Et(jG); + return Ct(jG); } function FG(e, t, n = "start", r = "above") { return e === "start" || e === "end" ? `${e === "start" == (t === "ltr") ? "right" : "left"}-${n}` : `${e === "bottom" || e === "float-bottom" || e === "selection" && r === "above" ? "top" : "bottom"}-${n === "start" == (t === "ltr") ? "start" : "end"}`; @@ -75441,30 +75489,30 @@ function KG(e, t, n, r) { const a = e.getBoundingClientRect(); (Math.abs(a.left - s) > 0.5 || Math.abs(a.top - i) > 0.5) && (e.style.left = `${2 * s - a.left}px`, e.style.top = `${2 * i - a.top}px`); } -let Oh = null, Lj = Number.NEGATIVE_INFINITY; +let Rh = null, Lj = Number.NEGATIVE_INFINITY; const Dj = (e) => e.pointerType === "touch"; function P5e(e, t, n) { let r = null, o = !1, s = !1, i = !1, a = !1, c, l; - const u = { hide: () => p() }, d = () => { + const u = { hide: () => p() }, f = () => { clearTimeout(c), clearTimeout(l); - }, f = () => e.getAttribute("aria-expanded") === "true", h = () => Oh !== null || Date.now() - Lj < 300, g = (y) => { - if (d(), !(r === y || r === "pointer")) { + }, d = () => e.getAttribute("aria-expanded") === "true", h = () => Rh !== null || Date.now() - Lj < 300, g = (y) => { + if (f(), !(r === y || r === "pointer")) { if (r === null) { if (t.canShow && !t.canShow()) return; - Oh !== u && Oh?.hide(), Oh = u, n.addEventListener("keydown", w, !0); + Rh !== u && Rh?.hide(), Rh = u, n.addEventListener("keydown", w, !0); } r = y, t.show(y); } }, p = () => { - d(), r !== null && (r = null, Oh === u && (Oh = null), Lj = Date.now(), n.removeEventListener("keydown", w, !0), t.hide()); + f(), r !== null && (r = null, Rh === u && (Rh = null), Lj = Date.now(), n.removeEventListener("keydown", w, !0), t.hide()); }, m = () => { clearTimeout(l), l = setTimeout(p, 100); }, v = (y) => { - Dj(y) || (o = !0, clearTimeout(l), !(a || f()) && (r !== null || h() ? g("pointer") : c = setTimeout(() => g("pointer"), 500))); + Dj(y) || (o = !0, clearTimeout(l), !(a || d()) && (r !== null || h() ? g("pointer") : c = setTimeout(() => g("pointer"), 500))); }, S = (y) => { Dj(y) || (o = !1, clearTimeout(c), !i && (a = !1, r !== null && !s && m())); }, C = () => { - e.matches(":focus-visible") && (i = !0, !a && !f() && g("focus")); + e.matches(":focus-visible") && (i = !0, !a && !d() && g("focus")); }, k = () => { i = !1, !(o || s) && (a = !1, p()); }, N = () => { @@ -75485,14 +75533,14 @@ function P5e(e, t, n) { }; } const R5e = 6, T5e = '[inert], [aria-hidden="true"]', M5e = "bg-tooltip text-tooltip-fg m-0 max-w-64 overflow-visible rounded-sm border border-transparent px-2 py-1 text-start text-xs font-normal leading-4 tracking-normal normal-case whitespace-normal shadow-md transition-opacity duration-100 starting:opacity-0 motion-reduce:transition-none", jj = (e) => e.label !== "" && (!e.labelShown || !!e.shortcut || !!e.reason), B5e = (e) => e !== null && (e.scrollWidth > e.clientWidth || e.scrollHeight > e.clientHeight); -function sr(e, t = {}) { - const [n, r] = De(null), [o, s] = De(null), i = Re(null), a = DT(), c = xi(), l = t.clipped !== void 0 && e !== null && !jj(e), u = e !== null && (jj(e) || l && e.label !== ""), d = Re(t.clipped); - d.current = t.clipped, Ze(() => { +function ir(e, t = {}) { + const [n, r] = je(null), [o, s] = je(null), i = Re(null), a = DT(), c = xi(), l = t.clipped !== void 0 && e !== null && !jj(e), u = e !== null && (jj(e) || l && e.label !== ""), f = Re(t.clipped); + f.current = t.clipped, Ze(() => { if (!n || !u || n.closest(T5e)) return; const g = n.ownerDocument.defaultView ?? n.ownerDocument, p = P5e(n, { show: s, hide: () => s(null), - canShow: l ? () => B5e(d.current?.(n) ?? null) : void 0 + canShow: l ? () => B5e(f.current?.(n) ?? null) : void 0 }, g); return i.current = p, () => { i.current = null, p.detach(); @@ -75502,13 +75550,13 @@ function sr(e, t = {}) { u, l ]); - const f = u && e !== null && o !== null && n !== null, h = f && (e.labelShown === !0 || t.clipped !== void 0 || n.getAttribute("aria-label") === e.label); + const d = u && e !== null && o !== null && n !== null, h = d && (e.labelShown === !0 || t.clipped !== void 0 || n.getAttribute("aria-label") === e.label); return { trigger: { ref: r, - "aria-describedby": f && (!h || e.shortcut || e.reason) ? c : void 0 + "aria-describedby": d && (!h || e.shortcut || e.reason) ? c : void 0 }, - element: f ? /* @__PURE__ */ P(_5e, { + element: d ? /* @__PURE__ */ P(_5e, { id: c, button: n, content: e, @@ -75520,11 +75568,11 @@ function sr(e, t = {}) { }; } function sE({ content: e, options: t, children: n }) { - const r = sr(e, t); + const r = ir(e, t); return /* @__PURE__ */ P(nt, { children: [n(r.trigger), r.element] }); } function HG({ label: e, reason: t, inMenu: n, ...r }) { - const o = sr({ + const o = ir({ label: e, reason: t }, { inMenu: n }); @@ -75543,11 +75591,11 @@ function _5e({ id: e, button: t, content: n, named: r, interactive: o, placement typeof l.showPopover == "function" && l.showPopover(); const u = () => KG(l, Cx(t), c.current(), R5e); u(); - const d = new ResizeObserver(u); - d.observe(l), d.observe(t); - const f = Qx(u); + const f = new ResizeObserver(u); + f.observe(l), f.observe(t); + const d = Qx(u); return () => { - f(), d.disconnect(), typeof l.hidePopover == "function" && l.matches(":popover-open") && l.hidePopover(); + d(), f.disconnect(), typeof l.hidePopover == "function" && l.matches(":popover-open") && l.hidePopover(); }; }, [t]), /* @__PURE__ */ P("div", { ref: a, @@ -75617,10 +75665,10 @@ function j5e(e) { for (let r = 0; r < t.length; r++) n[r] = t.charCodeAt(r); return n; } -const Og = "embedpdf-standard", F5e = "standard"; +const Pg = "embedpdf-standard", F5e = "standard"; function V5e(e) { const t = `${F5e}:`; - return e.startsWith(t) ? `${Og}:${e.slice(t.length)}` : e; + return e.startsWith(t) ? `${Pg}:${e.slice(t.length)}` : e; } function $5e(e) { return Uv(L5e, [e, ...typeof navigator < "u" ? navigator.languages ?? [] : []]) ?? "en"; @@ -75633,8 +75681,8 @@ function K5e(e, t, n) { const i = (async () => { await o?.promise.catch(() => { }); - const a = e.getLibrary(Og); - a?.locale !== t && (o && !a || (a && await e.deleteLibrary(Og), await e.importLibrary(await U5e(t, r), { id: Og }))); + const a = e.getLibrary(Pg); + a?.locale !== t && (o && !a || (a && await e.deleteLibrary(Pg), await e.importLibrary(await U5e(t, r), { id: Pg }))); })(); return Vj.set(e, { locale: t, @@ -75668,7 +75716,7 @@ function z5e() { const e = E5(), { libraries: t } = IG(); return Ke(() => { WG(e).then(() => H5e(e, t ?? [])).catch((r) => console.error("[embedpdf] stamp libraries failed:", r)); - const n = [Og, ...(t ?? []).map((r) => r.id)]; + const n = [Pg, ...(t ?? []).map((r) => r.id)]; return Ix ? d1e(e, Ix, { except: n }) : void 0; }, [e]), null; } @@ -75688,22 +75736,22 @@ function Kj(e) { const G5e = 'button, a[href], input, select, textarea, [role="tab"], [contenteditable]:not([contenteditable="false"])', FT = "bg-black/30 transition-opacity duration-200 starting:opacity-0", qG = () => { }, GG = Fn(qG), JG = GG.Provider; function J5e() { - return Et(GG); + return Ct(GG); } const Y5e = (e, t) => e.composedPath().some((n) => n instanceof Element && n !== t && n.matches('[aria-modal="true"]')), Q5e = (e) => Object.fromEntries(Object.entries(e ?? {}).map(([t, n]) => [`data-${t}`, n])), X5e = 8; function YG({ label: e, onClose: t, size: n = "content", list: r = !1, trapFocus: o = !0, header: s, width: i, part: a, data: c, children: l }) { - const u = Re(null), d = Re(null), f = Re(null), h = Re(t); + const u = Re(null), f = Re(null), d = Re(null), h = Re(t); h.current = t; - const g = Re(0), p = Re(null), m = () => n === "panel" ? Kj(u.current?.offsetHeight ?? 0) : [f.current?.offsetHeight ?? 0], v = (N, w) => { - const y = f.current; + const g = Re(0), p = Re(null), m = () => n === "panel" ? Kj(u.current?.offsetHeight ?? 0) : [d.current?.offsetHeight ?? 0], v = (N, w) => { + const y = d.current; if (!y || w.length === 0) return; const x = w[0], A = w[w.length - 1]; n === "panel" && (y.style.height = `${Math.min(A, Math.max(x, N))}px`); const b = Math.max(0, x - N); - y.style.translate = b > 0 ? `0 ${b}px` : "", d.current && (d.current.style.opacity = b > 0 ? `${Math.max(0, 1 - b / x)}` : ""); + y.style.translate = b > 0 ? `0 ${b}px` : "", f.current && (f.current.style.opacity = b > 0 ? `${Math.max(0, 1 - b / x)}` : ""); }; Ze(() => { - const N = u.current, w = f.current; + const N = u.current, w = d.current; if (!N || !w) return; const y = DG(N, (b) => { const E = BG(b, [ @@ -75724,7 +75772,7 @@ function YG({ label: e, onClose: t, size: n = "content", list: r = !1, trapFocus }, []); const S = (N) => { if (N.pointerType === "mouse" && N.button !== 0 || N.target.closest(G5e)) return; - const w = f.current; + const w = d.current; if (!w) return; N.currentTarget.setPointerCapture(N.pointerId); const y = w.offsetHeight; @@ -75770,12 +75818,12 @@ function YG({ label: e, onClose: t, size: n = "content", list: r = !1, trapFocus maxHeight: "none" }, children: [/* @__PURE__ */ P("div", { - ref: d, + ref: f, "aria-hidden": "true", className: `absolute inset-0 ${FT} in-data-dragging:transition-none`, onClick: () => h.current() }), /* @__PURE__ */ P("div", { - ref: f, + ref: d, role: o ? "dialog" : void 0, "aria-modal": o ? !0 : void 0, "aria-label": o ? e : void 0, @@ -75807,7 +75855,7 @@ function YG({ label: e, onClose: t, size: n = "content", list: r = !1, trapFocus } const Z5e = (e, t) => b6e(e, t, Zq), eTe = []; function VT(e) { - const t = bt(rE), n = ar(), r = ft(() => e ? eE(e) : null, [e]), o = en( + const t = bt(rE), n = cr(), r = ft(() => e ? eE(e) : null, [e]), o = nn( () => r ? y6e(r, (s) => t.resolveCommand(s, n ?? void 0)) : eTe, Z5e ); @@ -75876,7 +75924,7 @@ const nTe = (e) => ({ flexDirection: e === "vertical" ? "column" : "row", alignItems: "center", flex: "1 0 auto" -}), QG = yv("toolbar-surface"), Nm = yv("toolbar-border"), $T = yv("toolbar-active"), sTe = (e, t, n) => /* @__PURE__ */ P( +}), QG = yv("toolbar-surface"), Om = yv("toolbar-border"), $T = yv("toolbar-active"), sTe = (e, t, n) => /* @__PURE__ */ P( "button", { type: "button", @@ -75895,7 +75943,7 @@ const nTe = (e) => ({ color: "inherit", font: "inherit", background: e.active ? $T : "transparent", - border: `1px solid ${Nm}`, + border: `1px solid ${Om}`, borderRadius: 4, cursor: e.enabled ? "pointer" : "default", opacity: e.enabled ? 1 : 0.4 @@ -75925,7 +75973,7 @@ const XG = (e, t) => /* @__PURE__ */ P( padding: "4px 8px", color: "inherit", font: "inherit", - border: `1px solid ${Nm}`, + border: `1px solid ${Om}`, borderRadius: 4, background: e ? $T : "transparent", cursor: "pointer" @@ -75957,12 +76005,12 @@ function UT({ minWidth: 200, padding: 4, background: QG, - border: `1px solid ${Nm}`, + border: `1px solid ${Om}`, borderRadius: 6, boxShadow: "0 4px 16px rgba(0,0,0,0.15)" }, children: e.sections.map((o, s) => /* @__PURE__ */ P(nt, { children: [ - s > 0 && /* @__PURE__ */ P("div", { style: { height: 1, background: Nm, margin: "4px 0" } }), + s > 0 && /* @__PURE__ */ P("div", { style: { height: 1, background: Om, margin: "4px 0" } }), o.rows.map((i) => { const a = e.resolve(i.command); if (!a) return null; @@ -76023,7 +76071,7 @@ function cTe({ padding: "4px 6px", font: "inherit", borderRadius: 4, - border: `1px solid ${Nm}`, + border: `1px solid ${Om}`, background: QG }, children: e.commands.map((r) => /* @__PURE__ */ P("option", { value: r.id, disabled: !r.enabled, children: r.label }, r.id)) @@ -76036,7 +76084,7 @@ function lTe({ view: e, orientation: t }) { - const [n, r] = De(!1); + const [n, r] = je(!1); return /* @__PURE__ */ P("span", { style: { position: "relative", display: "inline-flex" }, children: [ XG(n, () => r((o) => !o)), /* @__PURE__ */ P( @@ -76052,7 +76100,7 @@ function uTe({ view: e, orientation: t }) { - const [n, r] = De(!1), o = e.commands.some((s) => s.active); + const [n, r] = je(!1), o = e.commands.some((s) => s.active); return /* @__PURE__ */ P("span", { style: { position: "relative", display: "inline-flex" }, children: [ /* @__PURE__ */ P( "button", @@ -76068,7 +76116,7 @@ function uTe({ padding: "4px 6px", color: "inherit", font: "inherit", - border: `1px solid ${Nm}`, + border: `1px solid ${Om}`, borderRadius: 4, // A hint that the active item is in here. background: n || o ? $T : "transparent", @@ -76098,81 +76146,81 @@ function dTe({ renderCustom: c, renderCollapsed: l, renderGroupTrigger: u, - renderSeparator: d, - renderOverflowTrigger: f = XG, + renderSeparator: f, + renderOverflowTrigger: d = XG, renderOverflowMenu: h }) { - const g = Qa(), p = bt(rE), m = ar(), v = t === "vertical", [, S] = Wl((_) => _ + 1, 0); + const g = Qa(), p = bt(rE), m = cr(), v = t === "vertical", [, S] = ql((B) => B + 1, 0); Ke(() => g.subscribe(S), [g]); - const C = Re(null), [k, N] = De(0); + const C = Re(null), [k, N] = je(0); Ze( () => C.current ? kae(C.current, t, N) : void 0, [t] ); - const [w] = De(yae), [, y] = Wl((_) => _ + 1, 0), x = ft( - () => (_, L) => { - w.report(t, _, L) && y(); + const [w] = je(yae), [, y] = ql((B) => B + 1, 0), x = ft( + () => (B, L) => { + w.report(t, B, L) && y(); }, [w, t] ), A = Re(null); Ze(() => { - const _ = C.current; - if (!_) return; - const L = xae(_, t); + const B = C.current; + if (!B) return; + const L = xae(B, t); return A.current = L, () => { L.detach(), A.current = null; }; }, [t]), Ze(() => A.current?.refresh()); - const b = (_) => p.resolveCommand(_, m ?? void 0), E = (_) => void p.execute(_, { documentId: m ?? void 0 }), I = ft(() => eE(e), [e]), O = h6e({ + const b = (B) => p.resolveCommand(B, m ?? void 0), E = (B) => void p.execute(B, { documentId: m ?? void 0 }), I = ft(() => eE(e), [e]), O = h6e({ bar: I, resolve: b, unregistered: eG, execute: E, - menuTarget: (_) => p.getMenuTarget(_), + menuTarget: (B) => p.getMenuTarget(B), metrics: w.metrics(t, n, r), - measureKey: ng, + measureKey: rg, containerLength: k, orientation: t - }), [T, R] = De(!1); + }), [T, R] = je(!1); Ke(() => { O.hasOverflow || R(!1); }, [O.hasOverflow]); - const M = (_) => _.kind === "custom" && !c?.[_.name], F = (_, L) => { - switch (_.kind) { + const M = (B) => B.kind === "custom" && !c?.[B.name], F = (B, L) => { + switch (B.kind) { case "command": - return a(_.command, _.variant, _.run); + return a(B.command, B.variant, B.run); case "custom": { - const j = () => _.terminal ? a(_.terminal, "icon", _.runTerminal) : null, H = c?.[_.name]; + const j = () => B.terminal ? a(B.terminal, "icon", B.runTerminal) : null, H = c?.[B.name]; if (H) { - const Y = H(_.variant, { + const Y = H(B.variant, { layer: L, - measure: (ue) => x(_.measureKey, ue) + measure: (le) => x(B.measureKey, le) }); return Y === void 0 ? j() : Y; } return L === "measure" ? null : /* @__PURE__ */ P( tTe, { - name: _.name, - k: _.measureKey, + name: B.name, + k: B.measureKey, orientation: t, - grow: _.grow, + grow: B.grow, onLength: x, children: j() } ); } case "collapsed": { - const j = l?.(_.view); - return j === void 0 ? /* @__PURE__ */ P(cTe, { view: _.view, orientation: t }) : j; + const j = l?.(B.view); + return j === void 0 ? /* @__PURE__ */ P(cTe, { view: B.view, orientation: t }) : j; } case "disclosure": { - const j = u?.(_.view); - return j === void 0 ? /* @__PURE__ */ P(uTe, { view: _.view, orientation: t }) : j; + const j = u?.(B.view); + return j === void 0 ? /* @__PURE__ */ P(uTe, { view: B.view, orientation: t }) : j; } } - }, B = (_) => _.groups.map((L, j) => /* @__PURE__ */ P(nt, { children: [ - j > 0 && (d ? d() : /* @__PURE__ */ P(iTe, { orientation: t })), + }, _ = (B) => B.groups.map((L, j) => /* @__PURE__ */ P(nt, { children: [ + j > 0 && (f ? f() : /* @__PURE__ */ P(iTe, { orientation: t })), L.parts.map((H) => /* @__PURE__ */ P( "span", { @@ -76182,13 +76230,13 @@ function dTe({ }, H.key )) - ] }, L.id)), $ = (_) => ({ + ] }, L.id)), $ = (B) => ({ display: "flex", flexDirection: v ? "column" : "row", alignItems: "center", gap: n, - flex: _.grows ? "1 0 auto" : "0 0 auto", - ..._.spacing === "balance" ? v ? { marginTop: "auto", marginBottom: "auto" } : { marginLeft: "auto", marginRight: "auto" } : _.spacing === "gap" ? v ? { marginTop: n } : { marginInlineStart: n } : null + flex: B.grows ? "1 0 auto" : "0 0 auto", + ...B.spacing === "balance" ? v ? { marginTop: "auto", marginBottom: "auto" } : { marginLeft: "auto", marginRight: "auto" } : B.spacing === "gap" ? v ? { marginTop: n } : { marginInlineStart: n } : null }), D = { sections: O.overflow, isOpen: T, @@ -76212,34 +76260,34 @@ function dTe({ ...i }, children: [ - O.sections.map((_) => /* @__PURE__ */ P("div", { style: $(_), children: [ - B(_), - _.name === "end" && O.hasOverflow && /* @__PURE__ */ P("span", { ...zj, style: { position: "relative", display: "inline-flex" }, children: [ - f(T, () => R((L) => !L)), + O.sections.map((B) => /* @__PURE__ */ P("div", { style: $(B), children: [ + _(B), + B.name === "end" && O.hasOverflow && /* @__PURE__ */ P("span", { ...zj, style: { position: "relative", display: "inline-flex" }, children: [ + d(T, () => R((L) => !L)), h ? h(D) : /* @__PURE__ */ P(UT, { view: D, orientation: t }) ] }) - ] }, _.name)), + ] }, B.name)), /* @__PURE__ */ P("div", { "aria-hidden": !0, ...w5, style: nTe(t), children: [ - O.measured.filter((_) => !M(_)).map((_) => { - const L = F(_, "measure"); - return _.kind === "custom" && L === null ? null : /* @__PURE__ */ P( + O.measured.filter((B) => !M(B)).map((B) => { + const L = F(B, "measure"); + return B.kind === "custom" && L === null ? null : /* @__PURE__ */ P( Hj, { - k: _.measureKey, + k: B.measureKey, orientation: t, onLength: x, children: L }, - _.measureKey + B.measureKey ); }), /* @__PURE__ */ P( Hj, { - k: ng.overflowTrigger, + k: rg.overflowTrigger, orientation: t, onLength: x, - children: f(!1, () => { + children: d(!1, () => { }) } ) @@ -76367,28 +76415,28 @@ function nJ({ features: e, disable: t, readOnly: n }, r) { const o = tJ(r), s = /* @__PURE__ */ new Map(), i = (l) => { let u = s.get(l); if (!u) { - const d = o.get(l) ?? []; + const f = o.get(l) ?? []; u = { on: !0, - parts: new Map(d.map((f) => [f, !0])) + parts: new Map(f.map((d) => [d, !0])) }, s.set(l, u); } return u; }, a = (l) => { - const u = [...l].sort(([d], [f]) => Number(d.includes(".")) - Number(f.includes("."))); - for (const [d, f] of u) { - const [h, g] = KT(d), p = i(h); + const u = [...l].sort(([f], [d]) => Number(f.includes(".")) - Number(d.includes("."))); + for (const [f, d] of u) { + const [h, g] = KT(f), p = i(h); if (g !== void 0) { - p.parts.set(g, f); + p.parts.set(g, d); continue; } - p.on = f; - for (const m of p.parts.keys()) p.parts.set(m, f); + p.on = d; + for (const m of p.parts.keys()) p.parts.set(m, d); } }, c = (l) => l.map((u) => [u, !1]); - return a(c(fTe)), a(c((t ?? []).filter((l) => !l.includes(":")))), a(Object.entries(e ?? {}).filter((l) => typeof l[1] == "boolean")), a(c(yTe(n))), [...o.keys(), ...s.keys()].filter((l, u, d) => d.indexOf(l) === u && s.has(l)).flatMap((l) => { - const { on: u, parts: d } = s.get(l), f = [...d].filter(([, h]) => !h); - return !u && f.length === d.size ? [l] : f.map(([h]) => `${l}.${h}`); + return a(c(fTe)), a(c((t ?? []).filter((l) => !l.includes(":")))), a(Object.entries(e ?? {}).filter((l) => typeof l[1] == "boolean")), a(c(yTe(n))), [...o.keys(), ...s.keys()].filter((l, u, f) => f.indexOf(l) === u && s.has(l)).flatMap((l) => { + const { on: u, parts: f } = s.get(l), d = [...f].filter(([, h]) => !h); + return !u && d.length === f.size ? [l] : d.map(([h]) => `${l}.${h}`); }); } function bTe(e, t) { @@ -76417,17 +76465,17 @@ function qj(e, t) { } const Gj = (e, t) => typeof e == "boolean" || typeof t == "boolean" ? e === t : e.length === t.length && e.every((n, r) => n === t[r]); function kTe() { - const e = Tt(), t = U1e(wt(Zt, (o) => o.getCurrentPage())), n = Pi("measurement"), r = sr({ label: e("measurement.title") }); + const e = _t(), t = U1e(wt(tn, (o) => o.getCurrentPage())), n = Pi("measurement"), r = ir({ label: e("measurement.title") }); return /* @__PURE__ */ P(nt, { children: [/* @__PURE__ */ P("button", { ...r.trigger, type: "button", - part: Jr(n.isOpen), - className: Ho(n.isOpen), + part: Yr(n.isOpen), + className: zo(n.isOpen), "aria-pressed": n.isOpen, onClick: () => n.toggle(), children: /* @__PURE__ */ P("span", { className: "flex items-center whitespace-nowrap text-sm", - children: [/* @__PURE__ */ P(Nt, { + children: [/* @__PURE__ */ P(Rt, { name: "updateScale", size: 20, className: "me-1.5 shrink-0" @@ -76441,7 +76489,7 @@ function kTe() { }), r.element] }); } function ATe() { - const e = Tt(), { files: t } = H9(); + const e = _t(), { files: t } = H9(); return /* @__PURE__ */ P("span", { className: "text-fg-muted whitespace-nowrap text-xs", children: e("attachments.count", { params: { count: t.length } }) @@ -76449,7 +76497,7 @@ function ATe() { } const HT = Fn(null); function STe({ children: e }) { - const t = ar() ?? "", [n, r] = De(() => /* @__PURE__ */ new Map()), o = fi((a) => r((c) => new Map(c).set(t, a)), [t]), s = n.get(t) ?? "", i = ft(() => [s, o], [s, o]); + const t = cr() ?? "", [n, r] = je(() => /* @__PURE__ */ new Map()), o = fi((a) => r((c) => new Map(c).set(t, a)), [t]), s = n.get(t) ?? "", i = ft(() => [s, o], [s, o]); return /* @__PURE__ */ P(HT.Provider, { value: i, children: e @@ -76458,17 +76506,17 @@ function STe({ children: e }) { const xTe = ["", () => { }]; function a8e() { - return Et(HT) ?? xTe; + return Ct(HT) ?? xTe; } function ETe({ variant: e }) { - const t = Tt(), n = Et(HT); + const t = _t(), n = Ct(HT); if (!n) return null; const [r, o] = n; return /* @__PURE__ */ P("div", { className: `relative ${e === "narrow" ? "w-24" : "w-36"}`, children: [/* @__PURE__ */ P("div", { className: "text-fg-muted pointer-events-none absolute inset-y-0 start-0 flex items-center ps-2", - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "search", size: 14 }) @@ -76491,14 +76539,14 @@ function CTe(e) { } const ITe = (e, t) => e?.first === t?.first && e?.last === t?.last; function NTe() { - const e = Tt(), t = Rt(Zt), n = um((k) => k.currentPageIndex + 1), r = um((k) => k.pageCount), o = zt(Zt, CTe, null, ITe), s = o !== null && o.last > o.first, i = s ? o.first : n, [a, c] = De(null), l = Re(null), u = Re(null), d = Re(!1), f = a !== null, h = sr({ label: e("pageNumber.goToPage") }), g = h.trigger.ref, p = fi((k) => { + const e = _t(), t = Bt(tn), n = dm((k) => k.currentPageIndex + 1), r = dm((k) => k.pageCount), o = Gt(tn, CTe, null, ITe), s = o !== null && o.last > o.first, i = s ? o.first : n, [a, c] = je(null), l = Re(null), u = Re(null), f = Re(!1), d = a !== null, h = ir({ label: e("pageNumber.goToPage") }), g = h.trigger.ref, p = fi((k) => { u.current = k, g(k); }, [g]); if (Ze(() => { - f ? (l.current?.focus(), l.current?.select()) : d.current && (d.current = !1, u.current?.focus()); - }, [f]), r <= 1) return null; + d ? (l.current?.focus(), l.current?.select()) : f.current && (f.current = !1, u.current?.focus()); + }, [d]), r <= 1) return null; const m = () => { - d.current = !0, c(null); + f.current = !0, c(null); }, v = () => { const k = Number.parseInt(a ?? "", 10); Number.isFinite(k) && t?.goToPage(Math.min(Math.max(k, 1), r) - 1), m(); @@ -76512,7 +76560,7 @@ function NTe() { } })).split(""); return /* @__PURE__ */ P("span", { className: "text-fg-secondary flex whitespace-nowrap text-sm", - children: f ? /* @__PURE__ */ P("span", { + children: d ? /* @__PURE__ */ P("span", { className: "block h-8 px-2 leading-8", children: [ S, @@ -76547,28 +76595,28 @@ function NTe() { }); } function OTe() { - const e = Tt(), t = E5(), { standard: n, quick: r } = IG(), { locale: o } = kx(), s = Fz(), i = ar(), a = zt(yr, (f) => f.getActiveToolId(), null), c = f1e((f) => f.armedAsset?.id ?? null), l = (r ?? []).map(V5e), u = l.some((f) => f.startsWith(`${Og}:`)); + const e = _t(), t = E5(), { standard: n, quick: r } = IG(), { locale: o } = kx(), s = Fz(), i = cr(), a = Gt(yr, (d) => d.getActiveToolId(), null), c = f1e((d) => d.armedAsset?.id ?? null), l = (r ?? []).map(V5e), u = l.some((d) => d.startsWith(`${Pg}:`)); Ke(() => { - u && WG(t).then(() => K5e(t, $5e(o), n)).catch((f) => console.error("[embedpdf] quick stamps failed:", f)); + u && WG(t).then(() => K5e(t, $5e(o), n)).catch((d) => console.error("[embedpdf] quick stamps failed:", d)); }, [ t, o, u ]); - const d = l.map((f) => s.find((h) => h.id === f)).filter((f) => !!f); - return d.length === 0 || !i ? null : /* @__PURE__ */ P("div", { + const f = l.map((d) => s.find((h) => h.id === d)).filter((d) => !!d); + return f.length === 0 || !i ? null : /* @__PURE__ */ P("div", { className: "flex items-center gap-1", role: "group", "aria-label": e("demo.quickStampsLabel"), - children: d.map((f) => /* @__PURE__ */ P(PTe, { - asset: f, - active: a === "stamp" && c === f.id, - onArm: () => void t.armAsset(f.id).catch((h) => console.error("[embedpdf] arm failed", h)) - }, f.id)) + children: f.map((d) => /* @__PURE__ */ P(PTe, { + asset: d, + active: a === "stamp" && c === d.id, + onArm: () => void t.armAsset(d.id).catch((h) => console.error("[embedpdf] arm failed", h)) + }, d.id)) }); } function PTe({ asset: e, active: t, onArm: n }) { - const r = p1e(e.id), o = sr({ + const r = p1e(e.id), o = ir({ label: e.label, labelShown: !r }); @@ -76578,8 +76626,8 @@ function PTe({ asset: e, active: t, onArm: n }) { onClick: n, "aria-label": e.label, "aria-pressed": t, - part: Jr(t), - className: Ho(t, !0), + part: Yr(t), + className: zo(t, !0), children: r ? /* @__PURE__ */ P("img", { src: r, alt: "", @@ -76598,11 +76646,11 @@ function TTe(e, t) { return e.canDesign() ? !0 : e.list().some((n) => n.kind === "signature" ? t?.canSign(n.ref) ?? !1 : e.canFill(n.ref)); } function MTe() { - const e = Rt(vt) !== null, t = Rt(vs), n = zt(vt, RTe, !1), r = zt(Ss, (i) => TTe(i, t), !1), o = zt(Fm, (i) => i.canEdit(), !1), s = zt(oa, (i) => i.canApply(), !1); + const e = Bt(vt) !== null, t = Bt(vs), n = Gt(vt, RTe, !1), r = Gt(Ss, (i) => TTe(i, t), !1), o = Gt(Vm, (i) => i.canEdit(), !1), s = Gt(oa, (i) => i.canApply(), !1); return e && !n && !r && !o && !s; } function BTe({ compact: e = !1 }) { - const t = Tt(), n = jr(); + const t = _t(), n = jr(); F6e((s) => s.disabledCategories); const r = hTe((s) => n.isCategoryDisabled(s)), o = MTe(); return !r && !o ? null : /* @__PURE__ */ P(sE, { @@ -76610,7 +76658,7 @@ function BTe({ compact: e = !1 }) { children: (s) => /* @__PURE__ */ P("span", { ...s, className: "bg-hover text-fg-secondary flex h-7 shrink-0 select-none items-center gap-1.5 whitespace-nowrap rounded-full px-2.5 text-xs font-medium", - children: [/* @__PURE__ */ P(Nt, { + children: [/* @__PURE__ */ P(Rt, { name: "eye", size: 16, className: "shrink-0" @@ -76661,7 +76709,7 @@ function rJ() { } const oJ = Fn(rJ()), FTe = oJ.Provider; function sJ() { - return Et(oJ); + return Ct(oJ); } const iJ = { display: "inline-flex", @@ -76674,22 +76722,22 @@ const iJ = { function $Te({ id: e, variant: t, orientation: n, grow: r = !1, measure: o, children: s }) { const i = Re(null), a = DT(), { size: c } = oc(), l = sJ(), u = Re(o); u.current = o; - const d = Re(null), f = t !== null; + const f = Re(null), d = t !== null; return Ze(() => { const h = i.current; if (!h) return; const g = n === "vertical" ? "height" : "width", p = () => u.current(r ? YU(h, n) : h.getBoundingClientRect()[g]); - f || p(); + d || p(); const m = new ResizeObserver(p); - return m.observe(h), d.current = m, () => { - m.disconnect(), d.current = null; + return m.observe(h), f.current = m, () => { + m.disconnect(), f.current = null; }; }, [ n, - f, + d, r ]), Ze(() => { - const h = i.current, g = d.current; + const h = i.current, g = f.current; !h || !g || (g.unobserve(h), g.observe(h)); }, [t]), Ze(() => { const h = i.current; @@ -76738,7 +76786,7 @@ function WTe(e, t, n) { l(); const u = new ResizeObserver(l); u.observe(e), u.observe(t); - const d = Qx(l), f = X6(e, (m) => { + const f = Qx(l), d = X6(e, (m) => { (!s || !m.composedPath().includes(s)) && o(); }), h = cR(e, { trigger: s, @@ -76756,11 +76804,11 @@ function WTe(e, t, n) { r && m.key !== "Tab" && m.stopPropagation(); }; return e.addEventListener("keydown", p), () => { - e.removeEventListener("keydown", p), h(), f(), d(), u.disconnect(), typeof e.hidePopover == "function" && e.matches(":popover-open") && e.hidePopover(); + e.removeEventListener("keydown", p), h(), d(), f(), u.disconnect(), typeof e.hidePopover == "function" && e.matches(":popover-open") && e.hidePopover(); }; } function qv(e) { - const t = Re(null), [n, r] = De(!1), o = oc().size === "compact"; + const t = Re(null), [n, r] = je(!1), o = oc().size === "compact"; return Ze(() => { const s = t.current?.parentElement; s && !s.closest(cJ) && r(!0); @@ -76770,7 +76818,7 @@ function qv(e) { }); } function qTe({ children: e, onClose: t, align: n = "start" }) { - const r = Re(null), o = DT(), s = Et(AP), i = Re(t); + const r = Re(null), o = DT(), s = Ct(AP), i = Re(t); return i.current = t, Ze(() => { const a = r.current, c = a?.parentElement; if (!(!a || !c)) @@ -76803,7 +76851,7 @@ function GTe(e) { return t && n ? uJ(n, t) : null; } function JTe({ children: e, onClose: t }) { - const [n, r] = De([]), o = Re(n); + const [n, r] = je([]), o = Re(n); o.current = n; const s = Re(null), i = Re(t); i.current = t; @@ -76841,7 +76889,7 @@ function JTe({ children: e, onClose: t }) { }); } function Jj({ covered: e, close: t, opener: n, label: r, onBack: o, children: s }) { - const i = Tt(), a = Re(null), c = Re({ + const i = _t(), a = Re(null), c = Re({ close: t, onBack: o }); @@ -76851,16 +76899,16 @@ function Jj({ covered: e, close: t, opener: n, label: r, onBack: o, children: s }, Ze(() => { const l = a.current; if (!l) return; - const u = n ?? GTe(l), d = r ?? lJ(u); - d && l.setAttribute("aria-label", d); - const f = cR(l, { + const u = n ?? GTe(l), f = r ?? lJ(u); + f && l.setAttribute("aria-label", f); + const d = cR(l, { trigger: u, close: () => c.current.close(), items: () => g0(l), initialFocus: "none" }); queueMicrotask(() => { - l.isConnected && !l.inert && g0(l).find((p) => !fg(p))?.focus(); + l.isConnected && !l.inert && g0(l).find((p) => !hg(p))?.focus(); }); const h = $G(r2(l)), g = (p) => { if (p.defaultPrevented) return; @@ -76868,7 +76916,7 @@ function Jj({ covered: e, close: t, opener: n, label: r, onBack: o, children: s p.key === h.open && m.getAttribute("aria-haspopup") === "menu" ? (p.preventDefault(), m.click()) : p.key === h.close && c.current.onBack && (p.preventDefault(), c.current.onBack()); }; return l.addEventListener("keydown", g), () => { - l.removeEventListener("keydown", g), f(); + l.removeEventListener("keydown", g), d(); }; }, []), Ze(() => { a.current && (a.current.inert = e); @@ -76887,7 +76935,7 @@ function Jj({ covered: e, close: t, opener: n, label: r, onBack: o, children: s "data-epdf-menu-back": "", onClick: o, className: zT, - children: [/* @__PURE__ */ P(Nt, { + children: [/* @__PURE__ */ P(Rt, { name: "chevronLeft", size: 16, className: "text-fg-muted rtl:-scale-x-100" @@ -76911,22 +76959,22 @@ function DI(e) { return t || (t = /* @__PURE__ */ new Map(), Yj.set(e, t)), t; } function iE({ menuId: e, className: t = "relative inline-flex", children: n }) { - const r = Rt(dt), o = dRe((l) => l.openMenus.includes(e)), s = Re(null), [, i] = Wl((l) => l + 1, 0), a = r ? DI(r).get(e) : void 0, c = o && a !== void 0 && a === s.current; + const r = Bt(dt), o = dRe((l) => l.openMenus.includes(e)), s = Re(null), [, i] = ql((l) => l + 1, 0), a = r ? DI(r).get(e) : void 0, c = o && a !== void 0 && a === s.current; return Ze(() => { const l = s.current; if (!r || !l) return; - const u = DI(r), d = u.get(e); + const u = DI(r), f = u.get(e); if (!o) { - d === l && u.delete(e); + f === l && u.delete(e); return; } - !d?.isConnected && !l.closest(cJ) && (u.set(e, l), i()); + !f?.isConnected && !l.closest(cJ) && (u.set(e, l), i()); }), /* @__PURE__ */ P("span", { ref: s, className: t, onClickCapture: (l) => { - const u = l.target, d = u.closest("[aria-haspopup]") && !u.closest('[role="menu"]'); - r && s.current && d && DI(r).set(e, s.current); + const u = l.target, f = u.closest("[aria-haspopup]") && !u.closest('[role="menu"]'); + r && s.current && f && DI(r).set(e, s.current); }, children: [n(c), c && /* @__PURE__ */ P(qv, { onClose: () => r?.closeMenu(e), @@ -76944,7 +76992,7 @@ const fJ = (e) => { none: "menuitem", radio: "menuitemradio", checkbox: "menuitemcheckbox" -}, hJ = "flex w-full items-center gap-3 rounded-md px-2.5 py-1.5 text-start text-sm outline-none transition-colors aria-disabled:cursor-not-allowed aria-disabled:opacity-40", zT = `${hJ} text-fg-secondary hover:bg-hover focus-visible:bg-hover aria-disabled:hover:bg-transparent`, QTe = `${hJ} bg-selected text-accent focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-accent forced-colors:outline-2 forced-colors:outline-solid forced-colors:-outline-offset-2`, pJ = (e) => sr(e.enabled ? null : { +}, hJ = "flex w-full items-center gap-3 rounded-md px-2.5 py-1.5 text-start text-sm outline-none transition-colors aria-disabled:cursor-not-allowed aria-disabled:opacity-40", zT = `${hJ} text-fg-secondary hover:bg-hover focus-visible:bg-hover aria-disabled:hover:bg-transparent`, QTe = `${hJ} bg-selected text-accent focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-accent forced-colors:outline-2 forced-colors:outline-solid forced-colors:-outline-offset-2`, pJ = (e) => ir(e.enabled ? null : { label: e.label, reason: e.disabledReason, labelShown: !0 @@ -76964,11 +77012,11 @@ function Gv({ command: e, choice: t, onSelect: n }) { }, className: r ? QTe : zT, children: [ - e.icon && /* @__PURE__ */ P(Nt, { + e.icon && /* @__PURE__ */ P(Rt, { name: e.icon, size: 16, accent: e.iconAccent, - className: `${r ? "text-accent" : "text-fg-muted"} ${Im(e.icon)}` + className: `${r ? "text-accent" : "text-fg-muted"} ${Nm(e.icon)}` }), /* @__PURE__ */ P("span", { className: "flex-1 truncate", @@ -76982,7 +77030,7 @@ function Gv({ command: e, choice: t, onSelect: n }) { }), s.element] }); } function gJ({ command: e, menuId: t, onRun: n }) { - const [r, o] = De(!1), s = Et(dJ), i = pJ(e); + const [r, o] = je(!1), s = Ct(dJ), i = pJ(e); return /* @__PURE__ */ P("div", { role: "none", className: "relative", @@ -77006,17 +77054,17 @@ function gJ({ command: e, menuId: t, onRun: n }) { }, className: `${zT} ${r ? "bg-hover" : ""}`, children: [ - e.icon && /* @__PURE__ */ P(Nt, { + e.icon && /* @__PURE__ */ P(Rt, { name: e.icon, size: 16, accent: e.iconAccent, - className: `text-fg-muted ${Im(e.icon)}` + className: `text-fg-muted ${Nm(e.icon)}` }), /* @__PURE__ */ P("span", { className: "flex-1 truncate", children: e.label }), - /* @__PURE__ */ P(Nt, { + /* @__PURE__ */ P(Rt, { name: "chevronRight", size: 16, className: "text-fg-muted rtl:-scale-x-100" @@ -77035,7 +77083,7 @@ function gJ({ command: e, menuId: t, onRun: n }) { }); } function XTe({ commandId: e, choice: t, onRun: n }) { - const r = go(e); + const r = mo(e); return r.visible ? r.menu ? /* @__PURE__ */ P(gJ, { command: r, menuId: r.menu, @@ -77065,7 +77113,7 @@ function mJ({ title: e, first: t, children: n }) { } const ZTe = (e, t) => e.length === t.length && e.every((n, r) => n === t[r]); function WT({ menuId: e, onRun: t }) { - const n = Tt(), r = i5e(e), o = jr(), s = ar() ?? void 0, i = en(() => (r ?? []).map((c) => { + const n = _t(), r = i5e(e), o = jr(), s = cr() ?? void 0, i = nn(() => (r ?? []).map((c) => { const l = c.items.map((u) => o.resolveCommand(u, s)).filter((u) => u?.visible === !0); return l.length === 0 ? null : fJ(l); }), ZTe); @@ -77082,16 +77130,16 @@ function WT({ menuId: e, onRun: t }) { children: a.map(({ section: c, choice: l }, u) => /* @__PURE__ */ P(mJ, { first: u === 0, title: c.title ?? (c.titleKey ? n(c.titleKey) : void 0), - children: c.items.map((d) => /* @__PURE__ */ P(XTe, { - commandId: d, + children: c.items.map((f) => /* @__PURE__ */ P(XTe, { + commandId: f, choice: l, onRun: t - }, d)) + }, f)) }, u)) }); } function aE({ view: e, align: t }) { - const n = Tt(); + const n = _t(); if (!e.isOpen) return null; const r = e.sections.map((o) => { const s = o.rows.flatMap((i) => { @@ -77131,15 +77179,15 @@ function aE({ view: e, align: t }) { }); } const Qj = "flex h-8 w-auto min-w-8 cursor-pointer items-center justify-center rounded-md p-[5px] transition-colors", e3e = "hover:bg-hover hover:ring hover:ring-accent", t3e = "border-none bg-selected text-accent shadow ring ring-accent", n3e = "cursor-not-allowed opacity-50 hover:bg-transparent hover:ring-0", r3e = "bg-accent text-on-accent hover:bg-accent-hover", o3e = "border-none bg-accent-active text-on-accent shadow", s3e = "cursor-not-allowed opacity-50 hover:bg-accent"; -function Ho(e, t = !0, n) { +function zo(e, t = !0, n) { return n === "primary" ? `${Qj} ${e ? o3e : r3e} ${t ? "" : s3e}` : `${Qj} ${e ? t3e : e3e} ${t ? "" : n3e}`; } -const Jr = (e, t) => [ +const Yr = (e, t) => [ "toolbar-button", t === "primary" ? "toolbar-button-primary" : null, e ? "toolbar-button-active" : null ].filter(Boolean).join(" "), cE = (e) => `toolbar toolbar-${e}`, yJ = (e) => e ? "mode-tab mode-tab-active" : "mode-tab", i3e = "flex h-8 w-auto min-w-8 cursor-pointer items-center justify-center rounded-none border-b-2 px-2 py-1 text-sm transition-colors hover:bg-transparent hover:border-b-fg-muted", a3e = "border-b-accent text-accent hover:border-b-accent", c3e = "border-b-transparent", bJ = (e, t = !0) => `${i3e} ${e ? a3e : c3e} ${t ? "" : "cursor-not-allowed opacity-50"}`; -function Pg(e, t = !1) { +function Rg(e, t = !1) { const [n] = e.shortcuts; return { label: e.label, @@ -77149,7 +77197,7 @@ function Pg(e, t = !1) { }; } function lE({ cmd: e, variant: t, run: n, emphasis: r }) { - const o = t === "label", s = sr(Pg(e, o || t === "icon+label" || !e.icon)), i = (a) => /* @__PURE__ */ P(nt, { children: [/* @__PURE__ */ P("button", { + const o = t === "label", s = ir(Rg(e, o || t === "icon+label" || !e.icon)), i = (a) => /* @__PURE__ */ P(nt, { children: [/* @__PURE__ */ P("button", { ...s.trigger, type: "button", onClick: n, @@ -77158,24 +77206,24 @@ function lE({ cmd: e, variant: t, run: n, emphasis: r }) { "aria-haspopup": e.menu ? "menu" : void 0, "aria-expanded": e.menu ? a : void 0, "aria-label": e.label, - part: o ? yJ(a) : Jr(a, r), - className: o ? bJ(a, e.enabled) : `${Ho(a, e.enabled, r)} ${r === "primary" && t === "icon+label" ? "px-2.5" : ""}`, + part: o ? yJ(a) : Yr(a, r), + className: o ? bJ(a, e.enabled) : `${zo(a, e.enabled, r)} ${r === "primary" && t === "icon+label" ? "px-2.5" : ""}`, children: o ? /* @__PURE__ */ P("span", { className: "whitespace-nowrap px-1", children: e.label }) : t === "icon+label" ? /* @__PURE__ */ P("span", { className: "flex items-center whitespace-nowrap text-sm", - children: [e.icon && /* @__PURE__ */ P(Nt, { + children: [e.icon && /* @__PURE__ */ P(Rt, { name: e.icon, size: 20, accent: e.iconAccent, - className: `me-1.5 shrink-0 ${Im(e.icon)}` + className: `me-1.5 shrink-0 ${Nm(e.icon)}` }), /* @__PURE__ */ P("span", { children: e.label })] - }) : e.icon ? /* @__PURE__ */ P(Nt, { + }) : e.icon ? /* @__PURE__ */ P(Rt, { name: e.icon, size: 20, accent: e.iconAccent, - className: Im(e.icon) + className: Nm(e.icon) }) : /* @__PURE__ */ P("span", { className: "text-sm", children: e.label @@ -77191,11 +77239,11 @@ const jI = { className: "contents" }; function l3e() { - const e = Tt(), t = jr(), n = go("zoom:in"), r = go("zoom:out"), o = go("menu:zoom"), s = sr(Pg(n)), i = sr(Pg(r)), a = sr(Pg(o)), c = Rt(dt), l = Rt(Zt), u = zt(Zt, (p) => p.getZoomLevel(), 1), d = Math.round((u ?? 1) * 100), [f, h] = De(String(d)); - Ke(() => h(String(d)), [d]); + const e = _t(), t = jr(), n = mo("zoom:in"), r = mo("zoom:out"), o = mo("menu:zoom"), s = ir(Rg(n)), i = ir(Rg(r)), a = ir(Rg(o)), c = Bt(dt), l = Bt(tn), u = Gt(tn, (p) => p.getZoomLevel(), 1), f = Math.round((u ?? 1) * 100), [d, h] = je(String(f)); + Ke(() => h(String(f)), [f]); const g = (p) => { p.preventDefault(); - const m = parseFloat(f); + const m = parseFloat(d); !isNaN(m) && m > 0 && l?.zoomTo({ level: m / 100 }); }; return /* @__PURE__ */ P(iE, { @@ -77214,10 +77262,10 @@ function l3e() { pattern: "\\d*", "aria-label": e("commands.zoom.level"), className: "h-6 w-8 min-w-0 shrink border-0 bg-transparent p-0 text-end text-sm outline-none focus:outline-none", - value: f, + value: d, onChange: (m) => h(m.target.value.replace(/[^0-9]/g, "")), onBlur: () => { - (!f || parseFloat(f) <= 0) && h(String(d)); + (!d || parseFloat(d) <= 0) && h(String(f)); } }), /* @__PURE__ */ P("span", { className: "shrink-0 text-sm", @@ -77232,10 +77280,10 @@ function l3e() { "aria-haspopup": "menu", "aria-expanded": p, "aria-label": o.label, - part: Jr(!1), - className: Ho(!1), + part: Yr(!1), + className: zo(!1), onClick: () => c?.toggleMenu("zoom"), - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "chevronDown", size: 20 }) @@ -77248,10 +77296,10 @@ function l3e() { type: "button", "aria-label": r.label, disabled: !r.enabled, - part: Jr(!1), - className: Ho(!1, r.enabled), + part: Yr(!1), + className: zo(!1, r.enabled), onClick: () => t.execute("zoom:out"), - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "zoomOut", size: 20 }) @@ -77264,10 +77312,10 @@ function l3e() { type: "button", "aria-label": n.label, disabled: !n.enabled, - part: Jr(!1), - className: Ho(!1, n.enabled), + part: Yr(!1), + className: zo(!1, n.enabled), onClick: () => t.execute("zoom:in"), - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "zoomIn", size: 20 }) @@ -77278,7 +77326,7 @@ function l3e() { }); } function u3e() { - const e = Rt(dt), t = go("menu:zoom"), n = sr(Pg(t)); + const e = Bt(dt), t = mo("menu:zoom"), n = ir(Rg(t)); return /* @__PURE__ */ P(iE, { menuId: "zoom", children: (r) => /* @__PURE__ */ P(nt, { children: [/* @__PURE__ */ P("button", { @@ -77287,10 +77335,10 @@ function u3e() { "aria-label": t.label, "aria-haspopup": "menu", "aria-expanded": r, - part: Jr(r), - className: Ho(r), + part: Yr(r), + className: zo(r), onClick: () => e?.toggleMenu("zoom"), - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "zoomIn", size: 20 }) @@ -77298,7 +77346,7 @@ function u3e() { }); } function d3e({ view: e }) { - const [t, n] = De(!1), r = e.commands.some((o) => o.active); + const [t, n] = je(!1), r = e.commands.some((o) => o.active); return /* @__PURE__ */ P("span", { className: "relative inline-flex", children: [/* @__PURE__ */ P("button", { @@ -77306,9 +77354,9 @@ function d3e({ view: e }) { onClick: () => n((o) => !o), "aria-haspopup": "menu", "aria-expanded": t, - part: e.id === "modes" ? yJ(r) : Jr(t), + part: e.id === "modes" ? yJ(r) : Yr(t), className: bJ(r), - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "chevronDown", size: 18 }) @@ -77316,7 +77364,7 @@ function d3e({ view: e }) { }); } function f3e({ view: e }) { - const [t, n] = De(!1), r = e.commands.find((s) => s.active) ?? e.commands[0], o = !!(r?.active && r.id !== tv); + const [t, n] = je(!1), r = e.commands.find((s) => s.active) ?? e.commands[0], o = !!(r?.active && r.id !== tv); return /* @__PURE__ */ P("div", { style: { width: 100 }, className: "relative", @@ -77325,12 +77373,12 @@ function f3e({ view: e }) { onClick: () => n((s) => !s), "aria-haspopup": "menu", "aria-expanded": t, - part: Jr(t), + part: Yr(t), className: "bg-surface hover:bg-hover flex w-full cursor-pointer appearance-none items-center rounded-md py-1.5 pe-2 ps-3 text-[13px] transition-colors", children: [/* @__PURE__ */ P("span", { className: `min-w-0 flex-1 truncate text-start ${o ? "text-accent" : "text-fg"}`, children: r?.label - }), /* @__PURE__ */ P(Nt, { + }), /* @__PURE__ */ P(Rt, { name: "chevronDown", size: 16, className: o ? "text-accent" : "text-fg-secondary" @@ -77339,7 +77387,7 @@ function f3e({ view: e }) { }); } function h3e({ view: e }) { - const t = Tt(), [n, r] = De(!1), o = e.commands.find((a) => a.active) ?? e.commands[0], s = e.labelKey ? t(e.labelKey) : o?.label, i = sr(s ? { + const t = _t(), [n, r] = je(!1), o = e.commands.find((a) => a.active) ?? e.commands[0], s = e.labelKey ? t(e.labelKey) : o?.label, i = ir(s ? { label: s, labelShown: !o?.icon } : null); @@ -77353,17 +77401,17 @@ function h3e({ view: e }) { "aria-haspopup": "menu", "aria-expanded": n, "aria-label": s, - part: Jr(n), - className: Ho(n), - children: [o?.icon ? /* @__PURE__ */ P(Nt, { + part: Yr(n), + className: zo(n), + children: [o?.icon ? /* @__PURE__ */ P(Rt, { name: o.icon, size: 20, accent: o.iconAccent, - className: Im(o.icon) + className: Nm(o.icon) }) : /* @__PURE__ */ P("span", { className: "whitespace-nowrap px-1 text-sm", children: s - }), /* @__PURE__ */ P(Nt, { + }), /* @__PURE__ */ P(Rt, { name: "chevronDown", size: 14, className: "text-fg-secondary" @@ -77381,7 +77429,7 @@ function p3e({ view: e }) { }); } function g3e({ isOpen: e, toggle: t }) { - const n = Tt()("demo.more"), r = sr({ label: n }); + const n = _t()("demo.more"), r = ir({ label: n }); return /* @__PURE__ */ P(nt, { children: [/* @__PURE__ */ P("button", { ...r.trigger, type: "button", @@ -77389,9 +77437,9 @@ function g3e({ isOpen: e, toggle: t }) { "aria-haspopup": "menu", "aria-expanded": e, "aria-label": n, - part: Jr(e), - className: Ho(e), - children: /* @__PURE__ */ P(Nt, { + part: Yr(e), + className: zo(e), + children: /* @__PURE__ */ P(Rt, { name: "dots", size: 20 }) @@ -77409,7 +77457,7 @@ function vJ(e) { return new Set(wJ(e).flatMap((t) => typeof t == "object" && "command" in t && t.emphasis === "primary" ? [t.command] : [])); } function y3e({ commandId: e }) { - const t = go(e); + const t = mo(e); return t.visible ? /* @__PURE__ */ P(lE, { cmd: t, variant: "icon", @@ -77492,7 +77540,7 @@ function k3e(e, t) { } const AJ = Fn(null), SJ = "(prefers-color-scheme: dark)", A3e = () => typeof window < "u" && window.matchMedia?.(SJ).matches ? "dark" : "light"; function S3e({ children: e, preference: t = "system", target: n }) { - const [r, o] = De(A3e); + const [r, o] = je(A3e); Ke(() => { if (t !== "system" || typeof window > "u" || !window.matchMedia) return; const a = window.matchMedia(SJ), c = () => o(a.matches ? "dark" : "light"); @@ -77509,7 +77557,7 @@ function S3e({ children: e, preference: t = "system", target: n }) { }); } function c8e() { - const e = Et(AJ); + const e = Ct(AJ); if (!e) throw new Error("useTheme must be used within "); return e; } @@ -77612,10 +77660,10 @@ function l8e(e) { } const T3e = (e, t) => t.type === "fonts.changed" ? os() : e, ZA = (e, t) => e.fonts.find((n) => n.name === t); function M3e(e, t) { - const n = Cf(t.family), r = t.weight ?? 400, o = t.italic ?? !1; + const n = Nf(t.family), r = t.weight ?? 400, o = t.italic ?? !1; let s; for (const i of e.fonts) { - if (i.source === "standard" || Cf(i.familyName) !== n) continue; + if (i.source === "standard" || Nf(i.familyName) !== n) continue; const a = Math.abs(i.weight - r) + (i.italic === o ? 0 : 1e3) + (i.source === "engine" ? 0 : 0.5); (!s || a < s.score) && (s = { font: i, score: a }); } @@ -77642,40 +77690,40 @@ function _3e(e, t) { function L3e(e) { const { measurer: t } = e, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(); let o = 0; - const s = (f) => { - let h = n.get(f); - return h || (h = n5(f), n.set(f, h)), h; - }, i = async (f, h, g) => { + const s = (d) => { + let h = n.get(d); + return h || (h = n5(d), n.set(d, h)), h; + }, i = async (d, h, g) => { const p = e.programOf(h, g), m = await e.getProgram(h); - return hme(m, p, (v, S) => f.width(p, v, S)); - }, a = async (f, h) => { + return hme(m, p, (v, S) => d.width(p, v, S)); + }, a = async (d, h) => { const g = F0(qa(h)); - return g ? sg(g) : i(f, h); - }, c = async (f, h) => { + return g ? ig(g) : i(d, h); + }, c = async (d, h) => { await e.loadList(); - const p = (await e.resolve({ runs: [{ text: " ", fontFamily: h }] })).runs[0], m = Promise.all(p.fallbacks.map((S) => a(f, S))); - return { face: gs(p.font) ? sg(p.font) : p.program ? await i(f, p.program, p) : sg(e.standardOf(p.font)), fallbacks: await m, lastResort: sH() }; - }, l = (f, h) => { + const p = (await e.resolve({ runs: [{ text: " ", fontFamily: h }] })).runs[0], m = Promise.all(p.fallbacks.map((S) => a(d, S))); + return { face: gs(p.font) ? ig(p.font) : p.program ? await i(d, p.program, p) : ig(e.standardOf(p.font)), fallbacks: await m, lastResort: sH() }; + }, l = (d, h) => { const g = r.get(h) ?? { value: null, generation: -1, finding: !1 }; if (r.set(h, g), g.finding || g.generation === o) return g; g.finding = !0; const p = o, m = (v) => { g.value = v, g.generation = p, g.finding = !1, e.changed(); }; - return c(f, h).then(m, () => m("failed")), g; - }, u = (f, h) => { + return c(d, h).then(m, () => m("failed")), g; + }, u = (d, h) => { const g = !h.face.standard && e.refused(h.face.program), p = h.fallbacks.filter((m) => !e.refused(m.program)); return !g && p.length === h.fallbacks.length ? h : { - face: g ? sg(e.standardOf(f)) : h.face, + face: g ? ig(e.standardOf(d)) : h.face, fallbacks: p, lastResort: h.lastResort }; - }, d = (f, h, g) => { + }, f = (d, h, g) => { const p = /* @__PURE__ */ new Set(); let m = !1; for (const [v, S] of XK(g)) { const { font: C, covered: k } = tH(g.slice(v, S), h); - !k || C.standard || p.has(C) || (p.add(C), f.ready(C.program) || (m = !0)); + !k || C.standard || p.has(C) || (p.add(C), d.ready(C.program) || (m = !0)); } return m; }; @@ -77687,14 +77735,14 @@ function L3e(e) { * found or measured, the box's standard font, or Helvetica, with only the * last resort behind it. */ - get(f, h) { - const g = s(f); - if (gs(f) && zN(g.face, h) || !t) return g; - const { value: p } = l(t, f); + get(d, h) { + const g = s(d); + if (gs(d) && zN(g.face, h) || !t) return g; + const { value: p } = l(t, d); if (p === null) return null; if (p === "failed") return g; - const m = u(f, p); - return d(t, m, h) ? null : m; + const m = u(d, p); + return f(t, m, h) ? null : m; }, /** The document's fonts changed: find each font's again, the next time it's asked for. */ reset() { @@ -77704,7 +77752,7 @@ function L3e(e) { } function D3e(e) { const t = /^epdf-([0-9a-f]{16})$/.exec(e)?.[1]; - return t && !Jl.startsWith(t) ? t : void 0; + return t && !Yl.startsWith(t) ? t : void 0; } function j3e(e) { const t = e.events.source(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(); @@ -77722,8 +77770,8 @@ function j3e(e) { } }), l = (y, x) => { const A = F0(qa(y)); - if (A) return vl(A); - if (y === Jl) return j0(); + if (A) return kl(A); + if (y === Yl) return j0(); let b = n.get(y); if (!b) { let E = null; @@ -77749,19 +77797,19 @@ function j3e(e) { }, u = (y, x) => { if (gs(y)) return y; const A = c.get(), b = A ? ZA(A, y) : void 0; - return b ? cl({ + return b ? ll({ family: b.familyName, weight: x?.weight ?? b.weight, italic: x?.italic ?? b.italic }) : "helvetica"; - }, d = (y) => e.measurer?.refused(y) ?? !1, f = (y, x, A, b) => { + }, f = (y) => e.measurer?.refused(y) ?? !1, d = (y, x, A, b) => { const E = c.get(), I = [], O = (R) => { I.some((M) => M.hash === R.hash) || I.push(R); }; y && O(y); for (const R of A) { const M = l(R, Zj(E, R)); - d(M) || O(M); + f(M) || O(M); } return O(j0()), { fontFamily: I.map((R) => e.measurer?.ready(R) ?? !0).every((R) => R) ? _3e( @@ -77783,7 +77831,7 @@ function j3e(e) { getProgram: h, programOf: (y, x) => l(y, x ?? Zj(c.get(), y)), standardOf: (y) => u(y), - refused: d, + refused: f, changed: a }); e.measurer?.onChange(() => { @@ -77810,26 +77858,26 @@ function j3e(e) { return B3e(x); }, v = (y) => [ ...m(y), - vl(cl(y)).hash + kl(ll(y)).hash ], S = (y, x) => { let A = o.get(y); return A || (A = x(), o.set(y, A)), A; }, C = (y, x) => O2( - x ?? (y ? cl({ + x ?? (y ? ll({ family: y.familyName, weight: y.weight, italic: y.italic }) : "helvetica") - ), k = (y) => f( - vl(y), + ), k = (y) => d( + kl(y), ui[y], v(ui[y]), C(void 0, y) ), N = (y) => { const x = y.programs[0], A = x?.displaySha256 && x.canDownload ? l(x.displaySha256, y) : null; - return !A || d(A) ? k( - cl({ family: y.familyName, weight: y.weight, italic: y.italic }) - ) : f( + return !A || f(A) ? k( + ll({ family: y.familyName, weight: y.weight, italic: y.italic }) + ) : d( A, y, v({ family: y.familyName, weight: y.weight, italic: y.italic }), @@ -77854,18 +77902,18 @@ function j3e(e) { getFontCss: (y) => (gs(y) || p(), S(`font:${y}`, () => { if (gs(y)) return k(y); const x = c.get(), A = x ? ZA(x, y) : void 0; - return A ? N(A) : k(Gf(y)); + return A ? N(A) : k(Yf(y)); })), getFaceCss: (y) => ($P(y.family) || p(), S(`face:${y.family}|${y.weight ?? 400}|${y.italic ?? !1}`, () => { const x = c.get(), A = x ? M3e(x, y) : void 0; - return A ? N(A) : k(cl(y)); + return A ? N(A) : k(ll(y)); })), getRunCss: (y) => S( `run:${y.font}|${y.weight}|${y.italic}|${y.program}|${y.fallbacks.join(",")}`, () => { const x = gs(y.font) ? y.font : null, A = c.get(), b = y.program ? l(y.program, y) : null; - return f( - b && d(b) ? vl(u(y.font, y)) : b, + return d( + b && f(b) ? kl(u(y.font, y)) : b, y, y.fallbacks, C(A ? ZA(A, y.font) : void 0, x) @@ -77890,7 +77938,7 @@ const F3e = () => ({ token: Xa, scope: "document", create: j3e -}), EJ = sn("metadata", { +}), EJ = an("metadata", { hint: "add metadataPlugin() from '@embedpdf/plugin-metadata' to your plugins list", // Without a document, an adapter's stand-in rejects these with `not-ready`, as the // capability would; the type asks for every member that returns a promise. @@ -77912,52 +77960,52 @@ function V3e(e) { name: "metadata", onDemand: !0, initial: () => null, - load: async (d) => ({ value: await d.metadata.get() }), - fold: (d, f) => f.type === "metadata.updated" ? f.metadata : d, - onChanged: ({ cause: d, event: f, previous: h, next: g }) => { - g && (d === "load" ? n.emit({ metadata: g }) : f && "origin" in f && t.emit({ + load: async (f) => ({ value: await f.metadata.get() }), + fold: (f, d) => d.type === "metadata.updated" ? d.metadata : f, + onChanged: ({ cause: f, event: d, previous: h, next: g }) => { + g && (f === "load" ? n.emit({ metadata: g }) : d && "origin" in d && t.emit({ metadata: g, previous: h, changedKeys: eF(h, g), - origin: f.origin + origin: d.origin })); } }), i = e.mirror({ name: "customMetadata", onDemand: !0, initial: () => null, - load: async (d) => ({ value: await d.metadata.custom.get() }), - fold: (d, f) => f.type === "metadata.customUpdated" ? f.custom : d, - onChanged: ({ cause: d, event: f, previous: h, next: g }) => { - g && (d === "load" ? o.emit({ custom: g }) : f && "origin" in f && r.emit({ + load: async (f) => ({ value: await f.metadata.custom.get() }), + fold: (f, d) => d.type === "metadata.customUpdated" ? d.custom : f, + onChanged: ({ cause: f, event: d, previous: h, next: g }) => { + g && (f === "load" ? o.emit({ custom: g }) : d && "origin" in d && r.emit({ custom: g, previous: h, changedKeys: eF(h, g), - origin: f.origin + origin: d.origin })); } - }), a = () => e.allows(tF), c = (d, f) => { - if (e.assertAllowed(tF, d), f?.signal?.aborted) - throw new re("operation-cancelled", "metadata", `${d} was cancelled`); + }), a = () => e.allows(tF), c = (f, d) => { + if (e.assertAllowed(tF, f), d?.signal?.aborted) + throw new te("operation-cancelled", "metadata", `${f} was cancelled`); }, l = { getSnapshot: i.get, getStatus: i.getStatus, - update: async (d, f) => (c("metadata.custom.update", f), { custom: (await e.cancellable(f?.signal, e.doc.metadata.custom.update(d))).custom }), - refresh: (d) => e.cancellable(d?.signal, i.refresh()), + update: async (f, d) => (c("metadata.custom.update", d), { custom: (await e.cancellable(d?.signal, e.doc.metadata.custom.update(f))).custom }), + refresh: (f) => e.cancellable(f?.signal, i.refresh()), onUpdated: r.on, onResynced: o.on }; return { api: { getSnapshot: s.get, getStatus: s.getStatus, - ensureLoaded: (d) => e.cancellable( - d?.signal, + ensureLoaded: (f) => e.cancellable( + f?.signal, Promise.all([s.ensureLoaded(), i.ensureLoaded()]).then(() => { }) ), canUpdate: a, - update: async (d, f) => (c("metadata.update", f), { metadata: (await e.cancellable(f?.signal, e.doc.metadata.update(d))).metadata }), - refresh: (d) => e.cancellable(d?.signal, s.refresh()), + update: async (f, d) => (c("metadata.update", d), { metadata: (await e.cancellable(d?.signal, e.doc.metadata.update(f))).metadata }), + refresh: (f) => e.cancellable(f?.signal, s.refresh()), onUpdated: t.on, onResynced: n.on, custom: l @@ -77999,16 +78047,16 @@ const JT = (e, t) => { case "document": return { kind: "document" }; } -}, K3e = (e, t) => new re("operation-cancelled", "actions", `${e} was cancelled`, { +}, K3e = (e, t) => new te("operation-cancelled", "actions", `${e} was cancelled`, { cause: t?.reason }); function H3e(e, t, { run: n }, { triggerEnabled: r, lifecycleAnnotationsOf: o, planPageSteps: s }, i, { runDocumentEventOp: a }) { - const { executed: c, reportDiagnostic: l } = t.events, { decisionFor: u } = t.policy, { allowsPrint: d } = t.authority, { enqueue: f, budget: h } = t.queue, { readDocumentActions: g, DOC_EVENT_TREES: p } = t.catalog, { form: m } = t, { noteUserActivity: v } = i, S = async (O, T, R) => { + const { executed: c, reportDiagnostic: l } = t.events, { decisionFor: u } = t.policy, { allowsPrint: f } = t.authority, { enqueue: d, budget: h } = t.queue, { readDocumentActions: g, DOC_EVENT_TREES: p } = t.catalog, { form: m } = t, { noteUserActivity: v } = i, S = async (O, T, R) => { const M = await n(O, T, R); return c.emit({ tree: O, result: M, source: T.source }), M; }, C = (O, T, R) => { const M = R?.signal; - return T.origin === "user" && v(), f(async () => { + return T.origin === "user" && v(), d(async () => { h.scriptNodes = 0; const F = await S(O, T, M); if (F.status === "cancelled") throw K3e("actions.execute", M); @@ -78019,38 +78067,38 @@ function H3e(e, t, { run: n }, { triggerEnabled: r, lifecycleAnnotationsOf: o, p const R = u(O.root, T.origin); return R === "allow" || R === "adapter"; }, N = async (O, T, R, M, F) => { - const B = []; + const _ = []; for (const $ of O) { if (F?.aborted) break; const D = await S($.tree, { origin: T, source: $.source, event: R }, F); - B.push({ source: $.source, tree: $.tree, result: D }); + _.push({ source: $.source, tree: $.tree, result: D }); } - return F?.aborted ? { status: "cancelled", steps: B, diagnostics: M } : JT(B, M); + return F?.aborted ? { status: "cancelled", steps: _, diagnostics: M } : JT(_, M); }, w = async (O, T) => { - const R = [], M = (B) => { - R.push(B), l(B, { source: rF(O) }); - }, F = (B) => e.cancellable(T, B); + const R = [], M = (_) => { + R.push(_), l(_, { source: rF(O) }); + }, F = (_) => e.cancellable(T, _); try { if (!r(O)) return M({ code: "trigger-disabled", message: `${O.type}: trigger family disabled by config` }), { status: "inert", steps: [], diagnostics: R }; - const B = ZB(O); + const _ = ZB(O); switch (O.type) { case "activate": case "annotation": { const $ = O.type === "activate" ? "activate" : O.event, D = await nF(e, m, O.annotation, F); if ($ === "mouseUp" && D?.actions?.activate) return { status: "inert", steps: [], diagnostics: R }; - const _ = D?.actions?.[$]; - if (!_?.root && !_?.incomplete) return { status: "inert", steps: [], diagnostics: R }; + const B = D?.actions?.[$]; + if (!B?.root && !B?.incomplete) return { status: "inert", steps: [], diagnostics: R }; const L = rF(O); - return await N([{ source: L, tree: _ }], B, XB(O), R, T); + return await N([{ source: L, tree: B }], _, XB(O), R, T); } case "page": { - const $ = await o(O.page), D = e.getPage(O.page)?.actions, _ = s(O.event, O.page, D, $); - return await N(_, B, XB(O), R, T); + const $ = await o(O.page), D = e.getPage(O.page)?.actions, B = s(O.event, O.page, D, $); + return await N(B, _, XB(O), R, T); } case "document": return O.event !== "open" ? await a(O.event, R, M) : i.claim() ? await i.run() : (M({ @@ -78058,15 +78106,15 @@ function H3e(e, t, { run: n }, { triggerEnabled: r, lifecycleAnnotationsOf: o, p message: "document open sequence already fired for this document" }), { status: "inert", steps: [], diagnostics: R }); } - } catch (B) { - return pr(B, "operation-cancelled") && T?.aborted ? { status: "cancelled", steps: [], diagnostics: R } : (M({ + } catch (_) { + return Xn(_, "operation-cancelled") && T?.aborted ? { status: "cancelled", steps: [], diagnostics: R } : (M({ code: "trigger-failed", - message: `trigger resolution failed: ${B instanceof Error ? B.message : String(B)}` + message: `trigger resolution failed: ${_ instanceof Error ? _.message : String(_)}` }), { status: "refused", steps: [], diagnostics: R }); } }, y = (O, T) => { const R = T?.signal; - return ZB(O) === "user" && v(), f(() => (h.scriptNodes = 0, w(O, R)), T).catch( + return ZB(O) === "user" && v(), d(() => (h.scriptNodes = 0, w(O, R)), T).catch( // Only a signal that fired while the trigger waited for its turn gets // here: resolveAndRun itself never throws. () => ({ status: "cancelled", steps: [], diagnostics: [] }) @@ -78080,7 +78128,7 @@ function H3e(e, t, { run: n }, { triggerEnabled: r, lifecycleAnnotationsOf: o, p source: { kind: "api" }, event: { type: "activate" }, ...O - }), b = (O, T, R) => C(x(O), A(T), R), E = (O, T) => k(x(O), A(T)) && (O !== "Print" || d()), I = async (O) => { + }), b = (O, T, R) => C(x(O), A(T), R), E = (O, T) => k(x(O), A(T)) && (O !== "Print" || f()), I = async (O) => { switch (O.kind) { case "annotation": return (await nF(e, m, O.annotation))?.actions?.[O.event ?? "activate"] ?? null; @@ -78181,16 +78229,16 @@ const J3e = (e) => ({ }; function Q3e(e, t, { performSubmit: n }, { firePrintThroughAdapter: r }) { const { decisionFor: o } = t.policy, s = t.ports.slots, { reportDiagnostic: i } = t.events, { form: a } = t; - async function c(l, u, d) { - const f = [], h = (A, b) => { - f.push(A), i(A, { action: b, source: u.source }); + async function c(l, u, f) { + const d = [], h = (A, b) => { + d.push(A), i(A, { action: b, source: u.source }); }; if (l.incomplete) return h( { code: "incomplete-tree", message: "refused: the action tree is incomplete" }, l.root?.type ?? null - ), { status: "refused", nodes: [], diagnostics: f }; - if (!l.root) return { status: "inert", nodes: [], diagnostics: f }; + ), { status: "refused", nodes: [], diagnostics: d }; + if (!l.root) return { status: "inert", nodes: [], diagnostics: d }; const g = [], p = []; let m = !1, v = !1; const S = (A, b) => { @@ -78207,20 +78255,20 @@ function Q3e(e, t, { performSubmit: n }, { firePrintThroughAdapter: r }) { F.kind === "objectNumber" ? R.push(F.objectNumber) : T.push(F.name); if (T.length || R.length) { const F = await a.read(); - for (const B of T) { - const $ = F.fields.find((D) => D.name === B); + for (const _ of T) { + const $ = F.fields.find((D) => D.name === _); if (!$) { - E({ code: "unresolved-target", message: `hide: no field named '${B}'` }); + E({ code: "unresolved-target", message: `hide: no field named '${_}'` }); continue; } I.push($.ref); } - for (const B of R) { + for (const _ of R) { const $ = F.fields.find( - (D) => D.widgets.some((_) => _.objectNumber === B) + (D) => D.widgets.some((B) => B.objectNumber === _) ); $ ? I.push($.ref) : O.push({ - annotObjectNumber: B, + annotObjectNumber: _, patch: { flags: { hidden: A.hide } } }); } @@ -78233,7 +78281,7 @@ function Q3e(e, t, { performSubmit: n }, { firePrintThroughAdapter: r }) { message: "hide: no form commit sink registered (form plugin absent)" }), { status: "no-executor" }; const F = await s.formCommitSink( - I.map((B) => ({ kind: "setDisplay", ref: B, display: b })) + I.map((_) => ({ kind: "setDisplay", ref: _, display: b })) ); F.status === "failed" && (M = F.error ?? "failed", E({ code: "executor-failed", message: `hide: ${M}` })); } @@ -78243,13 +78291,13 @@ function Q3e(e, t, { performSubmit: n }, { firePrintThroughAdapter: r }) { code: "no-commit-sink", message: "hide: no annotation commit sink registered (annotation plugin absent)" }), { status: "no-executor" }; - const F = await s.annotCommitSink(O), B = F.results.filter(($) => $.status === "failed"); - for (const $ of B) + const F = await s.annotCommitSink(O), _ = F.results.filter(($) => $.status === "failed"); + for (const $ of _) E({ code: "executor-failed", message: `hide: annotation ${$.annotObjectNumber}: ${$.error ?? "failed"}` }); - B.length === F.results.length && B.length > 0 && (M = B[0]?.error); + _.length === F.results.length && _.length > 0 && (M = _[0]?.error); } return M ? { status: "failed", detail: M } : { status: "executed" }; }, k = async (A, b) => { @@ -78365,7 +78413,7 @@ function Q3e(e, t, { performSubmit: n }, { firePrintThroughAdapter: r }) { } }); }, N = async (A, b) => { - if (d?.aborted) { + if (f?.aborted) { v = !0; return; } @@ -78375,11 +78423,11 @@ function Q3e(e, t, { performSubmit: n }, { firePrintThroughAdapter: r }) { }; if (await N(l.root, []), !m && !v) for (const A of p) await A.fire(); - if (v) return { status: "cancelled", nodes: g, diagnostics: f }; + if (v) return { status: "cancelled", nodes: g, diagnostics: d }; const w = g.some((A) => A.status === "executed"), y = g.some( (A) => A.status === "failed" || A.status === "skipped" ); - return { status: w ? y ? "partial" : "executed" : y ? "partial" : "inert", nodes: g, diagnostics: f }; + return { status: w ? y ? "partial" : "executed" : y ? "partial" : "inert", nodes: g, diagnostics: d }; } return { run: c }; } @@ -78431,33 +78479,33 @@ function Z3e(e, { settings: t, form: n }) { return { triggerEnabled: r, lifecycleAnnotationsOf: (c) => { const l = c.objectNumber, u = o.get(l); if (u) return u; - const d = U3e(e, n, c).then( - (f) => f.filter( + const f = U3e(e, n, c).then( + (d) => d.filter( (h) => h.actions && (h.actions.pageOpen?.root || h.actions.pageClose?.root || h.actions.pageVisible?.root || h.actions.pageInvisible?.root) ).map((h) => ({ ref: h.ref, actions: h.actions })) ); - return o.set(l, d), d.catch(() => { - o.get(l) === d && o.delete(l); - }), d; + return o.set(l, f), f.catch(() => { + o.get(l) === f && o.delete(l); + }), f; }, invalidate: (c) => { const l = X3e(c); if (l === "all") o.clear(); else if (l) for (const u of l) o.delete(u.objectNumber); - }, planPageSteps: (c, l, u, d) => { - const f = { kind: "page", page: l }, h = (g) => d.filter((p) => p.actions[g]?.root).map((p) => ({ + }, planPageSteps: (c, l, u, f) => { + const d = { kind: "page", page: l }, h = (g) => f.filter((p) => p.actions[g]?.root).map((p) => ({ source: { kind: "annotation", annotation: p.ref, page: l }, tree: p.actions[g] })); switch (c) { case "open": return [ - ...u?.open?.root ? [{ source: f, tree: u.open }] : [], + ...u?.open?.root ? [{ source: d, tree: u.open }] : [], ...h("pageOpen") ]; case "close": return [ ...h("pageClose"), - ...u?.close?.root ? [{ source: f, tree: u.close }] : [] + ...u?.close?.root ? [{ source: d, tree: u.close }] : [] ]; case "visible": return h("pageVisible"); @@ -78469,7 +78517,7 @@ function Z3e(e, { settings: t, form: n }) { function eMe(e, { ensureOpenSequenceBeforeDocEvent: t }, { runAndEmit: n }) { - const { reportDiagnostic: r } = e.events, { readDocumentActions: o, DOC_EVENT_TREES: s } = e.catalog, { enqueue: i, budget: a } = e.queue, c = e.ports.slots, { allowsPrint: l } = e.authority, { documentPrint: u } = e, d = e.printLatch, f = async (p, m) => { + const { reportDiagnostic: r } = e.events, { readDocumentActions: o, DOC_EVENT_TREES: s } = e.catalog, { enqueue: i, budget: a } = e.queue, c = e.ports.slots, { allowsPrint: l } = e.authority, { documentPrint: u } = e, f = e.printLatch, d = async (p, m) => { if (!e.settings.get().triggers.document) return null; try { await t(); @@ -78488,11 +78536,11 @@ function eMe(e, { }; return { runDocumentEventOp: async (p, m, v) => { - const S = await f(p, v); + const S = await d(p, v); return JT(S ? [S] : [], m); }, firePrintThroughAdapter: async (p, m) => { - if (d.active) + if (f.active) return m({ code: "reentrant-print", message: "print request during a document print event — suppressed (one dialog per request)" @@ -78508,32 +78556,32 @@ function eMe(e, { ), { status: "executed" }); if (!c.uiAdapter) return m({ code: "no-adapter", message: "print: no UI adapter installed" }), { status: "no-executor", detail: "no UI adapter installed" }; - d.active = !0; + f.active = !0; try { - await f("will-print", m); + await d("will-print", m); const v = c.uiAdapter; - return v ? (p ? v.print(p) : v.print(), await f("did-print", m), { status: "executed" }) : { status: "no-executor", detail: "UI adapter uninstalled mid-print" }; + return v ? (p ? v.print(p) : v.print(), await d("did-print", m), { status: "executed" }) : { status: "no-executor", detail: "UI adapter uninstalled mid-print" }; } finally { - d.active = !1; + f.active = !1; } }, api: { runDocumentVerb: (p, m, v) => i(async () => { a.scriptNodes = 0; const S = (w) => r(w, { source: { kind: "document" } }), C = p === "save" ? "will-save" : "will-print", k = p === "save" ? "did-save" : "did-print", N = async () => { - if (await f(C, S), v?.signal?.aborted) - throw new re("operation-cancelled", "actions", `${p} was cancelled`, { + if (await d(C, S), v?.signal?.aborted) + throw new te("operation-cancelled", "actions", `${p} was cancelled`, { cause: v.signal.reason }); const w = await m(); - return await f(k, S), w; + return await d(k, S), w; }; if (p !== "print") return N(); - d.active = !0; + f.active = !0; try { return await N(); } finally { - d.active = !1; + f.active = !1; } }, v) } @@ -78541,8 +78589,8 @@ function eMe(e, { } function tMe(e, { releaseBarrier: t, resetCascade: n }, { runAndEmit: r }) { const { reportDiagnostic: o, openSequenceCompleted: s } = e.events, i = () => e.settings.get().openSequence, { readDocumentActions: a } = e.catalog, { enqueue: c } = e.queue, l = e.ports.slots; - let u = !1, d = !1; - const f = async () => { + let u = !1, f = !1; + const d = async () => { const v = [], S = [], C = { origin: "lifecycle", source: { kind: "document" }, @@ -78584,21 +78632,21 @@ function tMe(e, { releaseBarrier: t, resetCascade: n }, { runAndEmit: r }) { const k = JT(S, v); return s.emit({ result: k }), k; }, h = async () => { - u || i() === "off" || (u = !0, await f()); + u || i() === "off" || (u = !0, await d()); }, g = () => { if (!u) { if (i() === "off") { u = !0, t(!1); return; } - !l.uiAdapter && i() !== "headless" && !d || (u = !0, c(() => f())); + !l.uiAdapter && i() !== "headless" && !f || (u = !0, c(() => d())); } }; return { - run: f, + run: d, ensureOpenSequenceBeforeDocEvent: h, noteUserActivity: () => { - n(), d || (d = !0, g()); + n(), f || (f = !0, g()); }, claim: () => u ? !1 : (u = !0, !0), /** Arm the latch at bringup: fires immediately for 'headless', releases @@ -78618,40 +78666,40 @@ function nMe(e, { events: t, settings: n }, { dispatch: r }) { current: null, visible: /* @__PURE__ */ new Set() }, c = 0; - const l = (f) => { - f.cause === "user" && (c = 0); - const h = f.currentPage === null ? null : f.currentPage.objectNumber, g = new Set(f.visiblePages.map((C) => C.objectNumber)), p = h !== a.current, m = [...a.visible].filter( + const l = (d) => { + d.cause === "user" && (c = 0); + const h = d.currentPage === null ? null : d.currentPage.objectNumber, g = new Set(d.visiblePages.map((C) => C.objectNumber)), p = h !== a.current, m = [...a.visible].filter( (C) => !g.has(C) ), v = [...g].filter( (C) => !a.visible.has(C) ); if (!p && m.length === 0 && v.length === 0) return; const S = a.current; - if (a = { current: h, visible: g }, f.cause === "programmatic" && (c += 1, c > oF)) { + if (a = { current: h, visible: g }, d.cause === "programmatic" && (c += 1, c > oF)) { o({ code: "cascade-budget", message: `page-lifecycle emission suppressed: ${c} consecutive programmatic rounds (cap ${oF})` }); return; } - p && S !== null && r({ type: "page", event: "close", page: Lt(S) }); + p && S !== null && r({ type: "page", event: "close", page: Ft(S) }); for (const C of m) - r({ type: "page", event: "invisible", page: Lt(C) }); + r({ type: "page", event: "invisible", page: Ft(C) }); for (const C of v) - r({ type: "page", event: "visible", page: Lt(C) }); - p && h !== null && r({ type: "page", event: "open", page: Lt(h) }); + r({ type: "page", event: "visible", page: Ft(C) }); + p && h !== null && r({ type: "page", event: "open", page: Ft(h) }); }; return { - releaseBarrier: (f) => { + releaseBarrier: (d) => { s = !0; const h = i; i = null; try { if (h) l(h); - else if (f && n.get().openSequence === "headless") { + else if (d && n.get().openSequence === "headless") { const g = e.document()?.pages[0]?.ref.objectNumber; - g !== void 0 && (a = { current: g, visible: a.visible }, r({ type: "page", event: "open", page: Lt(g) })); + g !== void 0 && (a = { current: g, visible: a.visible }, r({ type: "page", event: "open", page: Ft(g) })); } } catch (g) { o({ @@ -78664,13 +78712,13 @@ function nMe(e, { events: t, settings: n }, { dispatch: r }) { resetCascade: () => { c = 0; }, - api: { reportPageState: (f) => { - if (f.placed) { - if (f.cause === "user" && (c = 0), !s) { - i = f; + api: { reportPageState: (d) => { + if (d.placed) { + if (d.cause === "user" && (c = 0), !s) { + i = d; return; } - l(f); + l(d); } } } }; @@ -78678,18 +78726,18 @@ function nMe(e, { events: t, settings: n }, { dispatch: r }) { function rMe(e, { form: t }) { const n = (c) => { if (!c) return ["T"]; - const { r: l, g: u, b: d } = jY(c); - return ["RGB", l / 255, u / 255, d / 255]; + const { r: l, g: u, b: f } = jY(c); + return ["RGB", l / 255, u / 255, f / 255]; }, r = async (c) => { - const l = Lt(c), u = await t.read(), d = e.getPage(l), f = Math.max(0, d?.index ?? -1), { annotations: h } = await e.doc.page(l).annotations.list(), g = h.filter( + const l = Ft(c), u = await t.read(), f = e.getPage(l), d = Math.max(0, f?.index ?? -1), { annotations: h } = await e.doc.page(l).annotations.list(), g = h.filter( (p) => p.subtype !== "link" && !p.subtype.startsWith("widget") ).map((p) => { - const m = d ? BV(p.rect, d.pdfCropBox) : null, v = p; + const m = f ? BV(p.rect, f.pdfCropBox) : null, v = p; return { ref: p.ref, name: p.nm ?? "", subtype: p.subtype, - page: f, + page: d, rect: m ? [m.left, m.bottom, m.right, m.top] : [0, 0, 0, 0], contents: p.contents ?? "", author: p.author ?? "", @@ -78714,7 +78762,7 @@ function rMe(e, { form: t }) { world: { fields: oA(u), annots: g, - annotPages: [f], + annotPages: [d], annotsCoverDocument: (e.document()?.pageCount ?? 0) <= 1 } }; @@ -78740,13 +78788,13 @@ function rMe(e, { form: t }) { "will-close": "WillClose" }; return { scriptWorldFor: r, scriptEventFor: (c, l) => { - const u = c.event, d = u.type === "page" ? "Page" : u.type === "document" ? "Doc" : c.source.kind === "widget" ? "Field" : c.source.kind === "link" ? "Link" : c.source.kind === "outline" ? "Bookmark" : "Annot", f = u.type === "activate" ? "Mouse Up" : u.type === "annotation" ? o[u.event] ?? "Mouse Up" : u.type === "page" ? s[u.event] ?? "Open" : i[u.event] ?? "Open", h = c.source.kind === "widget" ? c.source.field : void 0, g = h ? l.fields.find( + const u = c.event, f = u.type === "page" ? "Page" : u.type === "document" ? "Doc" : c.source.kind === "widget" ? "Field" : c.source.kind === "link" ? "Link" : c.source.kind === "outline" ? "Bookmark" : "Annot", d = u.type === "activate" ? "Mouse Up" : u.type === "annotation" ? o[u.event] ?? "Mouse Up" : u.type === "page" ? s[u.event] ?? "Open" : i[u.event] ?? "Open", h = c.source.kind === "widget" ? c.source.field : void 0, g = h ? l.fields.find( (p) => h.kind === "objectNumber" && p.ref.kind === "objectNumber" ? p.ref.objectNumber === h.objectNumber : h.kind === "fqn" && p.name === h.name ) : void 0; return { kind: "widget-activate", - type: d, - name: f, + type: f, + name: d, ...h ? { target: h, source: h } : {}, ...g && g.valueEntry.kind === "scalar" ? { value: g.valueEntry.value } : {} }; @@ -78754,7 +78802,7 @@ function rMe(e, { form: t }) { } const oMe = 16; function sMe(e, t, n, { scriptHost: r }, { performSubmit: o }, { surfaceScriptResult: s }, i) { - const { reportDiagnostic: a } = t.events, c = t.ports.slots, { budget: l } = t.queue, { firePrintThroughAdapter: u } = i, { scriptWorldFor: d, scriptEventFor: f } = rMe(e, t), h = async (p, m) => { + const { reportDiagnostic: a } = t.events, c = t.ports.slots, { budget: l } = t.queue, { firePrintThroughAdapter: u } = i, { scriptWorldFor: f, scriptEventFor: d } = rMe(e, t), h = async (p, m) => { let v = null; if (p.formEffects.length > 0) if (!c.formCommitSink) @@ -78801,7 +78849,7 @@ function sMe(e, t, n, { scriptHost: r }, { performSubmit: o }, { surfaceScriptRe if (C === void 0) return { status: "inert", reason: "no page to anchor the world on" }; const k = (x) => a(x, { action: "javascript", source: v }), N = [], w = (x, A) => x.uiEffects.filter((b) => b.type === "print" || b.type === "submitForm" ? (N.push({ effect: b, phase: A }), !1) : !0), y = await r.transaction(async (x) => { - let A = await d(C); + let A = await f(C); const b = await x.boot({ ...A.world, event: { kind: "name-tree-boot", type: "Doc", name: "Open" } @@ -78814,10 +78862,10 @@ function sMe(e, t, n, { scriptHost: r }, { performSubmit: o }, { surfaceScriptRe phase: "boot", realm: "document", source: v - }), (b.formEffects.length || b.annotEffects.length) && (A = await d(C))); + }), (b.formEffects.length || b.annotEffects.length) && (A = await f(C))); const E = await x.run(p.script, { ...A.world, - event: f(m, A.snapshot) + event: d(m, A.snapshot) }); if (s({ uiEffects: w(E, "user"), @@ -78840,7 +78888,7 @@ function sMe(e, t, n, { scriptHost: r }, { performSubmit: o }, { surfaceScriptRe }); } function iMe(e, t, n) { - const r = e.sandboxFactory ?? (() => import("./index-gudfJIGx.js").then( + const r = e.sandboxFactory ?? (() => import("./index-CRnA8aVz.js").then( ({ createQuickJsSandbox: s }) => s() )), o = e.budget ?? r0; return { @@ -78887,7 +78935,7 @@ function aMe(e, { catalog: t, settings: n }, r) { doc: e.doc, document: () => e.document(), bootSources: async () => ((await o())?.nameTreeScripts ?? []).map( - ({ action: l }) => ol(l) + ({ action: l }) => sl(l) ) }, a = s ? s.realmFor(i) : null; return a && e.cleanup(() => a.destroy()), { @@ -78906,10 +78954,10 @@ function aMe(e, { catalog: t, settings: n }, r) { }; } function cMe(e, { performSubmit: t }) { - const { reportDiagnostic: n, scriptDiagnosticReported: r, scriptFailed: o } = e.events, s = e.ports.slots, { allowsPrint: i } = e.authority, { documentPrint: a } = e, c = e.printLatch, l = (d) => { - const f = { origin: d.origin, phase: d.phase }, h = d.source ?? null; - for (const g of d.uiEffects) { - if (d.realm === "detached" && g.type !== "alert") { + const { reportDiagnostic: n, scriptDiagnosticReported: r, scriptFailed: o } = e.events, s = e.ports.slots, { allowsPrint: i } = e.authority, { documentPrint: a } = e, c = e.printLatch, l = (f) => { + const d = { origin: f.origin, phase: f.phase }, h = f.source ?? null; + for (const g of f.uiEffects) { + if (f.realm === "detached" && g.type !== "alert") { r.emit({ code: "ui-effect-suppressed", message: `script ${g.type} request from a detached realm suppressed: no document surface` @@ -78920,8 +78968,8 @@ function cMe(e, { performSubmit: t }) { t( IJ(g), { - origin: d.origin, - source: d.source ?? { kind: "api" }, + origin: f.origin, + source: f.source ?? { kind: "api" }, event: { type: "activate" } }, (p) => n(p, { action: "javascript", source: h }) @@ -78943,10 +78991,10 @@ function cMe(e, { performSubmit: t }) { continue; } if (g.type === "print" && a.available()) { - if (d.origin !== "user") { + if (f.origin !== "user") { r.emit({ code: "ui-effect-suppressed", - message: `script print request from a ${d.origin} event suppressed` + message: `script print request from a ${f.origin} event suppressed` }); continue; } @@ -78976,28 +79024,28 @@ function cMe(e, { performSubmit: t }) { continue; } g.type === "alert" ? s.uiAdapter.alert?.(g.message, { - ...f, + ...d, icon: g.icon, ...g.title !== void 0 ? { title: g.title } : {} - }) : g.type === "goToPage" ? s.uiAdapter.goToPage?.(g.pageIndex, f) : s.uiAdapter.print(f); + }) : g.type === "goToPage" ? s.uiAdapter.goToPage?.(g.pageIndex, d) : s.uiAdapter.print(d); } - for (const g of d.diagnostics) r.emit(g); - d.error && o.emit({ error: d.error, source: h }); + for (const g of f.diagnostics) r.emit(g); + f.error && o.emit({ error: f.error, source: h }); }; return { surfaceScriptResult: l, - api: { surfaceScriptResult: l, surfaceScriptCommit: (d, f) => { + api: { surfaceScriptResult: l, surfaceScriptCommit: (f, d) => { const h = ["boot", "user"]; for (const g of h) { - const p = d.uiEffects.filter((m) => m.phase === g); + const p = f.uiEffects.filter((m) => m.phase === g); p.length === 0 && g === "boot" || l({ uiEffects: p, - diagnostics: g === "user" ? d.diagnostics : [], - ...g === "user" && d.error ? { error: d.error } : {}, - origin: f.origin, + diagnostics: g === "user" ? f.diagnostics : [], + ...g === "user" && f.error ? { error: f.error } : {}, + origin: d.origin, phase: g, - realm: f.realm, - ...f.source ? { source: f.source } : {} + realm: d.realm, + ...d.source ? { source: d.source } : {} }); } } } @@ -79026,7 +79074,7 @@ function dMe(e) { }, DOC_EVENT_TREES: uMe }; } function fMe(e) { - const t = () => e.get(It); + const t = () => e.get(Pt); return { /** Whether the kernel prints this document: `doc.print`, and the host gave a printer. */ available: () => t().canPrint(), @@ -79120,9 +79168,9 @@ function bMe(e) { function wMe(e, t, n) { const r = t.policy, o = t.ports.slots, { reportDiagnostic: s } = t.events, i = () => n.now?.() ?? Date.now(); return { performSubmit: async (c, l, u) => { - const d = r.current()["submit-form"][l.origin]; - if (d !== "adapter" && d !== "allow") - return d === "report" && u({ + const f = r.current()["submit-form"][l.origin]; + if (f !== "adapter" && f !== "allow") + return f === "report" && u({ code: "blocked", message: `submit-form: policy 'report' for origin '${l.origin}'` }), { status: "blocked" }; @@ -79131,19 +79179,19 @@ function wMe(e, t, n) { code: "no-submit-resolver", message: "submit-form: no dataset resolver registered (form plugin missing?)" }), { status: "blocked", detail: "no dataset resolver" }; - let f; + let d; try { - f = await o.submitResolver(c, l, u); + d = await o.submitResolver(c, l, u); } catch (p) { const m = p instanceof Error ? p.message : String(p); return u({ code: "executor-failed", message: `submit-form: dataset resolution: ${m}` }), { status: "failed", detail: m }; } const h = e.doc.forms, g = typeof h.submit == "function" ? () => Promise.resolve( - h.submit(Y3e(f, new Date(i()).toISOString())) + h.submit(Y3e(d, new Date(i()).toISOString())) ) : null; if (o.submitHandler) try { - const p = o.submitHandler(f, { submitToDocumentHome: g }); + const p = o.submitHandler(d, { submitToDocumentHome: g }); return p && typeof p.then == "function" && p.catch((m) => { s( { @@ -79174,22 +79222,22 @@ function vMe(e, t = {}) { const n = bMe(e), { events: r, ports: o, settings: s } = n, i = { dispatch: (S) => m.dispatch(S), runAndEmit: (S, C) => m.runAndEmit(S, C) - }, a = t.javascript ?? {}, c = wMe(e, n, a), l = aMe(e, n, a), u = cMe(n, c), d = nMe(e, n, i), f = tMe(n, d, i), h = eMe(n, f, i), g = Z3e(e, n), p = Q3e(e, n, c, h), m = H3e( + }, a = t.javascript ?? {}, c = wMe(e, n, a), l = aMe(e, n, a), u = cMe(n, c), f = nMe(e, n, i), d = tMe(n, f, i), h = eMe(n, d, i), g = Z3e(e, n), p = Q3e(e, n, c, h), m = H3e( e, n, p, g, - f, + d, h ); return sMe(e, n, a, l, c, u, h), { - api: tu("actions", [ + api: nu("actions", [ s.api, o.api, l.api, u.api, - d.api, f.api, + d.api, h.api, m.api, { @@ -79201,7 +79249,7 @@ function vMe(e, t = {}) { } ]), connect() { - e.listen(e.doc.events, (S) => g.invalidate(S)), f.arm(), e.aroundDownload((S) => h.api.runDocumentVerb("save", S)), e.aroundPrint((S) => h.api.runDocumentVerb("print", S)); + e.listen(e.doc.events, (S) => g.invalidate(S)), d.arm(), e.aroundDownload((S) => h.api.runDocumentVerb("save", S)), e.aroundPrint((S) => h.api.runDocumentVerb("print", S)); } }; } @@ -79217,13 +79265,13 @@ function kMe(e) { } const AMe = (e) => ({ id: "actions", - token: Dm, + token: jm, scope: "document", settings: { defaults: lle, registered: kMe(e) }, create: (t) => vMe(t, e) }); function SMe(e) { - const t = Rt(Lr), n = Rt(Zt), r = Re(e); + const t = Bt(Lr), n = Bt(tn), r = Re(e); r.current = e, Ke(() => { if (!t) return; const o = Tse({ @@ -79273,7 +79321,7 @@ const IMe = (e) => ({ function TMe(e, t) { const n = e.indexOf(t); return n >= 0 ? n : e.findIndex( - (r) => r.start === t.start && r.count === t.count && Vf(r.page, t.page) + (r) => r.start === t.start && r.count === t.count && Uf(r.page, t.page) ); } const MMe = (e, t) => t.filter((n) => (e.hitsByPage[n.ref.objectNumber]?.length ?? 0) > 0).map((n) => n.ref), iF = Object.freeze([]), BMe = Object.freeze([]), _Me = 250; @@ -79285,7 +79333,7 @@ function LMe(e) { hit: N.hits[N.activeHitIndex] ?? null }), k.status !== "idle" && N.status === "idle" && l.emit({}); }); - function d(k) { + function f(k) { const N = []; for (const w of k.matches) { const y = e.getPage(w.page); @@ -79303,7 +79351,7 @@ function LMe(e) { } return N; } - async function f(k, N, w) { + async function d(k, N, w) { const { signal: y } = N; w.onStart(); let x = N.snippets ?? e.allows("doc.text.copy"); @@ -79324,22 +79372,22 @@ function LMe(e) { ); } catch (T) { if (y?.aborted) return !1; - if (!A && x && b === void 0 && pr(T, "permission-denied")) { + if (!A && x && b === void 0 && Xn(T, "permission-denied")) { x = !1; continue; } - if (b !== void 0 && !E && pr(T, "invalid-input")) { + if (b !== void 0 && !E && Xn(T, "invalid-input")) { E = !0, b = void 0, w.onStart(); continue; } throw T; } if (y?.aborted) return !1; - if (w.onSlice(d(I), I.pagesSearched, I.pageCount), I.nextCursor === null) return !0; + if (w.onSlice(f(I), I.pagesSearched, I.pageCount), I.nextCursor === null) return !0; b = I.nextCursor; } } - const h = () => e.tryGet(Zt)?.getCurrentPage() ?? void 0; + const h = () => e.tryGet(tn)?.getCurrentPage() ?? void 0; async function g(k, N = {}) { if (k.text.length === 0) return p(), { status: "complete", hitCount: 0 }; @@ -79347,7 +79395,7 @@ function LMe(e) { const w = N.from === void 0 ? h() : e.pageOf(N.from).ref; let y = ""; return n.run(async (x) => { - if (y = x.id, !await f( + if (y = x.id, !await d( k, { from: w, signal: x.signal }, { @@ -79356,20 +79404,20 @@ function LMe(e) { }), onSlice: (b, E, I) => x.commit(() => e.state.update(CMe, b, { pagesSearched: E, pageCount: I })) } - )) throw new re("operation-cancelled", "search", "search aborted"); + )) throw new te("operation-cancelled", "search", "search aborted"); return x.commit(() => { e.state.update(IMe), s.emit({ hitCount: u().hits.length }); }), { status: "complete", hitCount: u().hits.length }; }, N).catch((x) => { - if (pr(x, "instance-closed")) return { status: "cancelled", hitCount: 0 }; - if (pr(x, "operation-cancelled")) { + if (Xn(x, "instance-closed")) return { status: "cancelled", hitCount: 0 }; + if (Xn(x, "operation-cancelled")) { const b = x.details?.reason ?? "cancelled", E = b === "superseded" ? "superseded" : b === "cleared" ? "cleared" : "cancelled"; return E === "cancelled" && u().operationId === y && e.state.update(NMe), i.emit({ reason: E }), { status: E === "superseded" ? "superseded" : "cancelled", hitCount: u().hits.length }; } - const A = Br(qe("search", x)); + const A = Br(ze("search", x)); throw u().operationId === y && e.state.update(OMe, A), a.emit({ error: A }), x; }); } @@ -79384,7 +79432,7 @@ function LMe(e) { } function v(k, N) { const w = { ...t.get().reveal, ...N }; - e.tryGet(Zt)?.reveal(k.page, { + e.tryGet(tn)?.reveal(k.page, { rect: k.bounds, align: w.align, behavior: w.behavior @@ -79426,7 +79474,7 @@ function LMe(e) { findAll: async (k, N = {}) => { e.assertAllowed("doc.text.search", "findAll"), N.snippets && e.assertAllowed("doc.text.copy", "findAll"); const w = []; - if (!await f( + if (!await d( k, { ...N.snippets !== void 0 ? { snippets: N.snippets } : {}, @@ -79438,7 +79486,7 @@ function LMe(e) { }, onSlice: (x) => w.push(...x) } - )) throw new re("operation-cancelled", "search", "findAll aborted"); + )) throw new te("operation-cancelled", "search", "findAll aborted"); return w; }, onStarted: r.on, @@ -79466,7 +79514,7 @@ const DMe = (e) => ({ id: "search", token: Oi, scope: "document", - optional: [Zt], + optional: [tn], state: YT, settings: { defaults: K1e, registered: e }, create: LMe @@ -79491,40 +79539,40 @@ const DMe = (e) => ({ } }); function FMe({ onHitClick: e }) { - const t = qo(), n = KMe(t.ref), r = VMe((f) => f.activeHit), o = $Me((f) => f.highlight), [s] = De(aae); + const t = Go(), n = KMe(t.ref), r = VMe((d) => d.activeHit), o = $Me((d) => d.highlight), [s] = je(aae); if (n.length === 0) return null; - const i = pt("search-highlight", o.color), a = pt("search-highlight-active", o.activeColor), c = pt( + const i = gt("search-highlight", o.color), a = gt("search-highlight-active", o.activeColor), c = gt( "search-blend-mode", o.blendMode - ), l = e ? { pointerEvents: "auto", cursor: "pointer" } : null, u = (f) => e && { + ), l = e ? { pointerEvents: "auto", cursor: "pointer" } : null, u = (d) => e && { onPointerDown: (h) => s.press(h), onClick: (h) => { - s.isClick(h) && e(f); + s.isClick(h) && e(d); } - }, d = iae(n, { + }, f = iae(n, { active: r, page: t.transform, color: i, activeColor: a }); - return /* @__PURE__ */ P("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: d.map( - (f) => f.box ? /* @__PURE__ */ P( + return /* @__PURE__ */ P("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: f.map( + (d) => d.box ? /* @__PURE__ */ P( "div", { - ...u(f.hit), + ...u(d.hit), style: { position: "absolute", - left: f.box.left, - top: f.box.top, - width: f.box.width, - height: f.box.height, - backgroundColor: f.fill, + left: d.box.left, + top: d.box.top, + width: d.box.width, + height: d.box.height, + backgroundColor: d.fill, mixBlendMode: c, borderRadius: 2, ...l } }, - f.key + d.key ) : /* @__PURE__ */ P( "svg", { @@ -79539,31 +79587,31 @@ function FMe({ onHitClick: e }) { children: /* @__PURE__ */ P( "polygon", { - points: f.points ?? void 0, - ...u(f.hit), - style: { fill: f.fill, ...l } + points: d.points ?? void 0, + ...u(d.hit), + style: { fill: d.fill, ...l } } ) }, - f.key + d.key ) ) }); } function u8e() { return bt(Oi); } -const VMe = wo(jMe), $Me = jm(Oi), UMe = Object.freeze([]); +const VMe = vo(jMe), $Me = Fm(Oi), UMe = Object.freeze([]); function KMe(e) { const t = vi(); - return en( + return nn( (n) => n.tryCapability(Oi, t ?? void 0)?.listHits(e === void 0 ? void 0 : { page: e }) ?? UMe ); } -const m0 = sn("stage-thumbs"), QT = { - stage: Zt, +const m0 = an("stage-thumbs"), QT = { + stage: tn, thumbnails: m0, - render: Wo, - link: Pf, + render: qo, + link: Tf, selection: _r, search: Oi, annotation: vt, @@ -79572,17 +79620,17 @@ const m0 = sn("stage-thumbs"), QT = { redaction: oa, form: Ss, signature: vs, - pageEdit: Fm, + pageEdit: Vm, metadata: EJ, fonts: Xa, - outline: Vm, - attachment: $m, + outline: $m, + attachment: Um, actions: Lr, - documents: It, + documents: Pt, interaction: yr, - commands: bo, + commands: wo, shell: dt, - i18n: vo + i18n: ko }, HMe = Symbol.for("@embedpdf/viewer/kernel"), zMe = "this viewer is gone: it was unmounted, or mounted again with a new config. Use the viewer the new onReady gives you.", WMe = /^(?:on|register)(?:[A-Z]|$)/, qMe = (e) => { if (typeof e != "object" || e === null) return !1; const t = Object.getPrototypeOf(e); @@ -79590,7 +79638,7 @@ const m0 = sn("stage-thumbs"), QT = { }; function GMe(e, t) { let n = !1; - const r = /* @__PURE__ */ new Set(), o = (p) => new re("instance-closed", p, zMe), s = (p) => { + const r = /* @__PURE__ */ new Set(), o = (p) => new te("instance-closed", p, zMe), s = (p) => { const m = () => { r.delete(m), p(); }; @@ -79641,11 +79689,11 @@ function GMe(e, t) { try { return e.capability(p, m); } catch (v) { - if (pr(v) || e.scopeOf(p) !== "document") throw v; + if (Xn(v) || e.scopeOf(p) !== "document") throw v; const S = v instanceof Error ? v.message : String(v); - throw new re("not-ready", p.name, S, { cause: v }); + throw new te("not-ready", p.name, S, { cause: v }); } - }, d = (p) => { + }, f = (p) => { function m(S) { const C = l(S); if (n) throw o(C.name); @@ -79659,7 +79707,7 @@ function GMe(e, t) { get: m, tryGet: v }; - }, f = (p, m, v = {}) => { + }, d = (p, m, v = {}) => { if (n) return () => { }; const { immediate: S = !1, isEqual: C = Object.is } = v, k = m; @@ -79669,7 +79717,7 @@ function GMe(e, t) { try { y = p(); } catch (A) { - if (pr(A, "not-ready")) return; + if (Xn(A, "not-ready")) return; throw A; } if (N === null) { @@ -79682,11 +79730,11 @@ function GMe(e, t) { }; return w(), s(e.subscribe(w)); }, h = { - ...d(void 0), - documents: a(e.documents, It.name), - commands: a(e.capability(bo), bo.name), - forDocument: d, - watch: f + ...f(void 0), + documents: a(e.documents, Pt.name), + commands: a(e.capability(wo), wo.name), + forDocument: f, + watch: d }; return Object.defineProperty(h, HMe, { value: e }), { viewer: h, @@ -79780,13 +79828,13 @@ function PJ(e) { }; } const RJ = (e) => e.closest("[data-embedpdf-root]") ?? e, XT = "data-epdf-fills-window"; -function Rg(e) { +function Tg(e) { if (e.hasAttribute(XT)) return "window"; const t = e.getRootNode().host ?? null; return vP(e) || t !== null && vP(t) ? "screen" : null; } async function rBe(e) { - if (Rg(e) !== null) return; + if (Tg(e) !== null) return; const t = PJ(e); if (t.screen) try { await e.requestFullscreen({ navigationUI: "hide" }); @@ -79796,7 +79844,7 @@ async function rBe(e) { t.topLevel && t.popover && sBe(e); } async function oBe(e) { - const t = Rg(e); + const t = Tg(e); t === "window" ? SP(e) : t === "screen" && await e.ownerDocument.exitFullscreen(); } function sBe(e) { @@ -79810,21 +79858,21 @@ const iBe = { current: null }; function aBe(e) { - const [t, n] = De(iBe); + const [t, n] = je(iBe); return Ze(() => { const r = e.current; if (!r) return; const o = RJ(r), s = nBe(PJ(o)), i = () => { - const l = Rg(o); + const l = Tg(o); n((u) => u.way === s && u.current === l ? u : { way: s, current: l }); }, a = (l) => { - l.key !== "Escape" || l.defaultPrevented || wS(l) || Rg(o) === "window" && (l.preventDefault(), SP(o)); + l.key !== "Escape" || l.defaultPrevented || wS(l) || Tg(o) === "window" && (l.preventDefault(), SP(o)); }, c = o.ownerDocument; return i(), c.addEventListener("fullscreenchange", i), o.addEventListener("toggle", i), o.addEventListener("keydown", a), () => { - c.removeEventListener("fullscreenchange", i), o.removeEventListener("toggle", i), o.removeEventListener("keydown", a), Rg(o) === "window" && SP(o); + c.removeEventListener("fullscreenchange", i), o.removeEventListener("toggle", i), o.removeEventListener("keydown", a), Tg(o) === "window" && SP(o); }; }, [e]), t; } @@ -79837,7 +79885,7 @@ function lBe(e, t, n) { icon: r ? "fullscreenExit" : "fullscreen", visible: () => o, active: () => r, - run: () => Rg(e) === null ? rBe(e) : oBe(e) + run: () => Tg(e) === null ? rBe(e) : oBe(e) }; } const ZT = (e) => typeof e == "object" && e !== null, uBe = (e) => e.side === "start" ? "start" : "end"; @@ -79854,7 +79902,7 @@ function fBe(e, t, n) { started: o }; } -const uF = (e, t, n, r) => t > 0 || n && !(e.tryGet(bo)?.isCategoryDisabled(r) ?? !1), e3 = "search", TJ = { +const uF = (e, t, n, r) => t > 0 || n && !(e.tryGet(wo)?.isCategoryDisabled(r) ?? !1), e3 = "search", TJ = { categories: ["search"], allowed: (e) => e.tryGet(Oi)?.canSearch() ?? !0, notAllowedKey: "commands.notAllowed.doc-text-search" @@ -79871,7 +79919,7 @@ const uF = (e, t, n, r) => t > 0 || n && !(e.tryGet(bo)?.isCategoryDisabled(r) ? titleKey: "panels.thumbnails", icon: "sidebar", categories: ["thumbnails"], - allowed: (e) => e.tryGet(Wo)?.canRenderThumbnail() ?? !0, + allowed: (e) => e.tryGet(qo)?.canRenderThumbnail() ?? !0, notAllowedKey: "commands.notAllowed.doc-render-thumbnail" }], ["outline", { @@ -79879,7 +79927,7 @@ const uF = (e, t, n, r) => t > 0 || n && !(e.tryGet(bo)?.isCategoryDisabled(r) ? icon: "listTree", categories: ["outline"], visible: (e) => { - const t = e.tryGet(Vm); + const t = e.tryGet($m); return t != null && uF(e, t.list().length, t.canEdit(), "outline.editing"); } }], @@ -79888,7 +79936,7 @@ const uF = (e, t, n, r) => t > 0 || n && !(e.tryGet(bo)?.isCategoryDisabled(r) ? icon: "paperclip", categories: ["attachments"], visible: (e) => { - const t = e.tryGet($m); + const t = e.tryGet(Um); return t != null && uF(e, t.list().length, t.canCreate(), "attachments.adding"); } }], @@ -79958,15 +80006,15 @@ const uF = (e, t, n, r) => t > 0 || n && !(e.tryGet(bo)?.isCategoryDisabled(r) ? }; function gBe(e, t) { return Object.entries(e ?? {}).flatMap(([n, r]) => { - const o = eu(n); + const o = tu(n); if (!ZT(r)) return []; const s = n === e3 && !t(dF.id) ? [dF] : []; if (t(o)) return s; - const i = hBe.get(n), { focus: a, titleKey: c, icon: l, ...u } = i ?? {}, d = r.titleKey ?? (r.title === void 0 ? i?.titleKey : void 0); + const i = hBe.get(n), { focus: a, titleKey: c, icon: l, ...u } = i ?? {}, f = r.titleKey ?? (r.title === void 0 ? i?.titleKey : void 0); return [{ id: o, - label: r.title ?? (d === void 0 ? n : void 0), - labelKey: d, + label: r.title ?? (f === void 0 ? n : void 0), + labelKey: f, icon: r.icon ?? i?.icon, ...pBe(n, a, r.closable !== !1), ...u @@ -79986,13 +80034,13 @@ function wBe(e, t) { return t === null ? !1 : e ?? bBe(t, "page-number"); } function vBe(e, t) { - const n = Rt(Zt), [r, o] = De(!1); + const n = Bt(tn), [r, o] = je(!1); return Ke(() => { const s = t.current; if (!e || !s) return; let i = !1, a; const c = () => { - const m = Gr(s.ownerDocument); + const m = Jr(s.ownerDocument); return i || m !== null && s.contains(m) && m.matches(":focus-visible") || s.querySelector('[aria-expanded="true"]') !== null; }, l = () => { o(!1), clearTimeout(a), a = setTimeout(u, yBe); @@ -80000,18 +80048,18 @@ function vBe(e, t) { function u() { c() ? l() : o(!0); } - const d = () => { + const f = () => { i = !0, l(); - }, f = () => { + }, d = () => { i = !1, l(); }, h = s.closest("[data-float]")?.offsetParent ?? null, g = { capture: !0, passive: !0 }; - h?.addEventListener("pointermove", l, g), h?.addEventListener("pointerdown", l, g), s.addEventListener("pointerenter", d), s.addEventListener("pointerleave", f), s.addEventListener("focusin", l); + h?.addEventListener("pointermove", l, g), h?.addEventListener("pointerdown", l, g), s.addEventListener("pointerenter", f), s.addEventListener("pointerleave", d), s.addEventListener("focusin", l); const p = n?.onCameraChanged(l); return l(), () => { - p?.(), h?.removeEventListener("pointermove", l, g), h?.removeEventListener("pointerdown", l, g), s.removeEventListener("pointerenter", d), s.removeEventListener("pointerleave", f), s.removeEventListener("focusin", l), clearTimeout(a), o(!1); + p?.(), h?.removeEventListener("pointermove", l, g), h?.removeEventListener("pointerdown", l, g), s.removeEventListener("pointerenter", f), s.removeEventListener("pointerleave", d), s.removeEventListener("focusin", l), clearTimeout(a), o(!1); }; }, [ e, @@ -80020,7 +80068,7 @@ function vBe(e, t) { ]), r; } function kBe(e) { - const [t, n] = De(S5e); + const [t, n] = je(S5e); return Ze(() => { const r = e.current; if (!r) return; @@ -80056,16 +80104,16 @@ function SBe(e, t) { }; } function xBe(e, t) { - const n = kx((u) => u.direction), [r, o] = De(null), [s, i] = De(ABe); + const n = kx((u) => u.direction), [r, o] = je(null), [s, i] = je(ABe); Ze(() => { const u = e.current; - return u ? iR(u, (d) => o(Math.round(d))) : void 0; + return u ? iR(u, (f) => o(Math.round(f))) : void 0; }, [e]); const a = t.touch === null; Ke(() => { if (!a || typeof matchMedia != "function") return; - const u = matchMedia(MJ), d = () => i(u.matches); - return u.addEventListener("change", d), () => u.removeEventListener("change", d); + const u = matchMedia(MJ), f = () => i(u.matches); + return u.addEventListener("change", f), () => u.removeEventListener("change", f); }, [a]); const c = t.size, l = t.touch ?? s; return ft(() => r === null ? null : { @@ -80081,11 +80129,11 @@ function xBe(e, t) { ]); } function EBe({ className: e, rootRef: t, children: n }) { - const r = Re(null), o = t ?? r, s = n5e(), [i] = De(() => SBe(s.size, s.touch)); + const r = Re(null), o = t ?? r, s = n5e(), [i] = je(() => SBe(s.size, s.touch)); Ke(() => { for (const C of i.problems) console.warn(`[embedpdf] ${C}`); }, [i]); - const a = xBe(o, i), c = a ?? MT, l = t5e(), u = ft(() => NPe(l, WRe, c), [l, c]), d = u.toJSON(), f = jr(), h = ar() ?? void 0, g = en(() => zPe(d, (C) => f.resolveCommand(C, h), (C) => f.getCommand(C)), fF), p = Re(/* @__PURE__ */ new Map()), m = ft(() => { + const a = xBe(o, i), c = a ?? MT, l = t5e(), u = ft(() => NPe(l, WRe, c), [l, c]), f = u.toJSON(), d = jr(), h = cr() ?? void 0, g = nn(() => zPe(f, (C) => d.resolveCommand(C, h), (C) => d.getCommand(C)), fF), p = Re(/* @__PURE__ */ new Map()), m = ft(() => { const C = (A, b) => { const E = JSON.stringify(b), I = p.current.get(A); return I?.key === E ? I.value : (p.current.set(A, { @@ -80093,26 +80141,26 @@ function EBe({ className: e, rootRef: t, children: n }) { value: b }), b); }, k = new Set(g), N = /* @__PURE__ */ new Map(); - for (const A of Object.keys(d.bars ?? {})) N.set(A, C(`bar:${A}`, CT(d, A, { omit: k }))); + for (const A of Object.keys(f.bars ?? {})) N.set(A, C(`bar:${A}`, CT(f, A, { omit: k }))); const w = (A) => N.get(A) ?? null, y = { - selection: C("strip:selection", XA(d, "selection", w)), - annotation: C("strip:annotation", XA(d, "annotation", w)), - snapshot: C("strip:snapshot", XA(d, "snapshot", w)) + selection: C("strip:selection", XA(f, "selection", w)), + annotation: C("strip:annotation", XA(f, "annotation", w)), + snapshot: C("strip:snapshot", XA(f, "snapshot", w)) }, x = /* @__PURE__ */ new Map(); - for (const A of Object.keys(d.menus ?? {})) x.set(A, C(`menu:${A}`, IT(d, A))); + for (const A of Object.keys(f.menus ?? {})) x.set(A, C(`menu:${A}`, IT(f, A))); return { - data: d, + data: f, env: c, bar: w, strip: (A) => y[A], menu: (A) => x.get(A) ?? null }; }, [ - d, + f, c, g - ]), v = en(() => Cm(d).map(Zl).filter((C) => !g.includes(C) && f.resolveCommand(C, h)?.visible === !0), fF); - CBe(hF(xRe(d), ERe)), IBe(hF(d.panels, mBe)), OBe(v), PBe(a === null ? null : u); + ]), v = nn(() => Im(f).map(eu).filter((C) => !g.includes(C) && d.resolveCommand(C, h)?.visible === !0), fF); + CBe(hF(xRe(f), ERe)), IBe(hF(f.panels, mBe)), OBe(v), PBe(a === null ? null : u); const S = kBe(o); return NBe(o, S.top && S.right && S.bottom && S.left), /* @__PURE__ */ P("div", { ref: o, @@ -80166,7 +80214,7 @@ function NBe(e, t) { ]); } function OBe(e) { - const t = jr(), n = Rt(dt), r = zt(dt, xx, null); + const t = jr(), n = Bt(dt), r = Gt(dt, xx, null); Ke(() => { r === null || e.includes(r) || (n?.close(r), t.execute(tv).catch(() => { })); @@ -80209,7 +80257,7 @@ const RBe = { insetStart: 0, insetEnd: 0, offset: 0 -}, al = (e) => e !== null && e.width > 0; +}, cl = (e) => e !== null && e.width > 0; function TBe(e, t, n, r) { const o = n + t / 2, s = e - r - t / 2; if (o > s) return null; @@ -80221,7 +80269,7 @@ function TBe(e, t, n, r) { }; } function MBe({ length: e, gap: t, start: n, middle: r, end: o }) { - const s = al(n) ? n.width + t : 0, i = al(o) ? o.width + t : 0, a = al(r) ? TBe(e, r.width, s, i) : null, c = al(r) && a === null ? r.height + t : 0, l = al(n) && al(o) && n.width + t + o.width > e; + const s = cl(n) ? n.width + t : 0, i = cl(o) ? o.width + t : 0, a = cl(r) ? TBe(e, r.width, s, i) : null, c = cl(r) && a === null ? r.height + t : 0, l = cl(n) && cl(o) && n.width + t + o.width > e; return { start: { ...Zi, @@ -80235,7 +80283,7 @@ function MBe({ length: e, gap: t, start: n, middle: r, end: o }) { }; } function BBe({ length: e, gap: t, start: n, end: r }) { - return al(n) && al(r) && n.width + t + r.width > e ? { + return cl(n) && cl(r) && n.width + t + r.width > e ? { start: { ...Zi, offset: r.height + t @@ -80252,17 +80300,17 @@ function BBe({ length: e, gap: t, start: n, end: r }) { }; } function t3(e) { - const t = jr(), n = ar() ?? void 0, r = ft(() => e ? eE(e) : null, [e]); - return en(() => r !== null && xT(r, (o) => { - const s = Sm(o); + const t = jr(), n = cr() ?? void 0, r = ft(() => e ? eE(e) : null, [e]); + return nn(() => r !== null && xT(r, (o) => { + const s = xm(o); return s !== null && t.resolveCommand(s, n)?.visible === !0; })); } function n3(e) { - const { data: t } = Ti(), n = zt(dt, xx, null); + const { data: t } = Ti(), n = Gt(dt, xx, null); return e.filter((r) => { const o = t.bars?.[r]?.mode; - return o === void 0 || n === Zl(o); + return o === void 0 || n === eu(o); }); } const _Be = { @@ -80327,15 +80375,15 @@ const BJ = Fn(() => { function VBe({ id: e, position: t }) { const { data: n, bar: r } = Ti(), o = r(e), s = t3(o), i = ft(() => o ? FBe(o, gF[t]) : null, [o, t]), a = Re(null), c = i !== null && s; Ke(() => c && a.current ? Zx(a.current) : void 0, [c]); - const l = vBe(c && wBe(DPe(n, e), o), a), u = Et(BJ); + const l = vBe(c && wBe(DPe(n, e), o), a), u = Ct(BJ); return Ze(() => { - let d = null; + let f = null; if (a.current?.querySelectorAll(':scope > [role="toolbar"] > div')?.forEach((h, g) => { - DBe[g] === gF[t] ? (h.setAttribute("part", cE(e)), d = h) : h.removeAttribute("part"); - }), d === null) return; - const f = iR(d, (h) => u(e, h)); + DBe[g] === gF[t] ? (h.setAttribute("part", cE(e)), f = h) : h.removeAttribute("part"); + }), f === null) return; + const d = iR(f, (h) => u(e, h)); return () => { - f(), u(e, null); + d(), u(e, null); }; }, [ c, @@ -80356,7 +80404,7 @@ function VBe({ id: e, position: t }) { }) }) : null; } -const $Be = 8, Al = 20, UBe = [ +const $Be = 8, Sl = 20, UBe = [ "top", "sides", "bottom" @@ -80365,25 +80413,25 @@ const $Be = 8, Al = 20, UBe = [ "middle", "end" ], HBe = { - top: { top: Al }, + top: { top: Sl }, sides: { - top: Al, - bottom: Al, + top: Sl, + bottom: Sl, display: "flex", flexDirection: "column", justifyContent: "center" }, - bottom: { bottom: Al } + bottom: { bottom: Sl } }, zBe = (e, t) => e === "top" || e === "sides" && t === "end" ? "paddingTop" : "paddingBottom"; function WBe() { - const e = Re(null), [t, n] = De(0); + const e = Re(null), [t, n] = je(0); return Ze(() => e.current ? iR(e.current, n) : void 0, []), /* @__PURE__ */ P(nt, { children: [/* @__PURE__ */ P("div", { ref: e, "aria-hidden": !0, className: "pointer-events-none absolute top-0 h-0", style: { - insetInlineStart: Al, - insetInlineEnd: Al + insetInlineStart: Sl, + insetInlineEnd: Sl } }), UBe.map((r) => /* @__PURE__ */ P(JBe, { row: r, @@ -80396,7 +80444,7 @@ const qBe = { end: null }, GBe = (e, t) => e === t || e !== null && t !== null && Math.abs(e.width - t.width) <= 0.5 && Math.abs(e.height - t.height) <= 0.5; function JBe({ row: e, length: t }) { - const { data: n } = Ti(), r = RBe[e], [o, s] = De(qBe), i = fi((c, l) => s((u) => GBe(u[c], l) ? u : { + const { data: n } = Ti(), r = RBe[e], [o, s] = je(qBe), i = fi((c, l) => s((u) => GBe(u[c], l) ? u : { ...u, [c]: l }), []), a = (e === "sides" ? BBe : MBe)({ @@ -80417,7 +80465,7 @@ function JBe({ row: e, length: t }) { }) }); } function YBe({ row: e, slot: t, position: n, stack: r, spot: o, onColumn: s }) { - const i = n3(r), a = Re(null), [c, l] = De(0), [u, d] = De(() => /* @__PURE__ */ new Map()), f = fi((p, m) => d((v) => { + const i = n3(r), a = Re(null), [c, l] = je(0), [u, f] = je(() => /* @__PURE__ */ new Map()), d = fi((p, m) => f((v) => { const S = v.get(p); if (m === null ? S === void 0 : S !== void 0 && Math.abs(S - m) <= 0.5) return v; const C = new Map(v); @@ -80440,15 +80488,15 @@ function YBe({ row: e, slot: t, position: n, stack: r, spot: o, onColumn: s }) { className: "pointer-events-none absolute", style: { ...HBe[e], - insetInlineStart: Al + o.insetStart, - insetInlineEnd: Al + o.insetEnd, + insetInlineStart: Sl + o.insetStart, + insetInlineEnd: Sl + o.insetEnd, [zBe(e, t)]: o.offset }, children: /* @__PURE__ */ P("div", { ref: a, className: `flex gap-2 ${e === "bottom" ? "flex-col-reverse" : "flex-col"}`, children: /* @__PURE__ */ P(BJ.Provider, { - value: f, + value: d, children: i.map((p) => /* @__PURE__ */ P(VBe, { id: p, position: n @@ -80561,7 +80609,7 @@ function s_e() { return Ke(() => o_e(), []), null; } function i_e({ cmd: e, run: t, emphasis: n }) { - const r = sr(Pg(e)), o = (s) => /* @__PURE__ */ P(nt, { children: [/* @__PURE__ */ P("button", { + const r = ir(Rg(e)), o = (s) => /* @__PURE__ */ P(nt, { children: [/* @__PURE__ */ P("button", { ...r.trigger, type: "button", onClick: t, @@ -80570,13 +80618,13 @@ function i_e({ cmd: e, run: t, emphasis: n }) { "aria-haspopup": e.menu ? "menu" : void 0, "aria-expanded": e.menu ? s : void 0, "aria-label": e.label, - part: Jr(s, n), - className: Ho(s, e.enabled, n), - children: e.icon && /* @__PURE__ */ P(Nt, { + part: Yr(s, n), + className: zo(s, e.enabled, n), + children: e.icon && /* @__PURE__ */ P(Rt, { name: e.icon, size: 20, accent: e.iconAccent, - className: Im(e.icon) + className: Nm(e.icon) }) }), r.element] }); return e.menu ? /* @__PURE__ */ P(iE, { @@ -80604,9 +80652,9 @@ function r3({ bar: e, view: t, label: n }) { }) }); } -const a_e = In(() => import("./link-editor-BQl5WwML-BMgM601I.js").then((e) => e.LinkEditorCard)); +const a_e = In(() => import("./link-editor-BQl5WwML-7K8D2W_R.js").then((e) => e.LinkEditorCard)); function c_e() { - const e = Tt(), t = BT("annotation"), n = VT(t), r = Pi("link-editor"), o = U0e((s) => s.selected); + const e = _t(), t = BT("annotation"), n = VT(t), r = Pi("link-editor"), o = U0e((s) => s.selected); return Ke(() => { !o.length && r.isOpen && r.close(); }, [o.length, r.isOpen]), !t || !n ? null : /* @__PURE__ */ P(z0e, { @@ -80620,9 +80668,9 @@ function c_e() { }); } function l_e() { - const e = ar(), { unlock: t, close: n } = pR(), r = c2((g) => g.documents), o = Tt(), [s, i] = De(""), [a, c] = De(!1), [l, u] = De(!1), d = r.find((g) => g.id === e); - if (!e || !d) return null; - const f = a || d.passwordProvided === !0, h = async () => { + const e = cr(), { unlock: t, close: n } = pR(), r = c2((g) => g.documents), o = _t(), [s, i] = je(""), [a, c] = je(!1), [l, u] = je(!1), f = r.find((g) => g.id === e); + if (!e || !f) return null; + const d = a || f.passwordProvided === !0, h = async () => { if (!(l || !s.trim())) { u(!0); try { @@ -80644,7 +80692,7 @@ function l_e() { children: [ /* @__PURE__ */ P("div", { className: "bg-accent-light mb-4 rounded-full p-4", - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "lock", size: 28, className: "text-accent" @@ -80654,15 +80702,15 @@ function l_e() { className: "text-fg text-lg font-semibold", children: o("passwordPrompt.title") }), - d.name && /* @__PURE__ */ P("p", { + f.name && /* @__PURE__ */ P("p", { className: "text-fg-muted mt-1 text-sm", - children: d.name + children: f.name }) ] }), /* @__PURE__ */ P("p", { className: "text-fg-secondary mt-4 text-center text-sm", - children: o(f ? "passwordPrompt.incorrect" : "passwordPrompt.required") + children: o(d ? "passwordPrompt.incorrect" : "passwordPrompt.required") }), /* @__PURE__ */ P("div", { className: "mt-5", @@ -80682,9 +80730,9 @@ function l_e() { autoFocus: !0 })] }), - f && /* @__PURE__ */ P("div", { + d && /* @__PURE__ */ P("div", { className: "mt-3 flex items-center gap-2 rounded-md border border-red-500/40 bg-red-500/10 p-3", - children: [/* @__PURE__ */ P(Nt, { + children: [/* @__PURE__ */ P(Rt, { name: "alertTriangle", size: 16, className: "flex-shrink-0 text-red-500" @@ -80728,7 +80776,7 @@ function xP(e) { } } function u_e() { - const e = ar(), { close: t, retry: n } = pR(), r = c2((i) => i.documents), o = Tt(), s = r.find((i) => i.id === e); + const e = cr(), { close: t, retry: n } = pR(), r = c2((i) => i.documents), o = _t(), s = r.find((i) => i.id === e); return !e || !s ? null : /* @__PURE__ */ P("div", { className: "bg-app flex h-full w-full items-center justify-center p-8", children: /* @__PURE__ */ P("div", { @@ -80737,7 +80785,7 @@ function u_e() { children: [ /* @__PURE__ */ P("div", { className: "mb-4 rounded-full bg-red-500/10 p-4", - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "alertTriangle", size: 28, className: "text-red-500" @@ -80776,26 +80824,26 @@ function u_e() { }); } function d_e({ className: e, children: t }) { - const n = Tt(), r = jr(), o = go(mP), s = o.visible && o.enabled, i = Re(0), [a, c] = De(!1), l = (d) => s && gG(d.dataTransfer), u = () => { + const n = _t(), r = jr(), o = mo(mP), s = o.visible && o.enabled, i = Re(0), [a, c] = je(!1), l = (f) => s && gG(f.dataTransfer), u = () => { i.current = 0, c(!1); }; return /* @__PURE__ */ P("div", { className: e, - onDragEnter: (d) => { - l(d) && (d.preventDefault(), i.current += 1, c(!0)); + onDragEnter: (f) => { + l(f) && (f.preventDefault(), i.current += 1, c(!0)); }, - onDragOver: (d) => { - l(d) && (d.preventDefault(), d.dataTransfer.dropEffect = "copy"); + onDragOver: (f) => { + l(f) && (f.preventDefault(), f.dataTransfer.dropEffect = "copy"); }, onDragLeave: () => { i.current !== 0 && (i.current -= 1, i.current === 0 && c(!1)); }, - onDrop: (d) => { - if (u(), !l(d)) return; - d.preventDefault(), d.stopPropagation(); - const f = Array.from(d.dataTransfer.files).filter(TT); - if (f.length === 0) return; - const h = { files: f }; + onDrop: (f) => { + if (u(), !l(f)) return; + f.preventDefault(), f.stopPropagation(); + const d = Array.from(f.dataTransfer.files).filter(TT); + if (d.length === 0) return; + const h = { files: d }; r.execute(mP, { args: h }).catch(() => { }); }, @@ -80814,9 +80862,9 @@ function f_e() { return e.isOpen ? /* @__PURE__ */ P(h_e, { onClose: e.close }) : null; } function h_e({ onClose: e }) { - const t = Tt(), n = xi(), r = Rt(Zt), o = um((d) => d.currentPageIndex + 1), s = um((d) => d.pageCount), [i, a] = De(() => String(o)), c = () => { - const d = Number.parseInt(i, 10); - Number.isFinite(d) && s > 0 && r?.goToPage(Math.min(Math.max(d, 1), s) - 1), e(); + const t = _t(), n = xi(), r = Bt(tn), o = dm((f) => f.currentPageIndex + 1), s = dm((f) => f.pageCount), [i, a] = je(() => String(o)), c = () => { + const f = Number.parseInt(i, 10); + Number.isFinite(f) && s > 0 && r?.goToPage(Math.min(Math.max(f, 1), s) - 1), e(); }, [l, u = ""] = t("pageNumber.page", { params: { current: "", total: s @@ -80826,8 +80874,8 @@ function h_e({ onClose: e }) { onClose: e, className: "border-border bg-surface w-80 rounded-lg border p-4 shadow-xl", children: /* @__PURE__ */ P("form", { - onSubmit: (d) => { - d.preventDefault(), c(); + onSubmit: (f) => { + f.preventDefault(), c(); }, children: [ /* @__PURE__ */ P("h2", { @@ -80844,8 +80892,8 @@ function h_e({ onClose: e }) { inputMode: "numeric", "aria-label": t("pageNumber.goToPage"), value: i, - onChange: (d) => a(d.target.value.replace(/[^0-9]/g, "")), - onFocus: (d) => d.currentTarget.select(), + onChange: (f) => a(f.target.value.replace(/[^0-9]/g, "")), + onFocus: (f) => f.currentTarget.select(), style: { width: `${String(s).length + 2}ch` }, className: "border-border bg-surface text-fg focus:border-accent focus:ring-accent rounded-md border px-1.5 py-1 text-center tabular-nums outline-none focus:ring-1" }), @@ -80870,7 +80918,7 @@ function h_e({ onClose: e }) { }); } function LJ({ small: e = !1 }) { - const t = Tt(), n = qo(), { status: r, slow: o } = rde(), s = r === "loading" && o; + const t = _t(), n = Go(), { status: r, slow: o } = rde(), s = r === "loading" && o; if (!s && !(r === "error" || r === "forbidden")) return null; const { viewScale: i, rotation: a } = n.transform, c = n.getViewDemand?.().visibleRect, l = c && c.width > 0 && c.height > 0 ? { x: (c.x + c.width / 2) * i, @@ -80886,14 +80934,14 @@ function LJ({ small: e = !1 }) { pointerEvents: "none" }; if (s) { - const d = e ? "h-5 w-5" : "h-8 w-8"; + const f = e ? "h-5 w-5" : "h-8 w-8"; return /* @__PURE__ */ P("div", { style: u, children: /* @__PURE__ */ P("div", { part: "page-loading", role: "status", "aria-label": t("demo.pageLoading", { params: { page: n.pageIndex + 1 } }), - className: `border-border-subtle border-t-accent ${d} rounded-full border-2 motion-safe:animate-spin` + className: `border-border-subtle border-t-accent ${f} rounded-full border-2 motion-safe:animate-spin` }) }); } @@ -80955,7 +81003,7 @@ function v_e(e) { return n === "sheet" ? /* @__PURE__ */ P(E_e, { ...e }) : n === "overlay" ? /* @__PURE__ */ P(x_e, { ...e }) : /* @__PURE__ */ P(A_e, { ...e }); } function i3({ title: e, header: t, onClose: n }) { - const r = Tt(); + const r = _t(); return /* @__PURE__ */ P("div", { part: "panel-header", "data-epdf-panel-header": "", @@ -80974,7 +81022,7 @@ function i3({ title: e, header: t, onClose: n }) { onClick: n, "aria-label": r("panel.close"), className: "text-fg-muted hover:bg-hover grid h-7 w-7 shrink-0 place-items-center rounded-md", - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "x", size: 16 }) @@ -80988,20 +81036,20 @@ function k_e(e) { return t || (t = /* @__PURE__ */ new Map(), mF.set(e, t)), t; } function a3(e, t) { - const n = k_e(Qa()), [, r] = Wl((i) => i + 1, 0); + const n = k_e(Qa()), [, r] = ql((i) => i + 1, 0); return [n.get(e) ?? t.initial, (i) => { n.get(e) !== i && (n.set(e, i), r()); }]; } function A_e({ id: e, side: t, width: n, resizable: r = !0, closable: o = !0, title: s, onClose: i, header: a, bars: c, children: l }) { - const u = oc(), d = xi(), f = o3(n), [h, g] = a3(e, f), p = uE(h, u.width, f), m = EG(), v = { + const u = oc(), f = xi(), d = o3(n), [h, g] = a3(e, d), p = uE(h, u.width, d), m = EG(), v = { side: t, dir: u.dir, viewerWidth: u.width, - widths: f + widths: d }; return /* @__PURE__ */ P("section", { - id: d, + id: f, role: "region", "aria-label": s, part: "panel", @@ -81021,7 +81069,7 @@ function A_e({ id: e, side: t, width: n, resizable: r = !0, closable: o = !0, ti children: l }), r && /* @__PURE__ */ P(jJ, { - regionId: d, + regionId: f, edge: v, title: s, width: p, @@ -81035,19 +81083,19 @@ function A_e({ id: e, side: t, width: n, resizable: r = !0, closable: o = !0, ti }); } function jJ({ regionId: e, edge: t, title: n, width: r, onWidth: o, onResized: s }) { - const i = Tt(), a = Re(null), c = (d) => { - d.pointerType === "mouse" && d.button !== 0 || (d.preventDefault(), d.currentTarget.setPointerCapture(d.pointerId), a.current = { - pointerId: d.pointerId, - startX: d.clientX, + const i = _t(), a = Re(null), c = (f) => { + f.pointerType === "mouse" && f.button !== 0 || (f.preventDefault(), f.currentTarget.setPointerCapture(f.pointerId), a.current = { + pointerId: f.pointerId, + startX: f.clientX, startWidth: r, width: r }); - }, l = (d) => { - const f = a.current; - !f || f.pointerId !== d.pointerId || (f.width = EP(f.startWidth, d.clientX - f.startX, t), o(f.width)); - }, u = (d) => { - const f = a.current; - f?.pointerId === d.pointerId && (a.current = null, f.width !== f.startWidth && s(f.width)); + }, l = (f) => { + const d = a.current; + !d || d.pointerId !== f.pointerId || (d.width = EP(d.startWidth, f.clientX - d.startX, t), o(d.width)); + }, u = (f) => { + const d = a.current; + d?.pointerId === f.pointerId && (a.current = null, d.width !== d.startWidth && s(d.width)); }; return /* @__PURE__ */ P("div", { role: "separator", @@ -81064,9 +81112,9 @@ function jJ({ regionId: e, edge: t, title: n, width: r, onWidth: o, onResized: s onPointerMove: l, onPointerUp: u, onPointerCancel: u, - onKeyDown: (d) => { - const f = w_e(r, d.key, d.shiftKey, t); - f !== null && (d.preventDefault(), f !== r && (o(f), s(f))); + onKeyDown: (f) => { + const d = w_e(r, f.key, f.shiftKey, t); + d !== null && (f.preventDefault(), d !== r && (o(d), s(d))); } }); } @@ -81075,11 +81123,11 @@ const S_e = { end: "end-0 border-s starting:translate-x-full rtl:starting:-translate-x-full" }; function x_e({ id: e, side: t, width: n, resizable: r = !0, title: o, onClose: s, header: i, bars: a, list: c, children: l }) { - const u = oc(), d = xi(), f = o3(n), [h, g] = a3(e, f), p = uE(h, u.width, f), m = EG(), v = { + const u = oc(), f = xi(), d = o3(n), [h, g] = a3(e, d), p = uE(h, u.width, d), m = EG(), v = { side: t, dir: u.dir, viewerWidth: u.width, - widths: f + widths: d }, S = Re(null), C = Re(s); return C.current = s, Ze(() => { const k = S.current; @@ -81096,7 +81144,7 @@ function x_e({ id: e, side: t, width: n, resizable: r = !0, title: o, onClose: s onClick: () => C.current() }), /* @__PURE__ */ P("section", { ref: S, - id: d, + id: f, role: "dialog", "aria-label": o, part: "panel", @@ -81120,7 +81168,7 @@ function x_e({ id: e, side: t, width: n, resizable: r = !0, title: o, onClose: s }) }), r && /* @__PURE__ */ P(jJ, { - regionId: d, + regionId: f, edge: v, title: o, width: p, @@ -81155,7 +81203,7 @@ function E_e({ id: e, width: t, title: n, onClose: r, header: o, bars: s, list: }); } function C_e({ id: e, side: t, title: n, onClose: r, children: o }) { - const s = Tt(), { size: i } = oc(), a = Re(null), c = Re(r); + const s = _t(), { size: i } = oc(), a = Re(null), c = Re(r); return c.current = r, Ze(() => { const l = a.current; if (!l) return; @@ -81183,7 +81231,7 @@ function C_e({ id: e, side: t, title: n, onClose: r, children: o }) { onClick: r, "aria-label": s("panel.close"), className: "text-fg-muted hover:bg-hover grid h-8 w-8 shrink-0 place-items-center rounded-md", - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "x", size: 16 }) @@ -81192,7 +81240,7 @@ function C_e({ id: e, side: t, title: n, onClose: r, children: o }) { }); } function I_e({ id: e, title: t, panels: n }) { - const r = Tt(), [o, s] = De(!1), i = sr({ label: r("panels.switch") }); + const r = _t(), [o, s] = je(!1), i = ir({ label: r("panels.switch") }); return /* @__PURE__ */ P("div", { className: "relative flex min-w-0", children: [ @@ -81207,7 +81255,7 @@ function I_e({ id: e, title: t, panels: n }) { children: [/* @__PURE__ */ P("span", { className: "truncate", children: t - }), /* @__PURE__ */ P(Nt, { + }), /* @__PURE__ */ P(Rt, { name: "chevronDown", size: 16, className: "text-fg-muted shrink-0" @@ -81229,7 +81277,7 @@ function I_e({ id: e, title: t, panels: n }) { }); } function N_e({ panel: e, current: t, onPicked: n }) { - const r = go(eu(e)); + const r = mo(tu(e)); return r.visible ? /* @__PURE__ */ P(Gv, { command: { ...r, @@ -81263,7 +81311,7 @@ function P_e(e, t, n, r, o) { for (const u of e) (!s || yF(u, t.x, t.y) < yF(s, t.x, t.y)) && (s = u); if (!s || o.has(s.page)) return null; const i = FJ(e) > 1, a = i ? t.x < s.x + s.width / 2 : t.y < s.y + s.height / 2, c = a ? { before: s.page } : { after: s.page }; - if (o.size > 0 && O_e(r, o, c).every((u, d) => u === r[d])) + if (o.size > 0 && O_e(r, o, c).every((u, f) => u === r[f])) return null; const l = n.gap / 2; return { @@ -81301,13 +81349,13 @@ function wF(e) { height: t.transform.viewHeight })); } -const UI = (e) => "before" in e ? { before: Lt(e.before) } : { after: Lt(e.after) }; +const UI = (e) => "before" in e ? { before: Ft(e.before) } : { after: Ft(e.after) }; function __e() { - const e = Tt(), t = xi(), n = y_(), r = y_(m0), o = um((W) => W.currentPageIndex), s = sle(), i = bde(), a = wde((W) => W.selected), c = jr(), l = go("page:insert-file"), u = go("page:insert-blank"), d = u.visible && u.enabled, f = J5e(), h = Re(null), [g, p] = De(null), [m, v] = De(null), [S, C] = De(!1), [k, N] = De(null), w = Re(null); + const e = _t(), t = xi(), n = y_(), r = y_(m0), o = dm((W) => W.currentPageIndex), s = sle(), i = bde(), a = wde((W) => W.selected), c = jr(), l = mo("page:insert-file"), u = mo("page:insert-blank"), f = u.visible && u.enabled, d = J5e(), h = Re(null), [g, p] = je(null), [m, v] = je(null), [S, C] = je(!1), [k, N] = je(null), w = Re(null); w.current = k; - const [y, x] = De(null), A = Re(null), b = Re(!1), E = s.map((W) => W.ref.objectNumber), I = (W) => W === null ? -1 : E.indexOf(W), O = new Set(a.map((W) => W.objectNumber)), T = I(g) >= 0 ? I(g) : o; + const [y, x] = je(null), A = Re(null), b = Re(!1), E = s.map((W) => W.ref.objectNumber), I = (W) => W === null ? -1 : E.indexOf(W), O = new Set(a.map((W) => W.objectNumber)), T = I(g) >= 0 ? I(g) : o; Ke(() => r.reveal(o), [o, r]); - const R = um((W) => W.pageCount, m0), M = a[a.length - 1]?.objectNumber ?? null, F = M === null ? -1 : E.indexOf(M); + const R = dm((W) => W.pageCount, m0), M = a[a.length - 1]?.objectNumber ?? null, F = M === null ? -1 : E.indexOf(M); Ke(() => { F >= 0 && F < R && r.reveal(F); }, [ @@ -81315,7 +81363,7 @@ function __e() { R, r ]); - const B = () => { + const _ = () => { const { gap: W, pageFrame: Se } = r.getSettings(); return { gap: typeof W == "object" && W !== null && "px" in W ? W.px : B_e, @@ -81329,31 +81377,31 @@ function __e() { } : null; }, D = (W, Se, Ae) => { const ce = $(W, Se); - return ce ? P_e(wF(r), ce, B(), E, Ae) : null; - }, _ = (W) => { - n.goToPage(W), f(); + return ce ? P_e(wF(r), ce, _(), E, Ae) : null; + }, B = (W) => { + n.goToPage(W), d(); }, L = (W) => i.select(W), j = (W, Se, Ae) => { if (b.current) { b.current = !1; return; } const ce = W.objectNumber; - if (p(ce), d && (Ae.metaKey || Ae.ctrlKey)) { + if (p(ce), f && (Ae.metaKey || Ae.ctrlKey)) { L(O.has(ce) ? a.filter((Ne) => Ne.objectNumber !== ce) : [...a, W]), v(ce); return; } - if (d && Ae.shiftKey && I(m) >= 0) { + if (f && Ae.shiftKey && I(m) >= 0) { const Ne = I(m), [K, U] = Ne < Se ? [Ne, Se] : [Se, Ne]; - L(s.slice(K, U + 1).map((Z) => Z.ref)); + L(s.slice(K, U + 1).map((X) => X.ref)); return; } - v(ce), d && L([W]), _(Se); + v(ce), f && L([W]), B(Se); }, H = (W) => { p(W.objectNumber), O.has(W.objectNumber) || L([W]); - }, Y = (W) => h.current?.querySelector(`[data-epdf-page-menu="${W}"] button`)?.click(), ue = () => { + }, Y = (W) => h.current?.querySelector(`[data-epdf-page-menu="${W}"] button`)?.click(), le = () => { A.current !== null && clearTimeout(A.current), A.current = null; - }, le = (W, Se) => { - if (!d || Se.button !== 0 || Se.target.closest("[data-epdf-page-menu]")) return; + }, ie = (W, Se) => { + if (!f || Se.button !== 0 || Se.target.closest("[data-epdf-page-menu]")) return; const Ae = W.objectNumber, ce = O.has(Ae) ? O : /* @__PURE__ */ new Set([Ae]); N({ pointerId: Se.pointerId, @@ -81371,16 +81419,16 @@ function __e() { held: !0 }); }, M_e)); - }, pe = k?.active === !0, ge = k !== null; + }, pe = k?.active === !0, ve = k !== null; Ke(() => { - if (!ge) return; + if (!ve) return; const W = (Ne) => { const K = w.current; if (!K || Ne.pointerId !== K.pointerId) return; if (!K.active) { if (Math.hypot(Ne.clientX - K.startX, Ne.clientY - K.startY) <= T_e) return; if (Ne.pointerType !== "mouse" && !K.held) { - ue(), N(null); + le(), N(null); return; } } @@ -81391,18 +81439,18 @@ function __e() { drop: D(Ne.clientX, Ne.clientY, K.moving) }); }, Se = (Ne, K) => { - ue(); + le(); const U = w.current; if (!U || Ne.pointerId !== U.pointerId) return; if (N(null), !U.active) { - U.held && K && (b.current = !0, H(Lt(U.page)), Y(U.page)); + U.held && K && (b.current = !0, H(Ft(U.page)), Y(U.page)); return; } if (b.current = !0, setTimeout(() => { b.current = !1; }, 0), !K || !U.drop) return; - const Z = s.filter((ne) => U.moving.has(ne.ref.objectNumber)); - i.reorder(Z.map((ne) => ne.ref), UI(U.drop.position)).catch(() => { + const X = s.filter((re) => U.moving.has(re.ref.objectNumber)); + i.reorder(X.map((re) => re.ref), UI(U.drop.position)).catch(() => { }); }, Ae = (Ne) => Se(Ne, !0), ce = (Ne) => Se(Ne, !1); return window.addEventListener("pointermove", W), window.addEventListener("pointerup", Ae), window.addEventListener("pointercancel", ce), () => { @@ -81412,16 +81460,16 @@ function __e() { if (!pe) return; const W = (Se) => Se.preventDefault(); return document.addEventListener("touchmove", W, { passive: !1 }), () => document.removeEventListener("touchmove", W); - }, [pe]), Ke(() => ue, []); - const Me = (W) => d && l.visible && l.enabled && gG(W.dataTransfer), Be = (W) => { - Me(W) && (W.preventDefault(), W.stopPropagation(), W.dataTransfer.dropEffect = "copy", x(D(W.clientX, W.clientY, /* @__PURE__ */ new Set()))); - }, te = (W) => { - if (!Me(W)) return; + }, [pe]), Ke(() => le, []); + const _e = (W) => f && l.visible && l.enabled && gG(W.dataTransfer), Be = (W) => { + _e(W) && (W.preventDefault(), W.stopPropagation(), W.dataTransfer.dropEffect = "copy", x(D(W.clientX, W.clientY, /* @__PURE__ */ new Set()))); + }, ee = (W) => { + if (!_e(W)) return; W.stopPropagation(); const Se = W.relatedTarget; (!Se || !h.current?.contains(Se)) && x(null); }, he = (W) => { - if (!Me(W)) return; + if (!_e(W)) return; W.preventDefault(), W.stopPropagation(); const Se = D(W.clientX, W.clientY, /* @__PURE__ */ new Set()); x(null); @@ -81436,7 +81484,7 @@ function __e() { }, Te = (W, Se) => { const Ae = s[W]; if (Ae) { - if (p(Ae.ref.objectNumber), r.reveal(W), !d) { + if (p(Ae.ref.objectNumber), r.reveal(W), !f) { n.goToPage(W); return; } @@ -81447,7 +81495,7 @@ function __e() { } v(Ae.ref.objectNumber), L([Ae.ref]), n.goToPage(W); } - }, ze = (W) => { + }, We = (W) => { if (W.target !== W.currentTarget || s.length === 0) return; C(!0); const Se = FJ(wF(r)), Ae = { @@ -81456,7 +81504,7 @@ function __e() { ArrowUp: -Se, ArrowDown: Se }[W.key], ce = W.metaKey || W.ctrlKey; - if (Ae !== void 0 && W.altKey && d) { + if (Ae !== void 0 && W.altKey && f) { W.preventDefault(); const Ne = R_e(E, O, Ae < 0 ? -1 : 1), K = s.filter((U) => O.has(U.ref.objectNumber)); Ne && K.length > 0 && i.reorder(K.map((U) => U.ref), UI(Ne)).catch(() => { @@ -81473,10 +81521,10 @@ function __e() { W.preventDefault(), Te(W.key === "Home" ? 0 : s.length - 1, W.shiftKey); return; case "Enter": - W.preventDefault(), _(T); + W.preventDefault(), B(T); return; case " ": { - if (!d) return; + if (!f) return; W.preventDefault(); const Ne = s[T]; if (!Ne) return; @@ -81486,51 +81534,51 @@ function __e() { } case "Delete": case "Backspace": - if (!d) return; + if (!f) return; W.preventDefault(), c.execute("page:delete").catch(() => { }); return; case "a": case "A": - if (!ce || !d) return; + if (!ce || !f) return; W.preventDefault(), c.execute("page:select-all").catch(() => { }); return; } - }, ae = s[T]?.ref ?? null, me = pe ? k.drop : y; + }, ae = s[T]?.ref ?? null, ge = pe ? k.drop : y; return /* @__PURE__ */ P("div", { className: "flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ P("div", { ref: h, role: "listbox", "aria-label": e("panels.thumbnails"), - "aria-multiselectable": d || void 0, + "aria-multiselectable": f || void 0, tabIndex: 0, "aria-activedescendant": S && ae ? `${t}-${ae.objectNumber}` : void 0, - onKeyDown: ze, + onKeyDown: We, onFocus: (W) => W.target === W.currentTarget && C(W.currentTarget.matches(":focus-visible")), onBlur: (W) => W.target === W.currentTarget && C(!1), onDragEnter: Be, onDragOver: Be, - onDragLeave: te, + onDragLeave: ee, onDrop: he, className: "focus-visible:ring-accent relative flex min-h-0 flex-1 flex-col outline-none focus-visible:ring-2 focus-visible:ring-inset", children: /* @__PURE__ */ P(O9, { token: m0, className: "flex-1", style: { position: "relative" }, - overlay: /* @__PURE__ */ P(nt, { children: [me && /* @__PURE__ */ P("div", { + overlay: /* @__PURE__ */ P(nt, { children: [ge && /* @__PURE__ */ P("div", { "aria-hidden": !0, className: "bg-accent pointer-events-none absolute rounded-full", style: { - left: me.line.x, - top: me.line.y, - width: me.line.width, - height: me.line.height + left: ge.line.x, + top: ge.line.y, + width: ge.line.width, + height: ge.line.height } }), /* @__PURE__ */ P(IN, { axis: "y" })] }), pageChrome: (W) => { - const Se = W.ref.objectNumber, Ae = d && O.has(Se), ce = W.pageIndex === o, Ne = S && ae?.objectNumber === Se, K = pe && k.moving.has(Se); + const Se = W.ref.objectNumber, Ae = f && O.has(Se), ce = W.pageIndex === o, Ne = S && ae?.objectNumber === Se, K = pe && k.moving.has(Se); return /* @__PURE__ */ P("div", { className: "group", style: { @@ -81542,13 +81590,13 @@ function __e() { label: e("thumbnails.page", { params: { page: W.pageIndex + 1 } }), id: `${t}-${Se}`, role: "option", - "aria-selected": d ? Ae : ce, + "aria-selected": f ? Ae : ce, "aria-current": ce ? "page" : void 0, tabIndex: -1, onClick: (U) => j(W.ref, W.pageIndex, U), - onPointerDown: (U) => le(W.ref, U), + onPointerDown: (U) => ie(W.ref, U), onContextMenu: (U) => { - d && (U.preventDefault(), H(W.ref), Y(Se)); + f && (U.preventDefault(), H(W.ref), Y(Se)); }, className: `box-border cursor-pointer touch-manipulation rounded ${Ae || ce ? "border-accent border-2" : "border-border-subtle border"} ${ce ? "ring-accent-light ring-2" : ""} ${Ae ? "bg-accent/10" : ""} ${Ne ? "outline-accent outline outline-2 outline-offset-2" : ""} ${K ? "bg-surface/60" : ""}`, style: { @@ -81559,7 +81607,7 @@ function __e() { bottom: W.frame.bottom } }), - d && /* @__PURE__ */ P("span", { + f && /* @__PURE__ */ P("span", { "data-epdf-page-menu": Se, onClick: (U) => U.stopPropagation(), onPointerDownCapture: () => H(W.ref), @@ -81595,14 +81643,14 @@ function __e() { }); } function L_e() { - const e = go("menu:page"); + const e = mo("menu:page"); return e.visible ? /* @__PURE__ */ P(lE, { cmd: e, variant: "icon", run: () => void e.run() }) : null; } -const D_e = In(() => import("./search-panel-BsY-2v13-ZjlYoC7t.js").then((e) => e.SearchPanel)), j_e = In(() => import("./search-panel-BsY-2v13-ZjlYoC7t.js").then((e) => e.FindBar)), F_e = In(() => import("./comments-panel-BJ1GRhZ0-BOiDUolf.js").then((e) => e.CommentsPanel)), V_e = In(() => import("./measurement-6M_KEsFK-ARa1M4UB.js").then((e) => e.MeasurementSection)), $_e = In(() => import("./annotation-style-BZv7nj7j-BDYrzgLn.js").then((e) => e.AnnotationStylePanel)), U_e = In(() => import("./stamps-panel-BfRJ9uBl-Cs7BhHXt.js").then((e) => e.StampsPanel)), K_e = In(() => import("./signatures-panel-smWbAS42-BS1McmH7.js").then((e) => e.SignaturesPanel)), H_e = In(() => import("./redaction-panel-Djm12Ydh-D9gDjih9.js").then((e) => e.RedactionPanel)), z_e = In(() => import("./outline-panel-BfusJ14a-CrwTtYxN.js").then((e) => e.OutlinePanel)), W_e = In(() => import("./attachments-panel-CBvOCDpU-DcNUtnoD.js").then((e) => e.AttachmentsPanel)), q_e = In(() => import("./form-design-panel-B4qGH4r--T0yv-8g7.js").then((e) => e.FormDesignPanel)), VJ = /* @__PURE__ */ new Map([ +const D_e = In(() => import("./search-panel-BsY-2v13-BzjGBsPo.js").then((e) => e.SearchPanel)), j_e = In(() => import("./search-panel-BsY-2v13-BzjGBsPo.js").then((e) => e.FindBar)), F_e = In(() => import("./comments-panel-BJ1GRhZ0-MnxRXHtZ.js").then((e) => e.CommentsPanel)), V_e = In(() => import("./measurement-6M_KEsFK-DhJ1Dnhv.js").then((e) => e.MeasurementSection)), $_e = In(() => import("./annotation-style-BZv7nj7j-z_uZITv9.js").then((e) => e.AnnotationStylePanel)), U_e = In(() => import("./stamps-panel-BfRJ9uBl-CcPfGL64.js").then((e) => e.StampsPanel)), K_e = In(() => import("./signatures-panel-smWbAS42-C8ccrvhV.js").then((e) => e.SignaturesPanel)), H_e = In(() => import("./redaction-panel-Djm12Ydh-BY55F6C2.js").then((e) => e.RedactionPanel)), z_e = In(() => import("./outline-panel-BfusJ14a-awUDJM2i.js").then((e) => e.OutlinePanel)), W_e = In(() => import("./attachments-panel-CBvOCDpU-B7OO6xRT.js").then((e) => e.AttachmentsPanel)), q_e = In(() => import("./form-design-panel-B4qGH4r--CLCbLmeD.js").then((e) => e.FormDesignPanel)), VJ = /* @__PURE__ */ new Map([ ["thumbnails", { draw: () => /* @__PURE__ */ P(__e, {}), list: !0 @@ -81640,29 +81688,29 @@ function Y_e(e, t) { }, vF.set(e, n)), n[t]; } function kF({ side: e }) { - const { data: t, env: n } = Ti(), r = jr(), o = Rt(dt), s = ar(), i = ft(() => dBe(t, e), [t, e]), { shown: a, off: c, open: l, bars: u } = en((f) => { - const h = (g) => r.resolveCommand(eu(g), s ?? void 0)?.visible; + const { data: t, env: n } = Ti(), r = jr(), o = Bt(dt), s = cr(), i = ft(() => dBe(t, e), [t, e]), { shown: a, off: c, open: l, bars: u } = nn((d) => { + const h = (g) => r.resolveCommand(tu(g), s ?? void 0)?.visible; return { shown: i.filter((g) => h(g) === !0), off: i.filter((g) => h(g) === !1), open: o ? i.filter((g) => o.isOpen(g)) : G_e, - bars: i.filter((g) => VJ.get(g)?.bar?.when(f, s) === !0) + bars: i.filter((g) => VJ.get(g)?.bar?.when(d, s) === !0) }; }, J_e); - uRe((f) => f.onSurfaceOpened, (f) => { - if (!(!o || !i.includes(f.id))) - for (const h of i) h !== f.id && o.isOpen(h) && o.close(h); + uRe((d) => d.onSurfaceOpened, (d) => { + if (!(!o || !i.includes(d.id))) + for (const h of i) h !== d.id && o.isOpen(h) && o.close(h); }); - const d = l.find((f) => a.includes(f)) ?? null; + const f = l.find((d) => a.includes(d)) ?? null; return Ze(() => { if (!o) return; - for (const p of l) p !== d && (d !== null || c.includes(p)) && o.close(p); + for (const p of l) p !== f && (f !== null || c.includes(p)) && o.close(p); if (n === MT) return; - const f = t.panels ?? {}, h = Y_e(o, e), g = fBe(f, { + const d = t.panels ?? {}, h = Y_e(o, e), g = fBe(d, { ids: i, shown: a, - current: d, - docks: (p) => y_e(n.size, f[p]?.present) && !u.includes(p) + current: f, + docks: (p) => y_e(n.size, d[p]?.present) && !u.includes(p) }, h); for (const p of g.started) h.add(p); g.open !== null && o.open(g.open); @@ -81676,15 +81724,15 @@ function kF({ side: e }) { l, c, u, - d - ]), d === null ? null : /* @__PURE__ */ P(Q_e, { - id: d, + f + ]), f === null ? null : /* @__PURE__ */ P(Q_e, { + id: f, side: e, siblings: a - }, d); + }, f); } function Q_e({ id: e, side: t, siblings: n }) { - const r = Ti().data.panels?.[e], o = jr(), s = Rt(dt), i = ar(), a = VJ.get(e), c = en((d) => a?.bar?.when(d, i) === !0), l = en(() => o.resolveCommand(eu(e), i ?? void 0)?.label ?? null); + const r = Ti().data.panels?.[e], o = jr(), s = Bt(dt), i = cr(), a = VJ.get(e), c = nn((f) => a?.bar?.when(f, i) === !0), l = nn(() => o.resolveCommand(tu(e), i ?? void 0)?.label ?? null); if (!r) return null; const u = l ?? r.title ?? e; return c ? /* @__PURE__ */ P(C_e, { @@ -81752,7 +81800,7 @@ function Z_e(e, t) { ]); } function $J({ icon: e, label: t }) { - return e ? /* @__PURE__ */ P(Nt, { + return e ? /* @__PURE__ */ P(Rt, { name: e, size: 20 }) : /* @__PURE__ */ P("span", { @@ -81761,7 +81809,7 @@ function $J({ icon: e, label: t }) { }); } function eLe({ host: e, commandId: t, active: n }) { - const r = go(t); + const r = mo(t); return Z_e(e, r), r.visible ? /* @__PURE__ */ P(lE, { cmd: n ? { ...r, @@ -81772,7 +81820,7 @@ function eLe({ host: e, commandId: t, active: n }) { }) : null; } function tLe({ icon: e, label: t, active: n }) { - const r = sr(t ? { + const r = ir(t ? { label: t, labelShown: !e } : null); @@ -81781,8 +81829,8 @@ function tLe({ icon: e, label: t, active: n }) { type: "button", "aria-label": t ?? void 0, "aria-pressed": n || void 0, - part: Jr(n), - className: Ho(n), + part: Yr(n), + className: zo(n), children: /* @__PURE__ */ P($J, { icon: e, label: t @@ -81812,7 +81860,7 @@ const rLe = (e) => ({ categories: [] }); function oLe({ item: e, commandId: t, onPicked: n }) { - const r = go(t); + const r = mo(t); if (!r.visible) return null; const o = { ...r, @@ -81829,7 +81877,7 @@ function oLe({ item: e, commandId: t, onPicked: n }) { }); } function sLe({ menu: e }) { - const [t, n] = De(!1), r = () => n(!1), o = sr(e.label ? { + const [t, n] = je(!1), r = () => n(!1), o = ir(e.label ? { label: e.label, labelShown: !e.icon } : null); @@ -81842,8 +81890,8 @@ function sLe({ menu: e }) { "aria-haspopup": "menu", "aria-expanded": t, "aria-label": e.label ?? void 0, - part: Jr(t), - className: Ho(t), + part: Yr(t), + className: zo(t), onClick: () => n((s) => !s), children: /* @__PURE__ */ P($J, { icon: e.icon, @@ -81872,7 +81920,7 @@ function sLe({ menu: e }) { }); } function iLe({ icon: e }) { - return e.icon ? /* @__PURE__ */ P(Nt, { + return e.icon ? /* @__PURE__ */ P(Rt, { name: e.icon, size: e.size ?? 20, title: e.label ?? void 0, @@ -81894,7 +81942,7 @@ function lLe({ components: e }) { } const uLe = 2500; function dLe() { - const e = Tt(), [t, n] = De(null), r = fi((o) => n((s) => ({ + const e = _t(), [t, n] = je(null), r = fi((o) => n((s) => ({ message: o, count: (s?.count ?? 0) + 1 })), []); @@ -81925,7 +81973,7 @@ function fLe() { } const hLe = 12, pLe = 38; function gLe() { - const e = Tt(), { touch: t } = oc(), n = BT("selection"), r = VT(n); + const e = _t(), { touch: t } = oc(), n = BT("selection"), r = VT(n); return !n || !r ? null : /* @__PURE__ */ P(Ufe, { placement: "bottom", gap: t ? pLe : hLe, @@ -81938,7 +81986,7 @@ function gLe() { } const mLe = 12; function yLe() { - const e = Tt(), t = BT("snapshot"), n = VT(t); + const e = _t(), t = BT("snapshot"), n = VT(t); return !t || !n ? null : /* @__PURE__ */ P(lde, { placement: "bottom", gap: mLe, @@ -82006,7 +82054,7 @@ function kLe() { return e.isOpen ? /* @__PURE__ */ P(ALe, { onClose: e.close }) : null; } function ALe({ onClose: e }) { - const t = Tt(), n = xi(), r = jr(), o = ar() ?? void 0, s = en(() => wLe(r, o), vLe), i = pv(); + const t = _t(), n = xi(), r = jr(), o = cr() ?? void 0, s = nn(() => wLe(r, o), vLe), i = pv(); return /* @__PURE__ */ P(GT, { labelledBy: n, onClose: e, @@ -82023,7 +82071,7 @@ function ALe({ onClose: e }) { label: t("panel.close"), onClick: e, className: "text-fg-muted hover:bg-hover hover:text-fg grid h-7 w-7 place-items-center rounded-md", - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "x", size: 16 }) @@ -82080,7 +82128,7 @@ function ELe() { }, [e, t]), null; } function CLe({ name: e, onCancel: t, onClose: n }) { - const r = Tt(), o = xi(); + const r = _t(), o = xi(); return /* @__PURE__ */ P(GT, { labelledBy: o, onClose: t, @@ -82113,7 +82161,7 @@ function CLe({ name: e, onCancel: t, onClose: n }) { }); } function ILe({ visibility: e }) { - const { setActive: t, close: n } = pR(), { documents: r, activeId: o } = c2(), s = Tt(), [i, a] = De(null); + const { setActive: t, close: n } = pR(), { documents: r, activeId: o } = c2(), s = _t(), [i, a] = je(null); if (!(e === "always" || e === "multiple" && r.length > 1)) return null; const c = (l, u) => { l.hasUnsavedChanges ? a({ @@ -82126,15 +82174,15 @@ function ILe({ visibility: e }) { children: [/* @__PURE__ */ P("div", { className: "flex flex-1 items-end overflow-x-auto pl-4", children: r.map((l) => { - const u = o === l.id, d = l.name ?? s("tabs.untitled", { params: { id: l.id.slice(0, 8) } }); + const u = o === l.id, f = l.name ?? s("tabs.untitled", { params: { id: l.id.slice(0, 8) } }); return /* @__PURE__ */ P("div", { onClick: () => t(l.id), role: "tab", part: u ? "tab tab-active" : "tab", tabIndex: 0, "aria-selected": u, - onKeyDown: (f) => { - (f.key === "Enter" || f.key === " ") && (f.preventDefault(), t(l.id)); + onKeyDown: (d) => { + (d.key === "Enter" || d.key === " ") && (d.preventDefault(), t(l.id)); }, className: `group relative flex min-w-[120px] max-w-[240px] cursor-pointer items-center gap-2 rounded-t-lg px-4 py-2 text-sm font-medium transition-all ${u ? "bg-surface text-fg z-10" : "bg-surface-alt text-fg-secondary hover:bg-hover hover:text-fg"}`, children: [ @@ -82142,24 +82190,24 @@ function ILe({ visibility: e }) { className: "border-border-subtle border-t-accent h-3 w-3 flex-shrink-0 animate-spin rounded-full border", "aria-label": s("tabs.loading") }), - l.status === "locked" && /* @__PURE__ */ P(Nt, { + l.status === "locked" && /* @__PURE__ */ P(Rt, { name: "lock", size: 13, className: "text-fg-muted flex-shrink-0" }), - l.status === "error" && l.openRequest && /* @__PURE__ */ P(Nt, { + l.status === "error" && l.openRequest && /* @__PURE__ */ P(Rt, { name: "lock", size: 13, className: "text-fg-muted flex-shrink-0" }), l.status === "error" && !l.openRequest && /* @__PURE__ */ P(sE, { content: { label: s(xP(l.error)) }, - children: (f) => /* @__PURE__ */ P("span", { - ...f, + children: (d) => /* @__PURE__ */ P("span", { + ...d, className: "flex flex-shrink-0", role: "img", "aria-label": s(xP(l.error)), - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "alertTriangle", size: 13, className: "text-red-500" @@ -82168,16 +82216,16 @@ function ILe({ visibility: e }) { }), /* @__PURE__ */ P("span", { className: "min-w-0 flex-1 truncate", - children: d + children: f }), u && r.length > 1 && /* @__PURE__ */ P("button", { type: "button", - onClick: (f) => { - f.stopPropagation(), c(l, d); + onClick: (d) => { + d.stopPropagation(), c(l, f); }, - "aria-label": s("tabs.close", { params: { name: d } }), + "aria-label": s("tabs.close", { params: { name: f } }), className: "hover:bg-hover flex-shrink-0 cursor-pointer rounded-full p-1 opacity-100 transition-all", - children: /* @__PURE__ */ P(Nt, { + children: /* @__PURE__ */ P(Rt, { name: "x", size: 14 }) @@ -82214,7 +82262,7 @@ function OLe(e, t, n) { ["stroke-dasharray", a.strokeDasharray], ["stroke-opacity", a.strokeOpacity], ["fill-opacity", a.fillOpacity] - ].filter(([, d]) => d !== void 0).map(([d, f]) => `${d}="${f}"`).join(" "); + ].filter(([, f]) => f !== void 0).map(([f, d]) => `${f}="${d}"`).join(" "); s.push(``); } return o.join("") + s.join(""); @@ -82234,7 +82282,7 @@ const TLe = { copy: "plus" }; function MLe() { - const e = kfe((i) => i.activeToolId) ?? "pointer", t = cve(e), n = CG(), r = ive().tools.get(e)?.ghost ? void 0 : Ng[e], o = (i) => t[i] ?? void 0, s = r?.accent ? { + const e = kfe((i) => i.activeToolId) ?? "pointer", t = cve(e), n = CG(), r = ive().tools.get(e)?.ghost ? void 0 : Og[e], o = (i) => t[i] ?? void 0, s = r?.accent ? { primary: o(r.accent.primary), secondary: r.accent.secondary ? o(r.accent.secondary) : void 0 } : void 0; @@ -82246,10 +82294,10 @@ function MLe() { }])) } : null), null; } -const BLe = () => Pi("redact-confirm").isOpen, _Le = () => $1e((e) => e.calibrationRequest !== null), LLe = () => Pi("signature-sign").isOpen, DLe = () => Pi("signature-maker").isOpen, jLe = () => Pi("signature-inspector").isOpen, FLe = () => Pi("print").isOpen, VLe = In(() => import("./redact-confirm-C0AI8Tbt-DoYTi75M.js").then((e) => e.RedactConfirmModal), { shownWhile: BLe }), $Le = In(() => import("./measurement-6M_KEsFK-ARa1M4UB.js").then((e) => e.CalibrationDialog), { shownWhile: _Le }), ULe = In(() => import("./sign-dialog-BZ-u3DaO-DUNRfJDM.js").then((e) => e.SignDialog), { shownWhile: LLe }), KLe = In(() => import("./signature-maker-Lp7uuutB-fK8F7XzG.js").then((e) => e.SignatureMakerModal), { shownWhile: DLe }), HLe = In(() => import("./signature-inspector-DgkYwQHv-B4iHMa4u.js").then((e) => e.SignatureInspector), { shownWhile: jLe }), zLe = In(() => import("./print-dialog-DPur4IlU-0p7zQEeK.js").then((e) => e.PrintDialog), { shownWhile: FLe }), WLe = () => Pi(mG).isOpen, CF = In(() => import("./grant-prompt-Co4bzHaR-ibAjp4kO.js").then((e) => e.GrantPrompt), { prefetch: !1 }), qLe = () => IS((e) => e.identityRequest !== void 0), GLe = In(() => import("./grant-prompt-Co4bzHaR-ibAjp4kO.js").then((e) => e.VisitorIdentityDialog), { +const BLe = () => Pi("redact-confirm").isOpen, _Le = () => $1e((e) => e.calibrationRequest !== null), LLe = () => Pi("signature-sign").isOpen, DLe = () => Pi("signature-maker").isOpen, jLe = () => Pi("signature-inspector").isOpen, FLe = () => Pi("print").isOpen, VLe = In(() => import("./redact-confirm-C0AI8Tbt-BhOcPITJ.js").then((e) => e.RedactConfirmModal), { shownWhile: BLe }), $Le = In(() => import("./measurement-6M_KEsFK-DhJ1Dnhv.js").then((e) => e.CalibrationDialog), { shownWhile: _Le }), ULe = In(() => import("./sign-dialog-BZ-u3DaO-A_aSCrL7.js").then((e) => e.SignDialog), { shownWhile: LLe }), KLe = In(() => import("./signature-maker-Lp7uuutB-qzUGKTPq.js").then((e) => e.SignatureMakerModal), { shownWhile: DLe }), HLe = In(() => import("./signature-inspector-DgkYwQHv-DecD2jME.js").then((e) => e.SignatureInspector), { shownWhile: jLe }), zLe = In(() => import("./print-dialog-DPur4IlU-D6FsF7fz.js").then((e) => e.PrintDialog), { shownWhile: FLe }), WLe = () => Pi(mG).isOpen, CF = In(() => import("./grant-prompt-Co4bzHaR-EijIs4Sr.js").then((e) => e.GrantPrompt), { prefetch: !1 }), qLe = () => IS((e) => e.identityRequest !== void 0), GLe = In(() => import("./grant-prompt-Co4bzHaR-EijIs4Sr.js").then((e) => e.VisitorIdentityDialog), { shownWhile: qLe, prefetch: !1 -}), JLe = In(() => import("./outline-properties-D2EBON1r-Lwj1vkS_.js").then((e) => e.OutlinePropertiesDialog), { shownWhile: WLe }); +}), JLe = In(() => import("./outline-properties-D2EBON1r-CMs5r_jq.js").then((e) => e.OutlinePropertiesDialog), { shownWhile: WLe }); function YLe() { const e = KPe(Ti().data); return e === "never" ? null : /* @__PURE__ */ P("slot", { @@ -82258,7 +82306,7 @@ function YLe() { }); } function QLe() { - const e = Tt(); + const e = _t(); return /* @__PURE__ */ P("div", { className: "grid h-full w-full place-items-center", children: /* @__PURE__ */ P("div", { @@ -82271,7 +82319,7 @@ function QLe() { }); } function XLe({ children: e }) { - const t = ar(), n = IS((o) => o.status), r = IS((o) => o.openRequest !== void 0); + const t = cr(), n = IS((o) => o.status), r = IS((o) => o.openRequest !== void 0); return t === null ? /* @__PURE__ */ P("div", { className: "min-w-0 flex-1 overflow-auto", children: /* @__PURE__ */ P("slot", { name: "empty" }) @@ -82405,17 +82453,17 @@ function KJ(e, t, n) { function nDe({ registered: e, settings: t, yours: n, locale: r, features: o, disable: s, readOnly: i, appState: a }) { const c = Qa(), l = Re(e); return Ze(() => { - const { disabled: u, byHand: d } = KJ({ + const { disabled: u, byHand: f } = KJ({ features: o, disable: s, readOnly: i - }, n, t), f = l.current; + }, n, t), d = l.current; l.current = { locale: r, disabled: u, - byHand: d, + byHand: f, appState: a - }, Object.is(f.appState, a) || c.capability(bo).updateSettings({ appState: a }), Gj(f.byHand.editable, d.editable) || c.settingsOf(vt).updateSettings({ editable: d.editable }), Gj(f.byHand.fillable, d.fillable) || c.settingsOf(Ss).updateSettings({ fillable: d.fillable }), (!NF(f.disabled.disabledCategories, u.disabledCategories) || !NF(f.disabled.disabledCommands, u.disabledCommands)) && c.capability(bo).updateSettings(u), f.locale !== r && c.capability(vo).setLocale(r).catch(() => { + }, Object.is(d.appState, a) || c.capability(wo).updateSettings({ appState: a }), Gj(d.byHand.editable, f.editable) || c.settingsOf(vt).updateSettings({ editable: f.editable }), Gj(d.byHand.fillable, f.fillable) || c.settingsOf(Ss).updateSettings({ fillable: f.fillable }), (!NF(d.disabled.disabledCategories, u.disabledCategories) || !NF(d.disabled.disabledCommands, u.disabledCommands)) && c.capability(wo).updateSettings(u), d.locale !== r && c.capability(ko).setLocale(r).catch(() => { }); }), null; } @@ -82424,21 +82472,21 @@ function rDe() { className: "bg-app text-fg-muted grid h-full place-items-center", children: /* @__PURE__ */ P("div", { className: "animate-pulse text-sm", - children: Tt()("demo.starting") + children: _t()("demo.starting") }) }); } -function OF({ engine: e, initialDocuments: t, fetch: n, fallback: r, commands: o, appState: s, icons: i, strings: a, locale: c = "auto", features: l, disable: u, readOnly: d, scope: f, identity: h, notAllowed: g, layout: p, size: m, touch: v, plugins: S, fonts: C, warnBeforeLeaving: k, theme: N, themeTarget: w, components: y, onReady: x, onDocumentChange: A, onPanelResize: b }) { - const [E] = De(rJ), [I] = De(() => { - const M = eBe(S), { locales: F, loaders: B, codes: $ } = k5e(a), D = M.settings.i18n?.fallbackLocale, _ = g5e(D, $), L = _ === null ? [`the viewer has no language "${D}" to fall back to, so it falls back to English: give its words in \`strings\``] : [], j = { ...QT }; - for (const { name: pe, plugin: ge } of M.own) ge.token && (j[pe] = ge.token); - const H = JMe(j), Y = new Set(Pj.map((pe) => pe.id)), ue = ZRe([...Pj, ...zRe(M.settings.annotation?.tools ?? [], (pe) => Y.has(pe))], o ?? [], { +function OF({ engine: e, initialDocuments: t, fetch: n, fallback: r, commands: o, appState: s, icons: i, strings: a, locale: c = "auto", features: l, disable: u, readOnly: f, scope: d, identity: h, notAllowed: g, layout: p, size: m, touch: v, plugins: S, fonts: C, warnBeforeLeaving: k, theme: N, themeTarget: w, components: y, onReady: x, onDocumentChange: A, onPanelResize: b }) { + const [E] = je(rJ), [I] = je(() => { + const M = eBe(S), { locales: F, loaders: _, codes: $ } = k5e(a), D = M.settings.i18n?.fallbackLocale, B = g5e(D, $), L = B === null ? [`the viewer has no language "${D}" to fall back to, so it falls back to English: give its words in \`strings\``] : [], j = { ...QT }; + for (const { name: pe, plugin: ve } of M.own) ve.token && (j[pe] = ve.token); + const H = JMe(j), Y = new Set(Pj.map((pe) => pe.id)), le = ZRe([...Pj, ...zRe(M.settings.annotation?.tools ?? [], (pe) => Y.has(pe))], o ?? [], { plugins: j, viewer: H.current - }, { isMac: pv() }), le = (o ?? []).flatMap((pe) => pe.categories ?? []); + }, { isMac: pv() }), ie = (o ?? []).flatMap((pe) => pe.categories ?? []); return { slot: H, - viewerCommands: ue, + viewerCommands: le, layout: p, size: m, touch: v, @@ -82450,22 +82498,22 @@ function OF({ engine: e, initialDocuments: t, fetch: n, fallback: r, commands: o onPanelResize: b, i18n: { locales: F, - loaders: B, + loaders: _, codes: $, - fallback: _ ?? "en", - initial: _j(c, $, _ ?? "en") + fallback: B ?? "en", + initial: _j(c, $, B ?? "en") }, plugins: { ...M, problems: [...M.problems, ...L] }, tokens: j, - yourCategories: le, + yourCategories: ie, ...KJ({ features: l, disable: u, - readOnly: d - }, le, M.settings), + readOnly: f + }, ie, M.settings), appState: s }; }); @@ -82476,7 +82524,7 @@ function OF({ engine: e, initialDocuments: t, fetch: n, fallback: r, commands: o for (const M of bTe(l, I.yourCategories)) IF.has(M) || (IF.add(M), console.warn(`[embedpdf] features: no feature or part is called "${M}"`)); }, [l, I]); - const { settings: O } = I.plugins, [T] = De(() => [ + const { settings: O } = I.plugins, [T] = je(() => [ g_(lF({ layout: "vertical" }, O.stage)), g_({ layout: "grid", @@ -82586,7 +82634,7 @@ function OF({ engine: e, initialDocuments: t, fetch: n, fallback: r, commands: o plugins: T, initialDocuments: t, fetch: n, - scope: f, + scope: d, identity: h, fallback: r ?? /* @__PURE__ */ P(rDe, {}), onReady: (M) => void I.slot.attach(M), @@ -82605,7 +82653,7 @@ function OF({ engine: e, initialDocuments: t, fetch: n, fallback: r, commands: o locale: _j(c, I.i18n.codes, I.i18n.fallback), features: l, disable: u, - readOnly: d, + readOnly: f, appState: s }), /* @__PURE__ */ P(tDe, { @@ -82668,7 +82716,7 @@ function zJ(e, t, n = Promise.resolve()) { if (!cDe(e)) return { source: async () => { - throw new re("invalid-input", "documents", "this viewer can't open that document"); + throw new te("invalid-input", "documents", "this viewer can't open that document"); } }; const r = lDe(e); @@ -82676,7 +82724,7 @@ function zJ(e, t, n = Promise.resolve()) { name: r, source: async () => { const o = e instanceof Blob ? new Uint8Array(await e.arrayBuffer()) : new Uint8Array(e); - if (!iU(o)) throw new re("invalid-input", "documents", `${r} isn't a PDF`); + if (!iU(o)) throw new te("invalid-input", "documents", `${r} isn't a PDF`); return { kind: "bytes", id: t, bytes: o }; } }; @@ -82733,57 +82781,57 @@ function pDe(e) { const gDe = ":host{display:inline-flex;vertical-align:middle}:host([hidden]){display:none}"; let TF = null; const mDe = () => (TF ?? (TF = [WJ(), fE(gDe)]), TF), qJ = typeof HTMLElement > "u" ? class { -} : HTMLElement, jo = (e, t) => e.getAttribute(t); +} : HTMLElement, Fo = (e, t) => e.getAttribute(t); function bi(e, t, n) { n === null ? e.removeAttribute(t) : e.setAttribute(t, n); } const c3 = (e) => e.hasAttribute("active"), GJ = (e, t) => { e.toggleAttribute("active", !!t); }; -var ea, ml; +var ea, yl; class l3 extends qJ { constructor() { super(...arguments); Vn(this, ea, null); - Vn(this, ml, null); + Vn(this, yl, null); } /** Whether what it draws takes focus: a button does, an icon doesn't. */ get focusable() { return !0; } connectedCallback() { - rt(this, ml) || (gn(this, ml, this.attachShadow({ mode: "open", delegatesFocus: this.focusable })), rt(this, ml).adoptedStyleSheets = mDe()), this.focusable && !this.hasAttribute("tabindex") && (this.tabIndex = 0), gn(this, ea, pDe(this)), this.changed(); + ot(this, yl) || (gn(this, yl, this.attachShadow({ mode: "open", delegatesFocus: this.focusable })), ot(this, yl).adoptedStyleSheets = mDe()), this.focusable && !this.hasAttribute("tabindex") && (this.tabIndex = 0), gn(this, ea, pDe(this)), this.changed(); } disconnectedCallback() { - rt(this, ea) && IP(rt(this, ea)).remove(this), gn(this, ea, null); + ot(this, ea) && IP(ot(this, ea)).remove(this), gn(this, ea, null); } attributeChangedCallback() { this.changed(); } /** Tells the viewer what this element says now. */ changed() { - rt(this, ea) && rt(this, ml) && IP(rt(this, ea)).place(this.describe(rt(this, ml))); + ot(this, ea) && ot(this, yl) && IP(ot(this, ea)).place(this.describe(ot(this, yl))); } } -ea = new WeakMap(), ml = new WeakMap(); +ea = new WeakMap(), yl = new WeakMap(); const u3 = class u3 extends l3 { /** The command it is, by id. */ get command() { - return jo(this, "command"); + return Fo(this, "command"); } set command(t) { bi(this, "command", t); } /** Its icon, by name: the viewer's or one of yours. */ get icon() { - return jo(this, "icon"); + return Fo(this, "icon"); } set icon(t) { bi(this, "icon", t); } /** Its name, for its tooltip and screen readers. */ get label() { - return jo(this, "label"); + return Fo(this, "label"); } set label(t) { bi(this, "label", t); @@ -82812,14 +82860,14 @@ let NP = u3; class yDe extends qJ { /** The command it is, by id. */ get command() { - return jo(this, "command"); + return Fo(this, "command"); } set command(t) { bi(this, "command", t); } /** Its icon, by name: the viewer's or one of yours. */ get icon() { - return jo(this, "icon"); + return Fo(this, "icon"); } set icon(t) { bi(this, "icon", t); @@ -82832,28 +82880,28 @@ class yDe extends qJ { GJ(this, t); } } -var tm; +var nm; const d3 = class d3 extends l3 { constructor() { super(...arguments); - Vn(this, tm, null); + Vn(this, nm, null); } /** Its icon, by name: the viewer's or one of yours. */ get icon() { - return jo(this, "icon"); + return Fo(this, "icon"); } set icon(n) { bi(this, "icon", n); } /** Its name, for its tooltip and screen readers. */ get label() { - return jo(this, "label"); + return Fo(this, "label"); } set label(n) { bi(this, "label", n); } connectedCallback() { - rt(this, tm) ?? gn(this, tm, new MutationObserver(() => this.changed())), rt(this, tm).observe(this, { + ot(this, nm) ?? gn(this, nm, new MutationObserver(() => this.changed())), ot(this, nm).observe(this, { childList: !0, subtree: !0, characterData: !0, @@ -82862,13 +82910,13 @@ const d3 = class d3 extends l3 { }), super.connectedCallback(); } disconnectedCallback() { - rt(this, tm)?.disconnect(), super.disconnectedCallback(); + ot(this, nm)?.disconnect(), super.disconnectedCallback(); } describe(n) { const r = [...this.children].filter((o) => o.localName === "epdf-menu-item").map( (o) => ({ - command: jo(o, "command"), - icon: jo(o, "icon"), + command: Fo(o, "command"), + icon: Fo(o, "icon"), label: o.textContent?.trim() ?? "", active: c3(o), select: () => o.dispatchEvent(new CustomEvent("select", { bubbles: !0 })) @@ -82877,7 +82925,7 @@ const d3 = class d3 extends l3 { return { kind: "menu", host: this, root: n, icon: this.icon, label: this.label, items: r }; } }; -tm = new WeakMap(), d3.observedAttributes = ["icon", "label"]; +nm = new WeakMap(), d3.observedAttributes = ["icon", "label"]; let OP = d3; const f3 = class f3 extends l3 { get focusable() { @@ -82885,14 +82933,14 @@ const f3 = class f3 extends l3 { } /** The icon, by name: the viewer's or one of yours. */ get name() { - return jo(this, "name"); + return Fo(this, "name"); } set name(t) { bi(this, "name", t); } /** Its width and height in px; null for a toolbar button's. */ get size() { - const t = Number.parseFloat(jo(this, "size") ?? ""); + const t = Number.parseFloat(Fo(this, "size") ?? ""); return Number.isFinite(t) && t > 0 ? t : null; } set size(t) { @@ -82900,7 +82948,7 @@ const f3 = class f3 extends l3 { } /** What it shows, for screen readers; without one, they skip it. */ get label() { - return jo(this, "label"); + return Fo(this, "label"); } set label(t) { bi(this, "label", t); @@ -82962,41 +83010,41 @@ const ADe = typeof HTMLElement > "u" ? class { "fetch", "appState" ], xDe = "data-epdf-wrapped"; -var Ld, yl, ts, Io, ta, ov, sv, na, Dd, jd, Nx, Pt, Yi, TP, MP, Ox, Px, Rx, BP, YJ, QJ, _P, tS; +var jd, bl, ts, No, ta, ov, sv, na, Fd, Vd, Nx, Mt, Yi, TP, MP, Ox, Px, Rx, BP, YJ, QJ, _P, tS; const Tx = class Tx extends ADe { constructor() { super(...arguments); - Vn(this, Pt); - Vn(this, Ld, null); - Vn(this, yl, null); + Vn(this, Mt); + Vn(this, jd, null); + Vn(this, bl, null); Vn(this, ts, null); /** The config the running viewer shows, and the props it renders with. */ - Vn(this, Io, null); + Vn(this, No, null); Vn(this, ta, null); /** What the running viewer's door makes of a `src` (`DoorEngine.sourceOf`). */ Vn(this, ov, (n) => n); /** Whether the running viewer's door keeps a document open under a new `src` (`DoorEngine.follows`). */ Vn(this, sv); Vn(this, na, null); - Vn(this, Dd, null); + Vn(this, Fd, null); /** The ids of `src` documents still closing, which a new one must not take. */ - Vn(this, jd, /* @__PURE__ */ new Set()); + Vn(this, Vd, /* @__PURE__ */ new Set()); /** * How the viewer downloads a URL: the shown config's `fetch`, read at each download, so a new * one needs no new viewer. */ - Vn(this, Nx, (n, r) => (rt(this, Io)?.fetch ?? globalThis.fetch)(n, r)); + Vn(this, Nx, (n, r) => (ot(this, No)?.fetch ?? globalThis.fetch)(n, r)); /** The viewer is live: `src` opens, then `epdf:ready` and the config's `onReady` say so. */ Vn(this, Ox, (n) => { - gn(this, na, n), mn(this, Pt, BP).call(this), this.dispatchEvent(new CustomEvent("epdf:ready", { detail: { viewer: n } })), rt(this, Io)?.onReady?.(n); + gn(this, na, n), mn(this, Mt, BP).call(this), this.dispatchEvent(new CustomEvent("epdf:ready", { detail: { viewer: n } })), ot(this, No)?.onReady?.(n); }); /** The active document changed: `epdf:documentchange` and the config's `onDocumentChange`. */ Vn(this, Px, (n) => { - this.dispatchEvent(new CustomEvent("epdf:documentchange", { detail: { documentId: n } })), rt(this, Io)?.onDocumentChange?.(n); + this.dispatchEvent(new CustomEvent("epdf:documentchange", { detail: { documentId: n } })), ot(this, No)?.onDocumentChange?.(n); }); /** The user resized a panel: `epdf:panelresize` and the config's `onPanelResize`. */ Vn(this, Rx, (n) => { - this.dispatchEvent(new CustomEvent("epdf:panelresize", { detail: n })), rt(this, Io)?.onPanelResize?.(n); + this.dispatchEvent(new CustomEvent("epdf:panelresize", { detail: n })), ot(this, No)?.onPanelResize?.(n); }); } /** @@ -83004,38 +83052,38 @@ const Tx = class Tx extends ADe { * live keys change in place and any other change builds a new viewer. */ set config(n) { - gn(this, Ld, n), mn(this, Pt, TP).call(this); + gn(this, jd, n), mn(this, Mt, TP).call(this); } get config() { - return dDe(fDe(this), rt(this, Ld)); + return dDe(fDe(this), ot(this, jd)); } /** * The document: a URL, a `File`, or bytes (or what the door's engine opens). Another one opens * in its place, `null` closes it, and `undefined` goes back to the `src` attribute. */ set src(n) { - mn(this, Pt, Yi).call(this, { src: n }); + mn(this, Mt, Yi).call(this, { src: n }); } get src() { return this.config.src ?? null; } /** `'light'`, `'dark'`, `'system'`, or the theme config. */ set theme(n) { - mn(this, Pt, Yi).call(this, { theme: n }); + mn(this, Mt, Yi).call(this, { theme: n }); } get theme() { return this.config.theme; } /** `'auto'` or a language code. */ set locale(n) { - mn(this, Pt, Yi).call(this, { locale: n }); + mn(this, Mt, Yi).call(this, { locale: n }); } get locale() { return this.config.locale; } /** What people can do in this viewer: features and their parts, on or off. */ set features(n) { - mn(this, Pt, Yi).call(this, { features: n }); + mn(this, Mt, Yi).call(this, { features: n }); } get features() { return this.config.features; @@ -83045,28 +83093,28 @@ const Tx = class Tx extends ADe { * @deprecated Use `features`; goes in 4.0. */ set disable(n) { - mn(this, Pt, Yi).call(this, { disable: n }); + mn(this, Mt, Yi).call(this, { disable: n }); } get disable() { return this.config.disable; } /** Every feature that changes the document off, or all but `except`. */ set readOnly(n) { - mn(this, Pt, Yi).call(this, { readOnly: n }); + mn(this, Mt, Yi).call(this, { readOnly: n }); } get readOnly() { return this.config.readOnly; } /** How a document at a URL downloads: your own `fetch`. The next download uses a new one. */ set fetch(n) { - mn(this, Pt, Yi).call(this, { fetch: n }); + mn(this, Mt, Yi).call(this, { fetch: n }); } get fetch() { return this.config.fetch; } /** Your app's state, which your commands read: a new value, and every button asks again. */ set appState(n) { - mn(this, Pt, Yi).call(this, { appState: n }); + mn(this, Mt, Yi).call(this, { appState: n }); } get appState() { return this.config.appState; @@ -83077,7 +83125,7 @@ const Tx = class Tx extends ADe { * builds a new viewer. */ get viewer() { - return rt(this, na); + return ot(this, na); } connectedCallback() { for (const n of SDe) { @@ -83085,83 +83133,83 @@ const Tx = class Tx extends ADe { const r = Reflect.get(this, n); Reflect.deleteProperty(this, n), Reflect.set(this, n, r); } - this.hasAttribute(xDe) && rt(this, Ld) === null || queueMicrotask(() => { - this.isConnected && !rt(this, ts) && mn(this, Pt, tS).call(this); + this.hasAttribute(xDe) && ot(this, jd) === null || queueMicrotask(() => { + this.isConnected && !ot(this, ts) && mn(this, Mt, tS).call(this); }); } disconnectedCallback() { - mn(this, Pt, MP).call(this); + mn(this, Mt, MP).call(this); } attributeChangedCallback() { - rt(this, ts) && mn(this, Pt, TP).call(this); + ot(this, ts) && mn(this, Mt, TP).call(this); } }; -Ld = new WeakMap(), yl = new WeakMap(), ts = new WeakMap(), Io = new WeakMap(), ta = new WeakMap(), ov = new WeakMap(), sv = new WeakMap(), na = new WeakMap(), Dd = new WeakMap(), jd = new WeakMap(), Nx = new WeakMap(), Pt = new WeakSet(), Yi = function(n) { - this.config = { ...rt(this, Ld), ...n }; +jd = new WeakMap(), bl = new WeakMap(), ts = new WeakMap(), No = new WeakMap(), ta = new WeakMap(), ov = new WeakMap(), sv = new WeakMap(), na = new WeakMap(), Fd = new WeakMap(), Vd = new WeakMap(), Nx = new WeakMap(), Mt = new WeakSet(), Yi = function(n) { + this.config = { ...ot(this, jd), ...n }; }, /** Show the current config: in place when only live keys changed, else on a new viewer. */ TP = function() { if (!this.isConnected) return; - const n = rt(this, Io); - if (!rt(this, ts) || !n) { - mn(this, Pt, tS).call(this); + const n = ot(this, No); + if (!ot(this, ts) || !n) { + mn(this, Mt, tS).call(this); return; } const r = this.config, o = iDe(n, r); if (o.length !== 0) { if (!o.every(sDe)) { - mn(this, Pt, tS).call(this); + mn(this, Mt, tS).call(this); return; } - if (gn(this, Io, r), o.includes("theme") && mn(this, Pt, _P).call(this, r.theme), o.some((s) => s !== "src" && s !== "fetch")) { + if (gn(this, No, r), o.includes("theme") && mn(this, Mt, _P).call(this, r.theme), o.some((s) => s !== "src" && s !== "fetch")) { const { theme: s, locale: i, features: a, disable: c, readOnly: l, appState: u } = r; - gn(this, ta, { ...rt(this, ta), theme: s, locale: i, features: a, disable: c, readOnly: l, appState: u }), rt(this, ts).render(mo(OF, rt(this, ta))); + gn(this, ta, { ...ot(this, ta), theme: s, locale: i, features: a, disable: c, readOnly: l, appState: u }), ot(this, ts).render(yo(OF, ot(this, ta))); } - o.includes("src") && mn(this, Pt, BP).call(this); + o.includes("src") && mn(this, Mt, BP).call(this); } }, MP = function() { - gn(this, na, null), gn(this, Dd, null), rt(this, jd).clear(), gn(this, Io, null), gn(this, ta, null), rt(this, ts)?.unmount(), gn(this, ts, null); + gn(this, na, null), gn(this, Fd, null), ot(this, Vd).clear(), gn(this, No, null), gn(this, ta, null), ot(this, ts)?.unmount(), gn(this, ts, null); }, Ox = new WeakMap(), Px = new WeakMap(), Rx = new WeakMap(), /** * Open the document `src` names in the place of the one the previous `src` opened, which * closes. `documents` takes over from `src` when the config has them. */ BP = function() { var u; - const n = rt(this, na), r = rt(this, Io); + const n = ot(this, na), r = ot(this, No); if (!n || !r || r.documents) return; - const { documents: o } = n, s = rt(this, Dd); - if (s && r.src != null && ((u = rt(this, sv)) != null && u.call(this, s.input, r.src))) return; - gn(this, Dd, null); + const { documents: o } = n, s = ot(this, Fd); + if (s && r.src != null && ((u = ot(this, sv)) != null && u.call(this, s.input, r.src))) return; + gn(this, Fd, null); const i = s && o.has(s.id) ? s.id : s?.reserved, a = i ? o.getOrder().indexOf(i) : -1; let c = () => { }; - const l = new Promise((d) => c = d); - if (r.src != null && mn(this, Pt, YJ).call(this, r.src, a, s ? l : void 0), s) { - const d = s.id; - rt(this, jd).add(d); - const f = /* @__PURE__ */ new Set([s.reserved, d]), h = () => { - rt(this, jd).delete(d), c(); + const l = new Promise((f) => c = f); + if (r.src != null && mn(this, Mt, YJ).call(this, r.src, a, s ? l : void 0), s) { + const f = s.id; + ot(this, Vd).add(f); + const d = /* @__PURE__ */ new Set([s.reserved, f]), h = () => { + ot(this, Vd).delete(f), c(); }; - Promise.all([...f].map((g) => o.close(g))).then(() => s.opened).then((g) => g !== null && !f.has(g) ? o.close(g) : void 0).then(h, h); + Promise.all([...d].map((g) => o.close(g))).then(() => s.opened).then((g) => g !== null && !d.has(g) ? o.close(g) : void 0).then(h, h); } }, /** Open `src` as the `src` document, at `position` in the tabs, once `after` settles. */ YJ = function(n, r, o) { - const { documents: s } = rt(this, na), i = rt(this, ov).call(this, n), a = mn(this, Pt, QJ).call(this, i), { source: c, name: l } = zJ(i, a, o), u = new Set(s.getOrder()), d = s.open(c, l !== void 0 ? { name: l } : {}), f = s.getOrder().find((p) => !u.has(p)), h = d.then( + const { documents: s } = ot(this, na), i = ot(this, ov).call(this, n), a = mn(this, Mt, QJ).call(this, i), { source: c, name: l } = zJ(i, a, o), u = new Set(s.getOrder()), f = s.open(c, l !== void 0 ? { name: l } : {}), d = s.getOrder().find((p) => !u.has(p)), h = f.then( ({ document: p }) => p.id, () => null ); - if (!f) return; + if (!d) return; const g = { - reserved: f, - id: dE(i) ? f : a, + reserved: d, + id: dE(i) ? d : a, opened: h, input: i }; - gn(this, Dd, g), h.then((p) => { + gn(this, Fd, g), h.then((p) => { p !== null && (g.id = p); - }), r >= 0 && s.move(f, r); + }), r >= 0 && s.move(d, r); }, /** The id `src` asks for, or with a number after it while a document still has it. */ QJ = function(n) { - const r = HJ(n), o = (i) => rt(this, jd).has(i) || !!rt(this, na)?.documents.has(i); + const r = HJ(n), o = (i) => ot(this, Vd).has(i) || !!ot(this, na)?.documents.has(i); let s = r; for (let i = 2; o(s); i++) s = `${r}#${i}`; return s; @@ -83172,9 +83220,9 @@ _P = function(n) { }, tS = function() { if (!this.shadowRoot) { const h = this.attachShadow({ mode: "open" }); - gn(this, yl, document.createElement("div")), rt(this, yl).setAttribute(JJ, ""), h.appendChild(rt(this, yl)); + gn(this, bl, document.createElement("div")), ot(this, bl).setAttribute(JJ, ""), h.appendChild(ot(this, bl)); } - mn(this, Pt, MP).call(this); + mn(this, Mt, MP).call(this); const n = this.config; kDe(n); const { @@ -83185,23 +83233,23 @@ _P = function(n) { fetch: a, ...c } = n; - mn(this, Pt, _P).call(this, i), gn(this, Io, n); - const { engine: l, sourceOf: u = (h) => h, follows: d, plugins: f } = vDe(n); - gn(this, ov, u), gn(this, sv, d), gn(this, ta, { + mn(this, Mt, _P).call(this, i), gn(this, No, n); + const { engine: l, sourceOf: u = (h) => h, follows: f, plugins: d } = vDe(n); + gn(this, ov, u), gn(this, sv, f), gn(this, ta, { engine: l, initialDocuments: o && uDe(o, u), - fetch: rt(this, Nx), + fetch: ot(this, Nx), theme: i, - themeTarget: rt(this, yl), + themeTarget: ot(this, bl), // The viewer's own components among the children (``, ``). components: IP(this), ...c, - plugins: aDe(f, c.plugins), + plugins: aDe(d, c.plugins), // The element's own, which call the config's after its events. - onReady: rt(this, Ox), - onDocumentChange: rt(this, Px), - onPanelResize: rt(this, Rx) - }), gn(this, ts, Hre(rt(this, yl))), rt(this, ts).render(mo(OF, rt(this, ta))); + onReady: ot(this, Ox), + onDocumentChange: ot(this, Px), + onPanelResize: ot(this, Rx) + }), gn(this, ts, Hre(ot(this, bl))), ot(this, ts).render(yo(OF, ot(this, ta))); }, Tx.observedAttributes = ["src", "locale", "theme"], Tx.defaultEngineProvider = null; let rv = Tx; typeof customElements < "u" && !customElements.get("embedpdf-viewer") && customElements.define("embedpdf-viewer", rv); @@ -83224,23 +83272,23 @@ const NDe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty( default: x$ }, Symbol.toStringTag, { value: "Module" })); export { - ar as $, - fe as A, + cr as $, + de as A, bt as B, vt as C, - Zt as D, + tn as D, oe as E, jr as F, F6e as G, oc as H, - de as I, + ue as I, bRe as J, wRe as K, - Jr as L, + Yr as L, Ms as M, i8e as N, Oe as O, - go as P, + mo as P, lE as Q, yRe as R, nt as S, @@ -83256,17 +83304,17 @@ export { sx as a$, kfe as a0, cve as a1, - en as a2, + nn as a2, MDe as a3, - Rt as a4, + Bt as a4, oa as a5, a5e as a6, Xa as a7, - zt as a8, + Gt as a8, C0 as a9, FRe as aA, xi as aB, - pr as aC, + Xn as aC, l8e as aD, D2 as aE, BSe as aF, @@ -83276,20 +83324,20 @@ export { u2 as aJ, jRe as aK, pR as aL, - um as aM, + dm as aM, c2 as aN, IS as aO, mG as aP, - Vm as aQ, + $m as aQ, $v as aR, Mr as aS, Nq as aT, xO as aU, ki as aV, - ln as aW, + un as aW, d0 as aX, aT as aY, - ht as aZ, + pt as aZ, Bn as a_, X6 as aa, E5 as ab, @@ -83318,44 +83366,44 @@ export { yr as ay, y_ as az, $De as b, - yDe as b$, + NP as b$, Pq as b0, Yn as b1, bx as b2, UDe as b3, W0 as b4, - Yt as b5, - Ve as b6, + Xt as b5, + $e as b6, mr as b7, wx as b8, z as b9, - Cq as bA, - J as bB, - q as bC, - lOe as bD, - u0 as bE, - zr as bF, - J0 as bG, - Qt as bH, - aOe as bI, - ZDe as bJ, - WDe as bK, - qDe as bL, - Ig as bM, - e8e as bN, - JDe as bO, - XDe as bP, - QDe as bQ, - YDe as bR, - GDe as bS, - Z2 as bT, - Lr as bU, - bo as bV, - It as bW, - rv as bX, - NP as bY, - PP as bZ, - OP as b_, + q as bA, + p4 as bB, + al as bC, + xg as bD, + kOe as bE, + Cq as bF, + lOe as bG, + u0 as bH, + Wr as bI, + J0 as bJ, + Zt as bK, + aOe as bL, + ZDe as bM, + WDe as bN, + qDe as bO, + Ng as bP, + e8e as bQ, + JDe as bR, + XDe as bS, + QDe as bT, + YDe as bU, + GDe as bV, + Z2 as bW, + Lr as bX, + wo as bY, + Pt as bZ, + rv as b_, RDe as ba, qde as bb, c8e as bc, @@ -83363,63 +83411,66 @@ export { yP as be, Ze as bf, wr as bg, - wo as bh, + vo as bh, vi as bi, An as bj, - fn as bk, + hn as bk, WC as bl, HDe as bm, - eo as bn, + to as bn, LIe as bo, En as bp, zDe as bq, Ka as br, - hr as bs, - Dt as bt, + pr as bs, + Vt as bt, eP as bu, - Tp as bv, + Mp as bv, pOe as bw, r0 as bx, BDe as by, - kOe as bz, + J as bz, Qa as c, - vo as c0, - Pf as c1, - EJ as c2, - Fm as c3, - Wo as c4, - Oi as c5, - _r as c6, - dt as c7, - Qn as c8, - Uq as c9, - d8e as ca, - Pj as cb, - NG as cc, - WRe as cd, - EDe as ce, + PP as c0, + OP as c1, + yDe as c2, + ko as c3, + Tf as c4, + EJ as c5, + Vm as c6, + qo as c7, + Oi as c8, + _r as c9, + dt as ca, + Qn as cb, + Uq as cc, + d8e as cd, + Pj as ce, + NG as cf, + WRe as cg, + EDe as ch, ive as d, _De as e, - hn as f, - De as g, + pn as f, + je as g, P as h, HG as i, - Nt as j, - sr as k, + Rt as j, + ir as k, KMe as l, J5e as m, ft as n, - Ho as o, + zo as o, u8e as p, VMe as q, Ke as r, Re as s, X2 as t, - Tt as u, + _t as u, PDe as v, o8e as w, U0e as x, LDe as y, DDe as z }; -//# sourceMappingURL=wasm-url-asset-sqnq1cad.js.map +//# sourceMappingURL=wasm-url-asset-Dc0HnHB_.js.map diff --git a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/embedpdf-worker.js b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/embedpdf-worker.js index 718d7b88..d808feb1 100644 --- a/src/components/BootstrapBlazor.EmbedPDF/wwwroot/embedpdf-worker.js +++ b/src/components/BootstrapBlazor.EmbedPDF/wwwroot/embedpdf-worker.js @@ -1,5 +1,5 @@ -"use strict";(()=>{let e,t,n,r,i,o,a,s,l,u,d,c,f,m,p;var h,F,g,_,P,D,b,y,w=Object.defineProperty,E=Object.getOwnPropertyNames,A=(e=function(e){if("u">typeof require)return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')},"u">typeof require?require:"u">typeof Proxy?new Proxy(e,{get:(e,t)=>("u">typeof require?require:e)[t]}):e),v=(e,t)=>{for(var n in t)w(e,n,{get:t[n],enumerable:!0})},S=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?w(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n},k={};v(k,{default:()=>_});var x=(t={"../runtime/npm/wasm32/lib/embedpdf.browser.js"(){var e;e=self.location.href,_=function(t={}){var n,r,i,o,a,s,l,u,d,c,f,m,p,h,F,g,_,P,D,b,y=new Promise((e,t)=>{n=e,r=t});["_EPDF_CheckPasswordPermissions","_EPDF_DigestBuffer","_EPDF_FreeBuffer","_EPDF_GetDecodedImageBytes","_EPDF_GetMetaKeyCount","_EPDF_GetMetaKeyName","_EPDF_GetMetaTrapped","_EPDF_GetPageBoxByIndex","_EPDF_GetPageRotateByIndex","_EPDF_GetPageTabOrderByIndex","_EPDF_GetPageUserUnitByIndex","_EPDF_HasMetaText","_EPDF_InitThread","_EPDF_IsEncrypted","_EPDF_IsOwnerUnlocked","_EPDF_LoadBaseDocument","_EPDF_LoadMemBaseDocument","_EPDF_LoadMemBaseDocument64","_EPDF_LoadPageNormalized","_EPDF_PNG_EncodeRGBA","_EPDF_ReleaseBaseDocument","_EPDF_RemoveEncryption","_EPDF_RenderAnnotBitmap","_EPDF_RenderAnnotBitmapUnrotated","_EPDF_RenderPage_Continue","_EPDF_RenderPageBitmapWithMatrix_Start","_EPDF_SaveAsCopyEx","_EPDF_SaveDocumentToOwnedBuffer","_EPDF_SaveDocumentToOwnedBufferEx","_EPDF_SaveDocumentToOwnedBufferWithVersion","_EPDF_SetBaseDocumentSha256","_EPDF_SetDecodedImageBudget","_EPDF_SetEncryption","_EPDF_SetMetaText","_EPDF_SetMetaTrapped","_EPDF_SetRuntimeOwnerPermissions","_EPDF_ShutdownThread","_EPDF_UnlockOwnerPermissions","_EPDFAction_CloseModel","_EPDFAction_CreateGoTo","_EPDFAction_CreateGoToNamed","_EPDFAction_CreateHide","_EPDFAction_CreateJavaScript","_EPDFAction_CreateLaunch","_EPDFAction_CreateNamed","_EPDFAction_CreateRemoteGoToByName","_EPDFAction_CreateRemoteGoToDest","_EPDFAction_CreateResetForm","_EPDFAction_CreateSubmitForm","_EPDFAction_CreateURI","_EPDFAction_GetNextAt","_EPDFAction_GetNextCount","_EPDFAction_GetNodeCount","_EPDFAction_GetNodeDest","_EPDFAction_GetNodeFilePath","_EPDFAction_GetNodeHideFlag","_EPDFAction_GetNodeJavaScript","_EPDFAction_GetNodeName","_EPDFAction_GetNodeResetForm","_EPDFAction_GetNodeSubmitForm","_EPDFAction_GetNodeSubmitFormCharSet","_EPDFAction_GetNodeSubmitFormURL","_EPDFAction_GetNodeSubtype","_EPDFAction_GetNodeTargetCount","_EPDFAction_GetNodeTargetName","_EPDFAction_GetNodeTargetObjectNumber","_EPDFAction_GetNodeType","_EPDFAction_GetNodeURI","_EPDFAction_GetNodeURIIsMap","_EPDFAction_GetRootNode","_EPDFAction_GetWarningFlags","_EPDFAction_IsComplete","_EPDFAction_LoadModel","_EPDFAction_NodeHasJavaScript","_EPDFAction_SetNext","_EPDFAnnot_AddMeasure","_EPDFAnnot_ClearBorderEffect","_EPDFAnnot_ClearColor","_EPDFAnnot_ClearEmbedMetadata","_EPDFAnnot_ClearEmbedMetadataKey","_EPDFAnnot_ClearMKColor","_EPDFAnnot_ClearMKIcon","_EPDFAnnot_ClearRectangleDifferences","_EPDFAnnot_ExportAppearance","_EPDFAnnot_GenerateAppearance","_EPDFAnnot_GenerateAppearanceWithBlend","_EPDFAnnot_GenerateFormFieldAP","_EPDFAnnot_GetActionModel","_EPDFAnnot_GetAPMatrix","_EPDFAnnot_GetAppearanceState","_EPDFAnnot_GetAppearanceStateCount","_EPDFAnnot_GetAppearanceStateName","_EPDFAnnot_GetAppearanceTransform","_EPDFAnnot_GetAvailableAppearanceModes","_EPDFAnnot_GetBlendMode","_EPDFAnnot_GetBooleanValue","_EPDFAnnot_GetBorderDashPattern","_EPDFAnnot_GetBorderDashPatternCount","_EPDFAnnot_GetBorderEffect","_EPDFAnnot_GetBorderStyle","_EPDFAnnot_GetCalloutLine","_EPDFAnnot_GetCalloutLineCount","_EPDFAnnot_GetColor","_EPDFAnnot_GetDefaultAppearance","_EPDFAnnot_GetDefaultAppearanceFontFace","_EPDFAnnot_GetDefaultAppearanceFontPostScriptName","_EPDFAnnot_GetDrawing","_EPDFAnnot_GetDrawingRect","_EPDFAnnot_GetEmbedMetadataBoolean","_EPDFAnnot_GetEmbedMetadataJSON","_EPDFAnnot_GetEmbedMetadataNumber","_EPDFAnnot_GetEmbedMetadataRect","_EPDFAnnot_GetEmbedMetadataString","_EPDFAnnot_GetFileAttachmentForWrite","_EPDFAnnot_GetIntent","_EPDFAnnot_GetLineCaption","_EPDFAnnot_GetLineEndings","_EPDFAnnot_GetLineLeader","_EPDFAnnot_GetMeasure","_EPDFAnnot_GetMKColor","_EPDFAnnot_GetMKIcon","_EPDFAnnot_GetMKRotation","_EPDFAnnot_GetMKText","_EPDFAnnot_GetMKTextPosition","_EPDFAnnot_GetName","_EPDFAnnot_GetObjectNumber","_EPDFAnnot_GetOpacity","_EPDFAnnot_GetOverlayText","_EPDFAnnot_GetOverlayTextRepeat","_EPDFAnnot_GetRect","_EPDFAnnot_GetRectangleDifferences","_EPDFAnnot_GetReplyType","_EPDFAnnot_GetRichContent","_EPDFAnnot_GetRichTextJSON","_EPDFAnnot_GetRotate","_EPDFAnnot_GetShapeCaption","_EPDFAnnot_GetStructurePosition","_EPDFAnnot_GetTextAlignment","_EPDFAnnot_HasAppearanceStream","_EPDFAnnot_HasEmbedMetadata","_EPDFAnnot_HasMKIcon","_EPDFAnnot_IsValid","_EPDFAnnot_RemoveAction","_EPDFAnnot_RemoveDest","_EPDFAnnot_RemoveKey","_EPDFAnnot_RemoveMeasure","_EPDFAnnot_SetAction","_EPDFAnnot_SetAPMatrix","_EPDFAnnot_SetAppearanceFromPage","_EPDFAnnot_SetBooleanValue","_EPDFAnnot_SetBorderDashPattern","_EPDFAnnot_SetBorderEffect","_EPDFAnnot_SetBorderStyle","_EPDFAnnot_SetCalloutLine","_EPDFAnnot_SetColor","_EPDFAnnot_SetDefaultAppearance","_EPDFAnnot_SetDefaultAppearanceDocumentFont","_EPDFAnnot_SetDefaultAppearanceRegisteredFont","_EPDFAnnot_SetDrawing","_EPDFAnnot_SetEmbedMetadataBoolean","_EPDFAnnot_SetEmbedMetadataJSON","_EPDFAnnot_SetEmbedMetadataNumber","_EPDFAnnot_SetEmbedMetadataRect","_EPDFAnnot_SetEmbedMetadataString","_EPDFAnnot_SetEventAction","_EPDFAnnot_SetIntent","_EPDFAnnot_SetLine","_EPDFAnnot_SetLineCaption","_EPDFAnnot_SetLineEndings","_EPDFAnnot_SetLineLeader","_EPDFAnnot_SetLinkedAnnot","_EPDFAnnot_SetMKColor","_EPDFAnnot_SetMKIcon","_EPDFAnnot_SetMKRotation","_EPDFAnnot_SetMKText","_EPDFAnnot_SetMKTextPosition","_EPDFAnnot_SetName","_EPDFAnnot_SetNoColor","_EPDFAnnot_SetNumberValue","_EPDFAnnot_SetOpacity","_EPDFAnnot_SetOverlayText","_EPDFAnnot_SetOverlayTextRepeat","_EPDFAnnot_SetRect","_EPDFAnnot_SetReplyType","_EPDFAnnot_SetRichTextJSON","_EPDFAnnot_SetRichTextXHTML","_EPDFAnnot_SetRotate","_EPDFAnnot_SetShapeCaption","_EPDFAnnot_SetStampOpacity","_EPDFAnnot_SetSubtype","_EPDFAnnot_SetTextAlignment","_EPDFAnnot_SetVertices","_EPDFAnnot_UpdateAppearanceToRect","_EPDFAttachment_ExportCanonicalToOwnedBuffer","_EPDFAttachment_ExportRawToOwnedBuffer","_EPDFAttachment_ExtractFile","_EPDFAttachment_ExtractFileToOwnedBuffer","_EPDFAttachment_GetDescription","_EPDFAttachment_GetIntegerValue","_EPDFAttachment_ImportRaw","_EPDFAttachment_SetDescription","_EPDFAttachment_SetName","_EPDFAttachment_SetSubtype","_EPDFCatalog_GetLanguage","_EPDFCatalog_GetMetadata","_EPDFCatalog_SetMetadata","_EPDFDest_CreateRemoteView","_EPDFDest_CreateRemoteXYZ","_EPDFDest_CreateView","_EPDFDest_CreateViewByObjectNumber","_EPDFDest_CreateXYZ","_EPDFDest_CreateXYZByObjectNumber","_EPDFDest_GetPageObjectNumber","_EPDFDest_GetViewNullParams","_EPDFDoc_CanonicalDrawing","_EPDFDoc_ClearMissingCharacters","_EPDFDoc_ClearPagePieceInfoEntry","_EPDFDoc_ClearPagePieceInfoKey","_EPDFDoc_ClearPieceInfoEntry","_EPDFDoc_ClearPieceInfoKey","_EPDFDoc_CompareRevisions","_EPDFDoc_CountMissingCharacters","_EPDFDoc_DeletePageByObjectNumber","_EPDFDoc_ExportDictCanonicalToOwnedBuffer","_EPDFDoc_ExportDictRawToOwnedBuffer","_EPDFDoc_ExportDrawing","_EPDFDoc_ExportPagesFlattened","_EPDFDoc_GetAdditionalActionModel","_EPDFDoc_GetAttachmentIndexByKey","_EPDFDoc_GetAttachmentKey","_EPDFDoc_GetBaseBytesSize","_EPDFDoc_GetDrawings","_EPDFDoc_GetFontDisplayProgramCoverage","_EPDFDoc_GetFontDisplayProgramData","_EPDFDoc_GetFontEmbeddingPolicy","_EPDFDoc_GetFontProgramData","_EPDFDoc_GetFontsFingerprint","_EPDFDoc_GetImportFieldRoots","_EPDFDoc_GetLastModified","_EPDFDoc_GetLoadedBytesSize","_EPDFDoc_GetLoadedObjectValue","_EPDFDoc_GetMissingCharacter","_EPDFDoc_GetNamedJavaScriptActionModel","_EPDFDoc_GetNamedPageAt","_EPDFDoc_GetNamedPageCount","_EPDFDoc_GetOpenActionDest","_EPDFDoc_GetOpenActionModel","_EPDFDoc_GetPageActionModel","_EPDFDoc_GetPageLabelSectionAt","_EPDFDoc_GetPageLabelSectionCount","_EPDFDoc_GetPageLastModified","_EPDFDoc_GetPageObjectNumberByIndex","_EPDFDoc_GetPagePieceInfoBoolean","_EPDFDoc_GetPagePieceInfoEntryAt","_EPDFDoc_GetPagePieceInfoEntryCount","_EPDFDoc_GetPagePieceInfoKeyAt","_EPDFDoc_GetPagePieceInfoKeyCount","_EPDFDoc_GetPagePieceInfoLastModified","_EPDFDoc_GetPagePieceInfoName","_EPDFDoc_GetPagePieceInfoNumber","_EPDFDoc_GetPagePieceInfoString","_EPDFDoc_GetPagePieceInfoStringArrayAt","_EPDFDoc_GetPagePieceInfoStringArrayCount","_EPDFDoc_GetPagePieceInfoValueType","_EPDFDoc_GetPieceInfoBoolean","_EPDFDoc_GetPieceInfoEntryAt","_EPDFDoc_GetPieceInfoEntryCount","_EPDFDoc_GetPieceInfoKeyAt","_EPDFDoc_GetPieceInfoKeyCount","_EPDFDoc_GetPieceInfoLastModified","_EPDFDoc_GetPieceInfoName","_EPDFDoc_GetPieceInfoNumber","_EPDFDoc_GetPieceInfoString","_EPDFDoc_GetPieceInfoStringArrayAt","_EPDFDoc_GetPieceInfoStringArrayCount","_EPDFDoc_GetPieceInfoValueType","_EPDFDoc_GetRevision","_EPDFDoc_GetRevisionCount","_EPDFDoc_GetStructureObjectNumbers","_EPDFDoc_GetTypographicFeatures","_EPDFDoc_HasPagePieceInfoEntry","_EPDFDoc_HasPieceInfoEntry","_EPDFDoc_ImportDictRaw","_EPDFDoc_ImportDrawing","_EPDFDoc_ImportPages","_EPDFDoc_LoadPageByObjectNumber","_EPDFDoc_LoadPageByObjectNumberNormalized","_EPDFDoc_OpenBaseOverlay","_EPDFDoc_OpenBaseOverlayFromPath","_EPDFDoc_OpenRevision","_EPDFDoc_ReadLoadedBytes","_EPDFDoc_RemoveNamedPage","_EPDFDoc_RemoveNamedPagesForPage","_EPDFDoc_ResolveFonts","_EPDFDoc_SetFontEmbeddingPolicy","_EPDFDoc_SetNamedPage","_EPDFDoc_SetPageLabelSections","_EPDFDoc_SetPagePieceInfoBoolean","_EPDFDoc_SetPagePieceInfoName","_EPDFDoc_SetPagePieceInfoNumber","_EPDFDoc_SetPagePieceInfoString","_EPDFDoc_SetPagePieceInfoStringArray","_EPDFDoc_SetPageRotationByObjectNumber","_EPDFDoc_SetPieceInfoBoolean","_EPDFDoc_SetPieceInfoName","_EPDFDoc_SetPieceInfoNumber","_EPDFDoc_SetPieceInfoString","_EPDFDoc_SetPieceInfoStringArray","_EPDFDoc_SetTypographicFeatures","_EPDFDoc_StartLoadPageByObjectNumber","_EPDFDocument_ClearEmbedMetadata","_EPDFDss_Add","_EPDFDss_GetCount","_EPDFDss_GetData","_EPDFFont_AddFallbackFont","_EPDFFont_AuthorizeEditing","_EPDFFont_ClearFallbackFonts","_EPDFFont_ClearRegisteredFonts","_EPDFFont_GetCoverage","_EPDFFont_GetEmbeddingPermission","_EPDFFont_GetFallbackOrder","_EPDFFont_GetFamilyName","_EPDFFont_GetLastResortFont","_EPDFFont_GetMetrics","_EPDFFont_GetPostScriptName","_EPDFFont_GetProgramData","_EPDFFont_GetProgramFormat","_EPDFFont_GetProgramHash","_EPDFFont_GetWeight","_EPDFFont_IsEditingAuthorized","_EPDFFont_IsInstanced","_EPDFFont_IsItalic","_EPDFFont_RegisterFont","_EPDFFont_RegisterMemFont","_EPDFFont_RegisterMemFont64","_EPDFFont_SetLastResortFont","_EPDFFontFaces_Close","_EPDFFontFaces_Count","_EPDFFontFaces_CountPrograms","_EPDFFontFaces_GetFamily","_EPDFFontFaces_GetProgramDisplayHash","_EPDFFontFaces_GetProgramEmbedded","_EPDFFontFaces_GetProgramEmbeddingPermission","_EPDFFontFaces_GetProgramFormat","_EPDFFontFaces_GetProgramHash","_EPDFFontFaces_GetProgramMetrics","_EPDFFontFaces_GetProgramObjNum","_EPDFFontFaces_GetProgramPostScriptName","_EPDFFontFaces_GetWeight","_EPDFFontFaces_IsItalic","_EPDFFontFaces_Load","_EPDFFontFaces_ProgramMapsUnicode","_EPDFFontResolution_Close","_EPDFFontResolution_CountMissingCharacters","_EPDFFontResolution_GetBaseFontName","_EPDFFontResolution_GetFallbacks","_EPDFFontResolution_GetFamily","_EPDFFontResolution_GetMissingCharacter","_EPDFFontResolution_GetProgramDisplayHash","_EPDFFontResolution_GetProgramObjNum","_EPDFFontResolution_GetRegisteredFont","_EPDFFontResolution_GetSource","_EPDFFontResolution_GetWeight","_EPDFFontResolution_IsDegraded","_EPDFFontResolution_IsItalic","_EPDFForm_AttachWidget","_EPDFForm_ClearFieldEmbedMetadata","_EPDFForm_ClearFieldEmbedMetadataKey","_EPDFForm_CloseModel","_EPDFForm_CountCalculationOrder","_EPDFForm_CountFieldDefaultValues","_EPDFForm_CountFieldOptions","_EPDFForm_CountFields","_EPDFForm_CountFieldValues","_EPDFForm_CountFieldWidgets","_EPDFForm_CreateField","_EPDFForm_DeleteField","_EPDFForm_DetachWidget","_EPDFForm_ExportFDF","_EPDFForm_ExportFieldRawToOwnedBuffer","_EPDFForm_ExportXFDF","_EPDFForm_GetCalculationOrderFieldIndex","_EPDFForm_GetFieldActionModel","_EPDFForm_GetFieldAlternateName","_EPDFForm_GetFieldDefaultValueAt","_EPDFForm_GetFieldDefaultValueKind","_EPDFForm_GetFieldEmbedMetadataBoolean","_EPDFForm_GetFieldEmbedMetadataJSON","_EPDFForm_GetFieldEmbedMetadataNumber","_EPDFForm_GetFieldEmbedMetadataString","_EPDFForm_GetFieldFamily","_EPDFForm_GetFieldFlags","_EPDFForm_GetFieldIndexByObjNum","_EPDFForm_GetFieldIndexForWidget","_EPDFForm_GetFieldMappingName","_EPDFForm_GetFieldMaxLen","_EPDFForm_GetFieldName","_EPDFForm_GetFieldObjNum","_EPDFForm_GetFieldOptionLabel","_EPDFForm_GetFieldOptionValue","_EPDFForm_GetFieldOrigin","_EPDFForm_GetFieldPartialName","_EPDFForm_GetFieldTopIndex","_EPDFForm_GetFieldValueAt","_EPDFForm_GetFieldValueKind","_EPDFForm_GetFieldWidgetExportValue","_EPDFForm_GetFieldWidgetObjNum","_EPDFForm_GetFieldWidgetOnState","_EPDFForm_GetFieldWidgetPageObjNum","_EPDFForm_GetFieldWidgetRect","_EPDFForm_GetFormKind","_EPDFForm_GetNeedAppearances","_EPDFForm_HasFieldEmbedMetadata","_EPDFForm_HasFieldValuesList","_EPDFForm_ImportFieldRaw","_EPDFForm_IsFieldOptionSelected","_EPDFForm_IsFieldWidgetChecked","_EPDFForm_LoadModel","_EPDFForm_RedrawFieldWidgets","_EPDFForm_Repair","_EPDFForm_SetCalculationOrder","_EPDFForm_SetFieldAlternateName","_EPDFForm_SetFieldAppearanceText","_EPDFForm_SetFieldDefaultValue","_EPDFForm_SetFieldDisplay","_EPDFForm_SetFieldEmbedMetadataBoolean","_EPDFForm_SetFieldEmbedMetadataJSON","_EPDFForm_SetFieldEmbedMetadataNumber","_EPDFForm_SetFieldEmbedMetadataString","_EPDFForm_SetFieldEventAction","_EPDFForm_SetFieldFlags","_EPDFForm_SetFieldMappingName","_EPDFForm_SetFieldMaxLen","_EPDFForm_SetFieldName","_EPDFForm_SetFieldOptions","_EPDFForm_SetFieldSelectedIndices","_EPDFForm_SetFieldValue","_EPDFForm_SetFieldWidgetsChecked","_EPDFImageObj_SetJpeg","_EPDFImageObj_SetPng","_EPDFLayer_AbortTransaction","_EPDFLayer_BeginTransaction","_EPDFLayer_CommitTransaction","_EPDFLayer_GetBaseDocument","_EPDFLayer_GetBaseSha256","_EPDFLayer_GetBirthName","_EPDFLayer_GetBirthObjectNumber","_EPDFLayer_GetLastObjectNumber","_EPDFLayer_GetPromotedObjectCount","_EPDFLayer_IsInTransaction","_EPDFLayer_IsObjectPromoted","_EPDFLayer_IsPagePromoted","_EPDFLayer_OpenLayer","_EPDFLayer_OpenLayerArtifact","_EPDFLayer_OpenLayerArtifactFromPath","_EPDFLayer_RaiseLastObjectNumber","_EPDFLayer_SaveDelta","_EPDFLayer_SaveDeltaEx","_EPDFLayer_SaveDeltaToOwnedBuffer","_EPDFLayer_SaveDeltaToOwnedBufferEx","_EPDFLayer_SaveLayerArtifact","_EPDFLayer_SaveLayerArtifactEx","_EPDFLayer_SaveLayerArtifactToOwnedBuffer","_EPDFLayer_SaveLayerArtifactToOwnedBufferEx","_EPDFMeasure_AddFormat","_EPDFMeasure_CountFormats","_EPDFMeasure_GetCYX","_EPDFMeasure_GetFormat","_EPDFMeasure_GetOrigin","_EPDFMeasure_GetRatio","_EPDFMeasure_GetSubtype","_EPDFMeasure_RemoveFormats","_EPDFMeasure_SetCYX","_EPDFMeasure_SetOrigin","_EPDFMeasure_SetRatio","_EPDFNamedDest_Remove","_EPDFNamedDest_SetDest","_EPDFNumberFormat_GetConversion","_EPDFNumberFormat_GetFixedDenominator","_EPDFNumberFormat_GetFraction","_EPDFNumberFormat_GetLabelPosition","_EPDFNumberFormat_GetPrecision","_EPDFNumberFormat_GetText","_EPDFNumberFormat_GetUnit","_EPDFNumberFormat_SetConversion","_EPDFNumberFormat_SetFixedDenominator","_EPDFNumberFormat_SetFraction","_EPDFNumberFormat_SetLabelPosition","_EPDFNumberFormat_SetPrecision","_EPDFNumberFormat_SetText","_EPDFNumberFormat_SetUnit","_EPDFObjectDiff_Close","_EPDFObjectDiff_GetCount","_EPDFObjectDiff_GetEntry","_EPDFObjectDiff_GetReadStatus","_EPDFObjectDiff_GetReferrer","_EPDFObjectDiff_GetReferrerCount","_EPDFObjectDiff_GetRevisionHealth","_EPDFObjectDiff_GetValue","_EPDFOutline_CreateItem","_EPDFOutline_DeleteItem","_EPDFOutline_ExportItemRawToOwnedBuffer","_EPDFOutline_GetItem","_EPDFOutline_GetObjectNumber","_EPDFOutline_ImportItemRaw","_EPDFOutline_MoveItem","_EPDFOutline_SetAction","_EPDFOutline_SetColor","_EPDFOutline_SetOpen","_EPDFOutline_SetStyle","_EPDFOutline_SetTitle","_EPDFPage_AddViewport","_EPDFPage_AddViewportRaw","_EPDFPage_ApplyRedactions","_EPDFPage_ContinueLoad","_EPDFPage_CountViewports","_EPDFPage_CountViewportsRaw","_EPDFPage_CreateAnnot","_EPDFPage_CreateAnnotRaw","_EPDFPage_ExportAnnotationsAsDocument","_EPDFPage_ExportAnnotsRawToOwnedBuffer","_EPDFPage_ExportRawToOwnedBuffer","_EPDFPage_FindViewport","_EPDFPage_Flatten","_EPDFPage_FlattenAnnotations","_EPDFPage_GetAnnotByName","_EPDFPage_GetAnnotByObjectNumber","_EPDFPage_GetAnnotCountRaw","_EPDFPage_GetAnnotIndexByNameRaw","_EPDFPage_GetAnnotIndexByObjectNumberRaw","_EPDFPage_GetAnnotRaw","_EPDFPage_GetObjectNumber","_EPDFPage_GetParsedSize","_EPDFPage_GetViewport","_EPDFPage_GetViewportRaw","_EPDFPage_ImportAnnotsRaw","_EPDFPage_ImportRaw","_EPDFPage_InsertBlankRaw","_EPDFPage_IsContentCurrent","_EPDFPage_IsValid","_EPDFPage_MoveAnnots","_EPDFPage_MoveAnnotsRaw","_EPDFPage_PromoteInlineAnnotsRaw","_EPDFPage_RemoveAnnot","_EPDFPage_RemoveAnnotByName","_EPDFPage_RemoveAnnotByObjectNumber","_EPDFPage_RemoveAnnotRaw","_EPDFPage_RemoveViewport","_EPDFPage_RemoveViewportRaw","_EPDFPage_ResetRenderCache","_EPDFSig_CloseModel","_EPDFSig_Count","_EPDFSig_DigestByteRange","_EPDFSig_DigestFileRange","_EPDFSig_GetByteRange","_EPDFSig_GetContents","_EPDFSig_GetCoverage","_EPDFSig_GetDocMDPPermission","_EPDFSig_GetFieldMDPAction","_EPDFSig_GetFieldName","_EPDFSig_GetFieldNameAt","_EPDFSig_GetFieldNameCount","_EPDFSig_GetFieldObjNum","_EPDFSig_GetIndexByFieldObjNum","_EPDFSig_GetKind","_EPDFSig_GetLockAction","_EPDFSig_GetLockPermission","_EPDFSig_GetRevisionIndex","_EPDFSig_GetSeedValueFilter","_EPDFSig_GetSeedValueListAt","_EPDFSig_GetSeedValueListCount","_EPDFSig_GetSeedValueMDP","_EPDFSig_GetSeedValuePresentFlags","_EPDFSig_GetSeedValueRequiredFlags","_EPDFSig_GetSeedValueVersion","_EPDFSig_GetString","_EPDFSig_GetValueObjNum","_EPDFSig_GetWidgetObjNum","_EPDFSig_GetWidgetPageObjNum","_EPDFSig_HasSeedValue","_EPDFSig_IsCatalogCertification","_EPDFSig_IsRevisionChainValid","_EPDFSig_IsSigned","_EPDFSig_LoadModel","_EPDFSig_Prepare","_EPDFSig_SaveCandidate","_EPDFSig_SaveCandidateToOwnedBuffer","_EPDFSig_Seal","_EPDFSig_SealSpan","_EPDFSig_SetFieldLock","_EPDFSig_WriteContents","_EPDFText_GetCharGeometry","_EPDFText_GetCharToTextMap","_EPDFText_GetPageGeometry","_EPDFText_GetTextFull","_EPDFText_RedactInQuads","_EPDFText_RedactInRect","_EPDFViewport_AddMeasure","_EPDFViewport_Close","_EPDFViewport_GetBBox","_EPDFViewport_GetMeasure","_EPDFViewport_GetName","_EPDFViewport_RemoveMeasure","_EPDFViewport_SetBBox","_EPDFViewport_SetName","_FORM_CanRedo","_FORM_CanUndo","_FORM_DoDocumentAAction","_FORM_DoDocumentJSAction","_FORM_DoDocumentOpenAction","_FORM_DoPageAAction","_FORM_ForceToKillFocus","_FORM_GetFocusedAnnot","_FORM_GetFocusedText","_FORM_GetSelectedText","_FORM_GetTextDirection","_FORM_IsIndexSelected","_FORM_OnAfterLoadPage","_FORM_OnBeforeClosePage","_FORM_OnChar","_FORM_OnFocus","_FORM_OnKeyDown","_FORM_OnKeyUp","_FORM_OnLButtonDoubleClick","_FORM_OnLButtonDown","_FORM_OnLButtonUp","_FORM_OnMouseMove","_FORM_OnMouseWheel","_FORM_OnRButtonDown","_FORM_OnRButtonUp","_FORM_Redo","_FORM_ReplaceAndKeepSelection","_FORM_ReplaceSelection","_FORM_SelectAllText","_FORM_SetFocusedAnnot","_FORM_SetIndexSelected","_FORM_SetTextDirection","_FORM_Undo","_FPDF_AddInstalledFont","_FPDF_CloseDocument","_FPDF_ClosePage","_FPDF_CloseXObject","_FPDF_CopyViewerPreferences","_FPDF_CountNamedDests","_FPDF_CreateClipPath","_FPDF_CreateNewDocument","_FPDF_DestroyClipPath","_FPDF_DestroyLibrary","_FPDF_DeviceToPage","_FPDF_DocumentHasValidCrossReferenceTable","_FPDF_FFLDraw","_FPDF_FreeDefaultSystemFontInfo","_FPDF_GetDefaultSystemFontInfo","_FPDF_GetDefaultTTFMap","_FPDF_GetDefaultTTFMapCount","_FPDF_GetDefaultTTFMapEntry","_FPDF_GetDocPermissions","_FPDF_GetDocUserPermissions","_FPDF_GetFileIdentifier","_FPDF_GetFileVersion","_FPDF_GetFormType","_FPDF_GetLastError","_FPDF_GetMetaText","_FPDF_GetNamedDest","_FPDF_GetNamedDestByName","_FPDF_GetPageAAction","_FPDF_GetPageBoundingBox","_FPDF_GetPageCount","_FPDF_GetPageHeight","_FPDF_GetPageHeightF","_FPDF_GetPageLabel","_FPDF_GetPageSizeByIndex","_FPDF_GetPageSizeByIndexF","_FPDF_GetPageWidth","_FPDF_GetPageWidthF","_FPDF_GetSecurityHandlerRevision","_FPDF_GetSignatureCount","_FPDF_GetSignatureObject","_FPDF_GetTrailerEnds","_FPDF_GetXFAPacketContent","_FPDF_GetXFAPacketCount","_FPDF_GetXFAPacketName","_FPDF_ImportNPagesToOne","_FPDF_ImportPages","_FPDF_ImportPagesByIndex","_FPDF_InitLibrary","_FPDF_InitLibraryWithConfig","_FPDF_LoadCustomDocument","_FPDF_LoadDocument","_FPDF_LoadMemDocument","_FPDF_LoadMemDocument64","_FPDF_LoadPage","_FPDF_LoadXFA","_FPDF_MovePages","_FPDF_NewFormObjectFromXObject","_FPDF_NewXObjectFromPage","_FPDF_PageToDevice","_FPDF_RemoveFormFieldHighlight","_FPDF_RenderPage_Close","_FPDF_RenderPage_Continue","_FPDF_RenderPageBitmap","_FPDF_RenderPageBitmap_Start","_FPDF_RenderPageBitmapWithColorScheme_Start","_FPDF_RenderPageBitmapWithMatrix","_FPDF_SaveAsCopy","_FPDF_SaveWithVersion","_FPDF_SetFormFieldHighlightAlpha","_FPDF_SetFormFieldHighlightColor","_FPDF_SetSandBoxPolicy","_FPDF_SetSystemFontInfo","_FPDF_StructElement_Attr_CountChildren","_FPDF_StructElement_Attr_GetBlobValue","_FPDF_StructElement_Attr_GetBooleanValue","_FPDF_StructElement_Attr_GetChildAtIndex","_FPDF_StructElement_Attr_GetCount","_FPDF_StructElement_Attr_GetName","_FPDF_StructElement_Attr_GetNumberValue","_FPDF_StructElement_Attr_GetStringValue","_FPDF_StructElement_Attr_GetType","_FPDF_StructElement_Attr_GetValue","_FPDF_StructElement_CountChildren","_FPDF_StructElement_GetActualText","_FPDF_StructElement_GetAltText","_FPDF_StructElement_GetAttributeAtIndex","_FPDF_StructElement_GetAttributeCount","_FPDF_StructElement_GetChildAtIndex","_FPDF_StructElement_GetChildMarkedContentID","_FPDF_StructElement_GetExpansion","_FPDF_StructElement_GetID","_FPDF_StructElement_GetLang","_FPDF_StructElement_GetMarkedContentID","_FPDF_StructElement_GetMarkedContentIdAtIndex","_FPDF_StructElement_GetMarkedContentIdCount","_FPDF_StructElement_GetObjType","_FPDF_StructElement_GetParent","_FPDF_StructElement_GetRawType","_FPDF_StructElement_GetStringAttribute","_FPDF_StructElement_GetTitle","_FPDF_StructElement_GetType","_FPDF_StructTree_Close","_FPDF_StructTree_CountChildren","_FPDF_StructTree_GetChildAtIndex","_FPDF_StructTree_GetForPage","_FPDF_VIEWERREF_GetDuplex","_FPDF_VIEWERREF_GetName","_FPDF_VIEWERREF_GetNumCopies","_FPDF_VIEWERREF_GetPrintPageRange","_FPDF_VIEWERREF_GetPrintPageRangeCount","_FPDF_VIEWERREF_GetPrintPageRangeElement","_FPDF_VIEWERREF_GetPrintScaling","_FPDFAction_GetDest","_FPDFAction_GetFilePath","_FPDFAction_GetType","_FPDFAction_GetURIPath","_FPDFAnnot_AddFileAttachment","_FPDFAnnot_AddInkStroke","_FPDFAnnot_AppendAttachmentPoints","_FPDFAnnot_AppendObject","_FPDFAnnot_CountAttachmentPoints","_FPDFAnnot_GetAP","_FPDFAnnot_GetAttachmentPoints","_FPDFAnnot_GetBorder","_FPDFAnnot_GetColor","_FPDFAnnot_GetFileAttachment","_FPDFAnnot_GetFlags","_FPDFAnnot_GetFocusableSubtypes","_FPDFAnnot_GetFocusableSubtypesCount","_FPDFAnnot_GetFontColor","_FPDFAnnot_GetFontSize","_FPDFAnnot_GetFormAdditionalActionJavaScript","_FPDFAnnot_GetFormControlCount","_FPDFAnnot_GetFormControlIndex","_FPDFAnnot_GetFormFieldAlternateName","_FPDFAnnot_GetFormFieldAtPoint","_FPDFAnnot_GetFormFieldExportValue","_FPDFAnnot_GetFormFieldFlags","_FPDFAnnot_GetFormFieldName","_FPDFAnnot_GetFormFieldType","_FPDFAnnot_GetFormFieldValue","_FPDFAnnot_GetInkListCount","_FPDFAnnot_GetInkListPath","_FPDFAnnot_GetLine","_FPDFAnnot_GetLink","_FPDFAnnot_GetLinkedAnnot","_FPDFAnnot_GetNumberValue","_FPDFAnnot_GetObject","_FPDFAnnot_GetObjectCount","_FPDFAnnot_GetOptionCount","_FPDFAnnot_GetOptionLabel","_FPDFAnnot_GetRect","_FPDFAnnot_GetStringValue","_FPDFAnnot_GetSubtype","_FPDFAnnot_GetValueType","_FPDFAnnot_GetVertices","_FPDFAnnot_HasAttachmentPoints","_FPDFAnnot_HasKey","_FPDFAnnot_IsChecked","_FPDFAnnot_IsObjectSupportedSubtype","_FPDFAnnot_IsOptionSelected","_FPDFAnnot_IsSupportedSubtype","_FPDFAnnot_RemoveInkList","_FPDFAnnot_RemoveObject","_FPDFAnnot_SetAP","_FPDFAnnot_SetAttachmentPoints","_FPDFAnnot_SetBorder","_FPDFAnnot_SetColor","_FPDFAnnot_SetFlags","_FPDFAnnot_SetFocusableSubtypes","_FPDFAnnot_SetFontColor","_FPDFAnnot_SetFormFieldFlags","_FPDFAnnot_SetRect","_FPDFAnnot_SetStringValue","_FPDFAnnot_SetURI","_FPDFAnnot_UpdateObject","_FPDFAttachment_GetAFRelationship","_FPDFAttachment_GetDescription","_FPDFAttachment_GetFile","_FPDFAttachment_GetName","_FPDFAttachment_GetStringValue","_FPDFAttachment_GetSubtype","_FPDFAttachment_GetValueType","_FPDFAttachment_HasKey","_FPDFAttachment_SetDescription","_FPDFAttachment_SetFile","_FPDFAttachment_SetStringValue","_FPDFAvail_Create","_FPDFAvail_Destroy","_FPDFAvail_GetDocument","_FPDFAvail_GetFirstPageNum","_FPDFAvail_IsDocAvail","_FPDFAvail_IsFormAvail","_FPDFAvail_IsLinearized","_FPDFAvail_IsPageAvail","_FPDFBitmap_Create","_FPDFBitmap_CreateEx","_FPDFBitmap_Destroy","_FPDFBitmap_FillRect","_FPDFBitmap_GetBuffer","_FPDFBitmap_GetFormat","_FPDFBitmap_GetHeight","_FPDFBitmap_GetStride","_FPDFBitmap_GetWidth","_FPDFBookmark_Find","_FPDFBookmark_GetAction","_FPDFBookmark_GetColor","_FPDFBookmark_GetCount","_FPDFBookmark_GetDest","_FPDFBookmark_GetFirstChild","_FPDFBookmark_GetNextSibling","_FPDFBookmark_GetStyle","_FPDFBookmark_GetTitle","_FPDFCatalog_GetLanguage","_FPDFCatalog_IsTagged","_FPDFCatalog_SetLanguage","_FPDFClipPath_CountPaths","_FPDFClipPath_CountPathSegments","_FPDFClipPath_GetPathSegment","_FPDFDest_GetDestPageIndex","_FPDFDest_GetLocationInPage","_FPDFDest_GetView","_FPDFDoc_AddAttachment","_FPDFDoc_CloseJavaScriptAction","_FPDFDoc_DeleteAttachment","_FPDFDOC_ExitFormFillEnvironment","_FPDFDoc_GetAttachment","_FPDFDoc_GetAttachmentCount","_FPDFDoc_GetJavaScriptAction","_FPDFDoc_GetJavaScriptActionCount","_FPDFDoc_GetPageMode","_FPDFDOC_InitFormFillEnvironment","_FPDFFont_Close","_FPDFFont_GetAscent","_FPDFFont_GetBaseFontName","_FPDFFont_GetDescent","_FPDFFont_GetFamilyName","_FPDFFont_GetFlags","_FPDFFont_GetFontData","_FPDFFont_GetGlyphPath","_FPDFFont_GetGlyphWidth","_FPDFFont_GetIsEmbedded","_FPDFFont_GetItalicAngle","_FPDFFont_GetWeight","_FPDFFormObj_CountObjects","_FPDFFormObj_GetObject","_FPDFFormObj_RemoveObject","_FPDFGlyphPath_CountGlyphSegments","_FPDFGlyphPath_GetGlyphPathSegment","_FPDFImageObj_GetBitmap","_FPDFImageObj_GetIccProfileDataDecoded","_FPDFImageObj_GetImageDataDecoded","_FPDFImageObj_GetImageDataRaw","_FPDFImageObj_GetImageFilter","_FPDFImageObj_GetImageFilterCount","_FPDFImageObj_GetImageMetadata","_FPDFImageObj_GetImagePixelSize","_FPDFImageObj_GetRenderedBitmap","_FPDFImageObj_LoadJpegFile","_FPDFImageObj_LoadJpegFileInline","_FPDFImageObj_SetBitmap","_FPDFImageObj_SetMatrix","_FPDFJavaScriptAction_GetName","_FPDFJavaScriptAction_GetScript","_FPDFLink_CloseWebLinks","_FPDFLink_CountQuadPoints","_FPDFLink_CountRects","_FPDFLink_CountWebLinks","_FPDFLink_Enumerate","_FPDFLink_GetAction","_FPDFLink_GetAnnot","_FPDFLink_GetAnnotRect","_FPDFLink_GetDest","_FPDFLink_GetLinkAtPoint","_FPDFLink_GetLinkZOrderAtPoint","_FPDFLink_GetQuadPoints","_FPDFLink_GetRect","_FPDFLink_GetTextRange","_FPDFLink_GetURL","_FPDFLink_LoadWebLinks","_FPDFPage_CloseAnnot","_FPDFPage_CountObjects","_FPDFPage_CreateAnnot","_FPDFPage_Delete","_FPDFPage_Flatten","_FPDFPage_FormFieldZOrderAtPoint","_FPDFPage_GenerateContent","_FPDFPage_GetAnnot","_FPDFPage_GetAnnotCount","_FPDFPage_GetAnnotIndex","_FPDFPage_GetArtBox","_FPDFPage_GetBleedBox","_FPDFPage_GetCropBox","_FPDFPage_GetDecodedThumbnailData","_FPDFPage_GetMediaBox","_FPDFPage_GetObject","_FPDFPage_GetRawThumbnailData","_FPDFPage_GetRotation","_FPDFPage_GetThumbnailAsBitmap","_FPDFPage_GetTrimBox","_FPDFPage_HasFormFieldAtPoint","_FPDFPage_HasTransparency","_FPDFPage_InsertClipPath","_FPDFPage_InsertObject","_FPDFPage_InsertObjectAtIndex","_FPDFPage_New","_FPDFPage_RemoveAnnot","_FPDFPage_RemoveObject","_FPDFPage_SetArtBox","_FPDFPage_SetBleedBox","_FPDFPage_SetCropBox","_FPDFPage_SetMediaBox","_FPDFPage_SetRotation","_FPDFPage_SetTrimBox","_FPDFPage_TransformAnnots","_FPDFPage_TransFormWithClip","_FPDFPageObj_AddExistingMark","_FPDFPageObj_AddMark","_FPDFPageObj_CountMarks","_FPDFPageObj_CreateNewPath","_FPDFPageObj_CreateNewRect","_FPDFPageObj_CreateTextObj","_FPDFPageObj_Destroy","_FPDFPageObj_GetBounds","_FPDFPageObj_GetClipPath","_FPDFPageObj_GetDashArray","_FPDFPageObj_GetDashCount","_FPDFPageObj_GetDashPhase","_FPDFPageObj_GetFillColor","_FPDFPageObj_GetIsActive","_FPDFPageObj_GetLineCap","_FPDFPageObj_GetLineJoin","_FPDFPageObj_GetMark","_FPDFPageObj_GetMarkedContentID","_FPDFPageObj_GetMatrix","_FPDFPageObj_GetRenderedFillPattern","_FPDFPageObj_GetRenderedStrokePattern","_FPDFPageObj_GetRotatedBounds","_FPDFPageObj_GetStrokeColor","_FPDFPageObj_GetStrokeWidth","_FPDFPageObj_GetType","_FPDFPageObj_HasTransparency","_FPDFPageObj_NewImageObj","_FPDFPageObj_NewTextObj","_FPDFPageObj_RemoveMark","_FPDFPageObj_SetBlendMode","_FPDFPageObj_SetDashArray","_FPDFPageObj_SetDashPhase","_FPDFPageObj_SetFillColor","_FPDFPageObj_SetIsActive","_FPDFPageObj_SetLineCap","_FPDFPageObj_SetLineJoin","_FPDFPageObj_SetMatrix","_FPDFPageObj_SetStrokeColor","_FPDFPageObj_SetStrokeWidth","_FPDFPageObj_Transform","_FPDFPageObj_TransformClipPath","_FPDFPageObj_TransformF","_FPDFPageObjMark_CountParams","_FPDFPageObjMark_GetName","_FPDFPageObjMark_GetParamBlobValue","_FPDFPageObjMark_GetParamFloatValue","_FPDFPageObjMark_GetParamIntValue","_FPDFPageObjMark_GetParamKey","_FPDFPageObjMark_GetParamStringValue","_FPDFPageObjMark_GetParamValueType","_FPDFPageObjMark_RemoveParam","_FPDFPageObjMark_SetBlobParam","_FPDFPageObjMark_SetFloatParam","_FPDFPageObjMark_SetIntParam","_FPDFPageObjMark_SetStringParam","_FPDFPath_BezierTo","_FPDFPath_Close","_FPDFPath_CountSegments","_FPDFPath_GetBezierControlPoints","_FPDFPath_GetDrawMode","_FPDFPath_GetPathSegment","_FPDFPath_LineTo","_FPDFPath_MoveTo","_FPDFPath_SetDrawMode","_FPDFPathSegment_GetClose","_FPDFPathSegment_GetPoint","_FPDFPathSegment_GetType","_FPDFSignatureObj_GetByteRange","_FPDFSignatureObj_GetContents","_FPDFSignatureObj_GetDocMDPPermission","_FPDFSignatureObj_GetReason","_FPDFSignatureObj_GetSubFilter","_FPDFSignatureObj_GetTime","_FPDFText_ClosePage","_FPDFText_CountChars","_FPDFText_CountRects","_FPDFText_FindClose","_FPDFText_FindNext","_FPDFText_FindPrev","_FPDFText_FindStart","_FPDFText_GetBoundedText","_FPDFText_GetCharAngle","_FPDFText_GetCharBox","_FPDFText_GetCharIndexAtPos","_FPDFText_GetCharIndexFromTextIndex","_FPDFText_GetCharOrigin","_FPDFText_GetFillColor","_FPDFText_GetFontInfo","_FPDFText_GetFontSize","_FPDFText_GetFontWeight","_FPDFText_GetLooseCharBox","_FPDFText_GetMatrix","_FPDFText_GetRect","_FPDFText_GetSchCount","_FPDFText_GetSchResultIndex","_FPDFText_GetStrokeColor","_FPDFText_GetText","_FPDFText_GetTextIndexFromCharIndex","_FPDFText_GetTextObject","_FPDFText_GetUnicode","_FPDFText_HasUnicodeMapError","_FPDFText_IsGenerated","_FPDFText_IsHyphen","_FPDFText_LoadCidType2Font","_FPDFText_LoadFont","_FPDFText_LoadPage","_FPDFText_LoadStandardFont","_FPDFText_SetCharcodes","_FPDFText_SetPositions","_FPDFText_SetText","_FPDFTextObj_GetFont","_FPDFTextObj_GetFontSize","_FPDFTextObj_GetRenderedBitmap","_FPDFTextObj_GetText","_FPDFTextObj_GetTextRenderMode","_FPDFTextObj_SetFontSize","_FPDFTextObj_SetTextRenderMode","_malloc","_free","_memory","___indirect_function_table","onRuntimeInitialized"].forEach(e=>{Object.getOwnPropertyDescriptor(y,e)||Object.defineProperty(y,e,{get:()=>J("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>J("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})});var w="object"==typeof window,E="u">typeof WorkerGlobalScope,v="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&"renderer"!=process.type,k=!w&&!v&&!E,x=Object.assign({},t),G="./this.program",O="";if(k){if("object"==typeof process&&"function"==typeof A||"object"==typeof window||"u">typeof WorkerGlobalScope)throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)")}else if(w||E){if(E?O=self.location.href:"u">typeof document&&document.currentScript&&(O=document.currentScript.src),e&&(O=e),O=O.startsWith("blob:")?"":O.substr(0,O.replace(/[?#].*/,"").lastIndexOf("/")+1),"object"!=typeof window&&"u"{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),i=e=>(M(!Q(e),"readAsync does not work with file:// URLs"),fetch(e,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+" : "+e.url))))}else throw Error("environment detection error");var I=t.print||console.log.bind(console),N=t.printErr||console.error.bind(console);Object.assign(t,x),x=null,Object.getOwnPropertyDescriptor(t,b="fetchSettings")&&J(`\`Module.${b}\` was supplied but \`${b}\` not included in INCOMING_MODULE_JS_API`),t.arguments&&t.arguments,er("arguments","arguments_"),t.thisProgram&&(G=t.thisProgram),er("thisProgram","thisProgram"),M(void 0===t.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.read,"Module.read option was removed"),M(void 0===t.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),M(void 0===t.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),M(void 0===t.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),M(void 0===t.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),er("asm","wasmExports"),er("readAsync","readAsync"),er("readBinary","readBinary"),er("setWindowTitle","setWindowTitle"),M(!v,"node environment detected but not enabled at build time. Add `node` to `-sENVIRONMENT` to enable."),M(!k,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable.");var C=t.wasmBinary;er("wasmBinary","wasmBinary"),"object"!=typeof WebAssembly&&N("no native wasm support detected");var j=!1;function M(e,t){e||J("Assertion failed"+(t?": "+t:""))}function R(){var e=a.buffer;t.HEAP8=s=new Int8Array(e),t.HEAP16=u=new Int16Array(e),t.HEAPU8=l=new Uint8Array(e),t.HEAPU16=d=new Uint16Array(e),t.HEAP32=c=new Int32Array(e),t.HEAPU32=f=new Uint32Array(e),t.HEAPF32=m=new Float32Array(e),t.HEAPF64=p=new Float64Array(e)}function T(){if(!j){var e=e1();0==e&&(e+=4);var t=f[e>>>2>>>0],n=f[e+4>>>2>>>0];(0x2135467!=t||0x89bacdfe!=n)&&J(`Stack overflow! Stack cookie has been overwritten at ${ec(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ec(n)} ${ec(t)}`),0x63736d65!=f[0]&&J("Runtime error: The application has corrupted its heap memory area (address zero)!")}}M(!t.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),M("u">typeof Int32Array&&"u">typeof Float64Array&&void 0!=Int32Array.prototype.subarray&&void 0!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),M(!t.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),M(!t.INITIAL_MEMORY,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically");var B=[],L=[],$=[],z=!1;M(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var U=0,V=null,W=null,q={};function H(e){for(var t=e;;){if(!q[e])return e;e=t+Math.random()}}function K(e){U++,t.monitorRunDependencies?.(U),e?(M(!q[e]),q[e]=1,null===V&&"u">typeof setInterval&&(V=setInterval(()=>{if(j){clearInterval(V),V=null;return}var e=!1;for(var t in q)e||(e=!0,N("still waiting on run dependencies:")),N(`dependency: ${t}`);e&&N("(end of list)")},1e4))):N("warning: run dependency added without ID")}function Z(e){if(U--,t.monitorRunDependencies?.(U),e?(M(q[e]),delete q[e]):N("warning: run dependency removed without ID"),0==U&&(null!==V&&(clearInterval(V),V=null),W)){var n=W;W=null,n()}}function J(e){t.onAbort?.(e),N(e="Aborted("+e+")"),j=!0;var n=new WebAssembly.RuntimeError(e);throw r(n),n}var Q=e=>e.startsWith("file://");function X(e,t){return(...n)=>{M(z,`native function \`${e}\` called before runtime initialization`);var r=eZ[e];return M(r,`exported native function \`${e}\` not found`),M(n.length<=t,`native function \`${e}\` called with ${n.length} args but expects ${t}`),r(...n)}}function Y(e){if(e==h&&C)return new Uint8Array(C);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function ee(e,t,n){return(!C?i(e).then(e=>new Uint8Array(e),()=>Y(e)):Promise.resolve().then(()=>Y(e))).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{N(`failed to asynchronously prepare wasm: ${e}`),Q(h)&&N(`warning: Loading from a file URI (${h}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),J(e)})}var et=new Int16Array(1),en=new Int8Array(et.buffer);if(et[0]=25459,115!==en[0]||99!==en[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)";if(t.ENVIRONMENT)throw Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");function er(e,n,r=!0){Object.getOwnPropertyDescriptor(t,e)||Object.defineProperty(t,e,{configurable:!0,get(){J(`\`Module.${e}\` has been replaced by \`${n}\``+(r?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function ei(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function eo(e,t){"u">typeof globalThis&&!Object.getOwnPropertyDescriptor(globalThis,e)&&Object.defineProperty(globalThis,e,{configurable:!0,get(){t()}})}function ea(e,t){eo(e,()=>{em(`\`${e}\` is not longer defined by emscripten. ${t}`)})}function es(e){Object.getOwnPropertyDescriptor(t,e)||Object.defineProperty(t,e,{configurable:!0,get(){var t=`'${e}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;ei(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),J(t)}})}ea("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),ea("asm","Please use wasmExports instead");class el{constructor(e){S(this,"name","ExitStatus"),this.message=`Program terminated with exit(${e})`,this.status=e}}var eu=e=>{for(;e.length>0;)e.shift()(t)},ed=t.noExitRuntime||!0,ec=e=>(M("number"==typeof e),"0x"+e.toString(16).padStart(8,"0")),ef=()=>e6(),em=e=>{em.shown||(em.shown={}),em.shown[e]||(em.shown[e]=1,N(e))},ep=(e,t)=>(M(e==e>>>0||e==(0|e)),M(t===(0|t)),t+2097152>>>0<4194305-!!e?(e>>>0)+0x100000000*t:0/0),eh="u">typeof TextDecoder?new TextDecoder:void 0,eF=(e,t=0,n=0/0)=>{for(var r=(t>>>=0)+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&eh)return eh.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&u)}}return o},eg=(e,t)=>(M("number"==typeof e,`UTF8ToString expects a number (got ${typeof e})`),(e>>>=0)?eF(l,e,t):""),e_=()=>{M(void 0!=eC.varargs);var e=c[eC.varargs>>>2>>>0];return eC.varargs+=4,e},eP={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:e=>{var t=eP.isAbs(e),n="/"===e.substr(-1);return(e=eP.normalizeArray(e.split("/").filter(e=>!!e),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=eP.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=eP.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return -1===t?e:e.substr(t+1)},join:(...e)=>eP.normalize(e.join("/")),join2:(e,t)=>eP.normalize(e+"/"+t)},eD=e=>(eD=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);J("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),eb={resolve:(...e)=>{for(var t="",n=!1,r=e.length-1;r>=-1&&!n;r--){var i=r>=0?e[r]:eN.cwd();if("string"!=typeof i)throw TypeError("Arguments to path.resolve must be strings");if(!i)return"";t=i+"/"+t,n=eP.isAbs(i)}return t=eP.normalizeArray(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."},relative:(e,t)=>{function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=eb.resolve(e).substr(1),t=eb.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),o=Math.min(r.length,i.length),a=o,s=0;s{for(var t=0,n=0;n=55296&&r<=57343?(t+=4,++n):t+=3}return t},eE=(e,t,n,r)=>{if(n>>>=0,M("string"==typeof e,`stringToUTF8Array expects a string (got ${typeof e})`),!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(n>=o)break;t[n++>>>0]=s}else if(s<=2047){if(n+1>=o)break;t[n++>>>0]=192|s>>6,t[n++>>>0]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++>>>0]=224|s>>12,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|63&s}else{if(n+3>=o)break;s>1114111&&em("Invalid Unicode code point "+ec(s)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[n++>>>0]=240|s>>18,t[n++>>>0]=128|s>>12&63,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|63&s}}return t[n>>>0]=0,n-i};function eA(e,t,n){var r=Array(n>0?n:ew(e)+1),i=eE(e,r,0,r.length);return t&&(r.length=i),r}var ev={ttys:[],init(){},shutdown(){},register(e,t){ev.ttys[e]={input:[],output:[],ops:t},eN.registerDevice(e,ev.stream_ops)},stream_ops:{open(e){var t=ev.ttys[e.node.rdev];if(!t)throw new eN.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,i){if(!e.tty||!e.tty.ops.get_char)throw new eN.ErrnoError(60);for(var o,a=0,s=0;s(()=>{if(!ey.length){var e=null;if("u">typeof window&&"function"==typeof window.prompt&&null!==(e=window.prompt("Input: "))&&(e+=` -`),!e)return null;ey=eA(e,!0)}return ey.shift()})(),put_char(e,t){null===t||10===t?(I(eF(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(I(eF(e.output)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,n)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(N(eF(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(N(eF(e.output)),e.output=[])}}},eS=(e,t)=>(M(t,"alignment argument is required"),Math.ceil(e/t)*t),ek=e=>{var t,n=eX(65536,e=eS(e,65536));return n&&(t=e,l.fill(0,n,n+t)),n},ex={ops_table:null,mount:e=>ex.createNode(null,"/",16895,0),createNode(e,t,n,r){if(eN.isBlkdev(n)||eN.isFIFO(n))throw new eN.ErrnoError(63);ex.ops_table||(ex.ops_table={dir:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr,lookup:ex.node_ops.lookup,mknod:ex.node_ops.mknod,rename:ex.node_ops.rename,unlink:ex.node_ops.unlink,rmdir:ex.node_ops.rmdir,readdir:ex.node_ops.readdir,symlink:ex.node_ops.symlink},stream:{llseek:ex.stream_ops.llseek}},file:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr},stream:{llseek:ex.stream_ops.llseek,read:ex.stream_ops.read,write:ex.stream_ops.write,allocate:ex.stream_ops.allocate,mmap:ex.stream_ops.mmap,msync:ex.stream_ops.msync}},link:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr,readlink:ex.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr},stream:eN.chrdev_stream_ops}});var i=eN.createNode(e,t,n,r);return eN.isDir(i.mode)?(i.node_ops=ex.ops_table.dir.node,i.stream_ops=ex.ops_table.dir.stream,i.contents={}):eN.isFile(i.mode)?(i.node_ops=ex.ops_table.file.node,i.stream_ops=ex.ops_table.file.stream,i.usedBytes=0,i.contents=null):eN.isLink(i.mode)?(i.node_ops=ex.ops_table.link.node,i.stream_ops=ex.ops_table.link.stream):eN.isChrdev(i.mode)&&(i.node_ops=ex.ops_table.chrdev.node,i.stream_ops=ex.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var n=e.contents?e.contents.length:0;if(!(n>=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var n=e.contents;e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=eN.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,eN.isDir(e.mode)?t.size=4096:eN.isFile(e.mode)?t.size=e.usedBytes:eN.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&ex.resizeFileStorage(e,t.size)},lookup(e,t){throw new eN.ErrnoError(44)},mknod:(e,t,n,r)=>ex.createNode(e,t,n,r),rename(e,t,n){if(eN.isDir(e.mode)){var r;try{r=eN.lookupNode(t,n)}catch{}if(r)for(var i in r.contents)throw new eN.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=n,t.contents[n]=e,t.timestamp=e.parent.timestamp},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var n=eN.lookupNode(e,t);for(var r in n.contents)throw new eN.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var n of Object.keys(e.contents))t.push(n);return t},symlink(e,t,n){var r=ex.createNode(e,t,41471,0);return r.link=n,r},readlink(e){if(!eN.isLink(e.mode))throw new eN.ErrnoError(28);return e.link}},stream_ops:{read(e,t,n,r,i){var o=e.node.contents;if(i>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,r);if(M(a>=0),a>8&&o.subarray)t.set(o.subarray(i,i+a),n);else for(var s=0;s0||n+t>>0))}return{ptr:o,allocated:a}},msync:(e,t,n,r,i)=>(ex.stream_ops.write(e,t,0,r,n,!1),0)}},eG=t.preloadPlugins||[],eO=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},eI={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},eN={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class extends Error{constructor(e){for(var t in super(z?eg(eQ(e)):""),S(this,"name","ErrnoError"),this.errno=e,eI)if(eI[t]===e){this.code=t;break}}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{constructor(){S(this,"shared",{})}get object(){return this.node}set object(e){this.node=e}get isRead(){return(2097155&this.flags)!=1}get isWrite(){return(2097155&this.flags)!=0}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{constructor(e,t,n,r){S(this,"node_ops",{}),S(this,"stream_ops",{}),S(this,"readMode",365),S(this,"writeMode",146),S(this,"mounted",null),e||(e=this),this.parent=e,this.mount=e.mount,this.id=eN.nextInode++,this.name=t,this.mode=n,this.rdev=r}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return eN.isDir(this.mode)}get isDevice(){return eN.isChrdev(this.mode)}},lookupPath(e,t={}){if(!(e=eb.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new eN.ErrnoError(32);for(var n=e.split("/").filter(e=>!!e),r=eN.root,i="/",o=0;o40)throw new eN.ErrnoError(32)}}return{path:i,node:r}},getPath(e){for(var t;;){if(eN.isRoot(e)){var n=e.mount.mountpoint;if(!t)return n;return"/"!==n[n.length-1]?`${n}/${t}`:n+t}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var n=0,r=0;r>>0)%eN.nameTable.length},hashAddNode(e){var t=eN.hashName(e.parent.id,e.name);e.name_next=eN.nameTable[t],eN.nameTable[t]=e},hashRemoveNode(e){var t=eN.hashName(e.parent.id,e.name);if(eN.nameTable[t]===e)eN.nameTable[t]=e.name_next;else for(var n=eN.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode(e,t){var n=eN.mayLookup(e);if(n)throw new eN.ErrnoError(n);for(var r=eN.hashName(e.id,t),i=eN.nameTable[r];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return eN.lookup(e,t)},createNode(e,t,n,r){M("object"==typeof e);var i=new eN.FSNode(e,t,n,r);return eN.hashAddNode(i),i},destroyNode(e){eN.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>(61440&e)==32768,isDir:e=>(61440&e)==16384,isLink:e=>(61440&e)==40960,isChrdev:e=>(61440&e)==8192,isBlkdev:e=>(61440&e)==24576,isFIFO:e=>(61440&e)==4096,isSocket:e=>(49152&e)==49152,flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>eN.ignorePermissions?0:t.includes("r")&&!(292&e.mode)||t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0,mayLookup:e=>eN.isDir(e.mode)?eN.nodePermissions(e,"x")||2*!e.node_ops.lookup:54,mayCreate(e,t){try{return eN.lookupNode(e,t),20}catch(e){}return eN.nodePermissions(e,"wx")},mayDelete(e,t,n){try{r=eN.lookupNode(e,t)}catch(e){return e.errno}var r,i=eN.nodePermissions(e,"wx");if(i)return i;if(n){if(!eN.isDir(r.mode))return 54;if(eN.isRoot(r)||eN.getPath(r)===eN.cwd())return 10}else if(eN.isDir(r.mode))return 31;return 0},mayOpen:(e,t)=>e?eN.isLink(e.mode)?32:eN.isDir(e.mode)&&("r"!==eN.flagsToPermissionString(t)||512&t)?31:eN.nodePermissions(e,eN.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=eN.MAX_OPEN_FDS;e++)if(!eN.streams[e])return e;throw new eN.ErrnoError(33)},getStreamChecked(e){var t=eN.getStream(e);if(!t)throw new eN.ErrnoError(8);return t},getStream:e=>eN.streams[e],createStream:(e,t=-1)=>(M(t>=-1),e=Object.assign(new eN.FSStream,e),-1==t&&(t=eN.nextfd()),e.fd=t,eN.streams[t]=e,e),closeStream(e){eN.streams[e]=null},dupStream(e,t=-1){var n=eN.createStream(e,t);return n.stream_ops?.dup?.(n),n},chrdev_stream_ops:{open(e){var t=eN.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new eN.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){eN.devices[e]={stream_ops:t}},getDevice:e=>eN.devices[e],getMounts(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push(...r.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),eN.syncFSRequests++,eN.syncFSRequests>1&&N(`warning: ${eN.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=eN.getMounts(eN.root.mount),r=0;function i(e){return M(eN.syncFSRequests>0),eN.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++r>=n.length&&i(null)}n.forEach(t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)})},mount(e,t,n){if("string"==typeof e)throw e;var r,i="/"===n,o=!n;if(i&&eN.root)throw new eN.ErrnoError(10);if(!i&&!o){var a=eN.lookupPath(n,{follow_mount:!1});if(n=a.path,r=a.node,eN.isMountpoint(r))throw new eN.ErrnoError(10);if(!eN.isDir(r.mode))throw new eN.ErrnoError(54)}var s={type:e,opts:t,mountpoint:n,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,i?eN.root=l:r&&(r.mounted=s,r.mount&&r.mount.mounts.push(s)),l},unmount(e){var t=eN.lookupPath(e,{follow_mount:!1});if(!eN.isMountpoint(t.node))throw new eN.ErrnoError(28);var n=t.node,r=n.mounted,i=eN.getMounts(r);Object.keys(eN.nameTable).forEach(e=>{for(var t=eN.nameTable[e];t;){var n=t.name_next;i.includes(t.mount)&&eN.destroyNode(t),t=n}}),n.mounted=null;var o=n.mount.mounts.indexOf(r);M(-1!==o),n.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,n){var r=eN.lookupPath(e,{parent:!0}).node,i=eP.basename(e);if(!i||"."===i||".."===i)throw new eN.ErrnoError(28);var o=eN.mayCreate(r,i);if(o)throw new eN.ErrnoError(o);if(!r.node_ops.mknod)throw new eN.ErrnoError(63);return r.node_ops.mknod(r,i,t,n)},create:(e,t)=>(t=(void 0!==t?t:438)&4095|32768,eN.mknod(e,t,0)),mkdir:(e,t)=>(t=(void 0!==t?t:511)&1023|16384,eN.mknod(e,t,0)),mkdirTree(e,t){for(var n=e.split("/"),r="",i=0;i(void 0===n&&(n=t,t=438),t|=8192,eN.mknod(e,t,n)),symlink(e,t){if(!eb.resolve(e))throw new eN.ErrnoError(44);var n=eN.lookupPath(t,{parent:!0}).node;if(!n)throw new eN.ErrnoError(44);var r=eP.basename(t),i=eN.mayCreate(n,r);if(i)throw new eN.ErrnoError(i);if(!n.node_ops.symlink)throw new eN.ErrnoError(63);return n.node_ops.symlink(n,r,e)},rename(e,t){var n,r,i,o=eP.dirname(e),a=eP.dirname(t),s=eP.basename(e),l=eP.basename(t);if(n=eN.lookupPath(e,{parent:!0}).node,r=eN.lookupPath(t,{parent:!0}).node,!n||!r)throw new eN.ErrnoError(44);if(n.mount!==r.mount)throw new eN.ErrnoError(75);var u=eN.lookupNode(n,s),d=eb.relative(e,a);if("."!==d.charAt(0))throw new eN.ErrnoError(28);if("."!==(d=eb.relative(t,o)).charAt(0))throw new eN.ErrnoError(55);try{i=eN.lookupNode(r,l)}catch(e){}if(u!==i){var c=eN.isDir(u.mode),f=eN.mayDelete(n,s,c);if(f||(f=i?eN.mayDelete(r,l,c):eN.mayCreate(r,l)))throw new eN.ErrnoError(f);if(!n.node_ops.rename)throw new eN.ErrnoError(63);if(eN.isMountpoint(u)||i&&eN.isMountpoint(i))throw new eN.ErrnoError(10);if(r!==n&&(f=eN.nodePermissions(n,"w")))throw new eN.ErrnoError(f);eN.hashRemoveNode(u);try{n.node_ops.rename(u,r,l),u.parent=r}catch(e){throw e}finally{eN.hashAddNode(u)}}},rmdir(e){var t=eN.lookupPath(e,{parent:!0}).node,n=eP.basename(e),r=eN.lookupNode(t,n),i=eN.mayDelete(t,n,!0);if(i)throw new eN.ErrnoError(i);if(!t.node_ops.rmdir)throw new eN.ErrnoError(63);if(eN.isMountpoint(r))throw new eN.ErrnoError(10);t.node_ops.rmdir(t,n),eN.destroyNode(r)},readdir(e){var t=eN.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new eN.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=eN.lookupPath(e,{parent:!0}).node;if(!t)throw new eN.ErrnoError(44);var n=eP.basename(e),r=eN.lookupNode(t,n),i=eN.mayDelete(t,n,!1);if(i)throw new eN.ErrnoError(i);if(!t.node_ops.unlink)throw new eN.ErrnoError(63);if(eN.isMountpoint(r))throw new eN.ErrnoError(10);t.node_ops.unlink(t,n),eN.destroyNode(r)},readlink(e){var t=eN.lookupPath(e).node;if(!t)throw new eN.ErrnoError(44);if(!t.node_ops.readlink)throw new eN.ErrnoError(28);return eb.resolve(eN.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var n=eN.lookupPath(e,{follow:!t}).node;if(!n)throw new eN.ErrnoError(44);if(!n.node_ops.getattr)throw new eN.ErrnoError(63);return n.node_ops.getattr(n)},lstat:e=>eN.stat(e,!0),chmod(e,t,n){var r;if(!(r="string"==typeof e?eN.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new eN.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})},lchmod(e,t){eN.chmod(e,t,!0)},fchmod(e,t){var n=eN.getStreamChecked(e);eN.chmod(n.node,t)},chown(e,t,n,r){var i;if(!(i="string"==typeof e?eN.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new eN.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,n){eN.chown(e,t,n,!0)},fchown(e,t,n){var r=eN.getStreamChecked(e);eN.chown(r.node,t,n)},truncate(e,t){if(t<0)throw new eN.ErrnoError(28);if("string"==typeof e){var n;n=eN.lookupPath(e,{follow:!0}).node}else n=e;if(!n.node_ops.setattr)throw new eN.ErrnoError(63);if(eN.isDir(n.mode))throw new eN.ErrnoError(31);if(!eN.isFile(n.mode))throw new eN.ErrnoError(28);var r=eN.nodePermissions(n,"w");if(r)throw new eN.ErrnoError(r);n.node_ops.setattr(n,{size:t,timestamp:Date.now()})},ftruncate(e,t){var n=eN.getStreamChecked(e);if((2097155&n.flags)==0)throw new eN.ErrnoError(28);eN.truncate(n.node,t)},utime(e,t,n){var r=eN.lookupPath(e,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(t,n)})},open(e,n,r){if(""===e)throw new eN.ErrnoError(44);if(r=64&(n="string"==typeof n?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw Error(`Unknown file open mode: ${e}`);return t})(n):n)?4095&(r=void 0===r?438:r)|32768:0,"object"==typeof e)i=e;else{e=eP.normalize(e);try{var i;i=eN.lookupPath(e,{follow:!(131072&n)}).node}catch(e){}}var o=!1;if(64&n)if(i){if(128&n)throw new eN.ErrnoError(20)}else i=eN.mknod(e,r,0),o=!0;if(!i)throw new eN.ErrnoError(44);if(eN.isChrdev(i.mode)&&(n&=-513),65536&n&&!eN.isDir(i.mode))throw new eN.ErrnoError(54);if(!o){var a=eN.mayOpen(i,n);if(a)throw new eN.ErrnoError(a)}512&n&&!o&&eN.truncate(i,0),n&=-131713;var s=eN.createStream({node:i,path:eN.getPath(i),flags:n,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!t.logReadFiles||1&n||e in eN.readFiles||(eN.readFiles[e]=1),s},close(e){if(eN.isClosed(e))throw new eN.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{eN.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,n){if(eN.isClosed(e))throw new eN.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new eN.ErrnoError(70);if(0!=n&&1!=n&&2!=n)throw new eN.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,n),e.ungotten=[],e.position},read(e,t,n,r,i){if(M(n>=0),r<0||i<0)throw new eN.ErrnoError(28);if(eN.isClosed(e)||(2097155&e.flags)==1)throw new eN.ErrnoError(8);if(eN.isDir(e.node.mode))throw new eN.ErrnoError(31);if(!e.stream_ops.read)throw new eN.ErrnoError(28);var o=void 0!==i;if(o){if(!e.seekable)throw new eN.ErrnoError(70)}else i=e.position;var a=e.stream_ops.read(e,t,n,r,i);return o||(e.position+=a),a},write(e,t,n,r,i,o){if(M(n>=0),r<0||i<0)throw new eN.ErrnoError(28);if(eN.isClosed(e)||(2097155&e.flags)==0)throw new eN.ErrnoError(8);if(eN.isDir(e.node.mode))throw new eN.ErrnoError(31);if(!e.stream_ops.write)throw new eN.ErrnoError(28);e.seekable&&1024&e.flags&&eN.llseek(e,0,2);var a=void 0!==i;if(a){if(!e.seekable)throw new eN.ErrnoError(70)}else i=e.position;var s=e.stream_ops.write(e,t,n,r,i,o);return a||(e.position+=s),s},allocate(e,t,n){if(eN.isClosed(e))throw new eN.ErrnoError(8);if(t<0||n<=0)throw new eN.ErrnoError(28);if((2097155&e.flags)==0)throw new eN.ErrnoError(8);if(!eN.isFile(e.node.mode)&&!eN.isDir(e.node.mode))throw new eN.ErrnoError(43);if(!e.stream_ops.allocate)throw new eN.ErrnoError(138);e.stream_ops.allocate(e,t,n)},mmap(e,t,n,r,i){if((2&r)!=0&&(2&i)==0&&(2097155&e.flags)!=2||(2097155&e.flags)==1)throw new eN.ErrnoError(2);if(!e.stream_ops.mmap)throw new eN.ErrnoError(43);if(!t)throw new eN.ErrnoError(28);return e.stream_ops.mmap(e,t,n,r,i)},msync:(e,t,n,r,i)=>(M(n>=0),e.stream_ops.msync)?e.stream_ops.msync(e,t,n,r,i):0,ioctl(e,t,n){if(!e.stream_ops.ioctl)throw new eN.ErrnoError(59);return e.stream_ops.ioctl(e,t,n)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw Error(`Invalid encoding type "${t.encoding}"`);var n,r=eN.open(e,t.flags),i=eN.stat(e).size,o=new Uint8Array(i);return eN.read(r,o,0,i,0),"utf8"===t.encoding?n=eF(o):"binary"===t.encoding&&(n=o),eN.close(r),n},writeFile(e,t,n={}){n.flags=n.flags||577;var r=eN.open(e,n.flags,n.mode);if("string"==typeof t){var i=new Uint8Array(ew(t)+1),o=eE(t,i,0,i.length);eN.write(r,i,0,o,void 0,n.canOwn)}else if(ArrayBuffer.isView(t))eN.write(r,t,0,t.byteLength,void 0,n.canOwn);else throw Error("Unsupported data type");eN.close(r)},cwd:()=>eN.currentPath,chdir(e){var t=eN.lookupPath(e,{follow:!0});if(null===t.node)throw new eN.ErrnoError(44);if(!eN.isDir(t.node.mode))throw new eN.ErrnoError(54);var n=eN.nodePermissions(t.node,"x");if(n)throw new eN.ErrnoError(n);eN.currentPath=t.path},createDefaultDirectories(){eN.mkdir("/tmp"),eN.mkdir("/home"),eN.mkdir("/home/web_user")},createDefaultDevices(){eN.mkdir("/dev"),eN.registerDevice(eN.makedev(1,3),{read:()=>0,write:(e,t,n,r,i)=>r,llseek:()=>0}),eN.mkdev("/dev/null",eN.makedev(1,3)),ev.register(eN.makedev(5,0),ev.default_tty_ops),ev.register(eN.makedev(6,0),ev.default_tty1_ops),eN.mkdev("/dev/tty",eN.makedev(5,0)),eN.mkdev("/dev/tty1",eN.makedev(6,0));var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=eD(e).byteLength),e[--t]);eN.createDevice("/dev","random",n),eN.createDevice("/dev","urandom",n),eN.mkdir("/dev/shm"),eN.mkdir("/dev/shm/tmp")},createSpecialDirectories(){eN.mkdir("/proc");var e=eN.mkdir("/proc/self");eN.mkdir("/proc/self/fd"),eN.mount({mount(){var t=eN.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var n=eN.getStreamChecked(+t),r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams(e,t,n){e?eN.createDevice("/dev","stdin",e):eN.symlink("/dev/tty","/dev/stdin"),t?eN.createDevice("/dev","stdout",null,t):eN.symlink("/dev/tty","/dev/stdout"),n?eN.createDevice("/dev","stderr",null,n):eN.symlink("/dev/tty1","/dev/stderr");var r=eN.open("/dev/stdin",0),i=eN.open("/dev/stdout",1),o=eN.open("/dev/stderr",1);M(0===r.fd,`invalid handle for stdin (${r.fd})`),M(1===i.fd,`invalid handle for stdout (${i.fd})`),M(2===o.fd,`invalid handle for stderr (${o.fd})`)},staticInit(){eN.nameTable=Array(4096),eN.mount(ex,{},"/"),eN.createDefaultDirectories(),eN.createDefaultDevices(),eN.createSpecialDirectories(),eN.filesystems={MEMFS:ex}},init(e,n,r){M(!eN.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),eN.initialized=!0,e??(e=t.stdin),n??(n=t.stdout),r??(r=t.stderr),eN.createStandardStreams(e,n,r)},quit(){eN.initialized=!1,eJ(0);for(var e=0;etypeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{e.contents=o(e.url),e.usedBytes=e.contents.length}catch(e){throw new eN.ErrnoError(29)}},createLazyFile(e,t,n,r,i){if("u">typeof XMLHttpRequest){if(!E)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o={isDevice:!1,contents:new class{constructor(){S(this,"lengthKnown",!1),S(this,"chunks",[])}get(e){if(!(e>this.length-1)&&!(e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}}setDataGetter(e){this.getter=e}cacheLength(){var e,t=new XMLHttpRequest;if(t.open("HEAD",n,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw Error("Couldn't load "+n+". Status: "+t.status);var r=Number(t.getResponseHeader("Content-length")),i=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,o=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;i||(a=r);var s=this;s.setDataGetter(e=>{var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw Error("Couldn't load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):eA(i.responseText||"",!0)})(t,i)),void 0===s.chunks[e])throw Error("doXHR failed!");return s.chunks[e]}),(o||!r)&&(a=r=1,a=r=this.getter(0).length,I("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}}}else var o={isDevice:!1,url:n};var a=eN.createFile(e,t,o,r,i);o.contents?a.contents=o.contents:o.url&&(a.contents=null,a.url=o.url),Object.defineProperties(a,{usedBytes:{get:function(){return this.contents.length}}});var l={};function u(e,t,n,r,i){var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,r);if(M(a>=0),o.slice)for(var s=0;s{var t=a.stream_ops[e];l[e]=(...e)=>(eN.forceLoadFile(a),t(...e))}),l.read=(e,t,n,r,i)=>(eN.forceLoadFile(a),u(e,t,n,r,i)),l.mmap=(e,t,n,r,i)=>{eN.forceLoadFile(a);var o=ek(t);if(!o)throw new eN.ErrnoError(48);return u(e,s,o,t,n),{ptr:o,allocated:!0}},a.stream_ops=l,a},absolutePath(){J("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){J("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){J("FS.createLink has been removed; use FS.symlink instead")},joinPath(){J("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){J("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){J("FS.standardizePath has been removed; use PATH.normalize instead")}},eC={DEFAULT_POLLMASK:5,calculateAt(e,t,n){if(eP.isAbs(t))return t;if(-100===e)r=eN.cwd();else{var r;r=eC.getStreamFromFD(e).path}if(0==t.length){if(!n)throw new eN.ErrnoError(44);return r}return eP.join2(r,t)},doStat(e,t,n){var r=e(t);c[n>>>2>>>0]=r.dev,c[n+4>>>2>>>0]=r.mode,f[n+8>>>2>>>0]=r.nlink,c[n+12>>>2>>>0]=r.uid,c[n+16>>>2>>>0]=r.gid,c[n+20>>>2>>>0]=r.rdev,g=[r.size>>>0,+Math.abs(F=r.size)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+24>>>2>>>0]=g[0],c[n+28>>>2>>>0]=g[1],c[n+32>>>2>>>0]=4096,c[n+36>>>2>>>0]=r.blocks;var i=r.atime.getTime(),o=r.mtime.getTime(),a=r.ctime.getTime();return g=[Math.floor(i/1e3)>>>0,+Math.abs(F=Math.floor(i/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+40>>>2>>>0]=g[0],c[n+44>>>2>>>0]=g[1],f[n+48>>>2>>>0]=i%1e3*1e6,g=[Math.floor(o/1e3)>>>0,+Math.abs(F=Math.floor(o/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+56>>>2>>>0]=g[0],c[n+60>>>2>>>0]=g[1],f[n+64>>>2>>>0]=o%1e3*1e6,g=[Math.floor(a/1e3)>>>0,+Math.abs(F=Math.floor(a/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+72>>>2>>>0]=g[0],c[n+76>>>2>>>0]=g[1],f[n+80>>>2>>>0]=a%1e3*1e6,g=[r.ino>>>0,+Math.abs(F=r.ino)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+88>>>2>>>0]=g[0],c[n+92>>>2>>>0]=g[1],0},doMsync(e,t,n,r,i){if(!eN.isFile(t.node.mode))throw new eN.ErrnoError(43);if(2&r)return 0;var o=l.slice(e,e+n);eN.msync(t,o,i,n,r)},getStreamFromFD:e=>eN.getStreamChecked(e),varargs:void 0,getStr:e=>eg(e)},ej=(e,t,n)=>(M("number"==typeof n,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),eE(e,l,t,n)),eM=[0,31,60,91,121,152,182,213,244,274,305,335],eR=[0,31,59,90,120,151,181,212,243,273,304,334],eT=e=>{var t=a.buffer,n=(e-t.byteLength+65535)/65536|0;try{return a.grow(n),R(),1}catch(n){N(`growMemory: Attempted to grow heap from ${t.byteLength} bytes to ${e} bytes, but got error: ${n}`)}},eB={},eL=()=>{if(!eL.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:G||"./this.program"};for(var t in eB)void 0===eB[t]?delete e[t]:e[t]=eB[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);eL.strings=n}return eL.strings},e$=[],ez=e=>{var t=e$[e];return t||(e>=e$.length&&(e$.length=e+1),e$[e]=t=_.get(e)),M(_.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t},eU="u">typeof TextDecoder?new TextDecoder("utf-16le"):void 0,eV=(e,t)=>{M(e<16384),e<128?t.push(e):t.push(e%128|128,e>>7)},eW=[],eq=(e,t)=>{_.set(e,t),e$[e]=_.get(e)},eH=(e,n,r,i,o)=>{var a,l,u={string:e=>{var t,n,r=0;return null!=e&&0!==e&&(t=ew(e)+1,ej(e,n=e2(t),t),r=n),r},array:e=>{let t;var n=(t=e.length,e2(t));return M(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),s.set(e,n>>>0),n}},d=(M(a=t["_"+e],"Cannot call unknown function "+e+", make sure it is exported"),a),c=[],f=0;if(M("array"!==n,'Return type should not be "array".'),i)for(var m=0;m{var c,f=t?eb.resolve(eP.join2(e,t)):e,m=H(`cp ${f}`);function p(n){var i,c;function p(n){d?.(),l||eN.createDataFile(e,t,n,r,o,u),a?.(),Z(m)}i=()=>{s?.(),Z(m)},"u">typeof Browser&&Browser.init(),c=!1,eG.forEach(e=>{!c&&e.canHandle(f)&&(e.handle(n,f,p,i),c=!0)}),c||p(n)}(K(m),"string"==typeof n)?(c=H(`al ${n}`),i(n).then(e=>{M(e,`Loading data file "${n}" failed (no arrayBuffer).`),p(new Uint8Array(e)),c&&Z(c)},e=>{if(s)s();else throw`Loading data file "${n}" failed.`}),c&&K(c)):p(n)},eN.staticInit();var eK={__assert_fail:function(e,t,n,r){e>>>=0,t>>>=0,r>>>=0,J(`Assertion failed: ${eg(e)}, at: `+[t?eg(t):"unknown filename",n,r?eg(r):"unknown function"])},__syscall_fcntl64:function(e,t,n){eC.varargs=n>>>=0;try{var r=eC.getStreamFromFD(e);switch(t){case 0:var i=e_();if(i<0)break;for(;eN.streams[i];)i++;return eN.dupStream(r,i).fd;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:var i=e_();return r.flags|=i,0;case 12:var i=e_();return u[i+0>>>1>>>0]=2,0}return -28}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fstat64:function(e,t){t>>>=0;try{var n=eC.getStreamFromFD(e);return eC.doStat(eN.stat,n.path,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ftruncate64:function(e,t,n){var r=ep(t,n);try{if(isNaN(r))return 61;return eN.ftruncate(e,r),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_getdents64:function(e,t,n){t>>>=0,n>>>=0;try{var r=eC.getStreamFromFD(e);r.getdents||(r.getdents=eN.readdir(r.path));for(var i=0,o=eN.llseek(r,0,1),a=Math.floor(o/280);a>>0,(F=l,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[t+i>>>2>>>0]=g[0],c[t+i+4>>>2>>>0]=g[1],g=[(a+1)*280>>>0,(F=(a+1)*280,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[t+i+8>>>2>>>0]=g[0],c[t+i+12>>>2>>>0]=g[1],u[t+i+16>>>1>>>0]=280,s[t+i+18>>>0]=d,ej(f,t+i+19,256),i+=280,a+=1}return eN.llseek(r,280*a,0),i}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ioctl:function(e,t,n){eC.varargs=n>>>=0;try{var r=eC.getStreamFromFD(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:if(!r.tty)return -59;return 0;case 21505:if(!r.tty)return -59;if(r.tty.ops.ioctl_tcgets){var i=r.tty.ops.ioctl_tcgets(r),o=e_();c[o>>>2>>>0]=i.c_iflag||0,c[o+4>>>2>>>0]=i.c_oflag||0,c[o+8>>>2>>>0]=i.c_cflag||0,c[o+12>>>2>>>0]=i.c_lflag||0;for(var a=0;a<32;a++)s[o+a+17>>>0]=i.c_cc[a]||0}return 0;case 21506:case 21507:case 21508:if(!r.tty)return -59;if(r.tty.ops.ioctl_tcsets){for(var o=e_(),l=c[o>>>2>>>0],d=c[o+4>>>2>>>0],f=c[o+8>>>2>>>0],m=c[o+12>>>2>>>0],p=[],a=0;a<32;a++)p.push(s[o+a+17>>>0]);return r.tty.ops.ioctl_tcsets(r.tty,t,{c_iflag:l,c_oflag:d,c_cflag:f,c_lflag:m,c_cc:p})}return 0;case 21519:if(!r.tty)return -59;var o=e_();return c[o>>>2>>>0]=0,0;case 21520:if(!r.tty)return -59;return -28;case 21531:var o=e_();return eN.ioctl(r,t,o);case 21523:if(!r.tty)return -59;if(r.tty.ops.ioctl_tiocgwinsz){var h=r.tty.ops.ioctl_tiocgwinsz(r.tty),o=e_();u[o>>>1>>>0]=h[0],u[o+2>>>1>>>0]=h[1]}return 0;default:return -28}}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_lstat64:function(e,t){e>>>=0,t>>>=0;try{return e=eC.getStr(e),eC.doStat(eN.lstat,e,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_newfstatat:function(e,t,n,r){t>>>=0,n>>>=0;try{t=eC.getStr(t);var i=256&r,o=4096&r;return r&=-6401,M(!r,`unknown flags in __syscall_newfstatat: ${r}`),t=eC.calculateAt(e,t,o),eC.doStat(i?eN.lstat:eN.stat,t,n)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,t,n,r){t>>>=0,eC.varargs=r>>>=0;try{t=eC.getStr(t),t=eC.calculateAt(e,t);var i=r?e_():0;return eN.open(t,n,i).fd}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_rmdir:function(e){e>>>=0;try{return e=eC.getStr(e),eN.rmdir(e),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_stat64:function(e,t){e>>>=0,t>>>=0;try{return e=eC.getStr(e),eC.doStat(eN.stat,e,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_unlinkat:function(e,t,n){t>>>=0;try{return t=eC.getStr(t),t=eC.calculateAt(e,t),0===n?eN.unlink(t):512===n?eN.rmdir(t):J("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_abort_js:()=>{J("native code called abort()")},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:function(e,t,n){return e>>>=0,t>>>=0,n>>>=0,l.copyWithin(e>>>0,t>>>0,t+n>>>0)},_emscripten_throw_longjmp:()=>{throw 1/0},_gmtime_js:function(e,t,n){var r=ep(e,t);n>>>=0;var i=new Date(1e3*r);c[n>>>2>>>0]=i.getUTCSeconds(),c[n+4>>>2>>>0]=i.getUTCMinutes(),c[n+8>>>2>>>0]=i.getUTCHours(),c[n+12>>>2>>>0]=i.getUTCDate(),c[n+16>>>2>>>0]=i.getUTCMonth(),c[n+20>>>2>>>0]=i.getUTCFullYear()-1900,c[n+24>>>2>>>0]=i.getUTCDay();var o=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),a=(i.getTime()-o)/864e5|0;c[n+28>>>2>>>0]=a},_localtime_js:function(e,t,n){let r;var i=ep(e,t);n>>>=0;var o=new Date(1e3*i);c[n>>>2>>>0]=o.getSeconds(),c[n+4>>>2>>>0]=o.getMinutes(),c[n+8>>>2>>>0]=o.getHours(),c[n+12>>>2>>>0]=o.getDate(),c[n+16>>>2>>>0]=o.getMonth(),c[n+20>>>2>>>0]=o.getFullYear()-1900,c[n+24>>>2>>>0]=o.getDay();var a=0|((r=o.getFullYear())%4==0&&(r%100!=0||r%400==0)?eM:eR)[o.getMonth()]+o.getDate()-1;c[n+28>>>2>>>0]=a,c[n+36>>>2>>>0]=-(60*o.getTimezoneOffset());var s=new Date(o.getFullYear(),0,1),l=new Date(o.getFullYear(),6,1).getTimezoneOffset(),u=s.getTimezoneOffset(),d=0|(l!=u&&o.getTimezoneOffset()==Math.min(u,l));c[n+32>>>2>>>0]=d},_mmap_js:function(e,t,n,r,i,o,a,s){e>>>=0;var l=ep(i,o);a>>>=0,s>>>=0;try{if(isNaN(l))return 61;var u=eC.getStreamFromFD(r),d=eN.mmap(u,e,l,t,n),m=d.ptr;return c[a>>>2>>>0]=d.allocated,f[s>>>2>>>0]=m,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_munmap_js:function(e,t,n,r,i,o,a){e>>>=0,t>>>=0;var s=ep(o,a);try{var l=eC.getStreamFromFD(i);2&n&&eC.doMsync(e,l,t,r,s)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_tzset_js:function(e,t,n,r){e>>>=0,t>>>=0,n>>>=0,r>>>=0;var i=(new Date).getFullYear(),o=new Date(i,0,1),a=new Date(i,6,1),s=o.getTimezoneOffset(),l=a.getTimezoneOffset(),u=Math.max(s,l);f[e>>>2>>>0]=60*u,c[t>>>2>>>0]=Number(s!=l);var d=e=>{var t=Math.abs(e),n=String(Math.floor(t/60)).padStart(2,"0"),r=String(t%60).padStart(2,"0");return`UTC${e>=0?"-":"+"}${n}${r}`},m=d(s),p=d(l);M(m),M(p),M(16>=ew(m),`timezone name truncated to fit in TZNAME_MAX (${m})`),M(16>=ew(p),`timezone name truncated to fit in TZNAME_MAX (${p})`),lDate.now(),emscripten_err:function(e){return e>>>=0,N(eg(e))},emscripten_get_now:()=>performance.now(),emscripten_resize_heap:function(e){e>>>=0;var t=l.length;M(e>t);if(e>0xffff0000)return N(`Cannot enlarge memory, requested ${e} bytes, but the limit is 4294901760 bytes!`),!1;for(var n=1;n<=4;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+0x6000000);var i=Math.min(0xffff0000,eS(Math.max(e,r),65536));if(eT(i))return!0}return N(`Failed to grow the heap from ${t} bytes to ${i} bytes, not enough memory!`),!1},environ_get:function(e,t){e>>>=0,t>>>=0;var n=0;return eL().forEach((r,i)=>{var o=t+n;f[e+4*i>>>2>>>0]=o;for(var a=o,l=0;l>>0]=r.charCodeAt(l);s[a>>>0]=0,n+=r.length+1}),0},environ_sizes_get:function(e,t){e>>>=0,t>>>=0;var n=eL();f[e>>>2>>>0]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),f[t>>>2>>>0]=r,0},exit:(e,n)=>{if(function(){var e=I,t=N,n=!1;I=N=e=>{n=!0};try{eJ(0),["stdout","stderr"].forEach(e=>{var t=eN.analyzePath("/dev/"+e);if(t){var r=t.object.rdev,i=ev.ttys[r];i?.output?.length&&(n=!0)}})}catch{}I=e,N=t,n&&em("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}(),(ed||0)&&!n){var i=`program exited (with status: ${e}), but keepRuntimeAlive() is set (counter=0) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;r(i),N(i)}throw ed||(t.onExit?.(e),j=!0),new el(e)},fd_close:function(e){try{var t=eC.getStreamFromFD(e);return eN.close(t),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,t,n,r){t>>>=0,n>>>=0,r>>>=0;try{var i=eC.getStreamFromFD(e),o=((e,t,n,r)=>{for(var i=0,o=0;o>>2>>>0],l=f[t+4>>>2>>>0];t+=8;var u=eN.read(e,s,a,l,r);if(u<0)return -1;if(i+=u,u>>2>>>0]=o,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,t,n,r,i){var o=ep(t,n);i>>>=0;try{if(isNaN(o))return 61;var a=eC.getStreamFromFD(e);return eN.llseek(a,o,r),g=[a.position>>>0,(F=a.position,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[i>>>2>>>0]=g[0],c[i+4>>>2>>>0]=g[1],a.getdents&&0===o&&0===r&&(a.getdents=null),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_sync:function(e){try{var t=eC.getStreamFromFD(e);if(t.stream_ops?.fsync)return t.stream_ops.fsync(t);return 0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_write:function(e,t,n,r){t>>>=0,n>>>=0,r>>>=0;try{var i=eC.getStreamFromFD(e),o=((e,t,n,r)=>{for(var i=0,o=0;o>>2>>>0],l=f[t+4>>>2>>>0];t+=8;var u=eN.write(e,s,a,l,r);if(u<0)return -1;if(i+=u,u>>2>>>0]=o,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},invoke_ii:function(e,t){var n=ef();try{return ez(e)(t)}catch(e){if(e3(n),e!==e+0)throw e;eY(1,0)}},invoke_iii:function(e,t,n){var r=ef();try{return ez(e)(t,n)}catch(e){if(e3(r),e!==e+0)throw e;eY(1,0)}},invoke_iiii:function(e,t,n,r){var i=ef();try{return ez(e)(t,n,r)}catch(e){if(e3(i),e!==e+0)throw e;eY(1,0)}},invoke_iiiii:function(e,t,n,r,i){var o=ef();try{return ez(e)(t,n,r,i)}catch(e){if(e3(o),e!==e+0)throw e;eY(1,0)}},invoke_iiiiii:function(e,t,n,r,i,o){var a=ef();try{return ez(e)(t,n,r,i,o)}catch(e){if(e3(a),e!==e+0)throw e;eY(1,0)}},invoke_iiiiiii:function(e,t,n,r,i,o,a){var s=ef();try{return ez(e)(t,n,r,i,o,a)}catch(e){if(e3(s),e!==e+0)throw e;eY(1,0)}},invoke_v:function(e){var t=ef();try{ez(e)()}catch(e){if(e3(t),e!==e+0)throw e;eY(1,0)}},invoke_vi:function(e,t){var n=ef();try{ez(e)(t)}catch(e){if(e3(n),e!==e+0)throw e;eY(1,0)}},invoke_vii:function(e,t,n){var r=ef();try{ez(e)(t,n)}catch(e){if(e3(r),e!==e+0)throw e;eY(1,0)}},invoke_viii:function(e,t,n,r){var i=ef();try{ez(e)(t,n,r)}catch(e){if(e3(i),e!==e+0)throw e;eY(1,0)}},invoke_viiii:function(e,t,n,r,i){var o=ef();try{ez(e)(t,n,r,i)}catch(e){if(e3(o),e!==e+0)throw e;eY(1,0)}},invoke_viiiiiiiii:function(e,t,n,r,i,o,a,s,l,u){var d=ef();try{ez(e)(t,n,r,i,o,a,s,l,u)}catch(e){if(e3(d),e!==e+0)throw e;eY(1,0)}},random_get:function(e,t){e>>>=0,t>>>=0;try{return eD(l.subarray(e>>>0,e+t>>>0)),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}}},eZ=function(){function e(e,n){var r,i,o,s;let l,u;return i=Object.assign({},i=eZ=e.exports),o=e=>t=>e(t)>>>0,s=e=>()=>e()>>>0,i.strerror=(l=i.strerror,e=>l(e)>>>0),i.emscripten_builtin_memalign=(u=i.emscripten_builtin_memalign,(e,t)=>u(e,t)>>>0),i.malloc=o(i.malloc),i.emscripten_stack_get_base=s(i.emscripten_stack_get_base),i.emscripten_stack_get_end=s(i.emscripten_stack_get_end),i._emscripten_stack_alloc=o(i._emscripten_stack_alloc),i.emscripten_stack_get_current=s(i.emscripten_stack_get_current),t.wasmExports=eZ=i,M(a=eZ.memory,"memory not found in wasm exports"),R(),M(_=eZ.__indirect_function_table,"table not found in wasm exports"),r=eZ.__wasm_call_ctors,L.unshift(r),Z("wasm-instantiate"),eZ}K("wasm-instantiate");var n,i,o=t,s={env:eK,wasi_snapshot_preview1:eK};if(t.instantiateWasm)try{return t.instantiateWasm(s,e)}catch(e){N(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}return h??(h=function(){if(t.locateFile){var e="embedpdf.wasm";return e.startsWith("data:application/octet-stream;base64,")?e:t.locateFile?t.locateFile(e,O):O+e}return new URL("embedpdf.wasm",self.location.href).href}()),(n=h,i=function(n){M(t===o,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),o=null,e(n.instance)},!C&&"function"==typeof WebAssembly.instantiateStreaming&&!n.startsWith("data:application/octet-stream;base64,")&&"function"==typeof fetch?fetch(n,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,s).then(i,function(e){return N(`wasm streaming compile failed: ${e}`),N("falling back to ArrayBuffer instantiation"),ee(n,s,i)})):ee(n,s,i)).catch(r),{}}();X("__wasm_call_ctors",0),t._EPDFAction_CloseModel=X("EPDFAction_CloseModel",1),t._EPDFAction_LoadModel=X("EPDFAction_LoadModel",1),t._EPDFAction_GetRootNode=X("EPDFAction_GetRootNode",1),t._EPDFAction_GetNodeCount=X("EPDFAction_GetNodeCount",1),t._EPDFAction_GetNodeType=X("EPDFAction_GetNodeType",2),t._EPDFAction_GetNodeSubtype=X("EPDFAction_GetNodeSubtype",4),t._EPDFAction_NodeHasJavaScript=X("EPDFAction_NodeHasJavaScript",2),t._EPDFAction_GetNodeJavaScript=X("EPDFAction_GetNodeJavaScript",4),t._EPDFAction_GetNodeDest=X("EPDFAction_GetNodeDest",3),t._EPDFAction_GetNodeURI=X("EPDFAction_GetNodeURI",5),t._EPDFAction_GetNodeFilePath=X("EPDFAction_GetNodeFilePath",4),t._EPDFAction_GetNodeName=X("EPDFAction_GetNodeName",4),t._EPDFAction_GetNodeTargetCount=X("EPDFAction_GetNodeTargetCount",2),t._EPDFAction_GetNodeTargetName=X("EPDFAction_GetNodeTargetName",5),t._EPDFAction_GetNodeTargetObjectNumber=X("EPDFAction_GetNodeTargetObjectNumber",4),t._EPDFAction_GetNodeHideFlag=X("EPDFAction_GetNodeHideFlag",3),t._EPDFAction_GetNodeResetForm=X("EPDFAction_GetNodeResetForm",4),t._EPDFAction_GetNodeSubmitForm=X("EPDFAction_GetNodeSubmitForm",4),t._EPDFAction_GetNodeSubmitFormURL=X("EPDFAction_GetNodeSubmitFormURL",4),t._EPDFAction_GetNodeSubmitFormCharSet=X("EPDFAction_GetNodeSubmitFormCharSet",4),t._EPDFAction_GetNodeURIIsMap=X("EPDFAction_GetNodeURIIsMap",3),t._EPDFAction_GetNextCount=X("EPDFAction_GetNextCount",2),t._EPDFAction_GetNextAt=X("EPDFAction_GetNextAt",3),t._EPDFAction_GetWarningFlags=X("EPDFAction_GetWarningFlags",1),t._EPDFAction_IsComplete=X("EPDFAction_IsComplete",1),t._EPDFDoc_GetOpenActionModel=X("EPDFDoc_GetOpenActionModel",1),t._EPDFDoc_GetOpenActionDest=X("EPDFDoc_GetOpenActionDest",1),t._EPDFDoc_GetAdditionalActionModel=X("EPDFDoc_GetAdditionalActionModel",2),t._EPDFDoc_GetPageActionModel=X("EPDFDoc_GetPageActionModel",3),t._EPDFAnnot_GetActionModel=X("EPDFAnnot_GetActionModel",2),t._EPDFAction_CreateJavaScript=X("EPDFAction_CreateJavaScript",2),t._EPDFAction_CreateHide=X("EPDFAction_CreateHide",4),t._EPDFAction_CreateResetForm=X("EPDFAction_CreateResetForm",4),t._EPDFAction_CreateSubmitForm=X("EPDFAction_CreateSubmitForm",5),t._EPDFAction_SetNext=X("EPDFAction_SetNext",4),t._EPDFAnnot_SetEventAction=X("EPDFAnnot_SetEventAction",3),t._EPDFAnnot_SetNumberValue=X("EPDFAnnot_SetNumberValue",3),t._EPDFAnnot_HasEmbedMetadata=X("EPDFAnnot_HasEmbedMetadata",1),t._EPDFAnnot_ClearEmbedMetadata=X("EPDFAnnot_ClearEmbedMetadata",1),t._EPDFAnnot_ClearEmbedMetadataKey=X("EPDFAnnot_ClearEmbedMetadataKey",2),t._EPDFAnnot_SetEmbedMetadataString=X("EPDFAnnot_SetEmbedMetadataString",3),t._EPDFAnnot_GetEmbedMetadataString=X("EPDFAnnot_GetEmbedMetadataString",4),t._EPDFAnnot_SetEmbedMetadataNumber=X("EPDFAnnot_SetEmbedMetadataNumber",3),t._EPDFAnnot_GetEmbedMetadataNumber=X("EPDFAnnot_GetEmbedMetadataNumber",3),t._EPDFAnnot_SetEmbedMetadataBoolean=X("EPDFAnnot_SetEmbedMetadataBoolean",3),t._EPDFAnnot_GetEmbedMetadataBoolean=X("EPDFAnnot_GetEmbedMetadataBoolean",3),t._EPDFAnnot_SetEmbedMetadataRect=X("EPDFAnnot_SetEmbedMetadataRect",3),t._EPDFAnnot_GetEmbedMetadataRect=X("EPDFAnnot_GetEmbedMetadataRect",3),t._EPDFAnnot_SetEmbedMetadataJSON=X("EPDFAnnot_SetEmbedMetadataJSON",2),t._EPDFAnnot_GetEmbedMetadataJSON=X("EPDFAnnot_GetEmbedMetadataJSON",3),t._EPDFDocument_ClearEmbedMetadata=X("EPDFDocument_ClearEmbedMetadata",1),t._EPDFAnnot_SetAction=X("EPDFAnnot_SetAction",2),t._EPDFAnnot_RemoveAction=X("EPDFAnnot_RemoveAction",1),t._EPDFAnnot_RemoveDest=X("EPDFAnnot_RemoveDest",1),t._EPDFAnnot_RemoveKey=X("EPDFAnnot_RemoveKey",2),t._EPDFAnnot_GetFileAttachmentForWrite=X("EPDFAnnot_GetFileAttachmentForWrite",1),t._EPDFAnnot_SetColor=X("EPDFAnnot_SetColor",5),t._EPDFAnnot_GetColor=X("EPDFAnnot_GetColor",5),t._EPDFAnnot_ClearColor=X("EPDFAnnot_ClearColor",2),t._EPDFAnnot_SetNoColor=X("EPDFAnnot_SetNoColor",2),t._EPDFAnnot_SetOpacity=X("EPDFAnnot_SetOpacity",2),t._EPDFAnnot_GetOpacity=X("EPDFAnnot_GetOpacity",2),t._EPDFAnnot_GetBorderEffect=X("EPDFAnnot_GetBorderEffect",2),t._EPDFAnnot_SetBorderEffect=X("EPDFAnnot_SetBorderEffect",2),t._EPDFAnnot_ClearBorderEffect=X("EPDFAnnot_ClearBorderEffect",1),t._EPDFAnnot_GetRectangleDifferences=X("EPDFAnnot_GetRectangleDifferences",5),t._EPDFAnnot_ClearRectangleDifferences=X("EPDFAnnot_ClearRectangleDifferences",1),t._EPDFAnnot_GetBorderDashPatternCount=X("EPDFAnnot_GetBorderDashPatternCount",1),t._EPDFAnnot_GetBorderDashPattern=X("EPDFAnnot_GetBorderDashPattern",3),t._EPDFAnnot_SetBorderDashPattern=X("EPDFAnnot_SetBorderDashPattern",3),t._EPDFAnnot_GetBorderStyle=X("EPDFAnnot_GetBorderStyle",2),t._EPDFAnnot_SetBorderStyle=X("EPDFAnnot_SetBorderStyle",3),t._EPDFAnnot_GenerateAppearance=X("EPDFAnnot_GenerateAppearance",1),t._EPDFAnnot_GenerateAppearanceWithBlend=X("EPDFAnnot_GenerateAppearanceWithBlend",2),t._EPDFAnnot_GetBlendMode=X("EPDFAnnot_GetBlendMode",1),t._EPDFAnnot_SetIntent=X("EPDFAnnot_SetIntent",2),t._EPDFAnnot_GetIntent=X("EPDFAnnot_GetIntent",3),t._EPDFAnnot_GetRichContent=X("EPDFAnnot_GetRichContent",3),t._EPDFAnnot_GetRichTextJSON=X("EPDFAnnot_GetRichTextJSON",3),t._EPDFAnnot_SetRichTextJSON=X("EPDFAnnot_SetRichTextJSON",2),t._EPDFAnnot_SetRichTextXHTML=X("EPDFAnnot_SetRichTextXHTML",2),t._EPDFDoc_SetTypographicFeatures=X("EPDFDoc_SetTypographicFeatures",2),t._EPDFDoc_GetTypographicFeatures=X("EPDFDoc_GetTypographicFeatures",1),t._EPDFAnnot_SetLineEndings=X("EPDFAnnot_SetLineEndings",3),t._EPDFAnnot_GetLineEndings=X("EPDFAnnot_GetLineEndings",3),t._EPDFAnnot_SetVertices=X("EPDFAnnot_SetVertices",3),t._EPDFAnnot_SetLine=X("EPDFAnnot_SetLine",3),t._EPDFAnnot_SetDefaultAppearance=X("EPDFAnnot_SetDefaultAppearance",6),t._EPDFAnnot_SetDefaultAppearanceRegisteredFont=X("EPDFAnnot_SetDefaultAppearanceRegisteredFont",6),t._EPDFAnnot_GetDefaultAppearance=X("EPDFAnnot_GetDefaultAppearance",6),t._EPDFAnnot_GetDefaultAppearanceFontFace=X("EPDFAnnot_GetDefaultAppearanceFontFace",5),t._EPDFAnnot_GetDefaultAppearanceFontPostScriptName=X("EPDFAnnot_GetDefaultAppearanceFontPostScriptName",3),t._EPDFAnnot_SetDefaultAppearanceDocumentFont=X("EPDFAnnot_SetDefaultAppearanceDocumentFont",6),t._EPDFAnnot_SetTextAlignment=X("EPDFAnnot_SetTextAlignment",2),t._EPDFAnnot_GetTextAlignment=X("EPDFAnnot_GetTextAlignment",1),t._EPDFPage_GetAnnotByName=X("EPDFPage_GetAnnotByName",2),t._EPDFPage_RemoveAnnotByName=X("EPDFPage_RemoveAnnotByName",2),t._EPDFAnnot_SetLinkedAnnot=X("EPDFAnnot_SetLinkedAnnot",3),t._EPDFPage_GetAnnotIndexByNameRaw=X("EPDFPage_GetAnnotIndexByNameRaw",3),t._EPDFPage_GetAnnotIndexByObjectNumberRaw=X("EPDFPage_GetAnnotIndexByObjectNumberRaw",3),t._EPDFPage_GetAnnotCountRaw=X("EPDFPage_GetAnnotCountRaw",2),t._EPDFPage_GetAnnotRaw=X("EPDFPage_GetAnnotRaw",3),t._EPDFPage_CreateAnnotRaw=X("EPDFPage_CreateAnnotRaw",4),t._EPDFPage_RemoveAnnotRaw=X("EPDFPage_RemoveAnnotRaw",3),t._EPDFPage_PromoteInlineAnnotsRaw=X("EPDFPage_PromoteInlineAnnotsRaw",2),t._EPDFAnnot_IsValid=X("EPDFAnnot_IsValid",1),t._EPDFAnnot_SetSubtype=X("EPDFAnnot_SetSubtype",2),t._EPDFAnnot_SetName=X("EPDFAnnot_SetName",2),t._EPDFAnnot_GetName=X("EPDFAnnot_GetName",3),t._EPDFAnnot_UpdateAppearanceToRect=X("EPDFAnnot_UpdateAppearanceToRect",2),t._EPDFAnnot_SetStampOpacity=X("EPDFAnnot_SetStampOpacity",3),t._EPDFPage_CreateAnnot=X("EPDFPage_CreateAnnot",2),t._EPDFAnnot_SetRotate=X("EPDFAnnot_SetRotate",2),t._EPDFAnnot_GetRotate=X("EPDFAnnot_GetRotate",2),t._EPDFAnnot_GetAppearanceTransform=X("EPDFAnnot_GetAppearanceTransform",3),t._EPDFAnnot_GetReplyType=X("EPDFAnnot_GetReplyType",1),t._EPDFAnnot_SetReplyType=X("EPDFAnnot_SetReplyType",2),t._EPDFAnnot_GetBooleanValue=X("EPDFAnnot_GetBooleanValue",3),t._EPDFAnnot_SetBooleanValue=X("EPDFAnnot_SetBooleanValue",3),t._EPDFAnnot_SetOverlayText=X("EPDFAnnot_SetOverlayText",2),t._EPDFAnnot_GetOverlayText=X("EPDFAnnot_GetOverlayText",3),t._EPDFAnnot_SetOverlayTextRepeat=X("EPDFAnnot_SetOverlayTextRepeat",2),t._EPDFAnnot_GetOverlayTextRepeat=X("EPDFAnnot_GetOverlayTextRepeat",1),t._EPDFAnnot_SetAppearanceFromPage=X("EPDFAnnot_SetAppearanceFromPage",3),t._EPDFAnnot_ExportAppearance=X("EPDFAnnot_ExportAppearance",3),t._EPDFDoc_CanonicalDrawing=X("EPDFDoc_CanonicalDrawing",2),t._EPDFDoc_ImportDrawing=X("EPDFDoc_ImportDrawing",2),t._EPDFDoc_ExportDrawing=X("EPDFDoc_ExportDrawing",2),t._EPDFDoc_GetDrawings=X("EPDFDoc_GetDrawings",3),t._EPDFAnnot_SetDrawing=X("EPDFAnnot_SetDrawing",3),t._EPDFAnnot_GetDrawing=X("EPDFAnnot_GetDrawing",1),t._EPDFAnnot_GetRect=X("EPDFAnnot_GetRect",2),t._EPDFAnnot_SetRect=X("EPDFAnnot_SetRect",2),t._EPDFAnnot_SetAPMatrix=X("EPDFAnnot_SetAPMatrix",3),t._EPDFAnnot_GetAPMatrix=X("EPDFAnnot_GetAPMatrix",3),t._EPDFAnnot_GetAvailableAppearanceModes=X("EPDFAnnot_GetAvailableAppearanceModes",1),t._EPDFAnnot_GetAppearanceStateCount=X("EPDFAnnot_GetAppearanceStateCount",2),t._EPDFAnnot_GetAppearanceStateName=X("EPDFAnnot_GetAppearanceStateName",5),t._EPDFAnnot_GetAppearanceState=X("EPDFAnnot_GetAppearanceState",3),t._EPDFAnnot_HasAppearanceStream=X("EPDFAnnot_HasAppearanceStream",2),t._EPDFAnnot_GetDrawingRect=X("EPDFAnnot_GetDrawingRect",3),t._EPDFAnnot_SetMKColor=X("EPDFAnnot_SetMKColor",5),t._EPDFAnnot_GetMKColor=X("EPDFAnnot_GetMKColor",5),t._EPDFAnnot_ClearMKColor=X("EPDFAnnot_ClearMKColor",2),t._EPDFAnnot_SetMKText=X("EPDFAnnot_SetMKText",3),t._EPDFAnnot_GetMKText=X("EPDFAnnot_GetMKText",4),t._EPDFAnnot_SetMKTextPosition=X("EPDFAnnot_SetMKTextPosition",2),t._EPDFAnnot_GetMKTextPosition=X("EPDFAnnot_GetMKTextPosition",1),t._EPDFAnnot_SetMKIcon=X("EPDFAnnot_SetMKIcon",3),t._EPDFAnnot_GetMKIcon=X("EPDFAnnot_GetMKIcon",2),t._EPDFAnnot_ClearMKIcon=X("EPDFAnnot_ClearMKIcon",2),t._EPDFAnnot_HasMKIcon=X("EPDFAnnot_HasMKIcon",2),t._EPDFAnnot_SetMKRotation=X("EPDFAnnot_SetMKRotation",2),t._EPDFAnnot_GetMKRotation=X("EPDFAnnot_GetMKRotation",1),t._EPDFAnnot_GenerateFormFieldAP=X("EPDFAnnot_GenerateFormFieldAP",1),t._EPDFAnnot_GetCalloutLineCount=X("EPDFAnnot_GetCalloutLineCount",1),t._EPDFAnnot_GetCalloutLine=X("EPDFAnnot_GetCalloutLine",3),t._EPDFAnnot_SetCalloutLine=X("EPDFAnnot_SetCalloutLine",3),t._EPDFAnnot_GetObjectNumber=X("EPDFAnnot_GetObjectNumber",1),t._EPDFAnnot_GetStructurePosition=X("EPDFAnnot_GetStructurePosition",3),t._EPDFPage_GetAnnotByObjectNumber=X("EPDFPage_GetAnnotByObjectNumber",2),t._EPDFPage_RemoveAnnot=X("EPDFPage_RemoveAnnot",2),t._EPDFPage_RemoveAnnotByObjectNumber=X("EPDFPage_RemoveAnnotByObjectNumber",2),t._EPDFPage_MoveAnnots=X("EPDFPage_MoveAnnots",4),t._EPDFPage_MoveAnnotsRaw=X("EPDFPage_MoveAnnotsRaw",5),t._EPDF_LoadBaseDocument=X("EPDF_LoadBaseDocument",2),t._EPDF_LoadMemBaseDocument=X("EPDF_LoadMemBaseDocument",3),t._EPDF_LoadMemBaseDocument64=X("EPDF_LoadMemBaseDocument64",3),t._EPDF_ReleaseBaseDocument=X("EPDF_ReleaseBaseDocument",1),t._EPDFPage_ExportAnnotsRawToOwnedBuffer=X("EPDFPage_ExportAnnotsRawToOwnedBuffer",5),t._EPDFPage_ImportAnnotsRaw=X("EPDFPage_ImportAnnotsRaw",4),t._EPDFDoc_ExportDictRawToOwnedBuffer=X("EPDFDoc_ExportDictRawToOwnedBuffer",4),t._EPDFDoc_ExportDictCanonicalToOwnedBuffer=X("EPDFDoc_ExportDictCanonicalToOwnedBuffer",5),t._EPDFDoc_ImportDictRaw=X("EPDFDoc_ImportDictRaw",3),t._EPDFForm_ExportFieldRawToOwnedBuffer=X("EPDFForm_ExportFieldRawToOwnedBuffer",3),t._EPDFForm_ImportFieldRaw=X("EPDFForm_ImportFieldRaw",3),t._EPDFOutline_ExportItemRawToOwnedBuffer=X("EPDFOutline_ExportItemRawToOwnedBuffer",3),t._EPDFOutline_ImportItemRaw=X("EPDFOutline_ImportItemRaw",3),t._EPDFPage_ExportRawToOwnedBuffer=X("EPDFPage_ExportRawToOwnedBuffer",3),t._EPDFPage_ImportRaw=X("EPDFPage_ImportRaw",3),t._EPDFAttachment_ExportRawToOwnedBuffer=X("EPDFAttachment_ExportRawToOwnedBuffer",3),t._EPDFAttachment_ExportCanonicalToOwnedBuffer=X("EPDFAttachment_ExportCanonicalToOwnedBuffer",3),t._EPDFAttachment_ImportRaw=X("EPDFAttachment_ImportRaw",3),t._EPDFCatalog_GetMetadata=X("EPDFCatalog_GetMetadata",3),t._EPDFCatalog_SetMetadata=X("EPDFCatalog_SetMetadata",3),t._EPDFFont_RegisterFont=X("EPDFFont_RegisterFont",4),t._EPDFFont_RegisterMemFont=X("EPDFFont_RegisterMemFont",5),t._EPDFFont_RegisterMemFont64=X("EPDFFont_RegisterMemFont64",5),t._EPDFFont_ClearRegisteredFonts=X("EPDFFont_ClearRegisteredFonts",0),t._EPDFFont_GetEmbeddingPermission=X("EPDFFont_GetEmbeddingPermission",1),t._EPDFFont_IsEditingAuthorized=X("EPDFFont_IsEditingAuthorized",1),t._EPDFFont_AuthorizeEditing=X("EPDFFont_AuthorizeEditing",1),t._EPDFFont_IsInstanced=X("EPDFFont_IsInstanced",1),t._EPDFFont_GetFamilyName=X("EPDFFont_GetFamilyName",3),t._EPDFFont_GetWeight=X("EPDFFont_GetWeight",1),t._EPDFFont_IsItalic=X("EPDFFont_IsItalic",1),t._EPDFDoc_SetFontEmbeddingPolicy=X("EPDFDoc_SetFontEmbeddingPolicy",2),t._EPDFDoc_GetFontEmbeddingPolicy=X("EPDFDoc_GetFontEmbeddingPolicy",1),t._EPDFFont_AddFallbackFont=X("EPDFFont_AddFallbackFont",2),t._EPDFFont_ClearFallbackFonts=X("EPDFFont_ClearFallbackFonts",0),t._EPDFFont_SetLastResortFont=X("EPDFFont_SetLastResortFont",1),t._EPDFFont_GetLastResortFont=X("EPDFFont_GetLastResortFont",0),t._EPDFFont_GetFallbackOrder=X("EPDFFont_GetFallbackOrder",4),t._EPDFFont_GetProgramData=X("EPDFFont_GetProgramData",3),t._EPDFFont_GetProgramFormat=X("EPDFFont_GetProgramFormat",1),t._EPDFFont_GetProgramHash=X("EPDFFont_GetProgramHash",2),t._EPDFFont_GetCoverage=X("EPDFFont_GetCoverage",3),t._EPDFFont_GetMetrics=X("EPDFFont_GetMetrics",3),t._EPDFFont_GetPostScriptName=X("EPDFFont_GetPostScriptName",3),t._EPDFFontFaces_Load=X("EPDFFontFaces_Load",1),t._EPDFFontFaces_Close=X("EPDFFontFaces_Close",1),t._EPDFDoc_GetFontsFingerprint=X("EPDFDoc_GetFontsFingerprint",2),t._EPDFFontFaces_Count=X("EPDFFontFaces_Count",1),t._EPDFFontFaces_GetFamily=X("EPDFFontFaces_GetFamily",4),t._EPDFFontFaces_GetWeight=X("EPDFFontFaces_GetWeight",2),t._EPDFFontFaces_IsItalic=X("EPDFFontFaces_IsItalic",2),t._EPDFFontFaces_CountPrograms=X("EPDFFontFaces_CountPrograms",2),t._EPDFFontFaces_GetProgramObjNum=X("EPDFFontFaces_GetProgramObjNum",3),t._EPDFFontFaces_GetProgramFormat=X("EPDFFontFaces_GetProgramFormat",3),t._EPDFFontFaces_GetProgramEmbedded=X("EPDFFontFaces_GetProgramEmbedded",3),t._EPDFFontFaces_GetProgramPostScriptName=X("EPDFFontFaces_GetProgramPostScriptName",5),t._EPDFFontFaces_GetProgramEmbeddingPermission=X("EPDFFontFaces_GetProgramEmbeddingPermission",3),t._EPDFFontFaces_ProgramMapsUnicode=X("EPDFFontFaces_ProgramMapsUnicode",3),t._EPDFFontFaces_GetProgramHash=X("EPDFFontFaces_GetProgramHash",4),t._EPDFFontFaces_GetProgramDisplayHash=X("EPDFFontFaces_GetProgramDisplayHash",4),t._EPDFFontFaces_GetProgramMetrics=X("EPDFFontFaces_GetProgramMetrics",5),t._EPDFDoc_GetFontProgramData=X("EPDFDoc_GetFontProgramData",4),t._EPDFDoc_GetFontDisplayProgramData=X("EPDFDoc_GetFontDisplayProgramData",4),t._EPDFDoc_GetFontDisplayProgramCoverage=X("EPDFDoc_GetFontDisplayProgramCoverage",4),t._EPDFDoc_ResolveFonts=X("EPDFDoc_ResolveFonts",8),t._EPDFFontResolution_Close=X("EPDFFontResolution_Close",1),t._EPDFFontResolution_GetSource=X("EPDFFontResolution_GetSource",2),t._EPDFFontResolution_GetRegisteredFont=X("EPDFFontResolution_GetRegisteredFont",2),t._EPDFFontResolution_GetProgramObjNum=X("EPDFFontResolution_GetProgramObjNum",2),t._EPDFFontResolution_GetProgramDisplayHash=X("EPDFFontResolution_GetProgramDisplayHash",3),t._EPDFFontResolution_GetBaseFontName=X("EPDFFontResolution_GetBaseFontName",4),t._EPDFFontResolution_GetFamily=X("EPDFFontResolution_GetFamily",4),t._EPDFFontResolution_GetWeight=X("EPDFFontResolution_GetWeight",2),t._EPDFFontResolution_IsItalic=X("EPDFFontResolution_IsItalic",2),t._EPDFFontResolution_IsDegraded=X("EPDFFontResolution_IsDegraded",2),t._EPDFFontResolution_GetFallbacks=X("EPDFFontResolution_GetFallbacks",4),t._EPDFFontResolution_CountMissingCharacters=X("EPDFFontResolution_CountMissingCharacters",1),t._EPDFFontResolution_GetMissingCharacter=X("EPDFFontResolution_GetMissingCharacter",4),t._EPDFDoc_ClearMissingCharacters=X("EPDFDoc_ClearMissingCharacters",1),t._EPDFDoc_CountMissingCharacters=X("EPDFDoc_CountMissingCharacters",1),t._EPDFDoc_GetMissingCharacter=X("EPDFDoc_GetMissingCharacter",4),t._EPDFForm_LoadModel=X("EPDFForm_LoadModel",1),t._EPDFForm_CloseModel=X("EPDFForm_CloseModel",1),t._EPDFForm_GetFormKind=X("EPDFForm_GetFormKind",1),t._EPDFForm_GetNeedAppearances=X("EPDFForm_GetNeedAppearances",1),t._EPDFForm_CountFields=X("EPDFForm_CountFields",1),t._EPDFForm_GetFieldActionModel=X("EPDFForm_GetFieldActionModel",3),t._EPDFForm_CountCalculationOrder=X("EPDFForm_CountCalculationOrder",1),t._EPDFForm_GetCalculationOrderFieldIndex=X("EPDFForm_GetCalculationOrderFieldIndex",2),t._EPDFForm_GetFieldObjNum=X("EPDFForm_GetFieldObjNum",2),t._EPDFForm_GetFieldFamily=X("EPDFForm_GetFieldFamily",2),t._EPDFForm_GetFieldFlags=X("EPDFForm_GetFieldFlags",2),t._EPDFForm_GetFieldOrigin=X("EPDFForm_GetFieldOrigin",2),t._EPDFForm_GetFieldName=X("EPDFForm_GetFieldName",4),t._EPDFForm_GetFieldAlternateName=X("EPDFForm_GetFieldAlternateName",4),t._EPDFForm_GetFieldMappingName=X("EPDFForm_GetFieldMappingName",4),t._EPDFForm_HasFieldEmbedMetadata=X("EPDFForm_HasFieldEmbedMetadata",2),t._EPDFForm_HasFieldValuesList=X("EPDFForm_HasFieldValuesList",2),t._EPDFForm_GetFieldEmbedMetadataString=X("EPDFForm_GetFieldEmbedMetadataString",5),t._EPDFForm_GetFieldEmbedMetadataNumber=X("EPDFForm_GetFieldEmbedMetadataNumber",4),t._EPDFForm_GetFieldEmbedMetadataBoolean=X("EPDFForm_GetFieldEmbedMetadataBoolean",4),t._EPDFForm_GetFieldEmbedMetadataJSON=X("EPDFForm_GetFieldEmbedMetadataJSON",4),t._EPDFForm_GetFieldValueKind=X("EPDFForm_GetFieldValueKind",2),t._EPDFForm_CountFieldValues=X("EPDFForm_CountFieldValues",2),t._EPDFForm_GetFieldValueAt=X("EPDFForm_GetFieldValueAt",5),t._EPDFForm_GetFieldDefaultValueKind=X("EPDFForm_GetFieldDefaultValueKind",2),t._EPDFForm_CountFieldDefaultValues=X("EPDFForm_CountFieldDefaultValues",2),t._EPDFForm_GetFieldDefaultValueAt=X("EPDFForm_GetFieldDefaultValueAt",5),t._EPDFForm_GetFieldMaxLen=X("EPDFForm_GetFieldMaxLen",2),t._EPDFForm_GetFieldTopIndex=X("EPDFForm_GetFieldTopIndex",2),t._EPDFForm_CountFieldOptions=X("EPDFForm_CountFieldOptions",2),t._EPDFForm_GetFieldOptionLabel=X("EPDFForm_GetFieldOptionLabel",5),t._EPDFForm_GetFieldOptionValue=X("EPDFForm_GetFieldOptionValue",5),t._EPDFForm_IsFieldOptionSelected=X("EPDFForm_IsFieldOptionSelected",3),t._EPDFForm_CountFieldWidgets=X("EPDFForm_CountFieldWidgets",2),t._EPDFForm_GetFieldWidgetObjNum=X("EPDFForm_GetFieldWidgetObjNum",3),t._EPDFForm_GetFieldWidgetPageObjNum=X("EPDFForm_GetFieldWidgetPageObjNum",3),t._EPDFForm_GetFieldWidgetRect=X("EPDFForm_GetFieldWidgetRect",4),t._EPDFForm_GetFieldWidgetOnState=X("EPDFForm_GetFieldWidgetOnState",5),t._EPDFForm_GetFieldWidgetExportValue=X("EPDFForm_GetFieldWidgetExportValue",5),t._EPDFForm_IsFieldWidgetChecked=X("EPDFForm_IsFieldWidgetChecked",3),t._EPDFForm_GetFieldIndexByObjNum=X("EPDFForm_GetFieldIndexByObjNum",2),t._EPDFForm_GetFieldIndexForWidget=X("EPDFForm_GetFieldIndexForWidget",2),t._EPDFForm_SetFieldValue=X("EPDFForm_SetFieldValue",5),t._EPDFForm_SetFieldDefaultValue=X("EPDFForm_SetFieldDefaultValue",5),t._EPDFForm_SetFieldSelectedIndices=X("EPDFForm_SetFieldSelectedIndices",4),t._EPDFForm_SetFieldWidgetsChecked=X("EPDFForm_SetFieldWidgetsChecked",7),t._EPDFForm_RedrawFieldWidgets=X("EPDFForm_RedrawFieldWidgets",5),t._EPDFForm_SetFieldDisplay=X("EPDFForm_SetFieldDisplay",6),t._EPDFForm_SetFieldAppearanceText=X("EPDFForm_SetFieldAppearanceText",6),t._EPDFForm_ExportFDF=X("EPDFForm_ExportFDF",5),t._EPDFForm_ExportXFDF=X("EPDFForm_ExportXFDF",5),t._EPDFForm_Repair=X("EPDFForm_Repair",3),t._EPDFForm_CreateField=X("EPDFForm_CreateField",4),t._EPDFForm_AttachWidget=X("EPDFForm_AttachWidget",6),t._EPDFForm_DetachWidget=X("EPDFForm_DetachWidget",3),t._EPDFForm_DeleteField=X("EPDFForm_DeleteField",5),t._EPDFForm_SetFieldName=X("EPDFForm_SetFieldName",3),t._EPDFForm_GetFieldPartialName=X("EPDFForm_GetFieldPartialName",4),t._EPDFForm_SetFieldFlags=X("EPDFForm_SetFieldFlags",4),t._EPDFForm_SetFieldEventAction=X("EPDFForm_SetFieldEventAction",4),t._EPDFForm_SetCalculationOrder=X("EPDFForm_SetCalculationOrder",3),t._EPDFForm_SetFieldMaxLen=X("EPDFForm_SetFieldMaxLen",3),t._EPDFForm_SetFieldAlternateName=X("EPDFForm_SetFieldAlternateName",3),t._EPDFForm_SetFieldMappingName=X("EPDFForm_SetFieldMappingName",3),t._EPDFForm_SetFieldEmbedMetadataString=X("EPDFForm_SetFieldEmbedMetadataString",4),t._EPDFForm_SetFieldEmbedMetadataNumber=X("EPDFForm_SetFieldEmbedMetadataNumber",4),t._EPDFForm_SetFieldEmbedMetadataBoolean=X("EPDFForm_SetFieldEmbedMetadataBoolean",4),t._EPDFForm_SetFieldEmbedMetadataJSON=X("EPDFForm_SetFieldEmbedMetadataJSON",3),t._EPDFForm_ClearFieldEmbedMetadataKey=X("EPDFForm_ClearFieldEmbedMetadataKey",3),t._EPDFForm_ClearFieldEmbedMetadata=X("EPDFForm_ClearFieldEmbedMetadata",2),t._EPDFForm_SetFieldOptions=X("EPDFForm_SetFieldOptions",5),t._EPDFPage_Flatten=X("EPDFPage_Flatten",2),t._EPDFPage_FlattenAnnotations=X("EPDFPage_FlattenAnnotations",5),t._EPDFPage_ExportAnnotationsAsDocument=X("EPDFPage_ExportAnnotationsAsDocument",3),t._EPDFDoc_ExportPagesFlattened=X("EPDFDoc_ExportPagesFlattened",5),t._EPDFLayer_OpenLayer=X("EPDFLayer_OpenLayer",4),t._EPDFLayer_OpenLayerArtifact=X("EPDFLayer_OpenLayerArtifact",4),t._EPDFLayer_OpenLayerArtifactFromPath=X("EPDFLayer_OpenLayerArtifactFromPath",4),t._EPDFLayer_IsObjectPromoted=X("EPDFLayer_IsObjectPromoted",2),t._EPDFPage_IsValid=X("EPDFPage_IsValid",1),t._EPDFLayer_IsPagePromoted=X("EPDFLayer_IsPagePromoted",2),t._EPDFLayer_GetBirthObjectNumber=X("EPDFLayer_GetBirthObjectNumber",3),t._EPDFLayer_GetBirthName=X("EPDFLayer_GetBirthName",4),t._EPDFLayer_BeginTransaction=X("EPDFLayer_BeginTransaction",1),t._EPDFLayer_CommitTransaction=X("EPDFLayer_CommitTransaction",1),t._EPDFLayer_AbortTransaction=X("EPDFLayer_AbortTransaction",1),t._EPDFLayer_IsInTransaction=X("EPDFLayer_IsInTransaction",1),t._EPDFLayer_GetLastObjectNumber=X("EPDFLayer_GetLastObjectNumber",1),t._EPDFLayer_RaiseLastObjectNumber=X("EPDFLayer_RaiseLastObjectNumber",2),t._EPDFLayer_GetPromotedObjectCount=X("EPDFLayer_GetPromotedObjectCount",1),t._EPDFLayer_GetBaseDocument=X("EPDFLayer_GetBaseDocument",1),t._EPDF_SetBaseDocumentSha256=X("EPDF_SetBaseDocumentSha256",2),t._EPDFLayer_GetBaseSha256=X("EPDFLayer_GetBaseSha256",2),t._EPDFLayer_SaveDelta=X("EPDFLayer_SaveDelta",3),t._EPDFLayer_SaveDeltaEx=X("EPDFLayer_SaveDeltaEx",4),t._EPDFLayer_SaveDeltaToOwnedBuffer=X("EPDFLayer_SaveDeltaToOwnedBuffer",3),t._EPDFLayer_SaveDeltaToOwnedBufferEx=X("EPDFLayer_SaveDeltaToOwnedBufferEx",4),t._EPDFLayer_SaveLayerArtifact=X("EPDFLayer_SaveLayerArtifact",3),t._EPDFLayer_SaveLayerArtifactEx=X("EPDFLayer_SaveLayerArtifactEx",4),t._EPDFLayer_SaveLayerArtifactToOwnedBuffer=X("EPDFLayer_SaveLayerArtifactToOwnedBuffer",3),t._EPDFLayer_SaveLayerArtifactToOwnedBufferEx=X("EPDFLayer_SaveLayerArtifactToOwnedBufferEx",4),t._EPDFNamedDest_SetDest=X("EPDFNamedDest_SetDest",3),t._EPDFNamedDest_Remove=X("EPDFNamedDest_Remove",2),t._EPDFDest_CreateView=X("EPDFDest_CreateView",4),t._EPDFDest_CreateXYZ=X("EPDFDest_CreateXYZ",7),t._EPDFDest_CreateRemoteView=X("EPDFDest_CreateRemoteView",5),t._EPDFDest_CreateRemoteXYZ=X("EPDFDest_CreateRemoteXYZ",8),t._EPDFDest_CreateXYZByObjectNumber=X("EPDFDest_CreateXYZByObjectNumber",8),t._EPDFDest_CreateViewByObjectNumber=X("EPDFDest_CreateViewByObjectNumber",5),t._EPDFDest_GetViewNullParams=X("EPDFDest_GetViewNullParams",1),t._EPDFAction_CreateGoTo=X("EPDFAction_CreateGoTo",2),t._EPDFAction_CreateGoToNamed=X("EPDFAction_CreateGoToNamed",2),t._EPDFAction_CreateLaunch=X("EPDFAction_CreateLaunch",2),t._EPDFAction_CreateRemoteGoToByName=X("EPDFAction_CreateRemoteGoToByName",3),t._EPDFAction_CreateRemoteGoToDest=X("EPDFAction_CreateRemoteGoToDest",3),t._EPDFAction_CreateURI=X("EPDFAction_CreateURI",2),t._EPDFAction_CreateNamed=X("EPDFAction_CreateNamed",2),t._EPDFOutline_GetObjectNumber=X("EPDFOutline_GetObjectNumber",1),t._EPDFOutline_GetItem=X("EPDFOutline_GetItem",2),t._EPDFOutline_CreateItem=X("EPDFOutline_CreateItem",5),t._EPDFOutline_MoveItem=X("EPDFOutline_MoveItem",4),t._EPDFOutline_DeleteItem=X("EPDFOutline_DeleteItem",2),t._EPDFOutline_SetTitle=X("EPDFOutline_SetTitle",3),t._EPDFOutline_SetOpen=X("EPDFOutline_SetOpen",3),t._EPDFOutline_SetColor=X("EPDFOutline_SetColor",6),t._EPDFOutline_SetStyle=X("EPDFOutline_SetStyle",3),t._EPDFOutline_SetAction=X("EPDFOutline_SetAction",3),t._EPDFDoc_GetNamedPageCount=X("EPDFDoc_GetNamedPageCount",2),t._EPDFDoc_GetNamedPageAt=X("EPDFDoc_GetNamedPageAt",7),t._EPDFDoc_SetNamedPage=X("EPDFDoc_SetNamedPage",3),t._EPDFDoc_RemoveNamedPage=X("EPDFDoc_RemoveNamedPage",2),t._EPDFDoc_RemoveNamedPagesForPage=X("EPDFDoc_RemoveNamedPagesForPage",2),t._EPDFDoc_GetPageLabelSectionCount=X("EPDFDoc_GetPageLabelSectionCount",1),t._EPDFDoc_GetPageLabelSectionAt=X("EPDFDoc_GetPageLabelSectionAt",7),t._EPDFDoc_SetPageLabelSections=X("EPDFDoc_SetPageLabelSections",6),t._EPDF_DigestBuffer=X("EPDF_DigestBuffer",5),t._EPDFDoc_GetRevisionCount=X("EPDFDoc_GetRevisionCount",1),t._EPDFDoc_GetRevision=X("EPDFDoc_GetRevision",4),t._EPDFDoc_OpenRevision=X("EPDFDoc_OpenRevision",3),t._EPDFDoc_OpenBaseOverlayFromPath=X("EPDFDoc_OpenBaseOverlayFromPath",2),t._EPDFDoc_OpenBaseOverlay=X("EPDFDoc_OpenBaseOverlay",3),t._EPDFSig_LoadModel=X("EPDFSig_LoadModel",1),t._EPDFSig_CloseModel=X("EPDFSig_CloseModel",1),t._EPDFSig_Count=X("EPDFSig_Count",1),t._EPDFSig_IsRevisionChainValid=X("EPDFSig_IsRevisionChainValid",1),t._EPDFSig_GetIndexByFieldObjNum=X("EPDFSig_GetIndexByFieldObjNum",2),t._EPDFSig_GetFieldObjNum=X("EPDFSig_GetFieldObjNum",2),t._EPDFSig_GetWidgetObjNum=X("EPDFSig_GetWidgetObjNum",2),t._EPDFSig_GetWidgetPageObjNum=X("EPDFSig_GetWidgetPageObjNum",2),t._EPDFSig_GetValueObjNum=X("EPDFSig_GetValueObjNum",2),t._EPDFSig_GetFieldName=X("EPDFSig_GetFieldName",4),t._EPDFSig_IsSigned=X("EPDFSig_IsSigned",2),t._EPDFSig_GetKind=X("EPDFSig_GetKind",2),t._EPDFSig_GetByteRange=X("EPDFSig_GetByteRange",3),t._EPDFSig_GetCoverage=X("EPDFSig_GetCoverage",2),t._EPDFSig_GetRevisionIndex=X("EPDFSig_GetRevisionIndex",2),t._EPDFSig_GetContents=X("EPDFSig_GetContents",4),t._EPDFSig_GetString=X("EPDFSig_GetString",5),t._EPDFSig_GetDocMDPPermission=X("EPDFSig_GetDocMDPPermission",2),t._EPDFSig_IsCatalogCertification=X("EPDFSig_IsCatalogCertification",2),t._EPDFSig_GetFieldMDPAction=X("EPDFSig_GetFieldMDPAction",2),t._EPDFSig_GetLockAction=X("EPDFSig_GetLockAction",2),t._EPDFSig_GetLockPermission=X("EPDFSig_GetLockPermission",2),t._EPDFSig_GetFieldNameCount=X("EPDFSig_GetFieldNameCount",3),t._EPDFSig_GetFieldNameAt=X("EPDFSig_GetFieldNameAt",6),t._EPDFSig_HasSeedValue=X("EPDFSig_HasSeedValue",2),t._EPDFSig_GetSeedValueRequiredFlags=X("EPDFSig_GetSeedValueRequiredFlags",2),t._EPDFSig_GetSeedValuePresentFlags=X("EPDFSig_GetSeedValuePresentFlags",2),t._EPDFSig_GetSeedValueMDP=X("EPDFSig_GetSeedValueMDP",2),t._EPDFSig_GetSeedValueVersion=X("EPDFSig_GetSeedValueVersion",2),t._EPDFSig_GetSeedValueFilter=X("EPDFSig_GetSeedValueFilter",4),t._EPDFSig_GetSeedValueListCount=X("EPDFSig_GetSeedValueListCount",3),t._EPDFSig_GetSeedValueListAt=X("EPDFSig_GetSeedValueListAt",6),t._EPDFSig_DigestByteRange=X("EPDFSig_DigestByteRange",5),t._EPDFSig_DigestFileRange=X("EPDFSig_DigestFileRange",5),t._EPDFDoc_GetLoadedBytesSize=X("EPDFDoc_GetLoadedBytesSize",1),t._EPDFDoc_GetBaseBytesSize=X("EPDFDoc_GetBaseBytesSize",1),t._EPDFDoc_GetStructureObjectNumbers=X("EPDFDoc_GetStructureObjectNumbers",4),t._EPDFDoc_ReadLoadedBytes=X("EPDFDoc_ReadLoadedBytes",5),t._EPDFSig_Prepare=X("EPDFSig_Prepare",3),t._EPDFSig_SetFieldLock=X("EPDFSig_SetFieldLock",6),t._EPDFSig_SaveCandidateToOwnedBuffer=X("EPDFSig_SaveCandidateToOwnedBuffer",5),t._EPDFSig_SaveCandidate=X("EPDFSig_SaveCandidate",6),t._EPDFSig_Seal=X("EPDFSig_Seal",13),t._EPDFSig_SealSpan=X("EPDFSig_SealSpan",10),t._EPDFSig_WriteContents=X("EPDFSig_WriteContents",9),t._EPDFDss_GetCount=X("EPDFDss_GetCount",2),t._EPDFDss_GetData=X("EPDFDss_GetData",5),t._EPDFDss_Add=X("EPDFDss_Add",4),t._EPDFDoc_CompareRevisions=X("EPDFDoc_CompareRevisions",2),t._EPDFObjectDiff_Close=X("EPDFObjectDiff_Close",1),t._EPDFObjectDiff_GetCount=X("EPDFObjectDiff_GetCount",1),t._EPDFObjectDiff_GetEntry=X("EPDFObjectDiff_GetEntry",8),t._EPDFObjectDiff_GetValue=X("EPDFObjectDiff_GetValue",6),t._EPDFObjectDiff_GetReadStatus=X("EPDFObjectDiff_GetReadStatus",3),t._EPDFObjectDiff_GetRevisionHealth=X("EPDFObjectDiff_GetRevisionHealth",5),t._EPDFObjectDiff_GetReferrerCount=X("EPDFObjectDiff_GetReferrerCount",3),t._EPDFObjectDiff_GetReferrer=X("EPDFObjectDiff_GetReferrer",7),t._EPDFDoc_GetLoadedObjectValue=X("EPDFDoc_GetLoadedObjectValue",6),t._EPDFDoc_HasPieceInfoEntry=X("EPDFDoc_HasPieceInfoEntry",2),t._EPDFDoc_GetPieceInfoEntryCount=X("EPDFDoc_GetPieceInfoEntryCount",1),t._EPDFDoc_GetPieceInfoEntryAt=X("EPDFDoc_GetPieceInfoEntryAt",4),t._EPDFDoc_GetLastModified=X("EPDFDoc_GetLastModified",3),t._EPDFDoc_GetPieceInfoLastModified=X("EPDFDoc_GetPieceInfoLastModified",4),t._EPDFDoc_GetPieceInfoKeyCount=X("EPDFDoc_GetPieceInfoKeyCount",2),t._EPDFDoc_GetPieceInfoKeyAt=X("EPDFDoc_GetPieceInfoKeyAt",5),t._EPDFDoc_GetPieceInfoValueType=X("EPDFDoc_GetPieceInfoValueType",3),t._EPDFDoc_SetPieceInfoString=X("EPDFDoc_SetPieceInfoString",5),t._EPDFDoc_GetPieceInfoString=X("EPDFDoc_GetPieceInfoString",5),t._EPDFDoc_SetPieceInfoNumber=X("EPDFDoc_SetPieceInfoNumber",5),t._EPDFDoc_GetPieceInfoNumber=X("EPDFDoc_GetPieceInfoNumber",4),t._EPDFDoc_SetPieceInfoBoolean=X("EPDFDoc_SetPieceInfoBoolean",5),t._EPDFDoc_GetPieceInfoBoolean=X("EPDFDoc_GetPieceInfoBoolean",4),t._EPDFDoc_SetPieceInfoName=X("EPDFDoc_SetPieceInfoName",5),t._EPDFDoc_GetPieceInfoName=X("EPDFDoc_GetPieceInfoName",5),t._EPDFDoc_SetPieceInfoStringArray=X("EPDFDoc_SetPieceInfoStringArray",6),t._EPDFDoc_GetPieceInfoStringArrayCount=X("EPDFDoc_GetPieceInfoStringArrayCount",3),t._EPDFDoc_GetPieceInfoStringArrayAt=X("EPDFDoc_GetPieceInfoStringArrayAt",6),t._EPDFDoc_ClearPieceInfoKey=X("EPDFDoc_ClearPieceInfoKey",4),t._EPDFDoc_ClearPieceInfoEntry=X("EPDFDoc_ClearPieceInfoEntry",2),t._EPDFDoc_HasPagePieceInfoEntry=X("EPDFDoc_HasPagePieceInfoEntry",3),t._EPDFDoc_GetPagePieceInfoEntryCount=X("EPDFDoc_GetPagePieceInfoEntryCount",2),t._EPDFDoc_GetPagePieceInfoEntryAt=X("EPDFDoc_GetPagePieceInfoEntryAt",5),t._EPDFDoc_GetPageLastModified=X("EPDFDoc_GetPageLastModified",4),t._EPDFDoc_GetPagePieceInfoLastModified=X("EPDFDoc_GetPagePieceInfoLastModified",5),t._EPDFDoc_GetPagePieceInfoKeyCount=X("EPDFDoc_GetPagePieceInfoKeyCount",3),t._EPDFDoc_GetPagePieceInfoKeyAt=X("EPDFDoc_GetPagePieceInfoKeyAt",6),t._EPDFDoc_GetPagePieceInfoValueType=X("EPDFDoc_GetPagePieceInfoValueType",4),t._EPDFDoc_SetPagePieceInfoString=X("EPDFDoc_SetPagePieceInfoString",6),t._EPDFDoc_GetPagePieceInfoString=X("EPDFDoc_GetPagePieceInfoString",6),t._EPDFDoc_SetPagePieceInfoNumber=X("EPDFDoc_SetPagePieceInfoNumber",6),t._EPDFDoc_GetPagePieceInfoNumber=X("EPDFDoc_GetPagePieceInfoNumber",5),t._EPDFDoc_SetPagePieceInfoBoolean=X("EPDFDoc_SetPagePieceInfoBoolean",6),t._EPDFDoc_GetPagePieceInfoBoolean=X("EPDFDoc_GetPagePieceInfoBoolean",5),t._EPDFDoc_SetPagePieceInfoName=X("EPDFDoc_SetPagePieceInfoName",6),t._EPDFDoc_GetPagePieceInfoName=X("EPDFDoc_GetPagePieceInfoName",6),t._EPDFDoc_SetPagePieceInfoStringArray=X("EPDFDoc_SetPagePieceInfoStringArray",7),t._EPDFDoc_GetPagePieceInfoStringArrayCount=X("EPDFDoc_GetPagePieceInfoStringArrayCount",4),t._EPDFDoc_GetPagePieceInfoStringArrayAt=X("EPDFDoc_GetPagePieceInfoStringArrayAt",7),t._EPDFDoc_ClearPagePieceInfoKey=X("EPDFDoc_ClearPagePieceInfoKey",5),t._EPDFDoc_ClearPagePieceInfoEntry=X("EPDFDoc_ClearPagePieceInfoEntry",3),t._EPDFAnnot_GetMeasure=X("EPDFAnnot_GetMeasure",1),t._EPDFAnnot_AddMeasure=X("EPDFAnnot_AddMeasure",1),t._EPDFAnnot_RemoveMeasure=X("EPDFAnnot_RemoveMeasure",1),t._EPDFPage_CountViewports=X("EPDFPage_CountViewports",1),t._EPDFPage_GetViewport=X("EPDFPage_GetViewport",2),t._EPDFPage_AddViewport=X("EPDFPage_AddViewport",2),t._EPDFPage_RemoveViewport=X("EPDFPage_RemoveViewport",2),t._EPDFPage_CountViewportsRaw=X("EPDFPage_CountViewportsRaw",2),t._EPDFPage_GetViewportRaw=X("EPDFPage_GetViewportRaw",3),t._EPDFPage_AddViewportRaw=X("EPDFPage_AddViewportRaw",3),t._EPDFPage_RemoveViewportRaw=X("EPDFPage_RemoveViewportRaw",3),t._EPDFViewport_Close=X("EPDFViewport_Close",1),t._EPDFPage_FindViewport=X("EPDFPage_FindViewport",2),t._EPDFViewport_GetBBox=X("EPDFViewport_GetBBox",2),t._EPDFViewport_SetBBox=X("EPDFViewport_SetBBox",2),t._EPDFViewport_GetMeasure=X("EPDFViewport_GetMeasure",1),t._EPDFViewport_AddMeasure=X("EPDFViewport_AddMeasure",1),t._EPDFViewport_RemoveMeasure=X("EPDFViewport_RemoveMeasure",1),t._EPDFMeasure_GetSubtype=X("EPDFMeasure_GetSubtype",1),t._EPDFMeasure_GetOrigin=X("EPDFMeasure_GetOrigin",2),t._EPDFMeasure_SetOrigin=X("EPDFMeasure_SetOrigin",2),t._EPDFMeasure_GetCYX=X("EPDFMeasure_GetCYX",2),t._EPDFMeasure_SetCYX=X("EPDFMeasure_SetCYX",2),t._EPDFMeasure_CountFormats=X("EPDFMeasure_CountFormats",2),t._EPDFMeasure_GetFormat=X("EPDFMeasure_GetFormat",3),t._EPDFMeasure_AddFormat=X("EPDFMeasure_AddFormat",4),t._EPDFMeasure_RemoveFormats=X("EPDFMeasure_RemoveFormats",2),t._EPDFViewport_GetName=X("EPDFViewport_GetName",3),t._EPDFViewport_SetName=X("EPDFViewport_SetName",2),t._EPDFMeasure_GetRatio=X("EPDFMeasure_GetRatio",3),t._EPDFMeasure_SetRatio=X("EPDFMeasure_SetRatio",2),t._EPDFNumberFormat_GetUnit=X("EPDFNumberFormat_GetUnit",3),t._EPDFNumberFormat_SetUnit=X("EPDFNumberFormat_SetUnit",2),t._EPDFNumberFormat_GetConversion=X("EPDFNumberFormat_GetConversion",2),t._EPDFNumberFormat_SetConversion=X("EPDFNumberFormat_SetConversion",2),t._EPDFNumberFormat_GetPrecision=X("EPDFNumberFormat_GetPrecision",2),t._EPDFNumberFormat_SetPrecision=X("EPDFNumberFormat_SetPrecision",2),t._EPDFNumberFormat_GetFixedDenominator=X("EPDFNumberFormat_GetFixedDenominator",2),t._EPDFNumberFormat_SetFixedDenominator=X("EPDFNumberFormat_SetFixedDenominator",2),t._EPDFNumberFormat_GetText=X("EPDFNumberFormat_GetText",4),t._EPDFNumberFormat_SetText=X("EPDFNumberFormat_SetText",3),t._EPDFNumberFormat_GetFraction=X("EPDFNumberFormat_GetFraction",2),t._EPDFNumberFormat_SetFraction=X("EPDFNumberFormat_SetFraction",2),t._EPDFNumberFormat_GetLabelPosition=X("EPDFNumberFormat_GetLabelPosition",2),t._EPDFNumberFormat_SetLabelPosition=X("EPDFNumberFormat_SetLabelPosition",2),t._EPDFAnnot_SetLineLeader=X("EPDFAnnot_SetLineLeader",4),t._EPDFAnnot_GetLineLeader=X("EPDFAnnot_GetLineLeader",4),t._EPDFAnnot_SetLineCaption=X("EPDFAnnot_SetLineCaption",4),t._EPDFAnnot_GetLineCaption=X("EPDFAnnot_GetLineCaption",4),t._EPDFAnnot_SetShapeCaption=X("EPDFAnnot_SetShapeCaption",3),t._EPDFAnnot_GetShapeCaption=X("EPDFAnnot_GetShapeCaption",4),t._EPDFPage_GetParsedSize=X("EPDFPage_GetParsedSize",2),t._EPDFPage_IsContentCurrent=X("EPDFPage_IsContentCurrent",1),t._EPDF_PNG_EncodeRGBA=X("EPDF_PNG_EncodeRGBA",6),t._EPDFDoc_ImportPages=X("EPDFDoc_ImportPages",6),t._EPDFDoc_GetImportFieldRoots=X("EPDFDoc_GetImportFieldRoots",5),t._EPDFPage_ApplyRedactions=X("EPDFPage_ApplyRedactions",4),t._EPDF_InitThread=X("EPDF_InitThread",0),t._EPDF_ShutdownThread=X("EPDF_ShutdownThread",0),t._FPDFAnnot_IsSupportedSubtype=X("FPDFAnnot_IsSupportedSubtype",1),t._FPDFPage_CreateAnnot=X("FPDFPage_CreateAnnot",2),t._FPDFPage_GetAnnotCount=X("FPDFPage_GetAnnotCount",1),t._FPDFPage_GetAnnot=X("FPDFPage_GetAnnot",2),t._FPDFPage_GetAnnotIndex=X("FPDFPage_GetAnnotIndex",2),t._FPDFPage_CloseAnnot=X("FPDFPage_CloseAnnot",1),t._FPDFPage_RemoveAnnot=X("FPDFPage_RemoveAnnot",2),t._FPDFAnnot_GetSubtype=X("FPDFAnnot_GetSubtype",1),t._FPDFAnnot_IsObjectSupportedSubtype=X("FPDFAnnot_IsObjectSupportedSubtype",1),t._FPDFAnnot_UpdateObject=X("FPDFAnnot_UpdateObject",2),t._FPDFAnnot_AddInkStroke=X("FPDFAnnot_AddInkStroke",3),t._FPDFAnnot_RemoveInkList=X("FPDFAnnot_RemoveInkList",1),t._FPDFAnnot_AppendObject=X("FPDFAnnot_AppendObject",2),t._FPDFAnnot_GetObjectCount=X("FPDFAnnot_GetObjectCount",1),t._FPDFAnnot_GetObject=X("FPDFAnnot_GetObject",2),t._FPDFAnnot_RemoveObject=X("FPDFAnnot_RemoveObject",2),t._FPDFAnnot_SetColor=X("FPDFAnnot_SetColor",6),t._FPDFAnnot_GetColor=X("FPDFAnnot_GetColor",6),t._FPDFAnnot_HasAttachmentPoints=X("FPDFAnnot_HasAttachmentPoints",1),t._FPDFAnnot_SetAttachmentPoints=X("FPDFAnnot_SetAttachmentPoints",3),t._FPDFAnnot_AppendAttachmentPoints=X("FPDFAnnot_AppendAttachmentPoints",2),t._FPDFAnnot_CountAttachmentPoints=X("FPDFAnnot_CountAttachmentPoints",1),t._FPDFAnnot_GetAttachmentPoints=X("FPDFAnnot_GetAttachmentPoints",3),t._FPDFAnnot_SetRect=X("FPDFAnnot_SetRect",2),t._FPDFAnnot_GetRect=X("FPDFAnnot_GetRect",2),t._FPDFAnnot_GetVertices=X("FPDFAnnot_GetVertices",3),t._FPDFAnnot_GetInkListCount=X("FPDFAnnot_GetInkListCount",1),t._FPDFAnnot_GetInkListPath=X("FPDFAnnot_GetInkListPath",4),t._FPDFAnnot_GetLine=X("FPDFAnnot_GetLine",3),t._FPDFAnnot_SetBorder=X("FPDFAnnot_SetBorder",4),t._FPDFAnnot_GetBorder=X("FPDFAnnot_GetBorder",4),t._FPDFAnnot_HasKey=X("FPDFAnnot_HasKey",2),t._FPDFAnnot_GetValueType=X("FPDFAnnot_GetValueType",2),t._FPDFAnnot_SetStringValue=X("FPDFAnnot_SetStringValue",3),t._FPDFAnnot_GetStringValue=X("FPDFAnnot_GetStringValue",4),t._FPDFAnnot_GetNumberValue=X("FPDFAnnot_GetNumberValue",3),t._FPDFAnnot_SetAP=X("FPDFAnnot_SetAP",3),t._FPDFAnnot_GetAP=X("FPDFAnnot_GetAP",4),t._FPDFAnnot_GetLinkedAnnot=X("FPDFAnnot_GetLinkedAnnot",2),t._FPDFAnnot_GetFlags=X("FPDFAnnot_GetFlags",1),t._FPDFAnnot_SetFlags=X("FPDFAnnot_SetFlags",2),t._FPDFAnnot_GetFormFieldFlags=X("FPDFAnnot_GetFormFieldFlags",2),t._FPDFAnnot_SetFormFieldFlags=X("FPDFAnnot_SetFormFieldFlags",3),t._FPDFAnnot_GetFormFieldAtPoint=X("FPDFAnnot_GetFormFieldAtPoint",3),t._FPDFAnnot_GetFormFieldName=X("FPDFAnnot_GetFormFieldName",4),t._FPDFAnnot_GetFormFieldType=X("FPDFAnnot_GetFormFieldType",2),t._FPDFAnnot_GetFormAdditionalActionJavaScript=X("FPDFAnnot_GetFormAdditionalActionJavaScript",5),t._FPDFAnnot_GetFormFieldAlternateName=X("FPDFAnnot_GetFormFieldAlternateName",4),t._FPDFAnnot_GetFormFieldValue=X("FPDFAnnot_GetFormFieldValue",4),t._FPDFAnnot_GetOptionCount=X("FPDFAnnot_GetOptionCount",2),t._FPDFAnnot_GetOptionLabel=X("FPDFAnnot_GetOptionLabel",5),t._FPDFAnnot_IsOptionSelected=X("FPDFAnnot_IsOptionSelected",3),t._FPDFAnnot_GetFontSize=X("FPDFAnnot_GetFontSize",3),t._FPDFAnnot_SetFontColor=X("FPDFAnnot_SetFontColor",5),t._FPDFAnnot_GetFontColor=X("FPDFAnnot_GetFontColor",5),t._FPDFAnnot_IsChecked=X("FPDFAnnot_IsChecked",2),t._FPDFAnnot_SetFocusableSubtypes=X("FPDFAnnot_SetFocusableSubtypes",3),t._FPDFAnnot_GetFocusableSubtypesCount=X("FPDFAnnot_GetFocusableSubtypesCount",1),t._FPDFAnnot_GetFocusableSubtypes=X("FPDFAnnot_GetFocusableSubtypes",3),t._FPDFAnnot_GetLink=X("FPDFAnnot_GetLink",1),t._FPDFAnnot_GetFormControlCount=X("FPDFAnnot_GetFormControlCount",2),t._FPDFAnnot_GetFormControlIndex=X("FPDFAnnot_GetFormControlIndex",2),t._FPDFAnnot_GetFormFieldExportValue=X("FPDFAnnot_GetFormFieldExportValue",4),t._FPDFAnnot_SetURI=X("FPDFAnnot_SetURI",2),t._FPDFAnnot_GetFileAttachment=X("FPDFAnnot_GetFileAttachment",1),t._FPDFAnnot_AddFileAttachment=X("FPDFAnnot_AddFileAttachment",2),t._FPDFDoc_GetAttachmentCount=X("FPDFDoc_GetAttachmentCount",1),t._FPDFDoc_AddAttachment=X("FPDFDoc_AddAttachment",2),t._FPDFDoc_GetAttachment=X("FPDFDoc_GetAttachment",2),t._EPDFDoc_GetAttachmentKey=X("EPDFDoc_GetAttachmentKey",4),t._EPDFDoc_GetAttachmentIndexByKey=X("EPDFDoc_GetAttachmentIndexByKey",2),t._FPDFDoc_DeleteAttachment=X("FPDFDoc_DeleteAttachment",2),t._FPDFAttachment_GetName=X("FPDFAttachment_GetName",3),t._FPDFAttachment_HasKey=X("FPDFAttachment_HasKey",2),t._FPDFAttachment_GetValueType=X("FPDFAttachment_GetValueType",2),t._FPDFAttachment_SetStringValue=X("FPDFAttachment_SetStringValue",3),t._FPDFAttachment_GetStringValue=X("FPDFAttachment_GetStringValue",4),t._FPDFAttachment_SetDescription=X("FPDFAttachment_SetDescription",2),t._FPDFAttachment_GetDescription=X("FPDFAttachment_GetDescription",3),t._FPDFAttachment_SetFile=X("FPDFAttachment_SetFile",4),t._FPDFAttachment_GetFile=X("FPDFAttachment_GetFile",4),t._FPDFAttachment_GetSubtype=X("FPDFAttachment_GetSubtype",3),t._FPDFAttachment_GetAFRelationship=X("FPDFAttachment_GetAFRelationship",3),t._EPDFAttachment_SetSubtype=X("EPDFAttachment_SetSubtype",2),t._EPDFAttachment_SetDescription=X("EPDFAttachment_SetDescription",2),t._EPDFAttachment_SetName=X("EPDFAttachment_SetName",2),t._EPDFAttachment_GetDescription=X("EPDFAttachment_GetDescription",3),t._EPDFAttachment_GetIntegerValue=X("EPDFAttachment_GetIntegerValue",3),t._EPDFAttachment_ExtractFile=X("EPDFAttachment_ExtractFile",6),t._EPDFAttachment_ExtractFileToOwnedBuffer=X("EPDFAttachment_ExtractFileToOwnedBuffer",6),t._FPDFCatalog_IsTagged=X("FPDFCatalog_IsTagged",1),t._FPDFCatalog_GetLanguage=X("FPDFCatalog_GetLanguage",3),t._FPDFCatalog_SetLanguage=X("FPDFCatalog_SetLanguage",2),t._EPDFCatalog_GetLanguage=X("EPDFCatalog_GetLanguage",3),t._FPDFAvail_Create=X("FPDFAvail_Create",2),t._FPDFAvail_Destroy=X("FPDFAvail_Destroy",1),t._FPDFAvail_IsDocAvail=X("FPDFAvail_IsDocAvail",2),t._FPDFAvail_GetDocument=X("FPDFAvail_GetDocument",2),t._FPDFAvail_GetFirstPageNum=X("FPDFAvail_GetFirstPageNum",1),t._FPDFAvail_IsPageAvail=X("FPDFAvail_IsPageAvail",3),t._FPDFAvail_IsFormAvail=X("FPDFAvail_IsFormAvail",2),t._FPDFAvail_IsLinearized=X("FPDFAvail_IsLinearized",1),t._FPDFBookmark_GetFirstChild=X("FPDFBookmark_GetFirstChild",2),t._FPDFBookmark_GetNextSibling=X("FPDFBookmark_GetNextSibling",2),t._FPDFBookmark_GetTitle=X("FPDFBookmark_GetTitle",3),t._FPDFBookmark_GetCount=X("FPDFBookmark_GetCount",1),t._FPDFBookmark_Find=X("FPDFBookmark_Find",2),t._FPDFBookmark_GetDest=X("FPDFBookmark_GetDest",2),t._FPDFBookmark_GetAction=X("FPDFBookmark_GetAction",1),t._FPDFBookmark_GetColor=X("FPDFBookmark_GetColor",4),t._FPDFBookmark_GetStyle=X("FPDFBookmark_GetStyle",1),t._FPDFAction_GetType=X("FPDFAction_GetType",1),t._FPDFAction_GetDest=X("FPDFAction_GetDest",2),t._FPDFAction_GetFilePath=X("FPDFAction_GetFilePath",3),t._FPDFAction_GetURIPath=X("FPDFAction_GetURIPath",4),t._FPDFDest_GetDestPageIndex=X("FPDFDest_GetDestPageIndex",2),t._EPDFDest_GetPageObjectNumber=X("EPDFDest_GetPageObjectNumber",2),t._FPDFDest_GetView=X("FPDFDest_GetView",3),t._FPDFDest_GetLocationInPage=X("FPDFDest_GetLocationInPage",7),t._FPDFLink_GetLinkAtPoint=X("FPDFLink_GetLinkAtPoint",3),t._FPDFLink_GetLinkZOrderAtPoint=X("FPDFLink_GetLinkZOrderAtPoint",3),t._FPDFLink_GetDest=X("FPDFLink_GetDest",2),t._FPDFLink_GetAction=X("FPDFLink_GetAction",1),t._FPDFLink_Enumerate=X("FPDFLink_Enumerate",3),t._FPDFLink_GetAnnot=X("FPDFLink_GetAnnot",2),t._FPDFLink_GetAnnotRect=X("FPDFLink_GetAnnotRect",2),t._FPDFLink_CountQuadPoints=X("FPDFLink_CountQuadPoints",1),t._FPDFLink_GetQuadPoints=X("FPDFLink_GetQuadPoints",3),t._FPDF_GetPageAAction=X("FPDF_GetPageAAction",2),t._FPDF_GetFileIdentifier=X("FPDF_GetFileIdentifier",4),t._FPDF_GetMetaText=X("FPDF_GetMetaText",4),t._FPDF_GetPageLabel=X("FPDF_GetPageLabel",4),t._EPDF_SetMetaText=X("EPDF_SetMetaText",3),t._EPDF_HasMetaText=X("EPDF_HasMetaText",2),t._EPDF_GetMetaTrapped=X("EPDF_GetMetaTrapped",1),t._EPDF_SetMetaTrapped=X("EPDF_SetMetaTrapped",2),t._EPDF_GetMetaKeyCount=X("EPDF_GetMetaKeyCount",2),t._EPDF_GetMetaKeyName=X("EPDF_GetMetaKeyName",5),t._FPDFPageObj_NewImageObj=X("FPDFPageObj_NewImageObj",1),t._FPDFImageObj_LoadJpegFile=X("FPDFImageObj_LoadJpegFile",4),t._FPDFImageObj_LoadJpegFileInline=X("FPDFImageObj_LoadJpegFileInline",4),t._FPDFImageObj_SetMatrix=X("FPDFImageObj_SetMatrix",7),t._FPDFImageObj_SetBitmap=X("FPDFImageObj_SetBitmap",4),t._FPDFImageObj_GetBitmap=X("FPDFImageObj_GetBitmap",1),t._FPDFImageObj_GetRenderedBitmap=X("FPDFImageObj_GetRenderedBitmap",3),t._FPDFImageObj_GetImageDataDecoded=X("FPDFImageObj_GetImageDataDecoded",3),t._FPDFImageObj_GetImageDataRaw=X("FPDFImageObj_GetImageDataRaw",3),t._FPDFImageObj_GetImageFilterCount=X("FPDFImageObj_GetImageFilterCount",1),t._FPDFImageObj_GetImageFilter=X("FPDFImageObj_GetImageFilter",4),t._FPDFImageObj_GetImageMetadata=X("FPDFImageObj_GetImageMetadata",3),t._FPDFImageObj_GetImagePixelSize=X("FPDFImageObj_GetImagePixelSize",3),t._FPDFImageObj_GetIccProfileDataDecoded=X("FPDFImageObj_GetIccProfileDataDecoded",5),t._EPDFImageObj_SetPng=X("EPDFImageObj_SetPng",5),t._EPDFImageObj_SetJpeg=X("EPDFImageObj_SetJpeg",5),t._FPDF_CreateNewDocument=X("FPDF_CreateNewDocument",0),t._FPDFPage_Delete=X("FPDFPage_Delete",2),t._FPDF_MovePages=X("FPDF_MovePages",4),t._FPDFPage_New=X("FPDFPage_New",4),t._EPDFPage_InsertBlankRaw=X("EPDFPage_InsertBlankRaw",5),t._FPDFPage_GetRotation=X("FPDFPage_GetRotation",1),t._FPDFPage_InsertObject=X("FPDFPage_InsertObject",2),t._FPDFPage_InsertObjectAtIndex=X("FPDFPage_InsertObjectAtIndex",3),t._FPDFPage_RemoveObject=X("FPDFPage_RemoveObject",2),t._FPDFPage_CountObjects=X("FPDFPage_CountObjects",1),t._FPDFPage_GetObject=X("FPDFPage_GetObject",2),t._FPDFPage_HasTransparency=X("FPDFPage_HasTransparency",1),t._FPDFPageObj_Destroy=X("FPDFPageObj_Destroy",1),t._FPDFPageObj_GetMarkedContentID=X("FPDFPageObj_GetMarkedContentID",1),t._FPDFPageObj_CountMarks=X("FPDFPageObj_CountMarks",1),t._FPDFPageObj_GetMark=X("FPDFPageObj_GetMark",2),t._FPDFPageObj_AddExistingMark=X("FPDFPageObj_AddExistingMark",2),t._FPDFPageObj_AddMark=X("FPDFPageObj_AddMark",2),t._FPDFPageObj_RemoveMark=X("FPDFPageObj_RemoveMark",2),t._FPDFPageObjMark_GetName=X("FPDFPageObjMark_GetName",4),t._FPDFPageObjMark_CountParams=X("FPDFPageObjMark_CountParams",1),t._FPDFPageObjMark_GetParamKey=X("FPDFPageObjMark_GetParamKey",5),t._FPDFPageObjMark_GetParamValueType=X("FPDFPageObjMark_GetParamValueType",2),t._FPDFPageObjMark_GetParamIntValue=X("FPDFPageObjMark_GetParamIntValue",3),t._FPDFPageObjMark_GetParamFloatValue=X("FPDFPageObjMark_GetParamFloatValue",3),t._FPDFPageObjMark_GetParamStringValue=X("FPDFPageObjMark_GetParamStringValue",5),t._FPDFPageObjMark_GetParamBlobValue=X("FPDFPageObjMark_GetParamBlobValue",5),t._FPDFPageObj_HasTransparency=X("FPDFPageObj_HasTransparency",1),t._FPDFPageObjMark_SetIntParam=X("FPDFPageObjMark_SetIntParam",5),t._FPDFPageObjMark_SetFloatParam=X("FPDFPageObjMark_SetFloatParam",5),t._FPDFPageObjMark_SetStringParam=X("FPDFPageObjMark_SetStringParam",5),t._FPDFPageObjMark_SetBlobParam=X("FPDFPageObjMark_SetBlobParam",6),t._FPDFPageObjMark_RemoveParam=X("FPDFPageObjMark_RemoveParam",3),t._FPDFPageObj_GetType=X("FPDFPageObj_GetType",1),t._FPDFPageObj_GetIsActive=X("FPDFPageObj_GetIsActive",2),t._FPDFPageObj_SetIsActive=X("FPDFPageObj_SetIsActive",2),t._FPDFPage_GenerateContent=X("FPDFPage_GenerateContent",1),t._FPDFPageObj_Transform=X("FPDFPageObj_Transform",7),t._FPDFPageObj_TransformF=X("FPDFPageObj_TransformF",2),t._FPDFPageObj_GetMatrix=X("FPDFPageObj_GetMatrix",2),t._FPDFPageObj_SetMatrix=X("FPDFPageObj_SetMatrix",2),t._FPDFPageObj_SetBlendMode=X("FPDFPageObj_SetBlendMode",2),t._FPDFPage_TransformAnnots=X("FPDFPage_TransformAnnots",7),t._FPDFPage_SetRotation=X("FPDFPage_SetRotation",2),t._FPDFPageObj_SetFillColor=X("FPDFPageObj_SetFillColor",5),t._FPDFPageObj_GetFillColor=X("FPDFPageObj_GetFillColor",5),t._FPDFPageObj_GetBounds=X("FPDFPageObj_GetBounds",5),t._FPDFPageObj_GetRotatedBounds=X("FPDFPageObj_GetRotatedBounds",2),t._FPDFPageObj_SetStrokeColor=X("FPDFPageObj_SetStrokeColor",5),t._FPDFPageObj_GetStrokeColor=X("FPDFPageObj_GetStrokeColor",5),t._FPDFPageObj_SetStrokeWidth=X("FPDFPageObj_SetStrokeWidth",2),t._FPDFPageObj_GetStrokeWidth=X("FPDFPageObj_GetStrokeWidth",2),t._FPDFPageObj_GetLineJoin=X("FPDFPageObj_GetLineJoin",1),t._FPDFPageObj_SetLineJoin=X("FPDFPageObj_SetLineJoin",2),t._FPDFPageObj_GetLineCap=X("FPDFPageObj_GetLineCap",1),t._FPDFPageObj_SetLineCap=X("FPDFPageObj_SetLineCap",2),t._FPDFPageObj_GetDashPhase=X("FPDFPageObj_GetDashPhase",2),t._FPDFPageObj_SetDashPhase=X("FPDFPageObj_SetDashPhase",2),t._FPDFPageObj_GetDashCount=X("FPDFPageObj_GetDashCount",1),t._FPDFPageObj_GetDashArray=X("FPDFPageObj_GetDashArray",3),t._FPDFPageObj_SetDashArray=X("FPDFPageObj_SetDashArray",4),t._FPDFPageObj_GetRenderedStrokePattern=X("FPDFPageObj_GetRenderedStrokePattern",2),t._FPDFPageObj_GetRenderedFillPattern=X("FPDFPageObj_GetRenderedFillPattern",2),t._FPDFFormObj_CountObjects=X("FPDFFormObj_CountObjects",1),t._FPDFFormObj_GetObject=X("FPDFFormObj_GetObject",2),t._FPDFFormObj_RemoveObject=X("FPDFFormObj_RemoveObject",2),t._FPDFPageObj_CreateNewPath=X("FPDFPageObj_CreateNewPath",2),t._FPDFPageObj_CreateNewRect=X("FPDFPageObj_CreateNewRect",4),t._FPDFPath_CountSegments=X("FPDFPath_CountSegments",1),t._FPDFPath_GetPathSegment=X("FPDFPath_GetPathSegment",2),t._FPDFPath_MoveTo=X("FPDFPath_MoveTo",3),t._FPDFPath_LineTo=X("FPDFPath_LineTo",3),t._FPDFPath_BezierTo=X("FPDFPath_BezierTo",7),t._FPDFPath_GetBezierControlPoints=X("FPDFPath_GetBezierControlPoints",4),t._FPDFPath_Close=X("FPDFPath_Close",1),t._FPDFPath_SetDrawMode=X("FPDFPath_SetDrawMode",3),t._FPDFPath_GetDrawMode=X("FPDFPath_GetDrawMode",3),t._FPDFPathSegment_GetPoint=X("FPDFPathSegment_GetPoint",3),t._FPDFPathSegment_GetType=X("FPDFPathSegment_GetType",1),t._FPDFPathSegment_GetClose=X("FPDFPathSegment_GetClose",1),t._FPDFPageObj_NewTextObj=X("FPDFPageObj_NewTextObj",3),t._FPDFText_SetText=X("FPDFText_SetText",2),t._FPDFText_SetCharcodes=X("FPDFText_SetCharcodes",3),t._FPDFText_SetPositions=X("FPDFText_SetPositions",3),t._FPDFText_LoadFont=X("FPDFText_LoadFont",5),t._FPDFText_LoadStandardFont=X("FPDFText_LoadStandardFont",2),t._FPDFText_LoadCidType2Font=X("FPDFText_LoadCidType2Font",6),t._FPDFTextObj_GetFontSize=X("FPDFTextObj_GetFontSize",2),t._FPDFTextObj_SetFontSize=X("FPDFTextObj_SetFontSize",2),t._FPDFTextObj_GetText=X("FPDFTextObj_GetText",4),t._FPDFTextObj_GetRenderedBitmap=X("FPDFTextObj_GetRenderedBitmap",4),t._FPDFFont_Close=X("FPDFFont_Close",1),t._FPDFPageObj_CreateTextObj=X("FPDFPageObj_CreateTextObj",3),t._FPDFTextObj_GetTextRenderMode=X("FPDFTextObj_GetTextRenderMode",1),t._FPDFTextObj_SetTextRenderMode=X("FPDFTextObj_SetTextRenderMode",2),t._FPDFTextObj_GetFont=X("FPDFTextObj_GetFont",1),t._FPDFFont_GetBaseFontName=X("FPDFFont_GetBaseFontName",3),t._FPDFFont_GetFamilyName=X("FPDFFont_GetFamilyName",3),t._FPDFFont_GetFontData=X("FPDFFont_GetFontData",4),t._FPDFFont_GetIsEmbedded=X("FPDFFont_GetIsEmbedded",1),t._FPDFFont_GetFlags=X("FPDFFont_GetFlags",1),t._FPDFFont_GetWeight=X("FPDFFont_GetWeight",1),t._FPDFFont_GetItalicAngle=X("FPDFFont_GetItalicAngle",2),t._FPDFFont_GetAscent=X("FPDFFont_GetAscent",3),t._FPDFFont_GetDescent=X("FPDFFont_GetDescent",3),t._FPDFFont_GetGlyphWidth=X("FPDFFont_GetGlyphWidth",4),t._FPDFFont_GetGlyphPath=X("FPDFFont_GetGlyphPath",3),t._FPDFGlyphPath_CountGlyphSegments=X("FPDFGlyphPath_CountGlyphSegments",1),t._FPDFGlyphPath_GetGlyphPathSegment=X("FPDFGlyphPath_GetGlyphPathSegment",2),t._EPDFText_RedactInRect=X("EPDFText_RedactInRect",4),t._EPDFText_RedactInQuads=X("EPDFText_RedactInQuads",5),t._FPDFDoc_GetPageMode=X("FPDFDoc_GetPageMode",1),t._FPDFPage_Flatten=X("FPDFPage_Flatten",2),t._FPDFPage_HasFormFieldAtPoint=X("FPDFPage_HasFormFieldAtPoint",4),t._FPDFPage_FormFieldZOrderAtPoint=X("FPDFPage_FormFieldZOrderAtPoint",4),t._FPDFDOC_InitFormFillEnvironment=X("FPDFDOC_InitFormFillEnvironment",2),t._FPDFDOC_ExitFormFillEnvironment=X("FPDFDOC_ExitFormFillEnvironment",1),t._FORM_OnMouseMove=X("FORM_OnMouseMove",5),t._FORM_OnMouseWheel=X("FORM_OnMouseWheel",6),t._FORM_OnFocus=X("FORM_OnFocus",5),t._FORM_OnLButtonDown=X("FORM_OnLButtonDown",5),t._FORM_OnLButtonUp=X("FORM_OnLButtonUp",5),t._FORM_OnLButtonDoubleClick=X("FORM_OnLButtonDoubleClick",5),t._FORM_OnRButtonDown=X("FORM_OnRButtonDown",5),t._FORM_OnRButtonUp=X("FORM_OnRButtonUp",5),t._FORM_OnKeyDown=X("FORM_OnKeyDown",4),t._FORM_OnKeyUp=X("FORM_OnKeyUp",4),t._FORM_OnChar=X("FORM_OnChar",4),t._FORM_GetFocusedText=X("FORM_GetFocusedText",4),t._FORM_GetSelectedText=X("FORM_GetSelectedText",4),t._FORM_ReplaceAndKeepSelection=X("FORM_ReplaceAndKeepSelection",3),t._FORM_ReplaceSelection=X("FORM_ReplaceSelection",3),t._FORM_SelectAllText=X("FORM_SelectAllText",2),t._FORM_CanUndo=X("FORM_CanUndo",2),t._FORM_CanRedo=X("FORM_CanRedo",2),t._FORM_Undo=X("FORM_Undo",2),t._FORM_Redo=X("FORM_Redo",2),t._FORM_ForceToKillFocus=X("FORM_ForceToKillFocus",1),t._FORM_GetFocusedAnnot=X("FORM_GetFocusedAnnot",3),t._FORM_SetFocusedAnnot=X("FORM_SetFocusedAnnot",2),t._FPDF_FFLDraw=X("FPDF_FFLDraw",9),t._FPDF_SetFormFieldHighlightColor=X("FPDF_SetFormFieldHighlightColor",3),t._FPDF_SetFormFieldHighlightAlpha=X("FPDF_SetFormFieldHighlightAlpha",2),t._FPDF_RemoveFormFieldHighlight=X("FPDF_RemoveFormFieldHighlight",1),t._FORM_OnAfterLoadPage=X("FORM_OnAfterLoadPage",2),t._FORM_OnBeforeClosePage=X("FORM_OnBeforeClosePage",2),t._FORM_DoDocumentJSAction=X("FORM_DoDocumentJSAction",1),t._FORM_DoDocumentOpenAction=X("FORM_DoDocumentOpenAction",1),t._FORM_DoDocumentAAction=X("FORM_DoDocumentAAction",2),t._FORM_DoPageAAction=X("FORM_DoPageAAction",3),t._FORM_SetIndexSelected=X("FORM_SetIndexSelected",4),t._FORM_IsIndexSelected=X("FORM_IsIndexSelected",3),t._FORM_GetTextDirection=X("FORM_GetTextDirection",2),t._FORM_SetTextDirection=X("FORM_SetTextDirection",3),t._FPDFDoc_GetJavaScriptActionCount=X("FPDFDoc_GetJavaScriptActionCount",1),t._FPDFDoc_GetJavaScriptAction=X("FPDFDoc_GetJavaScriptAction",2),t._EPDFDoc_GetNamedJavaScriptActionModel=X("EPDFDoc_GetNamedJavaScriptActionModel",2),t._FPDFDoc_CloseJavaScriptAction=X("FPDFDoc_CloseJavaScriptAction",1),t._FPDFJavaScriptAction_GetName=X("FPDFJavaScriptAction_GetName",3),t._FPDFJavaScriptAction_GetScript=X("FPDFJavaScriptAction_GetScript",3),t._FPDF_ImportPagesByIndex=X("FPDF_ImportPagesByIndex",5),t._FPDF_ImportPages=X("FPDF_ImportPages",4),t._FPDF_ImportNPagesToOne=X("FPDF_ImportNPagesToOne",5),t._FPDF_NewXObjectFromPage=X("FPDF_NewXObjectFromPage",3),t._FPDF_CloseXObject=X("FPDF_CloseXObject",1),t._FPDF_NewFormObjectFromXObject=X("FPDF_NewFormObjectFromXObject",1),t._FPDF_CopyViewerPreferences=X("FPDF_CopyViewerPreferences",2),t._FPDF_RenderPageBitmapWithColorScheme_Start=X("FPDF_RenderPageBitmapWithColorScheme_Start",10),t._FPDF_RenderPageBitmap_Start=X("FPDF_RenderPageBitmap_Start",9),t._FPDF_RenderPage_Continue=X("FPDF_RenderPage_Continue",2),t._FPDF_RenderPage_Close=X("FPDF_RenderPage_Close",1),t._EPDF_RenderPageBitmapWithMatrix_Start=X("EPDF_RenderPageBitmapWithMatrix_Start",6),t._EPDF_RenderPage_Continue=X("EPDF_RenderPage_Continue",2),t._EPDF_FreeBuffer=X("EPDF_FreeBuffer",1),t._FPDF_SaveAsCopy=X("FPDF_SaveAsCopy",3),t._FPDF_SaveWithVersion=X("FPDF_SaveWithVersion",4),t._EPDF_SaveDocumentToOwnedBuffer=X("EPDF_SaveDocumentToOwnedBuffer",3),t._EPDF_SaveDocumentToOwnedBufferWithVersion=X("EPDF_SaveDocumentToOwnedBufferWithVersion",4),t._EPDF_SaveDocumentToOwnedBufferEx=X("EPDF_SaveDocumentToOwnedBufferEx",5),t._EPDF_SaveAsCopyEx=X("EPDF_SaveAsCopyEx",4),t._FPDFText_GetCharIndexFromTextIndex=X("FPDFText_GetCharIndexFromTextIndex",2),t._FPDFText_GetTextIndexFromCharIndex=X("FPDFText_GetTextIndexFromCharIndex",2),t._FPDF_GetSignatureCount=X("FPDF_GetSignatureCount",1),t._FPDF_GetSignatureObject=X("FPDF_GetSignatureObject",2),t._FPDFSignatureObj_GetContents=X("FPDFSignatureObj_GetContents",3),t._FPDFSignatureObj_GetByteRange=X("FPDFSignatureObj_GetByteRange",3),t._FPDFSignatureObj_GetSubFilter=X("FPDFSignatureObj_GetSubFilter",3),t._FPDFSignatureObj_GetReason=X("FPDFSignatureObj_GetReason",3),t._FPDFSignatureObj_GetTime=X("FPDFSignatureObj_GetTime",3),t._FPDFSignatureObj_GetDocMDPPermission=X("FPDFSignatureObj_GetDocMDPPermission",1),t._FPDF_StructTree_GetForPage=X("FPDF_StructTree_GetForPage",1),t._FPDF_StructTree_Close=X("FPDF_StructTree_Close",1),t._FPDF_StructTree_CountChildren=X("FPDF_StructTree_CountChildren",1),t._FPDF_StructTree_GetChildAtIndex=X("FPDF_StructTree_GetChildAtIndex",2),t._FPDF_StructElement_GetAltText=X("FPDF_StructElement_GetAltText",3),t._FPDF_StructElement_GetActualText=X("FPDF_StructElement_GetActualText",3),t._FPDF_StructElement_GetExpansion=X("FPDF_StructElement_GetExpansion",3),t._FPDF_StructElement_GetID=X("FPDF_StructElement_GetID",3),t._FPDF_StructElement_GetLang=X("FPDF_StructElement_GetLang",3),t._FPDF_StructElement_GetAttributeCount=X("FPDF_StructElement_GetAttributeCount",1),t._FPDF_StructElement_GetAttributeAtIndex=X("FPDF_StructElement_GetAttributeAtIndex",2),t._FPDF_StructElement_GetStringAttribute=X("FPDF_StructElement_GetStringAttribute",4),t._FPDF_StructElement_GetMarkedContentID=X("FPDF_StructElement_GetMarkedContentID",1),t._FPDF_StructElement_GetRawType=X("FPDF_StructElement_GetRawType",3),t._FPDF_StructElement_GetType=X("FPDF_StructElement_GetType",3),t._FPDF_StructElement_GetObjType=X("FPDF_StructElement_GetObjType",3),t._FPDF_StructElement_GetTitle=X("FPDF_StructElement_GetTitle",3),t._FPDF_StructElement_CountChildren=X("FPDF_StructElement_CountChildren",1),t._FPDF_StructElement_GetChildAtIndex=X("FPDF_StructElement_GetChildAtIndex",2),t._FPDF_StructElement_GetChildMarkedContentID=X("FPDF_StructElement_GetChildMarkedContentID",2),t._FPDF_StructElement_GetParent=X("FPDF_StructElement_GetParent",1),t._FPDF_StructElement_Attr_GetCount=X("FPDF_StructElement_Attr_GetCount",1),t._FPDF_StructElement_Attr_GetName=X("FPDF_StructElement_Attr_GetName",5),t._FPDF_StructElement_Attr_GetValue=X("FPDF_StructElement_Attr_GetValue",2),t._FPDF_StructElement_Attr_GetType=X("FPDF_StructElement_Attr_GetType",1),t._FPDF_StructElement_Attr_GetBooleanValue=X("FPDF_StructElement_Attr_GetBooleanValue",2),t._FPDF_StructElement_Attr_GetNumberValue=X("FPDF_StructElement_Attr_GetNumberValue",2),t._FPDF_StructElement_Attr_GetStringValue=X("FPDF_StructElement_Attr_GetStringValue",4),t._FPDF_StructElement_Attr_GetBlobValue=X("FPDF_StructElement_Attr_GetBlobValue",4),t._FPDF_StructElement_Attr_CountChildren=X("FPDF_StructElement_Attr_CountChildren",1),t._FPDF_StructElement_Attr_GetChildAtIndex=X("FPDF_StructElement_Attr_GetChildAtIndex",2),t._FPDF_StructElement_GetMarkedContentIdCount=X("FPDF_StructElement_GetMarkedContentIdCount",1),t._FPDF_StructElement_GetMarkedContentIdAtIndex=X("FPDF_StructElement_GetMarkedContentIdAtIndex",2),t._FPDF_AddInstalledFont=X("FPDF_AddInstalledFont",3),t._FPDF_SetSystemFontInfo=X("FPDF_SetSystemFontInfo",1),t._FPDF_GetDefaultTTFMap=X("FPDF_GetDefaultTTFMap",0),t._FPDF_GetDefaultTTFMapCount=X("FPDF_GetDefaultTTFMapCount",0),t._FPDF_GetDefaultTTFMapEntry=X("FPDF_GetDefaultTTFMapEntry",1),t._FPDF_GetDefaultSystemFontInfo=X("FPDF_GetDefaultSystemFontInfo",0),t._FPDF_FreeDefaultSystemFontInfo=X("FPDF_FreeDefaultSystemFontInfo",1),t._FPDFText_LoadPage=X("FPDFText_LoadPage",1),t._FPDFText_ClosePage=X("FPDFText_ClosePage",1),t._FPDFText_CountChars=X("FPDFText_CountChars",1),t._FPDFText_GetUnicode=X("FPDFText_GetUnicode",2),t._FPDFText_GetTextObject=X("FPDFText_GetTextObject",2),t._FPDFText_IsGenerated=X("FPDFText_IsGenerated",2),t._FPDFText_IsHyphen=X("FPDFText_IsHyphen",2),t._FPDFText_HasUnicodeMapError=X("FPDFText_HasUnicodeMapError",2),t._FPDFText_GetFontSize=X("FPDFText_GetFontSize",2),t._FPDFText_GetFontInfo=X("FPDFText_GetFontInfo",5),t._FPDFText_GetFontWeight=X("FPDFText_GetFontWeight",2),t._FPDFText_GetFillColor=X("FPDFText_GetFillColor",6),t._FPDFText_GetStrokeColor=X("FPDFText_GetStrokeColor",6),t._FPDFText_GetCharAngle=X("FPDFText_GetCharAngle",2),t._FPDFText_GetCharBox=X("FPDFText_GetCharBox",6),t._FPDFText_GetLooseCharBox=X("FPDFText_GetLooseCharBox",3),t._EPDFText_GetCharGeometry=X("EPDFText_GetCharGeometry",3),t._EPDFText_GetPageGeometry=X("EPDFText_GetPageGeometry",4),t._EPDFText_GetTextFull=X("EPDFText_GetTextFull",3),t._EPDFText_GetCharToTextMap=X("EPDFText_GetCharToTextMap",3),t._FPDFText_GetMatrix=X("FPDFText_GetMatrix",3),t._FPDFText_GetCharOrigin=X("FPDFText_GetCharOrigin",4),t._FPDFText_GetCharIndexAtPos=X("FPDFText_GetCharIndexAtPos",5),t._FPDFText_GetText=X("FPDFText_GetText",4),t._FPDFText_CountRects=X("FPDFText_CountRects",3),t._FPDFText_GetRect=X("FPDFText_GetRect",6),t._FPDFText_GetBoundedText=X("FPDFText_GetBoundedText",7),t._FPDFText_FindStart=X("FPDFText_FindStart",4),t._FPDFText_FindNext=X("FPDFText_FindNext",1),t._FPDFText_FindPrev=X("FPDFText_FindPrev",1),t._FPDFText_GetSchResultIndex=X("FPDFText_GetSchResultIndex",1),t._FPDFText_GetSchCount=X("FPDFText_GetSchCount",1),t._FPDFText_FindClose=X("FPDFText_FindClose",1),t._FPDFLink_LoadWebLinks=X("FPDFLink_LoadWebLinks",1),t._FPDFLink_CountWebLinks=X("FPDFLink_CountWebLinks",1),t._FPDFLink_GetURL=X("FPDFLink_GetURL",4),t._FPDFLink_CountRects=X("FPDFLink_CountRects",2),t._FPDFLink_GetRect=X("FPDFLink_GetRect",7),t._FPDFLink_GetTextRange=X("FPDFLink_GetTextRange",4),t._FPDFLink_CloseWebLinks=X("FPDFLink_CloseWebLinks",1),t._FPDFPage_GetDecodedThumbnailData=X("FPDFPage_GetDecodedThumbnailData",3),t._FPDFPage_GetRawThumbnailData=X("FPDFPage_GetRawThumbnailData",3),t._FPDFPage_GetThumbnailAsBitmap=X("FPDFPage_GetThumbnailAsBitmap",1),t._FPDFPage_SetMediaBox=X("FPDFPage_SetMediaBox",5),t._FPDFPage_SetCropBox=X("FPDFPage_SetCropBox",5),t._FPDFPage_SetBleedBox=X("FPDFPage_SetBleedBox",5),t._FPDFPage_SetTrimBox=X("FPDFPage_SetTrimBox",5),t._FPDFPage_SetArtBox=X("FPDFPage_SetArtBox",5),t._FPDFPage_GetMediaBox=X("FPDFPage_GetMediaBox",5),t._FPDFPage_GetCropBox=X("FPDFPage_GetCropBox",5),t._FPDFPage_GetBleedBox=X("FPDFPage_GetBleedBox",5),t._FPDFPage_GetTrimBox=X("FPDFPage_GetTrimBox",5),t._FPDFPage_GetArtBox=X("FPDFPage_GetArtBox",5),t._FPDFPage_TransFormWithClip=X("FPDFPage_TransFormWithClip",3),t._FPDFPageObj_TransformClipPath=X("FPDFPageObj_TransformClipPath",7),t._FPDFPageObj_GetClipPath=X("FPDFPageObj_GetClipPath",1),t._FPDFClipPath_CountPaths=X("FPDFClipPath_CountPaths",1),t._FPDFClipPath_CountPathSegments=X("FPDFClipPath_CountPathSegments",2),t._FPDFClipPath_GetPathSegment=X("FPDFClipPath_GetPathSegment",3),t._FPDF_CreateClipPath=X("FPDF_CreateClipPath",4),t._FPDF_DestroyClipPath=X("FPDF_DestroyClipPath",1),t._FPDFPage_InsertClipPath=X("FPDFPage_InsertClipPath",2),t._FPDF_InitLibrary=X("FPDF_InitLibrary",0),t._FPDF_InitLibraryWithConfig=X("FPDF_InitLibraryWithConfig",1),t._FPDF_DestroyLibrary=X("FPDF_DestroyLibrary",0),t._FPDF_SetSandBoxPolicy=X("FPDF_SetSandBoxPolicy",2),t._FPDF_LoadDocument=X("FPDF_LoadDocument",2),t._FPDF_GetFormType=X("FPDF_GetFormType",1),t._FPDF_LoadXFA=X("FPDF_LoadXFA",1),t._FPDF_LoadMemDocument=X("FPDF_LoadMemDocument",3),t._FPDF_LoadMemDocument64=X("FPDF_LoadMemDocument64",3),t._FPDF_LoadCustomDocument=X("FPDF_LoadCustomDocument",2),t._FPDF_GetFileVersion=X("FPDF_GetFileVersion",2),t._FPDF_DocumentHasValidCrossReferenceTable=X("FPDF_DocumentHasValidCrossReferenceTable",1),t._FPDF_GetDocPermissions=X("FPDF_GetDocPermissions",1),t._FPDF_GetDocUserPermissions=X("FPDF_GetDocUserPermissions",1),t._FPDF_GetSecurityHandlerRevision=X("FPDF_GetSecurityHandlerRevision",1),t._EPDF_SetEncryption=X("EPDF_SetEncryption",4),t._EPDF_RemoveEncryption=X("EPDF_RemoveEncryption",1),t._EPDF_UnlockOwnerPermissions=X("EPDF_UnlockOwnerPermissions",2),t._EPDF_CheckPasswordPermissions=X("EPDF_CheckPasswordPermissions",6),t._EPDF_SetRuntimeOwnerPermissions=X("EPDF_SetRuntimeOwnerPermissions",2),t._EPDF_IsEncrypted=X("EPDF_IsEncrypted",1),t._EPDF_IsOwnerUnlocked=X("EPDF_IsOwnerUnlocked",1),t._FPDF_GetPageCount=X("FPDF_GetPageCount",1),t._FPDF_LoadPage=X("FPDF_LoadPage",2),t._EPDFDoc_LoadPageByObjectNumber=X("EPDFDoc_LoadPageByObjectNumber",2),t._EPDFDoc_LoadPageByObjectNumberNormalized=X("EPDFDoc_LoadPageByObjectNumberNormalized",2),t._EPDFDoc_GetPageObjectNumberByIndex=X("EPDFDoc_GetPageObjectNumberByIndex",2),t._EPDFDoc_DeletePageByObjectNumber=X("EPDFDoc_DeletePageByObjectNumber",2),t._EPDFDoc_SetPageRotationByObjectNumber=X("EPDFDoc_SetPageRotationByObjectNumber",3),t._EPDFDoc_StartLoadPageByObjectNumber=X("EPDFDoc_StartLoadPageByObjectNumber",3),t._EPDFPage_ContinueLoad=X("EPDFPage_ContinueLoad",2),t._EPDFPage_GetObjectNumber=X("EPDFPage_GetObjectNumber",1),t._FPDF_GetPageWidthF=X("FPDF_GetPageWidthF",1),t._FPDF_GetPageWidth=X("FPDF_GetPageWidth",1),t._FPDF_GetPageHeightF=X("FPDF_GetPageHeightF",1),t._FPDF_GetPageHeight=X("FPDF_GetPageHeight",1),t._FPDF_GetPageBoundingBox=X("FPDF_GetPageBoundingBox",2),t._FPDF_RenderPageBitmap=X("FPDF_RenderPageBitmap",8),t._FPDF_RenderPageBitmapWithMatrix=X("FPDF_RenderPageBitmapWithMatrix",5),t._EPDF_RenderAnnotBitmap=X("EPDF_RenderAnnotBitmap",7),t._EPDF_RenderAnnotBitmapUnrotated=X("EPDF_RenderAnnotBitmapUnrotated",9),t._EPDF_SetDecodedImageBudget=X("EPDF_SetDecodedImageBudget",1),t._EPDF_GetDecodedImageBytes=X("EPDF_GetDecodedImageBytes",0),t._EPDFPage_ResetRenderCache=X("EPDFPage_ResetRenderCache",1),t._FPDF_ClosePage=X("FPDF_ClosePage",1),t._FPDF_CloseDocument=X("FPDF_CloseDocument",1),t._FPDF_GetLastError=X("FPDF_GetLastError",0),t._FPDF_DeviceToPage=X("FPDF_DeviceToPage",10),t._FPDF_PageToDevice=X("FPDF_PageToDevice",10),t._FPDFBitmap_Create=X("FPDFBitmap_Create",3),t._FPDFBitmap_CreateEx=X("FPDFBitmap_CreateEx",5),t._FPDFBitmap_GetFormat=X("FPDFBitmap_GetFormat",1),t._FPDFBitmap_FillRect=X("FPDFBitmap_FillRect",6),t._FPDFBitmap_GetBuffer=X("FPDFBitmap_GetBuffer",1),t._FPDFBitmap_GetWidth=X("FPDFBitmap_GetWidth",1),t._FPDFBitmap_GetHeight=X("FPDFBitmap_GetHeight",1),t._FPDFBitmap_GetStride=X("FPDFBitmap_GetStride",1),t._FPDFBitmap_Destroy=X("FPDFBitmap_Destroy",1),t._FPDF_GetPageSizeByIndexF=X("FPDF_GetPageSizeByIndexF",3),t._EPDF_GetPageRotateByIndex=X("EPDF_GetPageRotateByIndex",3),t._EPDF_GetPageTabOrderByIndex=X("EPDF_GetPageTabOrderByIndex",4),t._EPDF_GetPageBoxByIndex=X("EPDF_GetPageBoxByIndex",4),t._EPDF_GetPageUserUnitByIndex=X("EPDF_GetPageUserUnitByIndex",3),t._EPDF_LoadPageNormalized=X("EPDF_LoadPageNormalized",3),t._FPDF_GetPageSizeByIndex=X("FPDF_GetPageSizeByIndex",4),t._FPDF_VIEWERREF_GetPrintScaling=X("FPDF_VIEWERREF_GetPrintScaling",1),t._FPDF_VIEWERREF_GetNumCopies=X("FPDF_VIEWERREF_GetNumCopies",1),t._FPDF_VIEWERREF_GetPrintPageRange=X("FPDF_VIEWERREF_GetPrintPageRange",1),t._FPDF_VIEWERREF_GetPrintPageRangeCount=X("FPDF_VIEWERREF_GetPrintPageRangeCount",1),t._FPDF_VIEWERREF_GetPrintPageRangeElement=X("FPDF_VIEWERREF_GetPrintPageRangeElement",2),t._FPDF_VIEWERREF_GetDuplex=X("FPDF_VIEWERREF_GetDuplex",1),t._FPDF_VIEWERREF_GetName=X("FPDF_VIEWERREF_GetName",4),t._FPDF_CountNamedDests=X("FPDF_CountNamedDests",1),t._FPDF_GetNamedDestByName=X("FPDF_GetNamedDestByName",2),t._FPDF_GetNamedDest=X("FPDF_GetNamedDest",4),t._FPDF_GetXFAPacketCount=X("FPDF_GetXFAPacketCount",1),t._FPDF_GetXFAPacketName=X("FPDF_GetXFAPacketName",4),t._FPDF_GetXFAPacketContent=X("FPDF_GetXFAPacketContent",5),t._FPDF_GetTrailerEnds=X("FPDF_GetTrailerEnds",3);var eJ=X("fflush",1),eQ=X("strerror",1),eX=X("emscripten_builtin_memalign",2);t._malloc=X("malloc",1),t._free=X("free",1);var eY=X("setThrew",2);X("_emscripten_tempret_set",1);var e0=()=>(e0=eZ.emscripten_stack_init)(),e1=()=>(e1=eZ.emscripten_stack_get_end)(),e3=e=>(e3=eZ._emscripten_stack_restore)(e),e2=e=>(e2=eZ._emscripten_stack_alloc)(e),e6=()=>(e6=eZ.emscripten_stack_get_current)();function e5(){var e,r;if(!(U>0)){if(e0(),M((3&(e=e1()))==0),0==e&&(e+=4),f[e>>>2>>>0]=0x2135467,f[e+4>>>2>>>0]=0x89bacdfe,f[0]=0x63736d65,t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)r=t.preRun.shift(),B.unshift(r);eu(B),U>0||(t.setStatus?(t.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>t.setStatus(""),1),i()},1)):i(),T())}function i(){if(!D&&(D=!0,t.calledRun=!0,!j)){if(M(!z),z=!0,T(),t.noFSInit||eN.initialized||eN.init(),eN.ignorePermissions=!1,ev.init(),eu(L),n(t),t.onRuntimeInitialized?.(),M(!t._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),T(),t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;){var e;e=t.postRun.shift(),$.unshift(e)}eu($)}}}if(t.dynCall_jiji=X("dynCall_jiji",5),t.dynCall_iiiiij=X("dynCall_iiiiij",7),t.dynCall_iiiiijj=X("dynCall_iiiiijj",9),t.dynCall_iiiiiijj=X("dynCall_iiiiiijj",10),t.dynCall_viijii=X("dynCall_viijii",7),t.dynCall_ji=X("dynCall_ji",2),t.dynCall_iiij=X("dynCall_iiij",5),t.dynCall_j=X("dynCall_j",1),t.dynCall_iji=X("dynCall_iji",4),t.dynCall_jji=X("dynCall_jji",4),t.dynCall_iiji=X("dynCall_iiji",5),t.dynCall_viijj=X("dynCall_viijj",7),t.dynCall_jij=X("dynCall_jij",4),t.dynCall_iij=X("dynCall_iij",4),t.dynCall_viji=X("dynCall_viji",5),t.wasmExports=eZ,t.ccall=eH,t.cwrap=(e,t,n,r)=>(...i)=>eH(e,t,n,i,r),t.addFunction=(e,t)=>{M(void 0!==e);var n=(e=>{if(!P){P=new WeakMap;var t=_.length;if(P)for(var n=0;n<0+t;n++){var r=ez(n);r&&P.set(r,n)}}return P.get(e)||0})(e);if(n)return n;var r=(()=>{if(eW.length)return eW.pop();try{_.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return _.length-1})();try{eq(r,e)}catch(n){if(!(n instanceof TypeError))throw n;M(void 0!==t,"Missing signature argument to addFunction: "+e),eq(r,((e,t)=>{if(M(!t.includes("j"),"i64 not permitted in function signatures when WASM_BIGINT is disabled"),"function"==typeof WebAssembly.Function)return new WebAssembly.Function((e=>{M(!e.includes("j"),"i64 not permitted in function signatures when WASM_BIGINT is disabled");for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},n={parameters:[],results:"v"==e[0]?[]:[t[e[0]]]},r=1;r{P.delete(ez(e)),eq(e,null),eW.push(e)},t.setValue=function(e,t,n="i8"){switch(n.endsWith("*")&&(n="*"),n){case"i1":case"i8":s[e>>>0]=t;break;case"i16":u[e>>>1>>>0]=t;break;case"i32":c[e>>>2>>>0]=t;break;case"i64":J("to do setValue(i64) use WASM_BIGINT");case"float":m[e>>>2>>>0]=t;break;case"double":p[e>>>3>>>0]=t;break;case"*":f[e>>>2>>>0]=t;break;default:J(`invalid type for setValue: ${n}`)}},t.getValue=function(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return s[e>>>0];case"i16":return u[e>>>1>>>0];case"i32":return c[e>>>2>>>0];case"i64":J("to do getValue(i64) use WASM_BIGINT");case"float":return m[e>>>2>>>0];case"double":return p[e>>>3>>>0];case"*":return f[e>>>2>>>0];default:J(`invalid type for getValue: ${t}`)}},t.UTF8ToString=eg,t.stringToUTF8=ej,t.UTF16ToString=(e,t)=>{M(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var n=e,r=n>>1,i=r+t/2;!(r>=i)&&d[r>>>0];)++r;if((n=r<<1)-e>32&&eU)return eU.decode(l.subarray(e>>>0,n>>>0));for(var o="",a=0;!(a>=t/2);++a){var s=u[e+2*a>>>1>>>0];if(0==s)break;o+=String.fromCharCode(s)}return o},t.stringToUTF16=(e,t,n)=>{if(M(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),M("number"==typeof n,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),n??(n=0x7fffffff),n<2)return 0;for(var r=t,i=(n-=2)<2*e.length?n/2:e.length,o=0;o>>1>>>0]=a,t+=2}return u[t>>>1>>>0]=0,t-r},["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","getTempRet0","setTempRet0","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","emscriptenLog","readEmAsmArgs","jstoi_q","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","asmjsMangle","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","getCallstack","convertPCtoSourceLocation","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","safeSetTimeout","setImmediateWrapped","safeRequestAnimationFrame","clearImmediateWrapped","polyfillSetImmediate","registerPostMainLoop","registerPreMainLoop","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","Browser_asyncPrepareDataCounter","arraySum","addDays","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","toTypedArrayIndex","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","webgl_enable_EXT_polygon_offset_clamp","webgl_enable_EXT_clip_control","webgl_enable_WEBGL_polygon_mode","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","setErrNo","demangle","stackTrace"].forEach(function(e){eo(e,()=>{var t=`\`${e}\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`,n=e;n.startsWith("_")||(n="$"+e),t+=` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${n}')`,ei(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),em(t)}),es(e)}),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","out","err","callMain","abort","wasmMemory","writeStackCookie","checkStackCookie","convertI32PairToI53Checked","stackSave","stackRestore","stackAlloc","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","ERRNO_CODES","strError","DNS","Protocols","Sockets","timers","warnOnce","readEmAsmArgsArray","jstoi_s","getExecutableName","keepRuntimeAlive","asyncLoad","alignMemory","mmapAlloc","wasmTable","noExitRuntime","getCFunc","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","freeTableIndexes","functionsInTableMap","getEmptyTableSlot","updateTableMap","getFunctionAddress","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","stringToUTF8Array","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","stringToUTF8OnStack","writeArrayToMemory","JSEvents","specialHTMLTargets","findCanvasEventTarget","currentFullscreenStrategy","restoreOldWindowedStyle","UNWIND_CACHE","ExitStatus","getEnvStrings","doReadv","doWritev","initRandomFill","randomFill","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","getPreloadedImageData__data","wget","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS_createPath","FS_createDevice","FS_readFile","FS","FS_createDataFile","FS_createLazyFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack","print","printErr"].forEach(es),W=function e(){D||e5(),D||(W=e)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();for(let e of(e5(),Object.keys(t)))e in t||Object.defineProperty(t,e,{configurable:!0,get(){J(`Access to module property ('${e}') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.`)}});return y}}},function(){if(r)throw r[0];try{return t&&(n=(0,t[E(t)[0]])(t=0)),n}catch(e){throw r=[e],e}}),G={Unknown:"Unknown",InvalidArg:"InvalidArg",DocNotOpen:"DocNotOpen",DocOpenFailed:"DocOpenFailed",DocPasswordRequired:"DocPasswordRequired",DocPasswordIncorrect:"DocPasswordIncorrect",GrantPassphraseRequired:"GrantPassphraseRequired",Aborted:"Aborted",Network:"Network",Unauthenticated:"Unauthenticated",Forbidden:"Forbidden",NotFound:"NotFound",WireFormat:"WireFormat",RuntimeUnavailable:"RuntimeUnavailable",LayerVersionConflict:"LayerVersionConflict",NotImplemented:"NotImplemented",MalformedPdf:"MalformedPdf",SigningPending:"SigningPending",SigningExpired:"SigningExpired",SigningVersionMismatch:"SigningVersionMismatch",SignatureRefused:"SignatureRefused",ProtectedDocument:"ProtectedDocument",PayloadTooLarge:"PayloadTooLarge",ObjectNumberUnavailable:"ObjectNumberUnavailable",LayerFull:"LayerFull",ChangeConflict:"ChangeConflict",UndoUnavailable:"UndoUnavailable",IdempotencyKeyReused:"IdempotencyKeyReused",LayerDeleted:"LayerDeleted",VisitorIdentityRequired:"VisitorIdentityRequired",Conflict:"Conflict",EngineBusy:"EngineBusy",EngineRestarting:"EngineRestarting",DocumentQuarantined:"DocumentQuarantined",ThumbnailNotReady:"ThumbnailNotReady",TooManyRequests:"TooManyRequests",GrantExpired:"GrantExpired",OriginRequired:"OriginRequired",OriginNotAllowed:"OriginNotAllowed",FeatureNotEnabled:"FeatureNotEnabled",FeatureStopped:"FeatureStopped",LicenseInvalid:"LicenseInvalid",LicenseUsageLimit:"LicenseUsageLimit",UpstreamError:"UpstreamError"};function O(e){return(O="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)}function I(e,t,n){var r;return(r=function(e,t){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=O(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==O(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.values(G);var N=class e extends Error{constructor(e,t,n={}){super(t??e,void 0===n.cause?void 0:{cause:n.cause}),I(this,"name","EngineError"),I(this,"code",void 0),I(this,"details",void 0),this.code=e,this.details=n.details}static is(t,n){return(t instanceof e||t?.name==="EngineError")&&(void 0===n||t.code===n)}toJSON(){return{code:this.code,message:this.message,details:this.details}}};function C(e){return N.is(e)?e.toJSON():e instanceof Error?{code:"AbortError"===e.name?G.Aborted:G.Unknown,message:e.message}:{code:G.Unknown,message:String(e??"unknown error")}}var j=e=>{let t=t=>(e&1<[[1,e.exclude],[2,e.includeNoValueFields],[3,"html"===e.format],[4,"get"===e.method],[5,e.submitCoordinates],[6,"xfdf"===e.format],[7,e.includeAppendSaves],[8,e.includeAnnotations],[9,"pdf"===e.format],[10,e.canonicalFormat],[11,e.exclNonUserAnnots],[12,e.exclFKey],[14,e.embedForm]].reduce((e,[t,n])=>n?e|1<null!=e&&!("root"in e)&&R(e))}function B(e){return e.incomplete||!e.root?null:function e(t){let n=[];for(let r of t.next){let t=e(r);if(!t)return null;n.push(t)}let r=n.length>0?{next:n}:{};switch(t.type){case"javascript":return{type:"javascript",script:t.script,...r};case"goto":return{type:"goto",destination:t.destination,...r};case"uri":return{type:"uri",uri:t.uri,...r};case"named":return{type:"named",name:t.name,...r};case"hide":return{type:"hide",targets:t.targets,hide:t.hide,...r};case"reset-form":return{type:"reset-form",fields:t.fields,exclude:t.exclude,...r};case"submit-form":return t.payload?{...function(e){let{url:t,fields:n,charSet:r,...i}=e;return i}(t.payload),type:"submit-form",url:t.payload.url,fields:t.payload.fields,...r}:null;default:return null}}(e.root)}var L={javascript:"JavaScript",goto:"GoTo",uri:"URI",named:"Named",hide:"Hide","reset-form":"ResetForm","submit-form":"SubmitForm"};function $(e){return{root:function e(t){let n={subtype:L[t.type],next:(t.next??[]).map(e)};switch(t.type){case"javascript":return{type:"javascript",script:t.script,...n};case"goto":return{type:"goto",destination:t.destination,...n};case"uri":return{type:"uri",uri:t.uri,isMap:!1,...n};case"named":return{type:"named",name:t.name,...n};case"hide":return{type:"hide",targets:t.targets,hide:t.hide,...n};case"reset-form":return{type:"reset-form",fields:t.fields,exclude:t.exclude,...n};case"submit-form":return{type:"submit-form",payload:{url:t.url,fields:t.fields,...j(M(t))},...n}}}(e),incomplete:!1,warnings:[]}}var z=["activate","cursorEnter","cursorExit","mouseDown","mouseUp","focus","blur","pageOpen","pageClose","pageVisible","pageInvisible"];function U(e){let t=B(e);return t&&V(t)?t:null}function V(e){return"javascript"===e.type&&(e.next??[]).every(V)}function W(e){return"number"==typeof e&&Number.isInteger(e)&&e>0}function q(e){return{kind:"objectNumber",objectNumber:e}}function H(e){if(!W(e.objectNumber))throw RangeError(`encodePageKey: objectNumber must be a positive integer, got ${e.objectNumber}`);return`obj:${e.objectNumber}`}function K(e){switch(e.kind){case"objectNumber":return`obj:${e.objectNumber}`;case"baseIndex":return`base:${e.page.objectNumber}:${e.baseIndex}`}}var Z=["courier","courier-bold","courier-bold-oblique","courier-oblique","helvetica","helvetica-bold","helvetica-bold-oblique","helvetica-oblique","times-roman","times-bold","times-bold-italic","times-italic","symbol","zapf-dingbats"],J={invisible:!1,hidden:!1,print:!1,noZoom:!1,noRotate:!1,noView:!1,readOnly:!1,locked:!1,toggleNoView:!1,lockedContents:!1};function Q(e){return void 0!==e.layout?e:{...e,layout:"pushbutton"===e.fieldKind?"caption":null}}function X(e){return null===e?{kind:"unassigned"}:{kind:"group",groupId:e}}function Y(e){return"group"===e.kind?e.groupId:null}function ee(e){return eo(er(e)??{kind:"unassigned"},e.kind)}function et(e,t){let n=er(e);return void 0===n?t.assignment:eo(n,t.kind)}function en(e){if(void 0!==e.assignment)return e;let t="string"==typeof e.groupId?e.groupId:null;return{...e,assignment:X(t)}}function er(e){if(void 0!==e.assignment&&void 0!==e.groupId)throw ea("assignment",'name a field\'s assignment or its groupId, not both: { kind: "group", groupId } says both');return void 0!==e.assignment?function(e){let t=null!==e&&"object"==typeof e?e.kind:void 0;if("anyone"===t||"unassigned"===t)return{kind:t};if("group"===t){let n=e.groupId;return ei(n,"assignment"),{kind:t,groupId:n}}throw ea("assignment","a field's assignment is { kind: 'group', groupId }, { kind: 'anyone' } or { kind: 'unassigned' }")}(e.assignment):void 0!==e.groupId?(null!==e.groupId&&ei(e.groupId,"groupId"),X(e.groupId)):void 0}function ei(e,t){if("string"!=typeof e||e.length<1||e.length>256)throw ea(t,`a field's groupId is 1 to 256 characters${"groupId"===t?", or null for no group":""}`)}function eo(e,t){if("anyone"===e.kind&&"signature"===t)throw ea("assignment","a signature field is signed by one signer, so it is never for anyone");return e}function ea(e,t){return new N(G.InvalidArg,t,{details:{field:e}})}function es(e){return void 0===e.lockedBy?{...e,lockedBy:null}:e}function el(e){if("pushbutton"!==e.kind)return e;let t=void 0===e.hasImage,n=void 0===e.takesImage;return t||n?{...e,...t?{hasImage:!1}:{},...n?{takesImage:!1}:{}}:e}var eu=Object.freeze(["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"]),ed=Object.freeze(["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"]),ec=new Map([["yyyy",{part:"year",written:"digits"}],["yy",{part:"year",written:"digits"}],["mmmm",{part:"month",written:"letters"}],["mmm",{part:"month",written:"letters"}],["mm",{part:"month",written:"digits"}],["m",{part:"month",written:"digits"}],["dd",{part:"day",written:"digits"}],["d",{part:"day",written:"digits"}]]),ef=/(?:HH|H|hh|h):MM(?::ss)?(?: *tt)?/;function em(e){let t={written:[],groups:[]};for(let n of e.match(/([A-Za-z])\1*|[^A-Za-z]/g)??[]){let e=ec.get(n);if(e)t.written.push(e.written),t.groups.push(e.part);else{if(!" /-.,".includes(n))return null;t.written.push("separator")}}return t}function ep(e){if("string"!=typeof e||e.length<1||e.length>64)return!1;let t=ef.exec(e),n=em(t?e.slice(0,t.index):e),r=em(t?e.slice(t.index+t[0].length):"");if(!n||!r)return!1;let i=[...n.groups,...r.groups];if(0===i.length||new Set(i).size!==i.length)return!1;let o=t?["digits",t[0].endsWith("tt")?"letters":"digits"]:[],a=[...n.written,...o,...r.written];return!a.some((e,t)=>"digits"===e&&"digits"===a[t+1]&&t!==n.written.length)}var eh=RegExp(`^${ef.source}$`);function eF(e){return"string"==typeof e&&e.length<=64&&eh.test(e)}function eg(e){return"text"===e||"combobox"===e}var e_={date:{format:"AFDate_FormatEx",numberedFormat:"AFDate_Format",keystroke:"AFDate_KeystrokeEx",numberedKeystroke:"AFDate_Keystroke",standard:eu,isPattern:ep},time:{format:"AFTime_FormatEx",numberedFormat:"AFTime_Format",keystroke:"AFTime_KeystrokeEx",numberedKeystroke:"AFTime_Keystroke",standard:ed,isPattern:eF}},eP=["date","time"];function eD(e,t,n,r){let i=e.trim();i.endsWith(";")&&(i=i.slice(0,-1).trimEnd());let o=/^([A-Za-z_]+)\(\s*(?:(["'])([^"'\\]*)\2|(\d{1,2}))\s*\)$/.exec(i);if(!o)return null;let[,a,,s,l]=o,{isPattern:u,standard:d}=e_[t];return a===n&&void 0!==s?u(s)?s:null:a===r&&void 0!==l?d[Number(l)]??null:null}function eb(e){let t=e?.format;if(null==t)return null;if("object"!=typeof t)return{kind:"other"};let n=ew(t);return null===n?{kind:"other"}:function(e){for(let t of eP){let n=e_[t],r=eD(e,t,n.format,n.numberedFormat);if(null!==r)return{kind:t,pattern:r}}return{kind:"other"}}(n)}function ey(e){let t=void 0===e.purpose,n=void 0===e.format&&"string"==typeof e.kind&&eg(e.kind);return t||n?{...e,...t?{purpose:null}:{},...n?{format:eb(e.actions)}:{}}:e}function ew(e){let t=e.root;return!1===e.incomplete&&t&&"javascript"===t.type&&Array.isArray(t.next)&&!(t.next.length>0)&&"string"==typeof t.script?t.script:null}function eE(e){var t;let n=e_[e.kind];return{format:`${n.format}("${e.pattern}");`,keystroke:"date"===e.kind?`${n.keystroke}("${e.pattern}");`:`${n.numberedKeystroke}(${2*!!(t=e.pattern).includes("ss")+ +!!t.includes("tt")});`}}function eA(e){if(null===e)return{keystroke:null,format:null};let t=eE(e),n=e=>({type:"javascript",script:e});return{keystroke:n(t.keystroke),format:n(t.format)}}function ev(e){return null!==e&&"other"!==e.kind}function eS(e,t){return null===e||null===t?e===t:e.kind===t.kind&&("other"===e.kind||e.pattern===t.pattern)}var ek={date:"a date format's pattern is 1 to 64 characters: the groups yyyy yy mmmm mmm mm m dd d, at least one of them and the year, the month and the day each once at most, with spaces and / - . , between them, and at most one time (HH, H, hh or h, then :MM, then :ss and tt when it has them); two groups written in digits never touch",time:"a time format's pattern is a time and nothing else, at most 64 characters: HH, H, hh or h, then :MM, then :ss when it has seconds, then tt when it has one"};function ex(e,t){if(void 0===e.format)return;if(!eg(t))throw new N(G.InvalidArg,`'format' does not apply to a ${t} field`,{details:{field:"format"}});let n=function(e){if(null===e)return null;let t="object"==typeof e?e:{};if("other"===t.kind)throw new N(G.InvalidArg,"a format of kind 'other' is read, never written: write its scripts in actions",{details:{field:"format"}});if("date"!==t.kind&&"time"!==t.kind)throw new N(G.InvalidArg,"a field's format is a date or a time with a pattern, or null for none",{details:{field:"format"}});let{pattern:n}=t;if(!e_[t.kind].isPattern(n))throw new N(G.InvalidArg,ek[t.kind],{details:{field:"format.pattern"}});return{kind:t.kind,pattern:n}}(e.format);for(let t of["format","keystroke"])if(e.actions?.[t]!==void 0)throw new N(G.InvalidArg,`'format' writes the field's ${t} script: name it or actions.${t}, not both`,{details:{field:`actions.${t}`}});return n}function eG(e){return $({type:"javascript",script:e})}function eO(e){return"string"==typeof e&&e.length>=1&&e.length<=256&&e.trim()===e&&!e.includes("\0")}function eI(e,t){if(null==e)return null;if(!eO(e))throw new N(G.InvalidArg,`a field's ${t} is 1 to 256 characters with no space at its start or end and no NUL character, or null for none`,{details:{field:t}});return e}function eN(e){return eO(e)}function eC(e){return eI(e,"placeholder")}function ej(e){return void 0!==e.placeholder?e:{...e,placeholder:null}}function eM(e){if("objectNumber"===e.kind){if(!Number.isInteger(e.objectNumber)||e.objectNumber<=0)throw RangeError(`encodeFieldRefKey: objectNumber must be a positive integer, got ${e.objectNumber}`);return`obj:${e.objectNumber}`}return`fqn:${e.name}`}function eR(e,t){return{ref:e>0&&t?{kind:"objectNumber",page:t,objectNumber:e}:null,objectNumber:e,page:t}}var eT=(e,t)=>e.replace(/\B(?=(\d{3})+(?!\d))/g,()=>t),eB=(e,t)=>t?eB(t,e%t):e;function eL(e){let t=Math.fround(e.conversion??0/0);if(!Number.isFinite(t)||t<=0)return!1;let n=e.precision??("fraction"===e.fraction?16:100);return!!Number.isInteger(n)&&!(n<1)&&!(n>0x7fffffff)&&((e.fraction??"decimal")!=="decimal"||!!Number.isInteger(Math.log10(n)))}function e$(e,t){if(!Number.isFinite(e)||!t.length||!t.every(eL))throw new N(G.InvalidArg,"Measurement requires a finite value and valid number formats");let n=Math.abs(e),r=[];for(let[e,i]of t.entries()){if(!Number.isFinite(n*=Math.fround(i.conversion)))throw new N(G.InvalidArg,"Measurement overflow");let o=Math.floor(n),a=n-o,s=e===t.length-1,l=s||0===a,u=s?function(e,t){let n=t.fraction??"decimal",r=t.thousands??",";if("round"===n)return eT(String(Math.round(e)),r);if("truncate"===n)return eT(String(Math.trunc(e)),r);if("fraction"===n){let n=t.precision??16,i=Math.floor(e),o=Math.round((e-i)*n);if(o===n&&(i++,o=0),!o)return eT(String(i),r);let a=t.fixed?1:eB(o,n);return`${i?`${eT(String(i),r)} `:""}${o/a}/${n/a}`}let i=Math.log10(t.precision??100),[o,a=""]=e.toFixed(i).split(".");return eT(o,r)+(a?(t.decimal||".")+a:"")}(n,i):eT(String(o),i.thousands??","),d="prefix"===i.labelPosition,c=i.prefixSpacing??(d&&0===e?"":" "),f=i.suffixSpacing??(!d&&l?"":" "),m=c+i.unit+f;if(r.push(d?m+u:u+m),l)break;n=a}return(e<0?"-":"")+r.join("")}var ez={courier:{family:"Courier",weight:400,italic:!1},"courier-bold":{family:"Courier",weight:700,italic:!1},"courier-bold-oblique":{family:"Courier",weight:700,italic:!0},"courier-oblique":{family:"Courier",weight:400,italic:!0},helvetica:{family:"Helvetica",weight:400,italic:!1},"helvetica-bold":{family:"Helvetica",weight:700,italic:!1},"helvetica-bold-oblique":{family:"Helvetica",weight:700,italic:!0},"helvetica-oblique":{family:"Helvetica",weight:400,italic:!0},"times-roman":{family:"Times",weight:400,italic:!1},"times-bold":{family:"Times",weight:700,italic:!1},"times-bold-italic":{family:"Times",weight:700,italic:!0},"times-italic":{family:"Times",weight:400,italic:!0},symbol:{family:"Symbol",weight:400,italic:!1},"zapf-dingbats":{family:"ZapfDingbats",weight:400,italic:!1}};function eU(e,t){if(Z.includes(e)){let t=ez[e];return{family:t.family,weight:t.weight,italic:t.italic}}let n=t?.(e);return n?{family:n.familyName,weight:n.weight,italic:n.italic}:{family:e}}function eV(e){return e.toLowerCase().replace(/[\s\-_'"]/g,"")}var eW={helvetica:"Helvetica",arial:"Helvetica",arialmt:"Helvetica",sansserif:"Helvetica",times:"Times",timesroman:"Times",timesnewroman:"Times",timesnewromanpsmt:"Times",serif:"Times",courier:"Courier",couriernew:"Courier",couriernewpsmt:"Courier",monospace:"Courier",symbol:"Symbol",zapfdingbats:"ZapfDingbats",dingbats:"ZapfDingbats"};function eq(e){if("object"!=typeof e||null===e)return!1;let{left:t,bottom:n,right:r,top:i}=e;return[t,n,r,i].every(e=>"number"==typeof e&&Number.isFinite(e))}function eH(e){return{left:Math.min(e.left,e.right),right:Math.max(e.left,e.right),bottom:Math.min(e.top,e.bottom),top:Math.max(e.top,e.bottom)}}var eK=e=>Number.isFinite(e.x)&&Number.isFinite(e.y);function eZ([e,t,n,r]){if(![e,t,n,r].every(eK))return!1;let i={x:t.x-e.x,y:t.y-e.y},o={x:r.x-n.x,y:r.y-n.y},a={x:n.x-e.x,y:n.y-e.y},s={x:r.x-t.x,y:r.y-t.y},l=[i,o,a,s].map(e=>Math.hypot(e.x,e.y));if(l.some(e=>e<=1e-6)||i.x*o.x+i.y*o.y<=0||a.x*s.x+a.y*s.y<=0)return!1;let u=i.x*a.y-i.y*a.x,d=o.x*s.y-o.y*s.x;return!(Math.abs(u)<=1e-6*l[0]*l[2]||Math.abs(d)<=1e-6*l[1]*l[3])&&Math.sign(u)===Math.sign(d)}function eJ(e,t){let n=eQ(t);if(null!==n)return eX(e,n);let r=t*Math.PI/180,i=Math.abs(Math.cos(r)),o=Math.abs(Math.sin(r)),a=e.right-e.left,s=e.top-e.bottom,l=(a*i+s*o)/2,u=(a*o+s*i)/2,d=(e.left+e.right)/2,c=(e.bottom+e.top)/2;return{left:d-l,bottom:c-u,right:d+l,top:c+u}}function eQ(e){let t=(e%360+360)%360;return t%90==0?t:null}function eX(e,t){if(0===t||180===t)return e;let n=(e.left+e.right)/2,r=(e.bottom+e.top)/2,i=(e.top-e.bottom)/2,o=(e.right-e.left)/2;return{left:n-i,bottom:r-o,right:n+i,top:r+o}}function eY(e,t){let n=.01+1e-4*Math.max(e.right-e.left,e.top-e.bottom,t.right-t.left,t.top-t.bottom);return Math.abs(e.left-t.left)<=n&&Math.abs(e.bottom-t.bottom)<=n&&Math.abs(e.right-t.right)<=n&&Math.abs(e.top-t.top)<=n}function e0(e){if(0===e.length)return{left:0,bottom:0,right:0,top:0};let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let{x:o,y:a}of e)t=Math.min(t,o),n=Math.min(n,a),r=Math.max(r,o),i=Math.max(i,a);return{left:t,bottom:n,right:r,top:i}}function e1(e,t){let n=t.degrees*Math.PI/180,r=Math.cos(n),i=Math.sin(n),o=e.x-t.center.x,a=e.y-t.center.y;return{x:t.center.x+o*r+a*i,y:t.center.y-o*i+a*r}}function e3(e,t){return e1(e,{degrees:-t.degrees,center:t.center})}function e2(e,t){return e.replace(/\r\n|\r|\n/g,t)}var e6={family:"Helvetica",weight:400,italic:!1,size:12,color:"#000000",decoration:[],script:"normal",letterSpacing:0,horizontalScale:1,align:"left",dir:"ltr"};function e5(e){return e2(e.paragraphs.map(e=>e.runs.map(e=>e.text).join("")).join(` +"use strict";(()=>{let e,t,n,r,i,o,a,s,l,u,d,c,f,m,p;var h,F,g,_,P,D,b,y,w=Object.defineProperty,E=Object.getOwnPropertyNames,A=(e=function(e){if("u">typeof require)return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')},"u">typeof require?require:"u">typeof Proxy?new Proxy(e,{get:(e,t)=>("u">typeof require?require:e)[t]}):e),v=(e,t)=>{for(var n in t)w(e,n,{get:t[n],enumerable:!0})},S=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?w(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n},k={};v(k,{default:()=>_});var x=(t={"../runtime/npm/wasm32/lib/embedpdf.browser.js"(){var e;e=self.location.href,_=function(t={}){var n,r,i,o,a,s,l,u,d,c,f,m,p,h,F,g,_,P,D,b,y=new Promise((e,t)=>{n=e,r=t});["_EPDF_CheckPasswordPermissions","_EPDF_DigestBuffer","_EPDF_FreeBuffer","_EPDF_GetDecodedImageBytes","_EPDF_GetMetaKeyCount","_EPDF_GetMetaKeyName","_EPDF_GetMetaTrapped","_EPDF_GetPageBoxByIndex","_EPDF_GetPageRotateByIndex","_EPDF_GetPageTabOrderByIndex","_EPDF_GetPageUserUnitByIndex","_EPDF_HasMetaText","_EPDF_InitThread","_EPDF_IsEncrypted","_EPDF_IsOwnerUnlocked","_EPDF_LoadBaseDocument","_EPDF_LoadMemBaseDocument","_EPDF_LoadMemBaseDocument64","_EPDF_LoadPageNormalized","_EPDF_PNG_EncodeRGBA","_EPDF_ReleaseBaseDocument","_EPDF_RemoveEncryption","_EPDF_RenderAnnotBitmap","_EPDF_RenderAnnotBitmapUnrotated","_EPDF_RenderPage_Continue","_EPDF_RenderPageBitmapWithMatrix_Start","_EPDF_SaveAsCopyEx","_EPDF_SaveDocumentToOwnedBuffer","_EPDF_SaveDocumentToOwnedBufferEx","_EPDF_SaveDocumentToOwnedBufferWithVersion","_EPDF_SetBaseDocumentSha256","_EPDF_SetDecodedImageBudget","_EPDF_SetEncryption","_EPDF_SetMetaText","_EPDF_SetMetaTrapped","_EPDF_SetRuntimeOwnerPermissions","_EPDF_ShutdownThread","_EPDF_UnlockOwnerPermissions","_EPDFAction_CloseModel","_EPDFAction_CreateGoTo","_EPDFAction_CreateGoToNamed","_EPDFAction_CreateHide","_EPDFAction_CreateJavaScript","_EPDFAction_CreateLaunch","_EPDFAction_CreateNamed","_EPDFAction_CreateRemoteGoToByName","_EPDFAction_CreateRemoteGoToDest","_EPDFAction_CreateResetForm","_EPDFAction_CreateSubmitForm","_EPDFAction_CreateURI","_EPDFAction_GetNextAt","_EPDFAction_GetNextCount","_EPDFAction_GetNodeCount","_EPDFAction_GetNodeDest","_EPDFAction_GetNodeFilePath","_EPDFAction_GetNodeHideFlag","_EPDFAction_GetNodeJavaScript","_EPDFAction_GetNodeName","_EPDFAction_GetNodeResetForm","_EPDFAction_GetNodeSubmitForm","_EPDFAction_GetNodeSubmitFormCharSet","_EPDFAction_GetNodeSubmitFormURL","_EPDFAction_GetNodeSubtype","_EPDFAction_GetNodeTargetCount","_EPDFAction_GetNodeTargetName","_EPDFAction_GetNodeTargetObjectNumber","_EPDFAction_GetNodeType","_EPDFAction_GetNodeURI","_EPDFAction_GetNodeURIIsMap","_EPDFAction_GetRootNode","_EPDFAction_GetWarningFlags","_EPDFAction_IsComplete","_EPDFAction_LoadModel","_EPDFAction_NodeHasJavaScript","_EPDFAction_SetNext","_EPDFAnnot_AddMeasure","_EPDFAnnot_ClearBorderEffect","_EPDFAnnot_ClearColor","_EPDFAnnot_ClearEmbedMetadata","_EPDFAnnot_ClearEmbedMetadataKey","_EPDFAnnot_ClearMKColor","_EPDFAnnot_ClearMKIcon","_EPDFAnnot_ClearRectangleDifferences","_EPDFAnnot_ExportAppearance","_EPDFAnnot_GenerateAppearance","_EPDFAnnot_GenerateAppearanceWithBlend","_EPDFAnnot_GenerateFormFieldAP","_EPDFAnnot_GetActionModel","_EPDFAnnot_GetAPMatrix","_EPDFAnnot_GetAppearanceState","_EPDFAnnot_GetAppearanceStateCount","_EPDFAnnot_GetAppearanceStateName","_EPDFAnnot_GetAppearanceTransform","_EPDFAnnot_GetAvailableAppearanceModes","_EPDFAnnot_GetBlendMode","_EPDFAnnot_GetBooleanValue","_EPDFAnnot_GetBorderDashPattern","_EPDFAnnot_GetBorderDashPatternCount","_EPDFAnnot_GetBorderEffect","_EPDFAnnot_GetBorderStyle","_EPDFAnnot_GetCalloutLine","_EPDFAnnot_GetCalloutLineCount","_EPDFAnnot_GetColor","_EPDFAnnot_GetDefaultAppearance","_EPDFAnnot_GetDefaultAppearanceFontFace","_EPDFAnnot_GetDefaultAppearanceFontPostScriptName","_EPDFAnnot_GetDrawing","_EPDFAnnot_GetDrawingRect","_EPDFAnnot_GetEmbedMetadataBoolean","_EPDFAnnot_GetEmbedMetadataJSON","_EPDFAnnot_GetEmbedMetadataNumber","_EPDFAnnot_GetEmbedMetadataRect","_EPDFAnnot_GetEmbedMetadataString","_EPDFAnnot_GetFileAttachmentForWrite","_EPDFAnnot_GetIntent","_EPDFAnnot_GetLineCaption","_EPDFAnnot_GetLineEndings","_EPDFAnnot_GetLineLeader","_EPDFAnnot_GetMeasure","_EPDFAnnot_GetMKColor","_EPDFAnnot_GetMKIcon","_EPDFAnnot_GetMKRotation","_EPDFAnnot_GetMKText","_EPDFAnnot_GetMKTextPosition","_EPDFAnnot_GetName","_EPDFAnnot_GetObjectNumber","_EPDFAnnot_GetOpacity","_EPDFAnnot_GetOverlayText","_EPDFAnnot_GetOverlayTextRepeat","_EPDFAnnot_GetRect","_EPDFAnnot_GetRectangleDifferences","_EPDFAnnot_GetReplyType","_EPDFAnnot_GetRichContent","_EPDFAnnot_GetRichTextJSON","_EPDFAnnot_GetRotate","_EPDFAnnot_GetShapeCaption","_EPDFAnnot_GetStructurePosition","_EPDFAnnot_GetTextAlignment","_EPDFAnnot_HasAppearanceStream","_EPDFAnnot_HasEmbedMetadata","_EPDFAnnot_HasMKIcon","_EPDFAnnot_IsValid","_EPDFAnnot_RemoveAction","_EPDFAnnot_RemoveDest","_EPDFAnnot_RemoveKey","_EPDFAnnot_RemoveMeasure","_EPDFAnnot_SetAction","_EPDFAnnot_SetAPMatrix","_EPDFAnnot_SetAppearanceFromPage","_EPDFAnnot_SetBooleanValue","_EPDFAnnot_SetBorderDashPattern","_EPDFAnnot_SetBorderEffect","_EPDFAnnot_SetBorderStyle","_EPDFAnnot_SetCalloutLine","_EPDFAnnot_SetColor","_EPDFAnnot_SetDefaultAppearance","_EPDFAnnot_SetDefaultAppearanceDocumentFont","_EPDFAnnot_SetDefaultAppearanceRegisteredFont","_EPDFAnnot_SetDrawing","_EPDFAnnot_SetEmbedMetadataBoolean","_EPDFAnnot_SetEmbedMetadataJSON","_EPDFAnnot_SetEmbedMetadataNumber","_EPDFAnnot_SetEmbedMetadataRect","_EPDFAnnot_SetEmbedMetadataString","_EPDFAnnot_SetEventAction","_EPDFAnnot_SetIntent","_EPDFAnnot_SetLine","_EPDFAnnot_SetLineCaption","_EPDFAnnot_SetLineEndings","_EPDFAnnot_SetLineLeader","_EPDFAnnot_SetLinkedAnnot","_EPDFAnnot_SetMKColor","_EPDFAnnot_SetMKIcon","_EPDFAnnot_SetMKRotation","_EPDFAnnot_SetMKText","_EPDFAnnot_SetMKTextPosition","_EPDFAnnot_SetName","_EPDFAnnot_SetNoColor","_EPDFAnnot_SetNumberValue","_EPDFAnnot_SetOpacity","_EPDFAnnot_SetOverlayText","_EPDFAnnot_SetOverlayTextRepeat","_EPDFAnnot_SetRect","_EPDFAnnot_SetReplyType","_EPDFAnnot_SetRichTextJSON","_EPDFAnnot_SetRichTextXHTML","_EPDFAnnot_SetRotate","_EPDFAnnot_SetShapeCaption","_EPDFAnnot_SetStampOpacity","_EPDFAnnot_SetSubtype","_EPDFAnnot_SetTextAlignment","_EPDFAnnot_SetVertices","_EPDFAnnot_UpdateAppearanceToRect","_EPDFAttachment_ExportCanonicalToOwnedBuffer","_EPDFAttachment_ExportRawToOwnedBuffer","_EPDFAttachment_ExtractFile","_EPDFAttachment_ExtractFileToOwnedBuffer","_EPDFAttachment_GetDescription","_EPDFAttachment_GetIntegerValue","_EPDFAttachment_ImportRaw","_EPDFAttachment_SetDescription","_EPDFAttachment_SetName","_EPDFAttachment_SetSubtype","_EPDFCatalog_GetLanguage","_EPDFCatalog_GetMetadata","_EPDFCatalog_SetMetadata","_EPDFDest_CreateRemoteView","_EPDFDest_CreateRemoteXYZ","_EPDFDest_CreateView","_EPDFDest_CreateViewByObjectNumber","_EPDFDest_CreateXYZ","_EPDFDest_CreateXYZByObjectNumber","_EPDFDest_GetPageObjectNumber","_EPDFDest_GetViewNullParams","_EPDFDoc_CanonicalDrawing","_EPDFDoc_ClearMissingCharacters","_EPDFDoc_ClearPagePieceInfoEntry","_EPDFDoc_ClearPagePieceInfoKey","_EPDFDoc_ClearPieceInfoEntry","_EPDFDoc_ClearPieceInfoKey","_EPDFDoc_CompareRevisions","_EPDFDoc_CountMissingCharacters","_EPDFDoc_DeletePageByObjectNumber","_EPDFDoc_ExportDictCanonicalToOwnedBuffer","_EPDFDoc_ExportDictRawToOwnedBuffer","_EPDFDoc_ExportDrawing","_EPDFDoc_ExportPagesFlattened","_EPDFDoc_GetAdditionalActionModel","_EPDFDoc_GetAttachmentIndexByKey","_EPDFDoc_GetAttachmentKey","_EPDFDoc_GetBaseBytesSize","_EPDFDoc_GetDrawings","_EPDFDoc_GetFontDisplayProgramCoverage","_EPDFDoc_GetFontDisplayProgramData","_EPDFDoc_GetFontEmbeddingPolicy","_EPDFDoc_GetFontProgramData","_EPDFDoc_GetFontsFingerprint","_EPDFDoc_GetImportFieldRoots","_EPDFDoc_GetLastModified","_EPDFDoc_GetLoadedBytesSize","_EPDFDoc_GetLoadedObjectValue","_EPDFDoc_GetMissingCharacter","_EPDFDoc_GetNamedJavaScriptActionModel","_EPDFDoc_GetNamedPageAt","_EPDFDoc_GetNamedPageCount","_EPDFDoc_GetOpenActionDest","_EPDFDoc_GetOpenActionModel","_EPDFDoc_GetPageActionModel","_EPDFDoc_GetPageLabelSectionAt","_EPDFDoc_GetPageLabelSectionCount","_EPDFDoc_GetPageLastModified","_EPDFDoc_GetPageObjectNumberByIndex","_EPDFDoc_GetPagePieceInfoBoolean","_EPDFDoc_GetPagePieceInfoEntryAt","_EPDFDoc_GetPagePieceInfoEntryCount","_EPDFDoc_GetPagePieceInfoKeyAt","_EPDFDoc_GetPagePieceInfoKeyCount","_EPDFDoc_GetPagePieceInfoLastModified","_EPDFDoc_GetPagePieceInfoName","_EPDFDoc_GetPagePieceInfoNumber","_EPDFDoc_GetPagePieceInfoString","_EPDFDoc_GetPagePieceInfoStringArrayAt","_EPDFDoc_GetPagePieceInfoStringArrayCount","_EPDFDoc_GetPagePieceInfoValueType","_EPDFDoc_GetPieceInfoBoolean","_EPDFDoc_GetPieceInfoEntryAt","_EPDFDoc_GetPieceInfoEntryCount","_EPDFDoc_GetPieceInfoKeyAt","_EPDFDoc_GetPieceInfoKeyCount","_EPDFDoc_GetPieceInfoLastModified","_EPDFDoc_GetPieceInfoName","_EPDFDoc_GetPieceInfoNumber","_EPDFDoc_GetPieceInfoString","_EPDFDoc_GetPieceInfoStringArrayAt","_EPDFDoc_GetPieceInfoStringArrayCount","_EPDFDoc_GetPieceInfoValueType","_EPDFDoc_GetRevision","_EPDFDoc_GetRevisionCount","_EPDFDoc_GetStructureObjectNumbers","_EPDFDoc_GetTypographicFeatures","_EPDFDoc_HasPagePieceInfoEntry","_EPDFDoc_HasPieceInfoEntry","_EPDFDoc_ImportDictRaw","_EPDFDoc_ImportDrawing","_EPDFDoc_ImportPages","_EPDFDoc_LoadPageByObjectNumber","_EPDFDoc_LoadPageByObjectNumberNormalized","_EPDFDoc_OpenBaseOverlay","_EPDFDoc_OpenBaseOverlayFromPath","_EPDFDoc_OpenRevision","_EPDFDoc_ReadLoadedBytes","_EPDFDoc_RemoveNamedPage","_EPDFDoc_RemoveNamedPagesForPage","_EPDFDoc_ResolveFonts","_EPDFDoc_SetFontEmbeddingPolicy","_EPDFDoc_SetNamedPage","_EPDFDoc_SetPageLabelSections","_EPDFDoc_SetPagePieceInfoBoolean","_EPDFDoc_SetPagePieceInfoName","_EPDFDoc_SetPagePieceInfoNumber","_EPDFDoc_SetPagePieceInfoString","_EPDFDoc_SetPagePieceInfoStringArray","_EPDFDoc_SetPageRotationByObjectNumber","_EPDFDoc_SetPieceInfoBoolean","_EPDFDoc_SetPieceInfoName","_EPDFDoc_SetPieceInfoNumber","_EPDFDoc_SetPieceInfoString","_EPDFDoc_SetPieceInfoStringArray","_EPDFDoc_SetTypographicFeatures","_EPDFDoc_StartLoadPageByObjectNumber","_EPDFDocument_ClearEmbedMetadata","_EPDFDss_Add","_EPDFDss_GetCount","_EPDFDss_GetData","_EPDFFont_AddFallbackFont","_EPDFFont_AuthorizeEditing","_EPDFFont_ClearFallbackFonts","_EPDFFont_ClearRegisteredFonts","_EPDFFont_GetCoverage","_EPDFFont_GetEmbeddingPermission","_EPDFFont_GetFallbackOrder","_EPDFFont_GetFamilyName","_EPDFFont_GetLastResortFont","_EPDFFont_GetMetrics","_EPDFFont_GetPostScriptName","_EPDFFont_GetProgramData","_EPDFFont_GetProgramFormat","_EPDFFont_GetProgramHash","_EPDFFont_GetWeight","_EPDFFont_IsEditingAuthorized","_EPDFFont_IsInstanced","_EPDFFont_IsItalic","_EPDFFont_RegisterFont","_EPDFFont_RegisterMemFont","_EPDFFont_RegisterMemFont64","_EPDFFont_SetLastResortFont","_EPDFFontFaces_Close","_EPDFFontFaces_Count","_EPDFFontFaces_CountPrograms","_EPDFFontFaces_GetFamily","_EPDFFontFaces_GetProgramDisplayHash","_EPDFFontFaces_GetProgramEmbedded","_EPDFFontFaces_GetProgramEmbeddingPermission","_EPDFFontFaces_GetProgramFormat","_EPDFFontFaces_GetProgramHash","_EPDFFontFaces_GetProgramMetrics","_EPDFFontFaces_GetProgramObjNum","_EPDFFontFaces_GetProgramPostScriptName","_EPDFFontFaces_GetWeight","_EPDFFontFaces_IsItalic","_EPDFFontFaces_Load","_EPDFFontFaces_ProgramMapsUnicode","_EPDFFontResolution_Close","_EPDFFontResolution_CountMissingCharacters","_EPDFFontResolution_GetBaseFontName","_EPDFFontResolution_GetFallbacks","_EPDFFontResolution_GetFamily","_EPDFFontResolution_GetMissingCharacter","_EPDFFontResolution_GetProgramDisplayHash","_EPDFFontResolution_GetProgramObjNum","_EPDFFontResolution_GetRegisteredFont","_EPDFFontResolution_GetSource","_EPDFFontResolution_GetWeight","_EPDFFontResolution_IsDegraded","_EPDFFontResolution_IsItalic","_EPDFForm_AttachWidget","_EPDFForm_ClearFieldEmbedMetadata","_EPDFForm_ClearFieldEmbedMetadataKey","_EPDFForm_CloseModel","_EPDFForm_CountCalculationOrder","_EPDFForm_CountFieldDefaultValues","_EPDFForm_CountFieldOptions","_EPDFForm_CountFields","_EPDFForm_CountFieldValues","_EPDFForm_CountFieldWidgets","_EPDFForm_CreateField","_EPDFForm_DeleteField","_EPDFForm_DetachWidget","_EPDFForm_ExportFDF","_EPDFForm_ExportFieldRawToOwnedBuffer","_EPDFForm_ExportXFDF","_EPDFForm_GetCalculationOrderFieldIndex","_EPDFForm_GetFieldActionModel","_EPDFForm_GetFieldAlternateName","_EPDFForm_GetFieldDefaultValueAt","_EPDFForm_GetFieldDefaultValueKind","_EPDFForm_GetFieldEmbedMetadataBoolean","_EPDFForm_GetFieldEmbedMetadataJSON","_EPDFForm_GetFieldEmbedMetadataNumber","_EPDFForm_GetFieldEmbedMetadataString","_EPDFForm_GetFieldFamily","_EPDFForm_GetFieldFlags","_EPDFForm_GetFieldIndexByObjNum","_EPDFForm_GetFieldIndexForWidget","_EPDFForm_GetFieldMappingName","_EPDFForm_GetFieldMaxLen","_EPDFForm_GetFieldName","_EPDFForm_GetFieldObjNum","_EPDFForm_GetFieldOptionLabel","_EPDFForm_GetFieldOptionValue","_EPDFForm_GetFieldOrigin","_EPDFForm_GetFieldPartialName","_EPDFForm_GetFieldTopIndex","_EPDFForm_GetFieldValueAt","_EPDFForm_GetFieldValueKind","_EPDFForm_GetFieldWidgetExportValue","_EPDFForm_GetFieldWidgetObjNum","_EPDFForm_GetFieldWidgetOnState","_EPDFForm_GetFieldWidgetPageObjNum","_EPDFForm_GetFieldWidgetRect","_EPDFForm_GetFormKind","_EPDFForm_GetNeedAppearances","_EPDFForm_HasFieldEmbedMetadata","_EPDFForm_HasFieldValuesList","_EPDFForm_ImportFieldRaw","_EPDFForm_IsFieldOptionSelected","_EPDFForm_IsFieldWidgetChecked","_EPDFForm_LoadModel","_EPDFForm_RedrawFieldWidgets","_EPDFForm_Repair","_EPDFForm_SetCalculationOrder","_EPDFForm_SetFieldAlternateName","_EPDFForm_SetFieldAppearanceText","_EPDFForm_SetFieldDefaultValue","_EPDFForm_SetFieldDisplay","_EPDFForm_SetFieldEmbedMetadataBoolean","_EPDFForm_SetFieldEmbedMetadataJSON","_EPDFForm_SetFieldEmbedMetadataNumber","_EPDFForm_SetFieldEmbedMetadataString","_EPDFForm_SetFieldEventAction","_EPDFForm_SetFieldFlags","_EPDFForm_SetFieldMappingName","_EPDFForm_SetFieldMaxLen","_EPDFForm_SetFieldName","_EPDFForm_SetFieldOptions","_EPDFForm_SetFieldSelectedIndices","_EPDFForm_SetFieldValue","_EPDFForm_SetFieldWidgetsChecked","_EPDFImageObj_SetJpeg","_EPDFImageObj_SetPng","_EPDFLayer_AbortTransaction","_EPDFLayer_BeginTransaction","_EPDFLayer_CommitTransaction","_EPDFLayer_GetBaseDocument","_EPDFLayer_GetBaseSha256","_EPDFLayer_GetBirthName","_EPDFLayer_GetBirthObjectNumber","_EPDFLayer_GetLastObjectNumber","_EPDFLayer_GetPromotedObjectCount","_EPDFLayer_IsInTransaction","_EPDFLayer_IsObjectPromoted","_EPDFLayer_IsPagePromoted","_EPDFLayer_OpenLayer","_EPDFLayer_OpenLayerArtifact","_EPDFLayer_OpenLayerArtifactFromPath","_EPDFLayer_RaiseLastObjectNumber","_EPDFLayer_SaveDelta","_EPDFLayer_SaveDeltaEx","_EPDFLayer_SaveDeltaToOwnedBuffer","_EPDFLayer_SaveDeltaToOwnedBufferEx","_EPDFLayer_SaveLayerArtifact","_EPDFLayer_SaveLayerArtifactEx","_EPDFLayer_SaveLayerArtifactToOwnedBuffer","_EPDFLayer_SaveLayerArtifactToOwnedBufferEx","_EPDFMeasure_AddFormat","_EPDFMeasure_CountFormats","_EPDFMeasure_GetCYX","_EPDFMeasure_GetFormat","_EPDFMeasure_GetOrigin","_EPDFMeasure_GetRatio","_EPDFMeasure_GetSubtype","_EPDFMeasure_RemoveFormats","_EPDFMeasure_SetCYX","_EPDFMeasure_SetOrigin","_EPDFMeasure_SetRatio","_EPDFNamedDest_Remove","_EPDFNamedDest_SetDest","_EPDFNumberFormat_GetConversion","_EPDFNumberFormat_GetFixedDenominator","_EPDFNumberFormat_GetFraction","_EPDFNumberFormat_GetLabelPosition","_EPDFNumberFormat_GetPrecision","_EPDFNumberFormat_GetText","_EPDFNumberFormat_GetUnit","_EPDFNumberFormat_SetConversion","_EPDFNumberFormat_SetFixedDenominator","_EPDFNumberFormat_SetFraction","_EPDFNumberFormat_SetLabelPosition","_EPDFNumberFormat_SetPrecision","_EPDFNumberFormat_SetText","_EPDFNumberFormat_SetUnit","_EPDFObjectDiff_Close","_EPDFObjectDiff_GetCount","_EPDFObjectDiff_GetEntry","_EPDFObjectDiff_GetReadStatus","_EPDFObjectDiff_GetReferrer","_EPDFObjectDiff_GetReferrerCount","_EPDFObjectDiff_GetRevisionHealth","_EPDFObjectDiff_GetValue","_EPDFOutline_CreateItem","_EPDFOutline_DeleteItem","_EPDFOutline_ExportItemRawToOwnedBuffer","_EPDFOutline_GetItem","_EPDFOutline_GetObjectNumber","_EPDFOutline_ImportItemRaw","_EPDFOutline_MoveItem","_EPDFOutline_SetAction","_EPDFOutline_SetColor","_EPDFOutline_SetOpen","_EPDFOutline_SetStyle","_EPDFOutline_SetTitle","_EPDFPage_AddViewport","_EPDFPage_AddViewportRaw","_EPDFPage_ApplyRedactions","_EPDFPage_ContinueLoad","_EPDFPage_CountViewports","_EPDFPage_CountViewportsRaw","_EPDFPage_CreateAnnot","_EPDFPage_CreateAnnotRaw","_EPDFPage_ExportAnnotationsAsDocument","_EPDFPage_ExportAnnotsRawToOwnedBuffer","_EPDFPage_ExportRawToOwnedBuffer","_EPDFPage_FindViewport","_EPDFPage_Flatten","_EPDFPage_FlattenAnnotations","_EPDFPage_GetAnnotByName","_EPDFPage_GetAnnotByObjectNumber","_EPDFPage_GetAnnotCountRaw","_EPDFPage_GetAnnotIndexByNameRaw","_EPDFPage_GetAnnotIndexByObjectNumberRaw","_EPDFPage_GetAnnotRaw","_EPDFPage_GetObjectNumber","_EPDFPage_GetParsedSize","_EPDFPage_GetViewport","_EPDFPage_GetViewportRaw","_EPDFPage_ImportAnnotsRaw","_EPDFPage_ImportRaw","_EPDFPage_InsertBlankRaw","_EPDFPage_IsContentCurrent","_EPDFPage_IsValid","_EPDFPage_MoveAnnots","_EPDFPage_MoveAnnotsRaw","_EPDFPage_PromoteInlineAnnotsRaw","_EPDFPage_RemoveAnnot","_EPDFPage_RemoveAnnotByName","_EPDFPage_RemoveAnnotByObjectNumber","_EPDFPage_RemoveAnnotRaw","_EPDFPage_RemoveViewport","_EPDFPage_RemoveViewportRaw","_EPDFPage_ResetRenderCache","_EPDFSig_CloseModel","_EPDFSig_Count","_EPDFSig_DigestByteRange","_EPDFSig_DigestFileRange","_EPDFSig_GetByteRange","_EPDFSig_GetContents","_EPDFSig_GetCoverage","_EPDFSig_GetDocMDPPermission","_EPDFSig_GetFieldMDPAction","_EPDFSig_GetFieldName","_EPDFSig_GetFieldNameAt","_EPDFSig_GetFieldNameCount","_EPDFSig_GetFieldObjNum","_EPDFSig_GetIndexByFieldObjNum","_EPDFSig_GetKind","_EPDFSig_GetLockAction","_EPDFSig_GetLockPermission","_EPDFSig_GetRevisionIndex","_EPDFSig_GetSeedValueFilter","_EPDFSig_GetSeedValueListAt","_EPDFSig_GetSeedValueListCount","_EPDFSig_GetSeedValueMDP","_EPDFSig_GetSeedValuePresentFlags","_EPDFSig_GetSeedValueRequiredFlags","_EPDFSig_GetSeedValueVersion","_EPDFSig_GetString","_EPDFSig_GetValueObjNum","_EPDFSig_GetWidgetObjNum","_EPDFSig_GetWidgetPageObjNum","_EPDFSig_HasSeedValue","_EPDFSig_IsCatalogCertification","_EPDFSig_IsRevisionChainValid","_EPDFSig_IsSigned","_EPDFSig_LoadModel","_EPDFSig_Prepare","_EPDFSig_SaveCandidate","_EPDFSig_SaveCandidateToOwnedBuffer","_EPDFSig_Seal","_EPDFSig_SealSpan","_EPDFSig_SetFieldLock","_EPDFSig_WriteContents","_EPDFText_GetCharGeometry","_EPDFText_GetCharToTextMap","_EPDFText_GetPageGeometry","_EPDFText_GetTextFull","_EPDFText_RedactInQuads","_EPDFText_RedactInRect","_EPDFViewport_AddMeasure","_EPDFViewport_Close","_EPDFViewport_GetBBox","_EPDFViewport_GetMeasure","_EPDFViewport_GetName","_EPDFViewport_RemoveMeasure","_EPDFViewport_SetBBox","_EPDFViewport_SetName","_FORM_CanRedo","_FORM_CanUndo","_FORM_DoDocumentAAction","_FORM_DoDocumentJSAction","_FORM_DoDocumentOpenAction","_FORM_DoPageAAction","_FORM_ForceToKillFocus","_FORM_GetFocusedAnnot","_FORM_GetFocusedText","_FORM_GetSelectedText","_FORM_GetTextDirection","_FORM_IsIndexSelected","_FORM_OnAfterLoadPage","_FORM_OnBeforeClosePage","_FORM_OnChar","_FORM_OnFocus","_FORM_OnKeyDown","_FORM_OnKeyUp","_FORM_OnLButtonDoubleClick","_FORM_OnLButtonDown","_FORM_OnLButtonUp","_FORM_OnMouseMove","_FORM_OnMouseWheel","_FORM_OnRButtonDown","_FORM_OnRButtonUp","_FORM_Redo","_FORM_ReplaceAndKeepSelection","_FORM_ReplaceSelection","_FORM_SelectAllText","_FORM_SetFocusedAnnot","_FORM_SetIndexSelected","_FORM_SetTextDirection","_FORM_Undo","_FPDF_AddInstalledFont","_FPDF_CloseDocument","_FPDF_ClosePage","_FPDF_CloseXObject","_FPDF_CopyViewerPreferences","_FPDF_CountNamedDests","_FPDF_CreateClipPath","_FPDF_CreateNewDocument","_FPDF_DestroyClipPath","_FPDF_DestroyLibrary","_FPDF_DeviceToPage","_FPDF_DocumentHasValidCrossReferenceTable","_FPDF_FFLDraw","_FPDF_FreeDefaultSystemFontInfo","_FPDF_GetDefaultSystemFontInfo","_FPDF_GetDefaultTTFMap","_FPDF_GetDefaultTTFMapCount","_FPDF_GetDefaultTTFMapEntry","_FPDF_GetDocPermissions","_FPDF_GetDocUserPermissions","_FPDF_GetFileIdentifier","_FPDF_GetFileVersion","_FPDF_GetFormType","_FPDF_GetLastError","_FPDF_GetMetaText","_FPDF_GetNamedDest","_FPDF_GetNamedDestByName","_FPDF_GetPageAAction","_FPDF_GetPageBoundingBox","_FPDF_GetPageCount","_FPDF_GetPageHeight","_FPDF_GetPageHeightF","_FPDF_GetPageLabel","_FPDF_GetPageSizeByIndex","_FPDF_GetPageSizeByIndexF","_FPDF_GetPageWidth","_FPDF_GetPageWidthF","_FPDF_GetSecurityHandlerRevision","_FPDF_GetSignatureCount","_FPDF_GetSignatureObject","_FPDF_GetTrailerEnds","_FPDF_GetXFAPacketContent","_FPDF_GetXFAPacketCount","_FPDF_GetXFAPacketName","_FPDF_ImportNPagesToOne","_FPDF_ImportPages","_FPDF_ImportPagesByIndex","_FPDF_InitLibrary","_FPDF_InitLibraryWithConfig","_FPDF_LoadCustomDocument","_FPDF_LoadDocument","_FPDF_LoadMemDocument","_FPDF_LoadMemDocument64","_FPDF_LoadPage","_FPDF_LoadXFA","_FPDF_MovePages","_FPDF_NewFormObjectFromXObject","_FPDF_NewXObjectFromPage","_FPDF_PageToDevice","_FPDF_RemoveFormFieldHighlight","_FPDF_RenderPage_Close","_FPDF_RenderPage_Continue","_FPDF_RenderPageBitmap","_FPDF_RenderPageBitmap_Start","_FPDF_RenderPageBitmapWithColorScheme_Start","_FPDF_RenderPageBitmapWithMatrix","_FPDF_SaveAsCopy","_FPDF_SaveWithVersion","_FPDF_SetFormFieldHighlightAlpha","_FPDF_SetFormFieldHighlightColor","_FPDF_SetSandBoxPolicy","_FPDF_SetSystemFontInfo","_FPDF_StructElement_Attr_CountChildren","_FPDF_StructElement_Attr_GetBlobValue","_FPDF_StructElement_Attr_GetBooleanValue","_FPDF_StructElement_Attr_GetChildAtIndex","_FPDF_StructElement_Attr_GetCount","_FPDF_StructElement_Attr_GetName","_FPDF_StructElement_Attr_GetNumberValue","_FPDF_StructElement_Attr_GetStringValue","_FPDF_StructElement_Attr_GetType","_FPDF_StructElement_Attr_GetValue","_FPDF_StructElement_CountChildren","_FPDF_StructElement_GetActualText","_FPDF_StructElement_GetAltText","_FPDF_StructElement_GetAttributeAtIndex","_FPDF_StructElement_GetAttributeCount","_FPDF_StructElement_GetChildAtIndex","_FPDF_StructElement_GetChildMarkedContentID","_FPDF_StructElement_GetExpansion","_FPDF_StructElement_GetID","_FPDF_StructElement_GetLang","_FPDF_StructElement_GetMarkedContentID","_FPDF_StructElement_GetMarkedContentIdAtIndex","_FPDF_StructElement_GetMarkedContentIdCount","_FPDF_StructElement_GetObjType","_FPDF_StructElement_GetParent","_FPDF_StructElement_GetRawType","_FPDF_StructElement_GetStringAttribute","_FPDF_StructElement_GetTitle","_FPDF_StructElement_GetType","_FPDF_StructTree_Close","_FPDF_StructTree_CountChildren","_FPDF_StructTree_GetChildAtIndex","_FPDF_StructTree_GetForPage","_FPDF_VIEWERREF_GetDuplex","_FPDF_VIEWERREF_GetName","_FPDF_VIEWERREF_GetNumCopies","_FPDF_VIEWERREF_GetPrintPageRange","_FPDF_VIEWERREF_GetPrintPageRangeCount","_FPDF_VIEWERREF_GetPrintPageRangeElement","_FPDF_VIEWERREF_GetPrintScaling","_FPDFAction_GetDest","_FPDFAction_GetFilePath","_FPDFAction_GetType","_FPDFAction_GetURIPath","_FPDFAnnot_AddFileAttachment","_FPDFAnnot_AddInkStroke","_FPDFAnnot_AppendAttachmentPoints","_FPDFAnnot_AppendObject","_FPDFAnnot_CountAttachmentPoints","_FPDFAnnot_GetAP","_FPDFAnnot_GetAttachmentPoints","_FPDFAnnot_GetBorder","_FPDFAnnot_GetColor","_FPDFAnnot_GetFileAttachment","_FPDFAnnot_GetFlags","_FPDFAnnot_GetFocusableSubtypes","_FPDFAnnot_GetFocusableSubtypesCount","_FPDFAnnot_GetFontColor","_FPDFAnnot_GetFontSize","_FPDFAnnot_GetFormAdditionalActionJavaScript","_FPDFAnnot_GetFormControlCount","_FPDFAnnot_GetFormControlIndex","_FPDFAnnot_GetFormFieldAlternateName","_FPDFAnnot_GetFormFieldAtPoint","_FPDFAnnot_GetFormFieldExportValue","_FPDFAnnot_GetFormFieldFlags","_FPDFAnnot_GetFormFieldName","_FPDFAnnot_GetFormFieldType","_FPDFAnnot_GetFormFieldValue","_FPDFAnnot_GetInkListCount","_FPDFAnnot_GetInkListPath","_FPDFAnnot_GetLine","_FPDFAnnot_GetLink","_FPDFAnnot_GetLinkedAnnot","_FPDFAnnot_GetNumberValue","_FPDFAnnot_GetObject","_FPDFAnnot_GetObjectCount","_FPDFAnnot_GetOptionCount","_FPDFAnnot_GetOptionLabel","_FPDFAnnot_GetRect","_FPDFAnnot_GetStringValue","_FPDFAnnot_GetSubtype","_FPDFAnnot_GetValueType","_FPDFAnnot_GetVertices","_FPDFAnnot_HasAttachmentPoints","_FPDFAnnot_HasKey","_FPDFAnnot_IsChecked","_FPDFAnnot_IsObjectSupportedSubtype","_FPDFAnnot_IsOptionSelected","_FPDFAnnot_IsSupportedSubtype","_FPDFAnnot_RemoveInkList","_FPDFAnnot_RemoveObject","_FPDFAnnot_SetAP","_FPDFAnnot_SetAttachmentPoints","_FPDFAnnot_SetBorder","_FPDFAnnot_SetColor","_FPDFAnnot_SetFlags","_FPDFAnnot_SetFocusableSubtypes","_FPDFAnnot_SetFontColor","_FPDFAnnot_SetFormFieldFlags","_FPDFAnnot_SetRect","_FPDFAnnot_SetStringValue","_FPDFAnnot_SetURI","_FPDFAnnot_UpdateObject","_FPDFAttachment_GetAFRelationship","_FPDFAttachment_GetDescription","_FPDFAttachment_GetFile","_FPDFAttachment_GetName","_FPDFAttachment_GetStringValue","_FPDFAttachment_GetSubtype","_FPDFAttachment_GetValueType","_FPDFAttachment_HasKey","_FPDFAttachment_SetDescription","_FPDFAttachment_SetFile","_FPDFAttachment_SetStringValue","_FPDFAvail_Create","_FPDFAvail_Destroy","_FPDFAvail_GetDocument","_FPDFAvail_GetFirstPageNum","_FPDFAvail_IsDocAvail","_FPDFAvail_IsFormAvail","_FPDFAvail_IsLinearized","_FPDFAvail_IsPageAvail","_FPDFBitmap_Create","_FPDFBitmap_CreateEx","_FPDFBitmap_Destroy","_FPDFBitmap_FillRect","_FPDFBitmap_GetBuffer","_FPDFBitmap_GetFormat","_FPDFBitmap_GetHeight","_FPDFBitmap_GetStride","_FPDFBitmap_GetWidth","_FPDFBookmark_Find","_FPDFBookmark_GetAction","_FPDFBookmark_GetColor","_FPDFBookmark_GetCount","_FPDFBookmark_GetDest","_FPDFBookmark_GetFirstChild","_FPDFBookmark_GetNextSibling","_FPDFBookmark_GetStyle","_FPDFBookmark_GetTitle","_FPDFCatalog_GetLanguage","_FPDFCatalog_IsTagged","_FPDFCatalog_SetLanguage","_FPDFClipPath_CountPaths","_FPDFClipPath_CountPathSegments","_FPDFClipPath_GetPathSegment","_FPDFDest_GetDestPageIndex","_FPDFDest_GetLocationInPage","_FPDFDest_GetView","_FPDFDoc_AddAttachment","_FPDFDoc_CloseJavaScriptAction","_FPDFDoc_DeleteAttachment","_FPDFDOC_ExitFormFillEnvironment","_FPDFDoc_GetAttachment","_FPDFDoc_GetAttachmentCount","_FPDFDoc_GetJavaScriptAction","_FPDFDoc_GetJavaScriptActionCount","_FPDFDoc_GetPageMode","_FPDFDOC_InitFormFillEnvironment","_FPDFFont_Close","_FPDFFont_GetAscent","_FPDFFont_GetBaseFontName","_FPDFFont_GetDescent","_FPDFFont_GetFamilyName","_FPDFFont_GetFlags","_FPDFFont_GetFontData","_FPDFFont_GetGlyphPath","_FPDFFont_GetGlyphWidth","_FPDFFont_GetIsEmbedded","_FPDFFont_GetItalicAngle","_FPDFFont_GetWeight","_FPDFFormObj_CountObjects","_FPDFFormObj_GetObject","_FPDFFormObj_RemoveObject","_FPDFGlyphPath_CountGlyphSegments","_FPDFGlyphPath_GetGlyphPathSegment","_FPDFImageObj_GetBitmap","_FPDFImageObj_GetIccProfileDataDecoded","_FPDFImageObj_GetImageDataDecoded","_FPDFImageObj_GetImageDataRaw","_FPDFImageObj_GetImageFilter","_FPDFImageObj_GetImageFilterCount","_FPDFImageObj_GetImageMetadata","_FPDFImageObj_GetImagePixelSize","_FPDFImageObj_GetRenderedBitmap","_FPDFImageObj_LoadJpegFile","_FPDFImageObj_LoadJpegFileInline","_FPDFImageObj_SetBitmap","_FPDFImageObj_SetMatrix","_FPDFJavaScriptAction_GetName","_FPDFJavaScriptAction_GetScript","_FPDFLink_CloseWebLinks","_FPDFLink_CountQuadPoints","_FPDFLink_CountRects","_FPDFLink_CountWebLinks","_FPDFLink_Enumerate","_FPDFLink_GetAction","_FPDFLink_GetAnnot","_FPDFLink_GetAnnotRect","_FPDFLink_GetDest","_FPDFLink_GetLinkAtPoint","_FPDFLink_GetLinkZOrderAtPoint","_FPDFLink_GetQuadPoints","_FPDFLink_GetRect","_FPDFLink_GetTextRange","_FPDFLink_GetURL","_FPDFLink_LoadWebLinks","_FPDFPage_CloseAnnot","_FPDFPage_CountObjects","_FPDFPage_CreateAnnot","_FPDFPage_Delete","_FPDFPage_Flatten","_FPDFPage_FormFieldZOrderAtPoint","_FPDFPage_GenerateContent","_FPDFPage_GetAnnot","_FPDFPage_GetAnnotCount","_FPDFPage_GetAnnotIndex","_FPDFPage_GetArtBox","_FPDFPage_GetBleedBox","_FPDFPage_GetCropBox","_FPDFPage_GetDecodedThumbnailData","_FPDFPage_GetMediaBox","_FPDFPage_GetObject","_FPDFPage_GetRawThumbnailData","_FPDFPage_GetRotation","_FPDFPage_GetThumbnailAsBitmap","_FPDFPage_GetTrimBox","_FPDFPage_HasFormFieldAtPoint","_FPDFPage_HasTransparency","_FPDFPage_InsertClipPath","_FPDFPage_InsertObject","_FPDFPage_InsertObjectAtIndex","_FPDFPage_New","_FPDFPage_RemoveAnnot","_FPDFPage_RemoveObject","_FPDFPage_SetArtBox","_FPDFPage_SetBleedBox","_FPDFPage_SetCropBox","_FPDFPage_SetMediaBox","_FPDFPage_SetRotation","_FPDFPage_SetTrimBox","_FPDFPage_TransformAnnots","_FPDFPage_TransFormWithClip","_FPDFPageObj_AddExistingMark","_FPDFPageObj_AddMark","_FPDFPageObj_CountMarks","_FPDFPageObj_CreateNewPath","_FPDFPageObj_CreateNewRect","_FPDFPageObj_CreateTextObj","_FPDFPageObj_Destroy","_FPDFPageObj_GetBounds","_FPDFPageObj_GetClipPath","_FPDFPageObj_GetDashArray","_FPDFPageObj_GetDashCount","_FPDFPageObj_GetDashPhase","_FPDFPageObj_GetFillColor","_FPDFPageObj_GetIsActive","_FPDFPageObj_GetLineCap","_FPDFPageObj_GetLineJoin","_FPDFPageObj_GetMark","_FPDFPageObj_GetMarkedContentID","_FPDFPageObj_GetMatrix","_FPDFPageObj_GetRenderedFillPattern","_FPDFPageObj_GetRenderedStrokePattern","_FPDFPageObj_GetRotatedBounds","_FPDFPageObj_GetStrokeColor","_FPDFPageObj_GetStrokeWidth","_FPDFPageObj_GetType","_FPDFPageObj_HasTransparency","_FPDFPageObj_NewImageObj","_FPDFPageObj_NewTextObj","_FPDFPageObj_RemoveMark","_FPDFPageObj_SetBlendMode","_FPDFPageObj_SetDashArray","_FPDFPageObj_SetDashPhase","_FPDFPageObj_SetFillColor","_FPDFPageObj_SetIsActive","_FPDFPageObj_SetLineCap","_FPDFPageObj_SetLineJoin","_FPDFPageObj_SetMatrix","_FPDFPageObj_SetStrokeColor","_FPDFPageObj_SetStrokeWidth","_FPDFPageObj_Transform","_FPDFPageObj_TransformClipPath","_FPDFPageObj_TransformF","_FPDFPageObjMark_CountParams","_FPDFPageObjMark_GetName","_FPDFPageObjMark_GetParamBlobValue","_FPDFPageObjMark_GetParamFloatValue","_FPDFPageObjMark_GetParamIntValue","_FPDFPageObjMark_GetParamKey","_FPDFPageObjMark_GetParamStringValue","_FPDFPageObjMark_GetParamValueType","_FPDFPageObjMark_RemoveParam","_FPDFPageObjMark_SetBlobParam","_FPDFPageObjMark_SetFloatParam","_FPDFPageObjMark_SetIntParam","_FPDFPageObjMark_SetStringParam","_FPDFPath_BezierTo","_FPDFPath_Close","_FPDFPath_CountSegments","_FPDFPath_GetBezierControlPoints","_FPDFPath_GetDrawMode","_FPDFPath_GetPathSegment","_FPDFPath_LineTo","_FPDFPath_MoveTo","_FPDFPath_SetDrawMode","_FPDFPathSegment_GetClose","_FPDFPathSegment_GetPoint","_FPDFPathSegment_GetType","_FPDFSignatureObj_GetByteRange","_FPDFSignatureObj_GetContents","_FPDFSignatureObj_GetDocMDPPermission","_FPDFSignatureObj_GetReason","_FPDFSignatureObj_GetSubFilter","_FPDFSignatureObj_GetTime","_FPDFText_ClosePage","_FPDFText_CountChars","_FPDFText_CountRects","_FPDFText_FindClose","_FPDFText_FindNext","_FPDFText_FindPrev","_FPDFText_FindStart","_FPDFText_GetBoundedText","_FPDFText_GetCharAngle","_FPDFText_GetCharBox","_FPDFText_GetCharIndexAtPos","_FPDFText_GetCharIndexFromTextIndex","_FPDFText_GetCharOrigin","_FPDFText_GetFillColor","_FPDFText_GetFontInfo","_FPDFText_GetFontSize","_FPDFText_GetFontWeight","_FPDFText_GetLooseCharBox","_FPDFText_GetMatrix","_FPDFText_GetRect","_FPDFText_GetSchCount","_FPDFText_GetSchResultIndex","_FPDFText_GetStrokeColor","_FPDFText_GetText","_FPDFText_GetTextIndexFromCharIndex","_FPDFText_GetTextObject","_FPDFText_GetUnicode","_FPDFText_HasUnicodeMapError","_FPDFText_IsGenerated","_FPDFText_IsHyphen","_FPDFText_LoadCidType2Font","_FPDFText_LoadFont","_FPDFText_LoadPage","_FPDFText_LoadStandardFont","_FPDFText_SetCharcodes","_FPDFText_SetPositions","_FPDFText_SetText","_FPDFTextObj_GetFont","_FPDFTextObj_GetFontSize","_FPDFTextObj_GetRenderedBitmap","_FPDFTextObj_GetText","_FPDFTextObj_GetTextRenderMode","_FPDFTextObj_SetFontSize","_FPDFTextObj_SetTextRenderMode","_malloc","_free","_memory","_EPDF_FillFromHostCrypto","___indirect_function_table","onRuntimeInitialized"].forEach(e=>{Object.getOwnPropertyDescriptor(y,e)||Object.defineProperty(y,e,{get:()=>J("You are getting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"),set:()=>J("You are setting "+e+" on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")})});var w="object"==typeof window,E="u">typeof WorkerGlobalScope,v="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&"renderer"!=process.type,k=!w&&!v&&!E,x=Object.assign({},t),G="./this.program",O="";if(k){if("object"==typeof process&&"function"==typeof A||"object"==typeof window||"u">typeof WorkerGlobalScope)throw Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)")}else if(w||E){if(E?O=self.location.href:"u">typeof document&&document.currentScript&&(O=document.currentScript.src),e&&(O=e),O=O.startsWith("blob:")?"":O.substr(0,O.replace(/[?#].*/,"").lastIndexOf("/")+1),"object"!=typeof window&&"u"{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),i=e=>(M(!Q(e),"readAsync does not work with file:// URLs"),fetch(e,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+" : "+e.url))))}else throw Error("environment detection error");var I=t.print||console.log.bind(console),N=t.printErr||console.error.bind(console);Object.assign(t,x),x=null,Object.getOwnPropertyDescriptor(t,b="fetchSettings")&&J(`\`Module.${b}\` was supplied but \`${b}\` not included in INCOMING_MODULE_JS_API`),t.arguments&&t.arguments,er("arguments","arguments_"),t.thisProgram&&(G=t.thisProgram),er("thisProgram","thisProgram"),M(void 0===t.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),M(void 0===t.read,"Module.read option was removed"),M(void 0===t.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),M(void 0===t.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),M(void 0===t.setWindowTitle,"Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)"),M(void 0===t.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),er("asm","wasmExports"),er("readAsync","readAsync"),er("readBinary","readBinary"),er("setWindowTitle","setWindowTitle"),M(!v,"node environment detected but not enabled at build time. Add `node` to `-sENVIRONMENT` to enable."),M(!k,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable.");var C=t.wasmBinary;er("wasmBinary","wasmBinary"),"object"!=typeof WebAssembly&&N("no native wasm support detected");var j=!1;function M(e,t){e||J("Assertion failed"+(t?": "+t:""))}function R(){var e=a.buffer;t.HEAP8=s=new Int8Array(e),t.HEAP16=u=new Int16Array(e),t.HEAPU8=l=new Uint8Array(e),t.HEAPU16=d=new Uint16Array(e),t.HEAP32=c=new Int32Array(e),t.HEAPU32=f=new Uint32Array(e),t.HEAPF32=m=new Float32Array(e),t.HEAPF64=p=new Float64Array(e)}function T(){if(!j){var e=e1();0==e&&(e+=4);var t=f[e>>>2>>>0],n=f[e+4>>>2>>>0];(0x2135467!=t||0x89bacdfe!=n)&&J(`Stack overflow! Stack cookie has been overwritten at ${ec(e)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ec(n)} ${ec(t)}`),0x63736d65!=f[0]&&J("Runtime error: The application has corrupted its heap memory area (address zero)!")}}M(!t.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),M("u">typeof Int32Array&&"u">typeof Float64Array&&void 0!=Int32Array.prototype.subarray&&void 0!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),M(!t.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),M(!t.INITIAL_MEMORY,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically");var B=[],L=[],$=[],z=!1;M(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),M(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var U=0,V=null,W=null,q={};function H(e){for(var t=e;;){if(!q[e])return e;e=t+Math.random()}}function K(e){U++,t.monitorRunDependencies?.(U),e?(M(!q[e]),q[e]=1,null===V&&"u">typeof setInterval&&(V=setInterval(()=>{if(j){clearInterval(V),V=null;return}var e=!1;for(var t in q)e||(e=!0,N("still waiting on run dependencies:")),N(`dependency: ${t}`);e&&N("(end of list)")},1e4))):N("warning: run dependency added without ID")}function Z(e){if(U--,t.monitorRunDependencies?.(U),e?(M(q[e]),delete q[e]):N("warning: run dependency removed without ID"),0==U&&(null!==V&&(clearInterval(V),V=null),W)){var n=W;W=null,n()}}function J(e){t.onAbort?.(e),N(e="Aborted("+e+")"),j=!0;var n=new WebAssembly.RuntimeError(e);throw r(n),n}var Q=e=>e.startsWith("file://");function X(e,t){return(...n)=>{M(z,`native function \`${e}\` called before runtime initialization`);var r=eZ[e];return M(r,`exported native function \`${e}\` not found`),M(n.length<=t,`native function \`${e}\` called with ${n.length} args but expects ${t}`),r(...n)}}function Y(e){if(e==h&&C)return new Uint8Array(C);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function ee(e,t,n){return(!C?i(e).then(e=>new Uint8Array(e),()=>Y(e)):Promise.resolve().then(()=>Y(e))).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{N(`failed to asynchronously prepare wasm: ${e}`),Q(h)&&N(`warning: Loading from a file URI (${h}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`),J(e)})}var et=new Int16Array(1),en=new Int8Array(et.buffer);if(et[0]=25459,115!==en[0]||99!==en[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)";if(t.ENVIRONMENT)throw Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");function er(e,n,r=!0){Object.getOwnPropertyDescriptor(t,e)||Object.defineProperty(t,e,{configurable:!0,get(){J(`\`Module.${e}\` has been replaced by \`${n}\``+(r?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":""))}})}function ei(e){return"FS_createPath"===e||"FS_createDataFile"===e||"FS_createPreloadedFile"===e||"FS_unlink"===e||"addRunDependency"===e||"FS_createLazyFile"===e||"FS_createDevice"===e||"removeRunDependency"===e}function eo(e,t){"u">typeof globalThis&&!Object.getOwnPropertyDescriptor(globalThis,e)&&Object.defineProperty(globalThis,e,{configurable:!0,get(){t()}})}function ea(e,t){eo(e,()=>{em(`\`${e}\` is not longer defined by emscripten. ${t}`)})}function es(e){Object.getOwnPropertyDescriptor(t,e)||Object.defineProperty(t,e,{configurable:!0,get(){var t=`'${e}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;ei(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),J(t)}})}ea("buffer","Please use HEAP8.buffer or wasmMemory.buffer"),ea("asm","Please use wasmExports instead");class el{constructor(e){S(this,"name","ExitStatus"),this.message=`Program terminated with exit(${e})`,this.status=e}}var eu=e=>{for(;e.length>0;)e.shift()(t)},ed=t.noExitRuntime||!0,ec=e=>(M("number"==typeof e),"0x"+e.toString(16).padStart(8,"0")),ef=()=>e6(),em=e=>{em.shown||(em.shown={}),em.shown[e]||(em.shown[e]=1,N(e))},ep=(e,t)=>(M(e==e>>>0||e==(0|e)),M(t===(0|t)),t+2097152>>>0<4194305-!!e?(e>>>0)+0x100000000*t:0/0),eh="u">typeof TextDecoder?new TextDecoder:void 0,eF=(e,t=0,n=0/0)=>{for(var r=(t>>>=0)+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&eh)return eh.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&u)}}return o},eg=(e,t)=>(M("number"==typeof e,`UTF8ToString expects a number (got ${typeof e})`),(e>>>=0)?eF(l,e,t):""),e_=()=>{M(void 0!=eC.varargs);var e=c[eC.varargs>>>2>>>0];return eC.varargs+=4,e},eP={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:e=>{var t=eP.isAbs(e),n="/"===e.substr(-1);return(e=eP.normalizeArray(e.split("/").filter(e=>!!e),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=eP.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=eP.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return -1===t?e:e.substr(t+1)},join:(...e)=>eP.normalize(e.join("/")),join2:(e,t)=>eP.normalize(e+"/"+t)},eD=e=>(eD=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);J("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")})())(e),eb={resolve:(...e)=>{for(var t="",n=!1,r=e.length-1;r>=-1&&!n;r--){var i=r>=0?e[r]:eN.cwd();if("string"!=typeof i)throw TypeError("Arguments to path.resolve must be strings");if(!i)return"";t=i+"/"+t,n=eP.isAbs(i)}return t=eP.normalizeArray(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."},relative:(e,t)=>{function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=eb.resolve(e).substr(1),t=eb.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),o=Math.min(r.length,i.length),a=o,s=0;s{for(var t=0,n=0;n=55296&&r<=57343?(t+=4,++n):t+=3}return t},eE=(e,t,n,r)=>{if(n>>>=0,M("string"==typeof e,`stringToUTF8Array expects a string (got ${typeof e})`),!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(n>=o)break;t[n++>>>0]=s}else if(s<=2047){if(n+1>=o)break;t[n++>>>0]=192|s>>6,t[n++>>>0]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++>>>0]=224|s>>12,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|63&s}else{if(n+3>=o)break;s>1114111&&em("Invalid Unicode code point "+ec(s)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[n++>>>0]=240|s>>18,t[n++>>>0]=128|s>>12&63,t[n++>>>0]=128|s>>6&63,t[n++>>>0]=128|63&s}}return t[n>>>0]=0,n-i};function eA(e,t,n){var r=Array(n>0?n:ew(e)+1),i=eE(e,r,0,r.length);return t&&(r.length=i),r}var ev={ttys:[],init(){},shutdown(){},register(e,t){ev.ttys[e]={input:[],output:[],ops:t},eN.registerDevice(e,ev.stream_ops)},stream_ops:{open(e){var t=ev.ttys[e.node.rdev];if(!t)throw new eN.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,n,r,i){if(!e.tty||!e.tty.ops.get_char)throw new eN.ErrnoError(60);for(var o,a=0,s=0;s(()=>{if(!ey.length){var e=null;if("u">typeof window&&"function"==typeof window.prompt&&null!==(e=window.prompt("Input: "))&&(e+=` +`),!e)return null;ey=eA(e,!0)}return ey.shift()})(),put_char(e,t){null===t||10===t?(I(eF(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(I(eF(e.output)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,n)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(N(eF(e.output)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(N(eF(e.output)),e.output=[])}}},eS=(e,t)=>(M(t,"alignment argument is required"),Math.ceil(e/t)*t),ek=e=>{var t,n=eX(65536,e=eS(e,65536));return n&&(t=e,l.fill(0,n,n+t)),n},ex={ops_table:null,mount:e=>ex.createNode(null,"/",16895,0),createNode(e,t,n,r){if(eN.isBlkdev(n)||eN.isFIFO(n))throw new eN.ErrnoError(63);ex.ops_table||(ex.ops_table={dir:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr,lookup:ex.node_ops.lookup,mknod:ex.node_ops.mknod,rename:ex.node_ops.rename,unlink:ex.node_ops.unlink,rmdir:ex.node_ops.rmdir,readdir:ex.node_ops.readdir,symlink:ex.node_ops.symlink},stream:{llseek:ex.stream_ops.llseek}},file:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr},stream:{llseek:ex.stream_ops.llseek,read:ex.stream_ops.read,write:ex.stream_ops.write,allocate:ex.stream_ops.allocate,mmap:ex.stream_ops.mmap,msync:ex.stream_ops.msync}},link:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr,readlink:ex.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ex.node_ops.getattr,setattr:ex.node_ops.setattr},stream:eN.chrdev_stream_ops}});var i=eN.createNode(e,t,n,r);return eN.isDir(i.mode)?(i.node_ops=ex.ops_table.dir.node,i.stream_ops=ex.ops_table.dir.stream,i.contents={}):eN.isFile(i.mode)?(i.node_ops=ex.ops_table.file.node,i.stream_ops=ex.ops_table.file.stream,i.usedBytes=0,i.contents=null):eN.isLink(i.mode)?(i.node_ops=ex.ops_table.link.node,i.stream_ops=ex.ops_table.link.stream):eN.isChrdev(i.mode)&&(i.node_ops=ex.ops_table.chrdev.node,i.stream_ops=ex.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var n=e.contents?e.contents.length:0;if(!(n>=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var n=e.contents;e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=eN.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,eN.isDir(e.mode)?t.size=4096:eN.isFile(e.mode)?t.size=e.usedBytes:eN.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&ex.resizeFileStorage(e,t.size)},lookup(e,t){throw new eN.ErrnoError(44)},mknod:(e,t,n,r)=>ex.createNode(e,t,n,r),rename(e,t,n){if(eN.isDir(e.mode)){var r;try{r=eN.lookupNode(t,n)}catch{}if(r)for(var i in r.contents)throw new eN.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=n,t.contents[n]=e,t.timestamp=e.parent.timestamp},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var n=eN.lookupNode(e,t);for(var r in n.contents)throw new eN.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var n of Object.keys(e.contents))t.push(n);return t},symlink(e,t,n){var r=ex.createNode(e,t,41471,0);return r.link=n,r},readlink(e){if(!eN.isLink(e.mode))throw new eN.ErrnoError(28);return e.link}},stream_ops:{read(e,t,n,r,i){var o=e.node.contents;if(i>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,r);if(M(a>=0),a>8&&o.subarray)t.set(o.subarray(i,i+a),n);else for(var s=0;s0||n+t>>0))}return{ptr:o,allocated:a}},msync:(e,t,n,r,i)=>(ex.stream_ops.write(e,t,0,r,n,!1),0)}},eG=t.preloadPlugins||[],eO=(e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n},eI={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},eN={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class extends Error{constructor(e){for(var t in super(z?eg(eQ(e)):""),S(this,"name","ErrnoError"),this.errno=e,eI)if(eI[t]===e){this.code=t;break}}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{constructor(){S(this,"shared",{})}get object(){return this.node}set object(e){this.node=e}get isRead(){return(2097155&this.flags)!=1}get isWrite(){return(2097155&this.flags)!=0}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{constructor(e,t,n,r){S(this,"node_ops",{}),S(this,"stream_ops",{}),S(this,"readMode",365),S(this,"writeMode",146),S(this,"mounted",null),e||(e=this),this.parent=e,this.mount=e.mount,this.id=eN.nextInode++,this.name=t,this.mode=n,this.rdev=r}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return eN.isDir(this.mode)}get isDevice(){return eN.isChrdev(this.mode)}},lookupPath(e,t={}){if(!(e=eb.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new eN.ErrnoError(32);for(var n=e.split("/").filter(e=>!!e),r=eN.root,i="/",o=0;o40)throw new eN.ErrnoError(32)}}return{path:i,node:r}},getPath(e){for(var t;;){if(eN.isRoot(e)){var n=e.mount.mountpoint;if(!t)return n;return"/"!==n[n.length-1]?`${n}/${t}`:n+t}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var n=0,r=0;r>>0)%eN.nameTable.length},hashAddNode(e){var t=eN.hashName(e.parent.id,e.name);e.name_next=eN.nameTable[t],eN.nameTable[t]=e},hashRemoveNode(e){var t=eN.hashName(e.parent.id,e.name);if(eN.nameTable[t]===e)eN.nameTable[t]=e.name_next;else for(var n=eN.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode(e,t){var n=eN.mayLookup(e);if(n)throw new eN.ErrnoError(n);for(var r=eN.hashName(e.id,t),i=eN.nameTable[r];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return eN.lookup(e,t)},createNode(e,t,n,r){M("object"==typeof e);var i=new eN.FSNode(e,t,n,r);return eN.hashAddNode(i),i},destroyNode(e){eN.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>(61440&e)==32768,isDir:e=>(61440&e)==16384,isLink:e=>(61440&e)==40960,isChrdev:e=>(61440&e)==8192,isBlkdev:e=>(61440&e)==24576,isFIFO:e=>(61440&e)==4096,isSocket:e=>(49152&e)==49152,flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>eN.ignorePermissions?0:t.includes("r")&&!(292&e.mode)||t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0,mayLookup:e=>eN.isDir(e.mode)?eN.nodePermissions(e,"x")||2*!e.node_ops.lookup:54,mayCreate(e,t){try{return eN.lookupNode(e,t),20}catch(e){}return eN.nodePermissions(e,"wx")},mayDelete(e,t,n){try{r=eN.lookupNode(e,t)}catch(e){return e.errno}var r,i=eN.nodePermissions(e,"wx");if(i)return i;if(n){if(!eN.isDir(r.mode))return 54;if(eN.isRoot(r)||eN.getPath(r)===eN.cwd())return 10}else if(eN.isDir(r.mode))return 31;return 0},mayOpen:(e,t)=>e?eN.isLink(e.mode)?32:eN.isDir(e.mode)&&("r"!==eN.flagsToPermissionString(t)||512&t)?31:eN.nodePermissions(e,eN.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=eN.MAX_OPEN_FDS;e++)if(!eN.streams[e])return e;throw new eN.ErrnoError(33)},getStreamChecked(e){var t=eN.getStream(e);if(!t)throw new eN.ErrnoError(8);return t},getStream:e=>eN.streams[e],createStream:(e,t=-1)=>(M(t>=-1),e=Object.assign(new eN.FSStream,e),-1==t&&(t=eN.nextfd()),e.fd=t,eN.streams[t]=e,e),closeStream(e){eN.streams[e]=null},dupStream(e,t=-1){var n=eN.createStream(e,t);return n.stream_ops?.dup?.(n),n},chrdev_stream_ops:{open(e){var t=eN.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new eN.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){eN.devices[e]={stream_ops:t}},getDevice:e=>eN.devices[e],getMounts(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push(...r.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),eN.syncFSRequests++,eN.syncFSRequests>1&&N(`warning: ${eN.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var n=eN.getMounts(eN.root.mount),r=0;function i(e){return M(eN.syncFSRequests>0),eN.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++r>=n.length&&i(null)}n.forEach(t=>{if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)})},mount(e,t,n){if("string"==typeof e)throw e;var r,i="/"===n,o=!n;if(i&&eN.root)throw new eN.ErrnoError(10);if(!i&&!o){var a=eN.lookupPath(n,{follow_mount:!1});if(n=a.path,r=a.node,eN.isMountpoint(r))throw new eN.ErrnoError(10);if(!eN.isDir(r.mode))throw new eN.ErrnoError(54)}var s={type:e,opts:t,mountpoint:n,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,i?eN.root=l:r&&(r.mounted=s,r.mount&&r.mount.mounts.push(s)),l},unmount(e){var t=eN.lookupPath(e,{follow_mount:!1});if(!eN.isMountpoint(t.node))throw new eN.ErrnoError(28);var n=t.node,r=n.mounted,i=eN.getMounts(r);Object.keys(eN.nameTable).forEach(e=>{for(var t=eN.nameTable[e];t;){var n=t.name_next;i.includes(t.mount)&&eN.destroyNode(t),t=n}}),n.mounted=null;var o=n.mount.mounts.indexOf(r);M(-1!==o),n.mount.mounts.splice(o,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,n){var r=eN.lookupPath(e,{parent:!0}).node,i=eP.basename(e);if(!i||"."===i||".."===i)throw new eN.ErrnoError(28);var o=eN.mayCreate(r,i);if(o)throw new eN.ErrnoError(o);if(!r.node_ops.mknod)throw new eN.ErrnoError(63);return r.node_ops.mknod(r,i,t,n)},create:(e,t)=>(t=(void 0!==t?t:438)&4095|32768,eN.mknod(e,t,0)),mkdir:(e,t)=>(t=(void 0!==t?t:511)&1023|16384,eN.mknod(e,t,0)),mkdirTree(e,t){for(var n=e.split("/"),r="",i=0;i(void 0===n&&(n=t,t=438),t|=8192,eN.mknod(e,t,n)),symlink(e,t){if(!eb.resolve(e))throw new eN.ErrnoError(44);var n=eN.lookupPath(t,{parent:!0}).node;if(!n)throw new eN.ErrnoError(44);var r=eP.basename(t),i=eN.mayCreate(n,r);if(i)throw new eN.ErrnoError(i);if(!n.node_ops.symlink)throw new eN.ErrnoError(63);return n.node_ops.symlink(n,r,e)},rename(e,t){var n,r,i,o=eP.dirname(e),a=eP.dirname(t),s=eP.basename(e),l=eP.basename(t);if(n=eN.lookupPath(e,{parent:!0}).node,r=eN.lookupPath(t,{parent:!0}).node,!n||!r)throw new eN.ErrnoError(44);if(n.mount!==r.mount)throw new eN.ErrnoError(75);var u=eN.lookupNode(n,s),d=eb.relative(e,a);if("."!==d.charAt(0))throw new eN.ErrnoError(28);if("."!==(d=eb.relative(t,o)).charAt(0))throw new eN.ErrnoError(55);try{i=eN.lookupNode(r,l)}catch(e){}if(u!==i){var c=eN.isDir(u.mode),f=eN.mayDelete(n,s,c);if(f||(f=i?eN.mayDelete(r,l,c):eN.mayCreate(r,l)))throw new eN.ErrnoError(f);if(!n.node_ops.rename)throw new eN.ErrnoError(63);if(eN.isMountpoint(u)||i&&eN.isMountpoint(i))throw new eN.ErrnoError(10);if(r!==n&&(f=eN.nodePermissions(n,"w")))throw new eN.ErrnoError(f);eN.hashRemoveNode(u);try{n.node_ops.rename(u,r,l),u.parent=r}catch(e){throw e}finally{eN.hashAddNode(u)}}},rmdir(e){var t=eN.lookupPath(e,{parent:!0}).node,n=eP.basename(e),r=eN.lookupNode(t,n),i=eN.mayDelete(t,n,!0);if(i)throw new eN.ErrnoError(i);if(!t.node_ops.rmdir)throw new eN.ErrnoError(63);if(eN.isMountpoint(r))throw new eN.ErrnoError(10);t.node_ops.rmdir(t,n),eN.destroyNode(r)},readdir(e){var t=eN.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new eN.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=eN.lookupPath(e,{parent:!0}).node;if(!t)throw new eN.ErrnoError(44);var n=eP.basename(e),r=eN.lookupNode(t,n),i=eN.mayDelete(t,n,!1);if(i)throw new eN.ErrnoError(i);if(!t.node_ops.unlink)throw new eN.ErrnoError(63);if(eN.isMountpoint(r))throw new eN.ErrnoError(10);t.node_ops.unlink(t,n),eN.destroyNode(r)},readlink(e){var t=eN.lookupPath(e).node;if(!t)throw new eN.ErrnoError(44);if(!t.node_ops.readlink)throw new eN.ErrnoError(28);return eb.resolve(eN.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var n=eN.lookupPath(e,{follow:!t}).node;if(!n)throw new eN.ErrnoError(44);if(!n.node_ops.getattr)throw new eN.ErrnoError(63);return n.node_ops.getattr(n)},lstat:e=>eN.stat(e,!0),chmod(e,t,n){var r;if(!(r="string"==typeof e?eN.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new eN.ErrnoError(63);r.node_ops.setattr(r,{mode:4095&t|-4096&r.mode,timestamp:Date.now()})},lchmod(e,t){eN.chmod(e,t,!0)},fchmod(e,t){var n=eN.getStreamChecked(e);eN.chmod(n.node,t)},chown(e,t,n,r){var i;if(!(i="string"==typeof e?eN.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new eN.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,n){eN.chown(e,t,n,!0)},fchown(e,t,n){var r=eN.getStreamChecked(e);eN.chown(r.node,t,n)},truncate(e,t){if(t<0)throw new eN.ErrnoError(28);if("string"==typeof e){var n;n=eN.lookupPath(e,{follow:!0}).node}else n=e;if(!n.node_ops.setattr)throw new eN.ErrnoError(63);if(eN.isDir(n.mode))throw new eN.ErrnoError(31);if(!eN.isFile(n.mode))throw new eN.ErrnoError(28);var r=eN.nodePermissions(n,"w");if(r)throw new eN.ErrnoError(r);n.node_ops.setattr(n,{size:t,timestamp:Date.now()})},ftruncate(e,t){var n=eN.getStreamChecked(e);if((2097155&n.flags)==0)throw new eN.ErrnoError(28);eN.truncate(n.node,t)},utime(e,t,n){var r=eN.lookupPath(e,{follow:!0}).node;r.node_ops.setattr(r,{timestamp:Math.max(t,n)})},open(e,n,r){if(""===e)throw new eN.ErrnoError(44);if(r=64&(n="string"==typeof n?(e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw Error(`Unknown file open mode: ${e}`);return t})(n):n)?4095&(r=void 0===r?438:r)|32768:0,"object"==typeof e)i=e;else{e=eP.normalize(e);try{var i;i=eN.lookupPath(e,{follow:!(131072&n)}).node}catch(e){}}var o=!1;if(64&n)if(i){if(128&n)throw new eN.ErrnoError(20)}else i=eN.mknod(e,r,0),o=!0;if(!i)throw new eN.ErrnoError(44);if(eN.isChrdev(i.mode)&&(n&=-513),65536&n&&!eN.isDir(i.mode))throw new eN.ErrnoError(54);if(!o){var a=eN.mayOpen(i,n);if(a)throw new eN.ErrnoError(a)}512&n&&!o&&eN.truncate(i,0),n&=-131713;var s=eN.createStream({node:i,path:eN.getPath(i),flags:n,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!t.logReadFiles||1&n||e in eN.readFiles||(eN.readFiles[e]=1),s},close(e){if(eN.isClosed(e))throw new eN.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{eN.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,n){if(eN.isClosed(e))throw new eN.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new eN.ErrnoError(70);if(0!=n&&1!=n&&2!=n)throw new eN.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,n),e.ungotten=[],e.position},read(e,t,n,r,i){if(M(n>=0),r<0||i<0)throw new eN.ErrnoError(28);if(eN.isClosed(e)||(2097155&e.flags)==1)throw new eN.ErrnoError(8);if(eN.isDir(e.node.mode))throw new eN.ErrnoError(31);if(!e.stream_ops.read)throw new eN.ErrnoError(28);var o=void 0!==i;if(o){if(!e.seekable)throw new eN.ErrnoError(70)}else i=e.position;var a=e.stream_ops.read(e,t,n,r,i);return o||(e.position+=a),a},write(e,t,n,r,i,o){if(M(n>=0),r<0||i<0)throw new eN.ErrnoError(28);if(eN.isClosed(e)||(2097155&e.flags)==0)throw new eN.ErrnoError(8);if(eN.isDir(e.node.mode))throw new eN.ErrnoError(31);if(!e.stream_ops.write)throw new eN.ErrnoError(28);e.seekable&&1024&e.flags&&eN.llseek(e,0,2);var a=void 0!==i;if(a){if(!e.seekable)throw new eN.ErrnoError(70)}else i=e.position;var s=e.stream_ops.write(e,t,n,r,i,o);return a||(e.position+=s),s},allocate(e,t,n){if(eN.isClosed(e))throw new eN.ErrnoError(8);if(t<0||n<=0)throw new eN.ErrnoError(28);if((2097155&e.flags)==0)throw new eN.ErrnoError(8);if(!eN.isFile(e.node.mode)&&!eN.isDir(e.node.mode))throw new eN.ErrnoError(43);if(!e.stream_ops.allocate)throw new eN.ErrnoError(138);e.stream_ops.allocate(e,t,n)},mmap(e,t,n,r,i){if((2&r)!=0&&(2&i)==0&&(2097155&e.flags)!=2||(2097155&e.flags)==1)throw new eN.ErrnoError(2);if(!e.stream_ops.mmap)throw new eN.ErrnoError(43);if(!t)throw new eN.ErrnoError(28);return e.stream_ops.mmap(e,t,n,r,i)},msync:(e,t,n,r,i)=>(M(n>=0),e.stream_ops.msync)?e.stream_ops.msync(e,t,n,r,i):0,ioctl(e,t,n){if(!e.stream_ops.ioctl)throw new eN.ErrnoError(59);return e.stream_ops.ioctl(e,t,n)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw Error(`Invalid encoding type "${t.encoding}"`);var n,r=eN.open(e,t.flags),i=eN.stat(e).size,o=new Uint8Array(i);return eN.read(r,o,0,i,0),"utf8"===t.encoding?n=eF(o):"binary"===t.encoding&&(n=o),eN.close(r),n},writeFile(e,t,n={}){n.flags=n.flags||577;var r=eN.open(e,n.flags,n.mode);if("string"==typeof t){var i=new Uint8Array(ew(t)+1),o=eE(t,i,0,i.length);eN.write(r,i,0,o,void 0,n.canOwn)}else if(ArrayBuffer.isView(t))eN.write(r,t,0,t.byteLength,void 0,n.canOwn);else throw Error("Unsupported data type");eN.close(r)},cwd:()=>eN.currentPath,chdir(e){var t=eN.lookupPath(e,{follow:!0});if(null===t.node)throw new eN.ErrnoError(44);if(!eN.isDir(t.node.mode))throw new eN.ErrnoError(54);var n=eN.nodePermissions(t.node,"x");if(n)throw new eN.ErrnoError(n);eN.currentPath=t.path},createDefaultDirectories(){eN.mkdir("/tmp"),eN.mkdir("/home"),eN.mkdir("/home/web_user")},createDefaultDevices(){eN.mkdir("/dev"),eN.registerDevice(eN.makedev(1,3),{read:()=>0,write:(e,t,n,r,i)=>r,llseek:()=>0}),eN.mkdev("/dev/null",eN.makedev(1,3)),ev.register(eN.makedev(5,0),ev.default_tty_ops),ev.register(eN.makedev(6,0),ev.default_tty1_ops),eN.mkdev("/dev/tty",eN.makedev(5,0)),eN.mkdev("/dev/tty1",eN.makedev(6,0));var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=eD(e).byteLength),e[--t]);eN.createDevice("/dev","random",n),eN.createDevice("/dev","urandom",n),eN.mkdir("/dev/shm"),eN.mkdir("/dev/shm/tmp")},createSpecialDirectories(){eN.mkdir("/proc");var e=eN.mkdir("/proc/self");eN.mkdir("/proc/self/fd"),eN.mount({mount(){var t=eN.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var n=eN.getStreamChecked(+t),r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return r.parent=r,r}},t}},{},"/proc/self/fd")},createStandardStreams(e,t,n){e?eN.createDevice("/dev","stdin",e):eN.symlink("/dev/tty","/dev/stdin"),t?eN.createDevice("/dev","stdout",null,t):eN.symlink("/dev/tty","/dev/stdout"),n?eN.createDevice("/dev","stderr",null,n):eN.symlink("/dev/tty1","/dev/stderr");var r=eN.open("/dev/stdin",0),i=eN.open("/dev/stdout",1),o=eN.open("/dev/stderr",1);M(0===r.fd,`invalid handle for stdin (${r.fd})`),M(1===i.fd,`invalid handle for stdout (${i.fd})`),M(2===o.fd,`invalid handle for stderr (${o.fd})`)},staticInit(){eN.nameTable=Array(4096),eN.mount(ex,{},"/"),eN.createDefaultDirectories(),eN.createDefaultDevices(),eN.createSpecialDirectories(),eN.filesystems={MEMFS:ex}},init(e,n,r){M(!eN.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),eN.initialized=!0,e??(e=t.stdin),n??(n=t.stdout),r??(r=t.stderr),eN.createStandardStreams(e,n,r)},quit(){eN.initialized=!1,eJ(0);for(var e=0;etypeof XMLHttpRequest)throw Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{e.contents=o(e.url),e.usedBytes=e.contents.length}catch(e){throw new eN.ErrnoError(29)}},createLazyFile(e,t,n,r,i){if("u">typeof XMLHttpRequest){if(!E)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o={isDevice:!1,contents:new class{constructor(){S(this,"lengthKnown",!1),S(this,"chunks",[])}get(e){if(!(e>this.length-1)&&!(e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}}setDataGetter(e){this.getter=e}cacheLength(){var e,t=new XMLHttpRequest;if(t.open("HEAD",n,!1),t.send(null),!(t.status>=200&&t.status<300||304===t.status))throw Error("Couldn't load "+n+". Status: "+t.status);var r=Number(t.getResponseHeader("Content-length")),i=(e=t.getResponseHeader("Accept-Ranges"))&&"bytes"===e,o=(e=t.getResponseHeader("Content-Encoding"))&&"gzip"===e,a=1048576;i||(a=r);var s=this;s.setDataGetter(e=>{var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw Error("Couldn't load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):eA(i.responseText||"",!0)})(t,i)),void 0===s.chunks[e])throw Error("doXHR failed!");return s.chunks[e]}),(o||!r)&&(a=r=1,a=r=this.getter(0).length,I("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}}}else var o={isDevice:!1,url:n};var a=eN.createFile(e,t,o,r,i);o.contents?a.contents=o.contents:o.url&&(a.contents=null,a.url=o.url),Object.defineProperties(a,{usedBytes:{get:function(){return this.contents.length}}});var l={};function u(e,t,n,r,i){var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,r);if(M(a>=0),o.slice)for(var s=0;s{var t=a.stream_ops[e];l[e]=(...e)=>(eN.forceLoadFile(a),t(...e))}),l.read=(e,t,n,r,i)=>(eN.forceLoadFile(a),u(e,t,n,r,i)),l.mmap=(e,t,n,r,i)=>{eN.forceLoadFile(a);var o=ek(t);if(!o)throw new eN.ErrnoError(48);return u(e,s,o,t,n),{ptr:o,allocated:!0}},a.stream_ops=l,a},absolutePath(){J("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder(){J("FS.createFolder has been removed; use FS.mkdir instead")},createLink(){J("FS.createLink has been removed; use FS.symlink instead")},joinPath(){J("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc(){J("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath(){J("FS.standardizePath has been removed; use PATH.normalize instead")}},eC={DEFAULT_POLLMASK:5,calculateAt(e,t,n){if(eP.isAbs(t))return t;if(-100===e)r=eN.cwd();else{var r;r=eC.getStreamFromFD(e).path}if(0==t.length){if(!n)throw new eN.ErrnoError(44);return r}return eP.join2(r,t)},doStat(e,t,n){var r=e(t);c[n>>>2>>>0]=r.dev,c[n+4>>>2>>>0]=r.mode,f[n+8>>>2>>>0]=r.nlink,c[n+12>>>2>>>0]=r.uid,c[n+16>>>2>>>0]=r.gid,c[n+20>>>2>>>0]=r.rdev,g=[r.size>>>0,+Math.abs(F=r.size)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+24>>>2>>>0]=g[0],c[n+28>>>2>>>0]=g[1],c[n+32>>>2>>>0]=4096,c[n+36>>>2>>>0]=r.blocks;var i=r.atime.getTime(),o=r.mtime.getTime(),a=r.ctime.getTime();return g=[Math.floor(i/1e3)>>>0,+Math.abs(F=Math.floor(i/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+40>>>2>>>0]=g[0],c[n+44>>>2>>>0]=g[1],f[n+48>>>2>>>0]=i%1e3*1e6,g=[Math.floor(o/1e3)>>>0,+Math.abs(F=Math.floor(o/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+56>>>2>>>0]=g[0],c[n+60>>>2>>>0]=g[1],f[n+64>>>2>>>0]=o%1e3*1e6,g=[Math.floor(a/1e3)>>>0,+Math.abs(F=Math.floor(a/1e3))>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+72>>>2>>>0]=g[0],c[n+76>>>2>>>0]=g[1],f[n+80>>>2>>>0]=a%1e3*1e6,g=[r.ino>>>0,+Math.abs(F=r.ino)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0],c[n+88>>>2>>>0]=g[0],c[n+92>>>2>>>0]=g[1],0},doMsync(e,t,n,r,i){if(!eN.isFile(t.node.mode))throw new eN.ErrnoError(43);if(2&r)return 0;var o=l.slice(e,e+n);eN.msync(t,o,i,n,r)},getStreamFromFD:e=>eN.getStreamChecked(e),varargs:void 0,getStr:e=>eg(e)},ej=(e,t,n)=>(M("number"==typeof n,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),eE(e,l,t,n)),eM=[0,31,60,91,121,152,182,213,244,274,305,335],eR=[0,31,59,90,120,151,181,212,243,273,304,334],eT=e=>{var t=a.buffer,n=(e-t.byteLength+65535)/65536|0;try{return a.grow(n),R(),1}catch(n){N(`growMemory: Attempted to grow heap from ${t.byteLength} bytes to ${e} bytes, but got error: ${n}`)}},eB={},eL=()=>{if(!eL.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:G||"./this.program"};for(var t in eB)void 0===eB[t]?delete e[t]:e[t]=eB[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);eL.strings=n}return eL.strings},e$=[],ez=e=>{var t=e$[e];return t||(e>=e$.length&&(e$.length=e+1),e$[e]=t=_.get(e)),M(_.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t},eU="u">typeof TextDecoder?new TextDecoder("utf-16le"):void 0,eV=(e,t)=>{M(e<16384),e<128?t.push(e):t.push(e%128|128,e>>7)},eW=[],eq=(e,t)=>{_.set(e,t),e$[e]=_.get(e)},eH=(e,n,r,i,o)=>{var a,l,u={string:e=>{var t,n,r=0;return null!=e&&0!==e&&(t=ew(e)+1,ej(e,n=e2(t),t),r=n),r},array:e=>{let t;var n=(t=e.length,e2(t));return M(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),s.set(e,n>>>0),n}},d=(M(a=t["_"+e],"Cannot call unknown function "+e+", make sure it is exported"),a),c=[],f=0;if(M("array"!==n,'Return type should not be "array".'),i)for(var m=0;m{var c,f=t?eb.resolve(eP.join2(e,t)):e,m=H(`cp ${f}`);function p(n){var i,c;function p(n){d?.(),l||eN.createDataFile(e,t,n,r,o,u),a?.(),Z(m)}i=()=>{s?.(),Z(m)},"u">typeof Browser&&Browser.init(),c=!1,eG.forEach(e=>{!c&&e.canHandle(f)&&(e.handle(n,f,p,i),c=!0)}),c||p(n)}(K(m),"string"==typeof n)?(c=H(`al ${n}`),i(n).then(e=>{M(e,`Loading data file "${n}" failed (no arrayBuffer).`),p(new Uint8Array(e)),c&&Z(c)},e=>{if(s)s();else throw`Loading data file "${n}" failed.`}),c&&K(c)):p(n)},eN.staticInit();var eK={EPDF_FillFromHostCrypto:function(e,t){var n=globalThis.crypto;if(!n||"function"!=typeof n.getRandomValues)return 0;e>>>=0,t>>>=0;try{n.getRandomValues(l.subarray(e>>>0,e+t>>>0))}catch{return 0}return 1},__assert_fail:function(e,t,n,r){e>>>=0,t>>>=0,r>>>=0,J(`Assertion failed: ${eg(e)}, at: `+[t?eg(t):"unknown filename",n,r?eg(r):"unknown function"])},__syscall_fcntl64:function(e,t,n){eC.varargs=n>>>=0;try{var r=eC.getStreamFromFD(e);switch(t){case 0:var i=e_();if(i<0)break;for(;eN.streams[i];)i++;return eN.dupStream(r,i).fd;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:var i=e_();return r.flags|=i,0;case 12:var i=e_();return u[i+0>>>1>>>0]=2,0}return -28}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_fstat64:function(e,t){t>>>=0;try{var n=eC.getStreamFromFD(e);return eC.doStat(eN.stat,n.path,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ftruncate64:function(e,t,n){var r=ep(t,n);try{if(isNaN(r))return 61;return eN.ftruncate(e,r),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_getdents64:function(e,t,n){t>>>=0,n>>>=0;try{var r=eC.getStreamFromFD(e);r.getdents||(r.getdents=eN.readdir(r.path));for(var i=0,o=eN.llseek(r,0,1),a=Math.floor(o/280);a>>0,(F=l,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[t+i>>>2>>>0]=g[0],c[t+i+4>>>2>>>0]=g[1],g=[(a+1)*280>>>0,(F=(a+1)*280,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[t+i+8>>>2>>>0]=g[0],c[t+i+12>>>2>>>0]=g[1],u[t+i+16>>>1>>>0]=280,s[t+i+18>>>0]=d,ej(f,t+i+19,256),i+=280,a+=1}return eN.llseek(r,280*a,0),i}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_ioctl:function(e,t,n){eC.varargs=n>>>=0;try{var r=eC.getStreamFromFD(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:if(!r.tty)return -59;return 0;case 21505:if(!r.tty)return -59;if(r.tty.ops.ioctl_tcgets){var i=r.tty.ops.ioctl_tcgets(r),o=e_();c[o>>>2>>>0]=i.c_iflag||0,c[o+4>>>2>>>0]=i.c_oflag||0,c[o+8>>>2>>>0]=i.c_cflag||0,c[o+12>>>2>>>0]=i.c_lflag||0;for(var a=0;a<32;a++)s[o+a+17>>>0]=i.c_cc[a]||0}return 0;case 21506:case 21507:case 21508:if(!r.tty)return -59;if(r.tty.ops.ioctl_tcsets){for(var o=e_(),l=c[o>>>2>>>0],d=c[o+4>>>2>>>0],f=c[o+8>>>2>>>0],m=c[o+12>>>2>>>0],p=[],a=0;a<32;a++)p.push(s[o+a+17>>>0]);return r.tty.ops.ioctl_tcsets(r.tty,t,{c_iflag:l,c_oflag:d,c_cflag:f,c_lflag:m,c_cc:p})}return 0;case 21519:if(!r.tty)return -59;var o=e_();return c[o>>>2>>>0]=0,0;case 21520:if(!r.tty)return -59;return -28;case 21531:var o=e_();return eN.ioctl(r,t,o);case 21523:if(!r.tty)return -59;if(r.tty.ops.ioctl_tiocgwinsz){var h=r.tty.ops.ioctl_tiocgwinsz(r.tty),o=e_();u[o>>>1>>>0]=h[0],u[o+2>>>1>>>0]=h[1]}return 0;default:return -28}}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_lstat64:function(e,t){e>>>=0,t>>>=0;try{return e=eC.getStr(e),eC.doStat(eN.lstat,e,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_newfstatat:function(e,t,n,r){t>>>=0,n>>>=0;try{t=eC.getStr(t);var i=256&r,o=4096&r;return r&=-6401,M(!r,`unknown flags in __syscall_newfstatat: ${r}`),t=eC.calculateAt(e,t,o),eC.doStat(i?eN.lstat:eN.stat,t,n)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_openat:function(e,t,n,r){t>>>=0,eC.varargs=r>>>=0;try{t=eC.getStr(t),t=eC.calculateAt(e,t);var i=r?e_():0;return eN.open(t,n,i).fd}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_rmdir:function(e){e>>>=0;try{return e=eC.getStr(e),eN.rmdir(e),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_stat64:function(e,t){e>>>=0,t>>>=0;try{return e=eC.getStr(e),eC.doStat(eN.stat,e,t)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},__syscall_unlinkat:function(e,t,n){t>>>=0;try{return t=eC.getStr(t),t=eC.calculateAt(e,t),0===n?eN.unlink(t):512===n?eN.rmdir(t):J("Invalid flags passed to unlinkat"),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_abort_js:()=>{J("native code called abort()")},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:function(e,t,n){return e>>>=0,t>>>=0,n>>>=0,l.copyWithin(e>>>0,t>>>0,t+n>>>0)},_emscripten_throw_longjmp:()=>{throw 1/0},_gmtime_js:function(e,t,n){var r=ep(e,t);n>>>=0;var i=new Date(1e3*r);c[n>>>2>>>0]=i.getUTCSeconds(),c[n+4>>>2>>>0]=i.getUTCMinutes(),c[n+8>>>2>>>0]=i.getUTCHours(),c[n+12>>>2>>>0]=i.getUTCDate(),c[n+16>>>2>>>0]=i.getUTCMonth(),c[n+20>>>2>>>0]=i.getUTCFullYear()-1900,c[n+24>>>2>>>0]=i.getUTCDay();var o=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),a=(i.getTime()-o)/864e5|0;c[n+28>>>2>>>0]=a},_localtime_js:function(e,t,n){let r;var i=ep(e,t);n>>>=0;var o=new Date(1e3*i);c[n>>>2>>>0]=o.getSeconds(),c[n+4>>>2>>>0]=o.getMinutes(),c[n+8>>>2>>>0]=o.getHours(),c[n+12>>>2>>>0]=o.getDate(),c[n+16>>>2>>>0]=o.getMonth(),c[n+20>>>2>>>0]=o.getFullYear()-1900,c[n+24>>>2>>>0]=o.getDay();var a=0|((r=o.getFullYear())%4==0&&(r%100!=0||r%400==0)?eM:eR)[o.getMonth()]+o.getDate()-1;c[n+28>>>2>>>0]=a,c[n+36>>>2>>>0]=-(60*o.getTimezoneOffset());var s=new Date(o.getFullYear(),0,1),l=new Date(o.getFullYear(),6,1).getTimezoneOffset(),u=s.getTimezoneOffset(),d=0|(l!=u&&o.getTimezoneOffset()==Math.min(u,l));c[n+32>>>2>>>0]=d},_mmap_js:function(e,t,n,r,i,o,a,s){e>>>=0;var l=ep(i,o);a>>>=0,s>>>=0;try{if(isNaN(l))return 61;var u=eC.getStreamFromFD(r),d=eN.mmap(u,e,l,t,n),m=d.ptr;return c[a>>>2>>>0]=d.allocated,f[s>>>2>>>0]=m,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_munmap_js:function(e,t,n,r,i,o,a){e>>>=0,t>>>=0;var s=ep(o,a);try{var l=eC.getStreamFromFD(i);2&n&&eC.doMsync(e,l,t,r,s)}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return-e.errno}},_tzset_js:function(e,t,n,r){e>>>=0,t>>>=0,n>>>=0,r>>>=0;var i=(new Date).getFullYear(),o=new Date(i,0,1),a=new Date(i,6,1),s=o.getTimezoneOffset(),l=a.getTimezoneOffset(),u=Math.max(s,l);f[e>>>2>>>0]=60*u,c[t>>>2>>>0]=Number(s!=l);var d=e=>{var t=Math.abs(e),n=String(Math.floor(t/60)).padStart(2,"0"),r=String(t%60).padStart(2,"0");return`UTC${e>=0?"-":"+"}${n}${r}`},m=d(s),p=d(l);M(m),M(p),M(16>=ew(m),`timezone name truncated to fit in TZNAME_MAX (${m})`),M(16>=ew(p),`timezone name truncated to fit in TZNAME_MAX (${p})`),lDate.now(),emscripten_err:function(e){return e>>>=0,N(eg(e))},emscripten_get_now:()=>performance.now(),emscripten_resize_heap:function(e){e>>>=0;var t=l.length;M(e>t);if(e>0xffff0000)return N(`Cannot enlarge memory, requested ${e} bytes, but the limit is 4294901760 bytes!`),!1;for(var n=1;n<=4;n*=2){var r=t*(1+.2/n);r=Math.min(r,e+0x6000000);var i=Math.min(0xffff0000,eS(Math.max(e,r),65536));if(eT(i))return!0}return N(`Failed to grow the heap from ${t} bytes to ${i} bytes, not enough memory!`),!1},environ_get:function(e,t){e>>>=0,t>>>=0;var n=0;return eL().forEach((r,i)=>{var o=t+n;f[e+4*i>>>2>>>0]=o;for(var a=o,l=0;l>>0]=r.charCodeAt(l);s[a>>>0]=0,n+=r.length+1}),0},environ_sizes_get:function(e,t){e>>>=0,t>>>=0;var n=eL();f[e>>>2>>>0]=n.length;var r=0;return n.forEach(e=>r+=e.length+1),f[t>>>2>>>0]=r,0},exit:(e,n)=>{if(function(){var e=I,t=N,n=!1;I=N=e=>{n=!0};try{eJ(0),["stdout","stderr"].forEach(e=>{var t=eN.analyzePath("/dev/"+e);if(t){var r=t.object.rdev,i=ev.ttys[r];i?.output?.length&&(n=!0)}})}catch{}I=e,N=t,n&&em("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}(),(ed||0)&&!n){var i=`program exited (with status: ${e}), but keepRuntimeAlive() is set (counter=0) due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)`;r(i),N(i)}throw ed||(t.onExit?.(e),j=!0),new el(e)},fd_close:function(e){try{var t=eC.getStreamFromFD(e);return eN.close(t),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_read:function(e,t,n,r){t>>>=0,n>>>=0,r>>>=0;try{var i=eC.getStreamFromFD(e),o=((e,t,n,r)=>{for(var i=0,o=0;o>>2>>>0],l=f[t+4>>>2>>>0];t+=8;var u=eN.read(e,s,a,l,r);if(u<0)return -1;if(i+=u,u>>2>>>0]=o,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_seek:function(e,t,n,r,i){var o=ep(t,n);i>>>=0;try{if(isNaN(o))return 61;var a=eC.getStreamFromFD(e);return eN.llseek(a,o,r),g=[a.position>>>0,(F=a.position,+Math.abs(F)>=1?F>0?Math.floor(F/0x100000000)>>>0:~~Math.ceil((F-(~~F>>>0))/0x100000000)>>>0:0)],c[i>>>2>>>0]=g[0],c[i+4>>>2>>>0]=g[1],a.getdents&&0===o&&0===r&&(a.getdents=null),0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_sync:function(e){try{var t=eC.getStreamFromFD(e);if(t.stream_ops?.fsync)return t.stream_ops.fsync(t);return 0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},fd_write:function(e,t,n,r){t>>>=0,n>>>=0,r>>>=0;try{var i=eC.getStreamFromFD(e),o=((e,t,n,r)=>{for(var i=0,o=0;o>>2>>>0],l=f[t+4>>>2>>>0];t+=8;var u=eN.write(e,s,a,l,r);if(u<0)return -1;if(i+=u,u>>2>>>0]=o,0}catch(e){if(void 0===eN||"ErrnoError"!==e.name)throw e;return e.errno}},invoke_ii:function(e,t){var n=ef();try{return ez(e)(t)}catch(e){if(e3(n),e!==e+0)throw e;eY(1,0)}},invoke_iii:function(e,t,n){var r=ef();try{return ez(e)(t,n)}catch(e){if(e3(r),e!==e+0)throw e;eY(1,0)}},invoke_iiii:function(e,t,n,r){var i=ef();try{return ez(e)(t,n,r)}catch(e){if(e3(i),e!==e+0)throw e;eY(1,0)}},invoke_iiiii:function(e,t,n,r,i){var o=ef();try{return ez(e)(t,n,r,i)}catch(e){if(e3(o),e!==e+0)throw e;eY(1,0)}},invoke_iiiiii:function(e,t,n,r,i,o){var a=ef();try{return ez(e)(t,n,r,i,o)}catch(e){if(e3(a),e!==e+0)throw e;eY(1,0)}},invoke_iiiiiii:function(e,t,n,r,i,o,a){var s=ef();try{return ez(e)(t,n,r,i,o,a)}catch(e){if(e3(s),e!==e+0)throw e;eY(1,0)}},invoke_v:function(e){var t=ef();try{ez(e)()}catch(e){if(e3(t),e!==e+0)throw e;eY(1,0)}},invoke_vi:function(e,t){var n=ef();try{ez(e)(t)}catch(e){if(e3(n),e!==e+0)throw e;eY(1,0)}},invoke_vii:function(e,t,n){var r=ef();try{ez(e)(t,n)}catch(e){if(e3(r),e!==e+0)throw e;eY(1,0)}},invoke_viii:function(e,t,n,r){var i=ef();try{ez(e)(t,n,r)}catch(e){if(e3(i),e!==e+0)throw e;eY(1,0)}},invoke_viiii:function(e,t,n,r,i){var o=ef();try{ez(e)(t,n,r,i)}catch(e){if(e3(o),e!==e+0)throw e;eY(1,0)}},invoke_viiiiiiiii:function(e,t,n,r,i,o,a,s,l,u){var d=ef();try{ez(e)(t,n,r,i,o,a,s,l,u)}catch(e){if(e3(d),e!==e+0)throw e;eY(1,0)}}},eZ=function(){function e(e,n){var r,i,o,s;let l,u;return i=Object.assign({},i=eZ=e.exports),o=e=>t=>e(t)>>>0,s=e=>()=>e()>>>0,i.strerror=(l=i.strerror,e=>l(e)>>>0),i.emscripten_builtin_memalign=(u=i.emscripten_builtin_memalign,(e,t)=>u(e,t)>>>0),i.malloc=o(i.malloc),i.emscripten_stack_get_base=s(i.emscripten_stack_get_base),i.emscripten_stack_get_end=s(i.emscripten_stack_get_end),i._emscripten_stack_alloc=o(i._emscripten_stack_alloc),i.emscripten_stack_get_current=s(i.emscripten_stack_get_current),t.wasmExports=eZ=i,M(a=eZ.memory,"memory not found in wasm exports"),R(),M(_=eZ.__indirect_function_table,"table not found in wasm exports"),r=eZ.__wasm_call_ctors,L.unshift(r),Z("wasm-instantiate"),eZ}K("wasm-instantiate");var n,i,o=t,s={env:eK,wasi_snapshot_preview1:eK};if(t.instantiateWasm)try{return t.instantiateWasm(s,e)}catch(e){N(`Module.instantiateWasm callback failed with error: ${e}`),r(e)}return h??(h=function(){if(t.locateFile){var e="embedpdf.wasm";return e.startsWith("data:application/octet-stream;base64,")?e:t.locateFile?t.locateFile(e,O):O+e}return new URL("embedpdf.wasm",self.location.href).href}()),(n=h,i=function(n){M(t===o,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),o=null,e(n.instance)},!C&&"function"==typeof WebAssembly.instantiateStreaming&&!n.startsWith("data:application/octet-stream;base64,")&&"function"==typeof fetch?fetch(n,{credentials:"same-origin"}).then(e=>WebAssembly.instantiateStreaming(e,s).then(i,function(e){return N(`wasm streaming compile failed: ${e}`),N("falling back to ArrayBuffer instantiation"),ee(n,s,i)})):ee(n,s,i)).catch(r),{}}();X("__wasm_call_ctors",0),t._EPDFAction_CloseModel=X("EPDFAction_CloseModel",1),t._EPDFAction_LoadModel=X("EPDFAction_LoadModel",1),t._EPDFAction_GetRootNode=X("EPDFAction_GetRootNode",1),t._EPDFAction_GetNodeCount=X("EPDFAction_GetNodeCount",1),t._EPDFAction_GetNodeType=X("EPDFAction_GetNodeType",2),t._EPDFAction_GetNodeSubtype=X("EPDFAction_GetNodeSubtype",4),t._EPDFAction_NodeHasJavaScript=X("EPDFAction_NodeHasJavaScript",2),t._EPDFAction_GetNodeJavaScript=X("EPDFAction_GetNodeJavaScript",4),t._EPDFAction_GetNodeDest=X("EPDFAction_GetNodeDest",3),t._EPDFAction_GetNodeURI=X("EPDFAction_GetNodeURI",5),t._EPDFAction_GetNodeFilePath=X("EPDFAction_GetNodeFilePath",4),t._EPDFAction_GetNodeName=X("EPDFAction_GetNodeName",4),t._EPDFAction_GetNodeTargetCount=X("EPDFAction_GetNodeTargetCount",2),t._EPDFAction_GetNodeTargetName=X("EPDFAction_GetNodeTargetName",5),t._EPDFAction_GetNodeTargetObjectNumber=X("EPDFAction_GetNodeTargetObjectNumber",4),t._EPDFAction_GetNodeHideFlag=X("EPDFAction_GetNodeHideFlag",3),t._EPDFAction_GetNodeResetForm=X("EPDFAction_GetNodeResetForm",4),t._EPDFAction_GetNodeSubmitForm=X("EPDFAction_GetNodeSubmitForm",4),t._EPDFAction_GetNodeSubmitFormURL=X("EPDFAction_GetNodeSubmitFormURL",4),t._EPDFAction_GetNodeSubmitFormCharSet=X("EPDFAction_GetNodeSubmitFormCharSet",4),t._EPDFAction_GetNodeURIIsMap=X("EPDFAction_GetNodeURIIsMap",3),t._EPDFAction_GetNextCount=X("EPDFAction_GetNextCount",2),t._EPDFAction_GetNextAt=X("EPDFAction_GetNextAt",3),t._EPDFAction_GetWarningFlags=X("EPDFAction_GetWarningFlags",1),t._EPDFAction_IsComplete=X("EPDFAction_IsComplete",1),t._EPDFDoc_GetOpenActionModel=X("EPDFDoc_GetOpenActionModel",1),t._EPDFDoc_GetOpenActionDest=X("EPDFDoc_GetOpenActionDest",1),t._EPDFDoc_GetAdditionalActionModel=X("EPDFDoc_GetAdditionalActionModel",2),t._EPDFDoc_GetPageActionModel=X("EPDFDoc_GetPageActionModel",3),t._EPDFAnnot_GetActionModel=X("EPDFAnnot_GetActionModel",2),t._EPDFAction_CreateJavaScript=X("EPDFAction_CreateJavaScript",2),t._EPDFAction_CreateHide=X("EPDFAction_CreateHide",4),t._EPDFAction_CreateResetForm=X("EPDFAction_CreateResetForm",4),t._EPDFAction_CreateSubmitForm=X("EPDFAction_CreateSubmitForm",5),t._EPDFAction_SetNext=X("EPDFAction_SetNext",4),t._EPDFAnnot_SetEventAction=X("EPDFAnnot_SetEventAction",3),t._EPDFAnnot_SetNumberValue=X("EPDFAnnot_SetNumberValue",3),t._EPDFAnnot_HasEmbedMetadata=X("EPDFAnnot_HasEmbedMetadata",1),t._EPDFAnnot_ClearEmbedMetadata=X("EPDFAnnot_ClearEmbedMetadata",1),t._EPDFAnnot_ClearEmbedMetadataKey=X("EPDFAnnot_ClearEmbedMetadataKey",2),t._EPDFAnnot_SetEmbedMetadataString=X("EPDFAnnot_SetEmbedMetadataString",3),t._EPDFAnnot_GetEmbedMetadataString=X("EPDFAnnot_GetEmbedMetadataString",4),t._EPDFAnnot_SetEmbedMetadataNumber=X("EPDFAnnot_SetEmbedMetadataNumber",3),t._EPDFAnnot_GetEmbedMetadataNumber=X("EPDFAnnot_GetEmbedMetadataNumber",3),t._EPDFAnnot_SetEmbedMetadataBoolean=X("EPDFAnnot_SetEmbedMetadataBoolean",3),t._EPDFAnnot_GetEmbedMetadataBoolean=X("EPDFAnnot_GetEmbedMetadataBoolean",3),t._EPDFAnnot_SetEmbedMetadataRect=X("EPDFAnnot_SetEmbedMetadataRect",3),t._EPDFAnnot_GetEmbedMetadataRect=X("EPDFAnnot_GetEmbedMetadataRect",3),t._EPDFAnnot_SetEmbedMetadataJSON=X("EPDFAnnot_SetEmbedMetadataJSON",2),t._EPDFAnnot_GetEmbedMetadataJSON=X("EPDFAnnot_GetEmbedMetadataJSON",3),t._EPDFDocument_ClearEmbedMetadata=X("EPDFDocument_ClearEmbedMetadata",1),t._EPDFAnnot_SetAction=X("EPDFAnnot_SetAction",2),t._EPDFAnnot_RemoveAction=X("EPDFAnnot_RemoveAction",1),t._EPDFAnnot_RemoveDest=X("EPDFAnnot_RemoveDest",1),t._EPDFAnnot_RemoveKey=X("EPDFAnnot_RemoveKey",2),t._EPDFAnnot_GetFileAttachmentForWrite=X("EPDFAnnot_GetFileAttachmentForWrite",1),t._EPDFAnnot_SetColor=X("EPDFAnnot_SetColor",5),t._EPDFAnnot_GetColor=X("EPDFAnnot_GetColor",5),t._EPDFAnnot_ClearColor=X("EPDFAnnot_ClearColor",2),t._EPDFAnnot_SetNoColor=X("EPDFAnnot_SetNoColor",2),t._EPDFAnnot_SetOpacity=X("EPDFAnnot_SetOpacity",2),t._EPDFAnnot_GetOpacity=X("EPDFAnnot_GetOpacity",2),t._EPDFAnnot_GetBorderEffect=X("EPDFAnnot_GetBorderEffect",2),t._EPDFAnnot_SetBorderEffect=X("EPDFAnnot_SetBorderEffect",2),t._EPDFAnnot_ClearBorderEffect=X("EPDFAnnot_ClearBorderEffect",1),t._EPDFAnnot_GetRectangleDifferences=X("EPDFAnnot_GetRectangleDifferences",5),t._EPDFAnnot_ClearRectangleDifferences=X("EPDFAnnot_ClearRectangleDifferences",1),t._EPDFAnnot_GetBorderDashPatternCount=X("EPDFAnnot_GetBorderDashPatternCount",1),t._EPDFAnnot_GetBorderDashPattern=X("EPDFAnnot_GetBorderDashPattern",3),t._EPDFAnnot_SetBorderDashPattern=X("EPDFAnnot_SetBorderDashPattern",3),t._EPDFAnnot_GetBorderStyle=X("EPDFAnnot_GetBorderStyle",2),t._EPDFAnnot_SetBorderStyle=X("EPDFAnnot_SetBorderStyle",3),t._EPDFAnnot_GenerateAppearance=X("EPDFAnnot_GenerateAppearance",1),t._EPDFAnnot_GenerateAppearanceWithBlend=X("EPDFAnnot_GenerateAppearanceWithBlend",2),t._EPDFAnnot_GetBlendMode=X("EPDFAnnot_GetBlendMode",1),t._EPDFAnnot_SetIntent=X("EPDFAnnot_SetIntent",2),t._EPDFAnnot_GetIntent=X("EPDFAnnot_GetIntent",3),t._EPDFAnnot_GetRichContent=X("EPDFAnnot_GetRichContent",3),t._EPDFAnnot_GetRichTextJSON=X("EPDFAnnot_GetRichTextJSON",3),t._EPDFAnnot_SetRichTextJSON=X("EPDFAnnot_SetRichTextJSON",2),t._EPDFAnnot_SetRichTextXHTML=X("EPDFAnnot_SetRichTextXHTML",2),t._EPDFDoc_SetTypographicFeatures=X("EPDFDoc_SetTypographicFeatures",2),t._EPDFDoc_GetTypographicFeatures=X("EPDFDoc_GetTypographicFeatures",1),t._EPDFAnnot_SetLineEndings=X("EPDFAnnot_SetLineEndings",3),t._EPDFAnnot_GetLineEndings=X("EPDFAnnot_GetLineEndings",3),t._EPDFAnnot_SetVertices=X("EPDFAnnot_SetVertices",3),t._EPDFAnnot_SetLine=X("EPDFAnnot_SetLine",3),t._EPDFAnnot_SetDefaultAppearance=X("EPDFAnnot_SetDefaultAppearance",6),t._EPDFAnnot_SetDefaultAppearanceRegisteredFont=X("EPDFAnnot_SetDefaultAppearanceRegisteredFont",6),t._EPDFAnnot_GetDefaultAppearance=X("EPDFAnnot_GetDefaultAppearance",6),t._EPDFAnnot_GetDefaultAppearanceFontFace=X("EPDFAnnot_GetDefaultAppearanceFontFace",5),t._EPDFAnnot_GetDefaultAppearanceFontPostScriptName=X("EPDFAnnot_GetDefaultAppearanceFontPostScriptName",3),t._EPDFAnnot_SetDefaultAppearanceDocumentFont=X("EPDFAnnot_SetDefaultAppearanceDocumentFont",6),t._EPDFAnnot_SetTextAlignment=X("EPDFAnnot_SetTextAlignment",2),t._EPDFAnnot_GetTextAlignment=X("EPDFAnnot_GetTextAlignment",1),t._EPDFPage_GetAnnotByName=X("EPDFPage_GetAnnotByName",2),t._EPDFPage_RemoveAnnotByName=X("EPDFPage_RemoveAnnotByName",2),t._EPDFAnnot_SetLinkedAnnot=X("EPDFAnnot_SetLinkedAnnot",3),t._EPDFPage_GetAnnotIndexByNameRaw=X("EPDFPage_GetAnnotIndexByNameRaw",3),t._EPDFPage_GetAnnotIndexByObjectNumberRaw=X("EPDFPage_GetAnnotIndexByObjectNumberRaw",3),t._EPDFPage_GetAnnotCountRaw=X("EPDFPage_GetAnnotCountRaw",2),t._EPDFPage_GetAnnotRaw=X("EPDFPage_GetAnnotRaw",3),t._EPDFPage_CreateAnnotRaw=X("EPDFPage_CreateAnnotRaw",4),t._EPDFPage_RemoveAnnotRaw=X("EPDFPage_RemoveAnnotRaw",3),t._EPDFPage_PromoteInlineAnnotsRaw=X("EPDFPage_PromoteInlineAnnotsRaw",2),t._EPDFAnnot_IsValid=X("EPDFAnnot_IsValid",1),t._EPDFAnnot_SetSubtype=X("EPDFAnnot_SetSubtype",2),t._EPDFAnnot_SetName=X("EPDFAnnot_SetName",2),t._EPDFAnnot_GetName=X("EPDFAnnot_GetName",3),t._EPDFAnnot_UpdateAppearanceToRect=X("EPDFAnnot_UpdateAppearanceToRect",2),t._EPDFAnnot_SetStampOpacity=X("EPDFAnnot_SetStampOpacity",3),t._EPDFPage_CreateAnnot=X("EPDFPage_CreateAnnot",2),t._EPDFAnnot_SetRotate=X("EPDFAnnot_SetRotate",2),t._EPDFAnnot_GetRotate=X("EPDFAnnot_GetRotate",2),t._EPDFAnnot_GetAppearanceTransform=X("EPDFAnnot_GetAppearanceTransform",3),t._EPDFAnnot_GetReplyType=X("EPDFAnnot_GetReplyType",1),t._EPDFAnnot_SetReplyType=X("EPDFAnnot_SetReplyType",2),t._EPDFAnnot_GetBooleanValue=X("EPDFAnnot_GetBooleanValue",3),t._EPDFAnnot_SetBooleanValue=X("EPDFAnnot_SetBooleanValue",3),t._EPDFAnnot_SetOverlayText=X("EPDFAnnot_SetOverlayText",2),t._EPDFAnnot_GetOverlayText=X("EPDFAnnot_GetOverlayText",3),t._EPDFAnnot_SetOverlayTextRepeat=X("EPDFAnnot_SetOverlayTextRepeat",2),t._EPDFAnnot_GetOverlayTextRepeat=X("EPDFAnnot_GetOverlayTextRepeat",1),t._EPDFAnnot_SetAppearanceFromPage=X("EPDFAnnot_SetAppearanceFromPage",3),t._EPDFAnnot_ExportAppearance=X("EPDFAnnot_ExportAppearance",3),t._EPDFDoc_CanonicalDrawing=X("EPDFDoc_CanonicalDrawing",2),t._EPDFDoc_ImportDrawing=X("EPDFDoc_ImportDrawing",2),t._EPDFDoc_ExportDrawing=X("EPDFDoc_ExportDrawing",2),t._EPDFDoc_GetDrawings=X("EPDFDoc_GetDrawings",3),t._EPDFAnnot_SetDrawing=X("EPDFAnnot_SetDrawing",3),t._EPDFAnnot_GetDrawing=X("EPDFAnnot_GetDrawing",1),t._EPDFAnnot_GetRect=X("EPDFAnnot_GetRect",2),t._EPDFAnnot_SetRect=X("EPDFAnnot_SetRect",2),t._EPDFAnnot_SetAPMatrix=X("EPDFAnnot_SetAPMatrix",3),t._EPDFAnnot_GetAPMatrix=X("EPDFAnnot_GetAPMatrix",3),t._EPDFAnnot_GetAvailableAppearanceModes=X("EPDFAnnot_GetAvailableAppearanceModes",1),t._EPDFAnnot_GetAppearanceStateCount=X("EPDFAnnot_GetAppearanceStateCount",2),t._EPDFAnnot_GetAppearanceStateName=X("EPDFAnnot_GetAppearanceStateName",5),t._EPDFAnnot_GetAppearanceState=X("EPDFAnnot_GetAppearanceState",3),t._EPDFAnnot_HasAppearanceStream=X("EPDFAnnot_HasAppearanceStream",2),t._EPDFAnnot_GetDrawingRect=X("EPDFAnnot_GetDrawingRect",3),t._EPDFAnnot_SetMKColor=X("EPDFAnnot_SetMKColor",5),t._EPDFAnnot_GetMKColor=X("EPDFAnnot_GetMKColor",5),t._EPDFAnnot_ClearMKColor=X("EPDFAnnot_ClearMKColor",2),t._EPDFAnnot_SetMKText=X("EPDFAnnot_SetMKText",3),t._EPDFAnnot_GetMKText=X("EPDFAnnot_GetMKText",4),t._EPDFAnnot_SetMKTextPosition=X("EPDFAnnot_SetMKTextPosition",2),t._EPDFAnnot_GetMKTextPosition=X("EPDFAnnot_GetMKTextPosition",1),t._EPDFAnnot_SetMKIcon=X("EPDFAnnot_SetMKIcon",3),t._EPDFAnnot_GetMKIcon=X("EPDFAnnot_GetMKIcon",2),t._EPDFAnnot_ClearMKIcon=X("EPDFAnnot_ClearMKIcon",2),t._EPDFAnnot_HasMKIcon=X("EPDFAnnot_HasMKIcon",2),t._EPDFAnnot_SetMKRotation=X("EPDFAnnot_SetMKRotation",2),t._EPDFAnnot_GetMKRotation=X("EPDFAnnot_GetMKRotation",1),t._EPDFAnnot_GenerateFormFieldAP=X("EPDFAnnot_GenerateFormFieldAP",1),t._EPDFAnnot_GetCalloutLineCount=X("EPDFAnnot_GetCalloutLineCount",1),t._EPDFAnnot_GetCalloutLine=X("EPDFAnnot_GetCalloutLine",3),t._EPDFAnnot_SetCalloutLine=X("EPDFAnnot_SetCalloutLine",3),t._EPDFAnnot_GetObjectNumber=X("EPDFAnnot_GetObjectNumber",1),t._EPDFAnnot_GetStructurePosition=X("EPDFAnnot_GetStructurePosition",3),t._EPDFPage_GetAnnotByObjectNumber=X("EPDFPage_GetAnnotByObjectNumber",2),t._EPDFPage_RemoveAnnot=X("EPDFPage_RemoveAnnot",2),t._EPDFPage_RemoveAnnotByObjectNumber=X("EPDFPage_RemoveAnnotByObjectNumber",2),t._EPDFPage_MoveAnnots=X("EPDFPage_MoveAnnots",4),t._EPDFPage_MoveAnnotsRaw=X("EPDFPage_MoveAnnotsRaw",5),t._EPDF_LoadBaseDocument=X("EPDF_LoadBaseDocument",2),t._EPDF_LoadMemBaseDocument=X("EPDF_LoadMemBaseDocument",3),t._EPDF_LoadMemBaseDocument64=X("EPDF_LoadMemBaseDocument64",3),t._EPDF_ReleaseBaseDocument=X("EPDF_ReleaseBaseDocument",1),t._EPDFPage_ExportAnnotsRawToOwnedBuffer=X("EPDFPage_ExportAnnotsRawToOwnedBuffer",5),t._EPDFPage_ImportAnnotsRaw=X("EPDFPage_ImportAnnotsRaw",4),t._EPDFDoc_ExportDictRawToOwnedBuffer=X("EPDFDoc_ExportDictRawToOwnedBuffer",4),t._EPDFDoc_ExportDictCanonicalToOwnedBuffer=X("EPDFDoc_ExportDictCanonicalToOwnedBuffer",5),t._EPDFDoc_ImportDictRaw=X("EPDFDoc_ImportDictRaw",3),t._EPDFForm_ExportFieldRawToOwnedBuffer=X("EPDFForm_ExportFieldRawToOwnedBuffer",3),t._EPDFForm_ImportFieldRaw=X("EPDFForm_ImportFieldRaw",3),t._EPDFOutline_ExportItemRawToOwnedBuffer=X("EPDFOutline_ExportItemRawToOwnedBuffer",3),t._EPDFOutline_ImportItemRaw=X("EPDFOutline_ImportItemRaw",3),t._EPDFPage_ExportRawToOwnedBuffer=X("EPDFPage_ExportRawToOwnedBuffer",3),t._EPDFPage_ImportRaw=X("EPDFPage_ImportRaw",3),t._EPDFAttachment_ExportRawToOwnedBuffer=X("EPDFAttachment_ExportRawToOwnedBuffer",3),t._EPDFAttachment_ExportCanonicalToOwnedBuffer=X("EPDFAttachment_ExportCanonicalToOwnedBuffer",3),t._EPDFAttachment_ImportRaw=X("EPDFAttachment_ImportRaw",3),t._EPDFCatalog_GetMetadata=X("EPDFCatalog_GetMetadata",3),t._EPDFCatalog_SetMetadata=X("EPDFCatalog_SetMetadata",3),t._EPDFFont_RegisterFont=X("EPDFFont_RegisterFont",4),t._EPDFFont_RegisterMemFont=X("EPDFFont_RegisterMemFont",5),t._EPDFFont_RegisterMemFont64=X("EPDFFont_RegisterMemFont64",5),t._EPDFFont_ClearRegisteredFonts=X("EPDFFont_ClearRegisteredFonts",0),t._EPDFFont_GetEmbeddingPermission=X("EPDFFont_GetEmbeddingPermission",1),t._EPDFFont_IsEditingAuthorized=X("EPDFFont_IsEditingAuthorized",1),t._EPDFFont_AuthorizeEditing=X("EPDFFont_AuthorizeEditing",1),t._EPDFFont_IsInstanced=X("EPDFFont_IsInstanced",1),t._EPDFFont_GetFamilyName=X("EPDFFont_GetFamilyName",3),t._EPDFFont_GetWeight=X("EPDFFont_GetWeight",1),t._EPDFFont_IsItalic=X("EPDFFont_IsItalic",1),t._EPDFDoc_SetFontEmbeddingPolicy=X("EPDFDoc_SetFontEmbeddingPolicy",2),t._EPDFDoc_GetFontEmbeddingPolicy=X("EPDFDoc_GetFontEmbeddingPolicy",1),t._EPDFFont_AddFallbackFont=X("EPDFFont_AddFallbackFont",2),t._EPDFFont_ClearFallbackFonts=X("EPDFFont_ClearFallbackFonts",0),t._EPDFFont_SetLastResortFont=X("EPDFFont_SetLastResortFont",1),t._EPDFFont_GetLastResortFont=X("EPDFFont_GetLastResortFont",0),t._EPDFFont_GetFallbackOrder=X("EPDFFont_GetFallbackOrder",4),t._EPDFFont_GetProgramData=X("EPDFFont_GetProgramData",3),t._EPDFFont_GetProgramFormat=X("EPDFFont_GetProgramFormat",1),t._EPDFFont_GetProgramHash=X("EPDFFont_GetProgramHash",2),t._EPDFFont_GetCoverage=X("EPDFFont_GetCoverage",3),t._EPDFFont_GetMetrics=X("EPDFFont_GetMetrics",3),t._EPDFFont_GetPostScriptName=X("EPDFFont_GetPostScriptName",3),t._EPDFFontFaces_Load=X("EPDFFontFaces_Load",1),t._EPDFFontFaces_Close=X("EPDFFontFaces_Close",1),t._EPDFDoc_GetFontsFingerprint=X("EPDFDoc_GetFontsFingerprint",2),t._EPDFFontFaces_Count=X("EPDFFontFaces_Count",1),t._EPDFFontFaces_GetFamily=X("EPDFFontFaces_GetFamily",4),t._EPDFFontFaces_GetWeight=X("EPDFFontFaces_GetWeight",2),t._EPDFFontFaces_IsItalic=X("EPDFFontFaces_IsItalic",2),t._EPDFFontFaces_CountPrograms=X("EPDFFontFaces_CountPrograms",2),t._EPDFFontFaces_GetProgramObjNum=X("EPDFFontFaces_GetProgramObjNum",3),t._EPDFFontFaces_GetProgramFormat=X("EPDFFontFaces_GetProgramFormat",3),t._EPDFFontFaces_GetProgramEmbedded=X("EPDFFontFaces_GetProgramEmbedded",3),t._EPDFFontFaces_GetProgramPostScriptName=X("EPDFFontFaces_GetProgramPostScriptName",5),t._EPDFFontFaces_GetProgramEmbeddingPermission=X("EPDFFontFaces_GetProgramEmbeddingPermission",3),t._EPDFFontFaces_ProgramMapsUnicode=X("EPDFFontFaces_ProgramMapsUnicode",3),t._EPDFFontFaces_GetProgramHash=X("EPDFFontFaces_GetProgramHash",4),t._EPDFFontFaces_GetProgramDisplayHash=X("EPDFFontFaces_GetProgramDisplayHash",4),t._EPDFFontFaces_GetProgramMetrics=X("EPDFFontFaces_GetProgramMetrics",5),t._EPDFDoc_GetFontProgramData=X("EPDFDoc_GetFontProgramData",4),t._EPDFDoc_GetFontDisplayProgramData=X("EPDFDoc_GetFontDisplayProgramData",4),t._EPDFDoc_GetFontDisplayProgramCoverage=X("EPDFDoc_GetFontDisplayProgramCoverage",4),t._EPDFDoc_ResolveFonts=X("EPDFDoc_ResolveFonts",8),t._EPDFFontResolution_Close=X("EPDFFontResolution_Close",1),t._EPDFFontResolution_GetSource=X("EPDFFontResolution_GetSource",2),t._EPDFFontResolution_GetRegisteredFont=X("EPDFFontResolution_GetRegisteredFont",2),t._EPDFFontResolution_GetProgramObjNum=X("EPDFFontResolution_GetProgramObjNum",2),t._EPDFFontResolution_GetProgramDisplayHash=X("EPDFFontResolution_GetProgramDisplayHash",3),t._EPDFFontResolution_GetBaseFontName=X("EPDFFontResolution_GetBaseFontName",4),t._EPDFFontResolution_GetFamily=X("EPDFFontResolution_GetFamily",4),t._EPDFFontResolution_GetWeight=X("EPDFFontResolution_GetWeight",2),t._EPDFFontResolution_IsItalic=X("EPDFFontResolution_IsItalic",2),t._EPDFFontResolution_IsDegraded=X("EPDFFontResolution_IsDegraded",2),t._EPDFFontResolution_GetFallbacks=X("EPDFFontResolution_GetFallbacks",4),t._EPDFFontResolution_CountMissingCharacters=X("EPDFFontResolution_CountMissingCharacters",1),t._EPDFFontResolution_GetMissingCharacter=X("EPDFFontResolution_GetMissingCharacter",4),t._EPDFDoc_ClearMissingCharacters=X("EPDFDoc_ClearMissingCharacters",1),t._EPDFDoc_CountMissingCharacters=X("EPDFDoc_CountMissingCharacters",1),t._EPDFDoc_GetMissingCharacter=X("EPDFDoc_GetMissingCharacter",4),t._EPDFForm_LoadModel=X("EPDFForm_LoadModel",1),t._EPDFForm_CloseModel=X("EPDFForm_CloseModel",1),t._EPDFForm_GetFormKind=X("EPDFForm_GetFormKind",1),t._EPDFForm_GetNeedAppearances=X("EPDFForm_GetNeedAppearances",1),t._EPDFForm_CountFields=X("EPDFForm_CountFields",1),t._EPDFForm_GetFieldActionModel=X("EPDFForm_GetFieldActionModel",3),t._EPDFForm_CountCalculationOrder=X("EPDFForm_CountCalculationOrder",1),t._EPDFForm_GetCalculationOrderFieldIndex=X("EPDFForm_GetCalculationOrderFieldIndex",2),t._EPDFForm_GetFieldObjNum=X("EPDFForm_GetFieldObjNum",2),t._EPDFForm_GetFieldFamily=X("EPDFForm_GetFieldFamily",2),t._EPDFForm_GetFieldFlags=X("EPDFForm_GetFieldFlags",2),t._EPDFForm_GetFieldOrigin=X("EPDFForm_GetFieldOrigin",2),t._EPDFForm_GetFieldName=X("EPDFForm_GetFieldName",4),t._EPDFForm_GetFieldAlternateName=X("EPDFForm_GetFieldAlternateName",4),t._EPDFForm_GetFieldMappingName=X("EPDFForm_GetFieldMappingName",4),t._EPDFForm_HasFieldEmbedMetadata=X("EPDFForm_HasFieldEmbedMetadata",2),t._EPDFForm_HasFieldValuesList=X("EPDFForm_HasFieldValuesList",2),t._EPDFForm_GetFieldEmbedMetadataString=X("EPDFForm_GetFieldEmbedMetadataString",5),t._EPDFForm_GetFieldEmbedMetadataNumber=X("EPDFForm_GetFieldEmbedMetadataNumber",4),t._EPDFForm_GetFieldEmbedMetadataBoolean=X("EPDFForm_GetFieldEmbedMetadataBoolean",4),t._EPDFForm_GetFieldEmbedMetadataJSON=X("EPDFForm_GetFieldEmbedMetadataJSON",4),t._EPDFForm_GetFieldValueKind=X("EPDFForm_GetFieldValueKind",2),t._EPDFForm_CountFieldValues=X("EPDFForm_CountFieldValues",2),t._EPDFForm_GetFieldValueAt=X("EPDFForm_GetFieldValueAt",5),t._EPDFForm_GetFieldDefaultValueKind=X("EPDFForm_GetFieldDefaultValueKind",2),t._EPDFForm_CountFieldDefaultValues=X("EPDFForm_CountFieldDefaultValues",2),t._EPDFForm_GetFieldDefaultValueAt=X("EPDFForm_GetFieldDefaultValueAt",5),t._EPDFForm_GetFieldMaxLen=X("EPDFForm_GetFieldMaxLen",2),t._EPDFForm_GetFieldTopIndex=X("EPDFForm_GetFieldTopIndex",2),t._EPDFForm_CountFieldOptions=X("EPDFForm_CountFieldOptions",2),t._EPDFForm_GetFieldOptionLabel=X("EPDFForm_GetFieldOptionLabel",5),t._EPDFForm_GetFieldOptionValue=X("EPDFForm_GetFieldOptionValue",5),t._EPDFForm_IsFieldOptionSelected=X("EPDFForm_IsFieldOptionSelected",3),t._EPDFForm_CountFieldWidgets=X("EPDFForm_CountFieldWidgets",2),t._EPDFForm_GetFieldWidgetObjNum=X("EPDFForm_GetFieldWidgetObjNum",3),t._EPDFForm_GetFieldWidgetPageObjNum=X("EPDFForm_GetFieldWidgetPageObjNum",3),t._EPDFForm_GetFieldWidgetRect=X("EPDFForm_GetFieldWidgetRect",4),t._EPDFForm_GetFieldWidgetOnState=X("EPDFForm_GetFieldWidgetOnState",5),t._EPDFForm_GetFieldWidgetExportValue=X("EPDFForm_GetFieldWidgetExportValue",5),t._EPDFForm_IsFieldWidgetChecked=X("EPDFForm_IsFieldWidgetChecked",3),t._EPDFForm_GetFieldIndexByObjNum=X("EPDFForm_GetFieldIndexByObjNum",2),t._EPDFForm_GetFieldIndexForWidget=X("EPDFForm_GetFieldIndexForWidget",2),t._EPDFForm_SetFieldValue=X("EPDFForm_SetFieldValue",5),t._EPDFForm_SetFieldDefaultValue=X("EPDFForm_SetFieldDefaultValue",5),t._EPDFForm_SetFieldSelectedIndices=X("EPDFForm_SetFieldSelectedIndices",4),t._EPDFForm_SetFieldWidgetsChecked=X("EPDFForm_SetFieldWidgetsChecked",7),t._EPDFForm_RedrawFieldWidgets=X("EPDFForm_RedrawFieldWidgets",5),t._EPDFForm_SetFieldDisplay=X("EPDFForm_SetFieldDisplay",6),t._EPDFForm_SetFieldAppearanceText=X("EPDFForm_SetFieldAppearanceText",6),t._EPDFForm_ExportFDF=X("EPDFForm_ExportFDF",5),t._EPDFForm_ExportXFDF=X("EPDFForm_ExportXFDF",5),t._EPDFForm_Repair=X("EPDFForm_Repair",3),t._EPDFForm_CreateField=X("EPDFForm_CreateField",4),t._EPDFForm_AttachWidget=X("EPDFForm_AttachWidget",6),t._EPDFForm_DetachWidget=X("EPDFForm_DetachWidget",3),t._EPDFForm_DeleteField=X("EPDFForm_DeleteField",5),t._EPDFForm_SetFieldName=X("EPDFForm_SetFieldName",3),t._EPDFForm_GetFieldPartialName=X("EPDFForm_GetFieldPartialName",4),t._EPDFForm_SetFieldFlags=X("EPDFForm_SetFieldFlags",4),t._EPDFForm_SetFieldEventAction=X("EPDFForm_SetFieldEventAction",4),t._EPDFForm_SetCalculationOrder=X("EPDFForm_SetCalculationOrder",3),t._EPDFForm_SetFieldMaxLen=X("EPDFForm_SetFieldMaxLen",3),t._EPDFForm_SetFieldAlternateName=X("EPDFForm_SetFieldAlternateName",3),t._EPDFForm_SetFieldMappingName=X("EPDFForm_SetFieldMappingName",3),t._EPDFForm_SetFieldEmbedMetadataString=X("EPDFForm_SetFieldEmbedMetadataString",4),t._EPDFForm_SetFieldEmbedMetadataNumber=X("EPDFForm_SetFieldEmbedMetadataNumber",4),t._EPDFForm_SetFieldEmbedMetadataBoolean=X("EPDFForm_SetFieldEmbedMetadataBoolean",4),t._EPDFForm_SetFieldEmbedMetadataJSON=X("EPDFForm_SetFieldEmbedMetadataJSON",3),t._EPDFForm_ClearFieldEmbedMetadataKey=X("EPDFForm_ClearFieldEmbedMetadataKey",3),t._EPDFForm_ClearFieldEmbedMetadata=X("EPDFForm_ClearFieldEmbedMetadata",2),t._EPDFForm_SetFieldOptions=X("EPDFForm_SetFieldOptions",5),t._EPDFPage_Flatten=X("EPDFPage_Flatten",2),t._EPDFPage_FlattenAnnotations=X("EPDFPage_FlattenAnnotations",5),t._EPDFPage_ExportAnnotationsAsDocument=X("EPDFPage_ExportAnnotationsAsDocument",3),t._EPDFDoc_ExportPagesFlattened=X("EPDFDoc_ExportPagesFlattened",5),t._EPDFLayer_OpenLayer=X("EPDFLayer_OpenLayer",4),t._EPDFLayer_OpenLayerArtifact=X("EPDFLayer_OpenLayerArtifact",4),t._EPDFLayer_OpenLayerArtifactFromPath=X("EPDFLayer_OpenLayerArtifactFromPath",4),t._EPDFLayer_IsObjectPromoted=X("EPDFLayer_IsObjectPromoted",2),t._EPDFPage_IsValid=X("EPDFPage_IsValid",1),t._EPDFLayer_IsPagePromoted=X("EPDFLayer_IsPagePromoted",2),t._EPDFLayer_GetBirthObjectNumber=X("EPDFLayer_GetBirthObjectNumber",3),t._EPDFLayer_GetBirthName=X("EPDFLayer_GetBirthName",4),t._EPDFLayer_BeginTransaction=X("EPDFLayer_BeginTransaction",1),t._EPDFLayer_CommitTransaction=X("EPDFLayer_CommitTransaction",1),t._EPDFLayer_AbortTransaction=X("EPDFLayer_AbortTransaction",1),t._EPDFLayer_IsInTransaction=X("EPDFLayer_IsInTransaction",1),t._EPDFLayer_GetLastObjectNumber=X("EPDFLayer_GetLastObjectNumber",1),t._EPDFLayer_RaiseLastObjectNumber=X("EPDFLayer_RaiseLastObjectNumber",2),t._EPDFLayer_GetPromotedObjectCount=X("EPDFLayer_GetPromotedObjectCount",1),t._EPDFLayer_GetBaseDocument=X("EPDFLayer_GetBaseDocument",1),t._EPDF_SetBaseDocumentSha256=X("EPDF_SetBaseDocumentSha256",2),t._EPDFLayer_GetBaseSha256=X("EPDFLayer_GetBaseSha256",2),t._EPDFLayer_SaveDelta=X("EPDFLayer_SaveDelta",3),t._EPDFLayer_SaveDeltaEx=X("EPDFLayer_SaveDeltaEx",4),t._EPDFLayer_SaveDeltaToOwnedBuffer=X("EPDFLayer_SaveDeltaToOwnedBuffer",3),t._EPDFLayer_SaveDeltaToOwnedBufferEx=X("EPDFLayer_SaveDeltaToOwnedBufferEx",4),t._EPDFLayer_SaveLayerArtifact=X("EPDFLayer_SaveLayerArtifact",3),t._EPDFLayer_SaveLayerArtifactEx=X("EPDFLayer_SaveLayerArtifactEx",4),t._EPDFLayer_SaveLayerArtifactToOwnedBuffer=X("EPDFLayer_SaveLayerArtifactToOwnedBuffer",3),t._EPDFLayer_SaveLayerArtifactToOwnedBufferEx=X("EPDFLayer_SaveLayerArtifactToOwnedBufferEx",4),t._EPDFNamedDest_SetDest=X("EPDFNamedDest_SetDest",3),t._EPDFNamedDest_Remove=X("EPDFNamedDest_Remove",2),t._EPDFDest_CreateView=X("EPDFDest_CreateView",4),t._EPDFDest_CreateXYZ=X("EPDFDest_CreateXYZ",7),t._EPDFDest_CreateRemoteView=X("EPDFDest_CreateRemoteView",5),t._EPDFDest_CreateRemoteXYZ=X("EPDFDest_CreateRemoteXYZ",8),t._EPDFDest_CreateXYZByObjectNumber=X("EPDFDest_CreateXYZByObjectNumber",8),t._EPDFDest_CreateViewByObjectNumber=X("EPDFDest_CreateViewByObjectNumber",5),t._EPDFDest_GetViewNullParams=X("EPDFDest_GetViewNullParams",1),t._EPDFAction_CreateGoTo=X("EPDFAction_CreateGoTo",2),t._EPDFAction_CreateGoToNamed=X("EPDFAction_CreateGoToNamed",2),t._EPDFAction_CreateLaunch=X("EPDFAction_CreateLaunch",2),t._EPDFAction_CreateRemoteGoToByName=X("EPDFAction_CreateRemoteGoToByName",3),t._EPDFAction_CreateRemoteGoToDest=X("EPDFAction_CreateRemoteGoToDest",3),t._EPDFAction_CreateURI=X("EPDFAction_CreateURI",2),t._EPDFAction_CreateNamed=X("EPDFAction_CreateNamed",2),t._EPDFOutline_GetObjectNumber=X("EPDFOutline_GetObjectNumber",1),t._EPDFOutline_GetItem=X("EPDFOutline_GetItem",2),t._EPDFOutline_CreateItem=X("EPDFOutline_CreateItem",5),t._EPDFOutline_MoveItem=X("EPDFOutline_MoveItem",4),t._EPDFOutline_DeleteItem=X("EPDFOutline_DeleteItem",2),t._EPDFOutline_SetTitle=X("EPDFOutline_SetTitle",3),t._EPDFOutline_SetOpen=X("EPDFOutline_SetOpen",3),t._EPDFOutline_SetColor=X("EPDFOutline_SetColor",6),t._EPDFOutline_SetStyle=X("EPDFOutline_SetStyle",3),t._EPDFOutline_SetAction=X("EPDFOutline_SetAction",3),t._EPDFDoc_GetNamedPageCount=X("EPDFDoc_GetNamedPageCount",2),t._EPDFDoc_GetNamedPageAt=X("EPDFDoc_GetNamedPageAt",7),t._EPDFDoc_SetNamedPage=X("EPDFDoc_SetNamedPage",3),t._EPDFDoc_RemoveNamedPage=X("EPDFDoc_RemoveNamedPage",2),t._EPDFDoc_RemoveNamedPagesForPage=X("EPDFDoc_RemoveNamedPagesForPage",2),t._EPDFDoc_GetPageLabelSectionCount=X("EPDFDoc_GetPageLabelSectionCount",1),t._EPDFDoc_GetPageLabelSectionAt=X("EPDFDoc_GetPageLabelSectionAt",7),t._EPDFDoc_SetPageLabelSections=X("EPDFDoc_SetPageLabelSections",6),t._EPDF_DigestBuffer=X("EPDF_DigestBuffer",5),t._EPDFDoc_GetRevisionCount=X("EPDFDoc_GetRevisionCount",1),t._EPDFDoc_GetRevision=X("EPDFDoc_GetRevision",4),t._EPDFDoc_OpenRevision=X("EPDFDoc_OpenRevision",3),t._EPDFDoc_OpenBaseOverlayFromPath=X("EPDFDoc_OpenBaseOverlayFromPath",2),t._EPDFDoc_OpenBaseOverlay=X("EPDFDoc_OpenBaseOverlay",3),t._EPDFSig_LoadModel=X("EPDFSig_LoadModel",1),t._EPDFSig_CloseModel=X("EPDFSig_CloseModel",1),t._EPDFSig_Count=X("EPDFSig_Count",1),t._EPDFSig_IsRevisionChainValid=X("EPDFSig_IsRevisionChainValid",1),t._EPDFSig_GetIndexByFieldObjNum=X("EPDFSig_GetIndexByFieldObjNum",2),t._EPDFSig_GetFieldObjNum=X("EPDFSig_GetFieldObjNum",2),t._EPDFSig_GetWidgetObjNum=X("EPDFSig_GetWidgetObjNum",2),t._EPDFSig_GetWidgetPageObjNum=X("EPDFSig_GetWidgetPageObjNum",2),t._EPDFSig_GetValueObjNum=X("EPDFSig_GetValueObjNum",2),t._EPDFSig_GetFieldName=X("EPDFSig_GetFieldName",4),t._EPDFSig_IsSigned=X("EPDFSig_IsSigned",2),t._EPDFSig_GetKind=X("EPDFSig_GetKind",2),t._EPDFSig_GetByteRange=X("EPDFSig_GetByteRange",3),t._EPDFSig_GetCoverage=X("EPDFSig_GetCoverage",2),t._EPDFSig_GetRevisionIndex=X("EPDFSig_GetRevisionIndex",2),t._EPDFSig_GetContents=X("EPDFSig_GetContents",4),t._EPDFSig_GetString=X("EPDFSig_GetString",5),t._EPDFSig_GetDocMDPPermission=X("EPDFSig_GetDocMDPPermission",2),t._EPDFSig_IsCatalogCertification=X("EPDFSig_IsCatalogCertification",2),t._EPDFSig_GetFieldMDPAction=X("EPDFSig_GetFieldMDPAction",2),t._EPDFSig_GetLockAction=X("EPDFSig_GetLockAction",2),t._EPDFSig_GetLockPermission=X("EPDFSig_GetLockPermission",2),t._EPDFSig_GetFieldNameCount=X("EPDFSig_GetFieldNameCount",3),t._EPDFSig_GetFieldNameAt=X("EPDFSig_GetFieldNameAt",6),t._EPDFSig_HasSeedValue=X("EPDFSig_HasSeedValue",2),t._EPDFSig_GetSeedValueRequiredFlags=X("EPDFSig_GetSeedValueRequiredFlags",2),t._EPDFSig_GetSeedValuePresentFlags=X("EPDFSig_GetSeedValuePresentFlags",2),t._EPDFSig_GetSeedValueMDP=X("EPDFSig_GetSeedValueMDP",2),t._EPDFSig_GetSeedValueVersion=X("EPDFSig_GetSeedValueVersion",2),t._EPDFSig_GetSeedValueFilter=X("EPDFSig_GetSeedValueFilter",4),t._EPDFSig_GetSeedValueListCount=X("EPDFSig_GetSeedValueListCount",3),t._EPDFSig_GetSeedValueListAt=X("EPDFSig_GetSeedValueListAt",6),t._EPDFSig_DigestByteRange=X("EPDFSig_DigestByteRange",5),t._EPDFSig_DigestFileRange=X("EPDFSig_DigestFileRange",5),t._EPDFDoc_GetLoadedBytesSize=X("EPDFDoc_GetLoadedBytesSize",1),t._EPDFDoc_GetBaseBytesSize=X("EPDFDoc_GetBaseBytesSize",1),t._EPDFDoc_GetStructureObjectNumbers=X("EPDFDoc_GetStructureObjectNumbers",4),t._EPDFDoc_ReadLoadedBytes=X("EPDFDoc_ReadLoadedBytes",5),t._EPDFSig_Prepare=X("EPDFSig_Prepare",3),t._EPDFSig_SetFieldLock=X("EPDFSig_SetFieldLock",6),t._EPDFSig_SaveCandidateToOwnedBuffer=X("EPDFSig_SaveCandidateToOwnedBuffer",5),t._EPDFSig_SaveCandidate=X("EPDFSig_SaveCandidate",6),t._EPDFSig_Seal=X("EPDFSig_Seal",13),t._EPDFSig_SealSpan=X("EPDFSig_SealSpan",10),t._EPDFSig_WriteContents=X("EPDFSig_WriteContents",9),t._EPDFDss_GetCount=X("EPDFDss_GetCount",2),t._EPDFDss_GetData=X("EPDFDss_GetData",5),t._EPDFDss_Add=X("EPDFDss_Add",4),t._EPDFDoc_CompareRevisions=X("EPDFDoc_CompareRevisions",2),t._EPDFObjectDiff_Close=X("EPDFObjectDiff_Close",1),t._EPDFObjectDiff_GetCount=X("EPDFObjectDiff_GetCount",1),t._EPDFObjectDiff_GetEntry=X("EPDFObjectDiff_GetEntry",8),t._EPDFObjectDiff_GetValue=X("EPDFObjectDiff_GetValue",6),t._EPDFObjectDiff_GetReadStatus=X("EPDFObjectDiff_GetReadStatus",3),t._EPDFObjectDiff_GetRevisionHealth=X("EPDFObjectDiff_GetRevisionHealth",5),t._EPDFObjectDiff_GetReferrerCount=X("EPDFObjectDiff_GetReferrerCount",3),t._EPDFObjectDiff_GetReferrer=X("EPDFObjectDiff_GetReferrer",7),t._EPDFDoc_GetLoadedObjectValue=X("EPDFDoc_GetLoadedObjectValue",6),t._EPDFDoc_HasPieceInfoEntry=X("EPDFDoc_HasPieceInfoEntry",2),t._EPDFDoc_GetPieceInfoEntryCount=X("EPDFDoc_GetPieceInfoEntryCount",1),t._EPDFDoc_GetPieceInfoEntryAt=X("EPDFDoc_GetPieceInfoEntryAt",4),t._EPDFDoc_GetLastModified=X("EPDFDoc_GetLastModified",3),t._EPDFDoc_GetPieceInfoLastModified=X("EPDFDoc_GetPieceInfoLastModified",4),t._EPDFDoc_GetPieceInfoKeyCount=X("EPDFDoc_GetPieceInfoKeyCount",2),t._EPDFDoc_GetPieceInfoKeyAt=X("EPDFDoc_GetPieceInfoKeyAt",5),t._EPDFDoc_GetPieceInfoValueType=X("EPDFDoc_GetPieceInfoValueType",3),t._EPDFDoc_SetPieceInfoString=X("EPDFDoc_SetPieceInfoString",5),t._EPDFDoc_GetPieceInfoString=X("EPDFDoc_GetPieceInfoString",5),t._EPDFDoc_SetPieceInfoNumber=X("EPDFDoc_SetPieceInfoNumber",5),t._EPDFDoc_GetPieceInfoNumber=X("EPDFDoc_GetPieceInfoNumber",4),t._EPDFDoc_SetPieceInfoBoolean=X("EPDFDoc_SetPieceInfoBoolean",5),t._EPDFDoc_GetPieceInfoBoolean=X("EPDFDoc_GetPieceInfoBoolean",4),t._EPDFDoc_SetPieceInfoName=X("EPDFDoc_SetPieceInfoName",5),t._EPDFDoc_GetPieceInfoName=X("EPDFDoc_GetPieceInfoName",5),t._EPDFDoc_SetPieceInfoStringArray=X("EPDFDoc_SetPieceInfoStringArray",6),t._EPDFDoc_GetPieceInfoStringArrayCount=X("EPDFDoc_GetPieceInfoStringArrayCount",3),t._EPDFDoc_GetPieceInfoStringArrayAt=X("EPDFDoc_GetPieceInfoStringArrayAt",6),t._EPDFDoc_ClearPieceInfoKey=X("EPDFDoc_ClearPieceInfoKey",4),t._EPDFDoc_ClearPieceInfoEntry=X("EPDFDoc_ClearPieceInfoEntry",2),t._EPDFDoc_HasPagePieceInfoEntry=X("EPDFDoc_HasPagePieceInfoEntry",3),t._EPDFDoc_GetPagePieceInfoEntryCount=X("EPDFDoc_GetPagePieceInfoEntryCount",2),t._EPDFDoc_GetPagePieceInfoEntryAt=X("EPDFDoc_GetPagePieceInfoEntryAt",5),t._EPDFDoc_GetPageLastModified=X("EPDFDoc_GetPageLastModified",4),t._EPDFDoc_GetPagePieceInfoLastModified=X("EPDFDoc_GetPagePieceInfoLastModified",5),t._EPDFDoc_GetPagePieceInfoKeyCount=X("EPDFDoc_GetPagePieceInfoKeyCount",3),t._EPDFDoc_GetPagePieceInfoKeyAt=X("EPDFDoc_GetPagePieceInfoKeyAt",6),t._EPDFDoc_GetPagePieceInfoValueType=X("EPDFDoc_GetPagePieceInfoValueType",4),t._EPDFDoc_SetPagePieceInfoString=X("EPDFDoc_SetPagePieceInfoString",6),t._EPDFDoc_GetPagePieceInfoString=X("EPDFDoc_GetPagePieceInfoString",6),t._EPDFDoc_SetPagePieceInfoNumber=X("EPDFDoc_SetPagePieceInfoNumber",6),t._EPDFDoc_GetPagePieceInfoNumber=X("EPDFDoc_GetPagePieceInfoNumber",5),t._EPDFDoc_SetPagePieceInfoBoolean=X("EPDFDoc_SetPagePieceInfoBoolean",6),t._EPDFDoc_GetPagePieceInfoBoolean=X("EPDFDoc_GetPagePieceInfoBoolean",5),t._EPDFDoc_SetPagePieceInfoName=X("EPDFDoc_SetPagePieceInfoName",6),t._EPDFDoc_GetPagePieceInfoName=X("EPDFDoc_GetPagePieceInfoName",6),t._EPDFDoc_SetPagePieceInfoStringArray=X("EPDFDoc_SetPagePieceInfoStringArray",7),t._EPDFDoc_GetPagePieceInfoStringArrayCount=X("EPDFDoc_GetPagePieceInfoStringArrayCount",4),t._EPDFDoc_GetPagePieceInfoStringArrayAt=X("EPDFDoc_GetPagePieceInfoStringArrayAt",7),t._EPDFDoc_ClearPagePieceInfoKey=X("EPDFDoc_ClearPagePieceInfoKey",5),t._EPDFDoc_ClearPagePieceInfoEntry=X("EPDFDoc_ClearPagePieceInfoEntry",3),t._EPDFAnnot_GetMeasure=X("EPDFAnnot_GetMeasure",1),t._EPDFAnnot_AddMeasure=X("EPDFAnnot_AddMeasure",1),t._EPDFAnnot_RemoveMeasure=X("EPDFAnnot_RemoveMeasure",1),t._EPDFPage_CountViewports=X("EPDFPage_CountViewports",1),t._EPDFPage_GetViewport=X("EPDFPage_GetViewport",2),t._EPDFPage_AddViewport=X("EPDFPage_AddViewport",2),t._EPDFPage_RemoveViewport=X("EPDFPage_RemoveViewport",2),t._EPDFPage_CountViewportsRaw=X("EPDFPage_CountViewportsRaw",2),t._EPDFPage_GetViewportRaw=X("EPDFPage_GetViewportRaw",3),t._EPDFPage_AddViewportRaw=X("EPDFPage_AddViewportRaw",3),t._EPDFPage_RemoveViewportRaw=X("EPDFPage_RemoveViewportRaw",3),t._EPDFViewport_Close=X("EPDFViewport_Close",1),t._EPDFPage_FindViewport=X("EPDFPage_FindViewport",2),t._EPDFViewport_GetBBox=X("EPDFViewport_GetBBox",2),t._EPDFViewport_SetBBox=X("EPDFViewport_SetBBox",2),t._EPDFViewport_GetMeasure=X("EPDFViewport_GetMeasure",1),t._EPDFViewport_AddMeasure=X("EPDFViewport_AddMeasure",1),t._EPDFViewport_RemoveMeasure=X("EPDFViewport_RemoveMeasure",1),t._EPDFMeasure_GetSubtype=X("EPDFMeasure_GetSubtype",1),t._EPDFMeasure_GetOrigin=X("EPDFMeasure_GetOrigin",2),t._EPDFMeasure_SetOrigin=X("EPDFMeasure_SetOrigin",2),t._EPDFMeasure_GetCYX=X("EPDFMeasure_GetCYX",2),t._EPDFMeasure_SetCYX=X("EPDFMeasure_SetCYX",2),t._EPDFMeasure_CountFormats=X("EPDFMeasure_CountFormats",2),t._EPDFMeasure_GetFormat=X("EPDFMeasure_GetFormat",3),t._EPDFMeasure_AddFormat=X("EPDFMeasure_AddFormat",4),t._EPDFMeasure_RemoveFormats=X("EPDFMeasure_RemoveFormats",2),t._EPDFViewport_GetName=X("EPDFViewport_GetName",3),t._EPDFViewport_SetName=X("EPDFViewport_SetName",2),t._EPDFMeasure_GetRatio=X("EPDFMeasure_GetRatio",3),t._EPDFMeasure_SetRatio=X("EPDFMeasure_SetRatio",2),t._EPDFNumberFormat_GetUnit=X("EPDFNumberFormat_GetUnit",3),t._EPDFNumberFormat_SetUnit=X("EPDFNumberFormat_SetUnit",2),t._EPDFNumberFormat_GetConversion=X("EPDFNumberFormat_GetConversion",2),t._EPDFNumberFormat_SetConversion=X("EPDFNumberFormat_SetConversion",2),t._EPDFNumberFormat_GetPrecision=X("EPDFNumberFormat_GetPrecision",2),t._EPDFNumberFormat_SetPrecision=X("EPDFNumberFormat_SetPrecision",2),t._EPDFNumberFormat_GetFixedDenominator=X("EPDFNumberFormat_GetFixedDenominator",2),t._EPDFNumberFormat_SetFixedDenominator=X("EPDFNumberFormat_SetFixedDenominator",2),t._EPDFNumberFormat_GetText=X("EPDFNumberFormat_GetText",4),t._EPDFNumberFormat_SetText=X("EPDFNumberFormat_SetText",3),t._EPDFNumberFormat_GetFraction=X("EPDFNumberFormat_GetFraction",2),t._EPDFNumberFormat_SetFraction=X("EPDFNumberFormat_SetFraction",2),t._EPDFNumberFormat_GetLabelPosition=X("EPDFNumberFormat_GetLabelPosition",2),t._EPDFNumberFormat_SetLabelPosition=X("EPDFNumberFormat_SetLabelPosition",2),t._EPDFAnnot_SetLineLeader=X("EPDFAnnot_SetLineLeader",4),t._EPDFAnnot_GetLineLeader=X("EPDFAnnot_GetLineLeader",4),t._EPDFAnnot_SetLineCaption=X("EPDFAnnot_SetLineCaption",4),t._EPDFAnnot_GetLineCaption=X("EPDFAnnot_GetLineCaption",4),t._EPDFAnnot_SetShapeCaption=X("EPDFAnnot_SetShapeCaption",3),t._EPDFAnnot_GetShapeCaption=X("EPDFAnnot_GetShapeCaption",4),t._EPDFPage_GetParsedSize=X("EPDFPage_GetParsedSize",2),t._EPDFPage_IsContentCurrent=X("EPDFPage_IsContentCurrent",1),t._EPDF_PNG_EncodeRGBA=X("EPDF_PNG_EncodeRGBA",6),t._EPDFDoc_ImportPages=X("EPDFDoc_ImportPages",6),t._EPDFDoc_GetImportFieldRoots=X("EPDFDoc_GetImportFieldRoots",5),t._EPDFPage_ApplyRedactions=X("EPDFPage_ApplyRedactions",4),t._EPDF_InitThread=X("EPDF_InitThread",0),t._EPDF_ShutdownThread=X("EPDF_ShutdownThread",0),t._FPDFAnnot_IsSupportedSubtype=X("FPDFAnnot_IsSupportedSubtype",1),t._FPDFPage_CreateAnnot=X("FPDFPage_CreateAnnot",2),t._FPDFPage_GetAnnotCount=X("FPDFPage_GetAnnotCount",1),t._FPDFPage_GetAnnot=X("FPDFPage_GetAnnot",2),t._FPDFPage_GetAnnotIndex=X("FPDFPage_GetAnnotIndex",2),t._FPDFPage_CloseAnnot=X("FPDFPage_CloseAnnot",1),t._FPDFPage_RemoveAnnot=X("FPDFPage_RemoveAnnot",2),t._FPDFAnnot_GetSubtype=X("FPDFAnnot_GetSubtype",1),t._FPDFAnnot_IsObjectSupportedSubtype=X("FPDFAnnot_IsObjectSupportedSubtype",1),t._FPDFAnnot_UpdateObject=X("FPDFAnnot_UpdateObject",2),t._FPDFAnnot_AddInkStroke=X("FPDFAnnot_AddInkStroke",3),t._FPDFAnnot_RemoveInkList=X("FPDFAnnot_RemoveInkList",1),t._FPDFAnnot_AppendObject=X("FPDFAnnot_AppendObject",2),t._FPDFAnnot_GetObjectCount=X("FPDFAnnot_GetObjectCount",1),t._FPDFAnnot_GetObject=X("FPDFAnnot_GetObject",2),t._FPDFAnnot_RemoveObject=X("FPDFAnnot_RemoveObject",2),t._FPDFAnnot_SetColor=X("FPDFAnnot_SetColor",6),t._FPDFAnnot_GetColor=X("FPDFAnnot_GetColor",6),t._FPDFAnnot_HasAttachmentPoints=X("FPDFAnnot_HasAttachmentPoints",1),t._FPDFAnnot_SetAttachmentPoints=X("FPDFAnnot_SetAttachmentPoints",3),t._FPDFAnnot_AppendAttachmentPoints=X("FPDFAnnot_AppendAttachmentPoints",2),t._FPDFAnnot_CountAttachmentPoints=X("FPDFAnnot_CountAttachmentPoints",1),t._FPDFAnnot_GetAttachmentPoints=X("FPDFAnnot_GetAttachmentPoints",3),t._FPDFAnnot_SetRect=X("FPDFAnnot_SetRect",2),t._FPDFAnnot_GetRect=X("FPDFAnnot_GetRect",2),t._FPDFAnnot_GetVertices=X("FPDFAnnot_GetVertices",3),t._FPDFAnnot_GetInkListCount=X("FPDFAnnot_GetInkListCount",1),t._FPDFAnnot_GetInkListPath=X("FPDFAnnot_GetInkListPath",4),t._FPDFAnnot_GetLine=X("FPDFAnnot_GetLine",3),t._FPDFAnnot_SetBorder=X("FPDFAnnot_SetBorder",4),t._FPDFAnnot_GetBorder=X("FPDFAnnot_GetBorder",4),t._FPDFAnnot_HasKey=X("FPDFAnnot_HasKey",2),t._FPDFAnnot_GetValueType=X("FPDFAnnot_GetValueType",2),t._FPDFAnnot_SetStringValue=X("FPDFAnnot_SetStringValue",3),t._FPDFAnnot_GetStringValue=X("FPDFAnnot_GetStringValue",4),t._FPDFAnnot_GetNumberValue=X("FPDFAnnot_GetNumberValue",3),t._FPDFAnnot_SetAP=X("FPDFAnnot_SetAP",3),t._FPDFAnnot_GetAP=X("FPDFAnnot_GetAP",4),t._FPDFAnnot_GetLinkedAnnot=X("FPDFAnnot_GetLinkedAnnot",2),t._FPDFAnnot_GetFlags=X("FPDFAnnot_GetFlags",1),t._FPDFAnnot_SetFlags=X("FPDFAnnot_SetFlags",2),t._FPDFAnnot_GetFormFieldFlags=X("FPDFAnnot_GetFormFieldFlags",2),t._FPDFAnnot_SetFormFieldFlags=X("FPDFAnnot_SetFormFieldFlags",3),t._FPDFAnnot_GetFormFieldAtPoint=X("FPDFAnnot_GetFormFieldAtPoint",3),t._FPDFAnnot_GetFormFieldName=X("FPDFAnnot_GetFormFieldName",4),t._FPDFAnnot_GetFormFieldType=X("FPDFAnnot_GetFormFieldType",2),t._FPDFAnnot_GetFormAdditionalActionJavaScript=X("FPDFAnnot_GetFormAdditionalActionJavaScript",5),t._FPDFAnnot_GetFormFieldAlternateName=X("FPDFAnnot_GetFormFieldAlternateName",4),t._FPDFAnnot_GetFormFieldValue=X("FPDFAnnot_GetFormFieldValue",4),t._FPDFAnnot_GetOptionCount=X("FPDFAnnot_GetOptionCount",2),t._FPDFAnnot_GetOptionLabel=X("FPDFAnnot_GetOptionLabel",5),t._FPDFAnnot_IsOptionSelected=X("FPDFAnnot_IsOptionSelected",3),t._FPDFAnnot_GetFontSize=X("FPDFAnnot_GetFontSize",3),t._FPDFAnnot_SetFontColor=X("FPDFAnnot_SetFontColor",5),t._FPDFAnnot_GetFontColor=X("FPDFAnnot_GetFontColor",5),t._FPDFAnnot_IsChecked=X("FPDFAnnot_IsChecked",2),t._FPDFAnnot_SetFocusableSubtypes=X("FPDFAnnot_SetFocusableSubtypes",3),t._FPDFAnnot_GetFocusableSubtypesCount=X("FPDFAnnot_GetFocusableSubtypesCount",1),t._FPDFAnnot_GetFocusableSubtypes=X("FPDFAnnot_GetFocusableSubtypes",3),t._FPDFAnnot_GetLink=X("FPDFAnnot_GetLink",1),t._FPDFAnnot_GetFormControlCount=X("FPDFAnnot_GetFormControlCount",2),t._FPDFAnnot_GetFormControlIndex=X("FPDFAnnot_GetFormControlIndex",2),t._FPDFAnnot_GetFormFieldExportValue=X("FPDFAnnot_GetFormFieldExportValue",4),t._FPDFAnnot_SetURI=X("FPDFAnnot_SetURI",2),t._FPDFAnnot_GetFileAttachment=X("FPDFAnnot_GetFileAttachment",1),t._FPDFAnnot_AddFileAttachment=X("FPDFAnnot_AddFileAttachment",2),t._FPDFDoc_GetAttachmentCount=X("FPDFDoc_GetAttachmentCount",1),t._FPDFDoc_AddAttachment=X("FPDFDoc_AddAttachment",2),t._FPDFDoc_GetAttachment=X("FPDFDoc_GetAttachment",2),t._EPDFDoc_GetAttachmentKey=X("EPDFDoc_GetAttachmentKey",4),t._EPDFDoc_GetAttachmentIndexByKey=X("EPDFDoc_GetAttachmentIndexByKey",2),t._FPDFDoc_DeleteAttachment=X("FPDFDoc_DeleteAttachment",2),t._FPDFAttachment_GetName=X("FPDFAttachment_GetName",3),t._FPDFAttachment_HasKey=X("FPDFAttachment_HasKey",2),t._FPDFAttachment_GetValueType=X("FPDFAttachment_GetValueType",2),t._FPDFAttachment_SetStringValue=X("FPDFAttachment_SetStringValue",3),t._FPDFAttachment_GetStringValue=X("FPDFAttachment_GetStringValue",4),t._FPDFAttachment_SetDescription=X("FPDFAttachment_SetDescription",2),t._FPDFAttachment_GetDescription=X("FPDFAttachment_GetDescription",3),t._FPDFAttachment_SetFile=X("FPDFAttachment_SetFile",4),t._FPDFAttachment_GetFile=X("FPDFAttachment_GetFile",4),t._FPDFAttachment_GetSubtype=X("FPDFAttachment_GetSubtype",3),t._FPDFAttachment_GetAFRelationship=X("FPDFAttachment_GetAFRelationship",3),t._EPDFAttachment_SetSubtype=X("EPDFAttachment_SetSubtype",2),t._EPDFAttachment_SetDescription=X("EPDFAttachment_SetDescription",2),t._EPDFAttachment_SetName=X("EPDFAttachment_SetName",2),t._EPDFAttachment_GetDescription=X("EPDFAttachment_GetDescription",3),t._EPDFAttachment_GetIntegerValue=X("EPDFAttachment_GetIntegerValue",3),t._EPDFAttachment_ExtractFile=X("EPDFAttachment_ExtractFile",6),t._EPDFAttachment_ExtractFileToOwnedBuffer=X("EPDFAttachment_ExtractFileToOwnedBuffer",6),t._FPDFCatalog_IsTagged=X("FPDFCatalog_IsTagged",1),t._FPDFCatalog_GetLanguage=X("FPDFCatalog_GetLanguage",3),t._FPDFCatalog_SetLanguage=X("FPDFCatalog_SetLanguage",2),t._EPDFCatalog_GetLanguage=X("EPDFCatalog_GetLanguage",3),t._FPDFAvail_Create=X("FPDFAvail_Create",2),t._FPDFAvail_Destroy=X("FPDFAvail_Destroy",1),t._FPDFAvail_IsDocAvail=X("FPDFAvail_IsDocAvail",2),t._FPDFAvail_GetDocument=X("FPDFAvail_GetDocument",2),t._FPDFAvail_GetFirstPageNum=X("FPDFAvail_GetFirstPageNum",1),t._FPDFAvail_IsPageAvail=X("FPDFAvail_IsPageAvail",3),t._FPDFAvail_IsFormAvail=X("FPDFAvail_IsFormAvail",2),t._FPDFAvail_IsLinearized=X("FPDFAvail_IsLinearized",1),t._FPDFBookmark_GetFirstChild=X("FPDFBookmark_GetFirstChild",2),t._FPDFBookmark_GetNextSibling=X("FPDFBookmark_GetNextSibling",2),t._FPDFBookmark_GetTitle=X("FPDFBookmark_GetTitle",3),t._FPDFBookmark_GetCount=X("FPDFBookmark_GetCount",1),t._FPDFBookmark_Find=X("FPDFBookmark_Find",2),t._FPDFBookmark_GetDest=X("FPDFBookmark_GetDest",2),t._FPDFBookmark_GetAction=X("FPDFBookmark_GetAction",1),t._FPDFBookmark_GetColor=X("FPDFBookmark_GetColor",4),t._FPDFBookmark_GetStyle=X("FPDFBookmark_GetStyle",1),t._FPDFAction_GetType=X("FPDFAction_GetType",1),t._FPDFAction_GetDest=X("FPDFAction_GetDest",2),t._FPDFAction_GetFilePath=X("FPDFAction_GetFilePath",3),t._FPDFAction_GetURIPath=X("FPDFAction_GetURIPath",4),t._FPDFDest_GetDestPageIndex=X("FPDFDest_GetDestPageIndex",2),t._EPDFDest_GetPageObjectNumber=X("EPDFDest_GetPageObjectNumber",2),t._FPDFDest_GetView=X("FPDFDest_GetView",3),t._FPDFDest_GetLocationInPage=X("FPDFDest_GetLocationInPage",7),t._FPDFLink_GetLinkAtPoint=X("FPDFLink_GetLinkAtPoint",3),t._FPDFLink_GetLinkZOrderAtPoint=X("FPDFLink_GetLinkZOrderAtPoint",3),t._FPDFLink_GetDest=X("FPDFLink_GetDest",2),t._FPDFLink_GetAction=X("FPDFLink_GetAction",1),t._FPDFLink_Enumerate=X("FPDFLink_Enumerate",3),t._FPDFLink_GetAnnot=X("FPDFLink_GetAnnot",2),t._FPDFLink_GetAnnotRect=X("FPDFLink_GetAnnotRect",2),t._FPDFLink_CountQuadPoints=X("FPDFLink_CountQuadPoints",1),t._FPDFLink_GetQuadPoints=X("FPDFLink_GetQuadPoints",3),t._FPDF_GetPageAAction=X("FPDF_GetPageAAction",2),t._FPDF_GetFileIdentifier=X("FPDF_GetFileIdentifier",4),t._FPDF_GetMetaText=X("FPDF_GetMetaText",4),t._FPDF_GetPageLabel=X("FPDF_GetPageLabel",4),t._EPDF_SetMetaText=X("EPDF_SetMetaText",3),t._EPDF_HasMetaText=X("EPDF_HasMetaText",2),t._EPDF_GetMetaTrapped=X("EPDF_GetMetaTrapped",1),t._EPDF_SetMetaTrapped=X("EPDF_SetMetaTrapped",2),t._EPDF_GetMetaKeyCount=X("EPDF_GetMetaKeyCount",2),t._EPDF_GetMetaKeyName=X("EPDF_GetMetaKeyName",5),t._FPDFPageObj_NewImageObj=X("FPDFPageObj_NewImageObj",1),t._FPDFImageObj_LoadJpegFile=X("FPDFImageObj_LoadJpegFile",4),t._FPDFImageObj_LoadJpegFileInline=X("FPDFImageObj_LoadJpegFileInline",4),t._FPDFImageObj_SetMatrix=X("FPDFImageObj_SetMatrix",7),t._FPDFImageObj_SetBitmap=X("FPDFImageObj_SetBitmap",4),t._FPDFImageObj_GetBitmap=X("FPDFImageObj_GetBitmap",1),t._FPDFImageObj_GetRenderedBitmap=X("FPDFImageObj_GetRenderedBitmap",3),t._FPDFImageObj_GetImageDataDecoded=X("FPDFImageObj_GetImageDataDecoded",3),t._FPDFImageObj_GetImageDataRaw=X("FPDFImageObj_GetImageDataRaw",3),t._FPDFImageObj_GetImageFilterCount=X("FPDFImageObj_GetImageFilterCount",1),t._FPDFImageObj_GetImageFilter=X("FPDFImageObj_GetImageFilter",4),t._FPDFImageObj_GetImageMetadata=X("FPDFImageObj_GetImageMetadata",3),t._FPDFImageObj_GetImagePixelSize=X("FPDFImageObj_GetImagePixelSize",3),t._FPDFImageObj_GetIccProfileDataDecoded=X("FPDFImageObj_GetIccProfileDataDecoded",5),t._EPDFImageObj_SetPng=X("EPDFImageObj_SetPng",5),t._EPDFImageObj_SetJpeg=X("EPDFImageObj_SetJpeg",5),t._FPDF_CreateNewDocument=X("FPDF_CreateNewDocument",0),t._FPDFPage_Delete=X("FPDFPage_Delete",2),t._FPDF_MovePages=X("FPDF_MovePages",4),t._FPDFPage_New=X("FPDFPage_New",4),t._EPDFPage_InsertBlankRaw=X("EPDFPage_InsertBlankRaw",5),t._FPDFPage_GetRotation=X("FPDFPage_GetRotation",1),t._FPDFPage_InsertObject=X("FPDFPage_InsertObject",2),t._FPDFPage_InsertObjectAtIndex=X("FPDFPage_InsertObjectAtIndex",3),t._FPDFPage_RemoveObject=X("FPDFPage_RemoveObject",2),t._FPDFPage_CountObjects=X("FPDFPage_CountObjects",1),t._FPDFPage_GetObject=X("FPDFPage_GetObject",2),t._FPDFPage_HasTransparency=X("FPDFPage_HasTransparency",1),t._FPDFPageObj_Destroy=X("FPDFPageObj_Destroy",1),t._FPDFPageObj_GetMarkedContentID=X("FPDFPageObj_GetMarkedContentID",1),t._FPDFPageObj_CountMarks=X("FPDFPageObj_CountMarks",1),t._FPDFPageObj_GetMark=X("FPDFPageObj_GetMark",2),t._FPDFPageObj_AddExistingMark=X("FPDFPageObj_AddExistingMark",2),t._FPDFPageObj_AddMark=X("FPDFPageObj_AddMark",2),t._FPDFPageObj_RemoveMark=X("FPDFPageObj_RemoveMark",2),t._FPDFPageObjMark_GetName=X("FPDFPageObjMark_GetName",4),t._FPDFPageObjMark_CountParams=X("FPDFPageObjMark_CountParams",1),t._FPDFPageObjMark_GetParamKey=X("FPDFPageObjMark_GetParamKey",5),t._FPDFPageObjMark_GetParamValueType=X("FPDFPageObjMark_GetParamValueType",2),t._FPDFPageObjMark_GetParamIntValue=X("FPDFPageObjMark_GetParamIntValue",3),t._FPDFPageObjMark_GetParamFloatValue=X("FPDFPageObjMark_GetParamFloatValue",3),t._FPDFPageObjMark_GetParamStringValue=X("FPDFPageObjMark_GetParamStringValue",5),t._FPDFPageObjMark_GetParamBlobValue=X("FPDFPageObjMark_GetParamBlobValue",5),t._FPDFPageObj_HasTransparency=X("FPDFPageObj_HasTransparency",1),t._FPDFPageObjMark_SetIntParam=X("FPDFPageObjMark_SetIntParam",5),t._FPDFPageObjMark_SetFloatParam=X("FPDFPageObjMark_SetFloatParam",5),t._FPDFPageObjMark_SetStringParam=X("FPDFPageObjMark_SetStringParam",5),t._FPDFPageObjMark_SetBlobParam=X("FPDFPageObjMark_SetBlobParam",6),t._FPDFPageObjMark_RemoveParam=X("FPDFPageObjMark_RemoveParam",3),t._FPDFPageObj_GetType=X("FPDFPageObj_GetType",1),t._FPDFPageObj_GetIsActive=X("FPDFPageObj_GetIsActive",2),t._FPDFPageObj_SetIsActive=X("FPDFPageObj_SetIsActive",2),t._FPDFPage_GenerateContent=X("FPDFPage_GenerateContent",1),t._FPDFPageObj_Transform=X("FPDFPageObj_Transform",7),t._FPDFPageObj_TransformF=X("FPDFPageObj_TransformF",2),t._FPDFPageObj_GetMatrix=X("FPDFPageObj_GetMatrix",2),t._FPDFPageObj_SetMatrix=X("FPDFPageObj_SetMatrix",2),t._FPDFPageObj_SetBlendMode=X("FPDFPageObj_SetBlendMode",2),t._FPDFPage_TransformAnnots=X("FPDFPage_TransformAnnots",7),t._FPDFPage_SetRotation=X("FPDFPage_SetRotation",2),t._FPDFPageObj_SetFillColor=X("FPDFPageObj_SetFillColor",5),t._FPDFPageObj_GetFillColor=X("FPDFPageObj_GetFillColor",5),t._FPDFPageObj_GetBounds=X("FPDFPageObj_GetBounds",5),t._FPDFPageObj_GetRotatedBounds=X("FPDFPageObj_GetRotatedBounds",2),t._FPDFPageObj_SetStrokeColor=X("FPDFPageObj_SetStrokeColor",5),t._FPDFPageObj_GetStrokeColor=X("FPDFPageObj_GetStrokeColor",5),t._FPDFPageObj_SetStrokeWidth=X("FPDFPageObj_SetStrokeWidth",2),t._FPDFPageObj_GetStrokeWidth=X("FPDFPageObj_GetStrokeWidth",2),t._FPDFPageObj_GetLineJoin=X("FPDFPageObj_GetLineJoin",1),t._FPDFPageObj_SetLineJoin=X("FPDFPageObj_SetLineJoin",2),t._FPDFPageObj_GetLineCap=X("FPDFPageObj_GetLineCap",1),t._FPDFPageObj_SetLineCap=X("FPDFPageObj_SetLineCap",2),t._FPDFPageObj_GetDashPhase=X("FPDFPageObj_GetDashPhase",2),t._FPDFPageObj_SetDashPhase=X("FPDFPageObj_SetDashPhase",2),t._FPDFPageObj_GetDashCount=X("FPDFPageObj_GetDashCount",1),t._FPDFPageObj_GetDashArray=X("FPDFPageObj_GetDashArray",3),t._FPDFPageObj_SetDashArray=X("FPDFPageObj_SetDashArray",4),t._FPDFPageObj_GetRenderedStrokePattern=X("FPDFPageObj_GetRenderedStrokePattern",2),t._FPDFPageObj_GetRenderedFillPattern=X("FPDFPageObj_GetRenderedFillPattern",2),t._FPDFFormObj_CountObjects=X("FPDFFormObj_CountObjects",1),t._FPDFFormObj_GetObject=X("FPDFFormObj_GetObject",2),t._FPDFFormObj_RemoveObject=X("FPDFFormObj_RemoveObject",2),t._FPDFPageObj_CreateNewPath=X("FPDFPageObj_CreateNewPath",2),t._FPDFPageObj_CreateNewRect=X("FPDFPageObj_CreateNewRect",4),t._FPDFPath_CountSegments=X("FPDFPath_CountSegments",1),t._FPDFPath_GetPathSegment=X("FPDFPath_GetPathSegment",2),t._FPDFPath_MoveTo=X("FPDFPath_MoveTo",3),t._FPDFPath_LineTo=X("FPDFPath_LineTo",3),t._FPDFPath_BezierTo=X("FPDFPath_BezierTo",7),t._FPDFPath_GetBezierControlPoints=X("FPDFPath_GetBezierControlPoints",4),t._FPDFPath_Close=X("FPDFPath_Close",1),t._FPDFPath_SetDrawMode=X("FPDFPath_SetDrawMode",3),t._FPDFPath_GetDrawMode=X("FPDFPath_GetDrawMode",3),t._FPDFPathSegment_GetPoint=X("FPDFPathSegment_GetPoint",3),t._FPDFPathSegment_GetType=X("FPDFPathSegment_GetType",1),t._FPDFPathSegment_GetClose=X("FPDFPathSegment_GetClose",1),t._FPDFPageObj_NewTextObj=X("FPDFPageObj_NewTextObj",3),t._FPDFText_SetText=X("FPDFText_SetText",2),t._FPDFText_SetCharcodes=X("FPDFText_SetCharcodes",3),t._FPDFText_SetPositions=X("FPDFText_SetPositions",3),t._FPDFText_LoadFont=X("FPDFText_LoadFont",5),t._FPDFText_LoadStandardFont=X("FPDFText_LoadStandardFont",2),t._FPDFText_LoadCidType2Font=X("FPDFText_LoadCidType2Font",6),t._FPDFTextObj_GetFontSize=X("FPDFTextObj_GetFontSize",2),t._FPDFTextObj_SetFontSize=X("FPDFTextObj_SetFontSize",2),t._FPDFTextObj_GetText=X("FPDFTextObj_GetText",4),t._FPDFTextObj_GetRenderedBitmap=X("FPDFTextObj_GetRenderedBitmap",4),t._FPDFFont_Close=X("FPDFFont_Close",1),t._FPDFPageObj_CreateTextObj=X("FPDFPageObj_CreateTextObj",3),t._FPDFTextObj_GetTextRenderMode=X("FPDFTextObj_GetTextRenderMode",1),t._FPDFTextObj_SetTextRenderMode=X("FPDFTextObj_SetTextRenderMode",2),t._FPDFTextObj_GetFont=X("FPDFTextObj_GetFont",1),t._FPDFFont_GetBaseFontName=X("FPDFFont_GetBaseFontName",3),t._FPDFFont_GetFamilyName=X("FPDFFont_GetFamilyName",3),t._FPDFFont_GetFontData=X("FPDFFont_GetFontData",4),t._FPDFFont_GetIsEmbedded=X("FPDFFont_GetIsEmbedded",1),t._FPDFFont_GetFlags=X("FPDFFont_GetFlags",1),t._FPDFFont_GetWeight=X("FPDFFont_GetWeight",1),t._FPDFFont_GetItalicAngle=X("FPDFFont_GetItalicAngle",2),t._FPDFFont_GetAscent=X("FPDFFont_GetAscent",3),t._FPDFFont_GetDescent=X("FPDFFont_GetDescent",3),t._FPDFFont_GetGlyphWidth=X("FPDFFont_GetGlyphWidth",4),t._FPDFFont_GetGlyphPath=X("FPDFFont_GetGlyphPath",3),t._FPDFGlyphPath_CountGlyphSegments=X("FPDFGlyphPath_CountGlyphSegments",1),t._FPDFGlyphPath_GetGlyphPathSegment=X("FPDFGlyphPath_GetGlyphPathSegment",2),t._EPDFText_RedactInRect=X("EPDFText_RedactInRect",4),t._EPDFText_RedactInQuads=X("EPDFText_RedactInQuads",5),t._FPDFDoc_GetPageMode=X("FPDFDoc_GetPageMode",1),t._FPDFPage_Flatten=X("FPDFPage_Flatten",2),t._FPDFPage_HasFormFieldAtPoint=X("FPDFPage_HasFormFieldAtPoint",4),t._FPDFPage_FormFieldZOrderAtPoint=X("FPDFPage_FormFieldZOrderAtPoint",4),t._FPDFDOC_InitFormFillEnvironment=X("FPDFDOC_InitFormFillEnvironment",2),t._FPDFDOC_ExitFormFillEnvironment=X("FPDFDOC_ExitFormFillEnvironment",1),t._FORM_OnMouseMove=X("FORM_OnMouseMove",5),t._FORM_OnMouseWheel=X("FORM_OnMouseWheel",6),t._FORM_OnFocus=X("FORM_OnFocus",5),t._FORM_OnLButtonDown=X("FORM_OnLButtonDown",5),t._FORM_OnLButtonUp=X("FORM_OnLButtonUp",5),t._FORM_OnLButtonDoubleClick=X("FORM_OnLButtonDoubleClick",5),t._FORM_OnRButtonDown=X("FORM_OnRButtonDown",5),t._FORM_OnRButtonUp=X("FORM_OnRButtonUp",5),t._FORM_OnKeyDown=X("FORM_OnKeyDown",4),t._FORM_OnKeyUp=X("FORM_OnKeyUp",4),t._FORM_OnChar=X("FORM_OnChar",4),t._FORM_GetFocusedText=X("FORM_GetFocusedText",4),t._FORM_GetSelectedText=X("FORM_GetSelectedText",4),t._FORM_ReplaceAndKeepSelection=X("FORM_ReplaceAndKeepSelection",3),t._FORM_ReplaceSelection=X("FORM_ReplaceSelection",3),t._FORM_SelectAllText=X("FORM_SelectAllText",2),t._FORM_CanUndo=X("FORM_CanUndo",2),t._FORM_CanRedo=X("FORM_CanRedo",2),t._FORM_Undo=X("FORM_Undo",2),t._FORM_Redo=X("FORM_Redo",2),t._FORM_ForceToKillFocus=X("FORM_ForceToKillFocus",1),t._FORM_GetFocusedAnnot=X("FORM_GetFocusedAnnot",3),t._FORM_SetFocusedAnnot=X("FORM_SetFocusedAnnot",2),t._FPDF_FFLDraw=X("FPDF_FFLDraw",9),t._FPDF_SetFormFieldHighlightColor=X("FPDF_SetFormFieldHighlightColor",3),t._FPDF_SetFormFieldHighlightAlpha=X("FPDF_SetFormFieldHighlightAlpha",2),t._FPDF_RemoveFormFieldHighlight=X("FPDF_RemoveFormFieldHighlight",1),t._FORM_OnAfterLoadPage=X("FORM_OnAfterLoadPage",2),t._FORM_OnBeforeClosePage=X("FORM_OnBeforeClosePage",2),t._FORM_DoDocumentJSAction=X("FORM_DoDocumentJSAction",1),t._FORM_DoDocumentOpenAction=X("FORM_DoDocumentOpenAction",1),t._FORM_DoDocumentAAction=X("FORM_DoDocumentAAction",2),t._FORM_DoPageAAction=X("FORM_DoPageAAction",3),t._FORM_SetIndexSelected=X("FORM_SetIndexSelected",4),t._FORM_IsIndexSelected=X("FORM_IsIndexSelected",3),t._FORM_GetTextDirection=X("FORM_GetTextDirection",2),t._FORM_SetTextDirection=X("FORM_SetTextDirection",3),t._FPDFDoc_GetJavaScriptActionCount=X("FPDFDoc_GetJavaScriptActionCount",1),t._FPDFDoc_GetJavaScriptAction=X("FPDFDoc_GetJavaScriptAction",2),t._EPDFDoc_GetNamedJavaScriptActionModel=X("EPDFDoc_GetNamedJavaScriptActionModel",2),t._FPDFDoc_CloseJavaScriptAction=X("FPDFDoc_CloseJavaScriptAction",1),t._FPDFJavaScriptAction_GetName=X("FPDFJavaScriptAction_GetName",3),t._FPDFJavaScriptAction_GetScript=X("FPDFJavaScriptAction_GetScript",3),t._FPDF_ImportPagesByIndex=X("FPDF_ImportPagesByIndex",5),t._FPDF_ImportPages=X("FPDF_ImportPages",4),t._FPDF_ImportNPagesToOne=X("FPDF_ImportNPagesToOne",5),t._FPDF_NewXObjectFromPage=X("FPDF_NewXObjectFromPage",3),t._FPDF_CloseXObject=X("FPDF_CloseXObject",1),t._FPDF_NewFormObjectFromXObject=X("FPDF_NewFormObjectFromXObject",1),t._FPDF_CopyViewerPreferences=X("FPDF_CopyViewerPreferences",2),t._FPDF_RenderPageBitmapWithColorScheme_Start=X("FPDF_RenderPageBitmapWithColorScheme_Start",10),t._FPDF_RenderPageBitmap_Start=X("FPDF_RenderPageBitmap_Start",9),t._FPDF_RenderPage_Continue=X("FPDF_RenderPage_Continue",2),t._FPDF_RenderPage_Close=X("FPDF_RenderPage_Close",1),t._EPDF_RenderPageBitmapWithMatrix_Start=X("EPDF_RenderPageBitmapWithMatrix_Start",6),t._EPDF_RenderPage_Continue=X("EPDF_RenderPage_Continue",2),t._EPDF_FreeBuffer=X("EPDF_FreeBuffer",1),t._FPDF_SaveAsCopy=X("FPDF_SaveAsCopy",3),t._FPDF_SaveWithVersion=X("FPDF_SaveWithVersion",4),t._EPDF_SaveDocumentToOwnedBuffer=X("EPDF_SaveDocumentToOwnedBuffer",3),t._EPDF_SaveDocumentToOwnedBufferWithVersion=X("EPDF_SaveDocumentToOwnedBufferWithVersion",4),t._EPDF_SaveDocumentToOwnedBufferEx=X("EPDF_SaveDocumentToOwnedBufferEx",5),t._EPDF_SaveAsCopyEx=X("EPDF_SaveAsCopyEx",4),t._FPDFText_GetCharIndexFromTextIndex=X("FPDFText_GetCharIndexFromTextIndex",2),t._FPDFText_GetTextIndexFromCharIndex=X("FPDFText_GetTextIndexFromCharIndex",2),t._FPDF_GetSignatureCount=X("FPDF_GetSignatureCount",1),t._FPDF_GetSignatureObject=X("FPDF_GetSignatureObject",2),t._FPDFSignatureObj_GetContents=X("FPDFSignatureObj_GetContents",3),t._FPDFSignatureObj_GetByteRange=X("FPDFSignatureObj_GetByteRange",3),t._FPDFSignatureObj_GetSubFilter=X("FPDFSignatureObj_GetSubFilter",3),t._FPDFSignatureObj_GetReason=X("FPDFSignatureObj_GetReason",3),t._FPDFSignatureObj_GetTime=X("FPDFSignatureObj_GetTime",3),t._FPDFSignatureObj_GetDocMDPPermission=X("FPDFSignatureObj_GetDocMDPPermission",1),t._FPDF_StructTree_GetForPage=X("FPDF_StructTree_GetForPage",1),t._FPDF_StructTree_Close=X("FPDF_StructTree_Close",1),t._FPDF_StructTree_CountChildren=X("FPDF_StructTree_CountChildren",1),t._FPDF_StructTree_GetChildAtIndex=X("FPDF_StructTree_GetChildAtIndex",2),t._FPDF_StructElement_GetAltText=X("FPDF_StructElement_GetAltText",3),t._FPDF_StructElement_GetActualText=X("FPDF_StructElement_GetActualText",3),t._FPDF_StructElement_GetExpansion=X("FPDF_StructElement_GetExpansion",3),t._FPDF_StructElement_GetID=X("FPDF_StructElement_GetID",3),t._FPDF_StructElement_GetLang=X("FPDF_StructElement_GetLang",3),t._FPDF_StructElement_GetAttributeCount=X("FPDF_StructElement_GetAttributeCount",1),t._FPDF_StructElement_GetAttributeAtIndex=X("FPDF_StructElement_GetAttributeAtIndex",2),t._FPDF_StructElement_GetStringAttribute=X("FPDF_StructElement_GetStringAttribute",4),t._FPDF_StructElement_GetMarkedContentID=X("FPDF_StructElement_GetMarkedContentID",1),t._FPDF_StructElement_GetRawType=X("FPDF_StructElement_GetRawType",3),t._FPDF_StructElement_GetType=X("FPDF_StructElement_GetType",3),t._FPDF_StructElement_GetObjType=X("FPDF_StructElement_GetObjType",3),t._FPDF_StructElement_GetTitle=X("FPDF_StructElement_GetTitle",3),t._FPDF_StructElement_CountChildren=X("FPDF_StructElement_CountChildren",1),t._FPDF_StructElement_GetChildAtIndex=X("FPDF_StructElement_GetChildAtIndex",2),t._FPDF_StructElement_GetChildMarkedContentID=X("FPDF_StructElement_GetChildMarkedContentID",2),t._FPDF_StructElement_GetParent=X("FPDF_StructElement_GetParent",1),t._FPDF_StructElement_Attr_GetCount=X("FPDF_StructElement_Attr_GetCount",1),t._FPDF_StructElement_Attr_GetName=X("FPDF_StructElement_Attr_GetName",5),t._FPDF_StructElement_Attr_GetValue=X("FPDF_StructElement_Attr_GetValue",2),t._FPDF_StructElement_Attr_GetType=X("FPDF_StructElement_Attr_GetType",1),t._FPDF_StructElement_Attr_GetBooleanValue=X("FPDF_StructElement_Attr_GetBooleanValue",2),t._FPDF_StructElement_Attr_GetNumberValue=X("FPDF_StructElement_Attr_GetNumberValue",2),t._FPDF_StructElement_Attr_GetStringValue=X("FPDF_StructElement_Attr_GetStringValue",4),t._FPDF_StructElement_Attr_GetBlobValue=X("FPDF_StructElement_Attr_GetBlobValue",4),t._FPDF_StructElement_Attr_CountChildren=X("FPDF_StructElement_Attr_CountChildren",1),t._FPDF_StructElement_Attr_GetChildAtIndex=X("FPDF_StructElement_Attr_GetChildAtIndex",2),t._FPDF_StructElement_GetMarkedContentIdCount=X("FPDF_StructElement_GetMarkedContentIdCount",1),t._FPDF_StructElement_GetMarkedContentIdAtIndex=X("FPDF_StructElement_GetMarkedContentIdAtIndex",2),t._FPDF_AddInstalledFont=X("FPDF_AddInstalledFont",3),t._FPDF_SetSystemFontInfo=X("FPDF_SetSystemFontInfo",1),t._FPDF_GetDefaultTTFMap=X("FPDF_GetDefaultTTFMap",0),t._FPDF_GetDefaultTTFMapCount=X("FPDF_GetDefaultTTFMapCount",0),t._FPDF_GetDefaultTTFMapEntry=X("FPDF_GetDefaultTTFMapEntry",1),t._FPDF_GetDefaultSystemFontInfo=X("FPDF_GetDefaultSystemFontInfo",0),t._FPDF_FreeDefaultSystemFontInfo=X("FPDF_FreeDefaultSystemFontInfo",1),t._FPDFText_LoadPage=X("FPDFText_LoadPage",1),t._FPDFText_ClosePage=X("FPDFText_ClosePage",1),t._FPDFText_CountChars=X("FPDFText_CountChars",1),t._FPDFText_GetUnicode=X("FPDFText_GetUnicode",2),t._FPDFText_GetTextObject=X("FPDFText_GetTextObject",2),t._FPDFText_IsGenerated=X("FPDFText_IsGenerated",2),t._FPDFText_IsHyphen=X("FPDFText_IsHyphen",2),t._FPDFText_HasUnicodeMapError=X("FPDFText_HasUnicodeMapError",2),t._FPDFText_GetFontSize=X("FPDFText_GetFontSize",2),t._FPDFText_GetFontInfo=X("FPDFText_GetFontInfo",5),t._FPDFText_GetFontWeight=X("FPDFText_GetFontWeight",2),t._FPDFText_GetFillColor=X("FPDFText_GetFillColor",6),t._FPDFText_GetStrokeColor=X("FPDFText_GetStrokeColor",6),t._FPDFText_GetCharAngle=X("FPDFText_GetCharAngle",2),t._FPDFText_GetCharBox=X("FPDFText_GetCharBox",6),t._FPDFText_GetLooseCharBox=X("FPDFText_GetLooseCharBox",3),t._EPDFText_GetCharGeometry=X("EPDFText_GetCharGeometry",3),t._EPDFText_GetPageGeometry=X("EPDFText_GetPageGeometry",4),t._EPDFText_GetTextFull=X("EPDFText_GetTextFull",3),t._EPDFText_GetCharToTextMap=X("EPDFText_GetCharToTextMap",3),t._FPDFText_GetMatrix=X("FPDFText_GetMatrix",3),t._FPDFText_GetCharOrigin=X("FPDFText_GetCharOrigin",4),t._FPDFText_GetCharIndexAtPos=X("FPDFText_GetCharIndexAtPos",5),t._FPDFText_GetText=X("FPDFText_GetText",4),t._FPDFText_CountRects=X("FPDFText_CountRects",3),t._FPDFText_GetRect=X("FPDFText_GetRect",6),t._FPDFText_GetBoundedText=X("FPDFText_GetBoundedText",7),t._FPDFText_FindStart=X("FPDFText_FindStart",4),t._FPDFText_FindNext=X("FPDFText_FindNext",1),t._FPDFText_FindPrev=X("FPDFText_FindPrev",1),t._FPDFText_GetSchResultIndex=X("FPDFText_GetSchResultIndex",1),t._FPDFText_GetSchCount=X("FPDFText_GetSchCount",1),t._FPDFText_FindClose=X("FPDFText_FindClose",1),t._FPDFLink_LoadWebLinks=X("FPDFLink_LoadWebLinks",1),t._FPDFLink_CountWebLinks=X("FPDFLink_CountWebLinks",1),t._FPDFLink_GetURL=X("FPDFLink_GetURL",4),t._FPDFLink_CountRects=X("FPDFLink_CountRects",2),t._FPDFLink_GetRect=X("FPDFLink_GetRect",7),t._FPDFLink_GetTextRange=X("FPDFLink_GetTextRange",4),t._FPDFLink_CloseWebLinks=X("FPDFLink_CloseWebLinks",1),t._FPDFPage_GetDecodedThumbnailData=X("FPDFPage_GetDecodedThumbnailData",3),t._FPDFPage_GetRawThumbnailData=X("FPDFPage_GetRawThumbnailData",3),t._FPDFPage_GetThumbnailAsBitmap=X("FPDFPage_GetThumbnailAsBitmap",1),t._FPDFPage_SetMediaBox=X("FPDFPage_SetMediaBox",5),t._FPDFPage_SetCropBox=X("FPDFPage_SetCropBox",5),t._FPDFPage_SetBleedBox=X("FPDFPage_SetBleedBox",5),t._FPDFPage_SetTrimBox=X("FPDFPage_SetTrimBox",5),t._FPDFPage_SetArtBox=X("FPDFPage_SetArtBox",5),t._FPDFPage_GetMediaBox=X("FPDFPage_GetMediaBox",5),t._FPDFPage_GetCropBox=X("FPDFPage_GetCropBox",5),t._FPDFPage_GetBleedBox=X("FPDFPage_GetBleedBox",5),t._FPDFPage_GetTrimBox=X("FPDFPage_GetTrimBox",5),t._FPDFPage_GetArtBox=X("FPDFPage_GetArtBox",5),t._FPDFPage_TransFormWithClip=X("FPDFPage_TransFormWithClip",3),t._FPDFPageObj_TransformClipPath=X("FPDFPageObj_TransformClipPath",7),t._FPDFPageObj_GetClipPath=X("FPDFPageObj_GetClipPath",1),t._FPDFClipPath_CountPaths=X("FPDFClipPath_CountPaths",1),t._FPDFClipPath_CountPathSegments=X("FPDFClipPath_CountPathSegments",2),t._FPDFClipPath_GetPathSegment=X("FPDFClipPath_GetPathSegment",3),t._FPDF_CreateClipPath=X("FPDF_CreateClipPath",4),t._FPDF_DestroyClipPath=X("FPDF_DestroyClipPath",1),t._FPDFPage_InsertClipPath=X("FPDFPage_InsertClipPath",2),t._FPDF_InitLibrary=X("FPDF_InitLibrary",0),t._FPDF_InitLibraryWithConfig=X("FPDF_InitLibraryWithConfig",1),t._FPDF_DestroyLibrary=X("FPDF_DestroyLibrary",0),t._FPDF_SetSandBoxPolicy=X("FPDF_SetSandBoxPolicy",2),t._FPDF_LoadDocument=X("FPDF_LoadDocument",2),t._FPDF_GetFormType=X("FPDF_GetFormType",1),t._FPDF_LoadXFA=X("FPDF_LoadXFA",1),t._FPDF_LoadMemDocument=X("FPDF_LoadMemDocument",3),t._FPDF_LoadMemDocument64=X("FPDF_LoadMemDocument64",3),t._FPDF_LoadCustomDocument=X("FPDF_LoadCustomDocument",2),t._FPDF_GetFileVersion=X("FPDF_GetFileVersion",2),t._FPDF_DocumentHasValidCrossReferenceTable=X("FPDF_DocumentHasValidCrossReferenceTable",1),t._FPDF_GetDocPermissions=X("FPDF_GetDocPermissions",1),t._FPDF_GetDocUserPermissions=X("FPDF_GetDocUserPermissions",1),t._FPDF_GetSecurityHandlerRevision=X("FPDF_GetSecurityHandlerRevision",1),t._EPDF_SetEncryption=X("EPDF_SetEncryption",4),t._EPDF_RemoveEncryption=X("EPDF_RemoveEncryption",1),t._EPDF_UnlockOwnerPermissions=X("EPDF_UnlockOwnerPermissions",2),t._EPDF_CheckPasswordPermissions=X("EPDF_CheckPasswordPermissions",6),t._EPDF_SetRuntimeOwnerPermissions=X("EPDF_SetRuntimeOwnerPermissions",2),t._EPDF_IsEncrypted=X("EPDF_IsEncrypted",1),t._EPDF_IsOwnerUnlocked=X("EPDF_IsOwnerUnlocked",1),t._FPDF_GetPageCount=X("FPDF_GetPageCount",1),t._FPDF_LoadPage=X("FPDF_LoadPage",2),t._EPDFDoc_LoadPageByObjectNumber=X("EPDFDoc_LoadPageByObjectNumber",2),t._EPDFDoc_LoadPageByObjectNumberNormalized=X("EPDFDoc_LoadPageByObjectNumberNormalized",2),t._EPDFDoc_GetPageObjectNumberByIndex=X("EPDFDoc_GetPageObjectNumberByIndex",2),t._EPDFDoc_DeletePageByObjectNumber=X("EPDFDoc_DeletePageByObjectNumber",2),t._EPDFDoc_SetPageRotationByObjectNumber=X("EPDFDoc_SetPageRotationByObjectNumber",3),t._EPDFDoc_StartLoadPageByObjectNumber=X("EPDFDoc_StartLoadPageByObjectNumber",3),t._EPDFPage_ContinueLoad=X("EPDFPage_ContinueLoad",2),t._EPDFPage_GetObjectNumber=X("EPDFPage_GetObjectNumber",1),t._FPDF_GetPageWidthF=X("FPDF_GetPageWidthF",1),t._FPDF_GetPageWidth=X("FPDF_GetPageWidth",1),t._FPDF_GetPageHeightF=X("FPDF_GetPageHeightF",1),t._FPDF_GetPageHeight=X("FPDF_GetPageHeight",1),t._FPDF_GetPageBoundingBox=X("FPDF_GetPageBoundingBox",2),t._FPDF_RenderPageBitmap=X("FPDF_RenderPageBitmap",8),t._FPDF_RenderPageBitmapWithMatrix=X("FPDF_RenderPageBitmapWithMatrix",5),t._EPDF_RenderAnnotBitmap=X("EPDF_RenderAnnotBitmap",7),t._EPDF_RenderAnnotBitmapUnrotated=X("EPDF_RenderAnnotBitmapUnrotated",9),t._EPDF_SetDecodedImageBudget=X("EPDF_SetDecodedImageBudget",1),t._EPDF_GetDecodedImageBytes=X("EPDF_GetDecodedImageBytes",0),t._EPDFPage_ResetRenderCache=X("EPDFPage_ResetRenderCache",1),t._FPDF_ClosePage=X("FPDF_ClosePage",1),t._FPDF_CloseDocument=X("FPDF_CloseDocument",1),t._FPDF_GetLastError=X("FPDF_GetLastError",0),t._FPDF_DeviceToPage=X("FPDF_DeviceToPage",10),t._FPDF_PageToDevice=X("FPDF_PageToDevice",10),t._FPDFBitmap_Create=X("FPDFBitmap_Create",3),t._FPDFBitmap_CreateEx=X("FPDFBitmap_CreateEx",5),t._FPDFBitmap_GetFormat=X("FPDFBitmap_GetFormat",1),t._FPDFBitmap_FillRect=X("FPDFBitmap_FillRect",6),t._FPDFBitmap_GetBuffer=X("FPDFBitmap_GetBuffer",1),t._FPDFBitmap_GetWidth=X("FPDFBitmap_GetWidth",1),t._FPDFBitmap_GetHeight=X("FPDFBitmap_GetHeight",1),t._FPDFBitmap_GetStride=X("FPDFBitmap_GetStride",1),t._FPDFBitmap_Destroy=X("FPDFBitmap_Destroy",1),t._FPDF_GetPageSizeByIndexF=X("FPDF_GetPageSizeByIndexF",3),t._EPDF_GetPageRotateByIndex=X("EPDF_GetPageRotateByIndex",3),t._EPDF_GetPageTabOrderByIndex=X("EPDF_GetPageTabOrderByIndex",4),t._EPDF_GetPageBoxByIndex=X("EPDF_GetPageBoxByIndex",4),t._EPDF_GetPageUserUnitByIndex=X("EPDF_GetPageUserUnitByIndex",3),t._EPDF_LoadPageNormalized=X("EPDF_LoadPageNormalized",3),t._FPDF_GetPageSizeByIndex=X("FPDF_GetPageSizeByIndex",4),t._FPDF_VIEWERREF_GetPrintScaling=X("FPDF_VIEWERREF_GetPrintScaling",1),t._FPDF_VIEWERREF_GetNumCopies=X("FPDF_VIEWERREF_GetNumCopies",1),t._FPDF_VIEWERREF_GetPrintPageRange=X("FPDF_VIEWERREF_GetPrintPageRange",1),t._FPDF_VIEWERREF_GetPrintPageRangeCount=X("FPDF_VIEWERREF_GetPrintPageRangeCount",1),t._FPDF_VIEWERREF_GetPrintPageRangeElement=X("FPDF_VIEWERREF_GetPrintPageRangeElement",2),t._FPDF_VIEWERREF_GetDuplex=X("FPDF_VIEWERREF_GetDuplex",1),t._FPDF_VIEWERREF_GetName=X("FPDF_VIEWERREF_GetName",4),t._FPDF_CountNamedDests=X("FPDF_CountNamedDests",1),t._FPDF_GetNamedDestByName=X("FPDF_GetNamedDestByName",2),t._FPDF_GetNamedDest=X("FPDF_GetNamedDest",4),t._FPDF_GetXFAPacketCount=X("FPDF_GetXFAPacketCount",1),t._FPDF_GetXFAPacketName=X("FPDF_GetXFAPacketName",4),t._FPDF_GetXFAPacketContent=X("FPDF_GetXFAPacketContent",5),t._FPDF_GetTrailerEnds=X("FPDF_GetTrailerEnds",3);var eJ=X("fflush",1),eQ=X("strerror",1),eX=X("emscripten_builtin_memalign",2);t._malloc=X("malloc",1),t._free=X("free",1);var eY=X("setThrew",2);X("_emscripten_tempret_set",1);var e0=()=>(e0=eZ.emscripten_stack_init)(),e1=()=>(e1=eZ.emscripten_stack_get_end)(),e3=e=>(e3=eZ._emscripten_stack_restore)(e),e2=e=>(e2=eZ._emscripten_stack_alloc)(e),e6=()=>(e6=eZ.emscripten_stack_get_current)();function e5(){var e,r;if(!(U>0)){if(e0(),M((3&(e=e1()))==0),0==e&&(e+=4),f[e>>>2>>>0]=0x2135467,f[e+4>>>2>>>0]=0x89bacdfe,f[0]=0x63736d65,t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)r=t.preRun.shift(),B.unshift(r);eu(B),U>0||(t.setStatus?(t.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>t.setStatus(""),1),i()},1)):i(),T())}function i(){if(!D&&(D=!0,t.calledRun=!0,!j)){if(M(!z),z=!0,T(),t.noFSInit||eN.initialized||eN.init(),eN.ignorePermissions=!1,ev.init(),eu(L),n(t),t.onRuntimeInitialized?.(),M(!t._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),T(),t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;){var e;e=t.postRun.shift(),$.unshift(e)}eu($)}}}if(t.dynCall_jiji=X("dynCall_jiji",5),t.dynCall_iiiiij=X("dynCall_iiiiij",7),t.dynCall_iiiiijj=X("dynCall_iiiiijj",9),t.dynCall_iiiiiijj=X("dynCall_iiiiiijj",10),t.dynCall_viijii=X("dynCall_viijii",7),t.dynCall_ji=X("dynCall_ji",2),t.dynCall_iiij=X("dynCall_iiij",5),t.dynCall_j=X("dynCall_j",1),t.dynCall_iji=X("dynCall_iji",4),t.dynCall_jji=X("dynCall_jji",4),t.dynCall_iiji=X("dynCall_iiji",5),t.dynCall_viijj=X("dynCall_viijj",7),t.dynCall_jij=X("dynCall_jij",4),t.dynCall_iij=X("dynCall_iij",4),t.dynCall_viji=X("dynCall_viji",5),t.wasmExports=eZ,t.ccall=eH,t.cwrap=(e,t,n,r)=>(...i)=>eH(e,t,n,i,r),t.addFunction=(e,t)=>{M(void 0!==e);var n=(e=>{if(!P){P=new WeakMap;var t=_.length;if(P)for(var n=0;n<0+t;n++){var r=ez(n);r&&P.set(r,n)}}return P.get(e)||0})(e);if(n)return n;var r=(()=>{if(eW.length)return eW.pop();try{_.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return _.length-1})();try{eq(r,e)}catch(n){if(!(n instanceof TypeError))throw n;M(void 0!==t,"Missing signature argument to addFunction: "+e),eq(r,((e,t)=>{if(M(!t.includes("j"),"i64 not permitted in function signatures when WASM_BIGINT is disabled"),"function"==typeof WebAssembly.Function)return new WebAssembly.Function((e=>{M(!e.includes("j"),"i64 not permitted in function signatures when WASM_BIGINT is disabled");for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},n={parameters:[],results:"v"==e[0]?[]:[t[e[0]]]},r=1;r{P.delete(ez(e)),eq(e,null),eW.push(e)},t.setValue=function(e,t,n="i8"){switch(n.endsWith("*")&&(n="*"),n){case"i1":case"i8":s[e>>>0]=t;break;case"i16":u[e>>>1>>>0]=t;break;case"i32":c[e>>>2>>>0]=t;break;case"i64":J("to do setValue(i64) use WASM_BIGINT");case"float":m[e>>>2>>>0]=t;break;case"double":p[e>>>3>>>0]=t;break;case"*":f[e>>>2>>>0]=t;break;default:J(`invalid type for setValue: ${n}`)}},t.getValue=function(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":case"i8":return s[e>>>0];case"i16":return u[e>>>1>>>0];case"i32":return c[e>>>2>>>0];case"i64":J("to do getValue(i64) use WASM_BIGINT");case"float":return m[e>>>2>>>0];case"double":return p[e>>>3>>>0];case"*":return f[e>>>2>>>0];default:J(`invalid type for getValue: ${t}`)}},t.UTF8ToString=eg,t.stringToUTF8=ej,t.UTF16ToString=(e,t)=>{M(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var n=e,r=n>>1,i=r+t/2;!(r>=i)&&d[r>>>0];)++r;if((n=r<<1)-e>32&&eU)return eU.decode(l.subarray(e>>>0,n>>>0));for(var o="",a=0;!(a>=t/2);++a){var s=u[e+2*a>>>1>>>0];if(0==s)break;o+=String.fromCharCode(s)}return o},t.stringToUTF16=(e,t,n)=>{if(M(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),M("number"==typeof n,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),n??(n=0x7fffffff),n<2)return 0;for(var r=t,i=(n-=2)<2*e.length?n/2:e.length,o=0;o>>1>>>0]=a,t+=2}return u[t>>>1>>>0]=0,t-r},["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertU32PairToI53","getTempRet0","setTempRet0","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","emscriptenLog","readEmAsmArgs","jstoi_q","listenOnce","autoResumeAudioContext","dynCallLegacy","getDynCaller","dynCall","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","asmjsMangle","HandleAllocator","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","getCallstack","convertPCtoSourceLocation","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","safeSetTimeout","setImmediateWrapped","safeRequestAnimationFrame","clearImmediateWrapped","polyfillSetImmediate","registerPostMainLoop","registerPreMainLoop","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","Browser_asyncPrepareDataCounter","arraySum","addDays","getSocketFromFD","getSocketAddress","FS_unlink","FS_mkdirTree","_setNetworkCallback","heapObjectForWebGLType","toTypedArrayIndex","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","webgl_enable_EXT_polygon_offset_clamp","webgl_enable_EXT_clip_control","webgl_enable_WEBGL_polygon_mode","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","setErrNo","demangle","stackTrace"].forEach(function(e){eo(e,()=>{var t=`\`${e}\` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line`,n=e;n.startsWith("_")||(n="$"+e),t+=` (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='${n}')`,ei(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),em(t)}),es(e)}),["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","out","err","callMain","abort","wasmMemory","writeStackCookie","checkStackCookie","convertI32PairToI53Checked","stackSave","stackRestore","stackAlloc","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","ERRNO_CODES","strError","DNS","Protocols","Sockets","timers","warnOnce","readEmAsmArgsArray","jstoi_s","getExecutableName","keepRuntimeAlive","asyncLoad","alignMemory","mmapAlloc","wasmTable","noExitRuntime","getCFunc","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","freeTableIndexes","functionsInTableMap","getEmptyTableSlot","updateTableMap","getFunctionAddress","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","stringToUTF8Array","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","stringToUTF8OnStack","writeArrayToMemory","JSEvents","specialHTMLTargets","findCanvasEventTarget","currentFullscreenStrategy","restoreOldWindowedStyle","UNWIND_CACHE","ExitStatus","getEnvStrings","doReadv","doWritev","initRandomFill","randomFill","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","getPreloadedImageData__data","wget","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","FS_createPath","FS_createDevice","FS_readFile","FS","FS_createDataFile","FS_createLazyFile","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack","print","printErr"].forEach(es),W=function e(){D||e5(),D||(W=e)},t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();for(let e of(e5(),Object.keys(t)))e in t||Object.defineProperty(t,e,{configurable:!0,get(){J(`Access to module property ('${e}') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.`)}});return y}}},function(){if(r)throw r[0];try{return t&&(n=(0,t[E(t)[0]])(t=0)),n}catch(e){throw r=[e],e}}),G={Unknown:"Unknown",InvalidArg:"InvalidArg",DocNotOpen:"DocNotOpen",DocOpenFailed:"DocOpenFailed",DocPasswordRequired:"DocPasswordRequired",DocPasswordIncorrect:"DocPasswordIncorrect",GrantPassphraseRequired:"GrantPassphraseRequired",Aborted:"Aborted",Network:"Network",Unauthenticated:"Unauthenticated",Forbidden:"Forbidden",NotFound:"NotFound",WireFormat:"WireFormat",RuntimeUnavailable:"RuntimeUnavailable",LayerVersionConflict:"LayerVersionConflict",NotImplemented:"NotImplemented",MalformedPdf:"MalformedPdf",SigningPending:"SigningPending",SigningExpired:"SigningExpired",SigningVersionMismatch:"SigningVersionMismatch",SignatureRefused:"SignatureRefused",ProtectedDocument:"ProtectedDocument",PayloadTooLarge:"PayloadTooLarge",ObjectNumberUnavailable:"ObjectNumberUnavailable",LayerFull:"LayerFull",ChangeConflict:"ChangeConflict",UndoUnavailable:"UndoUnavailable",IdempotencyKeyReused:"IdempotencyKeyReused",LayerDeleted:"LayerDeleted",VisitorIdentityRequired:"VisitorIdentityRequired",Conflict:"Conflict",EngineBusy:"EngineBusy",EngineRestarting:"EngineRestarting",DocumentQuarantined:"DocumentQuarantined",ThumbnailNotReady:"ThumbnailNotReady",TooManyRequests:"TooManyRequests",GrantExpired:"GrantExpired",OriginRequired:"OriginRequired",OriginNotAllowed:"OriginNotAllowed",FeatureNotEnabled:"FeatureNotEnabled",FeatureStopped:"FeatureStopped",LicenseInvalid:"LicenseInvalid",LicenseUsageLimit:"LicenseUsageLimit",UpstreamError:"UpstreamError"};function O(e){return(O="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)}function I(e,t,n){var r;return(r=function(e,t){if("object"!=O(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=O(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==O(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.values(G);var N=class e extends Error{constructor(e,t,n={}){super(t??e,void 0===n.cause?void 0:{cause:n.cause}),I(this,"name","EngineError"),I(this,"code",void 0),I(this,"details",void 0),this.code=e,this.details=n.details}static is(t,n){return(t instanceof e||t?.name==="EngineError")&&(void 0===n||t.code===n)}toJSON(){return{code:this.code,message:this.message,details:this.details}}};function C(e){return N.is(e)?e.toJSON():e instanceof Error?{code:"AbortError"===e.name?G.Aborted:G.Unknown,message:e.message}:{code:G.Unknown,message:String(e??"unknown error")}}var j=e=>{let t=t=>(e&1<[[1,e.exclude],[2,e.includeNoValueFields],[3,"html"===e.format],[4,"get"===e.method],[5,e.submitCoordinates],[6,"xfdf"===e.format],[7,e.includeAppendSaves],[8,e.includeAnnotations],[9,"pdf"===e.format],[10,e.canonicalFormat],[11,e.exclNonUserAnnots],[12,e.exclFKey],[14,e.embedForm]].reduce((e,[t,n])=>n?e|1<null!=e&&!("root"in e)&&R(e))}function B(e){return e.incomplete||!e.root?null:function e(t){let n=[];for(let r of t.next){let t=e(r);if(!t)return null;n.push(t)}let r=n.length>0?{next:n}:{};switch(t.type){case"javascript":return{type:"javascript",script:t.script,...r};case"goto":return{type:"goto",destination:t.destination,...r};case"uri":return{type:"uri",uri:t.uri,...r};case"named":return{type:"named",name:t.name,...r};case"hide":return{type:"hide",targets:t.targets,hide:t.hide,...r};case"reset-form":return{type:"reset-form",fields:t.fields,exclude:t.exclude,...r};case"submit-form":return t.payload?{...function(e){let{url:t,fields:n,charSet:r,...i}=e;return i}(t.payload),type:"submit-form",url:t.payload.url,fields:t.payload.fields,...r}:null;default:return null}}(e.root)}var L={javascript:"JavaScript",goto:"GoTo",uri:"URI",named:"Named",hide:"Hide","reset-form":"ResetForm","submit-form":"SubmitForm"};function $(e){return{root:function e(t){let n={subtype:L[t.type],next:(t.next??[]).map(e)};switch(t.type){case"javascript":return{type:"javascript",script:t.script,...n};case"goto":return{type:"goto",destination:t.destination,...n};case"uri":return{type:"uri",uri:t.uri,isMap:!1,...n};case"named":return{type:"named",name:t.name,...n};case"hide":return{type:"hide",targets:t.targets,hide:t.hide,...n};case"reset-form":return{type:"reset-form",fields:t.fields,exclude:t.exclude,...n};case"submit-form":return{type:"submit-form",payload:{url:t.url,fields:t.fields,...j(M(t))},...n}}}(e),incomplete:!1,warnings:[]}}var z=["activate","cursorEnter","cursorExit","mouseDown","mouseUp","focus","blur","pageOpen","pageClose","pageVisible","pageInvisible"];function U(e){let t=B(e);return t&&V(t)?t:null}function V(e){return"javascript"===e.type&&(e.next??[]).every(V)}function W(e){return"number"==typeof e&&Number.isInteger(e)&&e>0}function q(e){return{kind:"objectNumber",objectNumber:e}}function H(e){if(!W(e.objectNumber))throw RangeError(`encodePageKey: objectNumber must be a positive integer, got ${e.objectNumber}`);return`obj:${e.objectNumber}`}function K(e){switch(e.kind){case"objectNumber":return`obj:${e.objectNumber}`;case"baseIndex":return`base:${e.page.objectNumber}:${e.baseIndex}`}}var Z=["courier","courier-bold","courier-bold-oblique","courier-oblique","helvetica","helvetica-bold","helvetica-bold-oblique","helvetica-oblique","times-roman","times-bold","times-bold-italic","times-italic","symbol","zapf-dingbats"],J={invisible:!1,hidden:!1,print:!1,noZoom:!1,noRotate:!1,noView:!1,readOnly:!1,locked:!1,toggleNoView:!1,lockedContents:!1};function Q(e){return void 0!==e.layout?e:{...e,layout:"pushbutton"===e.fieldKind?"caption":null}}function X(e){return null===e?{kind:"unassigned"}:{kind:"group",groupId:e}}function Y(e){return"group"===e.kind?e.groupId:null}function ee(e){return eo(er(e)??{kind:"unassigned"},e.kind)}function et(e,t){let n=er(e);return void 0===n?t.assignment:eo(n,t.kind)}function en(e){if(void 0!==e.assignment)return e;let t="string"==typeof e.groupId?e.groupId:null;return{...e,assignment:X(t)}}function er(e){if(void 0!==e.assignment&&void 0!==e.groupId)throw ea("assignment",'name a field\'s assignment or its groupId, not both: { kind: "group", groupId } says both');return void 0!==e.assignment?function(e){let t=null!==e&&"object"==typeof e?e.kind:void 0;if("anyone"===t||"unassigned"===t)return{kind:t};if("group"===t){let n=e.groupId;return ei(n,"assignment"),{kind:t,groupId:n}}throw ea("assignment","a field's assignment is { kind: 'group', groupId }, { kind: 'anyone' } or { kind: 'unassigned' }")}(e.assignment):void 0!==e.groupId?(null!==e.groupId&&ei(e.groupId,"groupId"),X(e.groupId)):void 0}function ei(e,t){if("string"!=typeof e||e.length<1||e.length>256)throw ea(t,`a field's groupId is 1 to 256 characters${"groupId"===t?", or null for no group":""}`)}function eo(e,t){if("anyone"===e.kind&&"signature"===t)throw ea("assignment","a signature field is signed by one signer, so it is never for anyone");return e}function ea(e,t){return new N(G.InvalidArg,t,{details:{field:e}})}function es(e){return void 0===e.lockedBy?{...e,lockedBy:null}:e}function el(e){if("pushbutton"!==e.kind)return e;let t=void 0===e.hasImage,n=void 0===e.takesImage;return t||n?{...e,...t?{hasImage:!1}:{},...n?{takesImage:!1}:{}}:e}var eu=Object.freeze(["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"]),ed=Object.freeze(["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"]),ec=new Map([["yyyy",{part:"year",written:"digits"}],["yy",{part:"year",written:"digits"}],["mmmm",{part:"month",written:"letters"}],["mmm",{part:"month",written:"letters"}],["mm",{part:"month",written:"digits"}],["m",{part:"month",written:"digits"}],["dd",{part:"day",written:"digits"}],["d",{part:"day",written:"digits"}]]),ef=/(?:HH|H|hh|h):MM(?::ss)?(?: *tt)?/;function em(e){let t={written:[],groups:[]};for(let n of e.match(/([A-Za-z])\1*|[^A-Za-z]/g)??[]){let e=ec.get(n);if(e)t.written.push(e.written),t.groups.push(e.part);else{if(!" /-.,".includes(n))return null;t.written.push("separator")}}return t}function ep(e){if("string"!=typeof e||e.length<1||e.length>64)return!1;let t=ef.exec(e),n=em(t?e.slice(0,t.index):e),r=em(t?e.slice(t.index+t[0].length):"");if(!n||!r)return!1;let i=[...n.groups,...r.groups];if(0===i.length||new Set(i).size!==i.length)return!1;let o=t?["digits",t[0].endsWith("tt")?"letters":"digits"]:[],a=[...n.written,...o,...r.written];return!a.some((e,t)=>"digits"===e&&"digits"===a[t+1]&&t!==n.written.length)}var eh=RegExp(`^${ef.source}$`);function eF(e){return"string"==typeof e&&e.length<=64&&eh.test(e)}function eg(e){return"text"===e||"combobox"===e}var e_={date:{format:"AFDate_FormatEx",numberedFormat:"AFDate_Format",keystroke:"AFDate_KeystrokeEx",numberedKeystroke:"AFDate_Keystroke",standard:eu,isPattern:ep},time:{format:"AFTime_FormatEx",numberedFormat:"AFTime_Format",keystroke:"AFTime_KeystrokeEx",numberedKeystroke:"AFTime_Keystroke",standard:ed,isPattern:eF}},eP=["date","time"];function eD(e,t,n,r){let i=e.trim();i.endsWith(";")&&(i=i.slice(0,-1).trimEnd());let o=/^([A-Za-z_]+)\(\s*(?:(["'])([^"'\\]*)\2|(\d{1,2}))\s*\)$/.exec(i);if(!o)return null;let[,a,,s,l]=o,{isPattern:u,standard:d}=e_[t];return a===n&&void 0!==s?u(s)?s:null:a===r&&void 0!==l?d[Number(l)]??null:null}function eb(e){let t=e?.format;if(null==t)return null;if("object"!=typeof t)return{kind:"other"};let n=ew(t);return null===n?{kind:"other"}:function(e){for(let t of eP){let n=e_[t],r=eD(e,t,n.format,n.numberedFormat);if(null!==r)return{kind:t,pattern:r}}return{kind:"other"}}(n)}function ey(e){let t=void 0===e.purpose,n=void 0===e.format&&"string"==typeof e.kind&&eg(e.kind);return t||n?{...e,...t?{purpose:null}:{},...n?{format:eb(e.actions)}:{}}:e}function ew(e){let t=e.root;return!1===e.incomplete&&t&&"javascript"===t.type&&Array.isArray(t.next)&&!(t.next.length>0)&&"string"==typeof t.script?t.script:null}function eE(e){var t;let n=e_[e.kind];return{format:`${n.format}("${e.pattern}");`,keystroke:"date"===e.kind?`${n.keystroke}("${e.pattern}");`:`${n.numberedKeystroke}(${2*!!(t=e.pattern).includes("ss")+ +!!t.includes("tt")});`}}function eA(e){if(null===e)return{keystroke:null,format:null};let t=eE(e),n=e=>({type:"javascript",script:e});return{keystroke:n(t.keystroke),format:n(t.format)}}function ev(e){return null!==e&&"other"!==e.kind}function eS(e,t){return null===e||null===t?e===t:e.kind===t.kind&&("other"===e.kind||e.pattern===t.pattern)}var ek={date:"a date format's pattern is 1 to 64 characters: the groups yyyy yy mmmm mmm mm m dd d, at least one of them and the year, the month and the day each once at most, with spaces and / - . , between them, and at most one time (HH, H, hh or h, then :MM, then :ss and tt when it has them); two groups written in digits never touch",time:"a time format's pattern is a time and nothing else, at most 64 characters: HH, H, hh or h, then :MM, then :ss when it has seconds, then tt when it has one"};function ex(e,t){if(void 0===e.format)return;if(!eg(t))throw new N(G.InvalidArg,`'format' does not apply to a ${t} field`,{details:{field:"format"}});let n=function(e){if(null===e)return null;let t="object"==typeof e?e:{};if("other"===t.kind)throw new N(G.InvalidArg,"a format of kind 'other' is read, never written: write its scripts in actions",{details:{field:"format"}});if("date"!==t.kind&&"time"!==t.kind)throw new N(G.InvalidArg,"a field's format is a date or a time with a pattern, or null for none",{details:{field:"format"}});let{pattern:n}=t;if(!e_[t.kind].isPattern(n))throw new N(G.InvalidArg,ek[t.kind],{details:{field:"format.pattern"}});return{kind:t.kind,pattern:n}}(e.format);for(let t of["format","keystroke"])if(e.actions?.[t]!==void 0)throw new N(G.InvalidArg,`'format' writes the field's ${t} script: name it or actions.${t}, not both`,{details:{field:`actions.${t}`}});return n}function eG(e){return $({type:"javascript",script:e})}function eO(e){return"string"==typeof e&&e.length>=1&&e.length<=256&&e.trim()===e&&!e.includes("\0")}function eI(e,t){if(null==e)return null;if(!eO(e))throw new N(G.InvalidArg,`a field's ${t} is 1 to 256 characters with no space at its start or end and no NUL character, or null for none`,{details:{field:t}});return e}function eN(e){return eO(e)}function eC(e){return eI(e,"placeholder")}function ej(e){return void 0!==e.placeholder?e:{...e,placeholder:null}}function eM(e){if("objectNumber"===e.kind){if(!Number.isInteger(e.objectNumber)||e.objectNumber<=0)throw RangeError(`encodeFieldRefKey: objectNumber must be a positive integer, got ${e.objectNumber}`);return`obj:${e.objectNumber}`}return`fqn:${e.name}`}function eR(e,t){return{ref:e>0&&t?{kind:"objectNumber",page:t,objectNumber:e}:null,objectNumber:e,page:t}}var eT=(e,t)=>e.replace(/\B(?=(\d{3})+(?!\d))/g,()=>t),eB=(e,t)=>t?eB(t,e%t):e;function eL(e){let t=Math.fround(e.conversion??0/0);if(!Number.isFinite(t)||t<=0)return!1;let n=e.precision??("fraction"===e.fraction?16:100);return!!Number.isInteger(n)&&!(n<1)&&!(n>0x7fffffff)&&((e.fraction??"decimal")!=="decimal"||!!Number.isInteger(Math.log10(n)))}function e$(e,t){if(!Number.isFinite(e)||!t.length||!t.every(eL))throw new N(G.InvalidArg,"Measurement requires a finite value and valid number formats");let n=Math.abs(e),r=[];for(let[e,i]of t.entries()){if(!Number.isFinite(n*=Math.fround(i.conversion)))throw new N(G.InvalidArg,"Measurement overflow");let o=Math.floor(n),a=n-o,s=e===t.length-1,l=s||0===a,u=s?function(e,t){let n=t.fraction??"decimal",r=t.thousands??",";if("round"===n)return eT(String(Math.round(e)),r);if("truncate"===n)return eT(String(Math.trunc(e)),r);if("fraction"===n){let n=t.precision??16,i=Math.floor(e),o=Math.round((e-i)*n);if(o===n&&(i++,o=0),!o)return eT(String(i),r);let a=t.fixed?1:eB(o,n);return`${i?`${eT(String(i),r)} `:""}${o/a}/${n/a}`}let i=Math.log10(t.precision??100),[o,a=""]=e.toFixed(i).split(".");return eT(o,r)+(a?(t.decimal||".")+a:"")}(n,i):eT(String(o),i.thousands??","),d="prefix"===i.labelPosition,c=i.prefixSpacing??(d&&0===e?"":" "),f=i.suffixSpacing??(!d&&l?"":" "),m=c+i.unit+f;if(r.push(d?m+u:u+m),l)break;n=a}return(e<0?"-":"")+r.join("")}var ez={courier:{family:"Courier",weight:400,italic:!1},"courier-bold":{family:"Courier",weight:700,italic:!1},"courier-bold-oblique":{family:"Courier",weight:700,italic:!0},"courier-oblique":{family:"Courier",weight:400,italic:!0},helvetica:{family:"Helvetica",weight:400,italic:!1},"helvetica-bold":{family:"Helvetica",weight:700,italic:!1},"helvetica-bold-oblique":{family:"Helvetica",weight:700,italic:!0},"helvetica-oblique":{family:"Helvetica",weight:400,italic:!0},"times-roman":{family:"Times",weight:400,italic:!1},"times-bold":{family:"Times",weight:700,italic:!1},"times-bold-italic":{family:"Times",weight:700,italic:!0},"times-italic":{family:"Times",weight:400,italic:!0},symbol:{family:"Symbol",weight:400,italic:!1},"zapf-dingbats":{family:"ZapfDingbats",weight:400,italic:!1}};function eU(e,t){if(Z.includes(e)){let t=ez[e];return{family:t.family,weight:t.weight,italic:t.italic}}let n=t?.(e);return n?{family:n.familyName,weight:n.weight,italic:n.italic}:{family:e}}function eV(e){return e.toLowerCase().replace(/[\s\-_'"]/g,"")}var eW={helvetica:"Helvetica",arial:"Helvetica",arialmt:"Helvetica",sansserif:"Helvetica",times:"Times",timesroman:"Times",timesnewroman:"Times",timesnewromanpsmt:"Times",serif:"Times",courier:"Courier",couriernew:"Courier",couriernewpsmt:"Courier",monospace:"Courier",symbol:"Symbol",zapfdingbats:"ZapfDingbats",dingbats:"ZapfDingbats"};function eq(e){if("object"!=typeof e||null===e)return!1;let{left:t,bottom:n,right:r,top:i}=e;return[t,n,r,i].every(e=>"number"==typeof e&&Number.isFinite(e))}function eH(e){return{left:Math.min(e.left,e.right),right:Math.max(e.left,e.right),bottom:Math.min(e.top,e.bottom),top:Math.max(e.top,e.bottom)}}var eK=e=>Number.isFinite(e.x)&&Number.isFinite(e.y);function eZ([e,t,n,r]){if(![e,t,n,r].every(eK))return!1;let i={x:t.x-e.x,y:t.y-e.y},o={x:r.x-n.x,y:r.y-n.y},a={x:n.x-e.x,y:n.y-e.y},s={x:r.x-t.x,y:r.y-t.y},l=[i,o,a,s].map(e=>Math.hypot(e.x,e.y));if(l.some(e=>e<=1e-6)||i.x*o.x+i.y*o.y<=0||a.x*s.x+a.y*s.y<=0)return!1;let u=i.x*a.y-i.y*a.x,d=o.x*s.y-o.y*s.x;return!(Math.abs(u)<=1e-6*l[0]*l[2]||Math.abs(d)<=1e-6*l[1]*l[3])&&Math.sign(u)===Math.sign(d)}function eJ(e,t){let n=eQ(t);if(null!==n)return eX(e,n);let r=t*Math.PI/180,i=Math.abs(Math.cos(r)),o=Math.abs(Math.sin(r)),a=e.right-e.left,s=e.top-e.bottom,l=(a*i+s*o)/2,u=(a*o+s*i)/2,d=(e.left+e.right)/2,c=(e.bottom+e.top)/2;return{left:d-l,bottom:c-u,right:d+l,top:c+u}}function eQ(e){let t=(e%360+360)%360;return t%90==0?t:null}function eX(e,t){if(0===t||180===t)return e;let n=(e.left+e.right)/2,r=(e.bottom+e.top)/2,i=(e.top-e.bottom)/2,o=(e.right-e.left)/2;return{left:n-i,bottom:r-o,right:n+i,top:r+o}}function eY(e,t){let n=.01+1e-4*Math.max(e.right-e.left,e.top-e.bottom,t.right-t.left,t.top-t.bottom);return Math.abs(e.left-t.left)<=n&&Math.abs(e.bottom-t.bottom)<=n&&Math.abs(e.right-t.right)<=n&&Math.abs(e.top-t.top)<=n}function e0(e){if(0===e.length)return{left:0,bottom:0,right:0,top:0};let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let{x:o,y:a}of e)t=Math.min(t,o),n=Math.min(n,a),r=Math.max(r,o),i=Math.max(i,a);return{left:t,bottom:n,right:r,top:i}}function e1(e,t){let n=t.degrees*Math.PI/180,r=Math.cos(n),i=Math.sin(n),o=e.x-t.center.x,a=e.y-t.center.y;return{x:t.center.x+o*r+a*i,y:t.center.y-o*i+a*r}}function e3(e,t){return e1(e,{degrees:-t.degrees,center:t.center})}function e2(e,t){return e.replace(/\r\n|\r|\n/g,t)}var e6={family:"Helvetica",weight:400,italic:!1,size:12,color:"#000000",decoration:[],script:"normal",letterSpacing:0,horizontalScale:1,align:"left",dir:"ltr"};function e5(e){return e2(e.paragraphs.map(e=>e.runs.map(e=>e.text).join("")).join(` `),` `)}function e4(e){return e.split(/\r\n|\r|\n/).map(e=>({runs:[{text:e}]}))}var e8=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0");function e7(e,t,n){return`#${e8(e)}${e8(t)}${e8(n)}`}function e9(e){let t=Number.parseInt(e.slice(1),16);return{r:t>>16&255,g:t>>8&255,b:255&t}}var te={highlight:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},underline:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},squiggly:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},strikeout:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data",intent:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},circle:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",box:"data",rotation:"data",cloudyIntensity:"data"},readBack:["rect","borderStyle"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{}},square:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",box:"data",rotation:"data",cloudyIntensity:"data"},readBack:["rect","borderStyle"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{}},polygon:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",vertices:"data",rotation:"data",captionEnabled:"data",captionCenter:"data",intent:"data",measure:"data",cloudyIntensity:"data"},readBack:["rect","borderStyle","vertices"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",vertices:"points",captionCenter:"point",measure:"measure"},resources:{}},polyline:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",vertices:"data",rotation:"data",captionEnabled:"data",captionCenter:"data",intent:"data",measure:"data",lineEndings:"data"},readBack:["rect","borderStyle","vertices"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",vertices:"points",captionCenter:"point",measure:"measure"},resources:{}},line:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",interiorColor:"data",linePoints:"data",lineEndings:"data",rotation:"data",intent:"data",measure:"data",captionEnabled:"data",captionPosition:"data",captionOffset:"data",leader:"data"},readBack:["rect","borderStyle"],colors:["color","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",linePoints:"linePoints",measure:"measure"},resources:{}},link:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",target:"data"},readBack:["target"],colors:[],spaces:{rect:"box",actions:"actions",target:"linkTarget"},resources:{}},ink:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",inkList:"data",intent:"data",rotation:"data"},readBack:["rect","strokeWidth","borderStyle","inkList"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",inkList:"strokes"},resources:{}},"free-text":{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",box:"data",rotation:"data",intent:"data",fontFamily:"data",fontSize:"data",textAlign:"data",verticalAlign:"data",color:"data",fontColor:"data",interiorColor:"data",opacity:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",cloudyIntensity:"data",calloutLine:"data",lineEnding:"data"},readBack:["rect","intent","borderStyle"],colors:["color","fontColor","interiorColor"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box",calloutLine:"calloutLine"},resources:{}},caret:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",box:"data",rotation:"data",intent:"data"},readBack:["rect"],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{}},text:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",icon:"data",open:"data",state:"data",stateModel:"data"},readBack:[],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length"},resources:{}},stamp:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",box:"data",rotation:"data",name:"data",fit:"data",opacity:"data"},readBack:["rect"],colors:[],spaces:{rect:"box",actions:"actions",richText:"length",box:"box"},resources:{appearance:"required"}},"file-attachment":{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",icon:"data",file:"data"},readBack:[],colors:["color"],spaces:{rect:"box",actions:"actions",richText:"length"},resources:{file:"required"}},widget:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"engine",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"data",box:"data",rotation:"data",color:"data",interiorColor:"data",strokeWidth:"data",borderStyle:"data",dashArray:"data",fontFamily:"data",fontSize:"data",fontColor:"data",textAlign:"data",caption:"data",checkStyle:"data",layout:"data",field:"engine",fieldKind:"engine",hasMark:"engine"},readBack:["rect","actions"],colors:["color","interiorColor","fontColor"],spaces:{rect:"box",actions:"actions",box:"box"},resources:{}},redact:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",richText:"data",color:"data",opacity:"data",quadPoints:"data",interiorColor:"data",overlayText:"data",repeat:"data",fontFamily:"data",fontSize:"data",fontColor:"data",textAlign:"data"},readBack:[],colors:["color","interiorColor","fontColor"],spaces:{rect:"box",actions:"actions",richText:"length",quadPoints:"quads"},resources:{}},popup:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",parent:"data",open:"data"},readBack:["parent"],colors:[],spaces:{rect:"box",actions:"actions"},resources:{}},unsupported:{owners:{ref:"engine",page:"engine",hasAppearance:"engine",appearanceState:"engine",structurePosition:"engine",nm:"data",rect:"data",contents:"data",subject:"data",blendMode:"data",invisible:"data",hidden:"data",print:"data",noZoom:"data",noRotate:"data",noView:"data",readOnly:"data",locked:"data",toggleNoView:"data",lockedContents:"data",reply:"data",popup:"engine",groupId:"data",author:"attribution",createdAt:"attribution",modifiedAt:"attribution",userId:"attribution",createdBy:"attribution",modifiedBy:"attribution",importedBy:"engine",actions:"preserved",rawSubtypeCode:"engine",rawSubtypeName:"engine"},readBack:[],colors:[],spaces:{rect:"box",actions:"actions"},resources:{}}};function tt(e){let t={};for(let n of Object.keys(te))t[n]=e(te[n]);return t}function tn(e){return Object.prototype.hasOwnProperty.call(te,e)?te[e]:null}var tr=tt(e=>Object.keys(e.owners)),ti=tt(e=>e.resources),to=tt(e=>e.spaces),ta=Object.assign({},...Object.values(to)),ts=[["highlight","underline","squiggly","strikeout"],["square","circle"]],tl=/^sha256-[0-9a-f]{64}$/,tu=["page","position","size"];async function td(e){let t=new Uint8Array(await crypto.subtle.digest("SHA-256",e)),n="";for(let e of t)n+=e.toString(16).padStart(2,"0");return`sha256-${n}`}async function tc(e,t){for(let[n,r]of Object.entries(t))await td(r)!==n&&tF(e,`resource ${n} doesn't match its id`)}function tf(e,t){let n=new Set,r=new Set;for(let o of t){var i;tg(o)&&t_(o.page)&&tg(i=o.size)&&[i.width,i.height].every(e=>"number"==typeof e&&Number.isFinite(e)&&e>=0)||tF(e,"a page needs a page ref, a position and a size"),th(e,"a page",o,tu);let{position:t}=o;(!Number.isInteger(t)||t<0)&&tF(e,`page position ${JSON.stringify(t)} is not a position`);let a=H(o.page);n.has(a)&&tF(e,`page ${a} is listed twice`),r.has(t)&&tF(e,`position ${t} is listed twice`),n.add(a),r.add(t)}return n}function tm(e,t,n,r,i,o){for(let[a,s]of(tg(n)||tF(e,`${t} has no resources`),Object.entries(n)))r.includes(a)||tF(e,`${t} names an unknown resource role '${a}'`),"string"==typeof s&&tl.test(s)||tF(e,`${t} names ${JSON.stringify(s)}, which is not a resource id`),i.has(s)||tF(e,`${t} names ${s}, which the bundle doesn't hold`),o.add(s)}function tp(e,t,n,r){for(let i of n.keys())tl.test(i)||tF(e,`${JSON.stringify(i)} is not a resource id`),r.has(i)||tF(e,`resource ${i} is named by no ${t}`)}function th(e,t,n,r){for(let i of Object.keys(n))r.includes(i)||tF(e,`${t} has an unknown field '${i}'`)}function tF(e,t){throw new N(G.InvalidArg,`${e} bundle: ${t}`)}function tg(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function t_(e){return tg(e)&&"objectNumber"===e.kind&&Number.isInteger(e.objectNumber)&&e.objectNumber>0}function tP(e){let t=function(e,t,n){let r=new Map(n.map(e=>[H(e.page),e.page])),i=new Map;if("same"===t)for(let t of e){let e=r.get(H(t.page));e&&i.set(H(t.page),e)}else if("by-position"===t){let t=new Map(n.map(e=>[e.position,e.page]));for(let n of e){let e=t.get(n.position);e&&i.set(H(n.page),e)}}else for(let{from:e,to:n}of t){let t=H(e);if(i.has(t))throw new N(G.InvalidArg,`import: page ${t} is mapped twice`);let o=r.get(H(n));if(!o)throw new N(G.NotFound,`import: the document has no page ${H(n)}`);i.set(t,o)}return i}(e.bundlePages,e.pages,e.target),n=new Set;for(let r of e.named)t.has(H(r))||n.add(H(r));if(n.size>0){let e=[...n];throw new N(G.InvalidArg,`import: ${1===e.length?"page":"pages"} ${e.join(", ")} map to no page of this document`,{details:{pages:e}})}return e=>t.get(H(e))}var tD=new Set(["subtype","invisible","hidden","print","noZoom","noRotate","noView","readOnly","locked","toggleNoView","lockedContents","nm","reply","popup","parent","open","groupId","subject","state","stateModel","ref","page","hasAppearance","appearanceState","author","createdAt","modifiedAt","userId","createdBy","modifiedBy","importedBy","actions","file","field","fieldKind"]),tb=new Set(["free-text","redact"]),ty=new Set(["square","circle","free-text","stamp","caret","widget","line","polyline","polygon","ink"]),tw={square:["box"],circle:["box"],"free-text":["box","calloutLine"],line:["linePoints"],polygon:["vertices"],polyline:["vertices"],ink:["inkList"],highlight:["quadPoints"],underline:["quadPoints"],squiggly:["quadPoints"],strikeout:["quadPoints"],redact:["rect","quadPoints"],caret:["box"],text:["rect"],stamp:["box"],"file-attachment":["rect"],link:["rect"],widget:["box"]},tE=(e,t)=>.001>=Math.abs(e-t),tA=e=>"number"==typeof e?(e%360+360)%360:0;function tv(e,t){if(null==e||null==t)return null==e&&null==t;if("number"==typeof e&&"number"==typeof t)return tE(e,t);if(Array.isArray(e)||Array.isArray(t))return!!Array.isArray(e)&&!!Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>tv(e,t[n]));if("object"==typeof e&&"object"==typeof t){for(let n of new Set([...Object.keys(e),...Object.keys(t)]))if(!tv(e[n],t[n]))return!1;return!0}return e===t}function tS(e){return null==e||"object"!=typeof e?void 0:Array.isArray(e)?e.length>0?tS(e[0]):void 0:"number"==typeof e.x&&"number"==typeof e.y?{x:e.x,y:e.y}:"number"==typeof e.left&&"number"==typeof e.bottom?{x:e.left,y:e.bottom}:tS(e.start??e.upperLeft)}var tk={impact:"inert"},tx={impact:"regenerate"};function tG(e,t){let n=new Map(e.map(e=>[K(e.ref),e])),r=n.get(K(t));if(!r)return[];let i=new Map,o=new Map,a=(e,t,n)=>e.set(t,[...e.get(t)??[],n]);for(let t of e){let e=t.reply?n.get(K(t.reply.to)):void 0;e&&e!==t&&a(i,e,t);let r="popup"===t.subtype&&t.parent?n.get(K(t.parent)):void 0;r&&r!==t&&a(o,r,t);let s=t.popup?n.get(K(t.popup)):void 0;s&&s!==t&&"popup"===s.subtype&&a(o,t,s)}let s=[],l=new Set,u=e=>{if(!l.has(e)){for(let t of(l.add(e),i.get(e)??[]))u(t);for(let t of o.get(e)??[])l.has(t)||(l.add(t),s.push(t));s.push(e)}};return u(r),s}var tO=new Set(["accepted","rejected","cancelled","completed","none"]),tI=new Set(["marked","unmarked"]);function tN(e){return tO.has(e)?"review":tI.has(e)?"marked":null}var tC=new Set(["highlight","underline","squiggly","strikeout","square","circle","free-text","stamp","caret","widget","line","polyline","polygon","ink"]),tj=new Set(["box","point","points","strokes","quads","linePoints","calloutLine"]);function tM(e){return[...Object.entries(to[e]).filter(([e,t])=>"rect"!==e&&tj.has(t)).map(([e])=>e),"rotation"]}function tR(e,t){return new N(G.InvalidArg,`${e} field 'rect': ${t}`,{details:{field:"rect"}})}var tT=e=>Number.isFinite(e)&&e>0,tB=e=>({x:Math.fround(e.x),y:Math.fround(e.y)});function tL(e,t,n){let r=0,i=e.map(tB);for(let e=0;e<(t?i.length:i.length-1);e++){let t=i[e],o=i[(e+1)%i.length];r+=Math.hypot((o.x-t.x)*n.sx,(o.y-t.y)*n.sy)}return r}function t$(e,t){if(e.length<3)return 0;let n=e.map(tB),r=n[0],i=0;for(let e=1;e!Number.isFinite(Math.fround(e.x))||!Number.isFinite(Math.fround(e.y))))return{unavailable:"invalid-geometry"};let i="polygon"===e.subtype;if(i&&!function(e){let t=e.map(tB),n=(e,t)=>e.x===t.x&&e.y===t.y;if(t.length>1&&n(t[0],t[t.length-1])&&t.pop(),t.length<3||0===t$(t,{sx:1,sy:1}))return!1;let r=(e,t,n)=>(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),i=(e,t,n)=>0===r(e,t,n)&&n.x>=Math.min(e.x,t.x)&&n.x<=Math.max(e.x,t.x)&&n.y>=Math.min(e.y,t.y)&&n.y<=Math.max(e.y,t.y);for(let e=0;e=Math.fround(e.cyx)))throw new N(G.InvalidArg,"Invalid CYX")}function tW(e){if("number"!=typeof e||!Number.isFinite(Math.fround(e)))throw new N(G.InvalidArg,"Value is outside PDF float range")}var tq=["linePoints","vertices","measure","intent","contents"],tH=["captionEnabled","captionPosition","captionOffset","captionCenter"],tK=e=>tH.some(t=>void 0!==e[t]);function tZ(e,t){try{if(null!=t.measure&&"rectilinear"===t.measure.subtype&&tV(t.measure),"line"===e&&"leader"in t&&null!=t.leader&&("object"!=typeof t.leader||Array.isArray(t.leader)))throw new N(G.InvalidArg,"Invalid line leader");if(null!=t.intent&&!("line"===e?["line-dimension","line-arrow"]:"polygon"===e?["polygon-dimension","polygon-cloud"]:["polyline-dimension"]).includes(t.intent))throw new N(G.InvalidArg,"Invalid measurement intent");if(null!=t.captionEnabled&&"boolean"!=typeof t.captionEnabled)throw new N(G.InvalidArg,"Invalid caption visibility");if("captionPosition"in t&&null!=t.captionPosition&&!["inline","top"].includes(t.captionPosition))throw new N(G.InvalidArg,"Invalid caption position");if("captionOffset"in t&&t.captionOffset&&(tW(t.captionOffset.along),tW(t.captionOffset.perpendicular)),"captionCenter"in t&&t.captionCenter&&(tW(t.captionCenter.x),tW(t.captionCenter.y)),"leader"in t&&t.leader){for(let e of[t.leader.length,t.leader.extension??0,t.leader.offset??0])tW(e);if((t.leader.extension??0)<0||(t.leader.offset??0)<0)throw new N(G.InvalidArg,"Leader extension and offset must be nonnegative")}for(let e of"linePoints"in t?t.linePoints?[t.linePoints.start,t.linePoints.end]:[]:"vertices"in t?t.vertices??[]:[])tW(e.x),tW(e.y)}catch(e){throw new N(G.InvalidArg,e.message)}}function tJ(e){if(void 0!==e.richText&&null!==e.richText&&void 0!==e.contents&&null!==e.contents&&e2(e.contents,` `)!==e5(e.richText))throw new N(G.InvalidArg,`${e.subtype??"annotation"}: \`contents\` must equal the plain projection of \`richText\` when both are given`)}function tQ(e){return void 0!==e&&"free-text"!==e&&(tr[e]?.includes("richText")??!1)}var tX="#ff0000",tY="#000000",t0="#ffff00",t1={invisible:!1,hidden:!1,print:!0,noZoom:!1,noRotate:!1,noView:!1,readOnly:!1,locked:!1,toggleNoView:!1,lockedContents:!1,blendMode:"normal"},t3={...t1,color:tX,opacity:1,strokeWidth:1,borderStyle:"solid"},t2={start:"none",end:"none"},t6={...t1,color:tY,opacity:1},t5={square:t3,circle:t3,line:{...t3,lineEndings:t2,captionEnabled:!1,captionPosition:"inline"},polygon:t3,polyline:{...t3,lineEndings:t2},ink:t3,highlight:{...t1,blendMode:"multiply",color:t0,opacity:1},underline:t6,squiggly:t6,strikeout:t6,caret:{...t1,color:tX,opacity:1},"free-text":{...t1,contents:"",intent:"free-text",fontFamily:"helvetica",fontSize:12,textAlign:"left",verticalAlign:"top",color:tY,fontColor:tY,opacity:1,strokeWidth:1,borderStyle:"solid"},text:{...t1,icon:"note",open:!1,color:t0,opacity:1},"file-attachment":{...t1,icon:"paperclip",color:t0,opacity:1},link:t1,redact:{...t1,quadPoints:[],color:tX,opacity:1,repeat:!1,fontFamily:"helvetica",fontSize:12,fontColor:tY,textAlign:"left"},stamp:{...t1,fit:"contain",opacity:1},widget:{...t1,strokeWidth:1,borderStyle:"solid",textAlign:"left"},popup:{...t1,print:!1,open:!1}};function t4(e){return"unsupported"===e?{}:t5[e]}var t8=[3,3];function t7(e,t){return"dashed"===e&&void 0===t}var t9=e=>tn(e)?.owners.dashArray!==void 0;function ne(e,t,n){let r={...e};if(void 0!==t.fontFamily){let e=eU(t.fontFamily,n);r.family=e.family,void 0!==e.weight&&(r.weight=e.weight),void 0!==e.italic&&(r.italic=e.italic)}return void 0!==t.fontSize&&(r.size=t.fontSize),null!=t.fontColor&&(r.color=t.fontColor),void 0!==t.textAlign&&(r.align=t.textAlign),r}function nt(e,t){if(null!=t&&"free-text-callout"!==e)throw new N(G.InvalidArg,`free-text: a callout line needs intent 'free-text-callout', not '${e}'`,{details:{field:"intent"}})}function nn(e,t){return Object.fromEntries(Object.entries(e).filter(([e,n])=>"subtype"===e||!t(e,n)))}function nr(e){return new N(G.InvalidArg,`text: the custom state '${e}' needs a stateModel`,{details:{field:"stateModel"}})}function ni(e,t){let n=tr[e],r=Object.keys(t).filter(e=>"subtype"!==e&&!n.includes(e));if(r.length>0)throw new N(G.InvalidArg,`${e} has no field ${r.map(e=>`'${e}'`).join(", ")}`)}var no=class extends N{constructor(e,t){super(G.InvalidArg,`invalid scope "${e}": ${t}`,{details:{scope:e,reason:t}}),this.scope=e,I(this,"name","InvalidScope")}},na=class extends N{constructor(e,t,n,r){super(G.Forbidden,`permission denied${t?` (${t})`:""}: ${n?`one of ${n.join(", ")}`:e}${r?` for ${r.length} annotation${1===r.length?"":"s"}`:""}`,{details:{required:e,...void 0===t?{}:{context:t},...void 0===n?{}:{anyOf:[...n]},...void 0===r?{}:{refs:[...r]}}}),this.required=e,this.context=t,this.anyOf=n,this.refs=r,I(this,"name","PermissionDenied")}},ns=class extends N{constructor(e){super(G.Aborted,function(e){if(null==e)return"aborted";if("string"==typeof e)return e;if(e instanceof Error)return e.message||"aborted";try{return JSON.stringify(e)}catch{return"aborted"}}(e)),I(this,"name","AbortError"),I(this,"reason",void 0),this.reason=e}};function nl(e,t){throw new N(G.InvalidArg,t,{details:{field:e}})}var nu=["normal","rollover","down"],nd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nc=Uint8Array.from(nd,e=>e.charCodeAt(0)),nf=(()=>{let e=(new Int16Array(128)).fill(-1);for(let t=0;t<64;t++)e[nd.charCodeAt(t)]=t;return e})();function nm(e){let t=e.length;for(;t>0&&61===e.charCodeAt(t-1);)t-=1;return t}var np=(e,t,n)=>Math.min(Math.max(Math.floor(e),t),n);function nh(e,t){let n=np(t,0,e.charCount),r=e.charMap;if(!r||0===r.length)return Math.min(n,e.text.length);let[i,o]=function(e,t){let n=0,r=e.length-1,i=null;for(;n<=r;){let o=n+r>>1;e[o][0]<=t?(i=e[o],n=o+1):r=o-1}return i??[0,0]}(r,n);return o+(n-i)}function nF(e,t,n){let r=np(t,0,e.text.length),i=0,o=e.charCount;if("start"===n){for(;i>1;nh(e,t)>=r?o=t:i=t+1}return i}var ng=/[\r\p{Noncharacter_Code_Point}]/u;function n_(e){return"start"===e||"end"===e?null:"before"in e?e.before:e.after}function nP(e,t,n){if("start"===t)return 0;if("end"===t)return e.length;let r=n_(t),i=e.findIndex(e=>n(e)===n(r));if(i<0)throw new N(G.NotFound,`no neighbour ${n(r)} in the list`,{details:{field:"position"}});return"before"in t?i:i+1}function nD(e,t,n,r){let i=new Set(t.map(r));if(i.size!==t.length)throw new N(G.InvalidArg,"a row is named twice",{details:{field:"refs"}});let o=new Set(e.map(r)),a=t.find(e=>!o.has(r(e)));if(void 0!==a)throw new N(G.NotFound,`no row ${r(a)} in the list`,{details:{field:"refs"}});let s=n_(n);if(null!==s&&i.has(r(s)))throw new N(G.InvalidArg,`the neighbour ${r(s)} is one of the rows that move`,{details:{field:"position"}});let l=e.filter(e=>!i.has(r(e))),u=nP(l,n,r);return[...l.slice(0,u),...t,...l.slice(u)]}var nb="EmbedPDF";function ny(e,t){return{x:e.x-t.left,y:t.top-e.y}}function nw(e,t){return{x:e.x+t.left,y:t.top-e.y}}function nE(e,t){return{x:e.left-t.left,y:t.top-e.top,width:e.right-e.left,height:e.top-e.bottom}}function nA(e,t){let n=e.x+t.left,r=t.top-e.y;return{left:n,right:n+e.width,bottom:r-e.height,top:r}}function nv(e,t){return{upperLeft:ny(e.upperLeft,t),upperRight:ny(e.upperRight,t),lowerLeft:ny(e.lowerLeft,t),lowerRight:ny(e.lowerRight,t)}}function nS(e){return"rotation"in e}function nk(e){return{kind:"objectNumber",objectNumber:e}}function nx(e){if(e.byteLength<4)return null;let t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?function(e){if(e.byteLength<24)return null;let t=new DataView(e),n=t.getUint32(16),r=t.getUint32(20);return 0===n||0===r?null:{mimeType:"image/png",width:n,height:r}}(e):255===t[0]&&216===t[1]&&255===t[2]?function(e){let t=new Uint8Array(e),n=2;for(;n+4=192&&r<=195){if(n+9>t.byteLength)return null;let r=new DataView(e,n+5),i=r.getUint16(0),o=r.getUint16(2);if(0===o||0===i)return null;return{mimeType:"image/jpeg",width:o,height:i}}if(216===r||217===r)n+=2;else if(255===r)n+=1;else{let e=t[n+2]<<8|t[n+3];n+=2+e}}return null}(e):37===t[0]&&80===t[1]&&68===t[2]&&70===t[3]?{mimeType:"application/pdf"}:null}var nG=["appearance","file"];function nO(e,t,n){let r=ti[e]??{};for(let i of nG){let o=t?.[i]!==void 0;if(o&&void 0===r[i])throw new N(G.InvalidArg,`a ${e} annotation takes no '${i}' resource`);if(!o&&"create"===n&&"required"===r[i])throw new N(G.InvalidArg,`creating a ${e} annotation needs its '${i}' resource`)}}var nI=Object.freeze({bundleBytes:0x3200000,manifestBytes:0x1000000,items:1e4,pages:2e3,resources:2e3,resourceBytes:0x3200000,imagePixels:4e7});function nN(e){return new TextEncoder().encode(JSON.stringify(e)).length}function nC(e,t,n,r){let i=t[n];if(!(r<=i))throw new N(G.PayloadTooLarge,`the ${e} bundle is past its ${n} limit: ${r} > ${i}`,{details:{limit:n,max:i,value:r}})}var nj={annotation:"an annotation bundle",form:"a form bundle"};function nM(e){let t=t=>new N(G.InvalidArg,`the file is not ${nj[e.kind]}`,void 0===t?void 0:{cause:t});return{stringify(t,n){let r=n?.limits??nI,i=new Map;for(let[e,n]of Object.entries(t.resources))i.set(e,n.length);e.assertManifest(t,i,r);let o={};for(let n of e.keys)o[n]=t[n];let a={};for(let[e,n]of Object.entries(t.resources))a[e]=function(e){let t=new Uint8Array(4*Math.ceil(e.length/3)),n=0,r=0;for(;r+2>18],t[n++]=nc[i>>12&63],t[n++]=nc[i>>6&63],t[n++]=nc[63&i]}let i=e.length-r;if(i>0){let o=e[r]<<16|(2===i?e[r+1]<<8:0);t[n++]=nc[o>>18],t[n++]=nc[o>>12&63],t[n++]=2===i?nc[o>>6&63]:61,t[n++]=61}return new TextDecoder().decode(t)}(n);return o.resources=a,JSON.stringify(o)},async parse(n,r){let i,o=r?.limits??nI,a=Math.ceil(4*o.bundleBytes/3)+81*o.resources+256;if(n.length>a)throw new N(G.PayloadTooLarge,`the file is ${n.length} characters, more than a bundle within ${o.bundleBytes} bytes can be`,{details:{limit:"bundleBytes",max:o.bundleBytes,fileLength:n.length}});try{i=JSON.parse(n)}catch(e){throw t(e)}let s="object"==typeof i&&null!==i?i.resources:null;if("object"!=typeof s||null===s||Array.isArray(s))throw t();let l=new Map;for(let[e,t]of Object.entries(s)){let n="string"==typeof t?function(e){let t=nm(e);return t%4==1?null:Math.floor(3*t/4)}(t):null;if(null===n)throw new N(G.InvalidArg,`resource ${e} is not base64`);l.set(e,n)}e.assertManifest(i,l,o);let u={};for(let[e,t]of Object.entries(s))try{u[e]=function(e){let t=nm(e);if(t%4==1)throw Error("malformed base64");let n=new Uint8Array(Math.floor(3*t/4)),r=0,i=0,o=0;for(let a=0;a=8&&(o-=8,n[r++]=i>>o&255)}return n}(t)}catch(t){throw new N(G.InvalidArg,`resource ${e} is not base64`,{cause:t})}await tc(e.kind,u);let d={};for(let t of e.keys)d[t]=i[t];return d.resources=u,e.complete?e.complete(d):d}}}var nR=["format","version","pages","items"],nT=[...nR,"resources"],nB=["data","resources"];function nL(e,t,n){tg(e)||tF("annotation","not an annotation bundle"),th("annotation","the bundle",e,nT),"embedpdf/annotations"!==e.format&&tF("annotation",`unknown format ${JSON.stringify(e.format)}`),1!==e.version&&tF("annotation",`unknown version ${JSON.stringify(e.version)}`);let{pages:r,items:i}=e;Array.isArray(r)||tF("annotation","pages is not a list"),Array.isArray(i)||tF("annotation","items is not a list"),nC("annotation",n,"items",i.length),nC("annotation",n,"pages",r.length),nC("annotation",n,"resources",t.size);let o=nN({pages:r,items:i});for(let e of(nC("annotation",n,"manifestBytes",o),t.values()))nC("annotation",n,"resourceBytes",e),o+=e;nC("annotation",n,"bundleBytes",o);let a=tf("annotation",r),s=new Set;i.forEach((e,n)=>{tg(e)&&tg(e.data)&&"string"==typeof e.data.subtype||tF("annotation",`item ${n} has no annotation data`),th("annotation",`item ${n}`,e,nB);let r=e.data.ref,i=tg(r)?r.page:void 0;t_(i)&&a.has(H(i))||tF("annotation",`item ${n} is on a page the bundle doesn't list`),tm("annotation",`item ${n}`,e.resources,nG,t,s)}),tp("annotation","item",t,s)}function n$(e){return{kind:"key",key:e}}nM({kind:"annotation",keys:nR,assertManifest:nL});var nz=new Set(["square","circle","free-text","stamp","caret"]),nU=(e,t)=>"function"==typeof t?t(e):t,nV=(e,t)=>null===e?null:t(e);function nW(e,t){let{left:n,top:r}=nU(e.page,t),i=e=>nV(e,e=>e-n),o=e=>nV(e,e=>r-e);switch(e.kind){case"xyz":{let{left:t,top:n,...r}=e;return{...r,x:i(t),y:o(n)}}case"fitH":case"fitBH":{let{top:t,...n}=e;return{...n,y:o(t)}}case"fitV":case"fitBV":{let{left:t,...n}=e;return{...n,x:i(t)}}case"fitR":{let{left:t,bottom:i,right:o,top:a,...s}=e,l=Math.min(i,a),u=Math.max(i,a);return{...s,x:Math.min(t,o)-n,y:r-u,width:Math.abs(o-t),height:u-l}}case"fit":case"fitB":return e}}function nq(e,t){let{left:n,top:r}=nU(e.page,t),i=e=>nV(e,e=>e+n),o=e=>nV(e,e=>r-e);switch(e.kind){case"xyz":{let{x:t,y:n,...r}=e;return{...r,left:i(t),top:o(n)}}case"fitH":case"fitBH":{let{y:t,...n}=e;return{...n,top:o(t)}}case"fitV":case"fitBV":{let{x:t,...n}=e;return{...n,left:i(t)}}case"fitR":{let{x:t,y:i,width:o,height:a,...s}=e,l=r-i;return{...s,left:t+n,bottom:l-a,right:t+n+o,top:l}}case"fit":case"fitB":return e}}function nH(e,t){return"goto"===e.kind?{...e,destination:t(e.destination)}:e}function nK(e,t){return{...e,root:e.root?function e(t,n){let r=t.next.map(t=>e(t,n));return"goto"===t.type?{...t,next:r,destination:n(t.destination)}:{...t,next:r}}(e.root,t):null}}function nZ(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>null==n?[e,n]:[e,"root"in n?nK(n,t):function e(t,n){let r=t.next?.map(t=>e(t,n)),i="goto"===t.type?{...t,destination:n(t.destination)}:t;return r?{...i,next:r}:i}(n,t)]))}function nJ(e,t){return Object.fromEntries(Object.entries(e).map(([e,n])=>[e,n?nK(n,t):n]))}var nQ=(e,t)=>"rectilinear"===e.subtype&&e.origin?{...e,origin:t(e.origin)}:e;function nX(e,t){return nQ(e,e=>ny(e,t))}function nY(e,t){return nQ(e,e=>nw(e,t))}function n0(e,t){return e.map(e=>({...e,bbox:nE(e.bbox,t),measure:e.measure?nX(e.measure,t):null}))}var n1={length:e=>e,point:(e,{visible:t})=>ny(e,t),points:(e,{visible:t})=>e.map(e=>ny(e,t)),strokes:(e,{visible:t})=>e.map(e=>e.map(e=>ny(e,t))),box:(e,{visible:t})=>nE(e,t),quads:(e,{visible:t})=>e.map(e=>nv(e,t)),linePoints:(e,{visible:t})=>({start:ny(e.start,t),end:ny(e.end,t)}),calloutLine:(e,{visible:t})=>e.map(e=>ny(e,t)),measure:(e,{visible:t})=>nX(e,t),linkTarget:(e,{boxOf:t})=>nH(e,e=>nW(e,t)),actions:(e,{boxOf:t})=>nZ(e,e=>nW(e,t))},n3={length:e=>e,point:(e,{visible:t})=>nw(e,t),points:(e,{visible:t})=>e.map(e=>nw(e,t)),strokes:(e,{visible:t})=>e.map(e=>e.map(e=>nw(e,t))),box:(e,{visible:t})=>nA(e,t),quads:(e,{visible:t})=>e.map(e=>({upperLeft:nw(e.upperLeft,t),upperRight:nw(e.upperRight,t),lowerLeft:nw(e.lowerLeft,t),lowerRight:nw(e.lowerRight,t)})),linePoints:(e,{visible:t})=>({start:nw(e.start,t),end:nw(e.end,t)}),calloutLine:(e,{visible:t})=>e.map(e=>nw(e,t)),measure:(e,{visible:t})=>nY(e,t),linkTarget:(e,{boxOf:t})=>nH(e,e=>nq(e,t)),actions:(e,{boxOf:t})=>nZ(e,e=>nq(e,t))};function n2(e,t,n,r){let i=void 0===e?ta:to[e]??to.unsupported;return Object.fromEntries(Object.entries(t).map(([e,t])=>{let o=i[e];if(!o||null==t)return[e,t];let a=r[o](t,n);if(r===n3&&function e(t){return"number"==typeof t?Number.isNaN(t):"object"==typeof t&&null!==t&&Object.values(t).some(e)}(a)){var s,l;throw s=e,l=o,new N(G.InvalidArg,`field '${s}': expected page space, ${"box"===l?"{ x, y, width, height }":"points as { x, y }"} from the page's top-left`,{details:{field:s}})}return[e,a]}))}function n6(e,t,n){return n2(e.subtype,e,{visible:t,boxOf:n},n1)}function n5(e,t,n){return n2(e.subtype,e,{visible:t,boxOf:n},n3)}function n4(e,t,n){return n2(e.subtype,e,{visible:t,boxOf:n},n3)}var n8=e=>!!(e.space||e.empty),n7=e=>!!e.empty,n9={baseline:{x:1,y:0},ascent:{x:0,y:1}},re=(e,t)=>({x:t.x*e.baseline.x+t.y*e.baseline.y,y:t.x*e.ascent.x+t.y*e.ascent.y}),rt=(e,t)=>({x:e.baseline.x*t.x+e.ascent.x*t.y,y:e.baseline.y*t.x+e.ascent.y*t.y}),rn={left:0,bottom:0,right:0,top:0};function rr(e,t){let n=[t.upperLeft,t.upperRight,t.lowerLeft,t.lowerRight].map(t=>re(e,t)),r=n.map(e=>e.x),i=n.map(e=>e.y);return{left:Math.min(...r),bottom:Math.min(...i),right:Math.max(...r),top:Math.max(...i)}}var ri=(e,t)=>t.x>=e.left&&t.x<=e.right&&t.y>=e.bottom&&t.y<=e.top;function ro(e,t,n=1.5){let r=e.frames.map((e,n)=>0===n?t:re(e,t));for(let t of e.runs){let n=r[t.frame];if(ri(t.rect,n))for(let r=0;rs.right+i)&&!(n.ys.top+i))for(let r=0;rl.right+i||n.yl.top+i)continue;let u=Math.min(Math.abs(n.x-l.left),Math.abs(n.x-l.right)),d=Math.min(Math.abs(n.y-l.bottom),Math.abs(n.y-l.top));u+d=0?o:null}function ra(e,t,n){return 0===t?{upperLeft:{x:n.left,y:n.top},upperRight:{x:n.right,y:n.top},lowerLeft:{x:n.left,y:n.bottom},lowerRight:{x:n.right,y:n.bottom}}:{upperLeft:rt(e,{x:n.left,y:n.top}),upperRight:rt(e,{x:n.right,y:n.top}),lowerLeft:rt(e,{x:n.left,y:n.bottom}),lowerRight:rt(e,{x:n.right,y:n.bottom})}}var rs=e=>e.right===e.left&&e.top===e.bottom;function rl(e,t,n,r){let i=Math.max(t,r)-Math.min(e,n);return 0!==i&&Math.max(0,Math.min(t,r)-Math.max(e,n))/i>=.5}var ru={x:0,y:0,width:0,height:0},rd={upperLeft:{x:0,y:0},upperRight:{x:0,y:0},lowerLeft:{x:0,y:0},lowerRight:{x:0,y:0}},rc=/\s/,rf=/\p{M}/gu,rm=/^(?![\t\n\v\f\r])[\p{Cf}\p{Cc}\p{Noncharacter_Code_Point}]$/u;function rp(e,t={}){let n=[],r=[],i=!1,o=0;for(let a of e){let e;if(rm.test(a)){o+=a.length;continue}rc.test(a)?e=" ":(e=a.normalize("NFKD"),t.keepMarks||(e=e.replace(rf,"")),t.keepCase||(e=e.toUpperCase().toLowerCase()));for(let a=0;a=55296&&n<=56319&&t+1=56320&&n<=57343)return 2}return 1}(e.original,i)-r}}var rF=["format","version","pages","fields","widgets","calculationOrder"],rg=["image"],r_=[...rF,"resources"],rP=["data"],rD=["data","resources"];function rb(e){let t=ry(e.fields,e=>es(ej(en(el(ey(e)))))),n=e.widgets&&ry(e.widgets,Q);return t===e.fields&&n===e.widgets?e:{...e,fields:t,...n?{widgets:n}:{}}}function ry(e,t){let n=!1,r=e.map(e=>{let r=t(e.data);return r===e.data?e:(n=!0,{...e,data:r})});return n?r:e}function rw(e,t,n){tg(e)||tF("form","not a form bundle"),th("form","the bundle",e,r_),"embedpdf/form"!==e.format&&tF("form",`unknown format ${JSON.stringify(e.format)}`),1!==e.version&&tF("form",`unknown version ${JSON.stringify(e.version)}`);let{pages:r,fields:i,widgets:o,calculationOrder:a}=e;Array.isArray(r)||tF("form","pages is not a list"),Array.isArray(i)||tF("form","fields is not a list"),Array.isArray(o)||tF("form","widgets is not a list"),Array.isArray(a)||tF("form","calculationOrder is not a list"),nC("form",n,"items",i.length+o.length),nC("form",n,"pages",r.length),nC("form",n,"resources",t.size);let s=nN({pages:r,fields:i,widgets:o,calculationOrder:a});for(let e of(nC("form",n,"manifestBytes",s),t.values()))nC("form",n,"resourceBytes",e),s+=e;nC("form",n,"bundleBytes",s);let l=tf("form",r);i.forEach((e,t)=>{tg(e)&&tg(e.data)&&"string"==typeof e.data.kind&&"string"==typeof e.data.name&&tg(e.data.ref)||tF("form",`field ${t} has no field data`),th("form",`field ${t}`,e,rP)});let u=new Set;o.forEach((e,n)=>{tg(e)&&tg(e.data)&&"widget"===e.data.subtype||tF("form",`widget ${n} has no widget data`),th("form",`widget ${n}`,e,rD);let r=e.data.ref,i=tg(r)?r.page:void 0;t_(i)&&l.has(H(i))||tF("form",`widget ${n} is on a page the bundle doesn't list`),tm("form",`widget ${n}`,e.resources,rg,t,u)}),a.forEach((e,t)=>{tg(e)||tF("form",`calculation order entry ${t} is not a field ref`)}),tp("form","widget",t,u)}function rE(e){return{keepCase:!!e.matchCase,keepMarks:!!e.matchDiacritics,dropWhitespace:!!e.ignoreWhitespace}}nM({kind:"form",keys:rF,assertManifest:rw,complete:rb});var rA=/[\p{L}\p{N}_]/u,rv=/\p{M}/u;function rS(e,t){if(t<=0)return!1;let n=e.charCodeAt(t-1);return rA.test(String.fromCodePoint(e.codePointAt(n>=56320&&n<=57343&&t>=2?t-2:t-1)))}function rk(e,t){return!(t>=e.length)&&rA.test(String.fromCodePoint(e.codePointAt(t)))}function rx(e,t){let n=rp(t.text,rE(t)).folded;if(0===n.trim().length)return[];let r=[],i=0;for(;i<=e.folded.length-n.length;){let o=e.folded.indexOf(n,i);if(o<0)break;if(t.wholeWord&&!function(e,t,n,r){if(!r.ignoreWhitespace)return!rS(e.folded,t)&&!rk(e.folded,t+n);let{start:i,count:o}=rh(e,t,n);return!rS(e.original,i)&&!rk(e.original,i+o)}(e,o,n.length,t)){i=o+1;continue}if(t.matchDiacritics&&o+n.length512)return{ok:!1,issue:"too-long",message:"Pattern exceeds 512 characters."};let t=!1;for(let n=0;n="1"&&r<="9")return{ok:!1,issue:"backreference",message:`Backreference \\${r} is not supported.`};if(!t&&"k"===r&&"<"===e[n+2])return{ok:!1,issue:"backreference",message:"Named backreferences (\\k<\u2026>) are not supported."};n++;continue}if(t){"]"===r&&(t=!1);continue}if("["===r){t=!0;continue}if("("===r&&"?"===e[n+1]){let t=e[n+2]??"";if("="===t||"!"===t)return{ok:!1,issue:"lookaround",message:"Lookahead ((?=\u2026), (?!\u2026)) is not supported."};if("<"===t&&("="===e[n+3]||"!"===e[n+3]))return{ok:!1,issue:"lookaround",message:"Lookbehind ((?<=\u2026), (?{var r;let i;return"link"!==e.subtype||"activate"!==t||o&&(r=n,i=r?.root,!r||!!r.incomplete||!i||!!(i.next.length>0)||!!("uri"===i.type&&i.isMap))})&&n.push({field:"actions",reason:"unsupported-action"}),n}var rT=new Set(["NextPage","PrevPage","FirstPage","LastPage"]);function rB(e){let t=[],n=(e,r)=>{if("object"==typeof e&&null!==e){if(Array.isArray(e))return void e.forEach(e=>n(e));if("page"===r&&r$(e))return void t.push(e);Object.entries(e).forEach(([e,t])=>n(t,e))}};return n(e),t}function rL(e,t){let n=(e,r)=>"object"!=typeof e||null===e?e:Array.isArray(e)?e.map(e=>n(e)):"page"===r&&r$(e)?t(e):Object.fromEntries(Object.entries(e).map(([e,t])=>[e,n(t,e)]));return n(e)}function r$(e){return 2===Object.keys(e).length&&"objectNumber"===e.kind&&"number"==typeof e.objectNumber}var rz=/^\s*event\s*\.\s*target\s*\.\s*buttonImportIcon\s*\(\s*\)\s*(?:;\s*)?$/,rU=["activate","mouseUp"];function rV(e){let t,n=rU.flatMap(t=>{let n=e?.[t];return null==n?[]:[n]});return 1===n.length&&null!==(t=ew(n[0]))&&rz.test(t)}function rW(e){return e.length>0&&e.every(rV)}function rq(){return{type:"javascript",script:"event.target.buttonImportIcon();"}}function rH(e){return rU.some(t=>e?.[t]!==void 0)?e??{}:{...e,activate:rq()}}function rK(e,t){let{takesImage:n}=e;if(void 0!==n){if("pushbutton"!==t)throw new N(G.InvalidArg,`'takesImage' does not apply to a ${t} field`,{details:{field:"takesImage"}});if("boolean"!=typeof n)throw new N(G.InvalidArg,"'takesImage' is true or false",{details:{field:"takesImage"}});return n}}function rZ(e,t){if(!t)return rV(e)?{kind:"remove",event:e?.activate!=null?"activate":"mouseUp"}:{kind:"keep"};if(rV(e))return{kind:"keep"};if(rU.some(t=>e?.[t]!=null))throw new N(G.InvalidArg,"'takesImage' can't be set: a widget's press already runs another action, which is never overwritten. Remove it first (updateWidget, actions.activate and actions.mouseUp)",{details:{field:"takesImage"}});return{kind:"write"}}function rJ(e,t=0){if(e.length+t===0)throw rX();if(t>0)throw new N(G.InvalidArg,"'takesImage' can't be set: a widget of the button is on no page, so its press can't be written",{details:{field:"takesImage"}});for(let t of e)rZ(t,!0)}function rQ(e){return"write"===e.kind?{activate:rq()}:"remove"===e.kind?{[e.event]:null}:{}}function rX(){return new N(G.InvalidArg,"'takesImage' needs a widget: the script that makes an image field is its widgets' press",{details:{field:"takesImage"}})}function rY(e,t,n){if(0===e.length||0===n.length)return e;let r=new Set(n),i=[0];for(let e=0;ei[Math.min(Math.max(e,0),t)],a=[];return e.forEach((n,r)=>{if(o(e[r+1]?.firstPage??t)===o(n.firstPage))return;let i=o(n.firstPage);a.push(i===n.firstPage?n:{...n,firstPage:i})}),r1(a,e)?e:a}function r0(e,t,n){if(n<=0)return e;let r=!1,i=e.map(e=>0===e.firstPage||e.firstPage{let r=t[n];return e.firstPage===r.firstPage&&e.style===r.style&&e.firstNumber===r.firstNumber&&e.prefix===r.prefix})}var r3=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]];function r2(e){let t=e%1e6,n="";for(let[e,r]of r3)for(;t>=e;)n+=r,t-=e;return n}function r6(e){if(e<=0)return"";let t=e-1;return String.fromCharCode(97+t%26).repeat((Math.floor(t/26)+1)%1e3)}var r5={text:"{ value }",checkbox:"{ checked } or { value }",radio:"{ value }",combobox:"{ value }",listbox:"{ selectedValues }"};function r4(e,t){var n;switch(e.kind){case"text":if("value"in t)return{kind:"text",value:t.value??""};break;case"checkbox":if("checked"in t){if(!t.checked)return{kind:"toggle",state:null};let n=e.widgets[0];if(!n)throw it(`'${e.name}' has no widget to check`);return{kind:"toggle",state:n.onState}}if("value"in t)return{kind:"toggle",state:r9(e,t.value)};break;case"radio":if("value"in t){let n=r9(e,t.value);if(null===n&&e.noToggleToOff)throw it(`'${e.name}' must keep a choice: it can't be cleared`);return{kind:"toggle",state:n}}break;case"combobox":if("value"in t)return ie(e,null===t.value?[]:[t.value]);break;case"listbox":if("selectedValues"in t)return ie(e,t.selectedValues);break;default:throw it(`${e.kind} fields hold no value you can set`)}throw it(`a ${e.kind} field takes ${r5[e.kind]}, not ${"checked"in(n=t)?"{ checked }":"selectedValues"in n?"{ selectedValues }":"{ value }"}`)}function r8(e,t){let n=e=>new N(G.InvalidArg,e,{details:{field:"defaultValue"}});if(new Set(t).size!==t.length)throw n("the default values must not repeat");if(t.length>1&&!("listbox"===e.kind&&e.multiSelect))throw n(`a ${"listbox"===e.kind?"list without multiSelect":"dropdown"} has one default`);let r="combobox"===e.kind&&!0===e.edit,i=new Set(e.options.map(e=>e.value)),o=t.find(e=>!i.has(e));if(void 0!==o&&!r)throw n(`'${o}' is not an option value of the ${"listbox"===e.kind?"list":"dropdown"}`)}function r7(e,t){return e.kind===t.kind&&("scalar"===e.kind&&"scalar"===t.kind?e.value===t.value:"array"!==e.kind||"array"!==t.kind||e.values.length===t.values.length&&e.values.every((e,n)=>e===t.values[n]))}function r9(e,t){if(null===t||"Off"===t)return null;let n=e.widgets.find(e=>e.exportValue===t);if(!n)throw it(`no widget of '${e.name}' has the export value '${t}'`);return n.onState}function ie(e,t){if(new Set(t).size!==t.length)throw it("the values must not repeat");if("listbox"===e.kind&&!e.multiSelect&&t.length>1)throw it(`'${e.name}' takes one value (it has no multiSelect)`);let n=new Set(e.options.map(e=>e.value)),r="combobox"===e.kind&&e.edit&&1===t.length,i=t.find(e=>!n.has(e));if(!r&&void 0!==i)throw it(`'${i}' is not an option value of '${e.name}'`);return{kind:"choice",values:t}}function it(e){return new N(G.InvalidArg,e,{details:{field:"value"}})}function ir(e,t){let n="checkbox"===e||"radio"===e,r="pushbutton"===e,i=ii(e,t,"caption",r,"a push button's");if(r&&null===t.layout)throw new N(G.InvalidArg,"a push button's widget always has a layout: 'caption' shows its caption alone",{details:{field:"layout"}});return ii(e,ii(e,i,"layout",r,"a push button's"),"checkStyle",n,"a checkbox's or radio button's")}function ii(e,t,n,r,i){if(r||void 0===t[n])return t;if(null!==t[n]){let t="unknown"===e?"this widget":`a ${e} field's widget`;throw new N(G.InvalidArg,`'${n}' applies to ${i} widgets, not to ${t}`,{details:{field:n}})}let{[n]:o,...a}=t;return a}function io(e){if(("combobox"===e.kind||"listbox"===e.kind)&&void 0!==e.defaultValue){let t=Array.isArray(e.defaultValue)?e.defaultValue:[e.defaultValue];r8({...e,options:e.options??[]},t)}switch(e.kind){case"text":case"combobox":return void 0!==e.defaultValue?ib(e.defaultValue):iy();case"listbox":return ip(ih((e.options??[]).map(iP),e.defaultValue??[]));default:return iy()}}function ia(e,t){var n,r,i;let o,a,s,l,u,d={...e.field};if(void 0!==t.name){let e=d.name.lastIndexOf(".");d.name=e<0?t.name:`${d.name.slice(0,e+1)}${t.name}`}for(let e of is)"boolean"==typeof t[e]&&e in d&&(d[e]=t[e]);if(void 0!==t.alternateName&&(d.alternateName=t.alternateName||null),void 0!==t.mappingName&&(d.mappingName=t.mappingName||null),d.assignment=et(t,d),d.groupId=Y(d.assignment),void 0!==t.purpose&&(d.purpose=rj(t.purpose)),void 0!==t.placeholder&&(d.placeholder=eC(t.placeholder)),"text"===d.kind||"combobox"===d.kind){let e=ex(t,d.kind);if(void 0!==e&&!eS(e,d.format)){let t=function(e,t){let{keystroke:n,format:r,...i}=e??{};if(null===t)return Object.keys(i).length>0?i:void 0;let o=eE(t);return{keystroke:eG(o.keystroke),format:eG(o.format),...i}}(d.actions,e);d.format=e,t?d.actions=t:delete d.actions}}if("text"===d.kind&&("maxLength"in t&&void 0!==t.maxLength&&(d.maxLength=t.maxLength),"defaultValue"in t&&void 0!==t.defaultValue)){let e=t.defaultValue;d.defaultValue=e??"",d.defaultValueEntry=null===e?iy():ib(e)}let c=!1;if(("combobox"===d.kind||"listbox"===d.kind)&&("options"in t&&t.options&&(n=d,o=(r=t.options.map(iP)).map(e=>e.value),a="combobox"===n.kind&&n.edit,s=ig("combobox"===n.kind?""===n.value?[]:[n.value]:n.selectedValues,o,a),l=im("listbox"===n.kind?{...n,options:r,topIndex:iF(n.topIndex,r)}:{...n,options:r},s),u="scalar"===(i=n.defaultValueEntry).kind?[i.value]:"array"===i.kind?[...i.values]:[],d="none"===n.defaultValueEntry.kind?l:i_(l,ig(u,o,a),!0),c=!0),"defaultValue"in t&&void 0!==t.defaultValue)){let e=null===t.defaultValue?[]:Array.isArray(t.defaultValue)?t.defaultValue:[t.defaultValue];r8(d,e),d=i_(d,e)}let f={...e,field:d},m=rK(t,d.kind);return void 0!==m?function(e,t){if("pushbutton"!==e.field.kind)return e;let n=new Set(e.field.widgets.map(e=>e.objectNumber)),r=e=>n.has(iD(e.ref)),i=e.widgets.filter(r);t&&rJ(i.map(e=>e.actions),e.field.widgets.length-i.length);let o=e.widgets.map(e=>{if(!r(e))return e;let n=rQ(rZ(e.actions,t)),i=function(e,t){if(null===t)return null;let n={...e},r=!1;for(let e of z){let i=t[e];void 0!==i&&(null===i?(void 0!==n[e]&&(r=!0),delete n[e]):"root"in i||(n[e]=$(i),r=!0))}let i=r?n:e??{};return Object.keys(i).length>0?i:null}(e.actions,n);return i===(e.actions??null)?e:{...e,actions:i}});return{field:{...e.field,takesImage:t},widgets:o}}(f,m):c?il(f.field,f):f}var is=["readOnly","required","noExport","multiline","password","comb","radiosInUnison","noToggleToOff","edit","multiSelect"];function il(e,t){return{field:e,widgets:t.widgets.map(e=>e.hasAppearance?e:{...e,hasAppearance:!0})}}function iu(e,t){let n=e.field;if("checkbox"!==n.kind&&"radio"!==n.kind)return e;let r="checkbox"===n.kind||n.radiosInUnison,i=t>=0?n.widgets[t]:null,o=n.widgets.map((e,n)=>{let o=null!==i&&(r?e.exportValue===i.exportValue&&e.onState===i.onState:n===t);return e.checked===o?e:{...e,checked:o}}),a=ib(i?i.onState:"Off"),s="checkbox"===n.kind?{...n,widgets:o,valueEntry:a,checked:o.some(e=>e.checked)}:{...n,widgets:o,valueEntry:a,value:o.find(e=>e.checked)?.exportValue??"Off"},l=new Map(o.map(e=>[e.objectNumber,e.checked?e.onState:"Off"]));return{field:s,widgets:e.widgets.map(e=>{let t=l.get(iD(e.ref));return void 0===t||e.appearanceState===t?e:{...e,appearanceState:t}})}}function id(e,t){let n=new Set;for(let r of t){let t=e.findIndex(e=>e.value===r);t>=0&&n.add(t)}return[...n].sort((e,t)=>e-t)}var ic=(e,t)=>t.every(t=>e.options.some(e=>e.value===t));function im(e,t){let n=ic(e,t)?id(e.options,t):[],r=t.length>0&&0===n.length,i=e.options.map((e,t)=>{let r=n.includes(t);return e.selected===r?e:{...e,selected:r}}),o=r?[...t]:n.map(t=>e.options[t].value),a=ip(o);return"combobox"===e.kind?{...e,options:i,valueEntry:a,value:o[0]??""}:{...e,options:i,valueEntry:a,selectedValues:o}}function ip(e){return 0===e.length?iy():1===e.length?ib(e[0]):{kind:"array",values:[...e]}}function ih(e,t){return id(e,t).map(t=>e[t].value)}function iF(e,t){return Math.max(0,Math.min(e,t.length-1))}function ig(e,t,n){let r=e.filter(e=>t.includes(e));return 0===r.length&&n&&e.length>0?[...e]:r}function i_(e,t,n=!1){if(0===t.length){let t=n?"listbox"===e.kind&&e.multiSelect?{kind:"array",values:[]}:ib(""):iy();return"combobox"===e.kind?{...e,defaultValueEntry:t,defaultValue:""}:{...e,defaultValueEntry:t,defaultValue:[]}}let r=ic(e,t),i=r?ih(e.options,t):[...t],o=r?ip(i):ib(t[0]);return"combobox"===e.kind?{...e,defaultValueEntry:o,defaultValue:i[0]??""}:{...e,defaultValueEntry:o,defaultValue:i}}var iP=e=>({label:e.label,value:e.value,selected:!1}),iD=e=>"objectNumber"===e.kind?e.objectNumber:0,ib=e=>({kind:"scalar",value:e}),iy=()=>({kind:"none"});function iw(e){return new N(G.Unknown,`'${e.name}' could not be reset`)}function iE(e){var t,n;if(null===e)return null;let r=!ArrayBuffer.isView(t=e)&&(n=t,!("u">typeof Blob&&n instanceof Blob)),i=r?e.pdf:e;if(ArrayBuffer.isView(i))return{bytes:i,declaredPdf:r};throw new N(G.InvalidArg,"a signature appearance reaches a write as bytes, never as a Blob")}function iA(e){return"skipped"===e.type}function iv(e){switch(e.type){case"skipped":return!1;case"annotations.import":case"annotations.copy":return e.annotations.length>0;case"forms.import":case"forms.importValues":case"forms.copy":return e.fields.length>0;case"forms.repeat":return e.meta.changedFields.length>0;default:return!0}}function iS(e){return"undoOf"in e}function ik(e,t){return{all:()=>`${e}:${t}:all`,self:()=>`${e}:${t}:self`,createdBy:n=>`${e}:${t}:createdBy=${n}`,group:n=>`${e}:${t}:group=${n}`}}function ix(e,t){return{all:()=>`${e}:${t}:all`,group:n=>`${e}:${t}:group=${n}`}}Object.assign(()=>"doc.render",{thumbnail:()=>"doc.render.thumbnail"}),Object.assign(()=>"doc.download",{flattened:()=>"doc.download.flattened"}),Object.assign(()=>"doc.print",{high:()=>"doc.print.high"}),Object.assign(()=>"doc.sign",{certify:()=>"doc.sign.certify"}),ik("annotations","create"),ik("annotations","update"),ik("annotations","delete"),ix("annotations","set-group"),ik("annotations","*"),ix("fields","fill"),ix("fields","sign"),ix("fields","set-group"),ix("fields","*");var iG={none:0,lta:1,fill:2,annotate:3};function iO(e){return 1===e?"lta":2===e?"fill":"annotate"}function iI(e,t){return iG[e]<=iG[t]?e:t}function iN(e,t){return null===e||iG[e]>=iG[t]}function iC(e,t){return t===e||t.startsWith(`${e}.`)}function ij(e,t){switch(e.action){case"all":return!0;case"include":return e.fields.some(e=>iC(e,t));case"exclude":return!e.fields.some(e=>iC(e,t))}}function iM(e){let t=!1,n=null,r=null,i=[];for(let o of e)o.signed&&(t=!0,o.catalogCertification&&null!==o.docMdp&&null===r&&(r={signatureIndex:o.index,permission:o.docMdp},n=iI(n??"annotate",iO(o.docMdp))),o.fieldMdp&&i.push({signatureIndex:o.index,source:"fieldmdp",spec:o.fieldMdp}),o.lock&&(i.push({signatureIndex:o.index,source:"lock",spec:o.lock}),void 0!==o.lock.permission&&(n=iI(n??"annotate",iO(o.lock.permission)))));return{enforced:n,judged:t?n??"annotate":null,certification:r,fieldLocks:i,policyVersion:6}}function iR(e){let t=new Set;return e&&null!==e.judged&&(t.add("doc.download.flattened"),null===e.enforced||(t.add("doc.pages.modify"),t.add("doc.pages.assemble"),t.add("doc.redact"),t.add("doc.attachments.modify"),t.add("doc.outline.modify"),t.add("doc.forms.modify"),t.add("doc.forms.script"),iN(e.enforced,"annotate")||(t.add("doc.annotate.modify"),t.add("doc.annotate.import")),iN(e.enforced,"fill")||(t.add("doc.forms.fill"),t.add("doc.forms.import"),t.add("doc.metadata.modify"),t.add("doc.sign")))),t}var iT=new Set(["doc.open","doc.render","doc.render.thumbnail","doc.text.select","doc.text.copy","doc.text.search","doc.content.copy","doc.download","doc.download.flattened","doc.print","doc.print.high","doc.pages.modify","doc.pages.assemble","doc.forms.read","doc.forms.fill","doc.forms.modify","doc.forms.import","doc.forms.script","doc.forms.submit","doc.annotate.read","doc.annotate.modify","doc.annotate.import","doc.metadata.modify","doc.attachments.modify","doc.outline.modify","doc.redact","doc.sign","doc.sign.certify"]);function iB(e){if("*"===e)return{kind:"wildcard"};if("pdf.permissions"===e)return{kind:"virtual",name:"pdf.permissions"};if(e.includes(":"))return function(e){let t=e.indexOf(":"),n=e.indexOf(":",t+1);if(-1===t||-1===n)throw new no(e,"collab scope requires entity:action:filter");let r=e.slice(0,t),i=e.slice(t+1,n),o=e.slice(n+1);if("fields"===r){var a=e,s=i,l=o;if("fill"!==s&&"sign"!==s&&"set-group"!==s&&"*"!==s)throw new no(a,`unknown fields action: ${s}`);let t=i$(l,a);if("all"!==t.kind&&"group"!==t.kind)throw new no(a,`fields only support :all or :group= filters (got :${t.kind})`);return{kind:"collab",entity:"fields",action:s,filter:t}}if("annotations"!==r)throw new no(e,`unknown collab entity: ${r}`);if("create"!==i&&"update"!==i&&"delete"!==i&&"set-group"!==i&&"*"!==i)throw new no(e,`unknown collab action: ${i}`);let u=i$(o,e);if("set-group"===i&&("self"===u.kind||"createdBy"===u.kind))throw new no(e,`set-group only supports :all or :group= filters (got :${u.kind})`);return{kind:"collab",entity:r,action:i,filter:u}}(e);let t=function(e){if(e.includes(":"))return null;let t=e.indexOf(".");if(t<=0)return null;let n=e.slice(0,t);return iL.has(n)?null:n}(e);return null!==t?function(e,t){if(!iU.test(e))throw new no(e,"invalid plugin permission shape (expected .)");return{kind:"plugin",name:e,plugin:t}}(e,t):function(e){if(!iz.test(e))throw new no(e,"invalid capability name shape");if(!iT.has(e))throw new no(e,`unknown capability: ${e}`);return{kind:"capability",name:e}}(e)}var iL=new Set(["doc","docs","pdf","annotations","fields","tokens","grants","shares","tenants","layer","visitor","document","submission","signature"]);function i$(e,t){if("all"===e)return{kind:"all"};if("self"===e)return{kind:"self"};if(e.startsWith("createdBy=")){let n=e.slice(10);if(!n)throw new no(t,"createdBy= requires a value");return{kind:"createdBy",userId:n}}if(e.startsWith("group=")){let n=e.slice(6);if(!n)throw new no(t,"group= requires a value");return{kind:"group",groupId:n}}throw new no(t,`unknown filter: ${e}`)}var iz=/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$/,iU=/^[a-z][a-z0-9]*(-[a-z0-9]+)*(\.[a-z][a-z0-9]*(-[a-z0-9]+)*)+$/;function iV(e){return{...e.userId?{userId:e.userId}:{},...e.groupId?{groupId:e.groupId}:{}}}function iW(e,t,n,r=null){if(iR(r).has(e))return!1;let i=t.map(iB);return!!i.some(e=>"wildcard"===e.kind)||iH(i,n,r).has(e)}function iq(e,t,n,r,i){let o=n.map(iB);if(o.some(e=>"wildcard"===e.kind))return!0;let a=o.filter(t=>"collab"===t.kind&&"annotations"===t.entity&&(t.action===e||"*"===t.action));return a.length>0?a.some(e=>(function(e,t,n){switch(e.kind){case"all":return!0;case"self":return!!n.userId&&t.userId===n.userId;case"createdBy":return t.userId===e.userId;case"group":return t.groupId===e.groupId}})(e.filter,t,r)):iH(o,i).has("doc.annotate.modify")}function iH(e,t,n=null){let r=new Set,i=!1,o=!1;for(let n of e)"capability"===n.kind?r.add(n.name):"virtual"===n.kind&&"pdf.permissions"===n.name?function(e,t){let n;for(let r of((n=new Set).add("doc.open"),n.add("doc.render"),n.add("doc.annotate.read"),n.add("doc.forms.read"),n.add("doc.text.search"),n.add("doc.text.select"),t.copy&&(n.add("doc.text.copy"),n.add("doc.content.copy")),t.print&&n.add("doc.print"),t.printHighQuality&&t.print&&n.add("doc.print.high"),t.modifyContents&&(n.add("doc.pages.modify"),n.add("doc.redact"),n.add("doc.metadata.modify"),n.add("doc.attachments.modify")),(t.modifyContents||t.assemble)&&(n.add("doc.pages.assemble"),n.add("doc.outline.modify")),t.modifyAnnotations&&n.add("doc.annotate.modify"),(t.modifyContents||t.modifyAnnotations||t.fillForms)&&(n.add("doc.forms.fill"),n.add("doc.sign")),t.modifyAnnotations&&t.modifyContents&&n.add("doc.forms.modify"),[...n]))e.add(r)}(r,t):"collab"===n.kind&&"annotations"===n.entity?i=!0:"collab"===n.kind&&"fields"===n.entity&&(o=!0);for(let e of(r.has("doc.render")&&r.add("doc.render.thumbnail"),r.has("doc.annotate.modify")&&r.add("doc.annotate.read"),r.has("doc.forms.modify")&&(r.add("doc.forms.fill"),r.add("doc.forms.read")),r.has("doc.forms.fill")&&r.add("doc.forms.read"),i&&r.add("doc.annotate.read"),o&&r.add("doc.forms.read"),iR(n)))r.delete(e);return r}function iK(e,t,n,r){if(t===n)return!0;let i=r.map(iB);if(i.some(e=>"wildcard"===e.kind))return!0;for(let n of i)if("collab"===n.kind&&n.entity===e&&("set-group"===n.action||"*"===n.action)&&("all"===n.filter.kind||"group"===n.filter.kind&&n.filter.groupId===t))return!0;return!1}function iZ(e,t,n,r=null){let i="fill"===e?"doc.forms.fill":"doc.sign";if(iR(r).has(i))return!1;let o=t.map(iB);return!!(o.some(e=>"wildcard"===e.kind)||o.some(t=>"collab"===t.kind&&"fields"===t.entity&&(t.action===e||"*"===t.action)))||iH(o,n,r).has(i)}var iJ={left:0,bottom:0,right:612,top:792},iQ={left:0,right:0,bottom:0,top:0};function iX(){let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return e[6]=15&e[6]|64,e[8]=63&e[8]|128,i0(e)}function iY(e=Date.now()){let t=globalThis.crypto.getRandomValues(new Uint8Array(16)),n=Math.max(0,Math.floor(e));for(let e=5;e>=0;e--)t[e]=n%256,n=Math.floor(n/256);return t[6]=15&t[6]|112,t[8]=63&t[8]|128,i0(t)}function i0(e){let t=Array.from(e,e=>e.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function i1(e){let t,n=(t=new Map(e.pages.map(e=>[e.ref.objectNumber,e.boxes.crop])),e=>{let n=t.get(e.objectNumber);if(!n)throw new N(G.InvalidArg,`No page ${e.objectNumber} in this document`);return n});return{...e,pages:e.pages.map(e=>(function(e,t){var n;let r,{actions:i,viewports:o,...a}=e;return{...a,boxes:(r=(n=e.boxes).crop,{media:nE(n.media,r),crop:nE(n.crop,r),bleed:nE(n.bleed,r),trim:nE(n.trim,r),art:nE(n.art,r)}),...i?{actions:nJ(i,e=>nW(e,t))}:{},...o?{viewports:n0(o,e.boxes.crop)}:{}}})(e,n))}}function i3(e,t){return e.map(e=>({...e,rect:nE(e.rect,t)}))}function i2(e,t){let{actions:n,...r}=e,i=t(e.page);return{...r,...e.rect?{rect:nA(e.rect,i)}:{},...e.box?{box:nA(e.box,i)}:{},...n?{actions:nZ(n,e=>nq(e,t))}:{}}}function i6(e,t){return e.widgets?{...e,widgets:e.widgets.map(e=>i2(e,t))}:e}function i5(e,t){var n,r;return e.actions?{...e,actions:(n=e.actions,r=t,nJ(n,e=>nW(e,r)))}:e}function i4(e,t){return n6(e,t(e.page),t)}function i8(e,t){return{...e,fields:e.fields.map(e=>i5(e,t)),widgets:e.widgets.map(e=>i4(e,t))}}function i7(e,t){let{target:n,...r}=e;return void 0===n?r:{...r,target:n&&"goto"===n.kind?{...n,destination:t(n.destination)}:n}}function i9(e,t){var n;return n=e=>nW(e,t),{...e,target:e.target&&nH(e.target,n),action:e.action&&nK(e.action,n)}}function oe(e,t){return i7(e,e=>nq(e,t))}function ot(e){let{box:t,rect:n,rotation:r,...i}=e;if(void 0!==r&&![0,90,180,270].includes(r))throw new N(G.InvalidArg,`a widget turns by a quarter turn (0, 90, 180 or 270), not ${r}`,{details:{field:"rotation"}});let o=t?eJ(eH(t),r??0):n;if(!o)throw new N(G.InvalidArg,"a widget's placement needs its `rect` or its `box`",{details:{field:"rect"}});return{...i,rect:o,...void 0!==r?{rotation:r}:{},...t7(i.borderStyle,i.dashArray)?{dashArray:[...t8]}:{}}}var on=["certificates","ocspResponses","crls"];function or(e,t,n){let r=t;if(r>=n)return null;let i=e[r++];if((31&i)==31)for(;;){if(r>=n)return null;if((128&e[r++])==0)break}if(r>=n)return null;let o=e[r++],a=o;if(128&o){let t=127&o;if(0===t||t>4||r+t>n)return null;a=0;for(let n=0;nn?null:{constructed:(32&i)!=0,contents:r,end:s}}function oi(e){let t=new oo(e),n=t.value();if(t.skipSpaces(),!t.atEnd())throw Error(`trailing input at ${t.pos}: ${e.slice(t.pos,t.pos+20)}`);return n}var oo=class{constructor(e){this.text=e,I(this,"pos",0)}atEnd(){return this.pos>=this.text.length}skipSpaces(){for(;this.pos>",this.pos))return this.pos+=2,e;if("/"!==this.text[this.pos])throw Error(`expected a key at ${this.pos}`);let t=this.name();this.skipSpaces(),e[t]=this.value()}}stream(){let e=/^stream\((\d+),([0-9a-fA-F]*)\)/.exec(this.text.slice(this.pos));if(!e)throw Error(`malformed stream signature at ${this.pos}`);this.pos+=e[0].length;let t=this.dictEntries();return{t:"stream",length:Number(e[1]),sha256:e[2].toLowerCase(),dict:t}}array(){this.expect("[");let e=[];for(;;){if(this.skipSpaces(),"]"===this.text[this.pos])return this.pos++,{t:"array",items:e};e.push(this.value())}}name(){this.expect("/");let e="";for(;this.pos"===t||"("===t||")"===t)break;if("#"===t&&/^[0-9A-Fa-f]{2}/.test(this.text.slice(this.pos+1,this.pos+3))){e+=String.fromCharCode(parseInt(this.text.slice(this.pos+1,this.pos+3),16)),this.pos+=3;continue}e+=t,this.pos++}return e}literalString(){this.expect("(");let e=1,t="";for(;this.pos2?^kNTu6e2AdrU=k2~9`*YEH+$tjB90ebpvVDE}9 z8dOy5y`p08yy^zQf1D<7U`cV>2Wc6N4lcAn*K$oVVm#uHcB;;G&Y zD*R1cSoq)nFuyU(vW4+=&^~;p&Mp*)m)9MH0xDwbMI)$mtzQ_z+H-mZrM6A6b+lz= zXWQ~}yMLLRUyz*Fr$<3tN~f-Mjyc{U6QWCEcX!y=Yt16dCSu}CBm1;Vcw z;lZ9Uz;eB(A}A25B2gX0h{fVMY<#^sbx<7-aUFcuGg%tQ1Oy^hgph~WLo5=ZfB?*U zeFGw4uM=VsVsMtkTrpYlBk~OpCyqb}dHNxS{NOtNeJc9;`$7{uMwSN8voez;zymQJ zb=UxrC>UswM}TA6InMxW3RK7gp!a(9;Mao@i5XEHpkhQ!-GGWtfkzNDZz8urxBr!Y zK`ILs>p=J}$|YDHyg!gdbwEN9BO=3d{;MMz8)5=Vb4W5Y`zxd#ivlZ()I*UdAfUoi z(;c`}^wC}xv7jXUtNt^O0K_l>c!a)@4=4>GF)&1;K%m;82U!CuE{E>~FrE`xE(#39 zX$|AaYe+-ACcw)hP>kv@b?Vmj2wZ{c1O|%hfX1N>NCiq`aaF^~Au{-^x}U{?HXJoerN!gyBVgT^4V3g0w_Dl0z{F)cqi zw|kFldx4!LzV_&@aftoQ#!IXiiRUK}P_l_Oj;`2y?)k!s+H< zbQ%B49Ez^sQnMOe#jDL)bPb<1hoS5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