@idscan/onboarding 2.2.27 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[311],{4550:(e,n,t)=>{function r(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(r,o)}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t.d(n,{o:()=>a});var i="application/javascript",u=function(e){var n=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){o(e,n,t[n])}))}return e}({skipSameOrigin:!0,useBlob:!0},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return!e.includes("://")||e.includes(window.location.origin)?Promise.resolve(e):new Promise((function(t,r){return fetch(e).then((function(e){return e.text()})).then((function(r){var o=new URL(e).href.split("/");o.pop();var u="const _importScripts = importScripts;\nconst _fixImports = (url) => new URL(url, '".concat("".concat(o.join("/"),"/"),"').href;\nimportScripts = (...urls) => _importScripts(...urls.map(_fixImports));"),a="data:".concat(i,",").concat(encodeURIComponent(u+r));n.useBlob&&(a=URL.createObjectURL(new Blob(['importScripts("'.concat(a,'")')],{type:i}))),t(a)})).catch(r)}))},a=function(){var e=function(e){return function(){var n=this,t=arguments;return new Promise((function(o,i){var u=e.apply(n,t);function a(e){r(u,o,i,a,c,"next",e)}function c(e){r(u,o,i,a,c,"throw",e)}a(void 0)}))}}((function(e){var n;return function(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(t){switch(t.label){case 0:return[4,u(e)];case 1:return n=t.sent(),[2,new Worker(n)]}}))}));return function(n){return e.apply(this,arguments)}}()},6790:(e,n,t)=>{t.r(n),t.d(n,{default:()=>s});var r=t(1026);function o(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(r,o)}function i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){"use strict";function e(n){(function(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")})(this,e),function(e,n,t){n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}(this,"worker",void 0),this.worker=n,this.worker.postMessage({fn:"init"})}return function(e,n,t){n&&i(e.prototype,n)}(e,[{key:"process",value:function(e){var n=this;return new Promise((function(t){var r;n.worker.postMessage({fn:"process",iData:e}),n.worker.onmessage=(r=function(e){return function(){var n=this,t=arguments;return new Promise((function(r,i){var u=e.apply(n,t);function a(e){o(u,r,i,a,c,"next",e)}function c(e){o(u,r,i,a,c,"throw",e)}a(void 0)}))}}((function(e){return function(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(n){return t(e.data.blurConfidence),[2]}))})),function(e){return r.apply(this,arguments)})}))}},{key:"drop",value:function(){this.worker.postMessage({fn:"drop"})}}]),e}(),a=t(4550),c=t(4328);function l(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(r,o)}let s=function(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function u(e){l(i,r,o,u,a,"next",e)}function a(e){l(i,r,o,u,a,"throw",e)}u(void 0)}))}}((function(){var e,n;return function(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(t){switch(t.label){case 0:return[4,(0,a.o)("".concat(c.Z.config.chunkPublicPath,"blurWorker.js"))];case 1:return e=t.sent(),n=new u(e),r.Z.setModule("module","blur",n),[2]}}))}))}}]);
1
+ (self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[311],{4550:(e,n,t)=>{function r(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(r,o)}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t.d(n,{o:()=>a});var i="application/javascript",u=function(e){var n=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){o(e,n,t[n])}))}return e}({skipSameOrigin:!0,useBlob:!0},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return!e.includes("://")||e.includes(window.location.origin)?Promise.resolve(e):new Promise((function(t,r){return fetch(e).then((function(e){return e.text()})).then((function(r){var o=new URL(e).href.split("/");o.pop();var u="const _importScripts = importScripts;\nconst _fixImports = (url) => new URL(url, '".concat("".concat(o.join("/"),"/"),"').href;\nimportScripts = (...urls) => _importScripts(...urls.map(_fixImports));"),a="data:".concat(i,",").concat(encodeURIComponent(u+r));n.useBlob&&(a=URL.createObjectURL(new Blob(['importScripts("'.concat(a,'")')],{type:i}))),t(a)})).catch(r)}))},a=function(){var e=function(e){return function(){var n=this,t=arguments;return new Promise((function(o,i){var u=e.apply(n,t);function a(e){r(u,o,i,a,c,"next",e)}function c(e){r(u,o,i,a,c,"throw",e)}a(void 0)}))}}((function(e){var n;return function(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(t){switch(t.label){case 0:return[4,u(e)];case 1:return n=t.sent(),[2,new Worker(n)]}}))}));return function(n){return e.apply(this,arguments)}}()},6790:(e,n,t)=>{t.r(n),t.d(n,{default:()=>s});var r=t(1026);function o(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(r,o)}function i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=function(){"use strict";function e(n){(function(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")})(this,e),function(e,n,t){n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}(this,"worker",void 0),this.worker=n,this.worker.postMessage({fn:"init"})}return function(e,n,t){n&&i(e.prototype,n)}(e,[{key:"process",value:function(e){var n=this;return new Promise((function(t){var r;n.worker.postMessage({fn:"process",iData:e}),n.worker.onmessage=(r=function(e){return function(){var n=this,t=arguments;return new Promise((function(r,i){var u=e.apply(n,t);function a(e){o(u,r,i,a,c,"next",e)}function c(e){o(u,r,i,a,c,"throw",e)}a(void 0)}))}}((function(e){return function(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(n){return t(e.data.blurConfidence),[2]}))})),function(e){return r.apply(this,arguments)})}))}},{key:"drop",value:function(){this.worker.postMessage({fn:"drop"})}}]),e}(),a=t(4550),c=t(4328);function l(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(r,o)}let s=function(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function u(e){l(i,r,o,u,a,"next",e)}function a(e){l(i,r,o,u,a,"throw",e)}u(void 0)}))}}((function(){var e,n;return function(e,n){var t,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(e,u)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(t){switch(t.label){case 0:return[4,(0,a.o)("".concat(c.Z.chunkPublicPath,"blurWorker.js"))];case 1:return e=t.sent(),n=new u(e),r.Z.setModule("module","blur",n),[2]}}))}))}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[373],{4550:(e,n,t)=>{function r(e,n,t,r,o,i,c){try{var u=e[i](c),a=u.value}catch(e){return void t(e)}u.done?n(a):Promise.resolve(a).then(r,o)}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t.d(n,{o:()=>u});var i="application/javascript",c=function(e){var n=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){o(e,n,t[n])}))}return e}({skipSameOrigin:!0,useBlob:!0},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return!e.includes("://")||e.includes(window.location.origin)?Promise.resolve(e):new Promise((function(t,r){return fetch(e).then((function(e){return e.text()})).then((function(r){var o=new URL(e).href.split("/");o.pop();var c="const _importScripts = importScripts;\nconst _fixImports = (url) => new URL(url, '".concat("".concat(o.join("/"),"/"),"').href;\nimportScripts = (...urls) => _importScripts(...urls.map(_fixImports));"),u="data:".concat(i,",").concat(encodeURIComponent(c+r));n.useBlob&&(u=URL.createObjectURL(new Blob(['importScripts("'.concat(u,'")')],{type:i}))),t(u)})).catch(r)}))},u=function(){var e=function(e){return function(){var n=this,t=arguments;return new Promise((function(o,i){var c=e.apply(n,t);function u(e){r(c,o,i,u,a,"next",e)}function a(e){r(c,o,i,u,a,"throw",e)}u(void 0)}))}}((function(e){var n;return function(e,n){var t,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(t)throw TypeError("Generator is already executing.");for(;c;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=n.call(e,c)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(t){switch(t.label){case 0:return[4,c(e)];case 1:return n=t.sent(),[2,new Worker(n)]}}))}));return function(n){return e.apply(this,arguments)}}()},4942:(e,n,t)=>{t.r(n),t.d(n,{default:()=>l});var r=t(1026);function o(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){"use strict";function e(n){(function(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")})(this,e),function(e,n,t){n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}(this,"worker",void 0),this.worker=n}return function(e,n,t){n&&o(e.prototype,n)}(e,[{key:"process",value:function(e){var n=this;return new Promise((function(t){n.worker.postMessage(e),n.worker.onmessage=function(e){t(e.data.segments)}}))}}]),e}(),c=t(4550),u=t(4328);function a(e,n,t,r,o,i,c){try{var u=e[i](c),a=u.value}catch(e){return void t(e)}u.done?n(a):Promise.resolve(a).then(r,o)}let l=function(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function c(e){a(i,r,o,c,u,"next",e)}function u(e){a(i,r,o,c,u,"throw",e)}c(void 0)}))}}((function(){var e,n;return function(e,n){var t,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(t)throw TypeError("Generator is already executing.");for(;c;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=n.call(e,c)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(t){switch(t.label){case 0:return[4,(0,c.o)("".concat(u.Z.config.chunkPublicPath,"bubbleWorker.js"))];case 1:return e=t.sent(),n=new i(e),r.Z.setModule("module","bubble",n),[2]}}))}))}}]);
1
+ (self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[373],{4550:(e,n,t)=>{function r(e,n,t,r,o,i,c){try{var u=e[i](c),a=u.value}catch(e){return void t(e)}u.done?n(a):Promise.resolve(a).then(r,o)}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t.d(n,{o:()=>u});var i="application/javascript",c=function(e){var n=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){o(e,n,t[n])}))}return e}({skipSameOrigin:!0,useBlob:!0},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return!e.includes("://")||e.includes(window.location.origin)?Promise.resolve(e):new Promise((function(t,r){return fetch(e).then((function(e){return e.text()})).then((function(r){var o=new URL(e).href.split("/");o.pop();var c="const _importScripts = importScripts;\nconst _fixImports = (url) => new URL(url, '".concat("".concat(o.join("/"),"/"),"').href;\nimportScripts = (...urls) => _importScripts(...urls.map(_fixImports));"),u="data:".concat(i,",").concat(encodeURIComponent(c+r));n.useBlob&&(u=URL.createObjectURL(new Blob(['importScripts("'.concat(u,'")')],{type:i}))),t(u)})).catch(r)}))},u=function(){var e=function(e){return function(){var n=this,t=arguments;return new Promise((function(o,i){var c=e.apply(n,t);function u(e){r(c,o,i,u,a,"next",e)}function a(e){r(c,o,i,u,a,"throw",e)}u(void 0)}))}}((function(e){var n;return function(e,n){var t,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(t)throw TypeError("Generator is already executing.");for(;c;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=n.call(e,c)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(t){switch(t.label){case 0:return[4,c(e)];case 1:return n=t.sent(),[2,new Worker(n)]}}))}));return function(n){return e.apply(this,arguments)}}()},4942:(e,n,t)=>{t.r(n),t.d(n,{default:()=>l});var r=t(1026);function o(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=function(){"use strict";function e(n){(function(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")})(this,e),function(e,n,t){n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t}(this,"worker",void 0),this.worker=n}return function(e,n,t){n&&o(e.prototype,n)}(e,[{key:"process",value:function(e){var n=this;return new Promise((function(t){n.worker.postMessage(e),n.worker.onmessage=function(e){t(e.data.segments)}}))}}]),e}(),c=t(4550),u=t(4328);function a(e,n,t,r,o,i,c){try{var u=e[i](c),a=u.value}catch(e){return void t(e)}u.done?n(a):Promise.resolve(a).then(r,o)}let l=function(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function c(e){a(i,r,o,c,u,"next",e)}function u(e){a(i,r,o,c,u,"throw",e)}c(void 0)}))}}((function(){var e,n;return function(e,n){var t,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(t)throw TypeError("Generator is already executing.");for(;c;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=n.call(e,c)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}(this,(function(t){switch(t.label){case 0:return[4,(0,c.o)("".concat(u.Z.chunkPublicPath,"bubbleWorker.js"))];case 1:return e=t.sent(),n=new i(e),r.Z.setModule("module","bubble",n),[2]}}))}))}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[343],{4550:(e,t,r)=>{function n(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{o:()=>c});var i="application/javascript",u=function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}({skipSameOrigin:!0,useBlob:!0},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return!e.includes("://")||e.includes(window.location.origin)?Promise.resolve(e):new Promise((function(r,n){return fetch(e).then((function(e){return e.text()})).then((function(n){var o=new URL(e).href.split("/");o.pop();var u="const _importScripts = importScripts;\nconst _fixImports = (url) => new URL(url, '".concat("".concat(o.join("/"),"/"),"').href;\nimportScripts = (...urls) => _importScripts(...urls.map(_fixImports));"),c="data:".concat(i,",").concat(encodeURIComponent(u+n));t.useBlob&&(c=URL.createObjectURL(new Blob(['importScripts("'.concat(c,'")')],{type:i}))),r(c)})).catch(n)}))},c=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var u=e.apply(t,r);function c(e){n(u,o,i,c,a,"next",e)}function a(e){n(u,o,i,c,a,"throw",e)}c(void 0)}))}}((function(e){var t;return function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(r){switch(r.label){case 0:return[4,u(e)];case 1:return t=r.sent(),[2,new Worker(t)]}}))}));return function(t){return e.apply(this,arguments)}}()},5470:(e,t,r)=>{r.r(t),r.d(t,{default:()=>I});var n=r(4328),o=r(1026),i=r(8736),u=r(6955),c=r(813),a=r(683),l=["0","1","2","3","4","*","5","6","7","*","8","9","A","*","B","C","*","D","*","E","*","F","*","G","*","H","I","J","*","K","*","L","*","M","N","O","P","*","Q","R","*","S","T","*","U","*","V","*","W","X","Y","*","Z","<","*"];function s(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h(e);if(t){var o=h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)&&"function"!=typeof t?s(e):t}(this,r)}}var m=[1,28,28,1],w=function(e){"use strict";b(r,e);var t=d(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.z.WASM,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),y(s(e=t.call(this,n,o,i)),"promiseList",void 0),y(s(e),"predictionList",void 0),e}return function(e,t,r){t&&p(e.prototype,t)}(r,[{key:"predict",value:function(e){var t=y({},"input_1",new i.Tensor("float32",e,m));return this.session.run(t)}},{key:"predictFromArray",value:function(e,t){var r=this;return function(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){f(i,n,o,u,c,"next",e)}function c(e){f(i,n,o,u,c,"throw",e)}u(void 0)}))}}((function(){var n,o;return function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(i){switch(i.label){case 0:if(r.promiseList||(r.promiseList=Array(t).fill(0)),r.predictionList||(r.predictionList=Array(t).fill(0)),r.loading)return[2,[]];for(o=0,n=(0,a.Fv)(e,a.eQ.STANDART);o<t;o+=1)r.promiseList[o]=r.predict(n.subarray(784*o,784*(o+1)));return[4,Promise.all(r.promiseList)];case 1:return i.sent().forEach((function(e,t){r.predictionList[t]=r.interpret(e.dense.data)})),[2,r.predictionList]}}))}))()}},{key:"interpret",value:function(e){return Array.from(e).map((function(e,t){return{value:l[t],confidence:e}})).sort((function(e,t){return e.confidence-t.confidence})).slice(-3).reverse()}},{key:"isLoading",get:function(){return this.loading}},{key:"predictFromImage",value:function(e,t){}}]),r}(u.Z),g=r(4554);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function O(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}function P(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){O(i,n,o,u,c,"next",e)}function c(e){O(i,n,o,u,c,"throw",e)}u(void 0)}))}}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function j(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){j(e,t,r[t])}))}return e}function R(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],u=!0,c=!1;try{for(o=o.call(e);!(u=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);u=!0);}catch(e){c=!0,n=e}finally{try{u||null==o.return||o.return()}finally{if(c)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return k(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}var M=function(){"use strict";function e(t,r,n){var o=this;(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),j(this,"w",0),j(this,"h",0),j(this,"successCount",0),j(this,"worker",void 0),j(this,"model",void 0),j(this,"isInitialized",!1),j(this,"isProcessing",!1),j(this,"MIN_MRZ_FRAMES",3),this.model=new w("".concat(g.t.$I),c.z.WASM,n),this.worker=t,this.worker.postMessage({fn:"init",initData:{key:r,networkUrl:n}}),this.worker.onmessage=function(e){var t=e.data,r=t.name,n=t.data;"initialization"===r&&(o.isInitialized=n)}}return function(e,t,r){t&&S(e.prototype,t)}(e,[{key:"getErrorVal",value:function(e){var t;return-3===e&&(t=0),-2===e&&(t=1),t}},{key:"licenseError",value:function(e){return{error:!0,errorType:"licenceKeyError",errorVal:this.getErrorVal(e)}}},{key:"yComparator",value:function(e,t){return e.y<t.y?[e,t]:[t,e]}},{key:"allocate",value:function(){}},{key:"prepareMRZlocation",value:function(e){var t=[e.leftTop,e.rightTop,e.rightBottom,e.leftBottom].sort((function(e,t){return e.x-t.x})),r=E(this.yComparator(t[0],t[1]),2),n=r[0],o=r[1],i=E(this.yComparator(t[2],t[3]),2),u=i[0],c=i[1];return{leftTop:{x:n.x-.03,y:n.y-.03},rightTop:{x:u.x+.03,y:u.y-.03},rightBottom:{x:c.x+.03,y:c.y+.03},leftBottom:{x:o.x-.03,y:o.y+.03}}}},{key:"writeResults",value:function(e){var t={mrzText:""},r=e.fields.filter((function(e){return-1!==e.name.indexOf("Line")&&e.value.length>0})).map((function(e){return e.value})).join("\n");return r.length>0&&(t.mrzText=window.btoa(r)),t}},{key:"predict",value:function(e,t){var r=this;return P((function(){var n;return A(this,(function(o){switch(o.label){case 0:return[4,r.model.predictFromArray(e,t)];case 1:return(n=o.sent()).filter((function(e){return"*"===E(e,1)[0].value})).length>3?[4,r.model.predictFromArray(e.reverse(),t)]:[3,3];case 2:n=o.sent(),o.label=3;case 3:return[2,n]}}))}))()}},{key:"scan",value:function(e){var t=this;return new Promise((function(r){var n;t.worker.postMessage({fn:"prepare",iData:e}),t.worker.onmessage=(n=P((function(e){var n,o,i,u;return A(this,(function(c){switch(c.label){case 0:return o=(n=e.data).name,i=n.data,"batchArr"!==o?[3,2]:[4,t.predict(i.batchArr,i.batchSize)];case 1:return u=c.sent(),t.worker.postMessage({fn:"process",predictions:u}),[2];case 2:return"result"===o&&r(i),r(i),[2]}}))})),function(e){return n.apply(this,arguments)})}))}},{key:"processMRZ",value:function(e){var t=this;return P((function(){var r,n,o,i,u,c,a;return A(this,(function(l){switch(l.label){case 0:return n={status:!1,cancel:!1,touch:!1,image:null,type:"mrz",isSuccessProcess:!1},t.isProcessing||!t.isInitialized?[2,n]:(t.isProcessing=!0,[4,t.scan(e)]);case 1:return(null==(o=l.sent())?void 0:o.errorId)?(t.isProcessing=!1,[2,R(x({},o),{error:t.licenseError(o.errorId)})]):(o&&0===(null==o||null===(r=o.status)||void 0===r?void 0:r.value)&&(null==o?void 0:o.count)>0?(u=(i=t.estimateResults(o))===o.count&&o.symbolsConf>.95?"green":"yellow",n.coords={locations:t.prepareMRZlocation(o.location),color:u},c=i===o.count&&o.symbolsConf>.85,a=i>=o.count-2,(c||a)&&(t.successCount+=1,n.isSuccessProcess=!0,t.successCount>=t.MIN_MRZ_FRAMES&&(n.status=!0,n.needToCut=!0,n.image=e,n.results=t.writeResults(o)))):(n.coords=null,t.successCount=0),t.isProcessing=!1,[2,n])}}))}))()}},{key:"estimateResults",value:function(e){return 0===e.count?0:e.fields.reduce((function(e,t){return"Valid"===t.status?e+1:e}),0)}},{key:"detectMrz",value:function(e){var t=this;return P((function(){var r,n,o;return A(this,(function(i){switch(i.label){case 0:return[4,t.scan(e)];case 1:return r=i.sent(),n=!0,r&&r.count>0&&r.symbolsConf>.8?[2,{status:!0,locations:t.prepareMRZlocation(r.location),results:t.writeResults(r),isNotMRZ:n=!1}]:(r&&r.symbolsConf>.6&&(n=!1),o={status:!1,isNotMRZ:n},(null==r?void 0:r.errorId)&&(o.error=t.licenseError(r.errorId)),[2,o])}}))}))()}}]),e}(),_=r(4295),T=r(4550);function C(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}let I=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){C(i,n,o,u,c,"next",e)}function c(e){C(i,n,o,u,c,"throw",e)}u(void 0)}))}}((function(e){var t,r,i,u;return function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(c){switch(c.label){case 0:return(t=e.commonLicenseKey)?[3,1]:((0,_.Z)(),[3,3]);case 1:return[4,(0,T.o)("".concat(n.Z.config.chunkPublicPath,"mrzWorker.js"))];case 2:i=c.sent(),u=new M(i,t,n.Z.networkUrl),o.Z.setModule("module","mrz",u),r=[u.model.initialize.bind(u.model)],c.label=3;case 3:return[2,r]}}))}));return function(t){return e.apply(this,arguments)}}()}}]);
1
+ (self.webpackChunk_idscan_idvc2=self.webpackChunk_idscan_idvc2||[]).push([[343],{4550:(e,t,r)=>{function n(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,{o:()=>c});var i="application/javascript",u=function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){o(e,t,r[t])}))}return e}({skipSameOrigin:!0,useBlob:!0},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return!e.includes("://")||e.includes(window.location.origin)?Promise.resolve(e):new Promise((function(r,n){return fetch(e).then((function(e){return e.text()})).then((function(n){var o=new URL(e).href.split("/");o.pop();var u="const _importScripts = importScripts;\nconst _fixImports = (url) => new URL(url, '".concat("".concat(o.join("/"),"/"),"').href;\nimportScripts = (...urls) => _importScripts(...urls.map(_fixImports));"),c="data:".concat(i,",").concat(encodeURIComponent(u+n));t.useBlob&&(c=URL.createObjectURL(new Blob(['importScripts("'.concat(c,'")')],{type:i}))),r(c)})).catch(n)}))},c=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var u=e.apply(t,r);function c(e){n(u,o,i,c,a,"next",e)}function a(e){n(u,o,i,c,a,"throw",e)}c(void 0)}))}}((function(e){var t;return function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(r){switch(r.label){case 0:return[4,u(e)];case 1:return t=r.sent(),[2,new Worker(t)]}}))}));return function(t){return e.apply(this,arguments)}}()},5470:(e,t,r)=>{r.r(t),r.d(t,{default:()=>I});var n=r(4328),o=r(1026),i=r(8736),u=r(6955),c=r(813),a=r(683),l=["0","1","2","3","4","*","5","6","7","*","8","9","A","*","B","C","*","D","*","E","*","F","*","G","*","H","I","J","*","K","*","L","*","M","N","O","P","*","Q","R","*","S","T","*","U","*","V","*","W","X","Y","*","Z","<","*"];function s(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h(e);if(t){var o=h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){return!t||"object"!==function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)&&"function"!=typeof t?s(e):t}(this,r)}}var m=[1,28,28,1],w=function(e){"use strict";b(r,e);var t=d(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.z.WASM,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,r),y(s(e=t.call(this,n,o,i)),"promiseList",void 0),y(s(e),"predictionList",void 0),e}return function(e,t,r){t&&p(e.prototype,t)}(r,[{key:"predict",value:function(e){var t=y({},"input_1",new i.Tensor("float32",e,m));return this.session.run(t)}},{key:"predictFromArray",value:function(e,t){var r=this;return function(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){f(i,n,o,u,c,"next",e)}function c(e){f(i,n,o,u,c,"throw",e)}u(void 0)}))}}((function(){var n,o;return function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(i){switch(i.label){case 0:if(r.promiseList||(r.promiseList=Array(t).fill(0)),r.predictionList||(r.predictionList=Array(t).fill(0)),r.loading)return[2,[]];for(o=0,n=(0,a.Fv)(e,a.eQ.STANDART);o<t;o+=1)r.promiseList[o]=r.predict(n.subarray(784*o,784*(o+1)));return[4,Promise.all(r.promiseList)];case 1:return i.sent().forEach((function(e,t){r.predictionList[t]=r.interpret(e.dense.data)})),[2,r.predictionList]}}))}))()}},{key:"interpret",value:function(e){return Array.from(e).map((function(e,t){return{value:l[t],confidence:e}})).sort((function(e,t){return e.confidence-t.confidence})).slice(-3).reverse()}},{key:"isLoading",get:function(){return this.loading}},{key:"predictFromImage",value:function(e,t){}}]),r}(u.Z),g=r(4554);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function O(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}function P(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){O(i,n,o,u,c,"next",e)}function c(e){O(i,n,o,u,c,"throw",e)}u(void 0)}))}}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function j(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){j(e,t,r[t])}))}return e}function R(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],u=!0,c=!1;try{for(o=o.call(e);!(u=(r=o.next()).done)&&(i.push(r.value),!t||i.length!==t);u=!0);}catch(e){c=!0,n=e}finally{try{u||null==o.return||o.return()}finally{if(c)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return k(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}var M=function(){"use strict";function e(t,r,n){var o=this;(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,e),j(this,"w",0),j(this,"h",0),j(this,"successCount",0),j(this,"worker",void 0),j(this,"model",void 0),j(this,"isInitialized",!1),j(this,"isProcessing",!1),j(this,"MIN_MRZ_FRAMES",3),this.model=new w("".concat(g.t.$I),c.z.WASM,n),this.worker=t,this.worker.postMessage({fn:"init",initData:{key:r,networkUrl:n}}),this.worker.onmessage=function(e){var t=e.data,r=t.name,n=t.data;"initialization"===r&&(o.isInitialized=n)}}return function(e,t,r){t&&S(e.prototype,t)}(e,[{key:"getErrorVal",value:function(e){var t;return-3===e&&(t=0),-2===e&&(t=1),t}},{key:"licenseError",value:function(e){return{error:!0,errorType:"licenceKeyError",errorVal:this.getErrorVal(e)}}},{key:"yComparator",value:function(e,t){return e.y<t.y?[e,t]:[t,e]}},{key:"allocate",value:function(){}},{key:"prepareMRZlocation",value:function(e){var t=[e.leftTop,e.rightTop,e.rightBottom,e.leftBottom].sort((function(e,t){return e.x-t.x})),r=E(this.yComparator(t[0],t[1]),2),n=r[0],o=r[1],i=E(this.yComparator(t[2],t[3]),2),u=i[0],c=i[1];return{leftTop:{x:n.x-.03,y:n.y-.03},rightTop:{x:u.x+.03,y:u.y-.03},rightBottom:{x:c.x+.03,y:c.y+.03},leftBottom:{x:o.x-.03,y:o.y+.03}}}},{key:"writeResults",value:function(e){var t={mrzText:""},r=e.fields.filter((function(e){return-1!==e.name.indexOf("Line")&&e.value.length>0})).map((function(e){return e.value})).join("\n");return r.length>0&&(t.mrzText=window.btoa(r)),t}},{key:"predict",value:function(e,t){var r=this;return P((function(){var n;return A(this,(function(o){switch(o.label){case 0:return[4,r.model.predictFromArray(e,t)];case 1:return(n=o.sent()).filter((function(e){return"*"===E(e,1)[0].value})).length>3?[4,r.model.predictFromArray(e.reverse(),t)]:[3,3];case 2:n=o.sent(),o.label=3;case 3:return[2,n]}}))}))()}},{key:"scan",value:function(e){var t=this;return new Promise((function(r){var n;t.worker.postMessage({fn:"prepare",iData:e}),t.worker.onmessage=(n=P((function(e){var n,o,i,u;return A(this,(function(c){switch(c.label){case 0:return o=(n=e.data).name,i=n.data,"batchArr"!==o?[3,2]:[4,t.predict(i.batchArr,i.batchSize)];case 1:return u=c.sent(),t.worker.postMessage({fn:"process",predictions:u}),[2];case 2:return"result"===o&&r(i),r(i),[2]}}))})),function(e){return n.apply(this,arguments)})}))}},{key:"processMRZ",value:function(e){var t=this;return P((function(){var r,n,o,i,u,c,a;return A(this,(function(l){switch(l.label){case 0:return n={status:!1,cancel:!1,touch:!1,image:null,type:"mrz",isSuccessProcess:!1},t.isProcessing||!t.isInitialized?[2,n]:(t.isProcessing=!0,[4,t.scan(e)]);case 1:return(null==(o=l.sent())?void 0:o.errorId)?(t.isProcessing=!1,[2,R(x({},o),{error:t.licenseError(o.errorId)})]):(o&&0===(null==o||null===(r=o.status)||void 0===r?void 0:r.value)&&(null==o?void 0:o.count)>0?(u=(i=t.estimateResults(o))===o.count&&o.symbolsConf>.95?"green":"yellow",n.coords={locations:t.prepareMRZlocation(o.location),color:u},c=i===o.count&&o.symbolsConf>.85,a=i>=o.count-2,(c||a)&&(t.successCount+=1,n.isSuccessProcess=!0,t.successCount>=t.MIN_MRZ_FRAMES&&(n.status=!0,n.needToCut=!0,n.image=e,n.results=t.writeResults(o)))):(n.coords=null,t.successCount=0),t.isProcessing=!1,[2,n])}}))}))()}},{key:"estimateResults",value:function(e){return 0===e.count?0:e.fields.reduce((function(e,t){return"Valid"===t.status?e+1:e}),0)}},{key:"detectMrz",value:function(e){var t=this;return P((function(){var r,n,o;return A(this,(function(i){switch(i.label){case 0:return[4,t.scan(e)];case 1:return r=i.sent(),n=!0,r&&r.count>0&&r.symbolsConf>.8?[2,{status:!0,locations:t.prepareMRZlocation(r.location),results:t.writeResults(r),isNotMRZ:n=!1}]:(r&&r.symbolsConf>.6&&(n=!1),o={status:!1,isNotMRZ:n},(null==r?void 0:r.errorId)&&(o.error=t.licenseError(r.errorId)),[2,o])}}))}))()}}]),e}(),_=r(4295),T=r(4550);function C(e,t,r,n,o,i,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}let I=function(){var e=function(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){C(i,n,o,u,c,"next",e)}function c(e){C(i,n,o,u,c,"throw",e)}u(void 0)}))}}((function(e){var t,r,i,u;return function(e,t){var r,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw TypeError("Generator is already executing.");for(;u;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=t.call(e,u)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(c){switch(c.label){case 0:return(t=e.commonLicenseKey)?[3,1]:((0,_.Z)(),[3,3]);case 1:return[4,(0,T.o)("".concat(n.Z.chunkPublicPath,"mrzWorker.js"))];case 2:i=c.sent(),u=new M(i,t,n.Z.networkUrl),o.Z.setModule("module","mrz",u),r=[u.model.initialize.bind(u.model)],c.label=3;case 3:return[2,r]}}))}));return function(t){return e.apply(this,arguments)}}()}}]);
@@ -1 +1 @@
1
- var __webpack_exports__={},generateFaceColorFromAngle=function(t){var n=Math.abs(Math.trunc(255-t));return n>200&&(n=200),n<50&&(n=50),"rgba(255,215,".concat(n.toString(),",0.3)")},binarize=function(t){var n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120,o=t.width*t.height,i=new Uint8ClampedArray(o);for(n=0;n<o;n+=1){var r=n<<2;77*t.data[r+0]+151*t.data[r+1]+28*t.data[r+2]>>8<e&&(i[n]=1)}return i},topPoint=function(t,n){return t-n},bottomPoint=function(t,n){return t+n},leftPoint=function(t,n){return t%n>1?t-1:-1},rightPoint=function(t,n){return(t+1)%n>=0?t+1:-1},topLeftPoint=function(t,n){return leftPoint(topPoint(t,n),n)},topRightPoint=function(t,n){return rightPoint(topPoint(t,n),n)},bottomLeftPoint=function(t,n){return leftPoint(bottomPoint(t,n),n)},bottomRightPoint=function(t,n){return rightPoint(bottomPoint(t,n),n)},getNeigbors=function(t,n){return[topLeftPoint,topPoint,topRightPoint,rightPoint,bottomRightPoint,bottomPoint,bottomLeftPoint,leftPoint].map((function(e){return e(t,n)}))},segmentize2=function(t,n){var e,o=[],i=[],r=t.length,u=0;for(e=0;e<r;e+=1)0!==t[e]&&(i[u]=new Set,o.push(e),function(){for(;o.length;){var e=o.pop();if(!e)break;t[e]=0,i[u].add(e),getNeigbors(e,n).forEach((function(n){n>0&&0!==t[n]&&n<r&&o.push(n)}))}}(),u+=1);return i},getResizedSizes=function(t,n){var e=n.baseWidth,o=n.baseHeight,i=t,r=t;return e>o&&(r=(i=t)*o/e),o>e&&(i=(r=t)*e/o),{width:Math.trunc(i),height:Math.trunc(r)}},getCrop=function(t,n){var e=t.width/t.height,o=n.width/n.height,i={x:0,y:0,width:n.width,height:n.height};return e>o?(i.height=~~(n.width/e),i.y=(n.height-i.height)/2):(i.width=~~(i.height*e),i.x=(n.width-i.width)/2),i},POINT_FILL_STYLE="rgba(255, 255, 255, 0.5)",POINT_STROKE_STYLE="rgba(255, 255, 255, 0)",SCALE_FACTOR=.3,getColumn=function(t,n){return t%n},getRow=function(t,n){return Math.floor(t/n)},createCoordFromPointIdx=function(t,n){return[getColumn(t,n),getRow(t,n)]},notNull=function(t){return null!=t},coordinateSegment=function(t){var n=t.segments,e=t.width,o=t.scaleWidth,i=t.scaleHeight;return n.map((function(t){var n=Number.MAX_VALUE,r=Number.MAX_VALUE,u=Number.MIN_VALUE,h=Number.MIN_VALUE;t.forEach((function(t){var o=createCoordFromPointIdx(t,e);o[0]<n&&(n=o[0]),o[1]<r&&(r=o[1]),o[0]>u&&(u=o[0]),o[1]>h&&(h=o[1])}));var a=(u-n)*(h-r);return a>5&&a<500?{perimeter:a,x1:Math.trunc(n/SCALE_FACTOR/o),y1:Math.trunc(r/SCALE_FACTOR/i),x2:Math.trunc(u/SCALE_FACTOR/o),y2:Math.trunc(h/SCALE_FACTOR/i)}:null})).filter(notNull)},pointsProcess=function(t,n,e){return coordinateSegment({segments:segmentize2(binarize(t),t.width),width:t.width,scaleWidth:n,scaleHeight:e})};onmessage=function(t){var n=t.data;if(n){var e=pointsProcess(n.iData,n.resizedToBorderScaleWidth,n.resizedToBorderScaleHeight);postMessage({segments:e})}};
1
+ var __webpack_exports__={},generateFaceColorFromAngle=function(t){var n=Math.abs(Math.trunc(255-t));return n>200&&(n=200),n<50&&(n=50),"rgba(255,215,".concat(n.toString(),",0.3)")},binarize=function(t){var n,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120,o=t.width*t.height,i=new Uint8ClampedArray(o);for(n=0;n<o;n+=1){var r=n<<2;77*t.data[r+0]+151*t.data[r+1]+28*t.data[r+2]>>8<e&&(i[n]=1)}return i},topPoint=function(t,n){return t-n},bottomPoint=function(t,n){return t+n},leftPoint=function(t,n){return t%n>1?t-1:-1},rightPoint=function(t,n){return(t+1)%n>=0?t+1:-1},topLeftPoint=function(t,n){return leftPoint(topPoint(t,n),n)},topRightPoint=function(t,n){return rightPoint(topPoint(t,n),n)},bottomLeftPoint=function(t,n){return leftPoint(bottomPoint(t,n),n)},bottomRightPoint=function(t,n){return rightPoint(bottomPoint(t,n),n)},getNeigbors=function(t,n){return[topLeftPoint,topPoint,topRightPoint,rightPoint,bottomRightPoint,bottomPoint,bottomLeftPoint,leftPoint].map((function(e){return e(t,n)}))},segmentize2=function(t,n){var e,o=[],i=[],r=t.length,a=0;for(e=0;e<r;e+=1)0!==t[e]&&(i[a]=new Set,o.push(e),function(){for(;o.length;){var e=o.pop();if(!e)break;t[e]=0,i[a].add(e),getNeigbors(e,n).forEach((function(n){n>0&&0!==t[n]&&n<r&&o.push(n)}))}}(),a+=1);return i},getResizedSizes=function(t,n){var e=n.baseWidth,o=n.baseHeight,i=t,r=t;return e>o&&(r=(i=t)*o/e),o>e&&(i=(r=t)*e/o),{width:Math.trunc(i),height:Math.trunc(r)}},getCrop=function(t,n){var e=t.width/t.height,o=n.width/n.height,i={x:0,y:0,width:n.width,height:n.height};return e>o?(i.height=~~(n.width/e),i.y=(n.height-i.height)/2):(i.width=~~(i.height*e),i.x=(n.width-i.width)/2),i},POINT_FILL_STYLE="rgba(255, 255, 255, 0.5)",POINT_STROKE_STYLE="rgba(255, 255, 255, 0)",SCALE_FACTOR=.3,getColumn=function(t,n){return t%n},getRow=function(t,n){return Math.floor(t/n)},createCoordFromPointIdx=function(t,n){return[getColumn(t,n),getRow(t,n)]},notNull=function(t){return null!=t},coordinateSegment=function(t){var n=t.segments,e=t.width,o=t.scaleWidth,i=t.scaleHeight;return n.map((function(t){var n=Number.MAX_VALUE,r=Number.MAX_VALUE,a=Number.MIN_VALUE,u=Number.MIN_VALUE;t.forEach((function(t){var o=createCoordFromPointIdx(t,e);o[0]<n&&(n=o[0]),o[1]<r&&(r=o[1]),o[0]>a&&(a=o[0]),o[1]>u&&(u=o[1])}));var h=(a-n)*(u-r);return h>5&&h<500?{perimeter:h,x1:Math.trunc(n/SCALE_FACTOR/o),y1:Math.trunc(r/SCALE_FACTOR/i),x2:Math.trunc(a/SCALE_FACTOR/o),y2:Math.trunc(u/SCALE_FACTOR/i)}:null})).filter(notNull)},pointsProcess=function(t,n,e){return coordinateSegment({segments:segmentize2(binarize(t),t.width),width:t.width,scaleWidth:n,scaleHeight:e})};onmessage=function(t){var n=t.data;if(n&&n.iData){var e=pointsProcess(n.iData,n.resizedToBorderScaleWidth,n.resizedToBorderScaleHeight);postMessage({segments:e})}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idscan/onboarding",
3
- "version": "2.2.27",
3
+ "version": "2.3.1",
4
4
  "description": "Wrapper of the IDVC library for DVS Online.",
5
5
  "main": "dist/js/wrapper.js",
6
6
  "types": "dist/@types/src/Wrapper.d.ts",
@@ -20,7 +20,7 @@
20
20
  "minor": "npm version minor"
21
21
  },
