@pdftron/webviewer
Version:
[WebViewer](https://www.apryse.com/webviewer) is a powerful JavaScript Document SDK and UI Component Library that is a part of the [Apryse PDF SDK](https://www.apryse.com). It provides a slick, out-of-the-box responsive UI that interacts with the core lib
2 lines • 41.9 kB
JavaScript
(window.webpackJsonpWebViewerUI=window.webpackJsonpWebViewerUI||[]).push([[55],{1696:function(e,t,n){var r=n(36),i=n(1697);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={insert:function(e){if(!window.isApryseWebViewerWebComponent)return void document.head.appendChild(e);let t;t=document.getElementsByTagName("apryse-webviewer"),t.length||(t=function e(t,n=document){const r=[];return n.querySelectorAll(t).forEach(e=>r.push(e)),n.querySelectorAll("*").forEach(n=>{n.shadowRoot&&r.push(...e(t,n.shadowRoot))}),r}("apryse-webviewer"));const n=[];for(let r=0;r<t.length;r++){const i=t[r];if(0===r)i.shadowRoot.appendChild(e),e.onload=function(){n.length>0&&n.forEach(t=>{t.innerHTML=e.innerHTML})};else{const t=e.cloneNode(!0);i.shadowRoot.appendChild(t),n.push(t)}}},singleton:!1};r(i,a);e.exports=i.locals||{}},1697:function(e,t,n){(e.exports=n(37)(!1)).push([e.i,".signature-widget-info{--widget-header-indent:49px;--widget-body-indent:22px;--arrow-width:12px;padding:4px;display:flex;flex-direction:column;font-size:13px;margin-bottom:10px;margin-inline-start:5px;box-sizing:border-box;border:1px solid transparent;cursor:pointer;--border-radius-amount:4px;-moz-border-radius-topleft:var(--border-radius-amount);-moz-border-radius-topright:var(--border-radius-amount);-moz-border-radius-bottomright:var(--border-radius-amount);-moz-border-radius-bottomleft:var(--border-radius-amount);border-radius:var(--border-radius-amount)}.signature-widget-info p+p{margin:1em 0 0}.signature-widget-info p.result-for-header{margin-top:0}.signature-widget-info p.bold{font-weight:700;margin-bottom:4px}.signature-widget-info p.underline{text-decoration:underline}.signature-widget-info .signatureProperties{padding:0;margin:0}.signature-widget-info .signatureProperties:focus,.signature-widget-info .signatureProperties:hover{color:var(--blue-5)}.signature-widget-info .link{cursor:pointer;outline:none;border:0;background-color:transparent;white-space:nowrap}.signature-widget-info .link.focus-visible,.signature-widget-info .link:focus-visible{outline:var(--focus-visible-outline)}.signature-widget-info .link p{margin:0;padding:0}.signature-widget-info .panel-list-text-container{height:100%}.signature-widget-info .panel-list-text-container .panel-list-label-header .Button span{text-align:start;overflow:visible;white-space:normal;text-overflow:inherit}.signature-widget-info .panel-list-icon-container .Icon{width:20px;height:20px}.signature-widget-info .title{padding-inline-start:4px;font-weight:700;display:flex;align-items:center;margin-block-start:0;margin-block-end:0;min-height:32px;margin-top:-5px;margin-bottom:-5px;overflow:hidden;border:0;background-color:transparent}.signature-widget-info .title button+*,.signature-widget-info .title div+*{margin-inline-start:2px}.signature-widget-info .title .arrow{min-width:var(--arrow-width);transition:transform .1s ease;margin-top:0;background-color:transparent;border:none;padding:0;display:flex;justify-content:center;align-items:center}.signature-widget-info .title .arrow.expanded{transform:rotate(90deg)}.signature-widget-info .title .arrow .Icon{width:var(--arrow-width);height:var(--arrow-width)}.signature-widget-info .title .arrow.hidden{visibility:hidden;padding:23px}.signature-widget-info .title .arrow:hover .Icon{color:var(--blue-6)}.signature-widget-info .title .arrow.focus-visible,.signature-widget-info .title .arrow:focus-visible{outline:var(--focus-visible-outline)}.signature-widget-info .title .signature-icon{margin-inline-end:5px}.signature-widget-info .title.focus-visible,.signature-widget-info .title:focus-visible{outline:var(--focus-visible-outline)}.signature-widget-info .header{margin-inline-start:32px}.signature-widget-info .header ul{padding-inline-start:24px}.signature-widget-info .header .body>div:first-child>p:first-child,.signature-widget-info .header .body>p:first-child{margin-top:.5em}.signature-widget-info .header .body>div:last-child{margin-bottom:.5em}.signature-widget-info .header-with-arrow{margin-inline-start:0}.signature-widget-info .header-with-arrow ul{margin-inline-start:var(--arrow-width)}.signature-widget-info .header-with-arrow ul li{margin-inline-start:18px}.signature-widget-info .panel-list-label-header button{font-weight:700;font-size:13px}.signature-widget-info .signatureDetails,.signature-widget-info .verificationDetails{cursor:default;padding:0;background-color:transparent;border:none;text-align:start}",""])},1698:function(e,t,n){var r=n(36),i=n(1699);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={insert:function(e){if(!window.isApryseWebViewerWebComponent)return void document.head.appendChild(e);let t;t=document.getElementsByTagName("apryse-webviewer"),t.length||(t=function e(t,n=document){const r=[];return n.querySelectorAll(t).forEach(e=>r.push(e)),n.querySelectorAll("*").forEach(n=>{n.shadowRoot&&r.push(...e(t,n.shadowRoot))}),r}("apryse-webviewer"));const n=[];for(let r=0;r<t.length;r++){const i=t[r];if(0===r)i.shadowRoot.appendChild(e),e.onload=function(){n.length>0&&n.forEach(t=>{t.innerHTML=e.innerHTML})};else{const t=e.cloneNode(!0);i.shadowRoot.appendChild(t),n.push(t)}}},singleton:!1};r(i,a);e.exports=i.locals||{}},1699:function(e,t,n){(t=e.exports=n(37)(!1)).push([e.i,":host{display:inline-block;container-type:inline-size;width:100%;height:100%;overflow:hidden}@media(min-width:901px){.App:not(.is-web-component) .hide-in-desktop{display:none}}@container (min-width: 901px){.hide-in-desktop{display:none}}@media(min-width:641px)and (max-width:900px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .hide-in-tablet{display:none}}@container (min-width: 641px) and (max-width: 900px){.App.is-web-component:not(.is-in-desktop-only-mode) .hide-in-tablet{display:none}}@media(max-width:640px)and (min-width:431px){.App:not(.is-web-component) .hide-in-mobile{display:none}}@container (max-width: 640px) and (min-width: 431px){.App.is-web-component .hide-in-mobile{display:none}}@media(max-width:430px){.App:not(.is-web-component) .hide-in-small-mobile{display:none}}@container (max-width: 430px){.App.is-web-component .hide-in-small-mobile{display:none}}.always-hide{display:none}.SignaturePanel{z-index:65;transition:transform .3s ease,visibility 0s ease .3s}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .SignaturePanel{inset-block-start:0;width:100%;height:100%}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .SignaturePanel{inset-block-start:0;width:100%;height:100%}}.open.SignaturePanel{transform:none;visibility:visible;transition:transform .3s ease,visibility 0s ease 0s}.SignaturePanel .empty-panel-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;width:100%;padding:36px;grid-gap:8px;gap:8px}.SignaturePanel .empty-panel-container .empty-icon{width:60px;height:60px;color:var(--gray-6);fill:var(--gray-6)}.SignaturePanel .empty-panel-container .empty-icon svg{width:60px;height:60px}.SignaturePanel .empty-panel-container .empty-message{text-align:center;max-width:131px;font-size:13px}@media(min-width:641px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .SignaturePanel .empty-panel-container .empty-message{line-height:15px}}@container (min-width: 641px){.App.is-web-component:not(.is-in-desktop-only-mode) .SignaturePanel .empty-panel-container .empty-message{line-height:15px}}.SignaturePanel{margin:0 8px 8px;display:flex;flex-direction:column}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .SignaturePanel{width:auto;margin:16px;flex-grow:1;overflow-y:auto}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .SignaturePanel{width:auto;margin:16px;flex-grow:1;overflow-y:auto}}.SignaturePanel .center{display:flex;justify-content:center;align-items:center}@media(max-width:640px){.App:not(.is-in-desktop-only-mode):not(.is-web-component) .SignaturePanel .signature-widget-info .title .arrow{min-width:auto;padding:3px}}@container (max-width: 640px){.App.is-web-component:not(.is-in-desktop-only-mode) .SignaturePanel .signature-widget-info .title .arrow{min-width:auto;padding:3px}}",""]),t.locals={LEFT_HEADER_WIDTH:"41px",RIGHT_HEADER_WIDTH:"41px"}},1710:function(e,t,n){"use strict";n.r(t),n.d(t,"renderPermissionStatus",(function(){return G})),n.d(t,"SignaturePanel",(function(){return ne}));n(9),n(10),n(14),n(34),n(27),n(21),n(20),n(12),n(44),n(22),n(309),n(310),n(311),n(18),n(26),n(16),n(40),n(24),n(41),n(35),n(42),n(8),n(57),n(1655),n(17),n(19),n(116),n(11),n(31),n(13);var r=n(0),i=n.n(r),a=n(6),o=n(307),s=n(3),c=n(1),u=n(4);n(38),n(46),n(82),n(165),n(60),n(64),n(115),n(1708),n(391),n(1709),n(392),n(393),n(394),n(395),n(396),n(397),n(398),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(411),n(412),n(413),n(414);function l(e){return(l="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 d(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(l(e)+" is not iterable")}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function a(n,r,i,a){var c=r&&r.prototype instanceof s?r:s,u=Object.create(c.prototype);return m(u,"_invoke",function(n,r,i){var a,s,c,u=0,l=i||[],d=!1,f={p:0,n:0,v:e,a:g,f:g.bind(e,4),d:function(t,n){return a=t,s=0,c=e,f.n=n,o}};function g(n,r){for(s=n,c=r,t=0;!d&&u&&!i&&t<l.length;t++){var i,a=l[t],g=f.p,p=a[2];n>3?(i=p===r)&&(c=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=g&&((i=n<2&&g<a[1])?(s=0,f.v=r,f.n=a[1]):g<p&&(i=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,f.n=p,s=0))}if(i||n>1)return o;throw d=!0,r}return function(i,l,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===l&&g(l,p),s=l,c=p;(t=s<2?e:c)||!d;){a||(s?s<3?(s>1&&(f.n=-1),g(s,c)):f.n=c:f.v=c);try{if(u=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(d=f.n<0)?c:n.call(r,f))!==o)break}catch(t){a=e,s=1,c=t}finally{u=1}}return{value:t,done:d}}}(n,i,a),!0),u}var o={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(m(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(l);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,m(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return c.prototype=u,m(d,"constructor",u),m(u,"constructor",c),c.displayName="GeneratorFunction",m(u,i,"GeneratorFunction"),m(d),m(d,i,"Generator"),m(d,r,(function(){return this})),m(d,"toString",(function(){return"[object Generator]"})),(p=function(){return{w:a,m:f}})()}function m(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(m=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var a=function(t,n){m(e,t,(function(e){return this._invoke(t,n,e)}))};a("next",0),a("throw",1),a("return",2)}})(e,t,n,r)}function v(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){v(a,r,i,o,s,"next",e)}function s(e){v(a,r,i,o,s,"throw",e)}o(void 0)}))}}var h=function(){var e=b(p().m((function e(t,n,r,i,a,o,c){var u;return p().w((function(e){for(;;)switch(e.n){case 0:return e.n=1,y(t,n,r,i,a,o);case 1:return u=e.v,c(s.a.setVerificationResult(u)),e.a(2,u)}}),e)})));return function(t,n,r,i,a,o,s){return e.apply(this,arguments)}}(),y=function(){var e=b(p().m((function e(t,n,r,i,a,o){var s,c,u,l,g,m,v;return p().w((function(e){for(;;)switch(e.n){case 0:return s=window.Core.PDFNet,c=s.VerificationResult,u=c.TrustStatus,l=c.DigestStatus,g=c.ModificationPermissionsStatus,m=c.DocumentStatus,v={},e.n=1,s.runWithCleanup(b(p().m((function e(){var c,h,y,E,k,_,A,j,T,V,O,P,C,D,N,F,I,L,M,R,U,B,G,W,z,H,q,$,J,K,Z,Q,X,Y,ee,te,ne,re,ie,ae,oe,se,ce,ue,le,de,fe,ge,pe,me,ve,be,he,ye,we,Se,xe,Ee,ke,_e,Ae,je,Te,Ve,Oe,Pe,Ce,De;return p().w((function(e){for(;;)switch(e.p=e.n){case 0:return e.n=1,t.getPDFDoc();case 1:return t=e.v,e.n=2,s.VerificationOptions.create(s.VerificationOptions.SecurityLevel.e_compatibility_and_archiving);case 2:if(c=e.v,!a){e.n=3;break}return e.n=3,c.enableOnlineCRLRevocationChecking(!0);case 3:if(null!==o){e.n=5;break}return e.n=4,c.setRevocationProxyPrefix("https://proxy.pdftron.com");case 4:e.n=6;break;case 5:if(void 0===o){e.n=6;break}return e.n=6,c.setRevocationProxyPrefix(o);case 6:h=f(n),e.p=7,E=p().m((function e(){var t,n,r,i,a,o,s;return p().w((function(e){for(;;)switch(e.p=e.n){case 0:if("string"!=typeof(t=y.value)){e.n=5;break}return e.p=1,e.n=2,c.addTrustedCertificateFromURL(t);case 2:e.n=4;break;case 3:return e.p=3,e.v,console.error("Error encountered when trying to load certificate from URL: ".concat(t,"\n")+"Certificate will not be used as part of verification process."),e.a(2,0);case 4:e.n=15;break;case 5:if(!(t instanceof File||"[object File]"===Object.prototype.toString.call(t))){e.n=11;break}return n=new FileReader,r=new Promise((function(e,r){n.addEventListener("load",function(){var t=b(p().m((function t(n){return p().w((function(t){for(;;)switch(t.n){case 0:e(new Uint8Array(n.target.result));case 1:return t.a(2)}}),t)})));return function(e){return t.apply(this,arguments)}}()),n.addEventListener("error",(function(){r("Error reading the local certificate")})),n.readAsArrayBuffer(t)})),e.p=6,i=c,e.n=7,r;case 7:return a=e.v,e.n=8,i.addTrustedCertificate.call(i,a);case 8:e.n=10;break;case 9:return e.p=9,o=e.v,console.error("Error encountered when trying to load certificate: ".concat(o)+"Certificate will not be used as part of the verification process."),e.a(2,0);case 10:e.n=15;break;case 11:if(!(t instanceof ArrayBuffer||t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray)){e.n=15;break}return e.p=12,e.n=13,c.addTrustedCertificate(t);case 13:e.n=15;break;case 14:return e.p=14,s=e.v,console.error("Error encountered when trying to load certificate: ".concat(s)+"Certificate will not be used as part of the verification process."),e.a(2,0);case 15:return e.a(2)}}),e,null,[[12,14],[6,9],[1,3]])})),h.s();case 8:if((y=h.n()).done){e.n=11;break}return e.d(d(E()),9);case 9:if(0!==e.v){e.n=10;break}return e.a(3,10);case 10:e.n=8;break;case 11:e.n=13;break;case 12:e.p=12,xe=e.v,h.e(xe);case 13:return e.p=13,h.f(),e.f(13);case 14:k=f(r),e.p=15,k.s();case 16:if((_=k.n()).done){e.n=25;break}if(A=_.value,j=A.constructor.name,T=["ArrayBuffer","Int8Array","Uint8Array","Uint8ClampedArray"],V=void 0,"Blob"!==j){e.n=18;break}return e.n=17,A.arrayBuffer();case 17:V=e.v,e.n=20;break;case 18:if(!T.includes(j)){e.n=19;break}V=A,e.n=20;break;case 19:return console.error("The provided TrustList is an unsupported data-structure. Please ensure the TrustList is formatted as one of the following "+"data-structures: ".concat([].concat(T,["Blob"]).join("|"))),e.a(3,24);case 20:return e.p=20,e.n=21,s.FDFDoc.createFromMemoryBuffer(V);case 21:return O=e.v,e.n=22,c.loadTrustList(O);case 22:e.n=24;break;case 23:return e.p=23,Ee=e.v,console.error("Error encountered when trying to load certificate: ".concat(Ee,". ")+"Certificate will not be used as part of the verification process."),e.a(3,24);case 24:e.n=16;break;case 25:e.n=27;break;case 26:e.p=26,ke=e.v,k.e(ke);case 27:return e.p=27,k.f(),e.f(27);case 28:return e.n=29,t.getFieldIteratorBegin();case 29:P=e.v;case 30:return e.n=31,P.hasNext();case 31:if(!e.v){e.n=91;break}return e.n=32,P.current();case 32:return C=e.v,e.n=33,C.isValid();case 33:if(_e=!e.v){e.n=35;break}return e.n=34,C.getType();case 34:Ae=e.v,je=s.Field.Type.e_signature,_e=Ae!==je;case 35:if(!_e){e.n=36;break}return e.a(3,90);case 36:return e.n=37,s.DigitalSignatureField.createFromField(C);case 37:return D=e.v,e.p=38,e.n=39,D.verify(c);case 39:return N=e.v,e.n=40,D.getSDFObj();case 40:return e.n=41,e.v.getObjNum();case 41:return F=e.v,I=void 0,L=void 0,M=void 0,R=void 0,U=void 0,B=void 0,G=void 0,W=void 0,z=void 0,H={},q={},e.n=42,D.hasCryptographicSignature();case 42:if(!($=e.v)){e.n=63;break}return e.n=43,D.getSubFilter();case 43:if((J=e.v)!==s.DigitalSignatureField.SubFilterType.e_adbe_pkcs7_detached){e.n=48;break}return e.n=44,D.getSignerCertFromCMS();case 44:return K=e.v,e.n=45,K.getSubjectField();case 45:return Z=e.v,e.n=46,x(Z);case 46:if(Te=e.v){e.n=47;break}Te={};case 47:I=Te.e_commonName;case 48:if(J===s.DigitalSignatureField.SubFilterType.e_ETSI_RFC3161){e.n=60;break}if(I){e.n=52;break}return e.n=49,D.getSignatureName();case 49:if(Ve=e.v){e.n=51;break}return e.n=50,D.getContactInfo();case 50:Ve=e.v;case 51:I=Ve;case 52:return e.n=53,D.getSigningTime();case 53:return L=e.v,e.n=54,L.isValid();case 54:if(!e.v){e.n=55;break}L=w(L,i),e.n=56;break;case 55:L=null;case 56:return e.n=57,D.getContactInfo();case 57:return U=e.v,e.n=58,D.getLocation();case 58:return B=e.v,e.n=59,D.getReason();case 59:G=e.v;case 60:return e.n=61,D.getDocumentPermissions();case 61:return M=e.v,e.n=62,D.isCertification();case 62:R=e.v;case 63:return e.n=64,N.getVerificationStatus();case 64:return Q=e.v,e.n=65,N.getDocumentStatus();case 65:return X=e.v,e.n=66,N.getDigestStatus();case 66:return Y=e.v,e.n=67,N.getTrustStatus();case 67:return ee=e.v,e.n=68,N.getPermissionsStatus();case 68:return te=e.v,e.n=69,N.getDigestAlgorithm();case 69:return ne=e.v,Oe=Promise,e.n=70,N.getDisallowedChanges();case 70:return Pe=e.v.map(function(){var e=b(p().m((function e(t){var n,r;return p().w((function(e){for(;;)switch(e.n){case 0:return e.n=1,t.getObjNum();case 1:return n=e.v,e.n=2,t.getTypeAsString();case 2:return r=e.v,e.a(2,{objnum:n,type:r})}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.n=71,Oe.all.call(Oe,Pe);case 71:return re=e.v,ie=ee===u.e_trust_verified,ae=void 0,oe=void 0,se=void 0,ce=void 0,e.n=72,N.hasTrustVerificationResult();case 72:if(!e.v){e.n=87;break}return e.n=73,N.getTrustVerificationResult();case 73:return ue=e.v,e.n=74,ue.wasSuccessful();case 74:return oe=e.v,e.n=75,ue.getResultString();case 75:return ae=e.v,e.n=76,ue.getTimeOfTrustVerificationEnum();case 76:return se=e.v,e.n=77,ue.getTimeOfTrustVerification();case 77:return(le=e.v)&&(ce=S(le,i)),e.n=78,ue.getCertPath();case 78:if(!(de=e.v).length){e.n=87;break}return fe=de[0],e.n=79,fe.getIssuerField();case 79:return ge=e.v,e.n=80,x(ge);case 80:return pe=e.v,Object.assign(H,pe),e.n=81,fe.getSubjectField();case 81:return me=e.v,e.n=82,x(me);case 82:return ve=e.v,Object.assign(q,ve),be=de[de.length-1],e.p=83,e.n=84,be.getNotBeforeEpochTime();case 84:return he=e.v,e.n=85,be.getNotAfterEpochTime();case 85:ye=e.v,W=ye>=le&&le>=he,e.n=87;break;case 86:e.p=86,(Ce=e.v).includes("calendar_point::to_std_timepoint() does not support years after")&&(console.warn("The following error is a known issue with Botan, and aims to be addressed in a future release of PDFNet. This currently does not impact PDFTron's Digital Signature Verification capabilities."),console.warn(Ce));case 87:return we=void 0,we=Q?"digital_signature_valid":X!==m.e_no_error||Y!==l.e_digest_verified&&Y!==l.e_digest_verification_disabled||ee===u.e_no_trust_status||te!==g.e_unmodified&&te!==g.e_has_allowed_changes&&te!==g.e_permissions_verification_disabled?"digital_signature_error":"digital_signature_warning",I?z=I:!I&&q.e_commonName&&(z=q.e_commonName),e.n=88,C.getName();case 88:Se=e.v,v[Se]={signed:$,signer:I,signerName:z,signTime:L,verificationStatus:Q,documentStatus:X,digestStatus:Y,trustStatus:ee,permissionStatus:te,disallowedChanges:re,trustVerificationResultBoolean:oe,trustVerificationResultString:ae,timeOfTrustVerificationEnum:se,trustVerificationTime:ce,id:F,badgeIcon:we,validSignerIdentity:ie,digestAlgorithm:ne,documentPermission:M,isCertification:R,contactInfo:U,location:B,reason:G,issuerField:H,subjectField:q,validAtTimeOfSigning:W},e.n=90;break;case 89:e.p=89,De=e.v,console.error(De);case 90:P.next(),e.n=30;break;case 91:return e.a(2)}}),e,null,[[83,86],[38,89],[20,23],[15,26,27,28],[7,12,13,14]])}))));case 1:return e.a(2,v)}}),e)})));return function(t,n,r,i,a,o){return e.apply(this,arguments)}}(),w=function(e,t){var n=e.year,r=e.month,i=e.day,a=e.hour,o=e.minute,s=e.second;return new Date(Date.UTC(n,r-1,i,a,o,s)).toLocaleDateString(t.replace("_","-"),{year:"numeric",month:"long",weekday:"long",day:"numeric",hour:"numeric",minute:"numeric",timeZoneName:"short"})},S=function(e,t){var n=new Date(0);return n.setUTCSeconds(e),n.toLocaleDateString(t.replace("_","-"),{year:"numeric",month:"long",weekday:"long",day:"numeric",hour:"numeric",minute:"numeric",timeZoneName:"short"})},x=function(){var e=b(p().m((function e(t){var n,r,i,a,o,s,c,u,l;return p().w((function(e){for(;;)switch(e.p=e.n){case 0:return n={},e.n=1,t.getAllAttributesAndValues();case 1:r=e.v,i=f(r),e.p=2,i.s();case 3:if((a=i.n()).done){e.n=8;break}return o=a.value,e.n=4,o.getAttributeTypeOID();case 4:return s=e.v,e.n=5,s.getRawValue();case 5:return c=e.v,e.n=6,o.getStringValue();case 6:u=e.v,n[E(c)]=u;case 7:e.n=3;break;case 8:e.n=10;break;case 9:e.p=9,l=e.v,i.e(l);case 10:return e.p=10,i.f(),e.f(10);case 11:return e.a(2,n)}}),e,null,[[2,9,10,11]])})));return function(t){return e.apply(this,arguments)}}(),E=function(e){return{"[2,5,4,3]":"e_commonName","[2,5,4,4]":"e_surname","[2,5,4,6]":"e_countryName","[2,5,4,7]":"e_localityName","[2,5,4,8]":"e_stateOrProvinceName","[2,5,4,9]":"e_streetAddress","[2,5,4,10]":"e_organizationName","[2,5,4,11]":"e_organizationalUnitName","[1,2,840,113549,1,9,1]":"e_emailAddress"}["string"==typeof e?e:JSON.stringify(e)]},k=n(475),_=(n(32),n(33),n(29),n(2)),A=n.n(_),j=n(15),T=n.n(j),V=(n(93),n(123)),O=n.n(V),P=n(23);function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var N=function(e){var t=e.rect,n=C(Object(r.useState)(!1),2),a=n[0],o=n[1];return Object(r.useEffect)((function(){var e=c.a.getScrollViewElement(),t=function(){o(!1)};return e.addEventListener("scroll",t),function(){return e.removeEventListener("scroll",t)}})),Object(r.useEffect)((function(){t&&(setTimeout((function(){o(!0)}),50),setTimeout((function(){o(!1)}),700))}),[t]),a&&O.a.createPortal(i.a.createElement("div",{style:{position:"absolute",top:t.y1,left:t.x1,width:t.x2-t.x1,height:t.y2-t.y1,border:"1px solid #00a5e4",zIndex:99}}),Object(P.a)().querySelector("#app"))},F=n(90),I=n(1597),L=n(43);n(1696);function M(e){return(M="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 R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=M(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=M(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==M(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var G=function(e){var t=e.isCertification,n=e.ModificationPermissionsStatus,r=e.permissionStatus,a=e.translate;if(e.digestStatus===e.DigestStatusErrorCodes.e_digest_invalid)return i.a.createElement("p",null,a("digitalSignatureVerification.digestStatus.documentHasBeenAltered"));var o=B(B(B(B(B(B({},n.e_invalidated_by_disallowed_changes,"digitalSignatureVerification.permissionStatus.invalidatedByDisallowedChanges"),n.e_has_allowed_changes,"digitalSignatureVerification.permissionStatus.hasAllowedChanges"),n.e_unmodified,t?"".concat(a("digitalSignatureVerification.permissionStatus.unmodified")," ").concat(a("digitalSignatureVerification.certified"),"."):"".concat(a("digitalSignatureVerification.permissionStatus.unmodified")," ").concat(a("digitalSignatureVerification.signed"),".")),n.e_permissions_verification_disabled,"digitalSignatureVerification.permissionStatus.permissionsVerificationDisabled"),n.e_no_permissions_status,"digitalSignatureVerification.permissionStatus.noPermissionsStatus"),n.e_unsupported_permissions_features,"digitalSignatureVerification.permissionStatus.unsupportedPermissionsFeatures");return i.a.createElement("p",null,a(o[r]||""))},W={name:A.a.string.isRequired,onClick:A.a.func,field:A.a.instanceOf(window.Core.Annotations.Forms.Field)},z=function(e){var t,n,l=e.name,d=e.field,f=Object(a.e)((function(e){return u.a.getVerificationResult(e,l)})),g=R(Object(r.useState)(null),2),p=g[0],m=g[1],v=R(Object(r.useState)(!1),2),b=v[0],h=v[1],y=window.Core.PDFNet,w=y.VerificationResult,S=y.VerificationOptions.TimeMode,x=w.ModificationPermissionsStatus,E=w.DigestStatus,k=R(Object(o.a)(),1)[0],_=f.signed,A=f.signTime,j=f.verificationStatus,V=f.permissionStatus,O=f.disallowedChanges,P=f.trustVerificationResultBoolean,C=f.timeOfTrustVerificationEnum,D=f.trustVerificationTime,M=f.badgeIcon,U=f.isCertification,B=f.contactInfo,W=f.location,z=f.reason,H=f.signerName,q=f.digestStatus,$=Object(a.d)(),J=function(){!function(e){if(e.widgets.length){var t=e.widgets[0];c.a.jumpToAnnotation(t);var n=c.a.getScrollViewElement(),r=n.scrollLeft,i=n.scrollTop,a=t.getRect(),o=c.a.getDisplayModeObject().pageToWindow({x:a.x1,y:a.y1},t.PageNumber),s=c.a.getDisplayModeObject().pageToWindow({x:a.x2,y:a.y2},t.PageNumber);m({x1:o.x-r,y1:o.y-i,x2:s.x-r,y2:s.y-i})}}(d)},K=Object(F.a)((function(){$(s.a.setSignatureValidationModalWidgetName(l)),$(s.a.openElement("signatureValidationModal"))}));return i.a.createElement("div",{className:"signature-widget-info"},_?i.a.createElement(i.a.Fragment,null,i.a.createElement(I.a,{labelHeader:(n=k(U?"digitalSignatureVerification.Certified":"digitalSignatureVerification.Signed"),n+=" ".concat(k("digitalSignatureVerification.by")," ").concat(H||k("digitalSignatureModal.unknown")),A&&(n+=" ".concat(k("digitalSignatureVerification.on")," ").concat(A)),n),iconGlyph:M,useI18String:!1,onClick:J,onKeyDown:J},i.a.createElement("div",{className:"verificationDetails",tabIndex:-1},i.a.createElement("div",{className:"header"},(t=k(U?"digitalSignatureVerification.Certification":"digitalSignatureVerification.Signature"),i.a.createElement("div",{className:"title"},i.a.createElement("p",null,k(j?"digitalSignatureVerification.verificationStatus.valid":"digitalSignatureVerification.verificationStatus.failed",{verificationType:t})))),i.a.createElement("ul",{className:"body"},i.a.createElement("li",null,G({isCertification:U,ModificationPermissionsStatus:x,permissionStatus:V,translate:k,digestStatus:q,DigestStatusErrorCodes:E})),O.map((function(e){var t=e.objnum,n=e.type;return i.a.createElement("li",{key:t},i.a.createElement("p",null,k("digitalSignatureVerification.disallowedChange",{type:n,objnum:t})))})),function(){var e;switch(C){case S.e_current:e=k("digitalSignatureVerification.trustVerification.current");break;case S.e_signing:e=k("digitalSignatureVerification.trustVerification.signing");break;case S.e_timestamp:e=k("digitalSignatureVerification.trustVerification.timestamp");break;default:console.warn("Unexpected pdftron::PDF::VerificationOptions::TimeMode: ".concat(C))}return i.a.createElement(i.a.Fragment,null,i.a.createElement("li",null,i.a.createElement("p",null,k(P?"digitalSignatureVerification.trustVerification.verifiedTrust":"digitalSignatureVerification.trustVerification.noTrustVerification"))),i.a.createElement("li",null,i.a.createElement("p",null,D)),i.a.createElement("li",null,i.a.createElement("p",null,e)))}(),i.a.createElement("li",null,i.a.createElement("button",{"data-element":"signatureProperties-".concat(l),onClick:K,tabIndex:0,className:"signatureProperties link","aria-label":"Open signature properties modal"},i.a.createElement("p",{className:"bold underline"},k("digitalSignatureVerification.signatureProperties"))))))),i.a.createElement("div",{className:"header header-with-arrow"},B||W||z?i.a.createElement("div",{className:"signatureDetails",tabIndex:-1},i.a.createElement("div",{className:"title collapsible"},i.a.createElement(L.a,{img:"icon-chevron-right",className:T()({arrow:!0,expanded:b}),ariaExpanded:b,isActive:b,ariaLabel:k("digitalSignatureVerification.signatureDetails.signatureDetails"),onClick:function(){return h(!b)}}),i.a.createElement("p",null,k("digitalSignatureVerification.signatureDetails.signatureDetails"))),b&&i.a.createElement("ul",{className:"body"},i.a.createElement("li",null,i.a.createElement("p",{className:"bold"},"".concat(k("digitalSignatureVerification.signatureDetails.contactInformation"),":")),i.a.createElement("p",{className:"result-for-header"},B||k("digitalSignatureVerification.signatureDetails.noContactInformation"))),i.a.createElement("li",null,i.a.createElement("p",{className:"bold"},"".concat(k("digitalSignatureVerification.signatureDetails.location"),":")),i.a.createElement("p",{className:"result-for-header"},W||k("digitalSignatureVerification.signatureDetails.noLocation"))),i.a.createElement("li",null,i.a.createElement("p",{className:"bold"},"".concat(k("digitalSignatureVerification.signatureDetails.reason"),":")),i.a.createElement("p",{className:"result-for-header"},z||k("digitalSignatureVerification.signatureDetails.noReason"))),A&&i.a.createElement("li",null,i.a.createElement("p",{className:"bold"},"".concat(k("digitalSignatureVerification.signatureDetails.signingTime"),":")),i.a.createElement("p",{className:"result-for-header"},A||k("digitalSignatureVerification.signatureDetails.noSigningTime"))))):null))):i.a.createElement(I.a,{labelHeader:k("digitalSignatureVerification.unsignedSignatureField",{fieldName:d.name}),iconGlyph:"digital_signature_empty",useI18String:!1,onClick:J,onKeyDown:J}),i.a.createElement(N,{rect:p}))};z.propTypes=W;var H=z,q=(n(1698),n(51)),$=n(28);function J(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ee(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function K(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function a(n,r,i,a){var c=r&&r.prototype instanceof s?r:s,u=Object.create(c.prototype);return Z(u,"_invoke",function(n,r,i){var a,s,c,u=0,l=i||[],d=!1,f={p:0,n:0,v:e,a:g,f:g.bind(e,4),d:function(t,n){return a=t,s=0,c=e,f.n=n,o}};function g(n,r){for(s=n,c=r,t=0;!d&&u&&!i&&t<l.length;t++){var i,a=l[t],g=f.p,p=a[2];n>3?(i=p===r)&&(c=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=g&&((i=n<2&&g<a[1])?(s=0,f.v=r,f.n=a[1]):g<p&&(i=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,f.n=p,s=0))}if(i||n>1)return o;throw d=!0,r}return function(i,l,p){if(u>1)throw TypeError("Generator is already running");for(d&&1===l&&g(l,p),s=l,c=p;(t=s<2?e:c)||!d;){a||(s?s<3?(s>1&&(f.n=-1),g(s,c)):f.n=c:f.v=c);try{if(u=2,a){if(s||(i="next"),t=a[i]){if(!(t=t.call(a,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=a.return)&&t.call(a),s<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((t=(d=f.n<0)?c:n.call(r,f))!==o)break}catch(t){a=e,s=1,c=t}finally{u=1}}return{value:t,done:d}}}(n,i,a),!0),u}var o={};function s(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(Z(t={},r,(function(){return this})),t),d=u.prototype=s.prototype=Object.create(l);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,Z(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return c.prototype=u,Z(d,"constructor",u),Z(u,"constructor",c),c.displayName="GeneratorFunction",Z(u,i,"GeneratorFunction"),Z(d),Z(d,i,"Generator"),Z(d,r,(function(){return this})),Z(d,"toString",(function(){return"[object Generator]"})),(K=function(){return{w:a,m:f}})()}function Z(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(Z=function(e,t,n,r){if(t)i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var a=function(t,n){Z(e,t,(function(e){return this._invoke(t,n,e)}))};a("next",0),a("throw",1),a("return",2)}})(e,t,n,r)}function Q(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function X(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Q(a,r,i,o,s,"next",e)}function s(e){Q(a,r,i,o,s,"throw",e)}o(void 0)}))}}function Y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||ee(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(e,t){if(e){if("string"==typeof e)return te(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,t):void 0}}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ne=function(){var e=Object(a.d)(),t=Y(Object(r.useState)([]),2),n=t[0],l=t[1],d=Y(Object(r.useState)(!1),2),f=d[0],g=d[1],p=Y(Object(r.useState)(""),2),m=p[0],v=p[1],b=Y(Object(r.useState)(c.a.getDocument()),2),y=b[0],w=b[1],S=Object(a.e)((function(e){return u.a.isElementDisabled(e,"signaturePanel")})),x=Object(a.e)(u.a.getCertificates,a.c),E=Object(a.e)(u.a.getCurrentLanguage),_=Object(a.e)(u.a.getIsRevocationCheckingEnabled),A=Object(a.e)(u.a.getRevocationProxyPrefix),j=Object(a.e)(u.a.getTrustListKey),T=Y(Object(o.a)(),1)[0],V=function(){var e=X(K().m((function e(){return K().w((function(e){for(;;)switch(e.n){case 0:w(c.a.getDocument());case 1:return e.a(2)}}),e)})));return function(){return e.apply(this,arguments)}}(),O=Object(r.useCallback)((function(){g(!0),e(s.a.setVerificationResult({}))}),[g,e]),P=function(e,t){var n=c.a.getAnnotationManager().getFormFieldCreationManager().isInFormFieldCreationMode();"add"===t?D(c.a.getAnnotationManager().getAnnotationsList()):"delete"===t&&n&&N(e)},C=function(){var e=c.a.getAnnotationManager().getAnnotationsList();D(e)},D=function(e){var t=[];e.forEach((function(e){e instanceof window.Core.Annotations.SignatureWidgetAnnotation&&t.push(e.getField())}));var n=new Set(t);l(J(n))},N=function(e){e.forEach((function(e){F(e)})),C()},F=function(e){if(e instanceof window.Core.Annotations.WidgetAnnotation){var t=c.a.getAnnotationManager(),n=t.getAnnotationsList().filter((function(t){return t.getCustomData("trn-editing-rectangle-id")===e.Id}));t.deleteAnnotations(n)}},I=function(){l([]),C()};Object(r.useEffect)((function(){return c.a.addEventListener("documentLoaded",V),c.a.addEventListener("documentUnloaded",O),c.a.addEventListener("annotationChanged",P),c.a.addEventListener("formFieldCreationModeStarted",I),c.a.addEventListener("formFieldCreationModeEnded",I),function(){c.a.removeEventListener("documentLoaded",V),c.a.removeEventListener("documentUnloaded",O),c.a.removeEventListener("annotationChanged",P),c.a.removeEventListener("formFieldCreationModeStarted",I),c.a.removeEventListener("formFieldCreationModeEnded",I)}}),[O]);var L=function(e,t,n){var r=e.result;if(!r.objectStoreNames.contains("trustList"))return r.close(),void t(null);var i=r.transaction("trustList","readonly"),a=i.objectStore("trustList").get(j);a.onsuccess=X(K().m((function e(){var n;return K().w((function(e){for(;;)switch(e.n){case 0:(n=a.result)?n instanceof ArrayBuffer?t(n.slice(0)):t(n):t(null);case 1:return e.a(2)}}),e)}))),a.onerror=function(){return n(a.error)},i.onerror=function(){n(i.error)},i.oncomplete=function(){return r.close()}},M=function(){var e=X(K().m((function e(){return K().w((function(e){for(;;)switch(e.n){case 0:return e.a(2,new Promise((function(e,t){var n=indexedDB.open("WebViewerTrustList",1);n.onerror=function(){return t(n.error)},n.onsuccess=function(){L(n,e,t)}})))}}),e)})));return function(){return e.apply(this,arguments)}}();if(Object(r.useEffect)((function(){y?c.a.getAnnotationsLoadedPromise().then(X(K().m((function t(){var n,r;return K().w((function(t){for(;;)switch(t.n){case 0:if(g(!0),!j){t.n=3;break}return t.n=1,M();case 1:if(r=t.v){t.n=2;break}r=[];case 2:n=r,t.n=4;break;case 3:n=[];case 4:h(y,x,n,E,_,A,e).then(function(){var e=X(K().m((function e(t){var n;return K().w((function(e){for(;;)switch(e.n){case 0:n=c.a.getAnnotationManager().getFieldManager(),l(Object.keys(t).map((function(e){return n.getField(e)}))),v("");case 1:return e.a(2)}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){e&&e.message?v(e.message):console.error(e)})).then((function(){C()})).finally((function(){g(!1)}));case 5:return t.a(2)}}),t)})))):g(!0)}),[x,y,e,E,j]),S)return null;return i.a.createElement("div",{className:"Panel SignaturePanel","data-element":"signaturePanel"},function(){var e;if(f)e=i.a.createElement(k.a,{inPanel:!0,width:"40px",height:"40px"});else if("Error reading the local certificate"===m)e=T("digitalSignatureVerification.panelMessages.localCertificateError");else if("Download Failed"===m)e=T("digitalSignatureVerification.panelMessages.certificateDownloadError");else{if(n.length)return null;e=T("digitalSignatureVerification.panelMessages.noSignatureFields")}return i.a.createElement("div",{className:"empty-panel-container"},i.a.createElement(q.a,{className:"empty-icon",glyph:$.c[$.e.SIGNATURE].icon}),i.a.createElement("div",{className:"empty-message"},e))}(),!f&&n.length>0&&n.map((function(e,t){return i.a.createElement(H,{key:t,name:e.name,collapsible:!0,field:e})})))};t.default=ne}}]);
//# sourceMappingURL=chunk.55.js.map