UNPKG

@dbp-topics/signature

Version:

[GitLab Repository](https://gitlab.tugraz.at/dbp/esign/signature) | [npmjs package](https://www.npmjs.com/package/@dbp-topics/signature) | [Unpkg CDN](https://unpkg.com/browse/@dbp-topics/signature/) | [Esign Bundle](https://gitlab.tugraz.at/dbp/esign/dbp

1 lines 42.1 kB
{"version":3,"file":"dbp-signature-verification-full.js","sources":["../src/dbp-signature-verification-full.js"],"sourcesContent":["import {createInstance} from './i18n.js';\nimport {humanFileSize} from '@dbp-toolkit/common/i18next.js';\nimport {css, html} from 'lit';\nimport {ScopedElementsMixin} from '@open-wc/scoped-elements';\nimport DBPSignatureLitElement from './dbp-signature-lit-element';\nimport {PdfPreview} from './dbp-pdf-preview';\nimport * as commonUtils from '@dbp-toolkit/common/utils';\nimport {Icon, MiniSpinner, Button} from '@dbp-toolkit/common';\nimport * as commonStyles from '@dbp-toolkit/common/styles';\nimport {classMap} from 'lit/directives/class-map.js';\nimport {FileSource} from '@dbp-toolkit/file-handling';\nimport JSONLD from '@dbp-toolkit/common/jsonld';\nimport {name as pkgName} from './../package.json';\nimport metadata from './dbp-signature-verification-full.metadata.json';\nimport {Activity} from './activity.js';\nimport * as SignatureStyles from './styles';\n\nclass SignatureVerificationFull extends ScopedElementsMixin(DBPSignatureLitElement) {\n constructor() {\n super();\n this._i18n = createInstance();\n this.lang = this._i18n.language;\n this.entryPointUrl = '';\n this.nextcloudWebAppPasswordURL = '';\n this.nextcloudWebDavURL = '';\n this.nextcloudName = '';\n this.nextcloudFileURL = '';\n this.verifiedFiles = [];\n this.verifiedFilesCount = 0;\n this.errorFiles = [];\n this.errorFilesCount = 0;\n this.uploadStatusFileName = '';\n this.uploadStatusText = '';\n this.currentFile = {};\n this.currentFileName = '';\n this.currentFilePlacementMode = '';\n this.currentFileSignaturePlacement = {};\n this.verificationProcessEnabled = false;\n this.verificationProcessActive = false;\n this.previewInProgress = false;\n this.currentPreviewQueueKey = '';\n\n this.fileHandlingEnabledTargets = 'local';\n\n // will be set in function update\n this.verificationUrl = '';\n }\n\n static get scopedElements() {\n return {\n 'dbp-icon': Icon,\n 'dbp-file-source': FileSource,\n 'dbp-pdf-preview': PdfPreview,\n 'dbp-mini-spinner': MiniSpinner,\n 'dbp-button': Button,\n };\n }\n\n static get properties() {\n return {\n ...super.properties,\n lang: {type: String},\n entryPointUrl: {type: String, attribute: 'entry-point-url'},\n nextcloudWebAppPasswordURL: {type: String, attribute: 'nextcloud-web-app-password-url'},\n nextcloudWebDavURL: {type: String, attribute: 'nextcloud-webdav-url'},\n nextcloudName: {type: String, attribute: 'nextcloud-name'},\n nextcloudFileURL: {type: String, attribute: 'nextcloud-file-url'},\n verifiedFiles: {type: Array, attribute: false},\n verifiedFilesCount: {type: Number, attribute: false},\n queuedFilesCount: {type: Number, attribute: false},\n errorFiles: {type: Array, attribute: false},\n errorFilesCount: {type: Number, attribute: false},\n uploadInProgress: {type: Boolean, attribute: false},\n uploadStatusFileName: {type: String, attribute: false},\n uploadStatusText: {type: String, attribute: false},\n verificationProcessEnabled: {type: Boolean, attribute: false},\n verificationProcessActive: {type: Boolean, attribute: false},\n queueBlockEnabled: {type: Boolean, attribute: false},\n currentFile: {type: Object, attribute: false},\n currentFileName: {type: String, attribute: false},\n previewInProgress: {type: Boolean, attribute: false},\n isSignaturePlacement: {type: Boolean, attribute: false},\n fileHandlingEnabledTargets: {type: String, attribute: 'file-handling-enabled-targets'},\n };\n }\n\n connectedCallback() {\n super.connectedCallback();\n // needs to be called in a function to get the variable scope of \"this\"\n setInterval(() => {\n this.handleQueuedFiles();\n }, 1000);\n }\n\n /**\n * Processes queued files\n */\n async handleQueuedFiles() {\n this.endVerificationProcessIfQueueEmpty();\n if (this.queuedFilesCount === 0) {\n // reset verificationProcessEnabled button\n this.verificationProcessEnabled = false;\n return;\n }\n\n if (!this.verificationProcessEnabled || this.uploadInProgress) {\n return;\n }\n\n this.previewInProgress = false;\n\n const key = Object.keys(this.queuedFiles)[0];\n\n // take the file off the queue\n let file = this.takeFileFromQueue(key);\n this.currentFile = file;\n\n this.uploadInProgress = true;\n let params = {};\n\n this.uploadStatusText = this._i18n.t('signature-verification.upload-status-file-text', {\n fileName: file.name,\n fileSize: humanFileSize(file.size, false),\n });\n\n await this.uploadFile(file, params);\n this.uploadInProgress = false;\n }\n\n /**\n * Called when preview is \"canceled\"\n *\n * @param event\n */\n hidePDF(event) {\n this.previewInProgress = false;\n }\n\n /**\n * Decides if the \"beforeunload\" event needs to be canceled\n *\n * @param event\n */\n onReceiveBeforeUnload(event) {\n // we don't need to stop if there are no signed files\n if (this.verifiedFilesCount === 0) {\n return;\n }\n\n // we need to handle custom events ourselves\n if (!event.isTrusted) {\n // note that this only works with custom event since calls of \"confirm\" are ignored\n // in the non-custom event, see https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event\n const result = confirm(this._i18n.t('signature-verification.confirm-page-leave'));\n\n // don't stop the page leave if the user wants to leave\n if (result) {\n return;\n }\n }\n\n // Cancel the event as stated by the standard\n event.preventDefault();\n\n // Chrome requires returnValue to be set\n event.returnValue = '';\n }\n\n endVerificationProcessIfQueueEmpty() {\n if (this.queuedFilesCount === 0 && this.verificationProcessActive) {\n this.verificationProcessActive = false;\n }\n }\n\n /**\n * @param ev\n */\n onFileSelected(ev) {\n console.log('File was selected: ev', ev);\n this.queueFile(ev.detail.file);\n }\n\n addToErrorFiles(file) {\n this.endVerificationProcessIfQueueEmpty();\n\n // this doesn't seem to trigger an update() execution\n this.errorFiles[Math.floor(Math.random() * 1000000)] = file;\n // this triggers the correct update() execution\n this.errorFilesCount++;\n\n this.sendSetPropertyEvent('analytics-event', {\n category: 'officiallyVerification',\n action: 'VerificationFailed',\n name: file.json['hydra:description'],\n });\n }\n\n /**\n * @param data\n */\n onFileUploadFinished(data) {\n if (data.status !== 201) {\n this.addToErrorFiles(data);\n } else if (\n data.json['@type'] === 'https://schema.tugraz.at/ElectronicSignatureVerificationReport'\n ) {\n // this doesn't seem to trigger an update() execution\n this.verifiedFiles.push(data.json);\n // this triggers the correct update() execution\n this.verifiedFilesCount++;\n const entryPoint = data.json;\n this.currentFileName = entryPoint.name;\n this.endVerificationProcessIfQueueEmpty();\n }\n }\n\n update(changedProperties) {\n changedProperties.forEach((oldValue, propName) => {\n switch (propName) {\n case 'lang':\n this._i18n.changeLanguage(this.lang);\n break;\n case 'entryPointUrl':\n JSONLD.getInstance(this.entryPointUrl).then((jsonld) => {\n let apiUrlBase;\n try {\n apiUrlBase = jsonld.getApiUrlForEntityName(\n 'EsignElectronicSignatureVerificationReport'\n );\n } catch (error) {\n apiUrlBase = jsonld.getApiUrlForEntityName(\n 'ElectronicSignatureVerificationReport'\n );\n }\n this.fileSourceUrl = apiUrlBase;\n });\n break;\n }\n\n // console.log(propName, oldValue);\n });\n\n super.update(changedProperties);\n }\n\n onLanguageChanged(e) {\n this.lang = e.detail.lang;\n }\n\n /**\n * Re-Upload all failed files\n */\n reUploadAllClickHandler() {\n const that = this;\n\n // we need to make a copy and reset the queue or else our queue will run crazy\n const errorFilesCopy = {...this.errorFiles};\n this.errorFiles = [];\n this.errorFilesCount = 0;\n\n commonUtils.asyncObjectForEach(errorFilesCopy, async (file, id) => {\n await this.fileQueueingClickHandler(file.file, id);\n });\n\n that._('#re-upload-all-button').stop();\n }\n\n /**\n * Queues a failed pdf-file again\n *\n * @param file\n * @param id\n */\n async fileQueueingClickHandler(file, id) {\n this.takeFailedFileFromQueue(id);\n return this.queueFile(file);\n }\n\n /**\n * Shows the preview\n *\n * @param key\n */\n async showPreview(key) {\n if (this.verificationProcessEnabled) {\n return;\n }\n\n const file = this.getQueuedFile(key);\n this.currentFile = file;\n this.currentPreviewQueueKey = key;\n console.log(file);\n // start signature placement process\n this.previewInProgress = true;\n const previewTag = this.getScopedTagName('dbp-pdf-preview');\n await this._(previewTag).showPDF(file);\n }\n\n /**\n * Takes a failed file off of the queue\n *\n * @param key\n */\n takeFailedFileFromQueue(key) {\n const file = this.errorFiles.splice(key, 1);\n this.errorFilesCount = Object.keys(this.errorFiles).length;\n return file;\n }\n\n clearVerifiedFiles() {\n this.verifiedFiles = [];\n this.verifiedFilesCount = 0;\n }\n\n clearErrorFiles() {\n this.errorFiles = [];\n this.errorFilesCount = 0;\n }\n\n isUserInterfaceDisabled() {\n return this.previewInProgress || this.externalAuthInProgress || this.uploadInProgress;\n }\n\n static get styles() {\n // language=css\n return css`\n ${commonStyles.getThemeCSS()}\n ${commonStyles.getGeneralCSS(false)}\n ${commonStyles.getButtonCSS()}\n ${commonStyles.getNotificationCSS()}\n ${SignatureStyles.getSignatureCss()}\n \n \n\n .file-block {\n max-width: 320px;\n }\n\n .file-block.error .header {\n grid-template-columns: auto 90px;\n }\n\n .file-block div.bottom-line {\n display: grid;\n align-items: center;\n grid-template-columns: auto 190px;\n grid-gap: 10px;\n margin-top: 10px;\n }\n `;\n }\n\n /**\n * Returns the list of queued files\n *\n * @returns {*[]} Array of html templates\n */\n getQueuedFilesHtml() {\n const i18n = this._i18n;\n const ids = Object.keys(this.queuedFiles);\n let results = [];\n\n ids.forEach((id) => {\n const file = this.queuedFiles[id];\n\n results.push(html`\n <div class=\"file-block\">\n <div class=\"header\">\n <span class=\"filename\">\n <strong>${file.name}</strong>\n (${humanFileSize(file.size)})\n </span>\n <button\n class=\"button close\"\n ?disabled=\"${this.verificationProcessEnabled}\"\n title=\"${i18n.t(\n 'signature-verification.remove-queued-file-button-title'\n )}\"\n @click=\"${() => {\n this.takeFileFromQueue(id);\n }}\">\n <dbp-icon name=\"trash\"></dbp-icon>\n </button>\n </div>\n <div class=\"bottom-line\">\n <div></div>\n <button\n class=\"button\"\n ?disabled=\"${this.verificationProcessEnabled}\"\n @click=\"${() => {\n this.showPreview(id);\n }}\">\n ${i18n.t('signature-verification.show-preview')}\n </button>\n </div>\n </div>\n `);\n });\n\n return results;\n }\n\n /**\n * Returns the list of successfully signed files\n *\n * @returns {*[]} Array of html templates\n */\n getVerifiedFilesHtml() {\n const ids = Object.keys(this.verifiedFiles);\n const i18n = this._i18n;\n let results = [];\n\n ids.forEach((id) => {\n const report = this.verifiedFiles[id];\n console.log('report', report);\n let signatures = [];\n\n report.signatures.forEach((signature) => {\n console.log('signature', signature);\n\n signatures.push(html`\n <tr>\n <td>${signature.givenName}</td>\n <td>${signature.familyName}</td>\n <td>${signature.nationality}</td>\n <td>${signature.serialNumber}</td>\n <td\n class=\"${classMap({\n 'verification-ok': signature.valueMessage === 'OK',\n })}\">\n ${signature.valueMessage}\n </td>\n </tr>\n `);\n });\n\n results.push(html`\n <div class=\"file-block\">\n <div class=\"header\">\n <span class=\"filename\"><strong>${report.name}</strong></span>\n </div>\n <table class=\"signatures ${classMap({hidden: signatures.length === 0})}\">\n <thead>\n <th>${i18n.t('signature-verification.given-name')}</th>\n <th>${i18n.t('signature-verification.last-name')}</th>\n <th>${i18n.t('signature-verification.nationality')}</th>\n <th>${i18n.t('signature-verification.serial-number')}</th>\n <th>${i18n.t('signature-verification.value-message')}</th>\n </thead>\n <tbody>${signatures}</tbody>\n </table>\n <div class=\"${classMap({hidden: signatures.length !== 0})}\">\n ${i18n.t('signature-verification.no-signatures-found')}\n </div>\n </div>\n `);\n });\n\n return results;\n }\n\n /**\n * Returns the list of files of failed signature processes\n *\n * @returns {*[]} Array of html templates\n */\n getErrorFilesHtml() {\n const ids = Object.keys(this.errorFiles);\n const i18n = this._i18n;\n let results = [];\n\n ids.forEach((id) => {\n const data = this.errorFiles[id];\n\n if (data.file === undefined) {\n return;\n }\n\n results.push(html`\n <div class=\"file-block error\">\n <div class=\"header\">\n <span class=\"filename\">\n <strong>${data.file.name}</strong>\n (${humanFileSize(data.file.size)})\n </span>\n <div class=\"buttons\">\n <button\n class=\"button\"\n title=\"${i18n.t(\n 'signature-verification.re-upload-file-button-title'\n )}\"\n @click=\"${() => {\n this.fileQueueingClickHandler(data.file, id);\n }}\">\n <dbp-icon name=\"reload\"></dbp-icon>\n </button>\n <button\n class=\"button\"\n title=\"${i18n.t(\n 'signature-verification.remove-failed-file-button-title'\n )}\"\n @click=\"${() => {\n this.takeFailedFileFromQueue(id);\n }}\">\n <dbp-icon name=\"trash\"></dbp-icon>\n </button>\n </div>\n </div>\n <div class=\"bottom-line\">\n <strong class=\"error\">${data.json['hydra:description']}</strong>\n </div>\n </div>\n `);\n });\n\n return results;\n }\n\n hasSignaturePermissions() {\n return this._hasSignaturePermissions('ROLE_SCOPE_OFFICIAL-SIGNATURE');\n }\n\n render() {\n const i18n = this._i18n;\n const placeholderUrl = commonUtils.getAssetURL(\n pkgName,\n 'official-signature-placeholder.png'\n );\n const activity = new Activity(metadata);\n\n return html`\n <div\n class=\"${classMap({\n hidden:\n !this.isLoggedIn() || !this.hasSignaturePermissions() || this.isLoading(),\n })}\">\n <div class=\"field\">\n <h2>${activity.getName(this.lang)}</h2>\n <p class=\"subheadline\">${activity.getDescription(this.lang)}</p>\n <div class=\"control\">\n <p>${i18n.t('signature-verification.upload-text')}</p>\n <button\n @click=\"${() => {\n this._('#file-source').setAttribute('dialog-open', '');\n }}\"\n ?disabled=\"${this.signingProcessActive}\"\n class=\"button is-primary\">\n ${i18n.t('signature-verification.upload-button-label')}\n </button>\n <dbp-file-source\n id=\"file-source\"\n allowed-mime-types=\"application/pdf\"\n enabled-targets=\"${this.fileHandlingEnabledTargets}\"\n nextcloud-auth-url=\"${this.nextcloudWebAppPasswordURL}\"\n nextcloud-web-dav-url=\"${this.nextcloudWebDavURL}\"\n nextcloud-name=\"${this.nextcloudName}\"\n nextcloud-file-url=\"${this.nextcloudFileURL}\"\n decompress-zip\n lang=\"${this.lang}\"\n ?disabled=\"${this.verificationProcessActive}\"\n context=\"${i18n.t('signature-verification.file-picker-context')}\"\n text=\"${i18n.t('signature-verification.upload-area-text')}\"\n button-label=\"${i18n.t('signature-verification.upload-button-label')}\"\n @dbp-file-source-file-selected=\"${this.onFileSelected}\"\n @dbp-file-source-switched=\"${this\n .onFileSourceSwitch}\"></dbp-file-source>\n </div>\n </div>\n <div id=\"grid-container\">\n <div class=\"left-container\">\n <div\n class=\"files-block field ${classMap({\n hidden: !this.queueBlockEnabled,\n })}\">\n <!-- Queued files headline and queueing spinner -->\n <h3\n class=\"${classMap({\n 'is-disabled': this.isUserInterfaceDisabled(),\n })}\">\n ${i18n.t('signature-verification.queued-files-label')}\n </h3>\n <!-- Buttons to start/stop verification process and clear queue -->\n <div class=\"control field\">\n <button\n @click=\"${this.clearQueuedFiles}\"\n ?disabled=\"${this.queuedFilesCount === 0 ||\n this.verificationProcessActive ||\n this.isUserInterfaceDisabled()}\"\n class=\"button ${classMap({\n 'is-disabled': this.isUserInterfaceDisabled(),\n })}\">\n ${i18n.t('signature-verification.clear-all')}\n </button>\n <button\n @click=\"${() => {\n this.verificationProcessEnabled = true;\n this.verificationProcessActive = true;\n }}\"\n ?disabled=\"${this.queuedFilesCount === 0}\"\n class=\"button is-right is-primary ${classMap({\n 'is-disabled': this.isUserInterfaceDisabled(),\n hidden: this.verificationProcessActive,\n })}\">\n ${i18n.t(\n 'signature-verification.start-verification-process-button'\n )}\n </button>\n <!-- -->\n <button\n @click=\"${this.stopVerificationProcess}\"\n ?disabled=\"${this.uploadInProgress}\"\n id=\"cancel-verification-process\"\n class=\"button is-right ${classMap({\n hidden: !this.verificationProcessActive,\n })}\">\n ${i18n.t(\n 'signature-verification.stop-verification-process-button'\n )}\n </button>\n <!-- -->\n </div>\n <!-- List of queued files -->\n <div\n class=\"control file-list ${classMap({\n 'is-disabled': this.isUserInterfaceDisabled(),\n })}\">\n ${this.getQueuedFilesHtml()}\n </div>\n <!-- Text \"queue empty\" -->\n <div\n class=\"empty-queue control ${classMap({\n hidden: this.queuedFilesCount !== 0,\n 'is-disabled': this.isUserInterfaceDisabled(),\n })}\">\n ${i18n.t('signature-verification.queued-files-empty1')}\n <br />\n ${i18n.t('signature-verification.queued-files-empty2')}\n </div>\n </div>\n <!-- List of errored files -->\n <div\n class=\"files-block error-files field ${classMap({\n hidden: this.errorFilesCount === 0,\n 'is-disabled': this.isUserInterfaceDisabled(),\n })}\">\n <h3>${i18n.t('signature-verification.error-files-label')}</h3>\n <!-- Button to upload errored files again -->\n <div class=\"field ${classMap({hidden: this.errorFilesCount === 0})}\">\n <div class=\"control\">\n <button @click=\"${this.clearErrorFiles}\" class=\"button\">\n ${i18n.t('signature-verification.clear-all')}\n </button>\n <dbp-button\n id=\"re-upload-all-button\"\n ?disabled=\"${this.uploadInProgress}\"\n value=\"${i18n.t(\n 'signature-verification.re-upload-all-button'\n )}\"\n title=\"${i18n.t(\n 'signature-verification.re-upload-all-button-title'\n )}\"\n class=\"is-right\"\n @click=\"${this.reUploadAllClickHandler}\"\n type=\"is-primary\"></dbp-button>\n </div>\n </div>\n <div class=\"control\">${this.getErrorFilesHtml()}</div>\n </div>\n </div>\n <div class=\"right-container\">\n <!-- PDF preview -->\n <div\n id=\"pdf-preview\"\n class=\"field ${classMap({hidden: !this.previewInProgress})}\">\n <h2>${i18n.t('signature-verification.preview-label')}</h2>\n <div class=\"box-header\">\n <div class=\"filename\">\n <strong>${this.currentFile.name}</strong>\n (${humanFileSize(\n this.currentFile !== undefined ? this.currentFile.size : 0\n )})\n </div>\n <button class=\"is-cancel\" @click=\"${this.hidePDF}\">\n <dbp-icon name=\"close\"></dbp-icon>\n </button>\n </div>\n <dbp-pdf-preview\n lang=\"${this.lang}\"\n allow-signature-rotation\n signature-placeholder-image-src=\"${placeholderUrl}\"\n signature-width=\"146\"\n signature-height=\"42\"\n @dbp-pdf-preview-cancel=\"${this.hidePDF}\"></dbp-pdf-preview>\n </div>\n <!-- File upload progress -->\n <div\n id=\"upload-progress\"\n class=\"field notification is-info ${classMap({\n hidden: !this.uploadInProgress,\n })}\">\n <dbp-mini-spinner></dbp-mini-spinner>\n <strong>${this.uploadStatusFileName}</strong>\n ${this.uploadStatusText}\n </div>\n </div>\n </div>\n <!-- List of verified PDFs -->\n <div\n class=\"verified-files files-block field ${classMap({\n hidden: this.verifiedFilesCount === 0,\n 'is-disabled': this.isUserInterfaceDisabled(),\n })}\">\n <h3>${i18n.t('signature-verification.verified-files-label')}</h3>\n <!-- Button to clear verified PDFs -->\n <div class=\"field ${classMap({hidden: this.verifiedFilesCount === 0})}\">\n <div class=\"control\">\n <button @click=\"${this.clearVerifiedFiles}\" class=\"button\">\n ${i18n.t('signature-verification.clear-all')}\n </button>\n </div>\n </div>\n <div class=\"control\">${this.getVerifiedFilesHtml()}</div>\n </div>\n </div>\n <div\n class=\"notification is-warning ${classMap({\n hidden: this.isLoggedIn() || this.isLoading(),\n })}\">\n ${i18n.t('error-login-message')}\n </div>\n <div\n class=\"notification is-danger ${classMap({\n hidden:\n this.hasSignaturePermissions() || !this.isLoggedIn() || this.isLoading(),\n })}\">\n ${i18n.t('error-permission-message')}\n </div>\n <div class=\"${classMap({hidden: !this.isLoading()})}\">\n <dbp-mini-spinner></dbp-mini-spinner>\n </div>\n `;\n }\n}\n\ncommonUtils.defineCustomElement('dbp-signature-verification-full', SignatureVerificationFull);\n"],"names":["SignatureVerificationFull","ScopedElementsMixin","DBPSignatureLitElement","constructor","super","this","_i18n","createInstance","lang","language","entryPointUrl","nextcloudWebAppPasswordURL","nextcloudWebDavURL","nextcloudName","nextcloudFileURL","verifiedFiles","verifiedFilesCount","errorFiles","errorFilesCount","uploadStatusFileName","uploadStatusText","currentFile","currentFileName","currentFilePlacementMode","currentFileSignaturePlacement","verificationProcessEnabled","verificationProcessActive","previewInProgress","currentPreviewQueueKey","fileHandlingEnabledTargets","verificationUrl","scopedElements","Icon","FileSource","PdfPreview","MiniSpinner","Button","properties","_extends","type","String","attribute","Array","Number","queuedFilesCount","uploadInProgress","Boolean","queueBlockEnabled","Object","isSignaturePlacement","connectedCallback","setInterval","handleQueuedFiles","async","endVerificationProcessIfQueueEmpty","key","keys","queuedFiles","file","takeFileFromQueue","t","fileName","name","fileSize","humanFileSize","size","uploadFile","hidePDF","event","onReceiveBeforeUnload","isTrusted","confirm","preventDefault","returnValue","onFileSelected","ev","console","log","queueFile","detail","addToErrorFiles","Math","floor","random","sendSetPropertyEvent","category","action","json","onFileUploadFinished","data","status","push","entryPoint","update","changedProperties","forEach","oldValue","propName","changeLanguage","JSONLD","getInstance","then","jsonld","apiUrlBase","getApiUrlForEntityName","error","fileSourceUrl","onLanguageChanged","e","reUploadAllClickHandler","_this","errorFilesCopy","commonUtils.asyncObjectForEach","id","fileQueueingClickHandler","_","stop","takeFailedFileFromQueue","getQueuedFile","previewTag","getScopedTagName","showPDF","splice","length","clearVerifiedFiles","clearErrorFiles","isUserInterfaceDisabled","externalAuthInProgress","styles","css","_t","commonStyles.getThemeCSS","commonStyles.getGeneralCSS","commonStyles.getButtonCSS","commonStyles.getNotificationCSS","SignatureStyles.getSignatureCss","getQueuedFilesHtml","i18n","ids","results","html","_t2","showPreview","getVerifiedFilesHtml","report","signatures","signature","_t3","givenName","familyName","nationality","serialNumber","classMap","valueMessage","_t4","hidden","getErrorFilesHtml","undefined","_t5","hasSignaturePermissions","_hasSignaturePermissions","render","placeholderUrl","commonUtils.getAssetURL","pkgName","activity","Activity","metadata","_t6","isLoggedIn","isLoading","getName","getDescription","setAttribute","signingProcessActive","onFileSourceSwitch","clearQueuedFiles","stopVerificationProcess","commonUtils.defineCustomElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;s5BAiBA,MAAMA,UAAkCC,EAAoBC,IACxDC,cACIC,QACAC,KAAKC,MAAQC,IACbF,KAAKG,KAAOH,KAAKC,MAAMG,SACvBJ,KAAKK,cAAgB,GACrBL,KAAKM,2BAA6B,GAClCN,KAAKO,mBAAqB,GAC1BP,KAAKQ,cAAgB,GACrBR,KAAKS,iBAAmB,GACxBT,KAAKU,cAAgB,GACrBV,KAAKW,mBAAqB,EAC1BX,KAAKY,WAAa,GAClBZ,KAAKa,gBAAkB,EACvBb,KAAKc,qBAAuB,GAC5Bd,KAAKe,iBAAmB,GACxBf,KAAKgB,YAAc,GACnBhB,KAAKiB,gBAAkB,GACvBjB,KAAKkB,yBAA2B,GAChClB,KAAKmB,8BAAgC,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