22
22
  "dependencies": {
23
- "@idscan/idvc2": "2.7.4",
23
+ "@idscan/idvc2": "2.7.5",
24
24
  "core-js": "^3.30.0",
25
25
  "qrcode": "^1.5.1",
26
26
  "regenerator-runtime": "^0.13.11"
package/readme.md CHANGED
@@ -66,11 +66,11 @@ All configurations of @idscan/IDVC will be fetched from DVS Online by domainId.
66
66
 
67
67
  Available fields:
68
68
 
69
- **el** (string) - id of an element on the page where the component will be integrated. Required.
69
+ **el** (string) - Id of an element on the page where the component will be integrated. Required.
70
70
 
71
- **applicantId** (string) - id of applicant. Required.
71
+ **applicantId** (string) - Id of applicant. Required.
72
72
 
73
- **domainId** (string) - domain id where from will get configs and styles. Required.
73
+ **domainId** (string) - Domain id where from will get configs and styles. Required.
74
74
 
75
75
  **domainApi** (string) - URL address of onboarding API. Required.
76
76
 
@@ -92,25 +92,37 @@ Available fields:
92
92
 
93
93
  **processingImageFormat** (string) - This option switches image format, that used for image processing.
94
94
 
95
- **callbacks** (object) - object with callback hooks. Available next hooks:
95
+ **demoMode** (boolean) - In true mode, the wrapper stops documents validation.
96
96
 
97
- - **onChange** - callback-function which will be called after change one step. The returnable value is the object with the type and the image.
97
+ **wrapperSettings** (object) - Object with wrapper (not IDVC) settings. Allows you to override the config that came from the API. Available fields:
98
98
 
99
- - **onCameraError** - The function that is invoked in case if the camera is not available. The response value is the object with the error code and the message.
99
+ - **showQrCode** - Enable validation on another device using a QR link.
100
100
 
101
- - **onReset** - callback-function which will be called after reset all the steps. The returnable value is the object with the steps.
101
+ - **showConsentForm** - This option switches on/off the displaying consent form.
102
102
 
103
- - **onRetakeHook** - the function that will be called before reset the current step. The returnable value is the object with the current step.
103
+ - **consentText** - This option allows you to set the body text of the consent form.
104
104
 
105
- - **onValidate** - the function that will be called after validation response received. The returnable value is the object with validation information.
105
+ - **checkboxText** - This option allows you to set the confirmation text of the consent form.
106
106
 
107
- - **onError** - the function that will be called on error. The response value is the object with the error code and the message.
107
+ **callbacks** (object) - Object with callback hooks. Available hooks:
108
108
 
109
- - **onReloaded** - the function that will be called after the component finishes reloading. This function doesn't return a value.
109
+ - **onChange** - Callback-function which will be called after change one step. The returnable value is the object with the type and the image.
110
110
 
111
- - **onMounted** - the function that will be called on the component mounted. This function doesn't return a value.
111
+ - **onCameraError** - Callback-function which is invoked in case if the camera is not available. The response value is the object with the error code and the message.
112
112
 
113
- - **submit** - callback-function which will be called after completing all the steps. The returnable value is the object with the following content:
113
+ - **onReset** - Callback-function which will be called after reset all the steps. The returnable value is the object with the steps.
114
+
115
+ - **onRetakeHook** - Callback-function which will be called before reset the current step. The returnable value is the object with the current step.
116
+
117
+ - **onValidate** - Callback-function which will be called after validation response received. The returnable value is the object with validation information.
118
+
119
+ - **onError** - Callback-function which will be called on error. The response value is the object with the error code and the message.
120
+
121
+ - **onReloaded** - Callback-function which will be called after the component finishes reloading. This function doesn't return a value.
122
+
123
+ - **onMounted** - Callback-function which will be called on the component mounted. This function doesn't return a value.
124
+
125
+ - **submit** - Callback-function which will be called after completing all the steps. The returnable value is the object with the following content:
114
126
  ```javascript
115
127
  documentTypes: [
116
128
  {
@@ -161,6 +173,12 @@ btn.addEventListener('click', () => {
161
173
  **updateConfig** (string) - the method that reinitialize wrapper with new config. Parameter is an JSON encoded IDVC config. Works only in demo mode.
162
174
 
163
175
  ## Version history
176
+ - **2.3.1**
177
+ - Updated IDVC component
178
+
179
+ - **2.3.0**
180
+ - feat: added 'wrapperSettings' option that allows you to override the wrapper config that comes from the API. This option works if the 'preferApiConfig' option is set to false.
181
+
164
182
  - **2.2.27**
165
183
  - Updated IDVC component
166
184