From 5a4952eb95e60ff2a9fd8994367817fc685c99d0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 18 Oct 2021 15:01:18 +0200 Subject: [PATCH 01/10] =?UTF-8?q?Up=C3=A8date=20insomnia=20json=20+=20web.?= =?UTF-8?q?api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GPW.Api/GPW.Api/Controllers/VC19Controller.cs | 2 +- GPW.Api/GPW.Api/DCCDecode.cs | 49 +++++++++++++++++-- InsomniaTest/GPW.Api.json | 2 +- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/GPW.Api/GPW.Api/Controllers/VC19Controller.cs b/GPW.Api/GPW.Api/Controllers/VC19Controller.cs index cbe8129..def2d44 100644 --- a/GPW.Api/GPW.Api/Controllers/VC19Controller.cs +++ b/GPW.Api/GPW.Api/Controllers/VC19Controller.cs @@ -51,7 +51,7 @@ namespace GPW.Api.Controllers DTRecord = DateTime.Now, CheckRecorded = true, TimbrRecorder = true, - Result = $"OK, Check Recorded for {DecodedData.Cognome} {DecodedData.Nome} {DecodedData.DOB:yyyy.MM.dd}" + Result = $"OK, Check Recorded for {DecodedData.nam.fn} {DecodedData.nam.gn} {DecodedData.dob:yyyy.MM.dd}" }; return answ; } diff --git a/GPW.Api/GPW.Api/DCCDecode.cs b/GPW.Api/GPW.Api/DCCDecode.cs index a453f80..a8de3bf 100644 --- a/GPW.Api/GPW.Api/DCCDecode.cs +++ b/GPW.Api/GPW.Api/DCCDecode.cs @@ -3,16 +3,55 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +// +// This is here so CodeMaid doesn't reorganize this document +// namespace GPW.Api { public class DCCDecode { - #region Public Properties + public List v { get; set; } - public string Cognome { get; set; } = ""; - public DateTime DOB { get; set; } - public string Nome { get; set; } = ""; + public userVal nam { get; set; } + public DateTime dob { get; set; } + + + public string ver { get; set; } + + public class certVal + { + + public string @is { get; set; } + public string ci { get; set; } + public string co { get; set; } + public int dn { get; set; } + public string dt { get; set; } + public string ma { get; set; } + public string mp { get; set; } + public int sd { get; set; } + public string tg { get; set; } + public string vp { get; set; } + + } + + public class userVal + { + + /// + /// Firstname + /// + public string fn { get; set; } + + public string fnt { get; set; } + + /// + /// Name + /// + public string gn { get; set; } + + public string gnt { get; set; } + + } - #endregion Public Properties } } \ No newline at end of file diff --git a/InsomniaTest/GPW.Api.json b/InsomniaTest/GPW.Api.json index 39bb290..b6d56ce 100644 --- a/InsomniaTest/GPW.Api.json +++ b/InsomniaTest/GPW.Api.json @@ -1 +1 @@ -{"_type":"export","__export_format":4,"__export_date":"2021-10-18T10:46:32.117Z","__export_source":"insomnia.desktop.app:v2021.5.3","resources":[{"_id":"req_13d8a26fe9d4433684a0816a33ecd618","parentId":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","modified":1634553716040,"created":1634553671776,"url":"{{ _.BASE_URL }}/api/VC19","name":"DailyCheckList","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1627351578955,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","parentId":null,"modified":1634552379774,"created":1634552379774,"name":"GPW.Api","description":"","scope":"collection","_type":"workspace"},{"_id":"req_92b40959f3b14d069a1defaea63782d4","parentId":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","modified":1634553902195,"created":1634553726864,"url":"{{ _.BASE_URL }}/api/VC19","name":"RecordCheck","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"cognome\": \"ROSSI\",\n \"dob\": \"1980-10-01\",\n \"nome\": \"PAOLO\"\n}"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_ed76bfea595e4917be2ce6797185529e"}],"authentication":{},"metaSortKey":-1626151423711,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_659ee5f03be1f9fc42cab55192dd76583acae449","parentId":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","modified":1634552627514,"created":1634552379782,"name":"Base Environment","data":{},"dataPropertyOrder":{},"color":null,"isPrivate":false,"metaSortKey":1634552379782,"_type":"environment"},{"_id":"jar_659ee5f03be1f9fc42cab55192dd76583acae449","parentId":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","modified":1634552379783,"created":1634552379783,"name":"Default Jar","cookies":[],"_type":"cookie_jar"},{"_id":"spc_f198ccd3ea154fce9ba8e43694030bf9","parentId":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","modified":1634552379777,"created":1634552379777,"fileName":"GPW.Api","contents":"","contentType":"yaml","_type":"api_spec"},{"_id":"env_9ae41782f3fc4f33bb679db14ed36156","parentId":"env_659ee5f03be1f9fc42cab55192dd76583acae449","modified":1634552719561,"created":1634552420009,"name":"DEV","data":{"BASE_URL":"https://localhost:44300"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":null,"isPrivate":false,"metaSortKey":1634552420009,"_type":"environment"},{"_id":"env_8b92b7eaf4fc43538d77db9768714516","parentId":"env_659ee5f03be1f9fc42cab55192dd76583acae449","modified":1634552533475,"created":1634552444561,"name":"IIS01","data":{"BASE_URL":"https://iis01/GPW/Api"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":null,"isPrivate":false,"metaSortKey":1634552444561,"_type":"environment"},{"_id":"env_6047c5aeb1f445748982b91445f3691d","parentId":"env_659ee5f03be1f9fc42cab55192dd76583acae449","modified":1634552536977,"created":1634552456998,"name":"IIS02","data":{"BASE_URL":"https://iis02/GPW/Api"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":null,"isPrivate":false,"metaSortKey":1634552456998,"_type":"environment"}]} \ No newline at end of file +{"_type":"export","__export_format":4,"__export_date":"2021-10-18T13:01:01.812Z","__export_source":"insomnia.desktop.app:v2021.5.3","resources":[{"_id":"req_13d8a26fe9d4433684a0816a33ecd618","parentId":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","modified":1634553716040,"created":1634553671776,"url":"{{ _.BASE_URL }}/api/VC19","name":"DailyCheckList","description":"","method":"GET","body":{},"parameters":[],"headers":[],"authentication":{},"metaSortKey":-1627351578955,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","parentId":null,"modified":1634552379774,"created":1634552379774,"name":"GPW.Api","description":"","scope":"collection","_type":"workspace"},{"_id":"req_92b40959f3b14d069a1defaea63782d4","parentId":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","modified":1634562011082,"created":1634553726864,"url":"{{ _.BASE_URL }}/api/VC19","name":"RecordCheck","description":"","method":"POST","body":{"mimeType":"application/json","text":"{\n \"v\": [ \n { \n \"dn\": 1,\n \"ma\": \"ORG-100001417\",\n \"vp\": \"1119305005\",\n \"dt\": \"2021-06-01\",\n \"co\": \"IT\",\n \"ci\": \"01IT1281367B650F42FA939E8C14806A3390#0\",\n \"mp\": \"EU/1/20/1525\",\n \"is\": \"Ministero della Salute\",\n \"sd\": 1,\n \"tg\": \"840539006\"\n }\n ],\n \"nam\": { \n\t\"fnt\": \"SALVI\", \n\t\"fn\": \"SALVI\", \n\t\"gnt\": \"MARCO\", \n\t\"gn\": \"MARCO\" \n\t},\n \"ver\": \"1.0.0\",\n \"dob\": \"1980-07-05\"\n}\n"},"parameters":[],"headers":[{"name":"Content-Type","value":"application/json","id":"pair_ed76bfea595e4917be2ce6797185529e"}],"authentication":{},"metaSortKey":-1626151423711,"isPrivate":false,"settingStoreCookies":true,"settingSendCookies":true,"settingDisableRenderRequestBody":false,"settingEncodeUrl":true,"settingRebuildPath":true,"settingFollowRedirects":"global","_type":"request"},{"_id":"env_659ee5f03be1f9fc42cab55192dd76583acae449","parentId":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","modified":1634552627514,"created":1634552379782,"name":"Base Environment","data":{},"dataPropertyOrder":{},"color":null,"isPrivate":false,"metaSortKey":1634552379782,"_type":"environment"},{"_id":"jar_659ee5f03be1f9fc42cab55192dd76583acae449","parentId":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","modified":1634552379783,"created":1634552379783,"name":"Default Jar","cookies":[],"_type":"cookie_jar"},{"_id":"spc_f198ccd3ea154fce9ba8e43694030bf9","parentId":"wrk_15a980661ee94bab9d1ccc5a2bac0f42","modified":1634552379777,"created":1634552379777,"fileName":"GPW.Api","contents":"","contentType":"yaml","_type":"api_spec"},{"_id":"env_9ae41782f3fc4f33bb679db14ed36156","parentId":"env_659ee5f03be1f9fc42cab55192dd76583acae449","modified":1634552719561,"created":1634552420009,"name":"DEV","data":{"BASE_URL":"https://localhost:44300"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":null,"isPrivate":false,"metaSortKey":1634552420009,"_type":"environment"},{"_id":"env_8b92b7eaf4fc43538d77db9768714516","parentId":"env_659ee5f03be1f9fc42cab55192dd76583acae449","modified":1634552533475,"created":1634552444561,"name":"IIS01","data":{"BASE_URL":"https://iis01/GPW/Api"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":null,"isPrivate":false,"metaSortKey":1634552444561,"_type":"environment"},{"_id":"env_6047c5aeb1f445748982b91445f3691d","parentId":"env_659ee5f03be1f9fc42cab55192dd76583acae449","modified":1634552536977,"created":1634552456998,"name":"IIS02","data":{"BASE_URL":"https://iis02/GPW/Api"},"dataPropertyOrder":{"&":["BASE_URL"]},"color":null,"isPrivate":false,"metaSortKey":1634552456998,"_type":"environment"}]} \ No newline at end of file From 4f8d0727c9a83b222383256301a64d5a7f77bea0 Mon Sep 17 00:00:00 2001 From: "marco.salvi" Date: Mon, 18 Oct 2021 15:01:20 +0200 Subject: [PATCH 02/10] Aggiunta cartelle di test --- qrscan/dcc | 1 + qrscan/html5-qrcode.min.js | 7 +++++++ qrscan/main.html | 39 ++++++++++++++++++++++++++++++++++++++ qrscan/package-lock.json | 36 +++++++++++++++++++++++++++++++++++ qrscan/package.json | 6 ++++++ 5 files changed, 89 insertions(+) create mode 160000 qrscan/dcc create mode 100644 qrscan/html5-qrcode.min.js create mode 100644 qrscan/main.html create mode 100644 qrscan/package-lock.json create mode 100644 qrscan/package.json diff --git a/qrscan/dcc b/qrscan/dcc new file mode 160000 index 0000000..99e255d --- /dev/null +++ b/qrscan/dcc @@ -0,0 +1 @@ +Subproject commit 99e255d46997b9324748733d98ab151fcb4a3162 diff --git a/qrscan/html5-qrcode.min.js b/qrscan/html5-qrcode.min.js new file mode 100644 index 0000000..410b5c1 --- /dev/null +++ b/qrscan/html5-qrcode.min.js @@ -0,0 +1,7 @@ +/*! For license information please see html5-qrcode.min.js.LICENSE.txt */ +var __Html5QrcodeLibrary__;(()=>{var t={449:function(t,e,r){!function(t){"use strict";var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};var n,i=function(t){function r(e){var r,n,i,o=this.constructor,s=t.call(this,e)||this;return Object.defineProperty(s,"name",{value:o.name,enumerable:!1}),r=s,n=o.prototype,(i=Object.setPrototypeOf)?i(r,n):r.__proto__=n,function(t,e){void 0===e&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}(s),s}return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}(r,t),r}(Error);class o extends i{constructor(t){super(t),this.message=t}getKind(){return this.constructor.kind}}o.kind="Exception";class s extends o{}s.kind="ArgumentException";class a extends o{}a.kind="IllegalArgumentException";class A{constructor(t){if(this.binarizer=t,null===t)throw new a("Binarizer must be non-null.")}getWidth(){return this.binarizer.getWidth()}getHeight(){return this.binarizer.getHeight()}getBlackRow(t,e){return this.binarizer.getBlackRow(t,e)}getBlackMatrix(){return null!==this.matrix&&void 0!==this.matrix||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix}isCropSupported(){return this.binarizer.getLuminanceSource().isCropSupported()}crop(t,e,r,n){const i=this.binarizer.getLuminanceSource().crop(t,e,r,n);return new A(this.binarizer.createBinarizer(i))}isRotateSupported(){return this.binarizer.getLuminanceSource().isRotateSupported()}rotateCounterClockwise(){const t=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new A(this.binarizer.createBinarizer(t))}rotateCounterClockwise45(){const t=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new A(this.binarizer.createBinarizer(t))}toString(){try{return this.getBlackMatrix().toString()}catch(t){return""}}}class l extends o{static getChecksumInstance(){return new l}}l.kind="ChecksumException";class c{constructor(t){this.source=t}getLuminanceSource(){return this.source}getWidth(){return this.source.getWidth()}getHeight(){return this.source.getHeight()}}class h{static arraycopy(t,e,r,n,i){for(;i--;)r[n++]=t[e++]}static currentTimeMillis(){return Date.now()}}class g extends o{}g.kind="IndexOutOfBoundsException";class d extends g{constructor(t,e){super(e),this.index=t,this.message=e}}d.kind="ArrayIndexOutOfBoundsException";class u{static fill(t,e){for(let r=0,n=t.length;rr)throw new a("fromIndex("+e+") > toIndex("+r+")");if(e<0)throw new d(e);if(r>t)throw new d(r)}static asList(...t){return t}static create(t,e,r){return Array.from({length:t}).map((t=>Array.from({length:e}).fill(r)))}static createInt32Array(t,e,r){return Array.from({length:t}).map((t=>Int32Array.from({length:e}).fill(r)))}static equals(t,e){if(!t)return!1;if(!e)return!1;if(!t.length)return!1;if(!e.length)return!1;if(t.length!==e.length)return!1;for(let r=0,n=t.length;r>1,s=r(e,t[o]);if(s>0)n=o+1;else{if(!(s<0))return o;i=o-1}}return-n-1}static numberComparator(t,e){return t-e}}class C{static numberOfTrailingZeros(t){let e;if(0===t)return 32;let r=31;return e=t<<16,0!==e&&(r-=16,t=e),e=t<<8,0!==e&&(r-=8,t=e),e=t<<4,0!==e&&(r-=4,t=e),e=t<<2,0!==e&&(r-=2,t=e),r-(t<<1>>>31)}static numberOfLeadingZeros(t){if(0===t)return 32;let e=1;return t>>>16==0&&(e+=16,t<<=16),t>>>24==0&&(e+=8,t<<=8),t>>>28==0&&(e+=4,t<<=4),t>>>30==0&&(e+=2,t<<=2),e-=t>>>31,e}static toHexString(t){return t.toString(16)}static toBinaryString(t){return String(parseInt(String(t),2))}static bitCount(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,63&(t+=t>>>8)+(t>>>16)}static truncDivision(t,e){return Math.trunc(t/e)}static parseInt(t,e){return parseInt(t,e)}}C.MIN_VALUE_32_BITS=-2147483648,C.MAX_VALUE=Number.MAX_SAFE_INTEGER;class I{constructor(t,e){void 0===t?(this.size=0,this.bits=new Int32Array(1)):(this.size=t,this.bits=null==e?I.makeArray(t):e)}getSize(){return this.size}getSizeInBytes(){return Math.floor((this.size+7)/8)}ensureCapacity(t){if(t>32*this.bits.length){const e=I.makeArray(t);h.arraycopy(this.bits,0,e,0,this.bits.length),this.bits=e}}get(t){return 0!=(this.bits[Math.floor(t/32)]&1<<(31&t))}set(t){this.bits[Math.floor(t/32)]|=1<<(31&t)}flip(t){this.bits[Math.floor(t/32)]^=1<<(31&t)}getNextSet(t){const e=this.size;if(t>=e)return e;const r=this.bits;let n=Math.floor(t/32),i=r[n];i&=~((1<<(31&t))-1);const o=r.length;for(;0===i;){if(++n===o)return e;i=r[n]}const s=32*n+C.numberOfTrailingZeros(i);return s>e?e:s}getNextUnset(t){const e=this.size;if(t>=e)return e;const r=this.bits;let n=Math.floor(t/32),i=~r[n];i&=~((1<<(31&t))-1);const o=r.length;for(;0===i;){if(++n===o)return e;i=~r[n]}const s=32*n+C.numberOfTrailingZeros(i);return s>e?e:s}setBulk(t,e){this.bits[Math.floor(t/32)]=e}setRange(t,e){if(ethis.size)throw new a;if(e===t)return;e--;const r=Math.floor(t/32),n=Math.floor(e/32),i=this.bits;for(let o=r;o<=n;o++){const s=(2<<(or?0:31&t));i[o]|=s}}clear(){const t=this.bits.length,e=this.bits;for(let r=0;rthis.size)throw new a;if(e===t)return!0;e--;const n=Math.floor(t/32),i=Math.floor(e/32),o=this.bits;for(let s=n;s<=i;s++){const a=(2<<(sn?0:31&t))&4294967295;if((o[s]&a)!==(r?a:0))return!1}return!0}appendBit(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++}appendBits(t,e){if(e<0||e>32)throw new a("Num bits must be between 0 and 32");this.ensureCapacity(this.size+e);for(let r=e;r>0;r--)this.appendBit(1==(t>>r-1&1))}appendBitArray(t){const e=t.size;this.ensureCapacity(this.size+e);for(let r=0;r>1&1431655765|(1431655765&r)<<1,r=r>>2&858993459|(858993459&r)<<2,r=r>>4&252645135|(252645135&r)<<4,r=r>>8&16711935|(16711935&r)<<8,r=r>>16&65535|(65535&r)<<16,t[e-i]=r}if(this.size!==32*r){const e=32*r-this.size;let n=t[0]>>>e;for(let i=1;i>>e}t[r-1]=n}this.bits=t}static makeArray(t){return new Int32Array(Math.floor((t+31)/32))}equals(t){if(!(t instanceof I))return!1;const e=t;return this.size===e.size&&u.equals(this.bits,e.bits)}hashCode(){return 31*this.size+u.hashCode(this.bits)}toString(){let t="";for(let e=0,r=this.size;e=900)throw new E("incorect value");const e=m.VALUES_TO_ECI.get(t);if(void 0===e)throw new E("incorect value");return e}static getCharacterSetECIByName(t){const e=m.NAME_TO_ECI.get(t);if(void 0===e)throw new E("incorect value");return e}equals(t){if(!(t instanceof m))return!1;const e=t;return this.getName()===e.getName()}}m.VALUE_IDENTIFIER_TO_ECI=new Map,m.VALUES_TO_ECI=new Map,m.NAME_TO_ECI=new Map,m.Cp437=new m(w.Cp437,Int32Array.from([0,2]),"Cp437"),m.ISO8859_1=new m(w.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),m.ISO8859_2=new m(w.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),m.ISO8859_3=new m(w.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),m.ISO8859_4=new m(w.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),m.ISO8859_5=new m(w.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),m.ISO8859_6=new m(w.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),m.ISO8859_7=new m(w.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),m.ISO8859_8=new m(w.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),m.ISO8859_9=new m(w.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),m.ISO8859_10=new m(w.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),m.ISO8859_11=new m(w.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),m.ISO8859_13=new m(w.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),m.ISO8859_14=new m(w.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),m.ISO8859_15=new m(w.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),m.ISO8859_16=new m(w.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),m.SJIS=new m(w.SJIS,20,"SJIS","Shift_JIS"),m.Cp1250=new m(w.Cp1250,21,"Cp1250","windows-1250"),m.Cp1251=new m(w.Cp1251,22,"Cp1251","windows-1251"),m.Cp1252=new m(w.Cp1252,23,"Cp1252","windows-1252"),m.Cp1256=new m(w.Cp1256,24,"Cp1256","windows-1256"),m.UnicodeBigUnmarked=new m(w.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),m.UTF8=new m(w.UTF8,26,"UTF8","UTF-8"),m.ASCII=new m(w.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),m.Big5=new m(w.Big5,28,"Big5"),m.GB18030=new m(w.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),m.EUC_KR=new m(w.EUC_KR,30,"EUC_KR","EUC-KR");class p extends o{}p.kind="UnsupportedOperationException";class S{static decode(t,e){const r=this.encodingName(e);return this.customDecoder?this.customDecoder(t,r):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(r)?this.decodeFallback(t,r):new TextDecoder(r).decode(t)}static shouldDecodeOnFallback(t){return!S.isBrowser()&&"ISO-8859-1"===t}static encode(t,e){const r=this.encodingName(e);return this.customEncoder?this.customEncoder(t,r):"undefined"==typeof TextEncoder?this.encodeFallback(t):(new TextEncoder).encode(t)}static isBrowser(){return"undefined"!=typeof window&&"[object Window]"==={}.toString.call(window)}static encodingName(t){return"string"==typeof t?t:t.getName()}static encodingCharacterSet(t){return t instanceof m?t:m.getCharacterSetECIByName(t)}static decodeFallback(t,e){const r=this.encodingCharacterSet(e);if(S.isDecodeFallbackSupported(r)){let e="";for(let r=0,n=t.length;r3&&239===t[0]&&187===t[1]&&191===t[2];for(let e=0;e0?0==(128&r)?o=!1:s--:0!=(128&r)&&(0==(64&r)?o=!1:(s++,0==(32&r)?a++:(s++,0==(16&r)?A++:(s++,0==(8&r)?l++:o=!1))))),n&&(r>127&&r<160?n=!1:r>159&&(r<192||215===r||247===r)&&I++),i&&(c>0?r<64||127===r||r>252?i=!1:c--:128===r||160===r||r>239?i=!1:r>160&&r<224?(h++,d=0,g++,g>u&&(u=g)):r>127?(c++,g=0,d++,d>C&&(C=d)):(g=0,d=0))}return o&&s>0&&(o=!1),i&&c>0&&(i=!1),o&&(w||a+A+l>0)?R.UTF8:i&&(R.ASSUME_SHIFT_JIS||u>=3||C>=3)?R.SHIFT_JIS:n&&i?2===u&&2===h||10*I>=r?R.SHIFT_JIS:R.ISO88591:n?R.ISO88591:i?R.SHIFT_JIS:o?R.UTF8:R.PLATFORM_DEFAULT_ENCODING}static format(t,...e){let r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,i,o,s,a){if("%%"===t)return"%";if(void 0===e[++r])return;t=o?parseInt(o.substr(1)):void 0;let A,l=s?parseInt(s.substr(1)):void 0;switch(a){case"s":A=e[r];break;case"c":A=e[r][0];break;case"f":A=parseFloat(e[r]).toFixed(t);break;case"p":A=parseFloat(e[r]).toPrecision(t);break;case"e":A=parseFloat(e[r]).toExponential(t);break;case"x":A=parseInt(e[r]).toString(l||16);break;case"d":A=parseFloat(parseInt(e[r],l||10).toPrecision(t)).toFixed(0)}A="object"==typeof A?JSON.stringify(A):(+A).toString(l);let c=parseInt(i),h=i&&i[0]+""=="0"?"0":" ";for(;A.lengtho){if(-1===s)s=i-o;else if(i-o!==s)throw new a("row lengths do not match");o=i,A++}l++}else if(t.substring(l,l+e.length)===e)l+=e.length,n[i]=!0,i++;else{if(t.substring(l,l+r.length)!==r)throw new a("illegal character encountered: "+t.substring(l));l+=r.length,n[i]=!1,i++}if(i>o){if(-1===s)s=i-o;else if(i-o!==s)throw new a("row lengths do not match");A++}const c=new B(s,A);for(let t=0;t>>(31&t)&1)}set(t,e){const r=e*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295}unset(t,e){const r=e*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)}flip(t,e){const r=e*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295}xor(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new a("input matrix dimensions do not match");const e=new I(Math.floor(this.width/32)+1),r=this.rowSize,n=this.bits;for(let i=0,o=this.height;ithis.height||i>this.width)throw new a("The region must fit inside the matrix");const s=this.rowSize,A=this.bits;for(let r=e;ra&&(a=t),32*es){let t=31;for(;A>>>t==0;)t--;32*e+t>s&&(s=32*e+t)}}}return s=0&&0===e[r];)r--;if(r<0)return null;const n=Math.floor(r/t);let i=32*Math.floor(r%t);const o=e[r];let s=31;for(;o>>>s==0;)s--;return i+=s,Int32Array.from([i,n])}getWidth(){return this.width}getHeight(){return this.height}getRowSize(){return this.rowSize}equals(t){if(!(t instanceof B))return!1;const e=t;return this.width===e.width&&this.height===e.height&&this.rowSize===e.rowSize&&u.equals(this.bits,e.bits)}hashCode(){let t=this.width;return t=31*t+this.width,t=31*t+this.height,t=31*t+this.rowSize,t=31*t+u.hashCode(this.bits),t}toString(t="X ",e=" ",r="\n"){return this.buildToString(t,e,r)}buildToString(t,e,r){let n=new D;for(let i=0,o=this.height;i>T.LUMINANCE_SHIFT]++;const s=T.estimateBlackPoint(o);if(n<3)for(let t=0;t>T.LUMINANCE_SHIFT]++}const o=T.estimateBlackPoint(i),s=t.getMatrix();for(let t=0;ti&&(n=o,i=t[o]),t[o]>r&&(r=t[o]);let o=0,s=0;for(let r=0;rs&&(o=r,s=i)}if(n>o){const t=n;n=o,o=t}if(o-n<=e/16)throw new M;let a=o-1,A=-1;for(let e=o-1;e>n;e--){const i=e-n,s=i*i*(o-e)*(r-t[e]);s>A&&(a=e,A=s)}return a<=N.MINIMUM_DIMENSION&&r>=N.MINIMUM_DIMENSION){const n=t.getMatrix();let i=e>>N.BLOCK_SIZE_POWER;0!=(e&N.BLOCK_SIZE_MASK)&&i++;let o=r>>N.BLOCK_SIZE_POWER;0!=(r&N.BLOCK_SIZE_MASK)&&o++;const s=N.calculateBlackPoints(n,i,o,e,r),a=new B(e,r);N.calculateThresholdForBlock(n,i,o,e,r,s,a),this.matrix=a}else this.matrix=super.getBlackMatrix();return this.matrix}createBinarizer(t){return new N(t)}static calculateThresholdForBlock(t,e,r,n,i,o,s){const a=i-N.BLOCK_SIZE,A=n-N.BLOCK_SIZE;for(let i=0;ia&&(l=a);const c=N.cap(i,2,r-3);for(let r=0;rA&&(i=A);const a=N.cap(r,2,e-3);let h=0;for(let t=-2;t<=2;t++){const e=o[c+t];h+=e[a-2]+e[a-1]+e[a]+e[a+1]+e[a+2]}const g=h/25;N.thresholdBlock(t,i,l,g,n,s)}}}static cap(t,e,r){return tr?r:t}static thresholdBlock(t,e,r,n,i,o){for(let s=0,a=r*i+e;so&&(r=o);for(let o=0;os&&(e=s);let A=0,l=255,c=0;for(let i=0,o=r*n+e;ic&&(c=r)}if(c-l>N.MIN_DYNAMIC_RANGE)for(i++,o+=n;i>2*N.BLOCK_SIZE_POWER;if(c-l<=N.MIN_DYNAMIC_RANGE&&(h=l/2,i>0&&o>0)){const t=(a[i-1][o]+2*a[i][o-1]+a[i-1][o-1])/4;l>10,n[r]=i}return n}getRow(t,e){if(t<0||t>=this.getHeight())throw new a("Requested row is outside the image: "+t);const r=this.getWidth(),n=t*r;return null===e?e=this.buffer.slice(n,n+r):(e.lengthnew b(t.deviceId,t.label)))}))}findDeviceById(t){return P(this,void 0,void 0,(function*(){const e=yield this.listVideoInputDevices();return e?e.find((e=>e.deviceId===t)):null}))}decodeFromInputVideoDevice(t,e){return P(this,void 0,void 0,(function*(){return yield this.decodeOnceFromVideoDevice(t,e)}))}decodeOnceFromVideoDevice(t,e){return P(this,void 0,void 0,(function*(){let r;this.reset(),r=t?{deviceId:{exact:t}}:{facingMode:"environment"};const n={video:r};return yield this.decodeOnceFromConstraints(n,e)}))}decodeOnceFromConstraints(t,e){return P(this,void 0,void 0,(function*(){const r=yield navigator.mediaDevices.getUserMedia(t);return yield this.decodeOnceFromStream(r,e)}))}decodeOnceFromStream(t,e){return P(this,void 0,void 0,(function*(){this.reset();const r=yield this.attachStreamToVideo(t,e);return yield this.decodeOnce(r)}))}decodeFromInputVideoDeviceContinuously(t,e,r){return P(this,void 0,void 0,(function*(){return yield this.decodeFromVideoDevice(t,e,r)}))}decodeFromVideoDevice(t,e,r){return P(this,void 0,void 0,(function*(){let n;n=t?{deviceId:{exact:t}}:{facingMode:"environment"};const i={video:n};return yield this.decodeFromConstraints(i,e,r)}))}decodeFromConstraints(t,e,r){return P(this,void 0,void 0,(function*(){const n=yield navigator.mediaDevices.getUserMedia(t);return yield this.decodeFromStream(n,e,r)}))}decodeFromStream(t,e,r){return P(this,void 0,void 0,(function*(){this.reset();const n=yield this.attachStreamToVideo(t,e);return yield this.decodeContinuously(n,r)}))}stopAsyncDecode(){this._stopAsyncDecode=!0}stopContinuousDecode(){this._stopContinuousDecode=!0}attachStreamToVideo(t,e){return P(this,void 0,void 0,(function*(){const r=this.prepareVideoElement(e);return this.addVideoSource(r,t),this.videoElement=r,this.stream=t,yield this.playVideoOnLoadAsync(r),r}))}playVideoOnLoadAsync(t){return new Promise(((e,r)=>this.playVideoOnLoad(t,(()=>e()))))}playVideoOnLoad(t,e){this.videoEndedListener=()=>this.stopStreams(),this.videoCanPlayListener=()=>this.tryPlayVideo(t),t.addEventListener("ended",this.videoEndedListener),t.addEventListener("canplay",this.videoCanPlayListener),t.addEventListener("playing",e),this.tryPlayVideo(t)}isVideoPlaying(t){return t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2}tryPlayVideo(t){return P(this,void 0,void 0,(function*(){if(this.isVideoPlaying(t))console.warn("Trying to play video that is already playing.");else try{yield t.play()}catch(t){console.warn("It was not possible to play the video.")}}))}getMediaElement(t,e){const r=document.getElementById(t);if(!r)throw new s(`element with id '${t}' not found`);if(r.nodeName.toLowerCase()!==e.toLowerCase())throw new s(`element with id '${t}' must be an ${e} element`);return r}decodeFromImage(t,e){if(!t&&!e)throw new s("either imageElement with a src set or an url must be provided");return e&&!t?this.decodeFromImageUrl(e):this.decodeFromImageElement(t)}decodeFromVideo(t,e){if(!t&&!e)throw new s("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrl(e):this.decodeFromVideoElement(t)}decodeFromVideoContinuously(t,e,r){if(void 0===t&&void 0===e)throw new s("Either an element with a src set or an URL must be provided");return e&&!t?this.decodeFromVideoUrlContinuously(e,r):this.decodeFromVideoElementContinuously(t,r)}decodeFromImageElement(t){if(!t)throw new s("An image element must be provided.");this.reset();const e=this.prepareImageElement(t);let r;return this.imageElement=e,r=this.isImageLoaded(e)?this.decodeOnce(e,!1,!0):this._decodeOnLoadImage(e),r}decodeFromVideoElement(t){const e=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideo(e)}decodeFromVideoElementContinuously(t,e){const r=this._decodeFromVideoElementSetup(t);return this._decodeOnLoadVideoContinuously(r,e)}_decodeFromVideoElementSetup(t){if(!t)throw new s("A video element must be provided.");this.reset();const e=this.prepareVideoElement(t);return this.videoElement=e,e}decodeFromImageUrl(t){if(!t)throw new s("An URL must be provided.");this.reset();const e=this.prepareImageElement();this.imageElement=e;const r=this._decodeOnLoadImage(e);return e.src=t,r}decodeFromVideoUrl(t){if(!t)throw new s("An URL must be provided.");this.reset();const e=this.prepareVideoElement(),r=this.decodeFromVideoElement(e);return e.src=t,r}decodeFromVideoUrlContinuously(t,e){if(!t)throw new s("An URL must be provided.");this.reset();const r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,e);return r.src=t,n}_decodeOnLoadImage(t){return new Promise(((e,r)=>{this.imageLoadedListener=()=>this.decodeOnce(t,!1,!0).then(e,r),t.addEventListener("load",this.imageLoadedListener)}))}_decodeOnLoadVideo(t){return P(this,void 0,void 0,(function*(){return yield this.playVideoOnLoadAsync(t),yield this.decodeOnce(t)}))}_decodeOnLoadVideoContinuously(t,e){return P(this,void 0,void 0,(function*(){yield this.playVideoOnLoadAsync(t),this.decodeContinuously(t,e)}))}isImageLoaded(t){return!!t.complete&&0!==t.naturalWidth}prepareImageElement(t){let e;return void 0===t&&(e=document.createElement("img"),e.width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"img")),t instanceof HTMLImageElement&&(e=t),e}prepareVideoElement(t){let e;return t||"undefined"==typeof document||(e=document.createElement("video"),e.width=200,e.height=200),"string"==typeof t&&(e=this.getMediaElement(t,"video")),t instanceof HTMLVideoElement&&(e=t),e.setAttribute("autoplay","true"),e.setAttribute("muted","true"),e.setAttribute("playsinline","true"),e}decodeOnce(t,e=!0,r=!0){this._stopAsyncDecode=!1;const n=(i,o)=>{if(this._stopAsyncDecode)return o(new M("Video stream has ended before any code could be detected.")),void(this._stopAsyncDecode=void 0);try{i(this.decode(t))}catch(t){const s=(t instanceof l||t instanceof E)&&r;if(e&&t instanceof M||s)return setTimeout(n,this._timeBetweenDecodingAttempts,i,o);o(t)}};return new Promise(((t,e)=>n(t,e)))}decodeContinuously(t,e){this._stopContinuousDecode=!1;const r=()=>{if(this._stopContinuousDecode)this._stopContinuousDecode=void 0;else try{const n=this.decode(t);e(n,null),setTimeout(r,this.timeBetweenScansMillis)}catch(t){e(null,t);const n=t instanceof M;(t instanceof l||t instanceof E||n)&&setTimeout(r,this._timeBetweenDecodingAttempts)}};r()}decode(t){const e=this.createBinaryBitmap(t);return this.decodeBitmap(e)}createBinaryBitmap(t){const e=this.getCaptureCanvasContext(t);this.drawImageOnCanvas(e,t);const r=this.getCaptureCanvas(t),n=new O(r),i=new N(n);return new A(i)}getCaptureCanvasContext(t){if(!this.captureCanvasContext){const e=this.getCaptureCanvas(t).getContext("2d");this.captureCanvasContext=e}return this.captureCanvasContext}getCaptureCanvas(t){if(!this.captureCanvas){const e=this.createCaptureCanvas(t);this.captureCanvas=e}return this.captureCanvas}drawImageOnCanvas(t,e){t.drawImage(e,0,0)}decodeBitmap(t){return this.reader.decode(t,this._hints)}createCaptureCanvas(t){if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;const e=document.createElement("canvas");let r,n;return void 0!==t&&(t instanceof HTMLVideoElement?(r=t.videoWidth,n=t.videoHeight):t instanceof HTMLImageElement&&(r=t.naturalWidth||t.width,n=t.naturalHeight||t.height)),e.style.width=r+"px",e.style.height=n+"px",e.width=r,e.height=n,e}stopStreams(){this.stream&&(this.stream.getVideoTracks().forEach((t=>t.stop())),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()}reset(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()}_destroyVideoElement(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)}_destroyImageElement(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)}_destroyCaptureCanvas(){this.captureCanvasContext=void 0,this.captureCanvas=void 0}addVideoSource(t,e){try{t.srcObject=e}catch(r){t.src=URL.createObjectURL(e)}}cleanVideoSource(t){try{t.srcObject=null}catch(e){t.src=""}this.videoElement.removeAttribute("src")}}class L{constructor(t,e,r=(null==e?0:8*e.length),n,i,o=h.currentTimeMillis()){this.text=t,this.rawBytes=e,this.numBits=r,this.resultPoints=n,this.format=i,this.timestamp=o,this.text=t,this.rawBytes=e,this.numBits=null==r?null==e?0:8*e.length:r,this.resultPoints=n,this.format=i,this.resultMetadata=null,this.timestamp=null==o?h.currentTimeMillis():o}getText(){return this.text}getRawBytes(){return this.rawBytes}getNumBits(){return this.numBits}getResultPoints(){return this.resultPoints}getBarcodeFormat(){return this.format}getResultMetadata(){return this.resultMetadata}putMetadata(t,e){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(t,e)}putAllMetadata(t){null!==t&&(null===this.resultMetadata?this.resultMetadata=t:this.resultMetadata=new Map(t))}addResultPoints(t){const e=this.resultPoints;if(null===e)this.resultPoints=t;else if(null!==t&&t.length>0){const r=new Array(e.length+t.length);h.arraycopy(e,0,r,0,e.length),h.arraycopy(t,0,r,e.length,t.length),this.resultPoints=r}}getTimestamp(){return this.timestamp}toString(){return this.text}}!function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(F||(F={}));var G,Q=F;!function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"}(G||(G={}));var Z,Y,U,v,x,W,H=G;class V{constructor(t,e,r,n,i=-1,o=-1){this.rawBytes=t,this.text=e,this.byteSegments=r,this.ecLevel=n,this.structuredAppendSequenceNumber=i,this.structuredAppendParity=o,this.numBits=null==t?0:8*t.length}getRawBytes(){return this.rawBytes}getNumBits(){return this.numBits}setNumBits(t){this.numBits=t}getText(){return this.text}getByteSegments(){return this.byteSegments}getECLevel(){return this.ecLevel}getErrorsCorrected(){return this.errorsCorrected}setErrorsCorrected(t){this.errorsCorrected=t}getErasures(){return this.erasures}setErasures(t){this.erasures=t}getOther(){return this.other}setOther(t){this.other=t}hasStructuredAppend(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0}getStructuredAppendParity(){return this.structuredAppendParity}getStructuredAppendSequenceNumber(){return this.structuredAppendSequenceNumber}}class j{exp(t){return this.expTable[t]}log(t){if(0===t)throw new a;return this.logTable[t]}static addOrSubtract(t,e){return t^e}}class X{constructor(t,e){if(0===e.length)throw new a;this.field=t;const r=e.length;if(r>1&&0===e[0]){let t=1;for(;tr.length){const t=e;e=r,r=t}let n=new Int32Array(r.length);const i=r.length-e.length;h.arraycopy(r,0,n,0,i);for(let t=i;t=t.getDegree()&&!n.isZero();){const i=n.getDegree()-t.getDegree(),s=e.multiply(n.getCoefficient(n.getDegree()),o),a=t.multiplyByMonomial(i,s),A=e.buildMonomial(i,s);r=r.addOrSubtract(A),n=n.addOrSubtract(a)}return[r,n]}toString(){let t="";for(let e=this.getDegree();e>=0;e--){let r=this.getCoefficient(e);if(0!==r){if(r<0?(t+=" - ",r=-r):t.length>0&&(t+=" + "),0===e||1!==r){const e=this.field.log(r);0===e?t+="1":1===e?t+="a":(t+="a^",t+=e)}0!==e&&(1===e?t+="x":(t+="x^",t+=e))}}return t}}class z extends o{}z.kind="ArithmeticException";class J extends j{constructor(t,e,r){super(),this.primitive=t,this.size=e,this.generatorBase=r;const n=new Int32Array(e);let i=1;for(let r=0;r=e&&(i^=t,i&=e-1);this.expTable=n;const o=new Int32Array(e);for(let t=0;t=(r/2|0);){let t=i,e=s;if(i=o,s=a,i.isZero())throw new K("r_{i-1} was zero");o=t;let r=n.getZero();const A=i.getCoefficient(i.getDegree()),l=n.inverse(A);for(;o.getDegree()>=i.getDegree()&&!o.isZero();){const t=o.getDegree()-i.getDegree(),e=n.multiply(o.getCoefficient(o.getDegree()),l);r=r.addOrSubtract(n.buildMonomial(t,e)),o=o.addOrSubtract(i.multiplyByMonomial(t,e))}if(a=r.multiply(s).addOrSubtract(e),o.getDegree()>=i.getDegree())throw new q("Division algorithm failed to reduce polynomial?")}const A=a.getCoefficient(0);if(0===A)throw new K("sigmaTilde(0) was zero");const l=n.inverse(A);return[a.multiplyScalar(l),o.multiplyScalar(l)]}findErrorLocations(t){const e=t.getDegree();if(1===e)return Int32Array.from([t.getCoefficient(1)]);const r=new Int32Array(e);let n=0;const i=this.field;for(let o=1;o1,c,c+r-1),c+=r-1;else for(let t=r-1;t>=0;--t)l[c++]=0!=(e&1<=8?tt.readCode(t,e,8):tt.readCode(t,e,r)<<8-r}static convertBoolArrayToByteArray(t){let e=new Uint8Array((t.length+7)/8);for(let r=0;r","?","[","]","{","}","CTRL_UL"],tt.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"];class et{constructor(){}static round(t){return NaN===t?0:t<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:t+(t<0?-.5:.5)|0}static distance(t,e,r,n){const i=t-r,o=e-n;return Math.sqrt(i*i+o*o)}static sum(t){let e=0;for(let r=0,n=t.length;r!==n;r++)e+=t[r];return e}}class rt{static floatToIntBits(t){return t}}rt.MAX_VALUE=Number.MAX_SAFE_INTEGER;class nt{constructor(t,e){this.x=t,this.y=e}getX(){return this.x}getY(){return this.y}equals(t){if(t instanceof nt){const e=t;return this.x===e.x&&this.y===e.y}return!1}hashCode(){return 31*rt.floatToIntBits(this.x)+rt.floatToIntBits(this.y)}toString(){return"("+this.x+","+this.y+")"}static orderBestPatterns(t){const e=this.distance(t[0],t[1]),r=this.distance(t[1],t[2]),n=this.distance(t[0],t[2]);let i,o,s;if(r>=e&&r>=n?(o=t[0],i=t[1],s=t[2]):n>=r&&n>=e?(o=t[1],i=t[0],s=t[2]):(o=t[2],i=t[0],s=t[1]),this.crossProductZ(i,o,s)<0){const t=i;i=s,s=t}t[0]=i,t[1]=o,t[2]=s}static distance(t,e){return et.distance(t.x,t.y,e.x,e.y)}static crossProductZ(t,e,r){const n=e.x,i=e.y;return(r.x-n)*(t.y-i)-(r.y-i)*(t.x-n)}}class it{constructor(t,e){this.bits=t,this.points=e}getBits(){return this.bits}getPoints(){return this.points}}class ot extends it{constructor(t,e,r,n,i){super(t,e),this.compact=r,this.nbDatablocks=n,this.nbLayers=i}getNbLayers(){return this.nbLayers}getNbDatablocks(){return this.nbDatablocks}isCompact(){return this.compact}}class st{constructor(t,e,r,n){this.image=t,this.height=t.getHeight(),this.width=t.getWidth(),null==e&&(e=st.INIT_SIZE),null==r&&(r=t.getWidth()/2|0),null==n&&(n=t.getHeight()/2|0);const i=e/2|0;if(this.leftInit=r-i,this.rightInit=r+i,this.upInit=n-i,this.downInit=n+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new M}detect(){let t=this.leftInit,e=this.rightInit,r=this.upInit,n=this.downInit,i=!1,o=!0,s=!1,a=!1,A=!1,l=!1,c=!1;const h=this.width,g=this.height;for(;o;){o=!1;let d=!0;for(;(d||!a)&&e=h){i=!0;break}let u=!0;for(;(u||!A)&&n=g){i=!0;break}let C=!0;for(;(C||!l)&&t>=0;)C=this.containsBlackPoint(r,n,t,!1),C?(t--,o=!0,l=!0):l||t--;if(t<0){i=!0;break}let I=!0;for(;(I||!c)&&r>=0;)I=this.containsBlackPoint(t,e,r,!0),I?(r--,o=!0,c=!0):c||r--;if(r<0){i=!0;break}o&&(s=!0)}if(!i&&s){const i=e-t;let o=null;for(let e=1;null===o&&er||s<-1||s>n)throw new M;i=!1,-1===o?(e[t]=0,i=!0):o===r&&(e[t]=r-1,i=!0),-1===s?(e[t+1]=0,i=!0):s===n&&(e[t+1]=n-1,i=!0)}i=!0;for(let t=e.length-2;t>=0&&i;t-=2){const o=Math.floor(e[t]),s=Math.floor(e[t+1]);if(o<-1||o>r||s<-1||s>n)throw new M;i=!1,-1===o?(e[t]=0,i=!0):o===r&&(e[t]=r-1,i=!0),-1===s?(e[t+1]=0,i=!0):s===n&&(e[t+1]=n-1,i=!0)}}}class At{constructor(t,e,r,n,i,o,s,a,A){this.a11=t,this.a21=e,this.a31=r,this.a12=n,this.a22=i,this.a32=o,this.a13=s,this.a23=a,this.a33=A}static quadrilateralToQuadrilateral(t,e,r,n,i,o,s,a,A,l,c,h,g,d,u,C){const I=At.quadrilateralToSquare(t,e,r,n,i,o,s,a);return At.squareToQuadrilateral(A,l,c,h,g,d,u,C).times(I)}transformPoints(t){const e=t.length,r=this.a11,n=this.a12,i=this.a13,o=this.a21,s=this.a22,a=this.a23,A=this.a31,l=this.a32,c=this.a33;for(let h=0;h>1&127):(n<<=10,n+=(e>>2&992)+(e>>1&31))}let i=this.getCorrectedParameterData(n,this.compact);this.compact?(this.nbLayers=1+(i>>6),this.nbDataBlocks=1+(63&i)):(this.nbLayers=1+(i>>11),this.nbDataBlocks=1+(2047&i))}getRotation(t,e){let r=0;t.forEach(((t,n,i)=>{r=(t>>e-2<<1)+(1&t)+(r<<3)})),r=((1&r)<<11)+(r>>1);for(let t=0;t<4;t++)if(C.bitCount(r^this.EXPECTED_CORNER_BITS[t])<=2)return t;throw new M}getCorrectedParameterData(t,e){let r,n;e?(r=7,n=2):(r=10,n=4);let i=r-n,o=new Int32Array(r);for(let e=r-1;e>=0;--e)o[e]=15&t,t>>=4;try{new $(J.AZTEC_PARAM).decode(o,i)}catch(t){throw new M}let s=0;for(let t=0;t2){let r=this.distancePoint(A,t)*this.nbCenterLayers/(this.distancePoint(i,e)*(this.nbCenterLayers+2));if(r<.75||r>1.25||!this.isWhiteOrBlackRectangle(t,s,a,A))break}e=t,r=s,n=a,i=A,o=!o}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new M;this.compact=5===this.nbCenterLayers;let s=new nt(e.getX()+.5,e.getY()-.5),a=new nt(r.getX()+.5,r.getY()+.5),A=new nt(n.getX()-.5,n.getY()+.5),l=new nt(i.getX()-.5,i.getY()-.5);return this.expandSquare([s,a,A,l],2*this.nbCenterLayers-3,2*this.nbCenterLayers)}getMatrixCenter(){let t,e,r,n;try{let i=new st(this.image).detect();t=i[0],e=i[1],r=i[2],n=i[3]}catch(i){let o=this.image.getWidth()/2,s=this.image.getHeight()/2;t=this.getFirstDifferent(new ht(o+7,s-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new ht(o+7,s+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new ht(o-7,s+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new ht(o-7,s-7),!1,-1,-1).toResultPoint()}let i=et.round((t.getX()+n.getX()+e.getX()+r.getX())/4),o=et.round((t.getY()+n.getY()+e.getY()+r.getY())/4);try{let s=new st(this.image,15,i,o).detect();t=s[0],e=s[1],r=s[2],n=s[3]}catch(s){t=this.getFirstDifferent(new ht(i+7,o-7),!1,1,-1).toResultPoint(),e=this.getFirstDifferent(new ht(i+7,o+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new ht(i-7,o+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new ht(i-7,o-7),!1,-1,-1).toResultPoint()}return i=et.round((t.getX()+n.getX()+e.getX()+r.getX())/4),o=et.round((t.getY()+n.getY()+e.getY()+r.getY())/4),new ht(i,o)}getMatrixCornerPoints(t){return this.expandSquare(t,2*this.nbCenterLayers,this.getDimension())}sampleGrid(t,e,r,n,i){let o=ct.getInstance(),s=this.getDimension(),a=s/2-this.nbCenterLayers,A=s/2+this.nbCenterLayers;return o.sampleGrid(t,s,s,a,a,A,a,A,A,a,A,e.getX(),e.getY(),r.getX(),r.getY(),n.getX(),n.getY(),i.getX(),i.getY())}sampleLine(t,e,r){let n=0,i=this.distanceResultPoint(t,e),o=i/r,s=t.getX(),a=t.getY(),A=o*(e.getX()-t.getX())/i,l=o*(e.getY()-t.getY())/i;for(let t=0;t.1&&c<.9?0:c<=.1===A?1:-1}getFirstDifferent(t,e,r,n){let i=t.getX()+r,o=t.getY()+n;for(;this.isValid(i,o)&&this.image.get(i,o)===e;)i+=r,o+=n;for(i-=r,o-=n;this.isValid(i,o)&&this.image.get(i,o)===e;)i+=r;for(i-=r;this.isValid(i,o)&&this.image.get(i,o)===e;)o+=n;return o-=n,new ht(i,o)}expandSquare(t,e,r){let n=r/(2*e),i=t[0].getX()-t[2].getX(),o=t[0].getY()-t[2].getY(),s=(t[0].getX()+t[2].getX())/2,a=(t[0].getY()+t[2].getY())/2,A=new nt(s+n*i,a+n*o),l=new nt(s-n*i,a-n*o);return i=t[1].getX()-t[3].getX(),o=t[1].getY()-t[3].getY(),s=(t[1].getX()+t[3].getX())/2,a=(t[1].getY()+t[3].getY())/2,[A,new nt(s+n*i,a+n*o),l,new nt(s-n*i,a-n*o)]}isValid(t,e){return t>=0&&t0&&e{r.foundPossibleResultPoint(t)}))}}reset(){}}class ut{decode(t,e){try{return this.doDecode(t,e)}catch(r){if(e&&!0===e.get(f.TRY_HARDER)&&t.isRotateSupported()){const r=t.rotateCounterClockwise(),n=this.doDecode(r,e),i=n.getResultMetadata();let o=270;null!==i&&!0===i.get(H.ORIENTATION)&&(o+=i.get(H.ORIENTATION)%360),n.putMetadata(H.ORIENTATION,o);const s=n.getResultPoints();if(null!==s){const t=r.getHeight();for(let e=0;e>(o?8:5));let a;a=o?n:15;const A=Math.trunc(n/2);for(let o=0;o=n)break;try{i=t.getBlackRow(l,i)}catch(t){continue}for(let t=0;t<2;t++){if(1===t&&(i.reverse(),e&&!0===e.get(f.NEED_RESULT_POINT_CALLBACK))){const t=new Map;e.forEach(((e,r)=>t.set(r,e))),t.delete(f.NEED_RESULT_POINT_CALLBACK),e=t}try{const n=this.decodeRow(l,i,e);if(1===t){n.putMetadata(H.ORIENTATION,180);const t=n.getResultPoints();null!==t&&(t[0]=new nt(r-t[0].getX()-1,t[0].getY()),t[1]=new nt(r-t[1].getX()-1,t[1].getY()))}return n}catch(t){}}}throw new M}static recordPattern(t,e,r){const n=r.length;for(let t=0;t=i)throw new M;let o=!t.get(e),s=0,a=e;for(;a0&&n>=0;)t.get(--e)!==i&&(n--,i=!i);if(n>=0)throw new M;ut.recordPattern(t,e+1,r)}static patternMatchVariance(t,e,r){const n=t.length;let i=0,o=0;for(let r=0;ro?n-o:o-n;if(A>r)return Number.POSITIVE_INFINITY;a+=A}return a/i}}class Ct extends ut{static findStartPattern(t){const e=t.getSize(),r=t.getNextSet(0);let n=0,i=Int32Array.from([0,0,0,0,0,0]),o=r,s=!1;for(let a=r;a=0&&t.isRange(Math.max(0,o-(a-o)/2),o,!1))return Int32Array.from([o,a,r]);o+=i[0]+i[1],i=i.slice(2,i.length-1),i[n-1]=0,i[n]=0,n--}else n++;i[n]=1,s=!s}throw new M}static decodeCode(t,e,r){ut.recordPattern(t,r,e);let n=Ct.MAX_AVG_VARIANCE,i=-1;for(let t=0;t=0)return i;throw new M}decodeRow(t,e,r){const n=r&&!0===r.get(f.ASSUME_GS1),i=Ct.findStartPattern(e),o=i[2];let s=0;const a=new Uint8Array(20);let A;switch(a[s++]=o,o){case Ct.CODE_START_A:A=Ct.CODE_CODE_A;break;case Ct.CODE_START_B:A=Ct.CODE_CODE_B;break;case Ct.CODE_START_C:A=Ct.CODE_CODE_C;break;default:throw new E}let c=!1,h=!1,g="",d=i[0],u=i[1];const C=Int32Array.from([0,0,0,0,0,0]);let I=0,w=0,m=o,p=0,S=!0,R=!1,D=!1;for(;!c;){const t=h;switch(h=!1,I=w,w=Ct.decodeCode(e,C,u),a[s++]=w,w!==Ct.CODE_STOP&&(S=!0),w!==Ct.CODE_STOP&&(p++,m+=p*w),d=u,u+=C.reduce(((t,e)=>t+e),0),w){case Ct.CODE_START_A:case Ct.CODE_START_B:case Ct.CODE_START_C:throw new E}switch(A){case Ct.CODE_CODE_A:if(w<64)g+=D===R?String.fromCharCode(" ".charCodeAt(0)+w):String.fromCharCode(" ".charCodeAt(0)+w+128),D=!1;else if(w<96)g+=D===R?String.fromCharCode(w-64):String.fromCharCode(w+64),D=!1;else switch(w!==Ct.CODE_STOP&&(S=!1),w){case Ct.CODE_FNC_1:n&&(0===g.length?g+="]C1":g+=String.fromCharCode(29));break;case Ct.CODE_FNC_2:case Ct.CODE_FNC_3:break;case Ct.CODE_FNC_4_A:!R&&D?(R=!0,D=!1):R&&D?(R=!1,D=!1):D=!0;break;case Ct.CODE_SHIFT:h=!0,A=Ct.CODE_CODE_B;break;case Ct.CODE_CODE_B:A=Ct.CODE_CODE_B;break;case Ct.CODE_CODE_C:A=Ct.CODE_CODE_C;break;case Ct.CODE_STOP:c=!0}break;case Ct.CODE_CODE_B:if(w<96)g+=D===R?String.fromCharCode(" ".charCodeAt(0)+w):String.fromCharCode(" ".charCodeAt(0)+w+128),D=!1;else switch(w!==Ct.CODE_STOP&&(S=!1),w){case Ct.CODE_FNC_1:n&&(0===g.length?g+="]C1":g+=String.fromCharCode(29));break;case Ct.CODE_FNC_2:case Ct.CODE_FNC_3:break;case Ct.CODE_FNC_4_B:!R&&D?(R=!0,D=!1):R&&D?(R=!1,D=!1):D=!0;break;case Ct.CODE_SHIFT:h=!0,A=Ct.CODE_CODE_A;break;case Ct.CODE_CODE_A:A=Ct.CODE_CODE_A;break;case Ct.CODE_CODE_C:A=Ct.CODE_CODE_C;break;case Ct.CODE_STOP:c=!0}break;case Ct.CODE_CODE_C:if(w<100)w<10&&(g+="0"),g+=w;else switch(w!==Ct.CODE_STOP&&(S=!1),w){case Ct.CODE_FNC_1:n&&(0===g.length?g+="]C1":g+=String.fromCharCode(29));break;case Ct.CODE_CODE_A:A=Ct.CODE_CODE_A;break;case Ct.CODE_CODE_B:A=Ct.CODE_CODE_B;break;case Ct.CODE_STOP:c=!0}}t&&(A=A===Ct.CODE_CODE_A?Ct.CODE_CODE_B:Ct.CODE_CODE_A)}const B=u-d;if(u=e.getNextUnset(u),!e.isRange(u,Math.min(e.getSize(),u+(u-d)/2),!1))throw new M;if(m-=p*I,m%103!==I)throw new l;const T=g.length;if(0===T)throw new M;T>0&&S&&(g=A===Ct.CODE_CODE_C?g.substring(0,T-2):g.substring(0,T-1));const N=(i[1]+i[0])/2,_=d+B/2,y=a.length,O=new Uint8Array(y);for(let t=0;tn&&(i=e);n=i,e=0;let o=0,s=0;for(let i=0;in&&(s|=1<0;i++){let r=t[i];if(r>n&&(e--,2*r>=o))return-1}return s}}while(e>3);return-1}static patternToChar(t){for(let e=0;e="A"&&i<="Z"))throw new E;o=String.fromCharCode(i.charCodeAt(0)+32);break;case"$":if(!(i>="A"&&i<="Z"))throw new E;o=String.fromCharCode(i.charCodeAt(0)-64);break;case"%":if(i>="A"&&i<="E")o=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")o=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")o=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")o=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)o="\0";else if("V"===i)o="@";else if("W"===i)o="`";else{if("X"!==i&&"Y"!==i&&"Z"!==i)throw new E;o=""}break;case"/":if(i>="A"&&i<="O")o=String.fromCharCode(i.charCodeAt(0)-32);else{if("Z"!==i)throw new E;o=":"}}r+=o,n++}else r+=e}return r}}It.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",It.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],It.ASTERISK_ENCODING=148;class wt extends ut{constructor(){super(...arguments),this.narrowLineWidth=-1}decodeRow(t,e,r){let n=this.decodeStart(e),i=this.decodeEnd(e),o=new D;wt.decodeMiddle(e,n[1],i[0],o);let s=o.toString(),a=null;null!=r&&(a=r.get(f.ALLOWED_LENGTHS)),null==a&&(a=wt.DEFAULT_ALLOWED_LENGTHS);let A=s.length,l=!1,c=0;for(let t of a){if(A===t){l=!0;break}t>c&&(c=t)}if(!l&&A>c&&(l=!0),!l)throw new E;const h=[new nt(n[1],t),new nt(i[0],t)];return new L(s,null,0,h,Q.ITF,(new Date).getTime())}static decodeMiddle(t,e,r,n){let i=new Int32Array(10),o=new Int32Array(5),s=new Int32Array(5);for(i.fill(0),o.fill(0),s.fill(0);e0&&n>=0&&!t.get(n);n--)r--;if(0!==r)throw new M}static skipWhiteSpace(t){const e=t.getSize(),r=t.getNextSet(0);if(r===e)throw new M;return r}decodeEnd(t){t.reverse();try{let e,r=wt.skipWhiteSpace(t);try{e=wt.findGuardPattern(t,r,wt.END_PATTERN_REVERSED[0])}catch(n){n instanceof M&&(e=wt.findGuardPattern(t,r,wt.END_PATTERN_REVERSED[1]))}this.validateQuietZone(t,e[0]);let n=e[0];return e[0]=t.getSize()-e[1],e[1]=t.getSize()-n,e}finally{t.reverse()}}static findGuardPattern(t,e,r){let n=r.length,i=new Int32Array(n),o=t.getSize(),s=!1,a=0,A=e;i.fill(0);for(let l=e;l=0)return r%10;throw new M}}wt.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],wt.MAX_AVG_VARIANCE=.38,wt.MAX_INDIVIDUAL_VARIANCE=.5,wt.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],wt.START_PATTERN=Int32Array.from([1,1,1,1]),wt.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])];class ft extends ut{constructor(){super(...arguments),this.decodeRowStringBuffer=""}static findStartGuardPattern(t){let e,r=!1,n=0,i=Int32Array.from([0,0,0]);for(;!r;){i=Int32Array.from([0,0,0]),e=ft.findGuardPattern(t,n,!1,this.START_END_PATTERN,i);let o=e[0];n=e[1];let s=o-(n-o);s>=0&&(r=t.isRange(s,o,!1))}return e}static checkChecksum(t){return ft.checkStandardUPCEANChecksum(t)}static checkStandardUPCEANChecksum(t){let e=t.length;if(0===e)return!1;let r=parseInt(t.charAt(e-1),10);return ft.getStandardUPCEANChecksum(t.substring(0,e-1))===r}static getStandardUPCEANChecksum(t){let e=t.length,r=0;for(let n=e-1;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new E;r+=e}r*=3;for(let n=e-2;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new E;r+=e}return(1e3-r)%10}static decodeEnd(t,e){return ft.findGuardPattern(t,e,!1,ft.START_END_PATTERN,new Int32Array(ft.START_END_PATTERN.length).fill(0))}static findGuardPatternWithoutCounters(t,e,r,n){return this.findGuardPattern(t,e,r,n,new Int32Array(n.length))}static findGuardPattern(t,e,r,n,i){let o=t.getSize(),s=0,a=e=r?t.getNextUnset(e):t.getNextSet(e),A=n.length,l=r;for(let r=e;r=0)return o;throw new M}}ft.MAX_AVG_VARIANCE=.48,ft.MAX_INDIVIDUAL_VARIANCE=.7,ft.START_END_PATTERN=Int32Array.from([1,1,1]),ft.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),ft.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),ft.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])];class Et{constructor(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}decodeRow(t,e,r){let n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),o=n.toString(),s=Et.parseExtensionString(o),a=[new nt((r[0]+r[1])/2,t),new nt(i,t)],A=new L(o,null,0,a,Q.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&A.putAllMetadata(s),A}decodeMiddle(t,e,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=t.getSize(),o=e[1],s=0;for(let e=0;e<5&&o=10&&(s|=1<<4-e),4!==e&&(o=t.getNextSet(o),o=t.getNextUnset(o))}if(5!==r.length)throw new M;let a=this.determineCheckDigit(s);if(Et.extensionChecksum(r.toString())!==a)throw new M;return o}static extensionChecksum(t){let e=t.length,r=0;for(let n=e-2;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);r*=3;for(let n=e-1;n>=0;n-=2)r+=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);return r*=3,r%10}determineCheckDigit(t){for(let e=0;e<10;e++)if(t===this.CHECK_DIGIT_ENCODINGS[e])return e;throw new M}static parseExtensionString(t){if(5!==t.length)return null;let e=Et.parseExtension5String(t);return null==e?null:new Map([[H.SUGGESTED_PRICE,e]])}static parseExtension5String(t){let e;switch(t.charAt(0)){case"0":e="£";break;case"5":e="$";break;case"9":switch(t){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}e="";break;default:e=""}let r=parseInt(t.substring(1)),n=r%100;return e+(r/100).toString()+"."+(n<10?"0"+n:n.toString())}}class mt{constructor(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}decodeRow(t,e,r){let n=this.decodeRowStringBuffer,i=this.decodeMiddle(e,r,n),o=n.toString(),s=mt.parseExtensionString(o),a=[new nt((r[0]+r[1])/2,t),new nt(i,t)],A=new L(o,null,0,a,Q.UPC_EAN_EXTENSION,(new Date).getTime());return null!=s&&A.putAllMetadata(s),A}decodeMiddle(t,e,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=t.getSize(),o=e[1],s=0;for(let e=0;e<2&&o=10&&(s|=1<<1-e),1!==e&&(o=t.getNextSet(o),o=t.getNextUnset(o))}if(2!==r.length)throw new M;if(parseInt(r.toString())%4!==s)throw new M;return o}static parseExtensionString(t){return 2!==t.length?null:new Map([[H.ISSUE_NUMBER,parseInt(t)]])}}class pt{static decodeRow(t,e,r){let n=ft.findGuardPattern(e,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return(new Et).decodeRow(t,e,n)}catch(r){return(new mt).decodeRow(t,e,n)}}}pt.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]);class St extends ft{constructor(){super(),this.decodeRowStringBuffer="",St.L_AND_G_PATTERNS=St.L_PATTERNS.map((t=>Int32Array.from(t)));for(let t=10;t<20;t++){let e=St.L_PATTERNS[t-10],r=new Int32Array(e.length);for(let t=0;t=e.getSize()||!e.isRange(c,h,!1))throw new M;let g=a.toString();if(g.length<8)throw new E;if(!St.checkChecksum(g))throw new l;let d=(n[1]+n[0])/2,u=(A[1]+A[0])/2,C=this.getBarcodeFormat(),I=[new nt(d,t),new nt(u,t)],w=new L(g,null,0,I,C,(new Date).getTime()),m=0;try{let r=pt.decodeRow(t,e,A[1]);w.putMetadata(H.UPC_EAN_EXTENSION,r.getText()),w.putAllMetadata(r.getResultMetadata()),w.addResultPoints(r.getResultPoints()),m=r.getText().length}catch(t){}let p=null==r?null:r.get(f.ALLOWED_EAN_EXTENSIONS);if(null!=p){let t=!1;for(let e in p)if(m.toString()===e){t=!0;break}if(!t)throw new M}return C===Q.EAN_13||Q.UPC_A,w}static checkChecksum(t){return St.checkStandardUPCEANChecksum(t)}static checkStandardUPCEANChecksum(t){let e=t.length;if(0===e)return!1;let r=parseInt(t.charAt(e-1),10);return St.getStandardUPCEANChecksum(t.substring(0,e-1))===r}static getStandardUPCEANChecksum(t){let e=t.length,r=0;for(let n=e-1;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new E;r+=e}r*=3;for(let n=e-2;n>=0;n-=2){let e=t.charAt(n).charCodeAt(0)-"0".charCodeAt(0);if(e<0||e>9)throw new E;r+=e}return(1e3-r)%10}static decodeEnd(t,e){return St.findGuardPattern(t,e,!1,St.START_END_PATTERN,new Int32Array(St.START_END_PATTERN.length).fill(0))}}class Rt extends St{constructor(){super(),this.decodeMiddleCounters=Int32Array.from([0,0,0,0])}decodeMiddle(t,e,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=t.getSize(),o=e[1],s=0;for(let e=0;e<6&&o=10&&(s|=1<<5-e)}r=Rt.determineFirstDigit(r,s),o=St.findGuardPattern(t,o,!0,St.MIDDLE_PATTERN,new Int32Array(St.MIDDLE_PATTERN.length).fill(0))[1];for(let e=0;e<6&&ot));n[0]=0,n[1]=0,n[2]=0,n[3]=0;const i=t.getSize();let o=e[1],s=0;for(let e=0;e<6&&o=10&&(s|=1<<5-e)}return Mt.determineNumSysAndCheckDigit(new D(r),s),o}decodeEnd(t,e){return Mt.findGuardPatternWithoutCounters(t,e,!0,Mt.MIDDLE_END_PATTERN)}checkChecksum(t){return St.checkChecksum(Mt.convertUPCEtoUPCA(t))}static determineNumSysAndCheckDigit(t,e){for(let r=0;r<=1;r++)for(let n=0;n<10;n++)if(e===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[r][n])return t.insert(0,"0"+r),void t.append("0"+n);throw M.getNotFoundInstance()}getBarcodeFormat(){return Q.UPC_E}static convertUPCEtoUPCA(t){const e=t.slice(1,7).split("").map((t=>t.charCodeAt(0))),r=new D;r.append(t.charAt(0));let n=e[5];switch(n){case 0:case 1:case 2:r.appendChars(e,0,2),r.append(n),r.append("0000"),r.appendChars(e,2,3);break;case 3:r.appendChars(e,0,3),r.append("00000"),r.appendChars(e,3,2);break;case 4:r.appendChars(e,0,4),r.append("00000"),r.append(e[4]);break;default:r.appendChars(e,0,5),r.append("0000"),r.append(n)}return t.length>=8&&r.append(t.charAt(7)),r.toString()}}Mt.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),Mt.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])];class Tt extends ut{constructor(t){super();let e=null==t?null:t.get(f.POSSIBLE_FORMATS),r=[];null!=e&&(e.indexOf(Q.EAN_13)>-1?r.push(new Rt):e.indexOf(Q.UPC_A)>-1&&r.push(new Bt),e.indexOf(Q.EAN_8)>-1&&r.push(new Dt),e.indexOf(Q.UPC_E)>-1&&r.push(new Mt)),0===r.length&&(r.push(new Rt),r.push(new Dt),r.push(new Mt)),this.readers=r}decodeRow(t,e,r){for(let n of this.readers)try{const i=n.decodeRow(t,e,r),o=i.getBarcodeFormat()===Q.EAN_13&&"0"===i.getText().charAt(0),s=null==r?null:r.get(f.POSSIBLE_FORMATS),a=null==s||s.includes(Q.UPC_A);if(o&&a){const t=i.getRawBytes(),e=new L(i.getText().substring(1),t,t.length,i.getResultPoints(),Q.UPC_A);return e.putAllMetadata(i.getResultMetadata()),e}return i}catch(t){}throw new M}reset(){for(let t of this.readers)t.reset()}}class Nt extends ut{constructor(){super(),this.decodeFinderCounters=new Int32Array(4),this.dataCharacterCounters=new Int32Array(8),this.oddRoundingErrors=new Array(4),this.evenRoundingErrors=new Array(4),this.oddCounts=new Array(this.dataCharacterCounters.length/2),this.evenCounts=new Array(this.dataCharacterCounters.length/2)}getDecodeFinderCounters(){return this.decodeFinderCounters}getDataCharacterCounters(){return this.dataCharacterCounters}getOddRoundingErrors(){return this.oddRoundingErrors}getEvenRoundingErrors(){return this.evenRoundingErrors}getOddCounts(){return this.oddCounts}getEvenCounts(){return this.evenCounts}parseFinderValue(t,e){for(let r=0;rn&&(n=e[i],r=i);t[r]++}static decrement(t,e){let r=0,n=e[0];for(let i=1;i=Nt.MIN_FINDER_PATTERN_RATIO&&r<=Nt.MAX_FINDER_PATTERN_RATIO){let e=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;for(let n of t)n>r&&(r=n),n=s-a-1&&(t-=Ot.combins(n-A-(s-a),s-a-2)),s-a-1>1){let r=0;for(let t=n-A-(s-a-2);t>e;t--)r+=Ot.combins(n-A-t-1,s-a-3);t-=r*(s-1-a)}else n-A>e&&t--;i+=t}n-=A}return i}static combins(t,e){let r,n;t-e>e?(n=e,r=t-e):(n=t-e,r=e);let i=1,o=1;for(let e=t;e>r;e--)i*=e,o<=n&&(i/=o,o++);for(;o<=n;)i/=o,o++;return i}}class bt{constructor(t,e){e?this.decodedInformation=null:(this.finished=t,this.decodedInformation=e)}getDecodedInformation(){return this.decodedInformation}isFinished(){return this.finished}}class Ft{constructor(t){this.newPosition=t}getNewPosition(){return this.newPosition}}class Pt extends Ft{constructor(t,e){super(t),this.value=e}getValue(){return this.value}isFNC1(){return this.value===Pt.FNC1}}Pt.FNC1="$";class kt extends Ft{constructor(t,e,r){super(t),r?(this.remaining=!0,this.remainingValue=this.remainingValue):(this.remaining=!1,this.remainingValue=0),this.newString=e}getNewString(){return this.newString}isRemaining(){return this.remaining}getRemainingValue(){return this.remainingValue}}class Lt extends Ft{constructor(t,e,r){if(super(t),e<0||e>10||r<0||r>10)throw new E;this.firstDigit=e,this.secondDigit=r}getFirstDigit(){return this.firstDigit}getSecondDigit(){return this.secondDigit}getValue(){return 10*this.firstDigit+this.secondDigit}isFirstDigitFNC1(){return this.firstDigit===Lt.FNC1}isSecondDigitFNC1(){return this.secondDigit===Lt.FNC1}isAnyFNC1(){return this.firstDigit===Lt.FNC1||this.secondDigit===Lt.FNC1}}Lt.FNC1=10;class Gt{constructor(){}static parseFieldsInGeneralPurpose(t){if(!t)return null;if(t.length<2)throw new M;let e=t.substring(0,2);for(let r of Gt.TWO_DIGIT_DATA_LENGTH)if(r[0]===e)return r[1]===Gt.VARIABLE_LENGTH?Gt.processVariableAI(2,r[2],t):Gt.processFixedAI(2,r[1],t);if(t.length<3)throw new M;let r=t.substring(0,3);for(let e of Gt.THREE_DIGIT_DATA_LENGTH)if(e[0]===r)return e[1]===Gt.VARIABLE_LENGTH?Gt.processVariableAI(3,e[2],t):Gt.processFixedAI(3,e[1],t);for(let e of Gt.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH)if(e[0]===r)return e[1]===Gt.VARIABLE_LENGTH?Gt.processVariableAI(4,e[2],t):Gt.processFixedAI(4,e[1],t);if(t.length<4)throw new M;let n=t.substring(0,4);for(let e of Gt.FOUR_DIGIT_DATA_LENGTH)if(e[0]===n)return e[1]===Gt.VARIABLE_LENGTH?Gt.processVariableAI(4,e[2],t):Gt.processFixedAI(4,e[1],t);throw new M}static processFixedAI(t,e,r){if(r.lengththis.information.getSize())return t+4<=this.information.getSize();for(let e=t;ethis.information.getSize()){let e=this.extractNumericValueFromBitArray(t,4);return new Lt(this.information.getSize(),0===e?Lt.FNC1:e-1,Lt.FNC1)}let e=this.extractNumericValueFromBitArray(t,7);return new Lt(t+7,(e-8)/11,(e-8)%11)}extractNumericValueFromBitArray(t,e){return Qt.extractNumericValueFromBitArray(this.information,t,e)}static extractNumericValueFromBitArray(t,e,r){let n=0;for(let i=0;ithis.information.getSize())return!1;let e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+7>this.information.getSize())return!1;let r=this.extractNumericValueFromBitArray(t,7);if(r>=64&&r<116)return!0;if(t+8>this.information.getSize())return!1;let n=this.extractNumericValueFromBitArray(t,8);return n>=232&&n<253}decodeIsoIec646(t){let e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Pt(t+5,Pt.FNC1);if(e>=5&&e<15)return new Pt(t+5,"0"+(e-5));let r,n=this.extractNumericValueFromBitArray(t,7);if(n>=64&&n<90)return new Pt(t+7,""+(n+1));if(n>=90&&n<116)return new Pt(t+7,""+(n+7));switch(this.extractNumericValueFromBitArray(t,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new E}return new Pt(t+8,r)}isStillAlpha(t){if(t+5>this.information.getSize())return!1;let e=this.extractNumericValueFromBitArray(t,5);if(e>=5&&e<16)return!0;if(t+6>this.information.getSize())return!1;let r=this.extractNumericValueFromBitArray(t,6);return r>=16&&r<63}decodeAlphanumeric(t){let e=this.extractNumericValueFromBitArray(t,5);if(15===e)return new Pt(t+5,Pt.FNC1);if(e>=5&&e<15)return new Pt(t+5,"0"+(e-5));let r,n=this.extractNumericValueFromBitArray(t,6);if(n>=32&&n<58)return new Pt(t+6,""+(n+33));switch(n){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new q("Decoding invalid alphanumeric value: "+n)}return new Pt(t+6,r)}isAlphaTo646ToAlphaLatch(t){if(t+1>this.information.getSize())return!1;for(let e=0;e<5&&e+tthis.information.getSize())return!1;for(let e=t;ethis.information.getSize())return!1;for(let e=0;e<4&&e+t{e.forEach((e=>{t.getLeftChar().getValue()===e.getLeftChar().getValue()&&t.getRightChar().getValue()===e.getRightChar().getValue()&&t.getFinderPatter().getValue()===e.getFinderPatter().getValue()&&(r=!0)}))})),r}}class qt extends Nt{constructor(t){super(...arguments),this.pairs=new Array(qt.MAX_PAIRS),this.rows=new Array,this.startEnd=[2],this.verbose=!0===t}decodeRow(t,e,r){this.pairs.length=0,this.startFromEven=!1;try{return qt.constructResult(this.decodeRow2pairs(t,e))}catch(t){this.verbose&&console.log(t)}return this.pairs.length=0,this.startFromEven=!0,qt.constructResult(this.decodeRow2pairs(t,e))}reset(){this.pairs.length=0,this.rows.length=0}decodeRow2pairs(t,e){let r,n=!1;for(;!n;)try{this.pairs.push(this.retrieveNextPair(e,this.pairs,t))}catch(t){if(t instanceof M){if(!this.pairs.length)throw new M;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(t,!1),r){let t=this.checkRowsBoolean(!1);if(null!=t)return t;if(t=this.checkRowsBoolean(!0),null!=t)return t}throw new M}checkRowsBoolean(t){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,t&&(this.rows=this.rows.reverse());let e=null;try{e=this.checkRows(new Array,0)}catch(t){this.verbose&&console.log(t)}return t&&(this.rows=this.rows.reverse()),e}checkRows(t,e){for(let r=e;re.length)continue;let r=!0;for(let n=0;nt){i=e.isEquivalent(this.pairs);break}n=e.isEquivalent(this.pairs),r++}i||n||qt.isPartialRow(this.pairs,this.rows)||(this.rows.push(r,new Kt(this.pairs,t,e)),this.removePartialRows(this.pairs,this.rows))}removePartialRows(t,e){for(let r of e)if(r.getPairs().length!==t.length)for(let e of r.getPairs())for(let r of t)if(Jt.equals(e,r))break}static isPartialRow(t,e){for(let r of e){let e=!0;for(let n of t){let t=!1;for(let e of r.getPairs())if(n.equals(e)){t=!0;break}if(!t){e=!1;break}}if(e)return!0}return!1}getRows(){return this.rows}static constructResult(t){let e=function(t){try{if(t.get(1))return new Ut(t);if(!t.get(2))return new vt(t);switch(Qt.extractNumericValueFromBitArray(t,1,4)){case 4:return new Ht(t);case 5:return new Vt(t)}switch(Qt.extractNumericValueFromBitArray(t,1,5)){case 12:return new jt(t);case 13:return new Xt(t)}switch(Qt.extractNumericValueFromBitArray(t,1,7)){case 56:return new zt(t,"310","11");case 57:return new zt(t,"320","11");case 58:return new zt(t,"310","13");case 59:return new zt(t,"320","13");case 60:return new zt(t,"310","15");case 61:return new zt(t,"320","15");case 62:return new zt(t,"310","17");case 63:return new zt(t,"320","17")}}catch(e){throw console.log(e),new q("unknown decoder: "+t)}}(class{static buildBitArray(t){let e=2*t.length-1;null==t[t.length-1].getRightChar()&&(e-=1);let r=new I(12*e),n=0,i=t[0].getRightChar().getValue();for(let t=11;t>=0;--t)0!=(i&1<=0;--t)0!=(o&1<=0;--e)0!=(t&1<=0?r:this.isEmptyPair(e)?0:e[e.length-1].getFinderPattern().getStartEnd()[1];let s=e.length%2!=0;this.startFromEven&&(s=!s);let a=!1;for(;i=0&&!t.get(e);)e--;e++,n=this.startEnd[0]-e,i=e,o=this.startEnd[1]}else i=this.startEnd[0],o=t.getNextUnset(this.startEnd[1]+1),n=o-this.startEnd[1];let s,a=this.getDecodeFinderCounters();h.arraycopy(a,0,a,1,a.length-1),a[0]=n;try{s=this.parseFinderValue(a,qt.FINDER_PATTERNS)}catch(t){return null}return new yt(s,[i,o],i,o,e)}decodeDataCharacter(t,e,r,n){let i=this.getDataCharacterCounters();for(let t=0;t.3)throw new M;let a=this.getOddCounts(),A=this.getEvenCounts(),l=this.getOddRoundingErrors(),c=this.getEvenRoundingErrors();for(let t=0;t8){if(e>8.7)throw new M;r=8}let n=t/2;0==(1&t)?(a[n]=r,l[n]=e-r):(A[n]=r,c[n]=e-r)}this.adjustOddEvenCounts(17);let h=4*e.getValue()+(r?0:2)+(n?0:1)-1,g=0,d=0;for(let t=a.length-1;t>=0;t--){if(qt.isNotA1left(e,r,n)){let e=qt.WEIGHTS[h][2*t];d+=a[t]*e}g+=a[t]}let u=0;for(let t=A.length-1;t>=0;t--)if(qt.isNotA1left(e,r,n)){let e=qt.WEIGHTS[h][2*t+1];u+=A[t]*e}let C=d+u;if(0!=(1&g)||g>13||g<4)throw new M;let I=(13-g)/2,w=qt.SYMBOL_WIDEST[I],f=9-w,E=Ot.getRSSvalue(a,w,!0),m=Ot.getRSSvalue(A,f,!1),p=qt.EVEN_TOTAL_SUBSET[I],S=qt.GSUM[I];return new _t(E*p+m+S,C)}static isNotA1left(t,e,r){return!(0==t.getValue()&&e&&r)}adjustOddEvenCounts(t){let e=et.sum(new Int32Array(this.getOddCounts())),r=et.sum(new Int32Array(this.getEvenCounts())),n=!1,i=!1;e>13?i=!0:e<4&&(n=!0);let o=!1,s=!1;r>13?s=!0:r<4&&(o=!0);let a=e+r-t,A=1==(1&e),l=0==(1&r);if(1==a)if(A){if(l)throw new M;i=!0}else{if(!l)throw new M;s=!0}else if(-1==a)if(A){if(l)throw new M;n=!0}else{if(!l)throw new M;o=!0}else{if(0!=a)throw new M;if(A){if(!l)throw new M;e1)for(let e of this.possibleRightPairs)if(e.getCount()>1&&te.checkChecksum(t,e))return te.constructResult(t,e);throw new M}static addOrTally(t,e){if(null==e)return;let r=!1;for(let n of t)if(n.getValue()===e.getValue()){n.incrementCount(),r=!0;break}r||t.push(e)}reset(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0}static constructResult(t,e){let r=4537077*t.getValue()+e.getValue(),n=new String(r).toString(),i=new D;for(let t=13-n.length;t>0;t--)i.append("0");i.append(n);let o=0;for(let t=0;t<13;t++){let e=i.charAt(t).charCodeAt(0)-"0".charCodeAt(0);o+=0==(1&t)?3*e:e}o=10-o%10,10===o&&(o=0),i.append(o.toString());let s=t.getFinderPattern().getResultPoints(),a=e.getFinderPattern().getResultPoints();return new L(i.toString(),null,0,[s[0],s[1],a[0],a[1]],Q.RSS_14,(new Date).getTime())}static checkChecksum(t,e){let r=(t.getChecksumPortion()+16*e.getChecksumPortion())%79,n=9*t.getFinderPattern().getValue()+e.getFinderPattern().getValue();return n>72&&n--,n>8&&n--,r===n}decodePair(t,e,r,n){try{let i=this.findFinderPattern(t,e),o=this.parseFoundFinderPattern(t,r,e,i),s=null==n?null:n.get(f.NEED_RESULT_POINT_CALLBACK);if(null!=s){let n=(i[0]+i[1])/2;e&&(n=t.getSize()-1-n),s.foundPossibleResultPoint(new nt(n,r))}let a=this.decodeDataCharacter(t,o,!0),A=this.decodeDataCharacter(t,o,!1);return new $t(1597*a.getValue()+A.getValue(),a.getChecksumPortion()+4*A.getChecksumPortion(),o)}catch(t){return null}}decodeDataCharacter(t,e,r){let n=this.getDataCharacterCounters();for(let t=0;t8&&(r=8);let i=Math.floor(t/2);0==(1&t)?(s[i]=r,A[i]=e-r):(a[i]=r,l[i]=e-r)}this.adjustOddEvenCounts(r,i);let c=0,h=0;for(let t=s.length-1;t>=0;t--)h*=9,h+=s[t],c+=s[t];let g=0,d=0;for(let t=a.length-1;t>=0;t--)g*=9,g+=a[t],d+=a[t];let u=h+3*g;if(r){if(0!=(1&c)||c>12||c<4)throw new M;let t=(12-c)/2,e=te.OUTSIDE_ODD_WIDEST[t],r=9-e,n=Ot.getRSSvalue(s,e,!1),i=Ot.getRSSvalue(a,r,!0),o=te.OUTSIDE_EVEN_TOTAL_SUBSET[t],A=te.OUTSIDE_GSUM[t];return new _t(n*o+i+A,u)}{if(0!=(1&d)||d>10||d<4)throw new M;let t=(10-d)/2,e=te.INSIDE_ODD_WIDEST[t],r=9-e,n=Ot.getRSSvalue(s,e,!0),i=Ot.getRSSvalue(a,r,!1),o=te.INSIDE_ODD_TOTAL_SUBSET[t],A=te.INSIDE_GSUM[t];return new _t(i*o+n+A,u)}}findFinderPattern(t,e){let r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;let n=t.getSize(),i=!1,o=0;for(;o=0&&i!==t.get(o);)o--;o++;const s=n[0]-o,a=this.getDecodeFinderCounters(),A=new Int32Array(a.length);h.arraycopy(a,0,A,1,a.length-1),A[0]=s;const l=this.parseFinderValue(A,te.FINDER_PATTERNS);let c=o,g=n[1];return r&&(c=t.getSize()-1-c,g=t.getSize()-1-g),new yt(l,[o,n[1]],c,g,e)}adjustOddEvenCounts(t,e){let r=et.sum(new Int32Array(this.getOddCounts())),n=et.sum(new Int32Array(this.getEvenCounts())),i=!1,o=!1,s=!1,a=!1;t?(r>12?o=!0:r<4&&(i=!0),n>12?a=!0:n<4&&(s=!0)):(r>11?o=!0:r<5&&(i=!0),n>10?a=!0:n<4&&(s=!0));let A=r+n-e,l=(1&r)==(t?1:0),c=1==(1&n);if(1===A)if(l){if(c)throw new M;o=!0}else{if(!c)throw new M;a=!0}else if(-1===A)if(l){if(c)throw new M;i=!0}else{if(!c)throw new M;s=!0}else{if(0!==A)throw new M;if(l){if(!c)throw new M;rt.reset()))}}class re{constructor(t,e,r){this.ecCodewords=t,this.ecBlocks=[e],r&&this.ecBlocks.push(r)}getECCodewords(){return this.ecCodewords}getECBlocks(){return this.ecBlocks}}class ne{constructor(t,e){this.count=t,this.dataCodewords=e}getCount(){return this.count}getDataCodewords(){return this.dataCodewords}}class ie{constructor(t,e,r,n,i,o){this.versionNumber=t,this.symbolSizeRows=e,this.symbolSizeColumns=r,this.dataRegionSizeRows=n,this.dataRegionSizeColumns=i,this.ecBlocks=o;let s=0;const a=o.getECCodewords(),A=o.getECBlocks();for(let t of A)s+=t.getCount()*(t.getDataCodewords()+a);this.totalCodewords=s}getVersionNumber(){return this.versionNumber}getSymbolSizeRows(){return this.symbolSizeRows}getSymbolSizeColumns(){return this.symbolSizeColumns}getDataRegionSizeRows(){return this.dataRegionSizeRows}getDataRegionSizeColumns(){return this.dataRegionSizeColumns}getTotalCodewords(){return this.totalCodewords}getECBlocks(){return this.ecBlocks}static getVersionForDimensions(t,e){if(0!=(1&t)||0!=(1&e))throw new E;for(let r of ie.VERSIONS)if(r.symbolSizeRows===t&&r.symbolSizeColumns===e)return r;throw new E}toString(){return""+this.versionNumber}static buildVersions(){return[new ie(1,10,10,8,8,new re(5,new ne(1,3))),new ie(2,12,12,10,10,new re(7,new ne(1,5))),new ie(3,14,14,12,12,new re(10,new ne(1,8))),new ie(4,16,16,14,14,new re(12,new ne(1,12))),new ie(5,18,18,16,16,new re(14,new ne(1,18))),new ie(6,20,20,18,18,new re(18,new ne(1,22))),new ie(7,22,22,20,20,new re(20,new ne(1,30))),new ie(8,24,24,22,22,new re(24,new ne(1,36))),new ie(9,26,26,24,24,new re(28,new ne(1,44))),new ie(10,32,32,14,14,new re(36,new ne(1,62))),new ie(11,36,36,16,16,new re(42,new ne(1,86))),new ie(12,40,40,18,18,new re(48,new ne(1,114))),new ie(13,44,44,20,20,new re(56,new ne(1,144))),new ie(14,48,48,22,22,new re(68,new ne(1,174))),new ie(15,52,52,24,24,new re(42,new ne(2,102))),new ie(16,64,64,14,14,new re(56,new ne(2,140))),new ie(17,72,72,16,16,new re(36,new ne(4,92))),new ie(18,80,80,18,18,new re(48,new ne(4,114))),new ie(19,88,88,20,20,new re(56,new ne(4,144))),new ie(20,96,96,22,22,new re(68,new ne(4,174))),new ie(21,104,104,24,24,new re(56,new ne(6,136))),new ie(22,120,120,18,18,new re(68,new ne(6,175))),new ie(23,132,132,20,20,new re(62,new ne(8,163))),new ie(24,144,144,22,22,new re(62,new ne(8,156),new ne(2,155))),new ie(25,8,18,6,16,new re(7,new ne(1,5))),new ie(26,8,32,6,14,new re(11,new ne(1,10))),new ie(27,12,26,10,24,new re(14,new ne(1,16))),new ie(28,12,36,10,16,new re(18,new ne(1,22))),new ie(29,16,36,14,16,new re(24,new ne(1,32))),new ie(30,16,48,14,22,new re(28,new ne(1,49)))]}}ie.VERSIONS=ie.buildVersions();class oe{constructor(t){const e=t.getHeight();if(e<8||e>144||0!=(1&e))throw new E;this.version=oe.readVersion(t),this.mappingBitMatrix=this.extractDataRegion(t),this.readMappingMatrix=new B(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}getVersion(){return this.version}static readVersion(t){const e=t.getHeight(),r=t.getWidth();return ie.getVersionForDimensions(e,r)}readCodewords(){const t=new Int8Array(this.version.getTotalCodewords());let e=0,r=4,n=0;const i=this.mappingBitMatrix.getHeight(),o=this.mappingBitMatrix.getWidth();let s=!1,a=!1,A=!1,l=!1;do{if(r!==i||0!==n||s)if(r!==i-2||0!==n||0==(3&o)||a)if(r!==i+4||2!==n||0!=(7&o)||A)if(r!==i-2||0!==n||4!=(7&o)||l){do{r=0&&!this.readMappingMatrix.get(n,r)&&(t[e++]=255&this.readUtah(r,n,i,o)),r-=2,n+=2}while(r>=0&&n=0&&n=0);r+=3,n+=1}else t[e++]=255&this.readCorner4(i,o),r-=2,n+=2,l=!0;else t[e++]=255&this.readCorner3(i,o),r-=2,n+=2,A=!0;else t[e++]=255&this.readCorner2(i,o),r-=2,n+=2,a=!0;else t[e++]=255&this.readCorner1(i,o),r-=2,n+=2,s=!0}while(r7?e-1:e;o[n].codewords[i]=t[c++]}if(c!==t.length)throw new a;return o}getNumDataCodewords(){return this.numDataCodewords}getCodewords(){return this.codewords}}class ae{constructor(t){this.bytes=t,this.byteOffset=0,this.bitOffset=0}getBitOffset(){return this.bitOffset}getByteOffset(){return this.byteOffset}readBits(t){if(t<1||t>32||t>this.available())throw new a(""+t);let e=0,r=this.bitOffset,n=this.byteOffset;const i=this.bytes;if(r>0){const o=8-r,s=t>8-s<>a,t-=s,r+=s,8===r&&(r=0,n++)}if(t>0){for(;t>=8;)e=e<<8|255&i[n],n++,t-=8;if(t>0){const o=8-t,s=255>>o<>o,r+=t}}return this.bitOffset=r,this.byteOffset=n,e}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}!function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"}(Y||(Y={}));class Ae{static decode(t){const e=new ae(t),r=new D,n=new D,i=new Array;let o=Y.ASCII_ENCODE;do{if(o===Y.ASCII_ENCODE)o=this.decodeAsciiSegment(e,r,n);else{switch(o){case Y.C40_ENCODE:this.decodeC40Segment(e,r);break;case Y.TEXT_ENCODE:this.decodeTextSegment(e,r);break;case Y.ANSIX12_ENCODE:this.decodeAnsiX12Segment(e,r);break;case Y.EDIFACT_ENCODE:this.decodeEdifactSegment(e,r);break;case Y.BASE256_ENCODE:this.decodeBase256Segment(e,r,i);break;default:throw new E}o=Y.ASCII_ENCODE}}while(o!==Y.PAD_ENCODE&&e.available()>0);return n.length()>0&&r.append(n.toString()),new V(t,r.toString(),0===i.length?null:i,null)}static decodeAsciiSegment(t,e,r){let n=!1;do{let i=t.readBits(8);if(0===i)throw new E;if(i<=128)return n&&(i+=128),e.append(String.fromCharCode(i-1)),Y.ASCII_ENCODE;if(129===i)return Y.PAD_ENCODE;if(i<=229){const t=i-130;t<10&&e.append("0"),e.append(""+t)}else switch(i){case 230:return Y.C40_ENCODE;case 231:return Y.BASE256_ENCODE;case 232:e.append(String.fromCharCode(29));break;case 233:case 234:break;case 235:n=!0;break;case 236:e.append("[)>05"),r.insert(0,"");break;case 237:e.append("[)>06"),r.insert(0,"");break;case 238:return Y.ANSIX12_ENCODE;case 239:return Y.TEXT_ENCODE;case 240:return Y.EDIFACT_ENCODE;case 241:break;default:if(254!==i||0!==t.available())throw new E}}while(t.available()>0);return Y.ASCII_ENCODE}static decodeC40Segment(t,e){let r=!1;const n=[];let i=0;do{if(8===t.available())return;const o=t.readBits(8);if(254===o)return;this.parseTwoBytes(o,t.readBits(8),n);for(let t=0;t<3;t++){const o=n[t];switch(i){case 0:if(o<3)i=o+1;else{if(!(o0)}static decodeTextSegment(t,e){let r=!1,n=[],i=0;do{if(8===t.available())return;const o=t.readBits(8);if(254===o)return;this.parseTwoBytes(o,t.readBits(8),n);for(let t=0;t<3;t++){const o=n[t];switch(i){case 0:if(o<3)i=o+1;else{if(!(o0)}static decodeAnsiX12Segment(t,e){const r=[];do{if(8===t.available())return;const n=t.readBits(8);if(254===n)return;this.parseTwoBytes(n,t.readBits(8),r);for(let t=0;t<3;t++){const n=r[t];switch(n){case 0:e.append("\r");break;case 1:e.append("*");break;case 2:e.append(">");break;case 3:e.append(" ");break;default:if(n<14)e.append(String.fromCharCode(n+44));else{if(!(n<40))throw new E;e.append(String.fromCharCode(n+51))}}}}while(t.available()>0)}static parseTwoBytes(t,e,r){let n=(t<<8)+e-1,i=Math.floor(n/1600);r[0]=i,n-=1600*i,i=Math.floor(n/40),r[1]=i,r[2]=n-40*i}static decodeEdifactSegment(t,e){do{if(t.available()<=16)return;for(let r=0;r<4;r++){let r=t.readBits(6);if(31===r){const e=8-t.getBitOffset();return void(8!==e&&t.readBits(e))}0==(32&r)&&(r|=64),e.append(String.fromCharCode(r))}}while(t.available()>0)}static decodeBase256Segment(t,e,r){let n=1+t.getByteOffset();const i=this.unrandomize255State(t.readBits(8),n++);let o;if(o=0===i?t.available()/8|0:i<250?i:250*(i-249)+this.unrandomize255State(t.readBits(8),n++),o<0)throw new E;const s=new Uint8Array(o);for(let e=0;e=0?r:r+256}}Ae.C40_BASIC_SET_CHARS=["*","*","*"," ","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"],Ae.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],Ae.TEXT_BASIC_SET_CHARS=["*","*","*"," ","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"],Ae.TEXT_SHIFT2_SET_CHARS=Ae.C40_SHIFT2_SET_CHARS,Ae.TEXT_SHIFT3_SET_CHARS=["`","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","{","|","}","~",String.fromCharCode(127)];class le{constructor(){this.rsDecoder=new $(J.DATA_MATRIX_FIELD_256)}decode(t){const e=new oe(t),r=e.getVersion(),n=e.readCodewords(),i=se.getDataBlocks(n,r);let o=0;for(let t of i)o+=t.getNumDataCodewords();const s=new Uint8Array(o),a=i.length;for(let t=0;ts&&(l=s,c[0]=e,c[1]=r,c[2]=n,c[3]=i),l>a&&(l=a,c[0]=r,c[1]=n,c[2]=i,c[3]=e),l>A&&(c[0]=n,c[1]=i,c[2]=e,c[3]=r),c}detectSolid2(t){let e=t[0],r=t[1],n=t[2],i=t[3],o=this.transitionsBetween(e,i),s=ce.shiftPoint(r,n,4*(o+1)),a=ce.shiftPoint(n,r,4*(o+1));return this.transitionsBetween(s,e)this.transitionsBetween(a,c)+this.transitionsBetween(A,c)?l:c:l:this.isValid(c)?c:null}shiftToModuleCenter(t){let e=t[0],r=t[1],n=t[2],i=t[3],o=this.transitionsBetween(e,i)+1,s=this.transitionsBetween(n,i)+1,a=ce.shiftPoint(e,r,4*s),A=ce.shiftPoint(n,r,4*o);o=this.transitionsBetween(a,i)+1,s=this.transitionsBetween(A,i)+1,1==(1&o)&&(o+=1),1==(1&s)&&(s+=1);let l,c,h=(e.getX()+r.getX()+n.getX()+i.getX())/4,g=(e.getY()+r.getY()+n.getY()+i.getY())/4;return e=ce.moveAway(e,h,g),r=ce.moveAway(r,h,g),n=ce.moveAway(n,h,g),i=ce.moveAway(i,h,g),a=ce.shiftPoint(e,r,4*s),a=ce.shiftPoint(a,i,4*o),l=ce.shiftPoint(r,e,4*s),l=ce.shiftPoint(l,n,4*o),A=ce.shiftPoint(n,i,4*s),A=ce.shiftPoint(A,r,4*o),c=ce.shiftPoint(i,n,4*s),c=ce.shiftPoint(c,e,4*o),[a,l,A,c]}isValid(t){return t.getX()>=0&&t.getX()0&&t.getY()Math.abs(i-r);if(s){let t=r;r=n,n=t,t=i,i=o,o=t}let a=Math.abs(i-r),A=Math.abs(o-n),l=-a/2,c=n0){if(e===o)break;e+=c,l-=a}}return g}}class he{constructor(){this.decoder=new le}decode(t,e=null){let r,n;if(null!=e&&e.has(f.PURE_BARCODE)){const e=he.extractPureBits(t.getBlackMatrix());r=this.decoder.decode(e),n=he.NO_POINTS}else{const e=new ce(t.getBlackMatrix()).detect();r=this.decoder.decode(e.getBits()),n=e.getPoints()}const i=r.getRawBytes(),o=new L(r.getText(),i,8*i.length,n,Q.DATA_MATRIX,h.currentTimeMillis()),s=r.getByteSegments();null!=s&&o.putMetadata(H.BYTE_SEGMENTS,s);const a=r.getECLevel();return null!=a&&o.putMetadata(H.ERROR_CORRECTION_LEVEL,a),o}reset(){}static extractPureBits(t){const e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null==e||null==r)throw new M;const n=this.moduleSize(e,t);let i=e[1];const o=r[1];let s=e[0];const a=(r[0]-s+1)/n,A=(o-i+1)/n;if(a<=0||A<=0)throw new M;const l=n/2;i+=l,s+=l;const c=new B(a,A);for(let e=0;e=ge.FOR_BITS.size)throw new a;return ge.FOR_BITS.get(t)}}ge.FOR_BITS=new Map,ge.FOR_VALUE=new Map,ge.L=new ge(U.L,"L",1),ge.M=new ge(U.M,"M",0),ge.Q=new ge(U.Q,"Q",3),ge.H=new ge(U.H,"H",2);class de{constructor(t){this.errorCorrectionLevel=ge.forBits(t>>3&3),this.dataMask=7&t}static numBitsDiffering(t,e){return C.bitCount(t^e)}static decodeFormatInformation(t,e){const r=de.doDecodeFormatInformation(t,e);return null!==r?r:de.doDecodeFormatInformation(t^de.FORMAT_INFO_MASK_QR,e^de.FORMAT_INFO_MASK_QR)}static doDecodeFormatInformation(t,e){let r=Number.MAX_SAFE_INTEGER,n=0;for(const i of de.FORMAT_INFO_DECODE_LOOKUP){const o=i[0];if(o===t||o===e)return new de(i[1]);let s=de.numBitsDiffering(t,o);s40)throw new a;return Ie.VERSIONS[t-1]}static decodeVersionInformation(t){let e=Number.MAX_SAFE_INTEGER,r=0;for(let n=0;n6&&(e.setRegion(t-11,0,3,6),e.setRegion(0,t-11,6,3)),e}toString(){return""+this.versionNumber}}Ie.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),Ie.VERSIONS=[new Ie(1,new Int32Array(0),new ue(7,new Ce(1,19)),new ue(10,new Ce(1,16)),new ue(13,new Ce(1,13)),new ue(17,new Ce(1,9))),new Ie(2,Int32Array.from([6,18]),new ue(10,new Ce(1,34)),new ue(16,new Ce(1,28)),new ue(22,new Ce(1,22)),new ue(28,new Ce(1,16))),new Ie(3,Int32Array.from([6,22]),new ue(15,new Ce(1,55)),new ue(26,new Ce(1,44)),new ue(18,new Ce(2,17)),new ue(22,new Ce(2,13))),new Ie(4,Int32Array.from([6,26]),new ue(20,new Ce(1,80)),new ue(18,new Ce(2,32)),new ue(26,new Ce(2,24)),new ue(16,new Ce(4,9))),new Ie(5,Int32Array.from([6,30]),new ue(26,new Ce(1,108)),new ue(24,new Ce(2,43)),new ue(18,new Ce(2,15),new Ce(2,16)),new ue(22,new Ce(2,11),new Ce(2,12))),new Ie(6,Int32Array.from([6,34]),new ue(18,new Ce(2,68)),new ue(16,new Ce(4,27)),new ue(24,new Ce(4,19)),new ue(28,new Ce(4,15))),new Ie(7,Int32Array.from([6,22,38]),new ue(20,new Ce(2,78)),new ue(18,new Ce(4,31)),new ue(18,new Ce(2,14),new Ce(4,15)),new ue(26,new Ce(4,13),new Ce(1,14))),new Ie(8,Int32Array.from([6,24,42]),new ue(24,new Ce(2,97)),new ue(22,new Ce(2,38),new Ce(2,39)),new ue(22,new Ce(4,18),new Ce(2,19)),new ue(26,new Ce(4,14),new Ce(2,15))),new Ie(9,Int32Array.from([6,26,46]),new ue(30,new Ce(2,116)),new ue(22,new Ce(3,36),new Ce(2,37)),new ue(20,new Ce(4,16),new Ce(4,17)),new ue(24,new Ce(4,12),new Ce(4,13))),new Ie(10,Int32Array.from([6,28,50]),new ue(18,new Ce(2,68),new Ce(2,69)),new ue(26,new Ce(4,43),new Ce(1,44)),new ue(24,new Ce(6,19),new Ce(2,20)),new ue(28,new Ce(6,15),new Ce(2,16))),new Ie(11,Int32Array.from([6,30,54]),new ue(20,new Ce(4,81)),new ue(30,new Ce(1,50),new Ce(4,51)),new ue(28,new Ce(4,22),new Ce(4,23)),new ue(24,new Ce(3,12),new Ce(8,13))),new Ie(12,Int32Array.from([6,32,58]),new ue(24,new Ce(2,92),new Ce(2,93)),new ue(22,new Ce(6,36),new Ce(2,37)),new ue(26,new Ce(4,20),new Ce(6,21)),new ue(28,new Ce(7,14),new Ce(4,15))),new Ie(13,Int32Array.from([6,34,62]),new ue(26,new Ce(4,107)),new ue(22,new Ce(8,37),new Ce(1,38)),new ue(24,new Ce(8,20),new Ce(4,21)),new ue(22,new Ce(12,11),new Ce(4,12))),new Ie(14,Int32Array.from([6,26,46,66]),new ue(30,new Ce(3,115),new Ce(1,116)),new ue(24,new Ce(4,40),new Ce(5,41)),new ue(20,new Ce(11,16),new Ce(5,17)),new ue(24,new Ce(11,12),new Ce(5,13))),new Ie(15,Int32Array.from([6,26,48,70]),new ue(22,new Ce(5,87),new Ce(1,88)),new ue(24,new Ce(5,41),new Ce(5,42)),new ue(30,new Ce(5,24),new Ce(7,25)),new ue(24,new Ce(11,12),new Ce(7,13))),new Ie(16,Int32Array.from([6,26,50,74]),new ue(24,new Ce(5,98),new Ce(1,99)),new ue(28,new Ce(7,45),new Ce(3,46)),new ue(24,new Ce(15,19),new Ce(2,20)),new ue(30,new Ce(3,15),new Ce(13,16))),new Ie(17,Int32Array.from([6,30,54,78]),new ue(28,new Ce(1,107),new Ce(5,108)),new ue(28,new Ce(10,46),new Ce(1,47)),new ue(28,new Ce(1,22),new Ce(15,23)),new ue(28,new Ce(2,14),new Ce(17,15))),new Ie(18,Int32Array.from([6,30,56,82]),new ue(30,new Ce(5,120),new Ce(1,121)),new ue(26,new Ce(9,43),new Ce(4,44)),new ue(28,new Ce(17,22),new Ce(1,23)),new ue(28,new Ce(2,14),new Ce(19,15))),new Ie(19,Int32Array.from([6,30,58,86]),new ue(28,new Ce(3,113),new Ce(4,114)),new ue(26,new Ce(3,44),new Ce(11,45)),new ue(26,new Ce(17,21),new Ce(4,22)),new ue(26,new Ce(9,13),new Ce(16,14))),new Ie(20,Int32Array.from([6,34,62,90]),new ue(28,new Ce(3,107),new Ce(5,108)),new ue(26,new Ce(3,41),new Ce(13,42)),new ue(30,new Ce(15,24),new Ce(5,25)),new ue(28,new Ce(15,15),new Ce(10,16))),new Ie(21,Int32Array.from([6,28,50,72,94]),new ue(28,new Ce(4,116),new Ce(4,117)),new ue(26,new Ce(17,42)),new ue(28,new Ce(17,22),new Ce(6,23)),new ue(30,new Ce(19,16),new Ce(6,17))),new Ie(22,Int32Array.from([6,26,50,74,98]),new ue(28,new Ce(2,111),new Ce(7,112)),new ue(28,new Ce(17,46)),new ue(30,new Ce(7,24),new Ce(16,25)),new ue(24,new Ce(34,13))),new Ie(23,Int32Array.from([6,30,54,78,102]),new ue(30,new Ce(4,121),new Ce(5,122)),new ue(28,new Ce(4,47),new Ce(14,48)),new ue(30,new Ce(11,24),new Ce(14,25)),new ue(30,new Ce(16,15),new Ce(14,16))),new Ie(24,Int32Array.from([6,28,54,80,106]),new ue(30,new Ce(6,117),new Ce(4,118)),new ue(28,new Ce(6,45),new Ce(14,46)),new ue(30,new Ce(11,24),new Ce(16,25)),new ue(30,new Ce(30,16),new Ce(2,17))),new Ie(25,Int32Array.from([6,32,58,84,110]),new ue(26,new Ce(8,106),new Ce(4,107)),new ue(28,new Ce(8,47),new Ce(13,48)),new ue(30,new Ce(7,24),new Ce(22,25)),new ue(30,new Ce(22,15),new Ce(13,16))),new Ie(26,Int32Array.from([6,30,58,86,114]),new ue(28,new Ce(10,114),new Ce(2,115)),new ue(28,new Ce(19,46),new Ce(4,47)),new ue(28,new Ce(28,22),new Ce(6,23)),new ue(30,new Ce(33,16),new Ce(4,17))),new Ie(27,Int32Array.from([6,34,62,90,118]),new ue(30,new Ce(8,122),new Ce(4,123)),new ue(28,new Ce(22,45),new Ce(3,46)),new ue(30,new Ce(8,23),new Ce(26,24)),new ue(30,new Ce(12,15),new Ce(28,16))),new Ie(28,Int32Array.from([6,26,50,74,98,122]),new ue(30,new Ce(3,117),new Ce(10,118)),new ue(28,new Ce(3,45),new Ce(23,46)),new ue(30,new Ce(4,24),new Ce(31,25)),new ue(30,new Ce(11,15),new Ce(31,16))),new Ie(29,Int32Array.from([6,30,54,78,102,126]),new ue(30,new Ce(7,116),new Ce(7,117)),new ue(28,new Ce(21,45),new Ce(7,46)),new ue(30,new Ce(1,23),new Ce(37,24)),new ue(30,new Ce(19,15),new Ce(26,16))),new Ie(30,Int32Array.from([6,26,52,78,104,130]),new ue(30,new Ce(5,115),new Ce(10,116)),new ue(28,new Ce(19,47),new Ce(10,48)),new ue(30,new Ce(15,24),new Ce(25,25)),new ue(30,new Ce(23,15),new Ce(25,16))),new Ie(31,Int32Array.from([6,30,56,82,108,134]),new ue(30,new Ce(13,115),new Ce(3,116)),new ue(28,new Ce(2,46),new Ce(29,47)),new ue(30,new Ce(42,24),new Ce(1,25)),new ue(30,new Ce(23,15),new Ce(28,16))),new Ie(32,Int32Array.from([6,34,60,86,112,138]),new ue(30,new Ce(17,115)),new ue(28,new Ce(10,46),new Ce(23,47)),new ue(30,new Ce(10,24),new Ce(35,25)),new ue(30,new Ce(19,15),new Ce(35,16))),new Ie(33,Int32Array.from([6,30,58,86,114,142]),new ue(30,new Ce(17,115),new Ce(1,116)),new ue(28,new Ce(14,46),new Ce(21,47)),new ue(30,new Ce(29,24),new Ce(19,25)),new ue(30,new Ce(11,15),new Ce(46,16))),new Ie(34,Int32Array.from([6,34,62,90,118,146]),new ue(30,new Ce(13,115),new Ce(6,116)),new ue(28,new Ce(14,46),new Ce(23,47)),new ue(30,new Ce(44,24),new Ce(7,25)),new ue(30,new Ce(59,16),new Ce(1,17))),new Ie(35,Int32Array.from([6,30,54,78,102,126,150]),new ue(30,new Ce(12,121),new Ce(7,122)),new ue(28,new Ce(12,47),new Ce(26,48)),new ue(30,new Ce(39,24),new Ce(14,25)),new ue(30,new Ce(22,15),new Ce(41,16))),new Ie(36,Int32Array.from([6,24,50,76,102,128,154]),new ue(30,new Ce(6,121),new Ce(14,122)),new ue(28,new Ce(6,47),new Ce(34,48)),new ue(30,new Ce(46,24),new Ce(10,25)),new ue(30,new Ce(2,15),new Ce(64,16))),new Ie(37,Int32Array.from([6,28,54,80,106,132,158]),new ue(30,new Ce(17,122),new Ce(4,123)),new ue(28,new Ce(29,46),new Ce(14,47)),new ue(30,new Ce(49,24),new Ce(10,25)),new ue(30,new Ce(24,15),new Ce(46,16))),new Ie(38,Int32Array.from([6,32,58,84,110,136,162]),new ue(30,new Ce(4,122),new Ce(18,123)),new ue(28,new Ce(13,46),new Ce(32,47)),new ue(30,new Ce(48,24),new Ce(14,25)),new ue(30,new Ce(42,15),new Ce(32,16))),new Ie(39,Int32Array.from([6,26,54,82,110,138,166]),new ue(30,new Ce(20,117),new Ce(4,118)),new ue(28,new Ce(40,47),new Ce(7,48)),new ue(30,new Ce(43,24),new Ce(22,25)),new ue(30,new Ce(10,15),new Ce(67,16))),new Ie(40,Int32Array.from([6,30,58,86,114,142,170]),new ue(30,new Ce(19,118),new Ce(6,119)),new ue(28,new Ce(18,47),new Ce(31,48)),new ue(30,new Ce(34,24),new Ce(34,25)),new ue(30,new Ce(20,15),new Ce(61,16)))],function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"}(v||(v={}));class we{constructor(t,e){this.value=t,this.isMasked=e}unmaskBitMatrix(t,e){for(let r=0;r0==(t+e&1)))],[v.DATA_MASK_001,new we(v.DATA_MASK_001,((t,e)=>0==(1&t)))],[v.DATA_MASK_010,new we(v.DATA_MASK_010,((t,e)=>e%3==0))],[v.DATA_MASK_011,new we(v.DATA_MASK_011,((t,e)=>(t+e)%3==0))],[v.DATA_MASK_100,new we(v.DATA_MASK_100,((t,e)=>0==(Math.floor(t/2)+Math.floor(e/3)&1)))],[v.DATA_MASK_101,new we(v.DATA_MASK_101,((t,e)=>t*e%6==0))],[v.DATA_MASK_110,new we(v.DATA_MASK_110,((t,e)=>t*e%6<3))],[v.DATA_MASK_111,new we(v.DATA_MASK_111,((t,e)=>0==(t+e+t*e%3&1)))]]);class fe{constructor(t){const e=t.getHeight();if(e<21||1!=(3&e))throw new E;this.bitMatrix=t}readFormatInformation(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;let t=0;for(let e=0;e<6;e++)t=this.copyBit(e,8,t);t=this.copyBit(7,8,t),t=this.copyBit(8,8,t),t=this.copyBit(8,7,t);for(let e=5;e>=0;e--)t=this.copyBit(8,e,t);const e=this.bitMatrix.getHeight();let r=0;const n=e-7;for(let t=e-1;t>=n;t--)r=this.copyBit(8,t,r);for(let t=e-8;t=0;e--)for(let i=t-9;i>=n;i--)r=this.copyBit(i,e,r);let i=Ie.decodeVersionInformation(r);if(null!==i&&i.getDimensionForVersion()===t)return this.parsedVersion=i,i;r=0;for(let e=5;e>=0;e--)for(let i=t-9;i>=n;i--)r=this.copyBit(e,i,r);if(i=Ie.decodeVersionInformation(r),null!==i&&i.getDimensionForVersion()===t)return this.parsedVersion=i,i;throw new E}copyBit(t,e,r){return(this.isMirror?this.bitMatrix.get(e,t):this.bitMatrix.get(t,e))?r<<1|1:r<<1}readCodewords(){const t=this.readFormatInformation(),e=this.readVersion(),r=we.values.get(t.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);const i=e.buildFunctionPattern();let o=!0;const s=new Uint8Array(e.getTotalCodewords());let a=0,A=0,l=0;for(let t=n-1;t>0;t-=2){6===t&&t--;for(let e=0;e=0&&s[c].codewords.length!==l;)c--;c++;const h=l-n.getECCodewordsPerBlock();let g=0;for(let e=0;et.available())throw new E;const n=new Uint8Array(2*r);let i=0;for(;r>0;){const e=t.readBits(13);let o=e/96<<8&4294967295|e%96;o+=o<959?41377:42657,n[i]=o>>8&255,n[i+1]=255&o,i+=2,r--}try{e.append(S.decode(n,R.GB2312))}catch(t){throw new E(t)}}static decodeKanjiSegment(t,e,r){if(13*r>t.available())throw new E;const n=new Uint8Array(2*r);let i=0;for(;r>0;){const e=t.readBits(13);let o=e/192<<8&4294967295|e%192;o+=o<7936?33088:49472,n[i]=o>>8,n[i+1]=o,i+=2,r--}try{e.append(S.decode(n,R.SHIFT_JIS))}catch(t){throw new E(t)}}static decodeByteSegment(t,e,r,n,i,o){if(8*r>t.available())throw new E;const s=new Uint8Array(r);for(let e=0;e=pe.ALPHANUMERIC_CHARS.length)throw new E;return pe.ALPHANUMERIC_CHARS[t]}static decodeAlphanumericSegment(t,e,r,n){const i=e.length();for(;r>1;){if(t.available()<11)throw new E;const n=t.readBits(11);e.append(pe.toAlphaNumericChar(Math.floor(n/45))),e.append(pe.toAlphaNumericChar(n%45)),r-=2}if(1===r){if(t.available()<6)throw new E;e.append(pe.toAlphaNumericChar(t.readBits(6)))}if(n)for(let t=i;t=3;){if(t.available()<10)throw new E;const n=t.readBits(10);if(n>=1e3)throw new E;e.append(pe.toAlphaNumericChar(Math.floor(n/100))),e.append(pe.toAlphaNumericChar(Math.floor(n/10)%10)),e.append(pe.toAlphaNumericChar(n%10)),r-=3}if(2===r){if(t.available()<7)throw new E;const r=t.readBits(7);if(r>=100)throw new E;e.append(pe.toAlphaNumericChar(Math.floor(r/10))),e.append(pe.toAlphaNumericChar(r%10))}else if(1===r){if(t.available()<4)throw new E;const r=t.readBits(4);if(r>=10)throw new E;e.append(pe.toAlphaNumericChar(r))}}static parseECIValue(t){const e=t.readBits(8);if(0==(128&e))return 127&e;if(128==(192&e))return(63&e)<<8&4294967295|t.readBits(8);if(192==(224&e))return(31&e)<<16&4294967295|t.readBits(16);throw new E}}pe.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",pe.GB2312_SUBSET=1;class Se{constructor(t){this.mirrored=t}isMirrored(){return this.mirrored}applyMirroredCorrection(t){if(!this.mirrored||null===t||t.length<3)return;const e=t[0];t[0]=t[2],t[2]=e}}class Re{constructor(){this.rsDecoder=new $(J.QR_CODE_FIELD_256)}decodeBooleanArray(t,e){return this.decodeBitMatrix(B.parseFromBooleanArray(t),e)}decodeBitMatrix(t,e){const r=new fe(t);let n=null;try{return this.decodeBitMatrixParser(r,e)}catch(t){n=t}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();const t=this.decodeBitMatrixParser(r,e);return t.setOther(new Se(!0)),t}catch(t){if(null!==n)throw n;throw t}}decodeBitMatrixParser(t,e){const r=t.readVersion(),n=t.readFormatInformation().getErrorCorrectionLevel(),i=t.readCodewords(),o=Ee.getDataBlocks(i,r,n);let s=0;for(const t of o)s+=t.getNumDataCodewords();const a=new Uint8Array(s);let A=0;for(const t of o){const e=t.getCodewords(),r=t.getNumDataCodewords();this.correctErrors(e,r);for(let t=0;t=r)return!1;return!0}crossCheckVertical(t,e,r,n){const i=this.image,o=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;let a=t;for(;a>=0&&i.get(e,a)&&s[1]<=r;)s[1]++,a--;if(a<0||s[1]>r)return NaN;for(;a>=0&&!i.get(e,a)&&s[0]<=r;)s[0]++,a--;if(s[0]>r)return NaN;for(a=t+1;ar)return NaN;for(;ar)return NaN;const A=s[0]+s[1]+s[2];return 5*Math.abs(A-n)>=2*n?NaN:this.foundPatternCross(s)?Be.centerFromEnd(s,a):NaN}handlePossibleCenter(t,e,r){const n=t[0]+t[1]+t[2],i=Be.centerFromEnd(t,r),o=this.crossCheckVertical(e,i,2*t[1],n);if(!isNaN(o)){const e=(t[0]+t[1]+t[2])/3;for(const t of this.possibleCenters)if(t.aboutEquals(e,o,i))return t.combineEstimate(o,i,e);const r=new De(i,o,e);this.possibleCenters.push(r),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(r)}return null}}class Me extends nt{constructor(t,e,r,n){super(t,e),this.estimatedModuleSize=r,this.count=n,void 0===n&&(this.count=1)}getEstimatedModuleSize(){return this.estimatedModuleSize}getCount(){return this.count}aboutEquals(t,e,r){if(Math.abs(e-this.getY())<=t&&Math.abs(r-this.getX())<=t){const e=Math.abs(t-this.estimatedModuleSize);return e<=1||e<=this.estimatedModuleSize}return!1}combineEstimate(t,e,r){const n=this.count+1,i=(this.count*this.getX()+e)/n,o=(this.count*this.getY()+t)/n,s=(this.count*this.estimatedModuleSize+r)/n;return new Me(i,o,s,n)}}class Te{constructor(t){this.bottomLeft=t[0],this.topLeft=t[1],this.topRight=t[2]}getBottomLeft(){return this.bottomLeft}getTopLeft(){return this.topLeft}getTopRight(){return this.topRight}}class Ne{constructor(t,e){this.image=t,this.resultPointCallback=e,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=e}getImage(){return this.image}getPossibleCenters(){return this.possibleCenters}find(t){const e=null!=t&&void 0!==t.get(f.TRY_HARDER),r=null!=t&&void 0!==t.get(f.PURE_BARCODE),n=this.image,i=n.getHeight(),o=n.getWidth();let s=Math.floor(3*i/(4*Ne.MAX_MODULES));(sA[2]&&(t+=e-A[2]-s,i=o-1)}e=0,A[0]=0,A[1]=0,A[2]=0,A[3]=0,A[4]=0}else A[0]=A[2],A[1]=A[3],A[2]=A[4],A[3]=1,A[4]=0,e=3;else A[++e]++;else A[e]++;Ne.foundPatternCross(A)&&!0===this.handlePossibleCenter(A,t,o,r)&&(s=A[0],this.hasSkipped&&(a=this.haveMultiplyConfirmedCenters()))}const l=this.selectBestPatterns();return nt.orderBestPatterns(l),new Te(l)}static centerFromEnd(t,e){return e-t[4]-t[3]-t[2]/2}static foundPatternCross(t){let e=0;for(let r=0;r<5;r++){const n=t[r];if(0===n)return!1;e+=n}if(e<7)return!1;const r=e/7,n=r/2;return Math.abs(r-t[0])=o&&e>=o&&s.get(e-o,t-o);)i[2]++,o++;if(t=o&&e>=o&&!s.get(e-o,t-o)&&i[1]<=r;)i[1]++,o++;if(tr)return!1;for(;t>=o&&e>=o&&s.get(e-o,t-o)&&i[0]<=r;)i[0]++,o++;if(i[0]>r)return!1;const a=s.getHeight(),A=s.getWidth();for(o=1;t+o=a||e+o>=A)return!1;for(;t+o=a||e+o>=A||i[3]>=r)return!1;for(;t+o=r)return!1;const l=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(l-n)<2*n&&Ne.foundPatternCross(i)}crossCheckVertical(t,e,r,n){const i=this.image,o=i.getHeight(),s=this.getCrossCheckStateCount();let a=t;for(;a>=0&&i.get(e,a);)s[2]++,a--;if(a<0)return NaN;for(;a>=0&&!i.get(e,a)&&s[1]<=r;)s[1]++,a--;if(a<0||s[1]>r)return NaN;for(;a>=0&&i.get(e,a)&&s[0]<=r;)s[0]++,a--;if(s[0]>r)return NaN;for(a=t+1;a=r)return NaN;for(;a=r)return NaN;const A=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(A-n)>=2*n?NaN:Ne.foundPatternCross(s)?Ne.centerFromEnd(s,a):NaN}crossCheckHorizontal(t,e,r,n){const i=this.image,o=i.getWidth(),s=this.getCrossCheckStateCount();let a=t;for(;a>=0&&i.get(a,e);)s[2]++,a--;if(a<0)return NaN;for(;a>=0&&!i.get(a,e)&&s[1]<=r;)s[1]++,a--;if(a<0||s[1]>r)return NaN;for(;a>=0&&i.get(a,e)&&s[0]<=r;)s[0]++,a--;if(s[0]>r)return NaN;for(a=t+1;a=r)return NaN;for(;a=r)return NaN;const A=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(A-n)>=n?NaN:Ne.foundPatternCross(s)?Ne.centerFromEnd(s,a):NaN}handlePossibleCenter(t,e,r,n){const i=t[0]+t[1]+t[2]+t[3]+t[4];let o=Ne.centerFromEnd(t,r),s=this.crossCheckVertical(e,Math.floor(o),t[2],i);if(!isNaN(s)&&(o=this.crossCheckHorizontal(Math.floor(o),Math.floor(s),t[2],i),!isNaN(o)&&(!n||this.crossCheckDiagonal(Math.floor(s),Math.floor(o),t[2],i)))){const t=i/7;let e=!1;const r=this.possibleCenters;for(let n=0,i=r.length;n=Ne.CENTER_QUORUM){if(null!=t)return this.hasSkipped=!0,Math.floor((Math.abs(t.getX()-e.getX())-Math.abs(t.getY()-e.getY()))/2);t=e}return 0}haveMultiplyConfirmedCenters(){let t=0,e=0;const r=this.possibleCenters.length;for(const r of this.possibleCenters)r.getCount()>=Ne.CENTER_QUORUM&&(t++,e+=r.getEstimatedModuleSize());if(t<3)return!1;const n=e/r;let i=0;for(const t of this.possibleCenters)i+=Math.abs(t.getEstimatedModuleSize()-n);return i<=.05*e}selectBestPatterns(){const t=this.possibleCenters.length;if(t<3)throw new M;const e=this.possibleCenters;let r;if(t>3){let n=0,i=0;for(const t of this.possibleCenters){const e=t.getEstimatedModuleSize();n+=e,i+=e*e}r=n/t;let o=Math.sqrt(i/t-r*r);e.sort(((t,e)=>{const n=Math.abs(e.getEstimatedModuleSize()-r),i=Math.abs(t.getEstimatedModuleSize()-r);return ni?1:0}));const s=Math.max(.2*r,o);for(let t=0;t3;t++){const n=e[t];Math.abs(n.getEstimatedModuleSize()-r)>s&&(e.splice(t,1),t--)}}if(e.length>3){let t=0;for(const r of e)t+=r.getEstimatedModuleSize();r=t/e.length,e.sort(((t,e)=>{if(e.getCount()===t.getCount()){const n=Math.abs(e.getEstimatedModuleSize()-r),i=Math.abs(t.getEstimatedModuleSize()-r);return ni?-1:0}return e.getCount()-t.getCount()})),e.splice(3)}return[e[0],e[1],e[2]]}}Ne.CENTER_QUORUM=2,Ne.MIN_SKIP=3,Ne.MAX_MODULES=57;class _e{constructor(t){this.image=t}getImage(){return this.image}getResultPointCallback(){return this.resultPointCallback}detect(t){this.resultPointCallback=null==t?null:t.get(f.NEED_RESULT_POINT_CALLBACK);const e=new Ne(this.image,this.resultPointCallback).find(t);return this.processFinderPatternInfo(e)}processFinderPatternInfo(t){const e=t.getTopLeft(),r=t.getTopRight(),n=t.getBottomLeft(),i=this.calculateModuleSize(e,r,n);if(i<1)throw new M("No pattern found in proccess finder.");const o=_e.computeDimension(e,r,n,i),s=Ie.getProvisionalVersionForDimension(o),a=s.getDimensionForVersion()-7;let A=null;if(s.getAlignmentPatternCenters().length>0){const t=r.getX()-e.getX()+n.getX(),o=r.getY()-e.getY()+n.getY(),s=1-3/a,l=Math.floor(e.getX()+s*(t-e.getX())),c=Math.floor(e.getY()+s*(o-e.getY()));for(let t=4;t<=16;t<<=1)try{A=this.findAlignmentInRegion(i,l,c,t);break}catch(t){if(!(t instanceof M))throw t}}const l=_e.createTransform(e,r,n,A,o),c=_e.sampleGrid(this.image,l,o);let h;return h=null===A?[n,e,r]:[n,e,r,A],new it(c,h)}static createTransform(t,e,r,n,i){const o=i-3.5;let s,a,A,l;return null!==n?(s=n.getX(),a=n.getY(),A=o-3,l=A):(s=e.getX()-t.getX()+r.getX(),a=e.getY()-t.getY()+r.getY(),A=o,l=o),At.quadrilateralToQuadrilateral(3.5,3.5,o,3.5,A,l,3.5,o,t.getX(),t.getY(),e.getX(),e.getY(),s,a,r.getX(),r.getY())}static sampleGrid(t,e,r){return ct.getInstance().sampleGridWithTransform(t,r,r,e)}static computeDimension(t,e,r,n){const i=et.round(nt.distance(t,e)/n),o=et.round(nt.distance(t,r)/n);let s=Math.floor((i+o)/2)+7;switch(3&s){case 0:s++;break;case 2:s--;break;case 3:throw new M("Dimensions could be not found.")}return s}calculateModuleSize(t,e,r){return(this.calculateModuleSizeOneWay(t,e)+this.calculateModuleSizeOneWay(t,r))/2}calculateModuleSizeOneWay(t,e){const r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY())),n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY()));return isNaN(r)?n/7:isNaN(n)?r/7:(r+n)/14}sizeOfBlackWhiteBlackRunBothWays(t,e,r,n){let i=this.sizeOfBlackWhiteBlackRun(t,e,r,n),o=1,s=t-(r-t);s<0?(o=t/(t-s),s=0):s>=this.image.getWidth()&&(o=(this.image.getWidth()-1-t)/(s-t),s=this.image.getWidth()-1);let a=Math.floor(e-(n-e)*o);return o=1,a<0?(o=e/(e-a),a=0):a>=this.image.getHeight()&&(o=(this.image.getHeight()-1-e)/(a-e),a=this.image.getHeight()-1),s=Math.floor(t+(s-t)*o),i+=this.sizeOfBlackWhiteBlackRun(t,e,s,a),i-1}sizeOfBlackWhiteBlackRun(t,e,r,n){const i=Math.abs(n-e)>Math.abs(r-t);if(i){let i=t;t=e,e=i,i=r,r=n,n=i}const o=Math.abs(r-t),s=Math.abs(n-e);let a=-o/2;const A=t0){if(g===n)break;g+=l,a-=o}}return 2===c?et.distance(r+A,n,t,e):NaN}findAlignmentInRegion(t,e,r,n){const i=Math.floor(n*t),o=Math.max(0,e-i),s=Math.min(this.image.getWidth()-1,e+i);if(s-o<3*t)throw new M("Alignment top exceeds estimated module size.");const a=Math.max(0,r-i),A=Math.min(this.image.getHeight()-1,r+i);if(A-a<3*t)throw new M("Alignment bottom exceeds estimated module size.");return new Be(this.image,o,a,s-o,A-a,t,this.resultPointCallback).find()}}class ye{constructor(){this.decoder=new Re}getDecoder(){return this.decoder}decode(t,e){let r,n;if(null!=e&&void 0!==e.get(f.PURE_BARCODE)){const i=ye.extractPureBits(t.getBlackMatrix());r=this.decoder.decodeBitMatrix(i,e),n=ye.NO_POINTS}else{const i=new _e(t.getBlackMatrix()).detect(e);r=this.decoder.decodeBitMatrix(i.getBits(),e),n=i.getPoints()}r.getOther()instanceof Se&&r.getOther().applyMirroredCorrection(n);const i=new L(r.getText(),r.getRawBytes(),void 0,n,Q.QR_CODE,void 0),o=r.getByteSegments();null!==o&&i.putMetadata(H.BYTE_SEGMENTS,o);const s=r.getECLevel();return null!==s&&i.putMetadata(H.ERROR_CORRECTION_LEVEL,s),r.hasStructuredAppend()&&(i.putMetadata(H.STRUCTURED_APPEND_SEQUENCE,r.getStructuredAppendSequenceNumber()),i.putMetadata(H.STRUCTURED_APPEND_PARITY,r.getStructuredAppendParity())),i}reset(){}static extractPureBits(t){const e=t.getTopLeftOnBit(),r=t.getBottomRightOnBit();if(null===e||null===r)throw new M;const n=this.moduleSize(e,t);let i=e[1],o=r[1],s=e[0],a=r[0];if(s>=a||i>=o)throw new M;if(o-i!=a-s&&(a=s+(o-i),a>=t.getWidth()))throw new M;const A=Math.round((a-s+1)/n),l=Math.round((o-i+1)/n);if(A<=0||l<=0)throw new M;if(l!==A)throw new M;const c=Math.floor(n/2);i+=c,s+=c;const h=s+Math.floor((A-1)*n)-a;if(h>0){if(h>c)throw new M;s-=h}const g=i+Math.floor((l-1)*n)-o;if(g>0){if(g>c)throw new M;i-=g}const d=new B(A,l);for(let e=0;e0;){const s=Fe.findGuardPattern(t,i,--n,r,!1,o,A);if(null==s){n++;break}e=s}s[0]=new nt(e[0],n),s[1]=new nt(e[1],n),a=!0;break}}let l=n+1;if(a){let n=0,i=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);for(;lFe.SKIPPED_ROW_COUNT_MAX)break;n++}}l-=n+1,s[2]=new nt(i[0],l),s[3]=new nt(i[1],l)}return l-n0&&A++o?n-o:o-n;if(A>r)return 1/0;a+=A}return a/i}}Fe.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),Fe.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),Fe.MAX_AVG_VARIANCE=.42,Fe.MAX_INDIVIDUAL_VARIANCE=.8,Fe.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),Fe.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),Fe.MAX_PIXEL_DRIFT=3,Fe.MAX_PATTERN_DRIFT=5,Fe.SKIPPED_ROW_COUNT_MAX=25,Fe.ROW_STEP=5,Fe.BARCODE_MIN_HEIGHT=10;class Pe{constructor(t,e){if(0===e.length)throw new a;this.field=t;let r=e.length;if(r>1&&0===e[0]){let t=1;for(;tr.length){let t=e;e=r,r=t}let n=new Int32Array(r.length),i=r.length-e.length;h.arraycopy(r,0,n,0,i);for(let t=i;t=0;e--){let r=this.getCoefficient(e);0!==r&&(r<0?(t.append(" - "),r=-r):t.length()>0&&t.append(" + "),0!==e&&1===r||t.append(r),0!==e&&(1===e?t.append("x"):(t.append("x^"),t.append(e))))}return t.toString()}}class ke extends class{add(t,e){return(t+e)%this.modulus}subtract(t,e){return(this.modulus+t-e)%this.modulus}exp(t){return this.expTable[t]}log(t){if(0===t)throw new a;return this.logTable[t]}inverse(t){if(0===t)throw new z;return this.expTable[this.modulus-this.logTable[t]-1]}multiply(t,e){return 0===t||0===e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.modulus-1)]}getSize(){return this.modulus}equals(t){return t===this}}{constructor(t,e){super(),this.modulus=t,this.expTable=new Int32Array(t),this.logTable=new Int32Array(t);let r=1;for(let n=0;n0;t--){let r=n.evaluateAt(this.field.exp(t));i[e-t]=r,0!==r&&(o=!0)}if(!o)return 0;let s=this.field.getOne();if(null!=r)for(const e of r){let r=this.field.exp(t.length-1-e),n=new Pe(this.field,new Int32Array([this.field.subtract(0,r),1]));s=s.multiply(n)}let a=new Pe(this.field,i),A=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),a,e),c=A[0],h=A[1],g=this.findErrorLocations(c),d=this.findErrorMagnitudes(h,c,g);for(let e=0;e=Math.round(r/2);){let t=n,e=o;if(n=i,o=s,n.isZero())throw l.getChecksumInstance();i=t;let r=this.field.getZero(),a=n.getCoefficient(n.getDegree()),A=this.field.inverse(a);for(;i.getDegree()>=n.getDegree()&&!i.isZero();){let t=i.getDegree()-n.getDegree(),e=this.field.multiply(i.getCoefficient(i.getDegree()),A);r=r.add(this.field.buildMonomial(t,e)),i=i.subtract(n.multiplyByMonomial(t,e))}s=r.multiply(o).subtract(e).negative()}let a=s.getCoefficient(0);if(0===a)throw l.getChecksumInstance();let A=this.field.inverse(a);return[s.multiply(A),i.multiply(A)]}findErrorLocations(t){let e=t.getDegree(),r=new Int32Array(e),n=0;for(let i=1;i0){let e=r?this.topLeft:this.topRight,i=Math.trunc(e.getY()-t);i<0&&(i=0);let s=new nt(e.getX(),i);r?n=s:o=s}if(e>0){let t=r?this.bottomLeft:this.bottomRight,n=Math.trunc(t.getY()+e);n>=this.image.getHeight()&&(n=this.image.getHeight()-1);let o=new nt(t.getX(),n);r?i=o:s=o}return new Ge(this.image,n,i,o,s)}getMinX(){return this.minX}getMaxX(){return this.maxX}getMinY(){return this.minY}getMaxY(){return this.maxY}getTopLeft(){return this.topLeft}getTopRight(){return this.topRight}getBottomLeft(){return this.bottomLeft}getBottomRight(){return this.bottomRight}}class Qe{constructor(t,e,r,n){this.columnCount=t,this.errorCorrectionLevel=n,this.rowCountUpperPart=e,this.rowCountLowerPart=r,this.rowCount=e+r}getColumnCount(){return this.columnCount}getErrorCorrectionLevel(){return this.errorCorrectionLevel}getRowCount(){return this.rowCount}getRowCountUpperPart(){return this.rowCountUpperPart}getRowCountLowerPart(){return this.rowCountLowerPart}}class Ze{constructor(){this.buffer=""}static form(t,e){let r=-1;return t.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,(function(t,n,i,o,s,a){if("%%"===t)return"%";if(void 0===e[++r])return;t=o?parseInt(o.substr(1)):void 0;let A,l=s?parseInt(s.substr(1)):void 0;switch(a){case"s":A=e[r];break;case"c":A=e[r][0];break;case"f":A=parseFloat(e[r]).toFixed(t);break;case"p":A=parseFloat(e[r]).toPrecision(t);break;case"e":A=parseFloat(e[r]).toExponential(t);break;case"x":A=parseInt(e[r]).toString(l||16);break;case"d":A=parseFloat(parseInt(e[r],l||10).toPrecision(t)).toFixed(0)}A="object"==typeof A?JSON.stringify(A):(+A).toString(l);let c=parseInt(i),h=i&&i[0]+""=="0"?"0":" ";for(;A.length=0&&(e=this.codewords[n],null!=e))return e;if(n=this.imageRowToCodewordIndex(t)+r,nr,getValue:()=>n};i.getValue()>t?(t=i.getValue(),e=[],e.push(i.getKey())):i.getValue()===t&&e.push(i.getKey())}return Oe.toIntArray(e)}getConfidence(t){return this.values.get(t)}}class ve extends Ye{constructor(t,e){super(t),this._isLeft=e}setRowNumbers(){for(let t of this.getCodewords())null!=t&&t.setRowNumberAsRowIndicatorColumn()}adjustCompleteIndicatorColumnRowNumbers(t){let e=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(e,t);let r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),i=this._isLeft?r.getBottomLeft():r.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(n.getY())),s=this.imageRowToCodewordIndex(Math.trunc(i.getY())),a=-1,A=1,l=0;for(let r=o;r=t.getRowCount()||i>r)e[r]=null;else{let t;t=A>2?(A-2)*i:i;let o=t>=r;for(let n=1;n<=t&&!o;n++)o=null!=e[r-n];o?e[r]=null:(a=n.getRowNumber(),l=1)}}}getRowHeights(){let t=this.getBarcodeMetadata();if(null==t)return null;this.adjustIncompleteIndicatorColumnRowNumbers(t);let e=new Int32Array(t.getRowCount());for(let t of this.getCodewords())if(null!=t){let r=t.getRowNumber();if(r>=e.length)continue;e[r]++}return e}adjustIncompleteIndicatorColumnRowNumbers(t){let e=this.getBoundingBox(),r=this._isLeft?e.getTopLeft():e.getTopRight(),n=this._isLeft?e.getBottomLeft():e.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(r.getY())),o=this.imageRowToCodewordIndex(Math.trunc(n.getY())),s=this.getCodewords(),a=-1;for(let e=i;e=t.getRowCount()?s[e]=null:a=r.getRowNumber())}}getBarcodeMetadata(){let t=this.getCodewords(),e=new Ue,r=new Ue,n=new Ue,i=new Ue;for(let o of t){if(null==o)continue;o.setRowNumberAsRowIndicatorColumn();let t=o.getValue()%30,s=o.getRowNumber();switch(this._isLeft||(s+=2),s%3){case 0:r.setValue(3*t+1);break;case 1:i.setValue(t/3),n.setValue(t%3);break;case 2:e.setValue(t+1)}}if(0===e.getValue().length||0===r.getValue().length||0===n.getValue().length||0===i.getValue().length||e.getValue()[0]<1||r.getValue()[0]+n.getValue()[0]Oe.MAX_ROWS_IN_BARCODE)return null;let o=new Qe(e.getValue()[0],r.getValue()[0],n.getValue()[0],i.getValue()[0]);return this.removeIncorrectCodewords(t,o),o}removeIncorrectCodewords(t,e){for(let r=0;re.getRowCount())t[r]=null;else switch(this._isLeft||(o+=2),o%3){case 0:3*i+1!==e.getRowCountUpperPart()&&(t[r]=null);break;case 1:Math.trunc(i/3)===e.getErrorCorrectionLevel()&&i%3===e.getRowCountLowerPart()||(t[r]=null);break;case 2:i+1!==e.getColumnCount()&&(t[r]=null)}}}isLeft(){return this._isLeft}toString(){return"IsLeft: "+this._isLeft+"\n"+super.toString()}}class xe{constructor(t,e){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=t,this.barcodeColumnCount=t.getColumnCount(),this.boundingBox=e,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}getDetectionResultColumns(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);let t,e=Oe.MAX_CODEWORDS_IN_BARCODE;do{t=e,e=this.adjustRowNumbersAndGetCount()}while(e>0&&e0&&i0&&(s[0]=r[e-1],s[4]=i[e-1],s[5]=o[e-1]),e>1&&(s[8]=r[e-2],s[10]=i[e-2],s[11]=o[e-2]),e>=1;r=1&e,He.RATIOS_TABLE[t]||(He.RATIOS_TABLE[t]=new Array(Oe.BARS_IN_MODULE)),He.RATIOS_TABLE[t][Oe.BARS_IN_MODULE-n-1]=Math.fround(i/Oe.MODULES_IN_CODEWORD)}}this.bSymbolTableReady=!0}static getDecodedValue(t){let e=He.getDecodedCodewordValue(He.sampleBitCounts(t));return-1!==e?e:He.getClosestDecodedValue(t)}static sampleBitCounts(t){let e=et.sum(t),r=new Int32Array(Oe.BARS_IN_MODULE),n=0,i=0;for(let o=0;o1)for(let n=0;n=n)break}enew Array(Oe.BARS_IN_MODULE)));class Ve{constructor(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}getSegmentIndex(){return this.segmentIndex}setSegmentIndex(t){this.segmentIndex=t}getFileId(){return this.fileId}setFileId(t){this.fileId=t}getOptionalData(){return this.optionalData}setOptionalData(t){this.optionalData=t}isLastSegment(){return this.lastSegment}setLastSegment(t){this.lastSegment=t}getSegmentCount(){return this.segmentCount}setSegmentCount(t){this.segmentCount=t}getSender(){return this.sender||null}setSender(t){this.sender=t}getAddressee(){return this.addressee||null}setAddressee(t){this.addressee=t}getFileName(){return this.fileName}setFileName(t){this.fileName=t}getFileSize(){return this.fileSize}setFileSize(t){this.fileSize=t}getChecksum(){return this.checksum}setChecksum(t){this.checksum=t}getTimestamp(){return this.timestamp}setTimestamp(t){this.timestamp=t}}class je{static parseLong(t,e){return parseInt(t,e)}}class Xe extends o{}Xe.kind="NullPointerException";class ze extends o{}class Je extends class{writeBytes(t){this.writeBytesOffset(t,0,t.length)}writeBytesOffset(t,e,r){if(null==t)throw new Xe;if(e<0||e>t.length||r<0||e+r>t.length||e+r<0)throw new g;if(0!==r)for(let n=0;n0&&this.grow(t)}grow(t){let e=this.buf.length<<1;if(e-t<0&&(e=t),e<0){if(t<0)throw new ze;e=C.MAX_VALUE}this.buf=u.copyOfUint8Array(this.buf,e)}write(t){this.ensureCapacity(this.count+1),this.buf[this.count]=t,this.count+=1}writeBytesOffset(t,e,r){if(e<0||e>t.length||r<0||e+r-t.length>0)throw new g;this.ensureCapacity(this.count+r),h.arraycopy(t,e,this.buf,this.count,r),this.count+=r}writeTo(t){t.writeBytesOffset(this.buf,0,this.count)}reset(){this.count=0}toByteArray(){return u.copyOfUint8Array(this.buf,this.count)}size(){return this.count}toString(t){return t?"string"==typeof t?this.toString_string(t):this.toString_number(t):this.toString_void()}toString_void(){return new String(this.buf).toString()}toString_string(t){return new String(this.buf).toString()}toString_number(t){return new String(this.buf).toString()}close(){}}function Ke(){if("undefined"!=typeof window)return window.BigInt||null;if(void 0!==r.g)return r.g.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}let qe;function $e(t){if(void 0===qe&&(qe=Ke()),null===qe)throw new Error("BigInt is not supported!");return qe(t)}!function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"}(W||(W={}));class tr{static decode(t,e){let r=new D(""),n=m.ISO8859_1;r.enableDecoding(n);let i=1,o=t[i++],s=new Ve;for(;it[0])throw E.getFormatInstance();let n=new Int32Array(tr.NUMBER_OF_SEQUENCE_CODEWORDS);for(let r=0;r0){for(let t=0;t<6;++t)o.write(Number($e(a)>>$e(8*(5-t))));a=0,s=0}}n===e[0]&&r0){for(let t=0;t<6;++t)o.write(Number($e(a)>>$e(8*(5-t))));a=0,s=0}}}return i.append(S.decode(o.toByteArray(),r)),n}static numericCompaction(t,e,r){let n=0,i=!1,o=new Int32Array(tr.MAX_NUMERIC_CODEWORDS);for(;e0&&(r.append(tr.decodeBase900toBase10(o,n)),n=0)}return e}static decodeBase900toBase10(t,e){let r=$e(0);for(let n=0;n@[\\]_`~!\r\t,:\n-.$/\"|*()?{}'",tr.MIXED_CHARS="0123456789&\r\t,:#-.$/+%*=^",tr.EXP900=Ke()?function(){let t=[];t[0]=$e(1);let e=$e(900);t[1]=e;for(let r=2;r<16;r++)t[r]=t[r-1]*e;return t}():[],tr.NUMBER_OF_SEQUENCE_CODEWORDS=2;class er{constructor(){}static decode(t,e,r,n,i,o,s){let a,A=new Ge(t,e,r,n,i),l=null,c=null;for(let r=!0;;r=!1){if(null!=e&&(l=er.getRowIndicatorColumn(t,A,e,!0,o,s)),null!=n&&(c=er.getRowIndicatorColumn(t,A,n,!1,o,s)),a=er.merge(l,c),null==a)throw M.getNotFoundInstance();let i=a.getBoundingBox();if(!r||null==i||!(i.getMinY()A.getMaxY()))break;A=i}a.setBoundingBox(A);let h=a.getBarcodeColumnCount()+1;a.setDetectionResultColumn(0,l),a.setDetectionResultColumn(h,c);let g=null!=l;for(let e=1;e<=h;e++){let r,n=g?e:h-e;if(void 0!==a.getDetectionResultColumn(n))continue;r=0===n||n===h?new ve(A,0===n):new Ye(A),a.setDetectionResultColumn(n,r);let i=-1,l=i;for(let e=A.getMinY();e<=A.getMaxY();e++){if(i=er.getStartColumn(a,n,e,g),i<0||i>A.getMaxX()){if(-1===l)continue;i=l}let c=er.detectCodeword(t,A.getMinX(),A.getMaxX(),g,i,e,o,s);null!=c&&(r.setCodeword(e,c),l=i,o=Math.min(o,c.getWidth()),s=Math.max(s,c.getWidth()))}}return er.createDecoderResult(a)}static merge(t,e){if(null==t&&null==e)return null;let r=er.getBarcodeMetadata(t,e);if(null==r)return null;let n=Ge.merge(er.adjustBoundingBox(t),er.adjustBoundingBox(e));return new xe(r,n)}static adjustBoundingBox(t){if(null==t)return null;let e=t.getRowHeights();if(null==e)return null;let r=er.getMax(e),n=0;for(let t of e)if(n+=r-t,t>0)break;let i=t.getCodewords();for(let t=0;n>0&&null==i[t];t++)n--;let o=0;for(let t=e.length-1;t>=0&&(o+=r-e[t],!(e[t]>0));t--);for(let t=i.length-1;o>0&&null==i[t];t--)o--;return t.getBoundingBox().addMissingRows(n,o,t.isLeft())}static getMax(t){let e=-1;for(let r of t)e=Math.max(e,r);return e}static getBarcodeMetadata(t,e){let r,n;return null==t||null==(r=t.getBarcodeMetadata())?null==e?null:e.getBarcodeMetadata():null==e||null==(n=e.getBarcodeMetadata())?r:r.getColumnCount()!==n.getColumnCount()&&r.getErrorCorrectionLevel()!==n.getErrorCorrectionLevel()&&r.getRowCount()!==n.getRowCount()?null:r}static getRowIndicatorColumn(t,e,r,n,i,o){let s=new ve(e,n);for(let a=0;a<2;a++){let A=0===a?1:-1,l=Math.trunc(Math.trunc(r.getX()));for(let a=Math.trunc(Math.trunc(r.getY()));a<=e.getMaxY()&&a>=e.getMinY();a+=A){let e=er.detectCodeword(t,0,t.getWidth(),n,l,a,i,o);null!=e&&(s.setCodeword(a,e),l=n?e.getStartX():e.getEndX())}}return s}static adjustCodewordCount(t,e){let r=e[0][1],n=r.getValue(),i=t.getBarcodeColumnCount()*t.getBarcodeRowCount()-er.getNumberOfECCodeWords(t.getBarcodeECLevel());if(0===n.length){if(i<1||i>Oe.MAX_CODEWORDS_IN_BARCODE)throw M.getNotFoundInstance();r.setValue(i)}else n[0]!==i&&r.setValue(i)}static createDecoderResult(t){let e=er.createBarcodeMatrix(t);er.adjustCodewordCount(t,e);let r=new Array,n=new Int32Array(t.getBarcodeRowCount()*t.getBarcodeColumnCount()),i=[],o=new Array;for(let s=0;s0;){for(let t=0;tnew Array(t.getBarcodeColumnCount()+2)));for(let t=0;t=0){if(n>=e.length)continue;e[n][r].setValue(t.getValue())}}r++}return e}static isValidBarcodeColumn(t,e){return e>=0&&e<=t.getBarcodeColumnCount()+1}static getStartColumn(t,e,r,n){let i=n?1:-1,o=null;if(er.isValidBarcodeColumn(t,e-i)&&(o=t.getDetectionResultColumn(e-i).getCodeword(r)),null!=o)return n?o.getEndX():o.getStartX();if(o=t.getDetectionResultColumn(e).getCodewordNearby(r),null!=o)return n?o.getStartX():o.getEndX();if(er.isValidBarcodeColumn(t,e-i)&&(o=t.getDetectionResultColumn(e-i).getCodewordNearby(r)),null!=o)return n?o.getEndX():o.getStartX();let s=0;for(;er.isValidBarcodeColumn(t,e-i);){e-=i;for(let r of t.getDetectionResultColumn(e).getCodewords())if(null!=r)return(n?r.getEndX():r.getStartX())+i*s*(r.getEndX()-r.getStartX());s++}return n?t.getBoundingBox().getMinX():t.getBoundingBox().getMaxX()}static detectCodeword(t,e,r,n,i,o,s,a){i=er.adjustCodewordStartColumn(t,e,r,n,i,o);let A,l=er.getModuleBitCount(t,e,r,n,i,o);if(null==l)return null;let c=et.sum(l);if(n)A=i+c;else{for(let t=0;t=e)&&A=e:ser.CODEWORD_SKEW_SIZE)return i;s+=a}a=-a,n=!n}return s}static checkCodewordSkew(t,e,r){return e-er.CODEWORD_SKEW_SIZE<=t&&t<=r+er.CODEWORD_SKEW_SIZE}static decodeCodewords(t,e,r){if(0===t.length)throw E.getFormatInstance();let n=1<r/2+er.MAX_ERRORS||r<0||r>er.MAX_EC_CODEWORDS)throw l.getChecksumInstance();return er.errorCorrection.decode(t,r,e)}static verifyCodewordCount(t,e){if(t.length<4)throw E.getFormatInstance();let r=t[0];if(r>t.length)throw E.getFormatInstance();if(0===r){if(!(e>=1;return e}static getCodewordBucketNumber(t){return t instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(t):this.getCodewordBucketNumber_number(t)}static getCodewordBucketNumber_number(t){return er.getCodewordBucketNumber(er.getBitCountForCodeword(t))}static getCodewordBucketNumber_Int32Array(t){return(t[0]-t[2]+t[4]-t[6]+9)%9}static toString(t){let e=new Ze;for(let r=0;rt))}static getMaxWidth(t,e){return null==t||null==e?0:Math.trunc(Math.abs(t.getX()-e.getX()))}static getMinWidth(t,e){return null==t||null==e?C.MAX_VALUE:Math.trunc(Math.abs(t.getX()-e.getX()))}static getMaxCodewordWidth(t){return Math.floor(Math.max(Math.max(rr.getMaxWidth(t[0],t[4]),rr.getMaxWidth(t[6],t[2])*Oe.MODULES_IN_CODEWORD/Oe.MODULES_IN_STOP_PATTERN),Math.max(rr.getMaxWidth(t[1],t[5]),rr.getMaxWidth(t[7],t[3])*Oe.MODULES_IN_CODEWORD/Oe.MODULES_IN_STOP_PATTERN)))}static getMinCodewordWidth(t){return Math.floor(Math.min(Math.min(rr.getMinWidth(t[0],t[4]),rr.getMinWidth(t[6],t[2])*Oe.MODULES_IN_CODEWORD/Oe.MODULES_IN_STOP_PATTERN),Math.min(rr.getMinWidth(t[1],t[5]),rr.getMinWidth(t[7],t[3])*Oe.MODULES_IN_CODEWORD/Oe.MODULES_IN_STOP_PATTERN)))}reset(){}}class nr extends o{}nr.kind="ReaderException";class ir{constructor(t,e){this.verbose=!0===t,e&&this.setHints(e)}decode(t,e){return e&&this.setHints(e),this.decodeInternal(t)}decodeWithState(t){return null!==this.readers&&void 0!==this.readers||this.setHints(null),this.decodeInternal(t)}setHints(t){this.hints=t;const e=null!=t&&void 0!==t.get(f.TRY_HARDER),r=null==t?null:t.get(f.POSSIBLE_FORMATS),n=new Array;if(null!=r){const i=r.some((t=>t===Q.UPC_A||t===Q.UPC_E||t===Q.EAN_13||t===Q.EAN_8||t===Q.CODABAR||t===Q.CODE_39||t===Q.CODE_93||t===Q.CODE_128||t===Q.ITF||t===Q.RSS_14||t===Q.RSS_EXPANDED));i&&!e&&n.push(new ee(t,this.verbose)),r.includes(Q.QR_CODE)&&n.push(new ye),r.includes(Q.DATA_MATRIX)&&n.push(new he),r.includes(Q.AZTEC)&&n.push(new dt),r.includes(Q.PDF_417)&&n.push(new rr),i&&e&&n.push(new ee(t,this.verbose))}0===n.length&&(e||n.push(new ee(t,this.verbose)),n.push(new ye),n.push(new he),n.push(new dt),n.push(new rr),e&&n.push(new ee(t,this.verbose))),this.readers=n}reset(){if(null!==this.readers)for(const t of this.readers)t.reset()}decodeInternal(t){if(null===this.readers)throw new nr("No readers where selected, nothing can be read.");for(const e of this.readers)try{return e.decode(t,this.hints)}catch(t){if(t instanceof nr)continue}throw new M("No MultiFormat Readers were able to detect the code.")}}var or;!function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.MIN_SIZE=3]="MIN_SIZE",t[t.MAX_SIZE=4]="MAX_SIZE",t[t.MARGIN=5]="MARGIN",t[t.PDF417_COMPACT=6]="PDF417_COMPACT",t[t.PDF417_COMPACTION=7]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=9]="AZTEC_LAYERS",t[t.QR_VERSION=10]="QR_VERSION"}(or||(or={}));var sr=or;class ar{constructor(t){this.field=t,this.cachedGenerators=[],this.cachedGenerators.push(new X(t,Int32Array.from([1])))}buildGenerator(t){const e=this.cachedGenerators;if(t>=e.length){let r=e[e.length-1];const n=this.field;for(let i=e.length;i<=t;i++){const t=r.multiply(new X(n,Int32Array.from([1,n.exp(i-1+n.getGeneratorBase())])));e.push(t),r=t}}return e[t]}encode(t,e){if(0===e)throw new a("No error correction bytes");const r=t.length-e;if(r<=0)throw new a("No data bytes provided");const n=this.buildGenerator(e),i=new Int32Array(r);h.arraycopy(t,0,i,0,r);let o=new X(this.field,i);o=o.multiplyByMonomial(e,1);const s=o.divide(n)[1].getCoefficients(),A=e-s.length;for(let e=0;e=5&&(r+=Ar.N1+(n-5)),n=1,s=i)}n>=5&&(r+=Ar.N1+(n-5))}return r}}Ar.N1=3,Ar.N2=3,Ar.N3=40,Ar.N4=10;class lr{constructor(t,e){this.width=t,this.height=e;const r=new Array(e);for(let n=0;n!==e;n++)r[n]=new Uint8Array(t);this.bytes=r}getHeight(){return this.height}getWidth(){return this.width}get(t,e){return this.bytes[e][t]}getArray(){return this.bytes}setNumber(t,e,r){this.bytes[e][t]=r}setBoolean(t,e,r){this.bytes[e][t]=r?1:0}clear(t){for(const e of this.bytes)u.fill(e,t)}equals(t){if(!(t instanceof lr))return!1;const e=t;if(this.width!==e.width)return!1;if(this.height!==e.height)return!1;for(let t=0,r=this.height;t>\n"),t.toString()}setMode(t){this.mode=t}setECLevel(t){this.ecLevel=t}setVersion(t){this.version=t}setMaskPattern(t){this.maskPattern=t}setMatrix(t){this.matrix=t}static isValidMaskPattern(t){return t>=0&&t0;){for(6===o&&(o-=1);s>=0&&s=r;)t^=e<=0)for(let t=0;t!==r;t++){const r=n[t];r>=0&&gr.isEmpty(e.get(r,i))&&gr.embedPositionAdjustmentPattern(r-2,i-2,e)}}}}gr.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),gr.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),gr.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),gr.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),gr.VERSION_INFO_POLY=7973,gr.TYPE_INFO_POLY=1335,gr.TYPE_INFO_MASK_PATTERN=21522;class dr{constructor(t,e){this.dataBytes=t,this.errorCorrectionBytes=e}getDataBytes(){return this.dataBytes}getErrorCorrectionBytes(){return this.errorCorrectionBytes}}class ur{constructor(){}static calculateMaskPenalty(t){return Ar.applyMaskPenaltyRule1(t)+Ar.applyMaskPenaltyRule2(t)+Ar.applyMaskPenaltyRule3(t)+Ar.applyMaskPenaltyRule4(t)}static encode(t,e,r=null){let n=ur.DEFAULT_BYTE_MODE_ENCODING;const i=null!==r&&void 0!==r.get(sr.CHARACTER_SET);i&&(n=r.get(sr.CHARACTER_SET).toString());const o=this.chooseMode(t,n),s=new I;if(o===me.BYTE&&(i||ur.DEFAULT_BYTE_MODE_ENCODING!==n)){const t=m.getCharacterSetECIByName(n);void 0!==t&&this.appendECI(t,s)}this.appendModeInfo(o,s);const a=new I;let A;if(this.appendBytes(t,o,a,n),null!==r&&void 0!==r.get(sr.QR_VERSION)){const t=Number.parseInt(r.get(sr.QR_VERSION).toString(),10);A=Ie.getVersionForNumber(t);const n=this.calculateBitsNeeded(o,s,a,A);if(!this.willFit(n,A,e))throw new hr("Data too big for requested version")}else A=this.recommendVersion(e,o,s,a);const l=new I;l.appendBitArray(s);const c=o===me.BYTE?a.getSizeInBytes():t.length;this.appendLengthInfo(c,A,o,l),l.appendBitArray(a);const h=A.getECBlocksForLevel(e),g=A.getTotalCodewords()-h.getTotalECCodewords();this.terminateBits(g,l);const d=this.interleaveWithECBytes(l,A.getTotalCodewords(),g,h.getNumBlocks()),u=new cr;u.setECLevel(e),u.setMode(o),u.setVersion(A);const C=A.getDimensionForVersion(),w=new lr(C,C),f=this.chooseMaskPattern(d,e,A,w);return u.setMaskPattern(f),gr.buildMatrix(d,e,A,f,w),u.setMatrix(w),u}static recommendVersion(t,e,r,n){const i=this.calculateBitsNeeded(e,r,n,Ie.getVersionForNumber(1)),o=this.chooseVersion(i,t),s=this.calculateBitsNeeded(e,r,n,o);return this.chooseVersion(s,t)}static calculateBitsNeeded(t,e,r,n){return e.getSize()+t.getCharacterCountBits(n)+r.getSize()}static getAlphanumericCode(t){return t159)&&(r<224||r>235))return!1}return!0}static chooseMaskPattern(t,e,r,n){let i=Number.MAX_SAFE_INTEGER,o=-1;for(let s=0;s=(t+7)/8}static terminateBits(t,e){const r=8*t;if(e.getSize()>r)throw new hr("data bits cannot fit in the QR Code"+e.getSize()+" > "+r);for(let t=0;t<4&&e.getSize()0)for(let t=n;t<8;t++)e.appendBit(!1);const i=t-e.getSizeInBytes();for(let t=0;t=r)throw new hr("Block ID too large");const s=t%r,a=r-s,A=Math.floor(t/r),l=A+1,c=Math.floor(e/r),h=c+1,g=A-c,d=l-h;if(g!==d)throw new hr("EC bytes mismatch");if(r!==a+s)throw new hr("RS blocks mismatch");if(t!==(c+g)*a+(h+d)*s)throw new hr("Total bytes mismatch");n=1<=0&&e<=9}static appendNumericBytes(t,e){const r=t.length;let n=0;for(;n=33088&&n<=40956?i=n-33088:n>=57408&&n<=60351&&(i=n-49472),-1===i)throw new hr("Invalid byte sequence");const o=192*(i>>8)+(255&i);e.appendBits(o,13)}}static appendECI(t,e){e.appendBits(me.ECI.getBits(),4),e.appendBits(t.getValue(),8)}}ur.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),ur.DEFAULT_BYTE_MODE_ENCODING=m.UTF8.getName();class Cr{write(t,e,r,n=null){if(0===t.length)throw new a("Found empty contents");if(e<0||r<0)throw new a("Requested dimensions are too small: "+e+"x"+r);let i=ge.L,o=Cr.QUIET_ZONE_SIZE;null!==n&&(void 0!==n.get(sr.ERROR_CORRECTION)&&(i=ge.fromString(n.get(sr.ERROR_CORRECTION).toString())),void 0!==n.get(sr.MARGIN)&&(o=Number.parseInt(n.get(sr.MARGIN).toString(),10)));const s=ur.encode(t,i,n);return this.renderResult(s,e,r,o)}writeToDom(t,e,r,n,i=null){"string"==typeof t&&(t=document.querySelector(t));const o=this.write(e,r,n,i);t&&t.appendChild(o)}renderResult(t,e,r,n){const i=t.getMatrix();if(null===i)throw new q;const o=i.getWidth(),s=i.getHeight(),a=o+2*n,A=s+2*n,l=Math.max(e,a),c=Math.max(r,A),h=Math.min(Math.floor(l/a),Math.floor(c/A)),g=Math.floor((l-o*h)/2),d=Math.floor((c-s*h)/2),u=this.createSVGElement(l,c);for(let t=0,e=d;te||i+s>r)throw new a("Crop rectangle does not fit within image data.");A&&this.reverseHorizontal(o,s)}getRow(t,e){if(t<0||t>=this.getHeight())throw new a("Requested row is outside the image: "+t);const r=this.getWidth();(null==e||e.length>16&255,o=r>>7&510,s=255&r;i[e]=(n+o+s)/4&255}this.luminances=i}else this.luminances=t;if(void 0===n&&(this.dataWidth=e),void 0===i&&(this.dataHeight=r),void 0===o&&(this.left=0),void 0===s&&(this.top=0),this.left+e>this.dataWidth||this.top+r>this.dataHeight)throw new a("Crop rectangle does not fit within image data.")}getRow(t,e){if(t<0||t>=this.getHeight())throw new a("Requested row is outside the image: "+t);const r=this.getWidth();(null==e||e.length"}}class Dr extends Rr{constructor(t,e,r){super(t,0,0),this.binaryShiftStart=e,this.binaryShiftByteCount=r}appendTo(t,e){for(let r=0;r62?t.appendBits(this.binaryShiftByteCount-31,16):0===r?t.appendBits(Math.min(this.binaryShiftByteCount,31),5):t.appendBits(this.binaryShiftByteCount-31,5)),t.appendBits(e[this.binaryShiftStart+r],8)}addBinaryShift(t,e){return new Dr(this,t,e)}toString(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}function Br(t,e,r){return new Rr(t,e,r)}const Mr=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],Tr=new Rr(null,0,0),Nr=[Int32Array.from([0,327708,327710,327709,656318]),Int32Array.from([590318,0,327710,327709,656318]),Int32Array.from([262158,590300,0,590301,932798]),Int32Array.from([327709,327708,656318,0,327710]),Int32Array.from([327711,656380,656382,656381,0])];const _r=function(t){for(let e of t)u.fill(e,-1);return t[0][4]=0,t[1][4]=0,t[1][0]=28,t[3][4]=0,t[2][4]=0,t[2][0]=15,t}(u.createInt32Array(6,6));class yr{constructor(t,e,r,n){this.token=t,this.mode=e,this.binaryShiftByteCount=r,this.bitCount=n}getMode(){return this.mode}getToken(){return this.token}getBinaryShiftByteCount(){return this.binaryShiftByteCount}getBitCount(){return this.bitCount}latchAndAppend(t,e){let r=this.bitCount,n=this.token;if(t!==this.mode){let e=Nr[this.mode][t];n=Br(n,65535&e,e>>16),r+=e>>16}let i=2===t?4:5;return n=Br(n,e,i),new yr(n,t,0,r+i)}shiftAndAppend(t,e){let r=this.token,n=2===this.mode?4:5;return r=Br(r,_r[this.mode][t],n),r=Br(r,e,5),new yr(r,this.mode,0,this.bitCount+n+5)}addBinaryShiftChar(t){let e=this.token,r=this.mode,n=this.bitCount;if(4===this.mode||2===this.mode){let t=Nr[r][0];e=Br(e,65535&t,t>>16),n+=t>>16,r=0}let i=0===this.binaryShiftByteCount||31===this.binaryShiftByteCount?18:62===this.binaryShiftByteCount?9:8,o=new yr(e,r,this.binaryShiftByteCount+1,n+i);return 2078===o.binaryShiftByteCount&&(o=o.endBinaryShift(t+1)),o}endBinaryShift(t){if(0===this.binaryShiftByteCount)return this;let e=this.token;return e=function(t,e,r){return new Dr(t,e,r)}(e,t-this.binaryShiftByteCount,this.binaryShiftByteCount),new yr(e,this.mode,0,this.bitCount)}isBetterThanOrEqualTo(t){let e=this.bitCount+(Nr[this.mode][t.mode]>>16);return this.binaryShiftByteCountt.binaryShiftByteCount&&t.binaryShiftByteCount>0&&(e+=10),e<=t.bitCount}toBitArray(t){let e=[];for(let r=this.endBinaryShift(t.length).token;null!==r;r=r.getPrevious())e.unshift(r);let r=new I;for(const n of e)n.appendTo(r,t);return r}toString(){return R.format("%s bits=%d bytes=%d",Mr[this.mode],this.bitCount,this.binaryShiftByteCount)}static calculateBinaryShiftCost(t){return t.binaryShiftByteCount>62?21:t.binaryShiftByteCount>31?20:t.binaryShiftByteCount>0?10:0}}yr.INITIAL_STATE=new yr(Tr,0,0,0);const Or=function(t){const e=R.getCharCode(" "),r=R.getCharCode("."),n=R.getCharCode(",");t[0][e]=1;const i=R.getCharCode("Z"),o=R.getCharCode("A");for(let e=o;e<=i;e++)t[0][e]=e-o+2;t[1][e]=1;const s=R.getCharCode("z"),a=R.getCharCode("a");for(let e=a;e<=s;e++)t[1][e]=e-a+2;t[2][e]=1;const A=R.getCharCode("9"),l=R.getCharCode("0");for(let e=l;e<=A;e++)t[2][e]=e-l+2;t[2][n]=12,t[2][r]=13;const c=["\0"," ","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","@","\\","^","_","`","|","~",""];for(let e=0;e","?","[","]","{","}"];for(let e=0;e0&&(t[4][R.getCharCode(h[e])]=e);return t}(u.createInt32Array(5,256));class br{constructor(t){this.text=t}encode(){const t=R.getCharCode(" "),e=R.getCharCode("\n");let r=Sr.singletonList(yr.INITIAL_STATE);for(let n=0;n0?(r=br.updateStateListForPair(r,n,i),n++):r=this.updateStateListForChar(r,n)}return Sr.min(r,((t,e)=>t.getBitCount()-e.getBitCount())).toBitArray(this.text)}updateStateListForChar(t,e){const r=[];for(let n of t)this.updateStateForChar(n,e,r);return br.simplifyStates(r)}updateStateForChar(t,e,r){let n=255&this.text[e],i=Or[t.getMode()][n]>0,o=null;for(let s=0;s<=4;s++){let a=Or[s][n];if(a>0){if(null==o&&(o=t.endBinaryShift(e)),!i||s===t.getMode()||2===s){const t=o.latchAndAppend(s,a);r.push(t)}if(!i&&_r[t.getMode()][s]>=0){const t=o.shiftAndAppend(s,a);r.push(t)}}}if(t.getBinaryShiftByteCount()>0||0===Or[t.getMode()][n]){let n=t.addBinaryShiftChar(e);r.push(n)}}static updateStateListForPair(t,e,r){const n=[];for(let i of t)this.updateStateForPair(i,e,r,n);return this.simplifyStates(n)}static updateStateForPair(t,e,r,n){let i=t.endBinaryShift(e);if(n.push(i.latchAndAppend(4,r)),4!==t.getMode()&&n.push(i.shiftAndAppend(4,r)),3===r||4===r){let t=i.latchAndAppend(2,16-r).latchAndAppend(2,1);n.push(t)}if(t.getBinaryShiftByteCount()>0){let r=t.addBinaryShiftChar(e).addBinaryShiftChar(e+1);n.push(r)}}static simplifyStates(t){let e=[];for(const r of t){let t=!0;for(const n of e){if(n.isBetterThanOrEqualTo(r)){t=!1;break}r.isBetterThanOrEqualTo(n)&&(e=e.filter((t=>t!==n)))}t&&e.push(r)}return e}}class Fr{constructor(){}static encodeBytes(t){return Fr.encode(t,Fr.DEFAULT_EC_PERCENT,Fr.DEFAULT_AZTEC_LAYERS)}static encode(t,e,r){let n,i,o,s,A,l=new br(t).encode(),c=C.truncDivision(l.getSize()*e,100)+11,h=l.getSize()+c;if(r!==Fr.DEFAULT_AZTEC_LAYERS){if(n=r<0,i=Math.abs(r),i>(n?Fr.MAX_NB_BITS_COMPACT:Fr.MAX_NB_BITS))throw new a(R.format("Illegal value %s for layers",r));o=Fr.totalBitsInLayer(i,n),s=Fr.WORD_SIZE[i];let t=o-o%s;if(A=Fr.stuffBits(l,s),A.getSize()+c>t)throw new a("Data to large for user specified layer");if(n&&A.getSize()>64*s)throw new a("Data to large for user specified layer")}else{s=0,A=null;for(let t=0;;t++){if(t>Fr.MAX_NB_BITS)throw new a("Data too large for an Aztec code");if(n=t<=3,i=n?t+1:t,o=Fr.totalBitsInLayer(i,n),h>o)continue;null!=A&&s===Fr.WORD_SIZE[i]||(s=Fr.WORD_SIZE[i],A=Fr.stuffBits(l,s));let e=o-o%s;if(!(n&&A.getSize()>64*s)&&A.getSize()+c<=e)break}}let g,d=Fr.generateCheckWords(A,o,s),u=A.getSize()/s,I=Fr.generateModeMessage(n,i,u),w=(n?11:14)+4*i,f=new Int32Array(w);if(n){g=w;for(let t=0;t=n||t.get(o+r))&&(s|=1<{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";var t;r.r(n),r.d(n,{Html5Qrcode:()=>N,Html5QrcodeScanner:()=>L,Html5QrcodeSupportedFormats:()=>t}),function(t){t[t.QR_CODE=0]="QR_CODE",t[t.AZTEC=1]="AZTEC",t[t.CODABAR=2]="CODABAR",t[t.CODE_39=3]="CODE_39",t[t.CODE_93=4]="CODE_93",t[t.CODE_128=5]="CODE_128",t[t.DATA_MATRIX=6]="DATA_MATRIX",t[t.MAXICODE=7]="MAXICODE",t[t.ITF=8]="ITF",t[t.EAN_13=9]="EAN_13",t[t.EAN_8=10]="EAN_8",t[t.PDF_417=11]="PDF_417",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"}(t||(t={}));var e,i,o=new Map([[t.QR_CODE,"QR_CODE"],[t.AZTEC,"AZTEC"],[t.CODABAR,"CODABAR"],[t.CODE_39,"CODE_39"],[t.CODE_93,"CODE_93"],[t.CODE_128,"CODE_128"],[t.DATA_MATRIX,"DATA_MATRIX"],[t.MAXICODE,"MAXICODE"],[t.ITF,"ITF"],[t.EAN_13,"EAN_13"],[t.EAN_8,"EAN_8"],[t.PDF_417,"PDF_417"],[t.RSS_14,"RSS_14"],[t.RSS_EXPANDED,"RSS_EXPANDED"],[t.UPC_A,"UPC_A"],[t.UPC_E,"UPC_E"],[t.UPC_EAN_EXTENSION,"UPC_EAN_EXTENSION"]]);function s(e){return Object.values(t).includes(e)}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.URL=1]="URL"}(e||(e={})),function(t){t[t.SCAN_TYPE_CAMERA=0]="SCAN_TYPE_CAMERA",t[t.SCAN_TYPE_FILE=1]="SCAN_TYPE_FILE"}(i||(i={}));var a,A=function(){function t(){}return t.GITHUB_PROJECT_URL="https://github.com/mebjas/html5-qrcode",t.SCAN_DEFAULT_FPS=2,t.DEFAULT_DISABLE_FLIP=!1,t.DEFAULT_REMEMBER_LAST_CAMERA_USED=!0,t}(),l=function(){function t(t,e){this.format=t,this.formatName=e}return t.prototype.toString=function(){return this.formatName},t.create=function(e){if(!o.has(e))throw e+" not in html5QrcodeSupportedFormatsTextMap";return new t(e,o.get(e))},t}(),c=function(){function t(){}return t.createFromText=function(t){return{decodedText:t,result:{text:t}}},t.createFromQrcodeResult=function(t){return{decodedText:t.text,result:t}},t}();!function(t){t[t.UNKWOWN_ERROR=0]="UNKWOWN_ERROR",t[t.IMPLEMENTATION_ERROR=1]="IMPLEMENTATION_ERROR",t[t.NO_CODE_FOUND_ERROR=2]="NO_CODE_FOUND_ERROR"}(a||(a={}));var h=function(){function t(){}return t.createFrom=function(t){return{errorMessage:t,type:a.UNKWOWN_ERROR}},t}(),g=function(){function t(t){this.verbose=t}return t.prototype.log=function(t){this.verbose&&console.log(t)},t.prototype.warn=function(t){this.verbose&&console.warn(t)},t.prototype.logError=function(t,e){(this.verbose||!0===e)&&console.error(t)},t.prototype.logErrors=function(t){if(0===t.length)throw"Logger#logError called without arguments";this.verbose&&console.error(t)},t}();function d(t){return null==t}var u,C,I=function(){function t(){}return t.codeParseError=function(t){return"QR code parse error, error = "+t},t.errorGettingUserMedia=function(t){return"Error getting userMedia, error = "+t},t.onlyDeviceSupportedError=function(){return"The device doesn't support navigator.mediaDevices , only supported cameraIdOrConfig in this case is deviceId parameter (string)."},t.cameraStreamingNotSupported=function(){return"Camera streaming not supported by the browser."},t.unableToQuerySupportedDevices=function(){return"Unable to query supported devices, unknown error."},t.insecureContextCameraQueryError=function(){return"Camera access is only supported in secure context like https or localhost."},t}(),w=function(){function t(){}return t.scanningStatus=function(){return"Scanning"},t.idleStatus=function(){return"Idle"},t.errorStatus=function(){return"Error"},t.permissionStatus=function(){return"Permission"},t.noCameraFoundErrorStatus=function(){return"No Cameras"},t.lastMatch=function(t){return"Last Match: "+t},t.codeScannerTitle=function(){return"Code Scanner"},t.cameraPermissionTitle=function(){return"Request Camera Permissions"},t.cameraPermissionRequesting=function(){return"Requesting camera permissions..."},t.noCameraFound=function(){return"No camera found"},t.scanButtonStopScanningText=function(){return"Stop Scanning"},t.scanButtonStartScanningText=function(){return"Start Scanning"},t.textIfCameraScanSelected=function(){return"Scan an Image File"},t.textIfFileScanSelected=function(){return"Scan using camera directly"},t}(),f=function(){function t(){}return t.builtUsing=function(){return"Built using "},t.reportIssues=function(){return"Report issues"},t}(),E=function(){function t(){}return t.isMediaStreamConstraintsValid=function(t,e){if("object"!=typeof t){var r=typeof t;return e.logError("videoConstraints should be of type object, the object passed is of type "+r+".",!0),!1}for(var n=new Set(["autoGainControl","channelCount","echoCancellation","latency","noiseSuppression","sampleRate","sampleSize","volume"]),i=0,o=Object.keys(t);i0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]r&&(r=s,e=o)}if(!e)throw"No largest barcode found";return e},e.prototype.createBarcodeDetectorFormats=function(t){for(var e=[],r=0,n=t;r=i&&n()}))}))},e.prototype.scanFile=function(t,e){return this.scanFileV2(t,e).then((function(t){return t.decodedText}))},e.prototype.scanFileV2=function(t,e){var r=this;if(!(t&&t instanceof File))throw"imageFile argument is mandatory and should be instance of File. Use 'event.target.files[0]'.";if(d(e)&&(e=!0),this.isScanning)throw"Close ongoing scan before scanning a file.";return new Promise((function(n,i){r.possiblyCloseLastScanImageFile(),r.clearElement(),r.lastScanImageFile=URL.createObjectURL(t);var o=new Image;o.onload=function(){var t=o.width,s=o.height,a=document.getElementById(r.elementId),A=a.clientWidth?a.clientWidth:M.DEFAULT_WIDTH,l=Math.max(a.clientHeight?a.clientHeight:s,M.FILE_SCAN_MIN_HEIGHT),h=r.computeCanvasDrawConfig(t,s,A,l);if(e){var g=r.createCanvasElement(A,l,"qr-canvas-visible");g.style.display="inline-block",a.appendChild(g);var d=g.getContext("2d");if(!d)throw"Unable to get 2d context from canvas";d.canvas.width=A,d.canvas.height=l,d.drawImage(o,0,0,t,s,h.x,h.y,h.width,h.height)}var u=r.createCanvasElement(h.width,h.height);a.appendChild(u);var C=u.getContext("2d");if(!C)throw"Unable to get 2d context from canvas";C.canvas.width=h.width,C.canvas.height=h.height,C.drawImage(o,0,0,t,s,0,0,h.width,h.height);try{r.qrcode.decodeAsync(u).then((function(t){n(c.createFromQrcodeResult(t))})).catch(i)}catch(t){i("QR code parse error, error = "+t)}},o.onerror=i,o.onabort=i,o.onstalled=i,o.onsuspend=i,o.src=URL.createObjectURL(t)}))},e.prototype.clear=function(){this.clearElement()},e.getCameras=function(){if(navigator.mediaDevices)return e.getCamerasFromMediaDevices();var t=MediaStreamTrack;if(MediaStreamTrack&&t.getSources)return e.getCamerasFromMediaStreamTrack();var r=I.unableToQuerySupportedDevices();return function(){if("https:"===location.protocol)return!0;var t=location.host.split(":")[0];return"127.0.0.1"===t||"localhost"===t}()||(r=I.insecureContextCameraQueryError()),Promise.reject(r)},e.prototype.getRunningTrackCapabilities=function(){if(null==this.localMediaStream)throw"Scanning is not in running state, call this API only when QR code scanning using camera is in running state.";if(0===this.localMediaStream.getVideoTracks().length)throw"No video tracks found";return this.localMediaStream.getVideoTracks()[0].getCapabilities()},e.prototype.applyVideoConstraints=function(t){var e=this;if(!t)throw"videoConstaints is required argument.";if(!E.isMediaStreamConstraintsValid(t,this.logger))throw"invalid videoConstaints passed, check logs for more details";if(null===this.localMediaStream)throw"Scanning is not in running state, call this API only when QR code scanning using camera is in running state.";if(0===this.localMediaStream.getVideoTracks().length)throw"No video tracks found";return new Promise((function(r,n){"aspectRatio"in t?n("Chaning 'aspectRatio' in run-time is not yet supported."):e.localMediaStream.getVideoTracks()[0].applyConstraints(t).then((function(t){r(t)})).catch((function(t){n(t)}))}))},e.getCamerasFromMediaDevices=function(){return new Promise((function(t,e){navigator.mediaDevices.getUserMedia({audio:!1,video:!0}).then((function(r){navigator.mediaDevices.enumerateDevices().then((function(e){for(var n=[],i=0,o=e;ie)throw"'config.qrbox' dimensions values should not be greater than the width of the HTML element."}(n.width)},e.prototype.validateQrboxConfig=function(t){if("number"!=typeof t&&(void 0===t.width||void 0===t.height))throw"Invalid instance of QrDimensions passed for 'config.qrbox'."},e.prototype.toQrdimensions=function(t){return"number"==typeof t?{width:t,height:t}:t},e.prototype.setupUi=function(t,e,r){var n=r.qrbox;this.validateQrboxConfig(n);var i=this.toQrdimensions(n);i.height>e&&this.logger.warn("[Html5Qrcode] config.qrbox has height that isgreater than the height of the video stream. Shading will be ignored");var o=r.isShadedBoxEnabled()&&i.height<=e,s={x:0,y:0,width:t,height:e},a=o?this.getShadedRegionBounds(t,e,i):s,A=this.createCanvasElement(a.width,a.height),l=A.getContext("2d");l.canvas.width=a.width,l.canvas.height=a.height,this.element.append(A),o&&this.possiblyInsertShadingElement(this.element,t,e,i),this.qrRegion=a,this.context=l,this.canvasElement=A},e.prototype.scanContext=function(t,e){var r=this;return this.qrcode.decodeAsync(this.canvasElement).then((function(e){return t(e.text,c.createFromQrcodeResult(e)),r.possiblyUpdateShaders(!0),!0})).catch((function(t){r.possiblyUpdateShaders(!1);var n=I.codeParseError(t);return e(n,h.createFrom(n)),!1}))},e.prototype.foreverScan=function(t,e,r){var n=this;if(this.shouldScan&&this.localMediaStream){var i=this.videoElement,o=i.videoWidth/i.clientWidth,s=i.videoHeight/i.clientHeight;if(!this.qrRegion)throw"qrRegion undefined when localMediaStream is ready.";var a=this.qrRegion.width*o,A=this.qrRegion.height*s,l=this.qrRegion.x*o,c=this.qrRegion.y*s;this.context.drawImage(i,l,c,a,A,0,0,this.qrRegion.width,this.qrRegion.height);var h=function(){n.foreverScanTimeout=setTimeout((function(){n.foreverScan(t,e,r)}),n.getTimeoutFps(t.fps))};this.scanContext(e,r).then((function(i){i||!0===t.disableFlip?h():(n.context.translate(n.context.canvas.width,0),n.context.scale(-1,1),n.scanContext(e,r).finally((function(){h()})))})).catch((function(t){n.logger.logError("Error happend while scanning context",t),h()}))}},e.prototype.onMediaStreamReceived=function(t,e,r,n,i,o){var s=this,a=this;return new Promise((function(A,l){var c=function(){var r=s.createVideoElement(n);a.element.append(r),r.onabort=l,r.onerror=l,r.onplaying=function(){var t=r.clientWidth,n=r.clientHeight;a.setupUi(t,n,e),a.foreverScan(e,i,o),A(null)},r.srcObject=t,r.play(),a.videoElement=r};if(a.localMediaStream=t,r||!e.aspectRatio)c();else{var h={aspectRatio:e.aspectRatio};t.getVideoTracks()[0].applyConstraints(h).then((function(t){return c()})).catch((function(t){a.logger.logErrors(["[Html5Qrcode] Constriants could not be satisfied, ignoring constraints",t]),c()}))}}))},e.prototype.createVideoConstraints=function(t){if("string"==typeof t)return{deviceId:{exact:t}};if("object"==typeof t){var e="facingMode",r={user:!0,environment:!0},n="exact",i=function(t){if(t in r)return!0;throw"config has invalid 'facingMode' value = '"+t+"'"},o=Object.keys(t);if(1!==o.length)throw"'cameraIdOrConfig' object should have exactly 1 key, if passed as an object, found "+o.length+" keys";var s=Object.keys(t)[0];if(s!==e&&"deviceId"!==s)throw"Only 'facingMode' and 'deviceId' are supported for 'cameraIdOrConfig'";if(s!==e){var a=t.deviceId;if("string"==typeof a)return{deviceId:a};if("object"==typeof a){if(n in a)return{deviceId:{exact:a.exact}};throw"'deviceId' should be string or object with exact as key."}throw"Invalid type of 'deviceId' = "+typeof a}var A=t.facingMode;if("string"==typeof A){if(i(A))return{facingMode:A}}else{if("object"!=typeof A)throw"Invalid type of 'facingMode' = "+typeof A;if(!(n in A))throw"'facingMode' should be string or object with exact as key.";if(i(A.exact))return{facingMode:{exact:A.exact}}}}throw"Invalid type of 'cameraIdOrConfig' = "+typeof t},e.prototype.computeCanvasDrawConfig=function(t,e,r,n){if(t<=r&&e<=n)return{x:(r-t)/2,y:(n-e)/2,width:t,height:e};var i=t,o=e;return t>r&&(e*=r/t,t=r),e>n&&(t*=n/e,e=n),this.logger.log("Image downsampled from "+i+"X"+o+" to "+t+"X"+e+"."),this.computeCanvasDrawConfig(t,e,r,n)},e.prototype.clearElement=function(){if(this.isScanning)throw"Cannot clear while scan is ongoing, close it first.";var t=document.getElementById(this.elementId);t&&(t.innerHTML="")},e.prototype.createVideoElement=function(t){var e=document.createElement("video");return e.style.width=t+"px",e.muted=!0,e.setAttribute("muted","true"),e.playsInline=!0,e},e.prototype.possiblyUpdateShaders=function(t){this.qrMatch!==t&&(this.hasBorderShaders&&this.borderShaders&&this.borderShaders.length&&this.borderShaders.forEach((function(e){e.style.backgroundColor=t?M.BORDER_SHADER_MATCH_COLOR:M.BORDER_SHADER_DEFAULT_COLOR})),this.qrMatch=t)},e.prototype.possiblyCloseLastScanImageFile=function(){this.lastScanImageFile&&(URL.revokeObjectURL(this.lastScanImageFile),this.lastScanImageFile=null)},e.prototype.createCanvasElement=function(t,e,r){var n=t,i=e,o=document.createElement("canvas");return o.style.width=n+"px",o.style.height=i+"px",o.style.display="none",o.id=d(r)?"qr-canvas":r,o},e.prototype.getShadedRegionBounds=function(t,e,r){if(r.width>t||r.height>e)throw"'config.qrbox' dimensions should not be greater than the dimensions of the root HTML element.";return{x:(t-r.width)/2,y:(e-r.height)/2,width:r.width,height:r.height}},e.prototype.possiblyInsertShadingElement=function(t,e,r,n){if(!(e-n.width<1||r-n.height<1)){var i=document.createElement("div");i.style.position="absolute";var o=(e-n.width)/2,s=(r-n.height)/2;if(i.style.borderLeft=o+"px solid #0000007a",i.style.borderRight=o+"px solid #0000007a",i.style.borderTop=s+"px solid #0000007a",i.style.borderBottom=s+"px solid #0000007a",i.style.boxSizing="border-box",i.style.top="0px",i.style.bottom="0px",i.style.left="0px",i.style.right="0px",i.id=""+M.SHADED_REGION_CLASSNAME,e-n.width<11||r-n.height<11)this.hasBorderShaders=!1;else{var a=40;this.insertShaderBorders(i,a,5,-5,0,!0),this.insertShaderBorders(i,a,5,-5,0,!1),this.insertShaderBorders(i,a,5,n.height+5,0,!0),this.insertShaderBorders(i,a,5,n.height+5,0,!1),this.insertShaderBorders(i,5,45,-5,-5,!0),this.insertShaderBorders(i,5,45,n.height+5-a,-5,!0),this.insertShaderBorders(i,5,45,-5,-5,!1),this.insertShaderBorders(i,5,45,n.height+5-a,-5,!1),this.hasBorderShaders=!0}t.append(i)}},e.prototype.insertShaderBorders=function(t,e,r,n,i,o){var s=document.createElement("div");s.style.position="absolute",s.style.backgroundColor=M.BORDER_SHADER_DEFAULT_COLOR,s.style.width=e+"px",s.style.height=r+"px",s.style.top=n+"px",o?s.style.left=i+"px":s.style.right=i+"px",this.borderShaders||(this.borderShaders=[]),this.borderShaders.push(s),t.appendChild(s)},e.prototype.getTimeoutFps=function(t){return 1e3/t},e}(),_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAdgAAAHYBTnsmCAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAELSURBVDiNldNLSkNBEAXQkwgR4iYkZpLfVoxuxAU4ENyAaDA68QNuw88CNMFB4sBpNiAYyVQHXWpI+gW9UNCv+t6q7ur7WEYHJxjjI2KMY7Qz/B+s4wwzXGAbTbRifRl7fVRy4gc8YnNFkxqecL9Y5DzE1VVHDFQxwOl3ohNHy3U+xEEmvxWa1hr28YqbDLGBKYYL+bco0oQXaUg5tCJy6GIkOjQKSEM8ryj+Xo6PUgGpHJFDCZ9lTFAvIK1CHZMybqX7/Bfd0GpLT1LLkPYict1n5gbclxz2FyNtSMPtzScrkj0H0vsWoR7iO5n/oSLZc4Yr7Pj1wS6uY6+XE8+jhSPJJNOIUeSWTPUFgVI4ubR2UYIAAAAASUVORK5CYII=",y=function(){function t(){}return t.createDefault=function(){return{hasPermission:!1,lastUsedCameraId:null}},t}(),O=function(){function t(){this.data=y.createDefault();var e=localStorage.getItem(t.LOCAL_STORAGE_KEY);e?this.data=JSON.parse(e):this.reset()}return t.prototype.hasCameraPermissions=function(){return this.data.hasPermission},t.prototype.getLastUsedCameraId=function(){return this.data.lastUsedCameraId},t.prototype.setHasPermission=function(t){this.data.hasPermission=t,this.flush()},t.prototype.setLastUsedCameraId=function(t){this.data.lastUsedCameraId=t,this.flush()},t.prototype.resetLastUsedCameraId=function(){this.data.lastUsedCameraId=null,this.flush()},t.prototype.reset=function(){this.data=y.createDefault(),this.flush()},t.prototype.flush=function(){localStorage.setItem(t.LOCAL_STORAGE_KEY,JSON.stringify(this.data))},t.LOCAL_STORAGE_KEY="HTML5_QRCODE_DATA",t}(),b=function(){function t(){this.infoDiv=document.createElement("div")}return t.prototype.renderInto=function(t){this.infoDiv.style.position="absolute",this.infoDiv.style.top="10px",this.infoDiv.style.right="10px",this.infoDiv.style.zIndex="1",this.infoDiv.style.display="none",this.infoDiv.style.padding="5pt",this.infoDiv.style.border="1px solid silver",this.infoDiv.style.fontSize="10pt",this.infoDiv.style.background="rgb(248 248 248)",this.infoDiv.innerText=f.builtUsing();var e=document.createElement("a");e.innerText="html5-qrcode",e.href="https://github.com/mebjas/html5-qrcode",e.target="new",this.infoDiv.appendChild(e);var r=document.createElement("br"),n=document.createElement("br");this.infoDiv.appendChild(r),this.infoDiv.appendChild(n);var i=document.createElement("a");i.innerText=f.reportIssues(),i.href="https://github.com/mebjas/html5-qrcode/issues",i.target="new",this.infoDiv.appendChild(i),t.appendChild(this.infoDiv)},t.prototype.show=function(){this.infoDiv.style.display="block"},t.prototype.hide=function(){this.infoDiv.style.display="none"},t}(),F=function(){function t(t,e){this.isShowingInfoIcon=!0,this.onTapIn=t,this.onTapOut=e,this.infoIcon=document.createElement("img")}return t.prototype.renderInto=function(t){var e=this;this.infoIcon.src=_,this.infoIcon.style.position="absolute",this.infoIcon.style.top="4px",this.infoIcon.style.right="4px",this.infoIcon.style.opacity="0.6",this.infoIcon.style.cursor="pointer",this.infoIcon.style.zIndex="2",this.infoIcon.onmouseover=function(t){return e.onHoverIn()},this.infoIcon.onmouseout=function(t){return e.onHoverOut()},this.infoIcon.onclick=function(t){return e.onClick()},t.appendChild(this.infoIcon)},t.prototype.onHoverIn=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="1")},t.prototype.onHoverOut=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="0.6")},t.prototype.onClick=function(){this.isShowingInfoIcon?(this.isShowingInfoIcon=!1,this.onTapIn(),this.infoIcon.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAQgAAAEIBarqQRAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAE1SURBVDiNfdI7S0NBEAXgLya1otFgpbYSbISAgpXYi6CmiH9KCAiChaVga6OiWPgfRDQ+0itaGVNosXtluWwcuMzePfM4M3sq8lbHBubwg1dc4m1E/J/N4ghDPOIsfk/4xiEao5KX0McFljN4C9d4QTPXuY99jP3DsIoDPGM6BY5i5yI5R7O4q+ImFkJY2DCh3cAH2klyB+9J1xUMMAG7eCh1a+Mr+k48b5diXrFVwwLuS+BJ9MfR7+G0FHOHhTHhnXNWS87VDF4pcnfQK4Ep7XScNLmPTZgURNKKYENYWDpzW1BhscS1WHS8CDgURFJQrWcoF3c13KKbgg1BYQfy8xZWEzTTw1QZbAoKu8FqJnktdu5hcVSHmchiILzzuaDQvjBzV2m8yohCE1jHfPx/xhU+y4G/D75ELlRJsSYAAAAASUVORK5CYII=",this.infoIcon.style.opacity="1"):(this.isShowingInfoIcon=!0,this.onTapOut(),this.infoIcon.src=_,this.infoIcon.style.opacity="0.6")},t}(),P=function(){function t(){var t=this;this.infoDiv=new b,this.infoIcon=new F((function(){t.infoDiv.show()}),(function(){t.infoDiv.hide()}))}return t.prototype.renderInto=function(t){this.infoDiv.renderInto(t),this.infoIcon.renderInto(t)},t}(),k=function(){function t(){}return t.hasCameraPermissions=function(){return new Promise((function(t,e){navigator.mediaDevices.enumerateDevices().then((function(e){e.forEach((function(e){"videoinput"===e.kind&&e.label&&t(!0)})),t(!1)}))}))},t}();!function(t){t[t.STATUS_DEFAULT=0]="STATUS_DEFAULT",t[t.STATUS_SUCCESS=1]="STATUS_SUCCESS",t[t.STATUS_WARNING=2]="STATUS_WARNING",t[t.STATUS_REQUESTING_PERMISSION=3]="STATUS_REQUESTING_PERMISSION"}(C||(C={}));var L=function(){function t(t,e,r){if(this.lastMatchFound=null,this.cameraScanImage=null,this.fileScanImage=null,this.elementId=t,this.config=this.createConfig(e),this.verbose=!0===r,!document.getElementById(t))throw"HTML Element with id="+t+" not found";this.currentScanType=i.SCAN_TYPE_CAMERA,this.sectionSwapAllowed=!0,this.logger=new g(this.verbose),this.persistedDataManager=new O,!0!==e.rememberLastUsedCamera&&this.persistedDataManager.reset()}return t.prototype.render=function(t,e){var r=this;this.lastMatchFound=null,this.qrCodeSuccessCallback=function(e,n){if(t)t(e,n);else{if(r.lastMatchFound===e)return;r.lastMatchFound=e,r.setHeaderMessage(w.lastMatch(e),C.STATUS_SUCCESS)}},this.qrCodeErrorCallback=function(t,r){e&&e(t,r)};var n,i,o=document.getElementById(this.elementId);if(!o)throw"HTML Element with id="+this.elementId+" not found";o.innerHTML="",this.createBasicLayout(o),this.html5Qrcode=new N(this.getScanRegionId(),(n=this.config,i=this.verbose,{formatsToSupport:n.formatsToSupport,experimentalFeatures:n.experimentalFeatures,verbose:i}))},t.prototype.clear=function(){var t=this;return this.html5Qrcode?new Promise((function(e,r){t.html5Qrcode?t.html5Qrcode.isScanning&&t.html5Qrcode.stop().then((function(r){var n;t.html5Qrcode?(t.html5Qrcode.clear(),(n=document.getElementById(t.elementId))&&(n.innerHTML="",t.resetBasicLayout(n)),e()):e()})).catch((function(e){t.verbose&&t.logger.logError("Unable to stop qrcode scanner",e),r(e)})):e()})):Promise.resolve()},t.prototype.createConfig=function(t){return t?(t.fps||(t.fps=A.SCAN_DEFAULT_FPS),t.rememberLastUsedCamera!==!A.DEFAULT_REMEMBER_LAST_CAMERA_USED&&(t.rememberLastUsedCamera=A.DEFAULT_REMEMBER_LAST_CAMERA_USED),t):{fps:A.SCAN_DEFAULT_FPS,rememberLastUsedCamera:A.DEFAULT_REMEMBER_LAST_CAMERA_USED}},t.prototype.createBasicLayout=function(t){t.style.position="relative",t.style.padding="0px",t.style.border="1px solid silver",this.createHeader(t);var e=document.createElement("div"),r=this.getScanRegionId();e.id=r,e.style.width="100%",e.style.minHeight="100px",e.style.textAlign="center",t.appendChild(e),this.insertCameraScanImageToScanRegion();var n=document.createElement("div"),i=this.getDashboardId();n.id=i,n.style.width="100%",t.appendChild(n),this.setupInitialDashboard(n)},t.prototype.resetBasicLayout=function(t){t.style.border="none"},t.prototype.setupInitialDashboard=function(t){this.createSection(t),this.createSectionControlPanel(),this.createSectionSwap()},t.prototype.createHeader=function(t){var e=document.createElement("div");e.style.textAlign="left",e.style.margin="0px",t.appendChild(e),(new P).renderInto(e);var r=document.createElement("div");r.id=this.getHeaderMessageContainerId(),r.style.display="none",r.style.textAlign="center",r.style.fontSize="14px",r.style.padding="2px 10px",r.style.margin="4px",r.style.borderTop="1px solid #f6f6f6",e.appendChild(r)},t.prototype.createSection=function(t){var e=document.createElement("div");e.id=this.getDashboardSectionId(),e.style.width="100%",e.style.padding="10px",e.style.textAlign="left",t.appendChild(e)},t.prototype.createCameraListUi=function(t,e,r){var n=this;n.setHeaderMessage(w.cameraPermissionRequesting());var i=function(){r||n.createPermissionButton(t,e)};N.getCameras().then((function(r){n.persistedDataManager.setHasPermission(!0),n.resetHeaderMessage(),r&&r.length>0?(t.removeChild(e),n.renderCameraSelection(r)):(n.setHeaderMessage(w.noCameraFound(),C.STATUS_WARNING),i())})).catch((function(t){n.persistedDataManager.setHasPermission(!1),r?r.disabled=!1:i(),n.setHeaderMessage(t,C.STATUS_WARNING)}))},t.prototype.createPermissionButton=function(t,e){var r=this,n=document.createElement("button");n.innerText=w.cameraPermissionTitle(),n.addEventListener("click",(function(){n.disabled=!0,r.createCameraListUi(t,e,n)})),e.appendChild(n)},t.prototype.createPermissionsUi=function(t,e){var r=this;this.persistedDataManager.hasCameraPermissions()?k.hasCameraPermissions().then((function(n){n?r.createCameraListUi(t,e):(r.persistedDataManager.setHasPermission(!1),r.createPermissionButton(t,e))})).catch((function(n){r.persistedDataManager.setHasPermission(!1),r.createPermissionButton(t,e)})):this.createPermissionButton(t,e)},t.prototype.createSectionControlPanel=function(){var t=this,e=document.getElementById(this.getDashboardSectionId()),r=document.createElement("div");e.appendChild(r);var n=document.createElement("div");n.id=this.getDashboardSectionCameraScanRegionId(),n.style.display=this.currentScanType===i.SCAN_TYPE_CAMERA?"block":"none",r.appendChild(n);var o=document.createElement("div");o.style.textAlign="center",n.appendChild(o),this.createPermissionsUi(n,o);var s=document.createElement("div");s.id=this.getDashboardSectionFileScanRegionId(),s.style.textAlign="center",s.style.display=this.currentScanType===i.SCAN_TYPE_CAMERA?"none":"block",r.appendChild(s);var a=document.createElement("input");a.id=this.getFileScanInputId(),a.accept="image/*",a.type="file",a.style.width="200px",a.disabled=this.currentScanType===i.SCAN_TYPE_CAMERA;var A=document.createElement("span");A.innerText=" Select Image",s.appendChild(a),s.appendChild(A),a.addEventListener("change",(function(e){if(!t.html5Qrcode)throw"html5Qrcode not defined";if(null!=e&&null!=e.target&&t.currentScanType===i.SCAN_TYPE_FILE&&0!==e.target.files.length){var r=e.target.files[0];t.html5Qrcode.scanFileV2(r,!0).then((function(e){t.resetHeaderMessage(),t.qrCodeSuccessCallback(e.decodedText,e)})).catch((function(e){t.setHeaderMessage(e,C.STATUS_WARNING),t.qrCodeErrorCallback(e,h.createFrom(e))}))}}))},t.prototype.renderCameraSelection=function(t){var e=this,r=document.getElementById(this.getDashboardSectionCameraScanRegionId());r.style.textAlign="center";var n=document.createElement("span");n.innerText="Select Camera ("+t.length+") ",n.style.marginRight="10px";var i=document.createElement("select");i.id=this.getCameraSelectionId();for(var o=[],s=0,a=t;s",e.appendChild(t.cameraScanImage)},this.cameraScanImage.width=64,this.cameraScanImage.style.opacity="0.3",this.cameraScanImage.src="data:image/gif;base64,R0lGODlhMgAyAPcAAPv7+wMDA/Pz8ysrK7Ozs0NDQ6Ojo1NTU9PT0yMjI+Pj45OTk8PDwxMTE2NjYzMzMwsLCxsbG9vb20tLS2tra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SIyOSIKICAgIHhtcERNOnNjYWxlPSIxLzI1Ii8+CiAgIDx4bXBETTpzdGFydFRpbWVjb2RlCiAgICB4bXBETTp0aW1lRm9ybWF0PSIyNVRpbWVjb2RlIgogICAgeG1wRE06dGltZVZhbHVlPSIwMDowMDowMDowMCIvPgogICA8eG1wRE06YWx0VGltZWNvZGUKICAgIHhtcERNOnRpbWVWYWx1ZT0iMDA6MDA6MDA6MDAiCiAgICB4bXBETTp0aW1lRm9ybWF0PSIyNVRpbWVjb2RlIi8+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAOw=="},t.prototype.insertFileScanImageToScanRegion=function(){var t=this,e=document.getElementById(this.getScanRegionId());if(this.fileScanImage)return e.innerHTML="
",void e.appendChild(this.fileScanImage);this.fileScanImage=new Image,this.fileScanImage.onload=function(r){e.innerHTML="
",e.appendChild(t.fileScanImage)},this.fileScanImage.width=64,this.fileScanImage.style.opacity="0.3",this.fileScanImage.src="data:image/gif;base64,R0lGODlhMgAyAPcAAPv7+wMDA/Pz8xMTE+Pj4zMzM0NDQyMjI1NTU4ODg6Ojo5OTk7Ozs3Nzc2NjY9PT0wsLC8PDwxsbG0tLSzs7O1tbW+vr6ysrK2tra5ubm7u7u4uLi6urq8vLy9vb23t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AAA7"},t.prototype.clearScanRegion=function(){document.getElementById(this.getScanRegionId()).innerHTML=""},t.prototype.getDashboardSectionId=function(){return this.elementId+"__dashboard_section"},t.prototype.getDashboardSectionCameraScanRegionId=function(){return this.elementId+"__dashboard_section_csr"},t.prototype.getDashboardSectionFileScanRegionId=function(){return this.elementId+"__dashboard_section_fsr"},t.prototype.getDashboardSectionSwapLinkId=function(){return this.elementId+"__dashboard_section_swaplink"},t.prototype.getScanRegionId=function(){return this.elementId+"__scan_region"},t.prototype.getDashboardId=function(){return this.elementId+"__dashboard"},t.prototype.getFileScanInputId=function(){return this.elementId+"__filescan_input"},t.prototype.getStatusSpanId=function(){return this.elementId+"__status_span"},t.prototype.getHeaderMessageContainerId=function(){return this.elementId+"__header_message"},t.prototype.getCameraSelectionId=function(){return this.elementId+"__camera_selection"},t.prototype.getCameraScanRegion=function(){return document.getElementById(this.getDashboardSectionCameraScanRegionId())},t.prototype.getFileScanRegion=function(){return document.getElementById(this.getDashboardSectionFileScanRegionId())},t.prototype.getFileScanInput=function(){return document.getElementById(this.getFileScanInputId())},t.prototype.getDashboardSectionSwapLink=function(){return document.getElementById(this.getDashboardSectionSwapLinkId())},t.prototype.getHeaderMessageDiv=function(){return document.getElementById(this.getHeaderMessageContainerId())},t}()})(),__Html5QrcodeLibrary__=n})();/** Append the libary components to globals for backwards compatibility. */ +if (window && !Html5QrcodeScanner) { + var Html5QrcodeScanner = window.__Html5QrcodeLibrary__.Html5QrcodeScanner; + var Html5Qrcode = window.__Html5QrcodeLibrary__.Html5Qrcode; + var Html5QrcodeSupportedFormats = window.__Html5QrcodeLibrary__.Html5QrcodeSupportedFormats +} diff --git a/qrscan/main.html b/qrscan/main.html new file mode 100644 index 0000000..e2e332e --- /dev/null +++ b/qrscan/main.html @@ -0,0 +1,39 @@ + + + Html-Qrcode Demo + +
+
+ + + + + \ No newline at end of file diff --git a/qrscan/package-lock.json b/qrscan/package-lock.json new file mode 100644 index 0000000..3642121 --- /dev/null +++ b/qrscan/package-lock.json @@ -0,0 +1,36 @@ +{ + "name": "qrscan", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "dependencies": { + "html5-qrcode": "^2.1.0", + "zxing": "^0.1.2" + } + }, + "node_modules/html5-qrcode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/html5-qrcode/-/html5-qrcode-2.1.0.tgz", + "integrity": "sha512-Lzm6U1Vm2WM4g7dyoFJM/YP10l7af7MuIRx/dEdyWxMyDGYBEOCOinBiQnuGm8wFK6z3g4sUV/e4ewFoVwH/1g==" + }, + "node_modules/zxing": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/zxing/-/zxing-0.1.2.tgz", + "integrity": "sha1-Jg2+nWeF1oTTd1vpd5VyjVm72fk=", + "deprecated": "zxing is no longer maintained. Please use qrcode-reader" + } + }, + "dependencies": { + "html5-qrcode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/html5-qrcode/-/html5-qrcode-2.1.0.tgz", + "integrity": "sha512-Lzm6U1Vm2WM4g7dyoFJM/YP10l7af7MuIRx/dEdyWxMyDGYBEOCOinBiQnuGm8wFK6z3g4sUV/e4ewFoVwH/1g==" + }, + "zxing": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/zxing/-/zxing-0.1.2.tgz", + "integrity": "sha1-Jg2+nWeF1oTTd1vpd5VyjVm72fk=" + } + } +} diff --git a/qrscan/package.json b/qrscan/package.json new file mode 100644 index 0000000..fb2befa --- /dev/null +++ b/qrscan/package.json @@ -0,0 +1,6 @@ +{ + "dependencies": { + "html5-qrcode": "^2.1.0", + "zxing": "^0.1.2" + } +} From fcc15877868b5a89298670fe9688571227c6dfa0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 18 Oct 2021 15:03:10 +0200 Subject: [PATCH 03/10] Pulizia metodo demo WeatherForecast --- .../Controllers/WeatherForecastController.cs | 39 ------------------- GPW.Api/GPW.Api/WeatherForecast.cs | 15 ------- 2 files changed, 54 deletions(-) delete mode 100644 GPW.Api/GPW.Api/Controllers/WeatherForecastController.cs delete mode 100644 GPW.Api/GPW.Api/WeatherForecast.cs diff --git a/GPW.Api/GPW.Api/Controllers/WeatherForecastController.cs b/GPW.Api/GPW.Api/Controllers/WeatherForecastController.cs deleted file mode 100644 index 5b46439..0000000 --- a/GPW.Api/GPW.Api/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,39 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace GPW.Api.Controllers -{ - [ApiController] - [Route("[controller]")] - public class WeatherForecastController : ControllerBase - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - private readonly ILogger _logger; - - public WeatherForecastController(ILogger logger) - { - _logger = logger; - } - - [HttpGet] - public IEnumerable Get() - { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = DateTime.Now.AddDays(index), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }) - .ToArray(); - } - } -} diff --git a/GPW.Api/GPW.Api/WeatherForecast.cs b/GPW.Api/GPW.Api/WeatherForecast.cs deleted file mode 100644 index 83b5c3e..0000000 --- a/GPW.Api/GPW.Api/WeatherForecast.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace GPW.Api -{ - public class WeatherForecast - { - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string Summary { get; set; } - } -} From 2f3f80c0102ac8f33499edf59f7968111218fbd5 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 18 Oct 2021 15:43:53 +0200 Subject: [PATCH 04/10] Aggiunta preliminare progetto GPW.Data --- GPW.Api/GPW.Data/DBModels/AnagClassiOrarie.cs | 21 + GPW.Api/GPW.Data/DBModels/AnagClienti.cs | 34 + GPW.Api/GPW.Data/DBModels/AnagDevice.cs | 19 + GPW.Api/GPW.Data/DBModels/AnagFasi.cs | 35 + GPW.Api/GPW.Data/DBModels/AnagGiust.cs | 21 + GPW.Api/GPW.Data/DBModels/AnagGruppi.cs | 22 + GPW.Api/GPW.Data/DBModels/AnagKeyValue.cs | 16 + GPW.Api/GPW.Data/DBModels/AnagOrari.cs | 39 + GPW.Api/GPW.Data/DBModels/AnagProgetti.cs | 30 + GPW.Api/GPW.Data/DBModels/AnagRuoli.cs | 13 + GPW.Api/GPW.Data/DBModels/AnagTipoCheck.cs | 13 + GPW.Api/GPW.Data/DBModels/AnagTipoTimb.cs | 20 + GPW.Api/GPW.Data/DBModels/AnagraficaEventi.cs | 20 + GPW.Api/GPW.Data/DBModels/CalendFesteFerie.cs | 14 + GPW.Api/GPW.Data/DBModels/CheckVc19.cs | 15 + GPW.Api/GPW.Data/DBModels/Config.cs | 14 + GPW.Api/GPW.Data/DBModels/Contatori.cs | 13 + GPW.Api/GPW.Data/DBModels/ControlloDefrag.cs | 22 + GPW.Api/GPW.Data/DBModels/Dipendenti.cs | 54 + GPW.Api/GPW.Data/DBModels/Dipendenti2Ruoli.cs | 13 + GPW.Api/GPW.Data/DBModels/ElencoReport.cs | 17 + GPW.Api/GPW.Data/DBModels/Funzioni.cs | 13 + GPW.Api/GPW.Data/DBModels/GPWContext.cs | 63 + GPW.Api/GPW.Data/DBModels/Giustificativi.cs | 18 + GPW.Api/GPW.Data/DBModels/ImportEgaltech.cs | 21 + .../GPW.Data/DBModels/ImportEgaltechFase.cs | 13 + .../GPW.Data/DBModels/ImportEgaltechNew.cs | 22 + GPW.Api/GPW.Data/DBModels/ListValue.cs | 16 + GPW.Api/GPW.Data/DBModels/LogAttivitum.cs | 14 + GPW.Api/GPW.Data/DBModels/LogUpdateDb.cs | 13 + GPW.Api/GPW.Data/DBModels/OreMensiliExport.cs | 27 + GPW.Api/GPW.Data/DBModels/PeriodiLav.cs | 17 + GPW.Api/GPW.Data/DBModels/Permessi.cs | 24 + .../GPW.Data/DBModels/Permessi2Funzione.cs | 16 + GPW.Api/GPW.Data/DBModels/RegAttivitaEgal.cs | 22 + GPW.Api/GPW.Data/DBModels/RegAttivitaExpl.cs | 16 + GPW.Api/GPW.Data/DBModels/RegAttivitum.cs | 22 + GPW.Api/GPW.Data/DBModels/RegistroEventi.cs | 14 + GPW.Api/GPW.Data/DBModels/RilievoTemp.cs | 16 + GPW.Api/GPW.Data/DBModels/Sottoscrizioni.cs | 21 + GPW.Api/GPW.Data/DBModels/StoricoAnagFasi.cs | 26 + .../GPW.Data/DBModels/StoricoAnagProgetti.cs | 24 + GPW.Api/GPW.Data/DBModels/TabWol.cs | 19 + GPW.Api/GPW.Data/DBModels/Tally.cs | 12 + GPW.Api/GPW.Data/DBModels/Timbrature.cs | 20 + GPW.Api/GPW.Data/DBModels/TimbratureExpl.cs | 44 + .../GPW.Data/DBModels/TransizioneEventi.cs | 18 + GPW.Api/GPW.Data/GPW.Data.csproj | 24 + GPW.Api/GPW.Data/GPWContext.cs | 1642 +++++++++++++++++ 49 files changed, 2682 insertions(+) create mode 100644 GPW.Api/GPW.Data/DBModels/AnagClassiOrarie.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagClienti.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagDevice.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagFasi.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagGiust.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagGruppi.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagKeyValue.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagOrari.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagProgetti.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagRuoli.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagTipoCheck.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagTipoTimb.cs create mode 100644 GPW.Api/GPW.Data/DBModels/AnagraficaEventi.cs create mode 100644 GPW.Api/GPW.Data/DBModels/CalendFesteFerie.cs create mode 100644 GPW.Api/GPW.Data/DBModels/CheckVc19.cs create mode 100644 GPW.Api/GPW.Data/DBModels/Config.cs create mode 100644 GPW.Api/GPW.Data/DBModels/Contatori.cs create mode 100644 GPW.Api/GPW.Data/DBModels/ControlloDefrag.cs create mode 100644 GPW.Api/GPW.Data/DBModels/Dipendenti.cs create mode 100644 GPW.Api/GPW.Data/DBModels/Dipendenti2Ruoli.cs create mode 100644 GPW.Api/GPW.Data/DBModels/ElencoReport.cs create mode 100644 GPW.Api/GPW.Data/DBModels/Funzioni.cs create mode 100644 GPW.Api/GPW.Data/DBModels/GPWContext.cs create mode 100644 GPW.Api/GPW.Data/DBModels/Giustificativi.cs create mode 100644 GPW.Api/GPW.Data/DBModels/ImportEgaltech.cs create mode 100644 GPW.Api/GPW.Data/DBModels/ImportEgaltechFase.cs create mode 100644 GPW.Api/GPW.Data/DBModels/ImportEgaltechNew.cs create mode 100644 GPW.Api/GPW.Data/DBModels/ListValue.cs create mode 100644 GPW.Api/GPW.Data/DBModels/LogAttivitum.cs create mode 100644 GPW.Api/GPW.Data/DBModels/LogUpdateDb.cs create mode 100644 GPW.Api/GPW.Data/DBModels/OreMensiliExport.cs create mode 100644 GPW.Api/GPW.Data/DBModels/PeriodiLav.cs create mode 100644 GPW.Api/GPW.Data/DBModels/Permessi.cs create mode 100644 GPW.Api/GPW.Data/DBModels/Permessi2Funzione.cs create mode 100644 GPW.Api/GPW.Data/DBModels/RegAttivitaEgal.cs create mode 100644 GPW.Api/GPW.Data/DBModels/RegAttivitaExpl.cs create mode 100644 GPW.Api/GPW.Data/DBModels/RegAttivitum.cs create mode 100644 GPW.Api/GPW.Data/DBModels/RegistroEventi.cs create mode 100644 GPW.Api/GPW.Data/DBModels/RilievoTemp.cs create mode 100644 GPW.Api/GPW.Data/DBModels/Sottoscrizioni.cs create mode 100644 GPW.Api/GPW.Data/DBModels/StoricoAnagFasi.cs create mode 100644 GPW.Api/GPW.Data/DBModels/StoricoAnagProgetti.cs create mode 100644 GPW.Api/GPW.Data/DBModels/TabWol.cs create mode 100644 GPW.Api/GPW.Data/DBModels/Tally.cs create mode 100644 GPW.Api/GPW.Data/DBModels/Timbrature.cs create mode 100644 GPW.Api/GPW.Data/DBModels/TimbratureExpl.cs create mode 100644 GPW.Api/GPW.Data/DBModels/TransizioneEventi.cs create mode 100644 GPW.Api/GPW.Data/GPW.Data.csproj create mode 100644 GPW.Api/GPW.Data/GPWContext.cs diff --git a/GPW.Api/GPW.Data/DBModels/AnagClassiOrarie.cs b/GPW.Api/GPW.Data/DBModels/AnagClassiOrarie.cs new file mode 100644 index 0000000..3e5fd30 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagClassiOrarie.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagClassiOrarie + { + public AnagClassiOrarie() + { + AnagFasis = new HashSet(); + } + + public string CodClasse { get; set; } + public string DescrClasse { get; set; } + public decimal? Peso { get; set; } + + public virtual ICollection AnagFasis { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagClienti.cs b/GPW.Api/GPW.Data/DBModels/AnagClienti.cs new file mode 100644 index 0000000..31e8db9 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagClienti.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagClienti + { + public AnagClienti() + { + AnagProgettis = new HashSet(); + } + + public int IdxCliente { get; set; } + public string RagSociale { get; set; } + public string Indirizzo { get; set; } + public string Cap { get; set; } + public string Citta { get; set; } + public string Prov { get; set; } + public string Tel { get; set; } + public string Url { get; set; } + public string Email { get; set; } + public string PIva { get; set; } + public string Cf { get; set; } + public string LogoUrl { get; set; } + public string Nota { get; set; } + public int? OldIdx { get; set; } + public bool? Attivo { get; set; } + public string CodExt { get; set; } + + public virtual ICollection AnagProgettis { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagDevice.cs b/GPW.Api/GPW.Data/DBModels/AnagDevice.cs new file mode 100644 index 0000000..d52e97d --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagDevice.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagDevice + { + public int IdxDevice { get; set; } + public string DeviceSecret { get; set; } + public int IdxDipendente { get; set; } + public string DeviceName { get; set; } + public string Description { get; set; } + public DateTime DataOraEnabled { get; set; } + public DateTime DataOraLastSeen { get; set; } + public string LastIpv4 { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagFasi.cs b/GPW.Api/GPW.Data/DBModels/AnagFasi.cs new file mode 100644 index 0000000..3905920 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagFasi.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagFasi + { + public AnagFasi() + { + RegAttivita = new HashSet(); + RegAttivitaEgals = new HashSet(); + } + + public int IdxFase { get; set; } + public int? IdxProgetto { get; set; } + public string CodFase { get; set; } + public int IdxFaseAncest { get; set; } + public string NomeFase { get; set; } + public string DescrizioneFase { get; set; } + public bool? EnableTime { get; set; } + public bool? EnableMoney { get; set; } + public bool? Attivo { get; set; } + public string CodClasse { get; set; } + public string CodExt { get; set; } + public decimal? BudgetTime { get; set; } + public decimal? BudgetMoney { get; set; } + + public virtual AnagClassiOrarie CodClasseNavigation { get; set; } + public virtual AnagProgetti IdxProgettoNavigation { get; set; } + public virtual ICollection RegAttivita { get; set; } + public virtual ICollection RegAttivitaEgals { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagGiust.cs b/GPW.Api/GPW.Data/DBModels/AnagGiust.cs new file mode 100644 index 0000000..aae7729 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagGiust.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagGiust + { + public AnagGiust() + { + Giustificativis = new HashSet(); + } + + public string CodGiust { get; set; } + public string Descrizione { get; set; } + public bool? UserSelectable { get; set; } + + public virtual ICollection Giustificativis { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagGruppi.cs b/GPW.Api/GPW.Data/DBModels/AnagGruppi.cs new file mode 100644 index 0000000..4259f25 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagGruppi.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagGruppi + { + public AnagGruppi() + { + Dipendentis = new HashSet(); + } + + public string Gruppo { get; set; } + public string DescrGruppo { get; set; } + public string CodExt { get; set; } + public bool? ExportEnab { get; set; } + + public virtual ICollection Dipendentis { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagKeyValue.cs b/GPW.Api/GPW.Data/DBModels/AnagKeyValue.cs new file mode 100644 index 0000000..3bd4df7 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagKeyValue.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagKeyValue + { + public string NomeVar { get; set; } + public int? ValInt { get; set; } + public double? ValFloat { get; set; } + public string ValString { get; set; } + public string Descrizione { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagOrari.cs b/GPW.Api/GPW.Data/DBModels/AnagOrari.cs new file mode 100644 index 0000000..95a0ef0 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagOrari.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagOrari + { + public AnagOrari() + { + Dipendentis = new HashSet(); + } + + public string CodOrario { get; set; } + public string DescOrario { get; set; } + public double OreLun { get; set; } + public double OreMar { get; set; } + public double OreMer { get; set; } + public double OreGio { get; set; } + public double OreVen { get; set; } + public double OreSab { get; set; } + public double OreDom { get; set; } + public double OreOrdSett { get; set; } + public double OreStraordAss { get; set; } + public bool AutoCompOreOrd { get; set; } + public string TipoCompens { get; set; } + public TimeSpan OraInizio1 { get; set; } + public TimeSpan OraFine1 { get; set; } + public TimeSpan OraInizio2 { get; set; } + public TimeSpan OraFine2 { get; set; } + public TimeSpan OraInizio3 { get; set; } + public TimeSpan OraFine3 { get; set; } + public int ArrotMinuti { get; set; } + public string ChkFun { get; set; } + + public virtual ICollection Dipendentis { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagProgetti.cs b/GPW.Api/GPW.Data/DBModels/AnagProgetti.cs new file mode 100644 index 0000000..550536c --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagProgetti.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagProgetti + { + public AnagProgetti() + { + AnagFasis = new HashSet(); + } + + public int IdxProgetto { get; set; } + public int IdxCliente { get; set; } + public string NomeProj { get; set; } + public string DescrProj { get; set; } + public int OldIdx { get; set; } + public bool? Attivo { get; set; } + public string CodExt { get; set; } + public DateTime Avvio { get; set; } + public DateTime Chiusura { get; set; } + public string Gruppo { get; set; } + public bool Starred { get; set; } + + public virtual AnagClienti IdxClienteNavigation { get; set; } + public virtual ICollection AnagFasis { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagRuoli.cs b/GPW.Api/GPW.Data/DBModels/AnagRuoli.cs new file mode 100644 index 0000000..36ee3a4 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagRuoli.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagRuoli + { + public string CodRuolo { get; set; } + public string DescrRuolo { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagTipoCheck.cs b/GPW.Api/GPW.Data/DBModels/AnagTipoCheck.cs new file mode 100644 index 0000000..b2fa670 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagTipoCheck.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagTipoCheck + { + public string ChkFun { get; set; } + public string DescrFun { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagTipoTimb.cs b/GPW.Api/GPW.Data/DBModels/AnagTipoTimb.cs new file mode 100644 index 0000000..560b714 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagTipoTimb.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagTipoTimb + { + public AnagTipoTimb() + { + Timbratures = new HashSet(); + } + + public string CodTipoTimb { get; set; } + public string DescrTipoTimb { get; set; } + + public virtual ICollection Timbratures { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/AnagraficaEventi.cs b/GPW.Api/GPW.Data/DBModels/AnagraficaEventi.cs new file mode 100644 index 0000000..835829e --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/AnagraficaEventi.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class AnagraficaEventi + { + public AnagraficaEventi() + { + TransizioneEventis = new HashSet(); + } + + public int IdxTipoEvento { get; set; } + public string Nome { get; set; } + + public virtual ICollection TransizioneEventis { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/CalendFesteFerie.cs b/GPW.Api/GPW.Data/DBModels/CalendFesteFerie.cs new file mode 100644 index 0000000..494b74f --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/CalendFesteFerie.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class CalendFesteFerie + { + public DateTime Data { get; set; } + public string CodGiust { get; set; } + public string Descrizione { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/CheckVc19.cs b/GPW.Api/GPW.Data/DBModels/CheckVc19.cs new file mode 100644 index 0000000..b5e407e --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/CheckVc19.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class CheckVc19 + { + public int IdxCheck { get; set; } + public int IdxDipendente { get; set; } + public DateTime DtCheck { get; set; } + public string Payload { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/Config.cs b/GPW.Api/GPW.Data/DBModels/Config.cs new file mode 100644 index 0000000..b463fdb --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/Config.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class Config + { + public string Chiave { get; set; } + public string Valore { get; set; } + public string Note { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/Contatori.cs b/GPW.Api/GPW.Data/DBModels/Contatori.cs new file mode 100644 index 0000000..9ca6776 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/Contatori.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class Contatori + { + public string CodContatore { get; set; } + public int? Valore { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/ControlloDefrag.cs b/GPW.Api/GPW.Data/DBModels/ControlloDefrag.cs new file mode 100644 index 0000000..7a91ac8 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/ControlloDefrag.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class ControlloDefrag + { + public string Db { get; set; } + public DateTime Data { get; set; } + public int Riga { get; set; } + public string Oggetto { get; set; } + public string IndexName { get; set; } + public decimal? AvgFragmentationInPercent { get; set; } + public long? PageCount { get; set; } + public string TypeDesc { get; set; } + public byte? FillFactor { get; set; } + public string CmdReorganize { get; set; } + public string CmdRebuild { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/Dipendenti.cs b/GPW.Api/GPW.Data/DBModels/Dipendenti.cs new file mode 100644 index 0000000..d58e8cb --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/Dipendenti.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class Dipendenti + { + public Dipendenti() + { + PeriodiLavs = new HashSet(); + RegAttivita = new HashSet(); + RegAttivitaEgals = new HashSet(); + RilievoTemps = new HashSet(); + Timbratures = new HashSet(); + } + + public int IdxDipendente { get; set; } + public string Matricola { get; set; } + public string Cf { get; set; } + public string Cognome { get; set; } + public string Nome { get; set; } + public DateTime? DataNascita { get; set; } + public string LuogoNascita { get; set; } + public string ProvNascita { get; set; } + public string NazNascita { get; set; } + public string CodHw { get; set; } + public string CodOrario { get; set; } + public bool? MailLastOp { get; set; } + public bool? MailDay { get; set; } + public bool? MailWeek { get; set; } + public bool? MailMonth { get; set; } + public string Email { get; set; } + public string AuthKey { get; set; } + public int? NumAuth { get; set; } + public string WolMac { get; set; } + public string Dominio { get; set; } + public string Utente { get; set; } + public string CodDipendenteExt { get; set; } + public string Gruppo { get; set; } + public DateTime? DataAssunzione { get; set; } + public DateTime? DataCessazione { get; set; } + public bool? Attivo { get; set; } + + public virtual AnagOrari CodOrarioNavigation { get; set; } + public virtual AnagGruppi GruppoNavigation { get; set; } + public virtual ICollection PeriodiLavs { get; set; } + public virtual ICollection RegAttivita { get; set; } + public virtual ICollection RegAttivitaEgals { get; set; } + public virtual ICollection RilievoTemps { get; set; } + public virtual ICollection Timbratures { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/Dipendenti2Ruoli.cs b/GPW.Api/GPW.Data/DBModels/Dipendenti2Ruoli.cs new file mode 100644 index 0000000..534b13d --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/Dipendenti2Ruoli.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class Dipendenti2Ruoli + { + public int IdxDipendente { get; set; } + public string CodRuolo { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/ElencoReport.cs b/GPW.Api/GPW.Data/DBModels/ElencoReport.cs new file mode 100644 index 0000000..6a60605 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/ElencoReport.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class ElencoReport + { + public int IdxRep { get; set; } + public string Area { get; set; } + public string Nome { get; set; } + public string Descrizione { get; set; } + public string CssClass { get; set; } + public string ReportUrl { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/Funzioni.cs b/GPW.Api/GPW.Data/DBModels/Funzioni.cs new file mode 100644 index 0000000..9d64ead --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/Funzioni.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class Funzioni + { + public string Funzione { get; set; } + public string Descrizione { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/GPWContext.cs b/GPW.Api/GPW.Data/DBModels/GPWContext.cs new file mode 100644 index 0000000..af85638 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/GPWContext.cs @@ -0,0 +1,63 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class GPWContext : DbContext + { + public GPWContext() + { + } + + public GPWContext(DbContextOptions options) + : base(options) + { + } + + public virtual DbSet CheckVc19s { get; set; } + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + if (!optionsBuilder.IsConfigured) + { +#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263. + optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=GPW;Trusted_Connection=True;"); + } + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.HasAnnotation("Relational:Collation", "Latin1_General_CI_AS"); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxCheck) + .HasName("PK_CheckC19"); + + entity.ToTable("CheckVC19"); + + entity.Property(e => e.IdxCheck).ValueGeneratedNever(); + + entity.Property(e => e.DtCheck) + .HasColumnType("datetime") + .HasColumnName("dtCheck") + .HasDefaultValueSql("(getdate())"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.Payload) + .IsRequired() + .HasMaxLength(500) + .HasColumnName("payload") + .HasDefaultValueSql("('')"); + }); + + OnModelCreatingPartial(modelBuilder); + } + + partial void OnModelCreatingPartial(ModelBuilder modelBuilder); + } +} diff --git a/GPW.Api/GPW.Data/DBModels/Giustificativi.cs b/GPW.Api/GPW.Data/DBModels/Giustificativi.cs new file mode 100644 index 0000000..fcc3c2c --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/Giustificativi.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class Giustificativi + { + public DateTime DataLav { get; set; } + public int IdxDipendente { get; set; } + public string CodGiust { get; set; } + public int? Minuti { get; set; } + public bool? Automatico { get; set; } + + public virtual AnagGiust CodGiustNavigation { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/ImportEgaltech.cs b/GPW.Api/GPW.Data/DBModels/ImportEgaltech.cs new file mode 100644 index 0000000..cf4678b --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/ImportEgaltech.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class ImportEgaltech + { + public int IdxRiga { get; set; } + public DateTime Data { get; set; } + public decimal NOre { get; set; } + public TimeSpan Ora { get; set; } + public string Commessa { get; set; } + public string Fase { get; set; } + public string Note { get; set; } + public int IdxDipendente { get; set; } + public bool? FlgCaricato { get; set; } + public string DescRisultato { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/ImportEgaltechFase.cs b/GPW.Api/GPW.Data/DBModels/ImportEgaltechFase.cs new file mode 100644 index 0000000..bea96af --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/ImportEgaltechFase.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class ImportEgaltechFase + { + public string Fase { get; set; } + public string DescFase { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/ImportEgaltechNew.cs b/GPW.Api/GPW.Data/DBModels/ImportEgaltechNew.cs new file mode 100644 index 0000000..67941e3 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/ImportEgaltechNew.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class ImportEgaltechNew + { + public int IdxRiga { get; set; } + public DateTime Data { get; set; } + public decimal NOre { get; set; } + public TimeSpan Ora { get; set; } + public string Commessa { get; set; } + public string Fase { get; set; } + public string SottoFase { get; set; } + public string Note { get; set; } + public int IdxDipendente { get; set; } + public bool? FlgCaricato { get; set; } + public string DescRisultato { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/ListValue.cs b/GPW.Api/GPW.Data/DBModels/ListValue.cs new file mode 100644 index 0000000..7106861 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/ListValue.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class ListValue + { + public string TableName { get; set; } + public string FieldName { get; set; } + public string Value { get; set; } + public string Label { get; set; } + public int? Ordinal { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/LogAttivitum.cs b/GPW.Api/GPW.Data/DBModels/LogAttivitum.cs new file mode 100644 index 0000000..2b2d8e9 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/LogAttivitum.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class LogAttivitum + { + public DateTime DataOra { get; set; } + public string Fonte { get; set; } + public string Valore { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/LogUpdateDb.cs b/GPW.Api/GPW.Data/DBModels/LogUpdateDb.cs new file mode 100644 index 0000000..f4e5c5d --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/LogUpdateDb.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class LogUpdateDb + { + public int Versione { get; set; } + public DateTime? Data { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/OreMensiliExport.cs b/GPW.Api/GPW.Data/DBModels/OreMensiliExport.cs new file mode 100644 index 0000000..d53c172 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/OreMensiliExport.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class OreMensiliExport + { + public int IdxDipendente { get; set; } + public DateTime DataLav { get; set; } + public string Matricola { get; set; } + public string CodExt { get; set; } + public string RifDitta { get; set; } + public double? OreStraordAss { get; set; } + public int? MinLavStra { get; set; } + public int? MinLavTot { get; set; } + public int? MinStraProgrMese { get; set; } + public int? MinPrevExp { get; set; } + public int? MinLavOrdExp { get; set; } + public int? MinStraExp { get; set; } + public int? MinPermExp { get; set; } + public int? MinFerieExp { get; set; } + public int? MinMalExp { get; set; } + public int? MinFestExp { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/PeriodiLav.cs b/GPW.Api/GPW.Data/DBModels/PeriodiLav.cs new file mode 100644 index 0000000..4c13668 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/PeriodiLav.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class PeriodiLav + { + public int IdxDipendente { get; set; } + public DateTime Entrata { get; set; } + public DateTime? Uscita { get; set; } + public int? RowNum { get; set; } + + public virtual Dipendenti IdxDipendenteNavigation { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/Permessi.cs b/GPW.Api/GPW.Data/DBModels/Permessi.cs new file mode 100644 index 0000000..c97fe2e --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/Permessi.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class Permessi + { + public Permessi() + { + Permessi2Funziones = new HashSet(); + } + + public string CodPermesso { get; set; } + public string Url { get; set; } + public int? Gruppo { get; set; } + public int? Numero { get; set; } + public string Nome { get; set; } + public string Descrizione { get; set; } + + public virtual ICollection Permessi2Funziones { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/Permessi2Funzione.cs b/GPW.Api/GPW.Data/DBModels/Permessi2Funzione.cs new file mode 100644 index 0000000..223abc1 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/Permessi2Funzione.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class Permessi2Funzione + { + public string CodPermesso { get; set; } + public string CodFunzione { get; set; } + public string Readwrite { get; set; } + + public virtual Permessi CodPermessoNavigation { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/RegAttivitaEgal.cs b/GPW.Api/GPW.Data/DBModels/RegAttivitaEgal.cs new file mode 100644 index 0000000..ed898ff --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/RegAttivitaEgal.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class RegAttivitaEgal + { + public int IdxRa { get; set; } + public int IdxDipendente { get; set; } + public int IdxFase { get; set; } + public DateTime Inizio { get; set; } + public DateTime Fine { get; set; } + public string Descrizione { get; set; } + public decimal? OreTot { get; set; } + public decimal? Importo { get; set; } + + public virtual Dipendenti IdxDipendenteNavigation { get; set; } + public virtual AnagFasi IdxFaseNavigation { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/RegAttivitaExpl.cs b/GPW.Api/GPW.Data/DBModels/RegAttivitaExpl.cs new file mode 100644 index 0000000..cf32936 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/RegAttivitaExpl.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class RegAttivitaExpl + { + public DateTime DataLav { get; set; } + public int IdxDipendente { get; set; } + public string CognomeNome { get; set; } + public int? MinRegAtt { get; set; } + public string DescrProj { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/RegAttivitum.cs b/GPW.Api/GPW.Data/DBModels/RegAttivitum.cs new file mode 100644 index 0000000..9ddb503 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/RegAttivitum.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class RegAttivitum + { + public int IdxRa { get; set; } + public int IdxDipendente { get; set; } + public int IdxFase { get; set; } + public DateTime Inizio { get; set; } + public DateTime Fine { get; set; } + public string Descrizione { get; set; } + public decimal? OreTot { get; set; } + public decimal? Importo { get; set; } + + public virtual Dipendenti IdxDipendenteNavigation { get; set; } + public virtual AnagFasi IdxFaseNavigation { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/RegistroEventi.cs b/GPW.Api/GPW.Data/DBModels/RegistroEventi.cs new file mode 100644 index 0000000..94701ee --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/RegistroEventi.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class RegistroEventi + { + public DateTime DataOra { get; set; } + public string Evento { get; set; } + public string Commento { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/RilievoTemp.cs b/GPW.Api/GPW.Data/DBModels/RilievoTemp.cs new file mode 100644 index 0000000..54fbe50 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/RilievoTemp.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class RilievoTemp + { + public int IdxDipendente { get; set; } + public DateTime DtRilievo { get; set; } + public decimal TempRil { get; set; } + + public virtual Dipendenti IdxDipendenteNavigation { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/Sottoscrizioni.cs b/GPW.Api/GPW.Data/DBModels/Sottoscrizioni.cs new file mode 100644 index 0000000..7727cc6 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/Sottoscrizioni.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class Sottoscrizioni + { + public int SubscriptionId { get; set; } + public string SubscriptionName { get; set; } + public string EMail { get; set; } + public int? IdxDipendente { get; set; } + public DateTime? DataInizio { get; set; } + public DateTime? DataFine { get; set; } + public bool Dettaglio { get; set; } + public string Format { get; set; } + public bool? IncludeReport { get; set; } + public bool? IncludeLink { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/StoricoAnagFasi.cs b/GPW.Api/GPW.Data/DBModels/StoricoAnagFasi.cs new file mode 100644 index 0000000..c22f066 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/StoricoAnagFasi.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class StoricoAnagFasi + { + public int IdxEv { get; set; } + public DateTime? DataEv { get; set; } + public int? IdxFase { get; set; } + public int? IdxProgetto { get; set; } + public string CodFase { get; set; } + public int? IdxFaseAncest { get; set; } + public string NomeFase { get; set; } + public string DescrizioneFase { get; set; } + public bool? EnableTime { get; set; } + public bool? EnableMoney { get; set; } + public bool? Attivo { get; set; } + public string CodClasse { get; set; } + public string CodExt { get; set; } + public decimal? BudgetTime { get; set; } + public decimal? BudgetMoney { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/StoricoAnagProgetti.cs b/GPW.Api/GPW.Data/DBModels/StoricoAnagProgetti.cs new file mode 100644 index 0000000..713095d --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/StoricoAnagProgetti.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class StoricoAnagProgetti + { + public int IdxEv { get; set; } + public DateTime? DataEv { get; set; } + public int? IdxProgetto { get; set; } + public int? IdxCliente { get; set; } + public string NomeProj { get; set; } + public string DescrProj { get; set; } + public int? OldIdx { get; set; } + public bool? Attivo { get; set; } + public string CodExt { get; set; } + public DateTime? Avvio { get; set; } + public DateTime? Chiusura { get; set; } + public string Gruppo { get; set; } + public bool? Starred { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/TabWol.cs b/GPW.Api/GPW.Data/DBModels/TabWol.cs new file mode 100644 index 0000000..eba80eb --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/TabWol.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class TabWol + { + public int IdxDipendente { get; set; } + public TimeSpan Lun { get; set; } + public TimeSpan Mar { get; set; } + public TimeSpan Mer { get; set; } + public TimeSpan Gio { get; set; } + public TimeSpan Ven { get; set; } + public TimeSpan Sab { get; set; } + public TimeSpan Dom { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/Tally.cs b/GPW.Api/GPW.Data/DBModels/Tally.cs new file mode 100644 index 0000000..1d92ac9 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/Tally.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class Tally + { + public int N { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/Timbrature.cs b/GPW.Api/GPW.Data/DBModels/Timbrature.cs new file mode 100644 index 0000000..ea4e475 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/Timbrature.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class Timbrature + { + public DateTime DataOra { get; set; } + public int IdxDipendente { get; set; } + public bool? Entrata { get; set; } + public string Ipv4 { get; set; } + public string CodTipoTimb { get; set; } + public bool? Approv { get; set; } + + public virtual AnagTipoTimb CodTipoTimbNavigation { get; set; } + public virtual Dipendenti IdxDipendenteNavigation { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/TimbratureExpl.cs b/GPW.Api/GPW.Data/DBModels/TimbratureExpl.cs new file mode 100644 index 0000000..78d2826 --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/TimbratureExpl.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class TimbratureExpl + { + public DateTime DataLav { get; set; } + public int IdxDipendente { get; set; } + public string CognomeNome { get; set; } + public DateTime? Entrata1 { get; set; } + public DateTime? Uscita1 { get; set; } + public DateTime? Entrata2 { get; set; } + public DateTime? Uscita2 { get; set; } + public DateTime? Entrata3 { get; set; } + public DateTime? Uscita3 { get; set; } + public DateTime? Entrata4 { get; set; } + public DateTime? Uscita4 { get; set; } + public double? HLav { get; set; } + public int? MinLav { get; set; } + public int? MinOrd { get; set; } + public int? MinNonLav { get; set; } + public int? MinStra { get; set; } + public int? MinPerm { get; set; } + public int? MinFer { get; set; } + public int? MinMal { get; set; } + public int? MinFest { get; set; } + public int? MinCassa { get; set; } + public int? Min104 { get; set; } + public int? MinMpp { get; set; } + public int? MinArcoPres { get; set; } + public bool? IsOkTim { get; set; } + public bool? IsOkApp { get; set; } + public bool? Block { get; set; } + public string ChkFunCod { get; set; } + public string ChkFunRes { get; set; } + public int? IsOk { get; set; } + public int IsOkLav { get; set; } + public double? HGiust { get; set; } + public decimal TempRil { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/DBModels/TransizioneEventi.cs b/GPW.Api/GPW.Data/DBModels/TransizioneEventi.cs new file mode 100644 index 0000000..898c92a --- /dev/null +++ b/GPW.Api/GPW.Data/DBModels/TransizioneEventi.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +#nullable disable + +namespace GPW.Data.DBModels +{ + public partial class TransizioneEventi + { + public string CodInviato { get; set; } + public string PrecCodInviato { get; set; } + public int? IdxTipoEvento { get; set; } + public string Text2show { get; set; } + public string DescrComando { get; set; } + + public virtual AnagraficaEventi IdxTipoEventoNavigation { get; set; } + } +} diff --git a/GPW.Api/GPW.Data/GPW.Data.csproj b/GPW.Api/GPW.Data/GPW.Data.csproj new file mode 100644 index 0000000..a03a87a --- /dev/null +++ b/GPW.Api/GPW.Data/GPW.Data.csproj @@ -0,0 +1,24 @@ + + + + net5.0 + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + diff --git a/GPW.Api/GPW.Data/GPWContext.cs b/GPW.Api/GPW.Data/GPWContext.cs new file mode 100644 index 0000000..9dfa929 --- /dev/null +++ b/GPW.Api/GPW.Data/GPWContext.cs @@ -0,0 +1,1642 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata; +using GPW.Data.DBModels; + +#nullable disable + +namespace GPW.Data +{ + public partial class GPWContext : DbContext + { + #region Public Constructors + + public GPWContext() + { + } + + public GPWContext(DbContextOptions options) + : base(options) + { + } + + #endregion Public Constructors + + #region Public Properties + + public virtual DbSet AnagClassiOraries { get; set; } + public virtual DbSet AnagClientis { get; set; } + public virtual DbSet AnagDevices { get; set; } + public virtual DbSet AnagFasis { get; set; } + public virtual DbSet AnagGiusts { get; set; } + public virtual DbSet AnagGruppis { get; set; } + public virtual DbSet AnagKeyValues { get; set; } + public virtual DbSet AnagOraris { get; set; } + public virtual DbSet AnagProgettis { get; set; } + public virtual DbSet AnagraficaEventis { get; set; } + public virtual DbSet AnagRuolis { get; set; } + public virtual DbSet AnagTipoChecks { get; set; } + public virtual DbSet AnagTipoTimbs { get; set; } + public virtual DbSet CalendFesteFeries { get; set; } + public virtual DbSet Configs { get; set; } + public virtual DbSet Contatoris { get; set; } + public virtual DbSet ControlloDefrags { get; set; } + public virtual DbSet Dipendenti2Ruolis { get; set; } + public virtual DbSet Dipendentis { get; set; } + public virtual DbSet ElencoReports { get; set; } + public virtual DbSet Funzionis { get; set; } + public virtual DbSet Giustificativis { get; set; } + public virtual DbSet ImportEgalteches { get; set; } + public virtual DbSet ImportEgaltechFases { get; set; } + public virtual DbSet ImportEgaltechNews { get; set; } + public virtual DbSet ListValues { get; set; } + public virtual DbSet LogAttivita { get; set; } + public virtual DbSet LogUpdateDbs { get; set; } + public virtual DbSet OreMensiliExports { get; set; } + public virtual DbSet PeriodiLavs { get; set; } + public virtual DbSet Permessi2Funziones { get; set; } + public virtual DbSet Permessis { get; set; } + public virtual DbSet RegAttivita { get; set; } + public virtual DbSet RegAttivitaEgals { get; set; } + public virtual DbSet RegAttivitaExpls { get; set; } + public virtual DbSet RegistroEventis { get; set; } + public virtual DbSet RilievoTemps { get; set; } + public virtual DbSet Sottoscrizionis { get; set; } + public virtual DbSet StoricoAnagFasis { get; set; } + public virtual DbSet StoricoAnagProgettis { get; set; } + public virtual DbSet TabWols { get; set; } + public virtual DbSet Tallies { get; set; } + public virtual DbSet TimbratureExpls { get; set; } + public virtual DbSet Timbratures { get; set; } + public virtual DbSet TransizioneEventis { get; set; } + + #endregion Public Properties + + #region Private Methods + + partial void OnModelCreatingPartial(ModelBuilder modelBuilder); + + #endregion Private Methods + + #region Protected Methods + + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + if (!optionsBuilder.IsConfigured) + { + optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=GPW;Trusted_Connection=True;"); + } + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + modelBuilder.HasAnnotation("Relational:Collation", "Latin1_General_CI_AS"); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CodClasse); + + entity.ToTable("AnagClassiOrarie"); + + entity.Property(e => e.CodClasse) + .HasMaxLength(10) + .HasColumnName("codClasse") + .HasComment("codice univoco"); + + entity.Property(e => e.DescrClasse) + .HasMaxLength(250) + .HasColumnName("descrClasse"); + + entity.Property(e => e.Peso) + .HasColumnType("decimal(6, 3)") + .HasColumnName("peso") + .HasComment("peso (per calcolo ore \"produttive\")"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxCliente); + + entity.ToTable("AnagClienti"); + + entity.Property(e => e.IdxCliente).HasColumnName("idxCliente"); + + entity.Property(e => e.Attivo).HasDefaultValueSql("((1))"); + + entity.Property(e => e.Cap) + .HasMaxLength(5) + .HasColumnName("CAP"); + + entity.Property(e => e.Cf) + .HasMaxLength(20) + .HasColumnName("CF"); + + entity.Property(e => e.Citta) + .HasMaxLength(50) + .HasColumnName("citta"); + + entity.Property(e => e.CodExt) + .HasMaxLength(50) + .HasColumnName("codExt") + .HasDefaultValueSql("('n.d.')") + .HasComment("codice esterno"); + + entity.Property(e => e.Email) + .HasMaxLength(50) + .HasColumnName("email"); + + entity.Property(e => e.Indirizzo) + .HasMaxLength(50) + .HasColumnName("indirizzo"); + + entity.Property(e => e.LogoUrl) + .HasMaxLength(50) + .HasColumnName("logoUrl"); + + entity.Property(e => e.Nota) + .HasMaxLength(500) + .HasColumnName("nota"); + + entity.Property(e => e.OldIdx).HasDefaultValueSql("((-1))"); + + entity.Property(e => e.PIva) + .HasMaxLength(20) + .HasColumnName("pIva"); + + entity.Property(e => e.Prov) + .HasMaxLength(50) + .HasColumnName("prov"); + + entity.Property(e => e.RagSociale).HasMaxLength(250); + + entity.Property(e => e.Tel) + .HasMaxLength(50) + .HasColumnName("tel"); + + entity.Property(e => e.Url) + .HasMaxLength(50) + .HasColumnName("url"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxDevice); + + entity.Property(e => e.DataOraEnabled) + .HasColumnType("datetime") + .HasColumnName("dataOraEnabled"); + + entity.Property(e => e.DataOraLastSeen) + .HasColumnType("datetime") + .HasColumnName("dataOraLastSeen"); + + entity.Property(e => e.Description).HasMaxLength(500); + + entity.Property(e => e.DeviceName) + .IsRequired() + .HasMaxLength(50); + + entity.Property(e => e.DeviceSecret) + .IsRequired() + .HasMaxLength(500); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.LastIpv4) + .HasMaxLength(15) + .HasColumnName("lastIPv4"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxFase); + + entity.ToTable("AnagFasi"); + + entity.HasIndex(e => new { e.IdxProgetto, e.Attivo }, "ix_AnagFasi_idxProgetto_Attivo"); + + entity.Property(e => e.IdxFase).HasColumnName("idxFase"); + + entity.Property(e => e.Attivo) + .IsRequired() + .HasDefaultValueSql("((1))"); + + entity.Property(e => e.BudgetMoney) + .HasColumnType("decimal(19, 4)") + .HasColumnName("budgetMoney"); + + entity.Property(e => e.BudgetTime) + .HasColumnType("decimal(19, 4)") + .HasColumnName("budgetTime") + .HasComment("Budget del progetto (in ore)"); + + entity.Property(e => e.CodClasse) + .HasMaxLength(10) + .HasColumnName("codClasse") + .HasComment("codice univoco"); + + entity.Property(e => e.CodExt) + .HasMaxLength(50) + .HasColumnName("codExt") + .HasComment("codice esterno"); + + entity.Property(e => e.CodFase) + .IsRequired() + .HasMaxLength(250) + .HasColumnName("codFase") + .HasComment("codice fase gerarchico (F.1.2. = Fase 1, sottofase 2) - aggiornare con trigger!"); + + entity.Property(e => e.DescrizioneFase) + .HasMaxLength(250) + .HasColumnName("descrizioneFase"); + + entity.Property(e => e.EnableMoney) + .HasColumnName("enableMoney") + .HasDefaultValueSql("((0))") + .HasComment("indica se sia abilitata o meno a ricevere assegnazioni di record di spesa"); + + entity.Property(e => e.EnableTime) + .HasColumnName("enableTime") + .HasDefaultValueSql("((0))") + .HasComment("indica se sia abilitata o meno a ricevere assegnazioni di record temporali"); + + entity.Property(e => e.IdxFaseAncest) + .HasColumnName("idxFaseAncest") + .HasComment("fase ANCESTOR (contenitore), 0 = è top level"); + + entity.Property(e => e.IdxProgetto).HasColumnName("idxProgetto"); + + entity.Property(e => e.NomeFase) + .HasMaxLength(250) + .HasColumnName("nomeFase"); + + entity.HasOne(d => d.CodClasseNavigation) + .WithMany(p => p.AnagFasis) + .HasForeignKey(d => d.CodClasse) + .HasConstraintName("FK_AnagFasi_AnagClassiOrarie"); + + entity.HasOne(d => d.IdxProgettoNavigation) + .WithMany(p => p.AnagFasis) + .HasForeignKey(d => d.IdxProgetto) + .HasConstraintName("FK_AnagFasi_AnagProgetti"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CodGiust); + + entity.ToTable("AnagGiust"); + + entity.Property(e => e.CodGiust) + .HasMaxLength(5) + .HasColumnName("codGiust"); + + entity.Property(e => e.Descrizione) + .HasMaxLength(50) + .HasColumnName("descrizione"); + + entity.Property(e => e.UserSelectable) + .HasColumnName("userSelectable") + .HasDefaultValueSql("((1))"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Gruppo); + + entity.ToTable("AnagGruppi"); + + entity.Property(e => e.Gruppo) + .HasMaxLength(50) + .HasColumnName("gruppo"); + + entity.Property(e => e.CodExt) + .HasMaxLength(4) + .HasColumnName("codExt"); + + entity.Property(e => e.DescrGruppo) + .HasMaxLength(50) + .HasColumnName("descrGruppo"); + + entity.Property(e => e.ExportEnab) + .HasColumnName("exportEnab") + .HasDefaultValueSql("((1))") + .HasComment("determina se sia abilitato x export dati"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.NomeVar); + + entity.ToTable("AnagKeyValue"); + + entity.Property(e => e.NomeVar) + .HasMaxLength(50) + .HasColumnName("nomeVar"); + + entity.Property(e => e.Descrizione) + .HasMaxLength(250) + .HasColumnName("descrizione") + .HasDefaultValueSql("('-')"); + + entity.Property(e => e.ValFloat) + .HasColumnName("valFloat") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.ValInt) + .HasColumnName("valInt") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.ValString) + .HasMaxLength(250) + .HasColumnName("valString") + .HasDefaultValueSql("('')"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CodOrario); + + entity.ToTable("AnagOrari"); + + entity.Property(e => e.CodOrario) + .HasMaxLength(50) + .HasColumnName("codOrario"); + + entity.Property(e => e.ArrotMinuti) + .HasColumnName("arrotMinuti") + .HasDefaultValueSql("((1))"); + + entity.Property(e => e.AutoCompOreOrd) + .HasColumnName("autoCompOreOrd") + .HasComment("indica se ci sia compensazione automatica delle ore (ordinarie) lavorate (prelevando da straordinarie)"); + + entity.Property(e => e.ChkFun) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("chkFun") + .HasDefaultValueSql("('')") + .HasComment("parametro (opzionale) da passare alla funzione di check \"finale\" per verifica giornate lavorate in tab TimbratureExpl"); + + entity.Property(e => e.DescOrario) + .IsRequired() + .HasMaxLength(250) + .HasColumnName("descOrario") + .HasDefaultValueSql("('--descrizione--')"); + + entity.Property(e => e.OraFine1).HasColumnName("oraFine_1"); + + entity.Property(e => e.OraFine2).HasColumnName("oraFine_2"); + + entity.Property(e => e.OraFine3).HasColumnName("oraFine_3"); + + entity.Property(e => e.OraInizio1).HasColumnName("oraInizio_1"); + + entity.Property(e => e.OraInizio2).HasColumnName("oraInizio_2"); + + entity.Property(e => e.OraInizio3).HasColumnName("oraInizio_3"); + + entity.Property(e => e.OreDom).HasColumnName("oreDom"); + + entity.Property(e => e.OreGio).HasColumnName("oreGio"); + + entity.Property(e => e.OreLun).HasColumnName("oreLun"); + + entity.Property(e => e.OreMar).HasColumnName("oreMar"); + + entity.Property(e => e.OreMer).HasColumnName("oreMer"); + + entity.Property(e => e.OreOrdSett) + .HasColumnName("oreOrdSett") + .HasComputedColumnSql("(((((([oreLun]+[oreMar])+[oreMer])+[oreGio])+[oreVen])+[oreSab])+[oreDom])", false); + + entity.Property(e => e.OreSab).HasColumnName("oreSab"); + + entity.Property(e => e.OreStraordAss).HasColumnName("oreStraordAss"); + + entity.Property(e => e.OreVen).HasColumnName("oreVen"); + + entity.Property(e => e.TipoCompens) + .IsRequired() + .HasMaxLength(2) + .HasColumnName("tipoCompens") + .HasDefaultValueSql("('M')") + .HasComment("indica il tipo di compensazione automatica delle ore --> M = mese, W = settimana"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxProgetto); + + entity.ToTable("AnagProgetti"); + + entity.Property(e => e.IdxProgetto).HasColumnName("idxProgetto"); + + entity.Property(e => e.Attivo) + .IsRequired() + .HasDefaultValueSql("((1))"); + + entity.Property(e => e.Avvio) + .HasColumnType("datetime") + .HasColumnName("avvio") + .HasDefaultValueSql("(getdate())"); + + entity.Property(e => e.Chiusura) + .HasColumnType("datetime") + .HasColumnName("chiusura") + .HasDefaultValueSql("(dateadd(year,(10),getdate()))"); + + entity.Property(e => e.CodExt) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("codExt") + .HasDefaultValueSql("('')") + .HasComment("codice esterno"); + + entity.Property(e => e.DescrProj) + .IsRequired() + .HasMaxLength(250) + .HasColumnName("descrProj") + .HasDefaultValueSql("('-')"); + + entity.Property(e => e.Gruppo) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("gruppo") + .HasDefaultValueSql("('STEAMWARE')"); + + entity.Property(e => e.IdxCliente).HasColumnName("idxCliente"); + + entity.Property(e => e.NomeProj) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("nomeProj"); + + entity.Property(e => e.Starred).HasColumnName("starred"); + + entity.HasOne(d => d.IdxClienteNavigation) + .WithMany(p => p.AnagProgettis) + .HasForeignKey(d => d.IdxCliente) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_AnagProgetti_AnagClienti"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CodRuolo); + + entity.ToTable("AnagRuoli"); + + entity.Property(e => e.CodRuolo).HasMaxLength(50); + + entity.Property(e => e.DescrRuolo).HasMaxLength(50); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.ChkFun); + + entity.ToTable("AnagTipoCheck"); + + entity.Property(e => e.ChkFun) + .HasMaxLength(50) + .HasColumnName("chkFun"); + + entity.Property(e => e.DescrFun) + .HasMaxLength(50) + .HasColumnName("descrFun"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CodTipoTimb); + + entity.ToTable("AnagTipoTimb"); + + entity.Property(e => e.CodTipoTimb).HasMaxLength(10); + + entity.Property(e => e.DescrTipoTimb).HasMaxLength(500); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxTipoEvento); + + entity.ToTable("AnagraficaEventi"); + + entity.Property(e => e.IdxTipoEvento).ValueGeneratedNever(); + + entity.Property(e => e.Nome).HasMaxLength(50); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Data); + + entity.ToTable("CalendFesteFerie"); + + entity.Property(e => e.Data) + .HasColumnType("date") + .HasColumnName("data"); + + entity.Property(e => e.CodGiust) + .IsRequired() + .HasMaxLength(5) + .HasColumnName("codGiust") + .HasDefaultValueSql("('FEST')"); + + entity.Property(e => e.Descrizione) + .HasMaxLength(50) + .HasColumnName("descrizione"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Chiave); + + entity.ToTable("Config"); + + entity.Property(e => e.Chiave) + .HasMaxLength(50) + .HasColumnName("chiave"); + + entity.Property(e => e.Note) + .HasMaxLength(250) + .HasColumnName("note"); + + entity.Property(e => e.Valore) + .HasMaxLength(250) + .HasColumnName("valore"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CodContatore); + + entity.ToTable("Contatori"); + + entity.Property(e => e.CodContatore) + .HasMaxLength(50) + .HasColumnName("codContatore") + .HasComment("codice di un contatore per uso specifico cliente"); + + entity.Property(e => e.Valore).HasColumnName("valore"); + }); + + modelBuilder.Entity(entity => + { + entity.HasNoKey(); + + entity.ToTable("ControlloDefrag"); + + entity.Property(e => e.AvgFragmentationInPercent) + .HasColumnType("decimal(5, 2)") + .HasColumnName("avg_fragmentation_in_percent"); + + entity.Property(e => e.CmdRebuild) + .HasMaxLength(410) + .HasColumnName("cmdREBUILD"); + + entity.Property(e => e.CmdReorganize) + .HasMaxLength(413) + .HasColumnName("cmdREORGANIZE"); + + entity.Property(e => e.Data).HasColumnType("datetime"); + + entity.Property(e => e.Db) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("DB"); + + entity.Property(e => e.FillFactor).HasColumnName("Fill_Factor"); + + entity.Property(e => e.IndexName) + .HasMaxLength(128) + .HasColumnName("index_name"); + + entity.Property(e => e.Oggetto) + .HasMaxLength(257) + .HasColumnName("oggetto"); + + entity.Property(e => e.PageCount).HasColumnName("page_count"); + + entity.Property(e => e.TypeDesc) + .HasMaxLength(60) + .HasColumnName("type_desc"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxDipendente); + + entity.ToTable("Dipendenti"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.Attivo) + .HasColumnName("attivo") + .HasDefaultValueSql("((1))"); + + entity.Property(e => e.AuthKey) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("authKey") + .HasDefaultValueSql("('##########')"); + + entity.Property(e => e.Cf) + .IsRequired() + .HasMaxLength(16) + .HasColumnName("CF") + .HasDefaultValueSql("('0000000000000000')"); + + entity.Property(e => e.CodDipendenteExt) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("codDipendenteExt") + .HasDefaultValueSql("('')") + .HasComment("nome/codice dipendente per sistema esterno da importare"); + + entity.Property(e => e.CodHw) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("codHw") + .HasDefaultValueSql("('')"); + + entity.Property(e => e.CodOrario) + .HasMaxLength(50) + .HasColumnName("codOrario"); + + entity.Property(e => e.Cognome).HasMaxLength(50); + + entity.Property(e => e.DataAssunzione) + .HasColumnType("date") + .HasColumnName("dataAssunzione") + .HasDefaultValueSql("('1900-01-01')"); + + entity.Property(e => e.DataCessazione) + .HasColumnType("date") + .HasColumnName("dataCessazione") + .HasDefaultValueSql("('9999-12-31')"); + + entity.Property(e => e.DataNascita) + .HasColumnType("datetime") + .HasColumnName("dataNascita"); + + entity.Property(e => e.Dominio) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("dominio") + .HasDefaultValueSql("('DOMINIO')"); + + entity.Property(e => e.Email) + .IsRequired() + .HasMaxLength(250) + .HasColumnName("email") + .HasDefaultValueSql("('')"); + + entity.Property(e => e.Gruppo) + .HasMaxLength(50) + .HasColumnName("gruppo") + .HasDefaultValueSql("('NA')"); + + entity.Property(e => e.LuogoNascita) + .HasMaxLength(50) + .HasColumnName("luogoNascita"); + + entity.Property(e => e.MailDay) + .HasColumnName("mailDay") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MailLastOp) + .HasColumnName("mailLastOp") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MailMonth) + .HasColumnName("mailMonth") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MailWeek) + .HasColumnName("mailWeek") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.Matricola) + .HasMaxLength(50) + .HasColumnName("matricola"); + + entity.Property(e => e.NazNascita) + .HasMaxLength(50) + .HasColumnName("nazNascita"); + + entity.Property(e => e.Nome).HasMaxLength(50); + + entity.Property(e => e.NumAuth) + .HasColumnName("numAuth") + .HasDefaultValueSql("((0))") + .HasComment("numero di impieghi della authKey"); + + entity.Property(e => e.ProvNascita) + .HasMaxLength(50) + .HasColumnName("provNascita"); + + entity.Property(e => e.Utente) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("utente") + .HasDefaultValueSql("('UTENTE')"); + + entity.Property(e => e.WolMac) + .HasMaxLength(50) + .HasColumnName("WOL_MAC"); + + entity.HasOne(d => d.CodOrarioNavigation) + .WithMany(p => p.Dipendentis) + .HasForeignKey(d => d.CodOrario) + .HasConstraintName("FK_Dipendenti_AnagOrari"); + + entity.HasOne(d => d.GruppoNavigation) + .WithMany(p => p.Dipendentis) + .HasForeignKey(d => d.Gruppo) + .HasConstraintName("FK_Dipendenti_AnagGruppi"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.IdxDipendente, e.CodRuolo }); + + entity.ToTable("Dipendenti2Ruoli"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.CodRuolo).HasMaxLength(50); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxRep); + + entity.ToTable("ElencoReport"); + + entity.Property(e => e.Area) + .IsRequired() + .HasMaxLength(10) + .HasDefaultValueSql("(N'A1')"); + + entity.Property(e => e.CssClass) + .HasMaxLength(250) + .HasColumnName("cssClass"); + + entity.Property(e => e.Descrizione) + .HasMaxLength(250) + .HasColumnName("descrizione"); + + entity.Property(e => e.Nome) + .HasMaxLength(50) + .HasColumnName("nome"); + + entity.Property(e => e.ReportUrl).HasMaxLength(500); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Funzione); + + entity.ToTable("Funzioni"); + + entity.Property(e => e.Funzione) + .HasMaxLength(50) + .HasColumnName("funzione"); + + entity.Property(e => e.Descrizione) + .HasMaxLength(250) + .HasColumnName("descrizione"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.DataLav, e.IdxDipendente, e.CodGiust }); + + entity.ToTable("Giustificativi"); + + entity.Property(e => e.DataLav) + .HasColumnType("date") + .HasColumnName("dataLav"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.CodGiust) + .HasMaxLength(5) + .HasColumnName("codGiust"); + + entity.Property(e => e.Automatico) + .HasColumnName("automatico") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.Minuti).HasColumnName("minuti"); + + entity.HasOne(d => d.CodGiustNavigation) + .WithMany(p => p.Giustificativis) + .HasForeignKey(d => d.CodGiust) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_Giustificativi_AnagGiust"); + }); + + modelBuilder.Entity(entity => + { + entity.HasNoKey(); + + entity.ToTable("ImportEgaltech"); + + entity.Property(e => e.Commessa).HasMaxLength(50); + + entity.Property(e => e.Data).HasColumnType("date"); + + entity.Property(e => e.DescRisultato).HasMaxLength(50); + + entity.Property(e => e.Fase).HasMaxLength(50); + + entity.Property(e => e.FlgCaricato).HasColumnName("flgCaricato"); + + entity.Property(e => e.IdxRiga).ValueGeneratedOnAdd(); + + entity.Property(e => e.NOre) + .HasColumnType("decimal(18, 4)") + .HasColumnName("nOre"); + + entity.Property(e => e.Note).HasMaxLength(400); + }); + + modelBuilder.Entity(entity => + { + entity.HasNoKey(); + + entity.ToTable("ImportEgaltechFase"); + + entity.Property(e => e.DescFase) + .IsRequired() + .HasMaxLength(50); + + entity.Property(e => e.Fase) + .IsRequired() + .HasMaxLength(10); + }); + + modelBuilder.Entity(entity => + { + entity.HasNoKey(); + + entity.ToTable("ImportEgaltechNew"); + + entity.Property(e => e.Commessa).HasMaxLength(50); + + entity.Property(e => e.Data).HasColumnType("date"); + + entity.Property(e => e.DescRisultato).HasMaxLength(50); + + entity.Property(e => e.Fase).HasMaxLength(50); + + entity.Property(e => e.FlgCaricato).HasColumnName("flgCaricato"); + + entity.Property(e => e.IdxRiga).ValueGeneratedOnAdd(); + + entity.Property(e => e.NOre) + .HasColumnType("decimal(18, 4)") + .HasColumnName("nOre"); + + entity.Property(e => e.Note).HasMaxLength(400); + + entity.Property(e => e.SottoFase).HasMaxLength(50); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.TableName, e.FieldName, e.Value }) + .HasName("PK_ListValues_1"); + + entity.Property(e => e.TableName).HasMaxLength(50); + + entity.Property(e => e.FieldName).HasMaxLength(50); + + entity.Property(e => e.Value) + .HasMaxLength(10) + .HasColumnName("value"); + + entity.Property(e => e.Label) + .HasMaxLength(50) + .HasColumnName("label"); + + entity.Property(e => e.Ordinal) + .HasColumnName("ordinal") + .HasDefaultValueSql("((0))"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.DataOra); + + entity.Property(e => e.DataOra).HasColumnType("datetime"); + + entity.Property(e => e.Fonte) + .HasMaxLength(50) + .HasColumnName("fonte"); + + entity.Property(e => e.Valore) + .HasMaxLength(500) + .HasColumnName("valore"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Versione); + + entity.ToTable("LogUpdateDb"); + + entity.Property(e => e.Versione).ValueGeneratedNever(); + + entity.Property(e => e.Data).HasColumnType("datetime"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.IdxDipendente, e.DataLav }); + + entity.ToTable("oreMensiliExport", "export"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.DataLav) + .HasColumnType("date") + .HasColumnName("dataLav"); + + entity.Property(e => e.CodExt) + .HasMaxLength(4) + .HasColumnName("codExt"); + + entity.Property(e => e.Matricola) + .HasMaxLength(50) + .HasColumnName("matricola"); + + entity.Property(e => e.MinFerieExp).HasColumnName("minFerieExp"); + + entity.Property(e => e.MinFestExp).HasColumnName("minFestExp"); + + entity.Property(e => e.MinLavOrdExp).HasColumnName("minLavOrdExp"); + + entity.Property(e => e.MinLavStra).HasColumnName("minLavStra"); + + entity.Property(e => e.MinLavTot).HasColumnName("minLavTot"); + + entity.Property(e => e.MinMalExp).HasColumnName("minMalExp"); + + entity.Property(e => e.MinPermExp).HasColumnName("minPermExp"); + + entity.Property(e => e.MinPrevExp).HasColumnName("minPrevExp"); + + entity.Property(e => e.MinStraExp).HasColumnName("minStraExp"); + + entity.Property(e => e.MinStraProgrMese).HasColumnName("minStraProgrMese"); + + entity.Property(e => e.OreStraordAss).HasColumnName("oreStraordAss"); + + entity.Property(e => e.RifDitta).HasMaxLength(3); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.IdxDipendente, e.Entrata }); + + entity.ToTable("PeriodiLav"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.Entrata) + .HasColumnType("datetime") + .HasColumnName("entrata"); + + entity.Property(e => e.RowNum).HasColumnName("rowNum"); + + entity.Property(e => e.Uscita) + .HasColumnType("datetime") + .HasColumnName("uscita"); + + entity.HasOne(d => d.IdxDipendenteNavigation) + .WithMany(p => p.PeriodiLavs) + .HasForeignKey(d => d.IdxDipendente) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_PeriodiLav_Dipendenti"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CodPermesso); + + entity.ToTable("Permessi"); + + entity.Property(e => e.CodPermesso) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("COD_PERMESSO"); + + entity.Property(e => e.Descrizione) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("DESCRIZIONE"); + + entity.Property(e => e.Gruppo).HasColumnName("GRUPPO"); + + entity.Property(e => e.Nome) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("NOME"); + + entity.Property(e => e.Numero).HasColumnName("NUMERO"); + + entity.Property(e => e.Url) + .IsRequired() + .HasMaxLength(250) + .IsUnicode(false) + .HasColumnName("URL"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.CodPermesso, e.CodFunzione }); + + entity.ToTable("Permessi2Funzione"); + + entity.Property(e => e.CodPermesso) + .HasMaxLength(50) + .IsUnicode(false) + .HasColumnName("COD_PERMESSO"); + + entity.Property(e => e.CodFunzione) + .HasMaxLength(31) + .HasColumnName("COD_FUNZIONE"); + + entity.Property(e => e.Readwrite) + .HasMaxLength(1) + .IsUnicode(false) + .HasColumnName("READWRITE") + .IsFixedLength(true); + + entity.HasOne(d => d.CodPermessoNavigation) + .WithMany(p => p.Permessi2Funziones) + .HasForeignKey(d => d.CodPermesso) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_Permessi2Funzione_Permessi"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxRa); + + entity.ToTable("RegAttivitaEgal"); + + entity.Property(e => e.IdxRa).HasColumnName("idxRA"); + + entity.Property(e => e.Descrizione) + .HasMaxLength(500) + .HasColumnName("descrizione"); + + entity.Property(e => e.Fine) + .HasColumnType("datetime") + .HasColumnName("fine"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.IdxFase).HasColumnName("idxFase"); + + entity.Property(e => e.Importo) + .HasColumnType("decimal(19, 4)") + .HasColumnName("importo") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.Inizio) + .HasColumnType("datetime") + .HasColumnName("inizio"); + + entity.Property(e => e.OreTot) + .HasColumnType("decimal(19, 4)") + .HasColumnName("oreTot") + .HasComputedColumnSql("([dbo].[f_hourInterval]([inizio],[fine]))", false); + + entity.HasOne(d => d.IdxDipendenteNavigation) + .WithMany(p => p.RegAttivitaEgals) + .HasForeignKey(d => d.IdxDipendente) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_RegAttivita2_Dipendenti"); + + entity.HasOne(d => d.IdxFaseNavigation) + .WithMany(p => p.RegAttivitaEgals) + .HasForeignKey(d => d.IdxFase) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_RegAttivita2_AnagFasi"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.DataLav, e.IdxDipendente }); + + entity.ToTable("RegAttivitaExpl"); + + entity.Property(e => e.DataLav) + .HasColumnType("date") + .HasColumnName("dataLav"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.CognomeNome) + .HasMaxLength(100) + .HasDefaultValueSql("('')"); + + entity.Property(e => e.DescrProj) + .HasMaxLength(500) + .HasColumnName("descrProj") + .HasDefaultValueSql("('')"); + + entity.Property(e => e.MinRegAtt) + .HasColumnName("minRegAtt") + .HasDefaultValueSql("((0))") + .HasComment("totale dei minuti di attività registrate per la giornata (da trigger suRegAttivita)"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxRa); + + entity.HasIndex(e => e.Inizio, "ix_RA_inizio"); + + entity.HasIndex(e => new { e.IdxDipendente, e.Inizio }, "ix_idxDip"); + + entity.HasIndex(e => new { e.IdxFase, e.Inizio }, "ix_idxFase"); + + entity.HasIndex(e => new { e.Inizio, e.IdxDipendente }, "ix_inizio"); + + entity.Property(e => e.IdxRa).HasColumnName("idxRA"); + + entity.Property(e => e.Descrizione) + .HasMaxLength(500) + .HasColumnName("descrizione"); + + entity.Property(e => e.Fine) + .HasColumnType("datetime") + .HasColumnName("fine"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.IdxFase).HasColumnName("idxFase"); + + entity.Property(e => e.Importo) + .HasColumnType("decimal(19, 4)") + .HasColumnName("importo") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.Inizio) + .HasColumnType("datetime") + .HasColumnName("inizio"); + + entity.Property(e => e.OreTot) + .HasColumnType("decimal(19, 4)") + .HasColumnName("oreTot") + .HasComputedColumnSql("([dbo].[f_hourInterval]([inizio],[fine]))", false) + .HasComment("([dbo].[f_hourInterval]([inizio],[fine]))"); + + entity.HasOne(d => d.IdxDipendenteNavigation) + .WithMany(p => p.RegAttivita) + .HasForeignKey(d => d.IdxDipendente) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_RegAttivita_Dipendenti"); + + entity.HasOne(d => d.IdxFaseNavigation) + .WithMany(p => p.RegAttivita) + .HasForeignKey(d => d.IdxFase) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_RegAttivita_AnagFasi"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.DataOra, e.Evento }); + + entity.ToTable("RegistroEventi"); + + entity.Property(e => e.DataOra).HasColumnType("datetime"); + + entity.Property(e => e.Evento) + .HasMaxLength(50) + .HasColumnName("evento"); + + entity.Property(e => e.Commento) + .HasMaxLength(250) + .HasColumnName("commento"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.IdxDipendente, e.DtRilievo }); + + entity.ToTable("RilievoTemp"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.DtRilievo) + .HasColumnType("datetime") + .HasColumnName("dtRilievo"); + + entity.Property(e => e.TempRil) + .HasColumnType("decimal(9, 3)") + .HasColumnName("tempRil"); + + entity.HasOne(d => d.IdxDipendenteNavigation) + .WithMany(p => p.RilievoTemps) + .HasForeignKey(d => d.IdxDipendente) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_RilievoTemp_Dipendenti"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.SubscriptionId) + .HasName("PK__Sottoscr__9A2B24BD00200768"); + + entity.ToTable("Sottoscrizioni"); + + entity.Property(e => e.SubscriptionId) + .ValueGeneratedNever() + .HasColumnName("SubscriptionID"); + + entity.Property(e => e.DataFine).HasColumnType("smalldatetime"); + + entity.Property(e => e.DataInizio).HasColumnType("smalldatetime"); + + entity.Property(e => e.EMail) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("eMail"); + + entity.Property(e => e.Format) + .IsRequired() + .HasMaxLength(20); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.SubscriptionName) + .IsRequired() + .HasMaxLength(50); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxEv); + + entity.ToTable("Storico_AnagFasi"); + + entity.Property(e => e.IdxEv).HasColumnName("idxEv"); + + entity.Property(e => e.Attivo).HasDefaultValueSql("((1))"); + + entity.Property(e => e.BudgetMoney) + .HasColumnType("decimal(19, 4)") + .HasColumnName("budgetMoney"); + + entity.Property(e => e.BudgetTime) + .HasColumnType("decimal(19, 4)") + .HasColumnName("budgetTime") + .HasComment("Budget del progetto (in ore)"); + + entity.Property(e => e.CodClasse) + .HasMaxLength(10) + .HasColumnName("codClasse") + .HasComment("codice univoco"); + + entity.Property(e => e.CodExt) + .HasMaxLength(50) + .HasColumnName("codExt") + .HasComment("codice esterno"); + + entity.Property(e => e.CodFase) + .HasMaxLength(250) + .HasColumnName("codFase") + .HasComment("codice fase gerarchico (F.1.2. = Fase 1, sottofase 2) - aggiornare con trigger!"); + + entity.Property(e => e.DataEv).HasColumnType("datetime"); + + entity.Property(e => e.DescrizioneFase) + .HasMaxLength(250) + .HasColumnName("descrizioneFase"); + + entity.Property(e => e.EnableMoney) + .HasColumnName("enableMoney") + .HasDefaultValueSql("((0))") + .HasComment("indica se sia abilitata o meno a ricevere assegnazioni di record di spesa"); + + entity.Property(e => e.EnableTime) + .HasColumnName("enableTime") + .HasDefaultValueSql("((0))") + .HasComment("indica se sia abilitata o meno a ricevere assegnazioni di record temporali"); + + entity.Property(e => e.IdxFase).HasColumnName("idxFase"); + + entity.Property(e => e.IdxFaseAncest) + .HasColumnName("idxFaseAncest") + .HasDefaultValueSql("((0))") + .HasComment("fase ANCESTOR (contenitore), 0 = è top level"); + + entity.Property(e => e.IdxProgetto).HasColumnName("idxProgetto"); + + entity.Property(e => e.NomeFase) + .HasMaxLength(250) + .HasColumnName("nomeFase"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxEv); + + entity.ToTable("Storico_AnagProgetti"); + + entity.Property(e => e.IdxEv).HasColumnName("idxEv"); + + entity.Property(e => e.Attivo).HasDefaultValueSql("((1))"); + + entity.Property(e => e.Avvio) + .HasColumnType("datetime") + .HasColumnName("avvio"); + + entity.Property(e => e.Chiusura) + .HasColumnType("datetime") + .HasColumnName("chiusura"); + + entity.Property(e => e.CodExt) + .HasMaxLength(50) + .HasColumnName("codExt") + .HasComment("codice esterno"); + + entity.Property(e => e.DataEv).HasColumnType("datetime"); + + entity.Property(e => e.DescrProj) + .HasMaxLength(250) + .HasColumnName("descrProj"); + + entity.Property(e => e.Gruppo) + .HasMaxLength(50) + .HasColumnName("gruppo") + .HasDefaultValueSql("('STEAMWARE')"); + + entity.Property(e => e.IdxCliente).HasColumnName("idxCliente"); + + entity.Property(e => e.IdxProgetto).HasColumnName("idxProgetto"); + + entity.Property(e => e.NomeProj) + .HasMaxLength(50) + .HasColumnName("nomeProj"); + + entity.Property(e => e.Starred).HasColumnName("starred"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxDipendente); + + entity.ToTable("TabWOL"); + + entity.Property(e => e.IdxDipendente) + .ValueGeneratedNever() + .HasColumnName("idxDipendente"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.N) + .HasName("PK_Tally_N"); + + entity.ToTable("Tally"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.IdxDipendente, e.DataOra }); + + entity.ToTable("Timbrature"); + + entity.HasIndex(e => new { e.IdxDipendente, e.Entrata }, "ix_Timbrature_IdxDip_Entrata"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.DataOra) + .HasColumnType("datetime") + .HasColumnName("dataOra"); + + entity.Property(e => e.Approv) + .HasDefaultValueSql("((0))") + .HasComment("Approvazioen timbratura (default true...)"); + + entity.Property(e => e.CodTipoTimb) + .HasMaxLength(10) + .HasDefaultValueSql("(N'BC')"); + + entity.Property(e => e.Entrata).HasColumnName("entrata"); + + entity.Property(e => e.Ipv4) + .HasMaxLength(15) + .HasColumnName("IPv4") + .HasDefaultValueSql("(N'0.0.0.0')"); + + entity.HasOne(d => d.CodTipoTimbNavigation) + .WithMany(p => p.Timbratures) + .HasForeignKey(d => d.CodTipoTimb) + .HasConstraintName("FK_Timbrature_AnagTipoTimb"); + + entity.HasOne(d => d.IdxDipendenteNavigation) + .WithMany(p => p.Timbratures) + .HasForeignKey(d => d.IdxDipendente) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_Timbrature_Dipendenti"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.DataLav, e.IdxDipendente }) + .HasName("PK_TimbratureExpl_1"); + + entity.ToTable("TimbratureExpl"); + + entity.HasIndex(e => new { e.CognomeNome, e.DataLav }, "ix_TimbrExpl_CognomeNome_DataLav"); + + entity.HasIndex(e => e.IdxDipendente, "ix_idxDip"); + + entity.Property(e => e.DataLav) + .HasColumnType("date") + .HasColumnName("dataLav"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.Block) + .HasColumnName("block") + .HasDefaultValueSql("((0))") + .HasComment("determina se il record sia \"bloccato\" (archiviazione e blocco mesi precedenti...)"); + + entity.Property(e => e.ChkFunCod) + .HasMaxLength(50) + .HasColumnName("chkFunCod") + .HasDefaultValueSql("('')") + .HasComment("eventuale diagnostica da check function sulla riga indicata (codice)"); + + entity.Property(e => e.ChkFunRes) + .HasMaxLength(50) + .HasColumnName("chkFunRes") + .HasDefaultValueSql("('')") + .HasComment("eventuale diagnostica da check function sulla riga indicata (spiegazione)"); + + entity.Property(e => e.CognomeNome).HasMaxLength(100); + + entity.Property(e => e.Entrata1) + .HasColumnType("datetime") + .HasColumnName("entrata_1"); + + entity.Property(e => e.Entrata2) + .HasColumnType("datetime") + .HasColumnName("entrata_2"); + + entity.Property(e => e.Entrata3) + .HasColumnType("datetime") + .HasColumnName("entrata_3"); + + entity.Property(e => e.Entrata4) + .HasColumnType("datetime") + .HasColumnName("entrata_4"); + + entity.Property(e => e.HGiust) + .HasColumnName("h_giust") + .HasComputedColumnSql("(((((((CONVERT([float],[minPerm],(0))+[minFer])+[minMal])+[minFest])+[min104])+[minMpp])+[minCassa])/(60))", false) + .HasComment("totale ore giustificate"); + + entity.Property(e => e.HLav).HasColumnName("h_lav"); + + entity.Property(e => e.IsOk) + .HasColumnName("isOk") + .HasComputedColumnSql("(([isOkTim]&[isOkApp])&case when [minOrd]<=((((((([minLav]+[minPerm])+[minFer])+[minMal])+[minFest])+[minCassa])+[min104])+[minMpp]) then (1) else (0) end)", false); + + entity.Property(e => e.IsOkApp) + .HasColumnName("isOkApp") + .HasDefaultValueSql("((1))") + .HasComment("dato sintetico x indicare se TUTTE le timbrature componenti siano approvate"); + + entity.Property(e => e.IsOkLav) + .HasColumnName("isOkLav") + .HasComputedColumnSql("(case when [minOrd]<=((((((([minLav]+[minPerm])+[minFer])+[minMal])+[minFest])+[minCassa])+[min104])+[minMpp]) then (1) else (0) end)", false) + .HasComment("determina se la giornata sia ok (oreLav + giustificativi >= oreOrd)"); + + entity.Property(e => e.IsOkTim) + .HasColumnName("isOkTim") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.Min104) + .HasColumnName("min104") + .HasDefaultValueSql("((0))") + .HasComment("Minuti Permessi per 104"); + + entity.Property(e => e.MinArcoPres) + .HasColumnName("minArcoPres") + .HasComputedColumnSql("(datediff(minute,isnull([entrata_1],getdate()),isnull(isnull([uscita_4],isnull([uscita_3],isnull([uscita_2],isnull([uscita_1],[entrata_1])))),getdate())))", false) + .HasComment("DATEDIFF(n, ISNULL(entrata_1,GETDATE()), ISNULL(ISNULL(uscita_4,ISNULL(uscita_3,ISNULL(uscita_2,ISNULL(uscita_1,entrata_1)))),GETDATE()))"); + + entity.Property(e => e.MinCassa) + .HasColumnName("minCassa") + .HasDefaultValueSql("((0))") + .HasComment("Minuti di Cassa Integrazione"); + + entity.Property(e => e.MinFer) + .HasColumnName("minFer") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MinFest) + .HasColumnName("minFest") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MinLav) + .HasColumnName("minLav") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MinMal) + .HasColumnName("minMal") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MinMpp) + .HasColumnName("minMpp") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MinNonLav) + .HasColumnName("minNonLav") + .HasDefaultValueSql("((0))") + .HasComment("minuti non lavorati (ovvero se fatti meno di ordinari e senza giustificativi)"); + + entity.Property(e => e.MinOrd) + .HasColumnName("minOrd") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MinPerm) + .HasColumnName("minPerm") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MinStra) + .HasColumnName("minStra") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.TempRil) + .HasColumnType("decimal(9, 3)") + .HasColumnName("tempRil") + .HasComment("Temperatura rilevata"); + + entity.Property(e => e.Uscita1) + .HasColumnType("datetime") + .HasColumnName("uscita_1"); + + entity.Property(e => e.Uscita2) + .HasColumnType("datetime") + .HasColumnName("uscita_2"); + + entity.Property(e => e.Uscita3) + .HasColumnType("datetime") + .HasColumnName("uscita_3"); + + entity.Property(e => e.Uscita4) + .HasColumnType("datetime") + .HasColumnName("uscita_4"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CodInviato); + + entity.ToTable("TransizioneEventi"); + + entity.Property(e => e.CodInviato) + .HasMaxLength(50) + .HasColumnName("codInviato"); + + entity.Property(e => e.DescrComando) + .HasMaxLength(250) + .HasColumnName("descrComando"); + + entity.Property(e => e.PrecCodInviato) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("prec_codInviato") + .HasDefaultValueSql("(N'-')"); + + entity.Property(e => e.Text2show) + .HasMaxLength(500) + .HasColumnName("text2show"); + + entity.HasOne(d => d.IdxTipoEventoNavigation) + .WithMany(p => p.TransizioneEventis) + .HasForeignKey(d => d.IdxTipoEvento) + .HasConstraintName("FK_TransizioneEventi_AnagraficaEventi"); + }); + + OnModelCreatingPartial(modelBuilder); + } + + #endregion Protected Methods + } +} \ No newline at end of file From 4860d364337fd52f8d9c1282e803522138acdb86 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 18 Oct 2021 15:43:57 +0200 Subject: [PATCH 05/10] refresh soluzione --- GPW.Api/GPW.Api.sln | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/GPW.Api/GPW.Api.sln b/GPW.Api/GPW.Api.sln index ef46213..de815ec 100644 --- a/GPW.Api/GPW.Api.sln +++ b/GPW.Api/GPW.Api.sln @@ -3,7 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31727.386 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GPW.Api", "GPW.Api\GPW.Api.csproj", "{EF8D5A17-0D60-4EF0-9262-57AFAC574843}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GPW.Api", "GPW.Api\GPW.Api.csproj", "{EF8D5A17-0D60-4EF0-9262-57AFAC574843}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GPW.Data", "GPW.Data\GPW.Data.csproj", "{E0716E55-CFD3-466E-9919-328B0B7ACD6C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -15,6 +17,10 @@ Global {EF8D5A17-0D60-4EF0-9262-57AFAC574843}.Debug|Any CPU.Build.0 = Debug|Any CPU {EF8D5A17-0D60-4EF0-9262-57AFAC574843}.Release|Any CPU.ActiveCfg = Release|Any CPU {EF8D5A17-0D60-4EF0-9262-57AFAC574843}.Release|Any CPU.Build.0 = Release|Any CPU + {E0716E55-CFD3-466E-9919-328B0B7ACD6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0716E55-CFD3-466E-9919-328B0B7ACD6C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0716E55-CFD3-466E-9919-328B0B7ACD6C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0716E55-CFD3-466E-9919-328B0B7ACD6C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From ac23626fa2b6161471a7724c7161a0ee2aaf5cc8 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 18 Oct 2021 16:36:07 +0200 Subject: [PATCH 06/10] Spostamento classe DCCDecode --- GPW.Api/GPW.Api/Controllers/VC19Controller.cs | 3 ++- GPW.Api/{GPW.Api => GPW.Data}/DCCDecode.cs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) rename GPW.Api/{GPW.Api => GPW.Data}/DCCDecode.cs (94%) diff --git a/GPW.Api/GPW.Api/Controllers/VC19Controller.cs b/GPW.Api/GPW.Api/Controllers/VC19Controller.cs index def2d44..4fb35ee 100644 --- a/GPW.Api/GPW.Api/Controllers/VC19Controller.cs +++ b/GPW.Api/GPW.Api/Controllers/VC19Controller.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Http; +using GPW.Data; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using System; diff --git a/GPW.Api/GPW.Api/DCCDecode.cs b/GPW.Api/GPW.Data/DCCDecode.cs similarity index 94% rename from GPW.Api/GPW.Api/DCCDecode.cs rename to GPW.Api/GPW.Data/DCCDecode.cs index a8de3bf..664931b 100644 --- a/GPW.Api/GPW.Api/DCCDecode.cs +++ b/GPW.Api/GPW.Data/DCCDecode.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; // // This is here so CodeMaid doesn't reorganize this document // -namespace GPW.Api +namespace GPW.Data { public class DCCDecode { @@ -38,14 +38,14 @@ namespace GPW.Api { /// - /// Firstname + /// Cognome /// public string fn { get; set; } public string fnt { get; set; } /// - /// Name + /// Nome /// public string gn { get; set; } From a7b987d09de2e043902fb2a22ff3e2c73f057f00 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 18 Oct 2021 16:36:20 +0200 Subject: [PATCH 07/10] Fix context x metodi necessari --- GPW.Api/GPW.Data/DBModels/GPWContext.cs | 63 --- GPW.Api/GPW.Data/GPWContext.cs | 598 ++++++++++++++---------- 2 files changed, 360 insertions(+), 301 deletions(-) delete mode 100644 GPW.Api/GPW.Data/DBModels/GPWContext.cs diff --git a/GPW.Api/GPW.Data/DBModels/GPWContext.cs b/GPW.Api/GPW.Data/DBModels/GPWContext.cs deleted file mode 100644 index af85638..0000000 --- a/GPW.Api/GPW.Data/DBModels/GPWContext.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Metadata; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class GPWContext : DbContext - { - public GPWContext() - { - } - - public GPWContext(DbContextOptions options) - : base(options) - { - } - - public virtual DbSet CheckVc19s { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - if (!optionsBuilder.IsConfigured) - { -#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263. - optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=GPW;Trusted_Connection=True;"); - } - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - modelBuilder.HasAnnotation("Relational:Collation", "Latin1_General_CI_AS"); - - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.IdxCheck) - .HasName("PK_CheckC19"); - - entity.ToTable("CheckVC19"); - - entity.Property(e => e.IdxCheck).ValueGeneratedNever(); - - entity.Property(e => e.DtCheck) - .HasColumnType("datetime") - .HasColumnName("dtCheck") - .HasDefaultValueSql("(getdate())"); - - entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); - - entity.Property(e => e.Payload) - .IsRequired() - .HasMaxLength(500) - .HasColumnName("payload") - .HasDefaultValueSql("('')"); - }); - - OnModelCreatingPartial(modelBuilder); - } - - partial void OnModelCreatingPartial(ModelBuilder modelBuilder); - } -} diff --git a/GPW.Api/GPW.Data/GPWContext.cs b/GPW.Api/GPW.Data/GPWContext.cs index 9dfa929..dfcf3b8 100644 --- a/GPW.Api/GPW.Data/GPWContext.cs +++ b/GPW.Api/GPW.Data/GPWContext.cs @@ -2,6 +2,9 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata; using GPW.Data.DBModels; +using NLog.Fluent; +using NLog; +using Microsoft.Extensions.Configuration; #nullable disable @@ -9,66 +12,134 @@ namespace GPW.Data { public partial class GPWContext : DbContext { + #region Private Fields + + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + + private IConfiguration _configuration; + + #endregion Private Fields + #region Public Constructors public GPWContext() { } - public GPWContext(DbContextOptions options) - : base(options) + public GPWContext(IConfiguration configuration) { + _configuration = configuration; + } + + public GPWContext(DbContextOptions options) : base(options) + { + try + { + // se non ci fosse... crea o migra! + Database.Migrate(); + } + catch (Exception exc) + { + Log.Error(exc, "Exception during context initialization 02"); + } } #endregion Public Constructors +#if false + public virtual DbSet AnagClassiOraries { get; set; } + + public virtual DbSet AnagClientis { get; set; } + + public virtual DbSet AnagDevices { get; set; } + + public virtual DbSet AnagFasis { get; set; } + + public virtual DbSet AnagGiusts { get; set; } + + public virtual DbSet AnagGruppis { get; set; } + + public virtual DbSet AnagKeyValues { get; set; } + + public virtual DbSet AnagOraris { get; set; } + + public virtual DbSet AnagProgettis { get; set; } + + public virtual DbSet AnagraficaEventis { get; set; } + + public virtual DbSet AnagRuolis { get; set; } + + public virtual DbSet AnagTipoChecks { get; set; } + + public virtual DbSet AnagTipoTimbs { get; set; } + + public virtual DbSet CalendFesteFeries { get; set; } + + public virtual DbSet Configs { get; set; } + + public virtual DbSet Contatoris { get; set; } + + public virtual DbSet ControlloDefrags { get; set; } + + public virtual DbSet Dipendenti2Ruolis { get; set; } + + public virtual DbSet ElencoReports { get; set; } + + public virtual DbSet Funzionis { get; set; } + + public virtual DbSet Giustificativis { get; set; } + + public virtual DbSet ImportEgalteches { get; set; } + + public virtual DbSet ImportEgaltechFases { get; set; } + + public virtual DbSet ImportEgaltechNews { get; set; } + + public virtual DbSet ListValues { get; set; } + + public virtual DbSet LogAttivita { get; set; } + + public virtual DbSet LogUpdateDbs { get; set; } + + public virtual DbSet OreMensiliExports { get; set; } + + public virtual DbSet PeriodiLavs { get; set; } + + public virtual DbSet Permessi2Funziones { get; set; } + + public virtual DbSet Permessis { get; set; } + + public virtual DbSet RegAttivita { get; set; } + + public virtual DbSet RegAttivitaEgals { get; set; } + + public virtual DbSet RegAttivitaExpls { get; set; } + + public virtual DbSet RegistroEventis { get; set; } + + public virtual DbSet RilievoTemps { get; set; } + + public virtual DbSet Sottoscrizionis { get; set; } + + public virtual DbSet StoricoAnagFasis { get; set; } + + public virtual DbSet StoricoAnagProgettis { get; set; } + + public virtual DbSet TabWols { get; set; } + + public virtual DbSet Tallies { get; set; } + + public virtual DbSet TimbratureExpls { get; set; } + + public virtual DbSet TransizioneEventis { get; set; } +#endif + #region Public Properties - public virtual DbSet AnagClassiOraries { get; set; } - public virtual DbSet AnagClientis { get; set; } - public virtual DbSet AnagDevices { get; set; } - public virtual DbSet AnagFasis { get; set; } - public virtual DbSet AnagGiusts { get; set; } - public virtual DbSet AnagGruppis { get; set; } - public virtual DbSet AnagKeyValues { get; set; } - public virtual DbSet AnagOraris { get; set; } - public virtual DbSet AnagProgettis { get; set; } - public virtual DbSet AnagraficaEventis { get; set; } - public virtual DbSet AnagRuolis { get; set; } - public virtual DbSet AnagTipoChecks { get; set; } - public virtual DbSet AnagTipoTimbs { get; set; } - public virtual DbSet CalendFesteFeries { get; set; } - public virtual DbSet Configs { get; set; } - public virtual DbSet Contatoris { get; set; } - public virtual DbSet ControlloDefrags { get; set; } - public virtual DbSet Dipendenti2Ruolis { get; set; } - public virtual DbSet Dipendentis { get; set; } - public virtual DbSet ElencoReports { get; set; } - public virtual DbSet Funzionis { get; set; } - public virtual DbSet Giustificativis { get; set; } - public virtual DbSet ImportEgalteches { get; set; } - public virtual DbSet ImportEgaltechFases { get; set; } - public virtual DbSet ImportEgaltechNews { get; set; } - public virtual DbSet ListValues { get; set; } - public virtual DbSet LogAttivita { get; set; } - public virtual DbSet LogUpdateDbs { get; set; } - public virtual DbSet OreMensiliExports { get; set; } - public virtual DbSet PeriodiLavs { get; set; } - public virtual DbSet Permessi2Funziones { get; set; } - public virtual DbSet Permessis { get; set; } - public virtual DbSet RegAttivita { get; set; } - public virtual DbSet RegAttivitaEgals { get; set; } - public virtual DbSet RegAttivitaExpls { get; set; } - public virtual DbSet RegistroEventis { get; set; } - public virtual DbSet RilievoTemps { get; set; } - public virtual DbSet Sottoscrizionis { get; set; } - public virtual DbSet StoricoAnagFasis { get; set; } - public virtual DbSet StoricoAnagProgettis { get; set; } - public virtual DbSet TabWols { get; set; } - public virtual DbSet Tallies { get; set; } - public virtual DbSet TimbratureExpls { get; set; } - public virtual DbSet Timbratures { get; set; } - public virtual DbSet TransizioneEventis { get; set; } + public virtual DbSet DbSetCheckVc19 { get; set; } + public virtual DbSet DbSetDipendenti { get; set; } + + public virtual DbSet DbSetTimbrature { get; set; } #endregion Public Properties @@ -84,7 +155,15 @@ namespace GPW.Data { if (!optionsBuilder.IsConfigured) { - optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=GPW;Trusted_Connection=True;"); + string connString = _configuration.GetConnectionString("GPW.Data"); + if (!string.IsNullOrEmpty(connString)) + { + optionsBuilder.UseSqlServer(connString); + } + else + { + optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=GPW;Trusted_Connection=True;"); + } } } @@ -92,26 +171,27 @@ namespace GPW.Data { modelBuilder.HasAnnotation("Relational:Collation", "Latin1_General_CI_AS"); +#if false modelBuilder.Entity(entity => - { - entity.HasKey(e => e.CodClasse); + { + entity.HasKey(e => e.CodClasse); - entity.ToTable("AnagClassiOrarie"); + entity.ToTable("AnagClassiOrarie"); - entity.Property(e => e.CodClasse) - .HasMaxLength(10) - .HasColumnName("codClasse") - .HasComment("codice univoco"); + entity.Property(e => e.CodClasse) + .HasMaxLength(10) + .HasColumnName("codClasse") + .HasComment("codice univoco"); - entity.Property(e => e.DescrClasse) - .HasMaxLength(250) - .HasColumnName("descrClasse"); + entity.Property(e => e.DescrClasse) + .HasMaxLength(250) + .HasColumnName("descrClasse"); - entity.Property(e => e.Peso) - .HasColumnType("decimal(6, 3)") - .HasColumnName("peso") - .HasComment("peso (per calcolo ore \"produttive\")"); - }); + entity.Property(e => e.Peso) + .HasColumnType("decimal(6, 3)") + .HasColumnName("peso") + .HasComment("peso (per calcolo ore \"produttive\")"); + }); modelBuilder.Entity(entity => { @@ -625,140 +705,6 @@ namespace GPW.Data .HasColumnName("type_desc"); }); - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.IdxDipendente); - - entity.ToTable("Dipendenti"); - - entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); - - entity.Property(e => e.Attivo) - .HasColumnName("attivo") - .HasDefaultValueSql("((1))"); - - entity.Property(e => e.AuthKey) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("authKey") - .HasDefaultValueSql("('##########')"); - - entity.Property(e => e.Cf) - .IsRequired() - .HasMaxLength(16) - .HasColumnName("CF") - .HasDefaultValueSql("('0000000000000000')"); - - entity.Property(e => e.CodDipendenteExt) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("codDipendenteExt") - .HasDefaultValueSql("('')") - .HasComment("nome/codice dipendente per sistema esterno da importare"); - - entity.Property(e => e.CodHw) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("codHw") - .HasDefaultValueSql("('')"); - - entity.Property(e => e.CodOrario) - .HasMaxLength(50) - .HasColumnName("codOrario"); - - entity.Property(e => e.Cognome).HasMaxLength(50); - - entity.Property(e => e.DataAssunzione) - .HasColumnType("date") - .HasColumnName("dataAssunzione") - .HasDefaultValueSql("('1900-01-01')"); - - entity.Property(e => e.DataCessazione) - .HasColumnType("date") - .HasColumnName("dataCessazione") - .HasDefaultValueSql("('9999-12-31')"); - - entity.Property(e => e.DataNascita) - .HasColumnType("datetime") - .HasColumnName("dataNascita"); - - entity.Property(e => e.Dominio) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("dominio") - .HasDefaultValueSql("('DOMINIO')"); - - entity.Property(e => e.Email) - .IsRequired() - .HasMaxLength(250) - .HasColumnName("email") - .HasDefaultValueSql("('')"); - - entity.Property(e => e.Gruppo) - .HasMaxLength(50) - .HasColumnName("gruppo") - .HasDefaultValueSql("('NA')"); - - entity.Property(e => e.LuogoNascita) - .HasMaxLength(50) - .HasColumnName("luogoNascita"); - - entity.Property(e => e.MailDay) - .HasColumnName("mailDay") - .HasDefaultValueSql("((0))"); - - entity.Property(e => e.MailLastOp) - .HasColumnName("mailLastOp") - .HasDefaultValueSql("((0))"); - - entity.Property(e => e.MailMonth) - .HasColumnName("mailMonth") - .HasDefaultValueSql("((0))"); - - entity.Property(e => e.MailWeek) - .HasColumnName("mailWeek") - .HasDefaultValueSql("((0))"); - - entity.Property(e => e.Matricola) - .HasMaxLength(50) - .HasColumnName("matricola"); - - entity.Property(e => e.NazNascita) - .HasMaxLength(50) - .HasColumnName("nazNascita"); - - entity.Property(e => e.Nome).HasMaxLength(50); - - entity.Property(e => e.NumAuth) - .HasColumnName("numAuth") - .HasDefaultValueSql("((0))") - .HasComment("numero di impieghi della authKey"); - - entity.Property(e => e.ProvNascita) - .HasMaxLength(50) - .HasColumnName("provNascita"); - - entity.Property(e => e.Utente) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("utente") - .HasDefaultValueSql("('UTENTE')"); - - entity.Property(e => e.WolMac) - .HasMaxLength(50) - .HasColumnName("WOL_MAC"); - - entity.HasOne(d => d.CodOrarioNavigation) - .WithMany(p => p.Dipendentis) - .HasForeignKey(d => d.CodOrario) - .HasConstraintName("FK_Dipendenti_AnagOrari"); - - entity.HasOne(d => d.GruppoNavigation) - .WithMany(p => p.Dipendentis) - .HasForeignKey(d => d.Gruppo) - .HasConstraintName("FK_Dipendenti_AnagGruppi"); - }); - modelBuilder.Entity(entity => { entity.HasKey(e => new { e.IdxDipendente, e.CodRuolo }); @@ -1412,47 +1358,6 @@ namespace GPW.Data entity.ToTable("Tally"); }); - modelBuilder.Entity(entity => - { - entity.HasKey(e => new { e.IdxDipendente, e.DataOra }); - - entity.ToTable("Timbrature"); - - entity.HasIndex(e => new { e.IdxDipendente, e.Entrata }, "ix_Timbrature_IdxDip_Entrata"); - - entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); - - entity.Property(e => e.DataOra) - .HasColumnType("datetime") - .HasColumnName("dataOra"); - - entity.Property(e => e.Approv) - .HasDefaultValueSql("((0))") - .HasComment("Approvazioen timbratura (default true...)"); - - entity.Property(e => e.CodTipoTimb) - .HasMaxLength(10) - .HasDefaultValueSql("(N'BC')"); - - entity.Property(e => e.Entrata).HasColumnName("entrata"); - - entity.Property(e => e.Ipv4) - .HasMaxLength(15) - .HasColumnName("IPv4") - .HasDefaultValueSql("(N'0.0.0.0')"); - - entity.HasOne(d => d.CodTipoTimbNavigation) - .WithMany(p => p.Timbratures) - .HasForeignKey(d => d.CodTipoTimb) - .HasConstraintName("FK_Timbrature_AnagTipoTimb"); - - entity.HasOne(d => d.IdxDipendenteNavigation) - .WithMany(p => p.Timbratures) - .HasForeignKey(d => d.IdxDipendente) - .OnDelete(DeleteBehavior.ClientSetNull) - .HasConstraintName("FK_Timbrature_Dipendenti"); - }); - modelBuilder.Entity(entity => { entity.HasKey(e => new { e.DataLav, e.IdxDipendente }) @@ -1633,10 +1538,227 @@ namespace GPW.Data .HasForeignKey(d => d.IdxTipoEvento) .HasConstraintName("FK_TransizioneEventi_AnagraficaEventi"); }); +#endif + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxCheck) + .HasName("PK_CheckC19"); + + entity.ToTable("CheckVC19"); + + entity.Property(e => e.IdxCheck).ValueGeneratedNever(); + + entity.Property(e => e.DtCheck) + .HasColumnType("datetime") + .HasColumnName("dtCheck") + .HasDefaultValueSql("(getdate())"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.Payload) + .IsRequired() + .HasMaxLength(500) + .HasColumnName("payload") + .HasDefaultValueSql("('')"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.IdxDipendente); + + entity.ToTable("Dipendenti"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.Attivo) + .HasColumnName("attivo") + .HasDefaultValueSql("((1))"); + + entity.Property(e => e.AuthKey) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("authKey") + .HasDefaultValueSql("('##########')"); + + entity.Property(e => e.Cf) + .IsRequired() + .HasMaxLength(16) + .HasColumnName("CF") + .HasDefaultValueSql("('0000000000000000')"); + + entity.Property(e => e.CodDipendenteExt) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("codDipendenteExt") + .HasDefaultValueSql("('')") + .HasComment("nome/codice dipendente per sistema esterno da importare"); + + entity.Property(e => e.CodHw) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("codHw") + .HasDefaultValueSql("('')"); + + entity.Property(e => e.CodOrario) + .HasMaxLength(50) + .HasColumnName("codOrario"); + + entity.Property(e => e.Cognome).HasMaxLength(50); + + entity.Property(e => e.DataAssunzione) + .HasColumnType("date") + .HasColumnName("dataAssunzione") + .HasDefaultValueSql("('1900-01-01')"); + + entity.Property(e => e.DataCessazione) + .HasColumnType("date") + .HasColumnName("dataCessazione") + .HasDefaultValueSql("('9999-12-31')"); + + entity.Property(e => e.DataNascita) + .HasColumnType("datetime") + .HasColumnName("dataNascita"); + + entity.Property(e => e.Dominio) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("dominio") + .HasDefaultValueSql("('DOMINIO')"); + + entity.Property(e => e.Email) + .IsRequired() + .HasMaxLength(250) + .HasColumnName("email") + .HasDefaultValueSql("('')"); + + entity.Property(e => e.Gruppo) + .HasMaxLength(50) + .HasColumnName("gruppo") + .HasDefaultValueSql("('NA')"); + + entity.Property(e => e.LuogoNascita) + .HasMaxLength(50) + .HasColumnName("luogoNascita"); + + entity.Property(e => e.MailDay) + .HasColumnName("mailDay") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MailLastOp) + .HasColumnName("mailLastOp") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MailMonth) + .HasColumnName("mailMonth") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.MailWeek) + .HasColumnName("mailWeek") + .HasDefaultValueSql("((0))"); + + entity.Property(e => e.Matricola) + .HasMaxLength(50) + .HasColumnName("matricola"); + + entity.Property(e => e.NazNascita) + .HasMaxLength(50) + .HasColumnName("nazNascita"); + + entity.Property(e => e.Nome).HasMaxLength(50); + + entity.Property(e => e.NumAuth) + .HasColumnName("numAuth") + .HasDefaultValueSql("((0))") + .HasComment("numero di impieghi della authKey"); + + entity.Property(e => e.ProvNascita) + .HasMaxLength(50) + .HasColumnName("provNascita"); + + entity.Property(e => e.Utente) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("utente") + .HasDefaultValueSql("('UTENTE')"); + + entity.Property(e => e.WolMac) + .HasMaxLength(50) + .HasColumnName("WOL_MAC"); + + entity.HasOne(d => d.CodOrarioNavigation) + .WithMany(p => p.Dipendentis) + .HasForeignKey(d => d.CodOrario) + .HasConstraintName("FK_Dipendenti_AnagOrari"); + + entity.HasOne(d => d.GruppoNavigation) + .WithMany(p => p.Dipendentis) + .HasForeignKey(d => d.Gruppo) + .HasConstraintName("FK_Dipendenti_AnagGruppi"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => new { e.IdxDipendente, e.DataOra }); + + entity.ToTable("Timbrature"); + + entity.HasIndex(e => new { e.IdxDipendente, e.Entrata }, "ix_Timbrature_IdxDip_Entrata"); + + entity.Property(e => e.IdxDipendente).HasColumnName("idxDipendente"); + + entity.Property(e => e.DataOra) + .HasColumnType("datetime") + .HasColumnName("dataOra"); + + entity.Property(e => e.Approv) + .HasDefaultValueSql("((0))") + .HasComment("Approvazioen timbratura (default true...)"); + + entity.Property(e => e.CodTipoTimb) + .HasMaxLength(10) + .HasDefaultValueSql("(N'BC')"); + + entity.Property(e => e.Entrata).HasColumnName("entrata"); + + entity.Property(e => e.Ipv4) + .HasMaxLength(15) + .HasColumnName("IPv4") + .HasDefaultValueSql("(N'0.0.0.0')"); + + entity.HasOne(d => d.CodTipoTimbNavigation) + .WithMany(p => p.Timbratures) + .HasForeignKey(d => d.CodTipoTimb) + .HasConstraintName("FK_Timbrature_AnagTipoTimb"); + + entity.HasOne(d => d.IdxDipendenteNavigation) + .WithMany(p => p.Timbratures) + .HasForeignKey(d => d.IdxDipendente) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("FK_Timbrature_Dipendenti"); + }); OnModelCreatingPartial(modelBuilder); } #endregion Protected Methods + + #region Public Methods + + public void DbForceMigrate() + { + try + { + // se non ci fosse... crea o migra! + Database.Migrate(); + Log.Info("DbForceMigrate: done!"); + } + catch (Exception exc) + { + Log.Error(exc, "DbForceMigrate: Exception during context initialization 01"); + } + } + + #endregion Public Methods } } \ No newline at end of file From 01bb41d0a61c3298d98311c26418795211a815d9 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 18 Oct 2021 16:36:28 +0200 Subject: [PATCH 08/10] update controller inserimento timbrature --- GPW.Api/GPW.Api/GPW.Api.csproj | 5 + GPW.Api/GPW.Data/Controllers/DbController.cs | 202 +++++++++++++++++++ GPW.Api/GPW.Data/GPW.Data.csproj | 2 - 3 files changed, 207 insertions(+), 2 deletions(-) create mode 100644 GPW.Api/GPW.Data/Controllers/DbController.cs diff --git a/GPW.Api/GPW.Api/GPW.Api.csproj b/GPW.Api/GPW.Api/GPW.Api.csproj index c9be2f6..ffaa5ef 100644 --- a/GPW.Api/GPW.Api/GPW.Api.csproj +++ b/GPW.Api/GPW.Api/GPW.Api.csproj @@ -10,9 +10,14 @@ + + + + + Always diff --git a/GPW.Api/GPW.Data/Controllers/DbController.cs b/GPW.Api/GPW.Data/Controllers/DbController.cs new file mode 100644 index 0000000..6d07c06 --- /dev/null +++ b/GPW.Api/GPW.Data/Controllers/DbController.cs @@ -0,0 +1,202 @@ +using GPW.Data.DBModels; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Newtonsoft.Json; +using NLog; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GPW.Data.Controllers +{ + public class DbController : IDisposable + { + #region Private Fields + + private static IConfiguration _configuration; + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + + #endregion Private Fields + + #region Public Constructors + + public DbController(IConfiguration configuration) + { + _configuration = configuration; + } + + #endregion Public Constructors + + #region Public Methods + + public bool DbForceMigrate() + { + bool answ = false; + using (GPWContext localDbCtx = new GPWContext(_configuration)) + { + try + { + localDbCtx.DbForceMigrate(); + answ = true; + } + catch (Exception exc) + { + Log.Error($"Eccezione in DbForceMigrate{Environment.NewLine}{exc}"); + } + } + return answ; + } + + public void Dispose() + { + // Clear database context + Log.Info("Dispose di DbController"); + } + + public List GetChecksVC19() + { + List dbResult = new List(); + using (GPWContext localDbCtx = new GPWContext(_configuration)) + { + dbResult = localDbCtx + .DbSetCheckVc19 + .ToList(); + } + return dbResult; + } + + public List GetChecksVC19Filt(int idxDip, DateTime dtStart, DateTime dtEnd) + { + List dbResult = new List(); + using (GPWContext localDbCtx = new GPWContext(_configuration)) + { + DateTime oggi = DateTime.Today; + dbResult = localDbCtx + .DbSetCheckVc19 + .Where(x => (idxDip == 0 || x.IdxDipendente == idxDip) && (x.DtCheck >= dtStart && x.DtCheck <= dtEnd)) + .OrderByDescending(x => x.DtCheck) + .ToList(); + } + return dbResult; + } + + public bool InsertCheck(DCCDecode updItem, string clientIp) + { + bool done = false; + using (GPWContext localDbCtx = new GPWContext(_configuration)) + { + try + { + int idxDip = 0; + Dipendenti currUser = new Dipendenti() + { + IdxDipendente = 0 + }; + // per prima cosa cerca il dipendente x cognome/nome... + var userList = localDbCtx + .DbSetDipendenti + .Where(x => x.Cognome == updItem.nam.fn && x.Nome == updItem.nam.gn) + .ToList(); + // se ne ho solo 1 ok... + if (userList.Count > 1) + { + currUser = userList + .Where(x => x.DataNascita != null && updItem.dob.Date == ((DateTime)x.DataNascita).Date) + .FirstOrDefault(); + } + // altrimenti cerco anche con DOB... + else if (userList.Count == 1) + { + // se lo trova inserisce check... + currUser = userList[0]; + } + + // fisso dipendente + idxDip = currUser.IdxDipendente; + + // se trovato procedo + if (idxDip > 0) + { + string rawPayload = JsonConvert.SerializeObject(updItem); + CheckVc19 newItem = new CheckVc19() + { + IdxDipendente = idxDip, + DtCheck = DateTime.Now, + Payload = rawPayload + }; + // aggiungo! + localDbCtx + .DbSetCheckVc19 + .Add(newItem); + + // verifico se ho timbratura ingresso + var listTimbra = localDbCtx + .DbSetTimbrature + .Where(x => x.IdxDipendente == idxDip) + .ToList(); + // se non ci fosse aggiungo + if (listTimbra == null || listTimbra.Count == 0) + { + var newIngresso = new Timbrature() + { + IdxDipendente = idxDip, + DataOra = DateTime.Now, + CodTipoTimb = "Web", + Ipv4 = clientIp, + Entrata = true, + }; + + // aggiungo! + localDbCtx + .DbSetTimbrature + .Add(newIngresso); + } + + // ora salvo! + localDbCtx.SaveChanges(); + done = true; + } + // altrimenti NON FA NULLA + else + { + Log.Info($"Attenzione, dipendente non trovato: {updItem.nam.fn} {updItem.nam.gn}"); + } + } + catch (Exception exc) + { + Log.Error($"Eccezione in UpdateApplicazioni:{Environment.NewLine}{exc}"); + } + } + return done; + } + + /// + /// Annulla modifiche su una specifica entity (cancel update) + /// + /// + /// + public bool rollBackEntity(object item) + { + bool answ = false; + using (GPWContext localDbCtx = new GPWContext(_configuration)) + { + try + { + if (localDbCtx.Entry(item).State == EntityState.Deleted || localDbCtx.Entry(item).State == EntityState.Modified) + { + localDbCtx.Entry(item).Reload(); + } + } + catch (Exception exc) + { + Log.Error($"Eccezione in rollBackEntity{Environment.NewLine}{exc}"); + } + } + return answ; + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/GPW.Api/GPW.Data/GPW.Data.csproj b/GPW.Api/GPW.Data/GPW.Data.csproj index a03a87a..17515bc 100644 --- a/GPW.Api/GPW.Data/GPW.Data.csproj +++ b/GPW.Api/GPW.Data/GPW.Data.csproj @@ -5,8 +5,6 @@ - - From 793f029d8348f0f95194428d1e3c735da1e09f86 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 18 Oct 2021 17:52:17 +0200 Subject: [PATCH 09/10] Pulizia classe GPW Data --- GPW.Api/GPW.Data/Controllers/DbController.cs | 11 +- GPW.Api/GPW.Data/DBModels/AnagClassiOrarie.cs | 21 -- GPW.Api/GPW.Data/DBModels/AnagClienti.cs | 34 --- GPW.Api/GPW.Data/DBModels/AnagDevice.cs | 19 -- GPW.Api/GPW.Data/DBModels/AnagFasi.cs | 35 --- GPW.Api/GPW.Data/DBModels/AnagGiust.cs | 21 -- GPW.Api/GPW.Data/DBModels/AnagKeyValue.cs | 16 -- GPW.Api/GPW.Data/DBModels/AnagProgetti.cs | 30 --- GPW.Api/GPW.Data/DBModels/AnagRuoli.cs | 13 -- GPW.Api/GPW.Data/DBModels/AnagTipoCheck.cs | 13 -- GPW.Api/GPW.Data/DBModels/AnagraficaEventi.cs | 20 -- GPW.Api/GPW.Data/DBModels/CalendFesteFerie.cs | 14 -- GPW.Api/GPW.Data/DBModels/CheckVc19.cs | 7 +- GPW.Api/GPW.Data/DBModels/Config.cs | 14 -- GPW.Api/GPW.Data/DBModels/Contatori.cs | 13 -- GPW.Api/GPW.Data/DBModels/ControlloDefrag.cs | 22 -- GPW.Api/GPW.Data/DBModels/Dipendenti.cs | 73 +++--- GPW.Api/GPW.Data/DBModels/Dipendenti2Ruoli.cs | 13 -- GPW.Api/GPW.Data/DBModels/ElencoReport.cs | 17 -- GPW.Api/GPW.Data/DBModels/Funzioni.cs | 13 -- GPW.Api/GPW.Data/DBModels/Giustificativi.cs | 18 -- GPW.Api/GPW.Data/DBModels/ImportEgaltech.cs | 21 -- .../GPW.Data/DBModels/ImportEgaltechFase.cs | 13 -- .../GPW.Data/DBModels/ImportEgaltechNew.cs | 22 -- GPW.Api/GPW.Data/DBModels/ListValue.cs | 16 -- GPW.Api/GPW.Data/DBModels/LogAttivitum.cs | 14 -- GPW.Api/GPW.Data/DBModels/LogUpdateDb.cs | 13 -- GPW.Api/GPW.Data/DBModels/OreMensiliExport.cs | 27 --- GPW.Api/GPW.Data/DBModels/PeriodiLav.cs | 17 -- GPW.Api/GPW.Data/DBModels/Permessi.cs | 24 -- .../GPW.Data/DBModels/Permessi2Funzione.cs | 16 -- GPW.Api/GPW.Data/DBModels/RegAttivitaEgal.cs | 22 -- GPW.Api/GPW.Data/DBModels/RegAttivitaExpl.cs | 16 -- GPW.Api/GPW.Data/DBModels/RegAttivitum.cs | 22 -- GPW.Api/GPW.Data/DBModels/RegistroEventi.cs | 14 -- GPW.Api/GPW.Data/DBModels/RilievoTemp.cs | 16 -- GPW.Api/GPW.Data/DBModels/Sottoscrizioni.cs | 21 -- GPW.Api/GPW.Data/DBModels/StoricoAnagFasi.cs | 26 --- .../GPW.Data/DBModels/StoricoAnagProgetti.cs | 24 -- GPW.Api/GPW.Data/DBModels/TabWol.cs | 19 -- GPW.Api/GPW.Data/DBModels/Tally.cs | 12 - GPW.Api/GPW.Data/DBModels/TimbratureExpl.cs | 44 ---- .../GPW.Data/DBModels/TransizioneEventi.cs | 18 -- GPW.Api/GPW.Data/GPWContext.cs | 221 +++++++++--------- 44 files changed, 164 insertions(+), 931 deletions(-) delete mode 100644 GPW.Api/GPW.Data/DBModels/AnagClassiOrarie.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/AnagClienti.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/AnagDevice.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/AnagFasi.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/AnagGiust.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/AnagKeyValue.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/AnagProgetti.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/AnagRuoli.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/AnagTipoCheck.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/AnagraficaEventi.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/CalendFesteFerie.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/Config.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/Contatori.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/ControlloDefrag.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/Dipendenti2Ruoli.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/ElencoReport.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/Funzioni.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/Giustificativi.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/ImportEgaltech.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/ImportEgaltechFase.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/ImportEgaltechNew.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/ListValue.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/LogAttivitum.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/LogUpdateDb.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/OreMensiliExport.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/PeriodiLav.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/Permessi.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/Permessi2Funzione.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/RegAttivitaEgal.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/RegAttivitaExpl.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/RegAttivitum.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/RegistroEventi.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/RilievoTemp.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/Sottoscrizioni.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/StoricoAnagFasi.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/StoricoAnagProgetti.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/TabWol.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/Tally.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/TimbratureExpl.cs delete mode 100644 GPW.Api/GPW.Data/DBModels/TransizioneEventi.cs diff --git a/GPW.Api/GPW.Data/Controllers/DbController.cs b/GPW.Api/GPW.Data/Controllers/DbController.cs index 6d07c06..99212b2 100644 --- a/GPW.Api/GPW.Data/Controllers/DbController.cs +++ b/GPW.Api/GPW.Data/Controllers/DbController.cs @@ -55,13 +55,22 @@ namespace GPW.Data.Controllers Log.Info("Dispose di DbController"); } - public List GetChecksVC19() + public List GetChecksVC19(int maxNum) { List dbResult = new List(); using (GPWContext localDbCtx = new GPWContext(_configuration)) { + int numRec = localDbCtx + .DbSetCheckVc19 + .Count(); + + // se ho meno record che quelli richiesti --> riduco + maxNum = numRec > maxNum ? maxNum : numRec; + dbResult = localDbCtx .DbSetCheckVc19 + .OrderByDescending(x => x.DtCheck) + .Take(maxNum) .ToList(); } return dbResult; diff --git a/GPW.Api/GPW.Data/DBModels/AnagClassiOrarie.cs b/GPW.Api/GPW.Data/DBModels/AnagClassiOrarie.cs deleted file mode 100644 index 3e5fd30..0000000 --- a/GPW.Api/GPW.Data/DBModels/AnagClassiOrarie.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class AnagClassiOrarie - { - public AnagClassiOrarie() - { - AnagFasis = new HashSet(); - } - - public string CodClasse { get; set; } - public string DescrClasse { get; set; } - public decimal? Peso { get; set; } - - public virtual ICollection AnagFasis { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/AnagClienti.cs b/GPW.Api/GPW.Data/DBModels/AnagClienti.cs deleted file mode 100644 index 31e8db9..0000000 --- a/GPW.Api/GPW.Data/DBModels/AnagClienti.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class AnagClienti - { - public AnagClienti() - { - AnagProgettis = new HashSet(); - } - - public int IdxCliente { get; set; } - public string RagSociale { get; set; } - public string Indirizzo { get; set; } - public string Cap { get; set; } - public string Citta { get; set; } - public string Prov { get; set; } - public string Tel { get; set; } - public string Url { get; set; } - public string Email { get; set; } - public string PIva { get; set; } - public string Cf { get; set; } - public string LogoUrl { get; set; } - public string Nota { get; set; } - public int? OldIdx { get; set; } - public bool? Attivo { get; set; } - public string CodExt { get; set; } - - public virtual ICollection AnagProgettis { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/AnagDevice.cs b/GPW.Api/GPW.Data/DBModels/AnagDevice.cs deleted file mode 100644 index d52e97d..0000000 --- a/GPW.Api/GPW.Data/DBModels/AnagDevice.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class AnagDevice - { - public int IdxDevice { get; set; } - public string DeviceSecret { get; set; } - public int IdxDipendente { get; set; } - public string DeviceName { get; set; } - public string Description { get; set; } - public DateTime DataOraEnabled { get; set; } - public DateTime DataOraLastSeen { get; set; } - public string LastIpv4 { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/AnagFasi.cs b/GPW.Api/GPW.Data/DBModels/AnagFasi.cs deleted file mode 100644 index 3905920..0000000 --- a/GPW.Api/GPW.Data/DBModels/AnagFasi.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class AnagFasi - { - public AnagFasi() - { - RegAttivita = new HashSet(); - RegAttivitaEgals = new HashSet(); - } - - public int IdxFase { get; set; } - public int? IdxProgetto { get; set; } - public string CodFase { get; set; } - public int IdxFaseAncest { get; set; } - public string NomeFase { get; set; } - public string DescrizioneFase { get; set; } - public bool? EnableTime { get; set; } - public bool? EnableMoney { get; set; } - public bool? Attivo { get; set; } - public string CodClasse { get; set; } - public string CodExt { get; set; } - public decimal? BudgetTime { get; set; } - public decimal? BudgetMoney { get; set; } - - public virtual AnagClassiOrarie CodClasseNavigation { get; set; } - public virtual AnagProgetti IdxProgettoNavigation { get; set; } - public virtual ICollection RegAttivita { get; set; } - public virtual ICollection RegAttivitaEgals { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/AnagGiust.cs b/GPW.Api/GPW.Data/DBModels/AnagGiust.cs deleted file mode 100644 index aae7729..0000000 --- a/GPW.Api/GPW.Data/DBModels/AnagGiust.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class AnagGiust - { - public AnagGiust() - { - Giustificativis = new HashSet(); - } - - public string CodGiust { get; set; } - public string Descrizione { get; set; } - public bool? UserSelectable { get; set; } - - public virtual ICollection Giustificativis { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/AnagKeyValue.cs b/GPW.Api/GPW.Data/DBModels/AnagKeyValue.cs deleted file mode 100644 index 3bd4df7..0000000 --- a/GPW.Api/GPW.Data/DBModels/AnagKeyValue.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class AnagKeyValue - { - public string NomeVar { get; set; } - public int? ValInt { get; set; } - public double? ValFloat { get; set; } - public string ValString { get; set; } - public string Descrizione { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/AnagProgetti.cs b/GPW.Api/GPW.Data/DBModels/AnagProgetti.cs deleted file mode 100644 index 550536c..0000000 --- a/GPW.Api/GPW.Data/DBModels/AnagProgetti.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class AnagProgetti - { - public AnagProgetti() - { - AnagFasis = new HashSet(); - } - - public int IdxProgetto { get; set; } - public int IdxCliente { get; set; } - public string NomeProj { get; set; } - public string DescrProj { get; set; } - public int OldIdx { get; set; } - public bool? Attivo { get; set; } - public string CodExt { get; set; } - public DateTime Avvio { get; set; } - public DateTime Chiusura { get; set; } - public string Gruppo { get; set; } - public bool Starred { get; set; } - - public virtual AnagClienti IdxClienteNavigation { get; set; } - public virtual ICollection AnagFasis { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/AnagRuoli.cs b/GPW.Api/GPW.Data/DBModels/AnagRuoli.cs deleted file mode 100644 index 36ee3a4..0000000 --- a/GPW.Api/GPW.Data/DBModels/AnagRuoli.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class AnagRuoli - { - public string CodRuolo { get; set; } - public string DescrRuolo { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/AnagTipoCheck.cs b/GPW.Api/GPW.Data/DBModels/AnagTipoCheck.cs deleted file mode 100644 index b2fa670..0000000 --- a/GPW.Api/GPW.Data/DBModels/AnagTipoCheck.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class AnagTipoCheck - { - public string ChkFun { get; set; } - public string DescrFun { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/AnagraficaEventi.cs b/GPW.Api/GPW.Data/DBModels/AnagraficaEventi.cs deleted file mode 100644 index 835829e..0000000 --- a/GPW.Api/GPW.Data/DBModels/AnagraficaEventi.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class AnagraficaEventi - { - public AnagraficaEventi() - { - TransizioneEventis = new HashSet(); - } - - public int IdxTipoEvento { get; set; } - public string Nome { get; set; } - - public virtual ICollection TransizioneEventis { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/CalendFesteFerie.cs b/GPW.Api/GPW.Data/DBModels/CalendFesteFerie.cs deleted file mode 100644 index 494b74f..0000000 --- a/GPW.Api/GPW.Data/DBModels/CalendFesteFerie.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class CalendFesteFerie - { - public DateTime Data { get; set; } - public string CodGiust { get; set; } - public string Descrizione { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/CheckVc19.cs b/GPW.Api/GPW.Data/DBModels/CheckVc19.cs index b5e407e..4f70421 100644 --- a/GPW.Api/GPW.Data/DBModels/CheckVc19.cs +++ b/GPW.Api/GPW.Data/DBModels/CheckVc19.cs @@ -1,15 +1,16 @@ using System; using System.Collections.Generic; -#nullable disable +// +// This is here so CodeMaid doesn't reorganize this document +// namespace GPW.Data.DBModels { public partial class CheckVc19 { - public int IdxCheck { get; set; } - public int IdxDipendente { get; set; } public DateTime DtCheck { get; set; } + public int IdxDipendente { get; set; } public string Payload { get; set; } } } diff --git a/GPW.Api/GPW.Data/DBModels/Config.cs b/GPW.Api/GPW.Data/DBModels/Config.cs deleted file mode 100644 index b463fdb..0000000 --- a/GPW.Api/GPW.Data/DBModels/Config.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class Config - { - public string Chiave { get; set; } - public string Valore { get; set; } - public string Note { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/Contatori.cs b/GPW.Api/GPW.Data/DBModels/Contatori.cs deleted file mode 100644 index 9ca6776..0000000 --- a/GPW.Api/GPW.Data/DBModels/Contatori.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class Contatori - { - public string CodContatore { get; set; } - public int? Valore { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/ControlloDefrag.cs b/GPW.Api/GPW.Data/DBModels/ControlloDefrag.cs deleted file mode 100644 index 7a91ac8..0000000 --- a/GPW.Api/GPW.Data/DBModels/ControlloDefrag.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class ControlloDefrag - { - public string Db { get; set; } - public DateTime Data { get; set; } - public int Riga { get; set; } - public string Oggetto { get; set; } - public string IndexName { get; set; } - public decimal? AvgFragmentationInPercent { get; set; } - public long? PageCount { get; set; } - public string TypeDesc { get; set; } - public byte? FillFactor { get; set; } - public string CmdReorganize { get; set; } - public string CmdRebuild { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/Dipendenti.cs b/GPW.Api/GPW.Data/DBModels/Dipendenti.cs index d58e8cb..f21e837 100644 --- a/GPW.Api/GPW.Data/DBModels/Dipendenti.cs +++ b/GPW.Api/GPW.Data/DBModels/Dipendenti.cs @@ -7,48 +7,57 @@ namespace GPW.Data.DBModels { public partial class Dipendenti { + #region Public Constructors + public Dipendenti() { - PeriodiLavs = new HashSet(); - RegAttivita = new HashSet(); - RegAttivitaEgals = new HashSet(); - RilievoTemps = new HashSet(); + //PeriodiLavs = new HashSet(); + //RegAttivita = new HashSet(); + //RegAttivitaEgals = new HashSet(); + //RilievoTemps = new HashSet(); Timbratures = new HashSet(); } - public int IdxDipendente { get; set; } - public string Matricola { get; set; } + #endregion Public Constructors + + #region Public Properties + + public bool? Attivo { get; set; } + public string AuthKey { get; set; } public string Cf { get; set; } - public string Cognome { get; set; } - public string Nome { get; set; } - public DateTime? DataNascita { get; set; } - public string LuogoNascita { get; set; } - public string ProvNascita { get; set; } - public string NazNascita { get; set; } + public string CodDipendenteExt { get; set; } public string CodHw { get; set; } public string CodOrario { get; set; } - public bool? MailLastOp { get; set; } - public bool? MailDay { get; set; } - public bool? MailWeek { get; set; } - public bool? MailMonth { get; set; } - public string Email { get; set; } - public string AuthKey { get; set; } - public int? NumAuth { get; set; } - public string WolMac { get; set; } - public string Dominio { get; set; } - public string Utente { get; set; } - public string CodDipendenteExt { get; set; } - public string Gruppo { get; set; } + public virtual AnagOrari CodOrarioNavigation { get; set; } + public string Cognome { get; set; } public DateTime? DataAssunzione { get; set; } public DateTime? DataCessazione { get; set; } - public bool? Attivo { get; set; } - - public virtual AnagOrari CodOrarioNavigation { get; set; } + public DateTime? DataNascita { get; set; } + public string Dominio { get; set; } + public string Email { get; set; } + public string Gruppo { get; set; } public virtual AnagGruppi GruppoNavigation { get; set; } - public virtual ICollection PeriodiLavs { get; set; } - public virtual ICollection RegAttivita { get; set; } - public virtual ICollection RegAttivitaEgals { get; set; } - public virtual ICollection RilievoTemps { get; set; } + public int IdxDipendente { get; set; } + public string LuogoNascita { get; set; } + public bool? MailDay { get; set; } + public bool? MailLastOp { get; set; } + public bool? MailMonth { get; set; } + public bool? MailWeek { get; set; } + public string Matricola { get; set; } + public string NazNascita { get; set; } + public string Nome { get; set; } + public int? NumAuth { get; set; } + public string ProvNascita { get; set; } + + //public virtual ICollection PeriodiLavs { get; set; } + //public virtual ICollection RegAttivita { get; set; } + //public virtual ICollection RegAttivitaEgals { get; set; } + //public virtual ICollection RilievoTemps { get; set; } public virtual ICollection Timbratures { get; set; } + + public string Utente { get; set; } + public string WolMac { get; set; } + + #endregion Public Properties } -} +} \ No newline at end of file diff --git a/GPW.Api/GPW.Data/DBModels/Dipendenti2Ruoli.cs b/GPW.Api/GPW.Data/DBModels/Dipendenti2Ruoli.cs deleted file mode 100644 index 534b13d..0000000 --- a/GPW.Api/GPW.Data/DBModels/Dipendenti2Ruoli.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class Dipendenti2Ruoli - { - public int IdxDipendente { get; set; } - public string CodRuolo { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/ElencoReport.cs b/GPW.Api/GPW.Data/DBModels/ElencoReport.cs deleted file mode 100644 index 6a60605..0000000 --- a/GPW.Api/GPW.Data/DBModels/ElencoReport.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class ElencoReport - { - public int IdxRep { get; set; } - public string Area { get; set; } - public string Nome { get; set; } - public string Descrizione { get; set; } - public string CssClass { get; set; } - public string ReportUrl { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/Funzioni.cs b/GPW.Api/GPW.Data/DBModels/Funzioni.cs deleted file mode 100644 index 9d64ead..0000000 --- a/GPW.Api/GPW.Data/DBModels/Funzioni.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class Funzioni - { - public string Funzione { get; set; } - public string Descrizione { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/Giustificativi.cs b/GPW.Api/GPW.Data/DBModels/Giustificativi.cs deleted file mode 100644 index fcc3c2c..0000000 --- a/GPW.Api/GPW.Data/DBModels/Giustificativi.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class Giustificativi - { - public DateTime DataLav { get; set; } - public int IdxDipendente { get; set; } - public string CodGiust { get; set; } - public int? Minuti { get; set; } - public bool? Automatico { get; set; } - - public virtual AnagGiust CodGiustNavigation { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/ImportEgaltech.cs b/GPW.Api/GPW.Data/DBModels/ImportEgaltech.cs deleted file mode 100644 index cf4678b..0000000 --- a/GPW.Api/GPW.Data/DBModels/ImportEgaltech.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class ImportEgaltech - { - public int IdxRiga { get; set; } - public DateTime Data { get; set; } - public decimal NOre { get; set; } - public TimeSpan Ora { get; set; } - public string Commessa { get; set; } - public string Fase { get; set; } - public string Note { get; set; } - public int IdxDipendente { get; set; } - public bool? FlgCaricato { get; set; } - public string DescRisultato { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/ImportEgaltechFase.cs b/GPW.Api/GPW.Data/DBModels/ImportEgaltechFase.cs deleted file mode 100644 index bea96af..0000000 --- a/GPW.Api/GPW.Data/DBModels/ImportEgaltechFase.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class ImportEgaltechFase - { - public string Fase { get; set; } - public string DescFase { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/ImportEgaltechNew.cs b/GPW.Api/GPW.Data/DBModels/ImportEgaltechNew.cs deleted file mode 100644 index 67941e3..0000000 --- a/GPW.Api/GPW.Data/DBModels/ImportEgaltechNew.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class ImportEgaltechNew - { - public int IdxRiga { get; set; } - public DateTime Data { get; set; } - public decimal NOre { get; set; } - public TimeSpan Ora { get; set; } - public string Commessa { get; set; } - public string Fase { get; set; } - public string SottoFase { get; set; } - public string Note { get; set; } - public int IdxDipendente { get; set; } - public bool? FlgCaricato { get; set; } - public string DescRisultato { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/ListValue.cs b/GPW.Api/GPW.Data/DBModels/ListValue.cs deleted file mode 100644 index 7106861..0000000 --- a/GPW.Api/GPW.Data/DBModels/ListValue.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class ListValue - { - public string TableName { get; set; } - public string FieldName { get; set; } - public string Value { get; set; } - public string Label { get; set; } - public int? Ordinal { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/LogAttivitum.cs b/GPW.Api/GPW.Data/DBModels/LogAttivitum.cs deleted file mode 100644 index 2b2d8e9..0000000 --- a/GPW.Api/GPW.Data/DBModels/LogAttivitum.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class LogAttivitum - { - public DateTime DataOra { get; set; } - public string Fonte { get; set; } - public string Valore { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/LogUpdateDb.cs b/GPW.Api/GPW.Data/DBModels/LogUpdateDb.cs deleted file mode 100644 index f4e5c5d..0000000 --- a/GPW.Api/GPW.Data/DBModels/LogUpdateDb.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class LogUpdateDb - { - public int Versione { get; set; } - public DateTime? Data { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/OreMensiliExport.cs b/GPW.Api/GPW.Data/DBModels/OreMensiliExport.cs deleted file mode 100644 index d53c172..0000000 --- a/GPW.Api/GPW.Data/DBModels/OreMensiliExport.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class OreMensiliExport - { - public int IdxDipendente { get; set; } - public DateTime DataLav { get; set; } - public string Matricola { get; set; } - public string CodExt { get; set; } - public string RifDitta { get; set; } - public double? OreStraordAss { get; set; } - public int? MinLavStra { get; set; } - public int? MinLavTot { get; set; } - public int? MinStraProgrMese { get; set; } - public int? MinPrevExp { get; set; } - public int? MinLavOrdExp { get; set; } - public int? MinStraExp { get; set; } - public int? MinPermExp { get; set; } - public int? MinFerieExp { get; set; } - public int? MinMalExp { get; set; } - public int? MinFestExp { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/PeriodiLav.cs b/GPW.Api/GPW.Data/DBModels/PeriodiLav.cs deleted file mode 100644 index 4c13668..0000000 --- a/GPW.Api/GPW.Data/DBModels/PeriodiLav.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class PeriodiLav - { - public int IdxDipendente { get; set; } - public DateTime Entrata { get; set; } - public DateTime? Uscita { get; set; } - public int? RowNum { get; set; } - - public virtual Dipendenti IdxDipendenteNavigation { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/Permessi.cs b/GPW.Api/GPW.Data/DBModels/Permessi.cs deleted file mode 100644 index c97fe2e..0000000 --- a/GPW.Api/GPW.Data/DBModels/Permessi.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class Permessi - { - public Permessi() - { - Permessi2Funziones = new HashSet(); - } - - public string CodPermesso { get; set; } - public string Url { get; set; } - public int? Gruppo { get; set; } - public int? Numero { get; set; } - public string Nome { get; set; } - public string Descrizione { get; set; } - - public virtual ICollection Permessi2Funziones { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/Permessi2Funzione.cs b/GPW.Api/GPW.Data/DBModels/Permessi2Funzione.cs deleted file mode 100644 index 223abc1..0000000 --- a/GPW.Api/GPW.Data/DBModels/Permessi2Funzione.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class Permessi2Funzione - { - public string CodPermesso { get; set; } - public string CodFunzione { get; set; } - public string Readwrite { get; set; } - - public virtual Permessi CodPermessoNavigation { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/RegAttivitaEgal.cs b/GPW.Api/GPW.Data/DBModels/RegAttivitaEgal.cs deleted file mode 100644 index ed898ff..0000000 --- a/GPW.Api/GPW.Data/DBModels/RegAttivitaEgal.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class RegAttivitaEgal - { - public int IdxRa { get; set; } - public int IdxDipendente { get; set; } - public int IdxFase { get; set; } - public DateTime Inizio { get; set; } - public DateTime Fine { get; set; } - public string Descrizione { get; set; } - public decimal? OreTot { get; set; } - public decimal? Importo { get; set; } - - public virtual Dipendenti IdxDipendenteNavigation { get; set; } - public virtual AnagFasi IdxFaseNavigation { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/RegAttivitaExpl.cs b/GPW.Api/GPW.Data/DBModels/RegAttivitaExpl.cs deleted file mode 100644 index cf32936..0000000 --- a/GPW.Api/GPW.Data/DBModels/RegAttivitaExpl.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class RegAttivitaExpl - { - public DateTime DataLav { get; set; } - public int IdxDipendente { get; set; } - public string CognomeNome { get; set; } - public int? MinRegAtt { get; set; } - public string DescrProj { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/RegAttivitum.cs b/GPW.Api/GPW.Data/DBModels/RegAttivitum.cs deleted file mode 100644 index 9ddb503..0000000 --- a/GPW.Api/GPW.Data/DBModels/RegAttivitum.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class RegAttivitum - { - public int IdxRa { get; set; } - public int IdxDipendente { get; set; } - public int IdxFase { get; set; } - public DateTime Inizio { get; set; } - public DateTime Fine { get; set; } - public string Descrizione { get; set; } - public decimal? OreTot { get; set; } - public decimal? Importo { get; set; } - - public virtual Dipendenti IdxDipendenteNavigation { get; set; } - public virtual AnagFasi IdxFaseNavigation { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/RegistroEventi.cs b/GPW.Api/GPW.Data/DBModels/RegistroEventi.cs deleted file mode 100644 index 94701ee..0000000 --- a/GPW.Api/GPW.Data/DBModels/RegistroEventi.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class RegistroEventi - { - public DateTime DataOra { get; set; } - public string Evento { get; set; } - public string Commento { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/RilievoTemp.cs b/GPW.Api/GPW.Data/DBModels/RilievoTemp.cs deleted file mode 100644 index 54fbe50..0000000 --- a/GPW.Api/GPW.Data/DBModels/RilievoTemp.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class RilievoTemp - { - public int IdxDipendente { get; set; } - public DateTime DtRilievo { get; set; } - public decimal TempRil { get; set; } - - public virtual Dipendenti IdxDipendenteNavigation { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/Sottoscrizioni.cs b/GPW.Api/GPW.Data/DBModels/Sottoscrizioni.cs deleted file mode 100644 index 7727cc6..0000000 --- a/GPW.Api/GPW.Data/DBModels/Sottoscrizioni.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class Sottoscrizioni - { - public int SubscriptionId { get; set; } - public string SubscriptionName { get; set; } - public string EMail { get; set; } - public int? IdxDipendente { get; set; } - public DateTime? DataInizio { get; set; } - public DateTime? DataFine { get; set; } - public bool Dettaglio { get; set; } - public string Format { get; set; } - public bool? IncludeReport { get; set; } - public bool? IncludeLink { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/StoricoAnagFasi.cs b/GPW.Api/GPW.Data/DBModels/StoricoAnagFasi.cs deleted file mode 100644 index c22f066..0000000 --- a/GPW.Api/GPW.Data/DBModels/StoricoAnagFasi.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class StoricoAnagFasi - { - public int IdxEv { get; set; } - public DateTime? DataEv { get; set; } - public int? IdxFase { get; set; } - public int? IdxProgetto { get; set; } - public string CodFase { get; set; } - public int? IdxFaseAncest { get; set; } - public string NomeFase { get; set; } - public string DescrizioneFase { get; set; } - public bool? EnableTime { get; set; } - public bool? EnableMoney { get; set; } - public bool? Attivo { get; set; } - public string CodClasse { get; set; } - public string CodExt { get; set; } - public decimal? BudgetTime { get; set; } - public decimal? BudgetMoney { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/StoricoAnagProgetti.cs b/GPW.Api/GPW.Data/DBModels/StoricoAnagProgetti.cs deleted file mode 100644 index 713095d..0000000 --- a/GPW.Api/GPW.Data/DBModels/StoricoAnagProgetti.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class StoricoAnagProgetti - { - public int IdxEv { get; set; } - public DateTime? DataEv { get; set; } - public int? IdxProgetto { get; set; } - public int? IdxCliente { get; set; } - public string NomeProj { get; set; } - public string DescrProj { get; set; } - public int? OldIdx { get; set; } - public bool? Attivo { get; set; } - public string CodExt { get; set; } - public DateTime? Avvio { get; set; } - public DateTime? Chiusura { get; set; } - public string Gruppo { get; set; } - public bool? Starred { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/TabWol.cs b/GPW.Api/GPW.Data/DBModels/TabWol.cs deleted file mode 100644 index eba80eb..0000000 --- a/GPW.Api/GPW.Data/DBModels/TabWol.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class TabWol - { - public int IdxDipendente { get; set; } - public TimeSpan Lun { get; set; } - public TimeSpan Mar { get; set; } - public TimeSpan Mer { get; set; } - public TimeSpan Gio { get; set; } - public TimeSpan Ven { get; set; } - public TimeSpan Sab { get; set; } - public TimeSpan Dom { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/Tally.cs b/GPW.Api/GPW.Data/DBModels/Tally.cs deleted file mode 100644 index 1d92ac9..0000000 --- a/GPW.Api/GPW.Data/DBModels/Tally.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class Tally - { - public int N { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/TimbratureExpl.cs b/GPW.Api/GPW.Data/DBModels/TimbratureExpl.cs deleted file mode 100644 index 78d2826..0000000 --- a/GPW.Api/GPW.Data/DBModels/TimbratureExpl.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class TimbratureExpl - { - public DateTime DataLav { get; set; } - public int IdxDipendente { get; set; } - public string CognomeNome { get; set; } - public DateTime? Entrata1 { get; set; } - public DateTime? Uscita1 { get; set; } - public DateTime? Entrata2 { get; set; } - public DateTime? Uscita2 { get; set; } - public DateTime? Entrata3 { get; set; } - public DateTime? Uscita3 { get; set; } - public DateTime? Entrata4 { get; set; } - public DateTime? Uscita4 { get; set; } - public double? HLav { get; set; } - public int? MinLav { get; set; } - public int? MinOrd { get; set; } - public int? MinNonLav { get; set; } - public int? MinStra { get; set; } - public int? MinPerm { get; set; } - public int? MinFer { get; set; } - public int? MinMal { get; set; } - public int? MinFest { get; set; } - public int? MinCassa { get; set; } - public int? Min104 { get; set; } - public int? MinMpp { get; set; } - public int? MinArcoPres { get; set; } - public bool? IsOkTim { get; set; } - public bool? IsOkApp { get; set; } - public bool? Block { get; set; } - public string ChkFunCod { get; set; } - public string ChkFunRes { get; set; } - public int? IsOk { get; set; } - public int IsOkLav { get; set; } - public double? HGiust { get; set; } - public decimal TempRil { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/DBModels/TransizioneEventi.cs b/GPW.Api/GPW.Data/DBModels/TransizioneEventi.cs deleted file mode 100644 index 898c92a..0000000 --- a/GPW.Api/GPW.Data/DBModels/TransizioneEventi.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; - -#nullable disable - -namespace GPW.Data.DBModels -{ - public partial class TransizioneEventi - { - public string CodInviato { get; set; } - public string PrecCodInviato { get; set; } - public int? IdxTipoEvento { get; set; } - public string Text2show { get; set; } - public string DescrComando { get; set; } - - public virtual AnagraficaEventi IdxTipoEventoNavigation { get; set; } - } -} diff --git a/GPW.Api/GPW.Data/GPWContext.cs b/GPW.Api/GPW.Data/GPWContext.cs index dfcf3b8..0c6cc4e 100644 --- a/GPW.Api/GPW.Data/GPWContext.cs +++ b/GPW.Api/GPW.Data/GPWContext.cs @@ -71,8 +71,6 @@ namespace GPW.Data public virtual DbSet AnagTipoChecks { get; set; } - public virtual DbSet AnagTipoTimbs { get; set; } - public virtual DbSet CalendFesteFeries { get; set; } public virtual DbSet Configs { get; set; } @@ -136,6 +134,8 @@ namespace GPW.Data #region Public Properties + public virtual DbSet DbSetAnagTipoTimb { get; set; } + public virtual DbSet DbSetCheckVc19 { get; set; } public virtual DbSet DbSetDipendenti { get; set; } @@ -380,30 +380,6 @@ namespace GPW.Data .HasDefaultValueSql("((1))"); }); - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.Gruppo); - - entity.ToTable("AnagGruppi"); - - entity.Property(e => e.Gruppo) - .HasMaxLength(50) - .HasColumnName("gruppo"); - - entity.Property(e => e.CodExt) - .HasMaxLength(4) - .HasColumnName("codExt"); - - entity.Property(e => e.DescrGruppo) - .HasMaxLength(50) - .HasColumnName("descrGruppo"); - - entity.Property(e => e.ExportEnab) - .HasColumnName("exportEnab") - .HasDefaultValueSql("((1))") - .HasComment("determina se sia abilitato x export dati"); - }); - modelBuilder.Entity(entity => { entity.HasKey(e => e.NomeVar); @@ -433,77 +409,6 @@ namespace GPW.Data .HasDefaultValueSql("('')"); }); - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.CodOrario); - - entity.ToTable("AnagOrari"); - - entity.Property(e => e.CodOrario) - .HasMaxLength(50) - .HasColumnName("codOrario"); - - entity.Property(e => e.ArrotMinuti) - .HasColumnName("arrotMinuti") - .HasDefaultValueSql("((1))"); - - entity.Property(e => e.AutoCompOreOrd) - .HasColumnName("autoCompOreOrd") - .HasComment("indica se ci sia compensazione automatica delle ore (ordinarie) lavorate (prelevando da straordinarie)"); - - entity.Property(e => e.ChkFun) - .IsRequired() - .HasMaxLength(50) - .HasColumnName("chkFun") - .HasDefaultValueSql("('')") - .HasComment("parametro (opzionale) da passare alla funzione di check \"finale\" per verifica giornate lavorate in tab TimbratureExpl"); - - entity.Property(e => e.DescOrario) - .IsRequired() - .HasMaxLength(250) - .HasColumnName("descOrario") - .HasDefaultValueSql("('--descrizione--')"); - - entity.Property(e => e.OraFine1).HasColumnName("oraFine_1"); - - entity.Property(e => e.OraFine2).HasColumnName("oraFine_2"); - - entity.Property(e => e.OraFine3).HasColumnName("oraFine_3"); - - entity.Property(e => e.OraInizio1).HasColumnName("oraInizio_1"); - - entity.Property(e => e.OraInizio2).HasColumnName("oraInizio_2"); - - entity.Property(e => e.OraInizio3).HasColumnName("oraInizio_3"); - - entity.Property(e => e.OreDom).HasColumnName("oreDom"); - - entity.Property(e => e.OreGio).HasColumnName("oreGio"); - - entity.Property(e => e.OreLun).HasColumnName("oreLun"); - - entity.Property(e => e.OreMar).HasColumnName("oreMar"); - - entity.Property(e => e.OreMer).HasColumnName("oreMer"); - - entity.Property(e => e.OreOrdSett) - .HasColumnName("oreOrdSett") - .HasComputedColumnSql("(((((([oreLun]+[oreMar])+[oreMer])+[oreGio])+[oreVen])+[oreSab])+[oreDom])", false); - - entity.Property(e => e.OreSab).HasColumnName("oreSab"); - - entity.Property(e => e.OreStraordAss).HasColumnName("oreStraordAss"); - - entity.Property(e => e.OreVen).HasColumnName("oreVen"); - - entity.Property(e => e.TipoCompens) - .IsRequired() - .HasMaxLength(2) - .HasColumnName("tipoCompens") - .HasDefaultValueSql("('M')") - .HasComment("indica il tipo di compensazione automatica delle ore --> M = mese, W = settimana"); - }); - modelBuilder.Entity(entity => { entity.HasKey(e => e.IdxProgetto); @@ -587,17 +492,6 @@ namespace GPW.Data .HasColumnName("descrFun"); }); - modelBuilder.Entity(entity => - { - entity.HasKey(e => e.CodTipoTimb); - - entity.ToTable("AnagTipoTimb"); - - entity.Property(e => e.CodTipoTimb).HasMaxLength(10); - - entity.Property(e => e.DescrTipoTimb).HasMaxLength(500); - }); - modelBuilder.Entity(entity => { entity.HasKey(e => e.IdxTipoEvento); @@ -1540,15 +1434,118 @@ namespace GPW.Data }); #endif + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.Gruppo); + + entity.ToTable("AnagGruppi"); + + entity.Property(e => e.Gruppo) + .HasMaxLength(50) + .HasColumnName("gruppo"); + + entity.Property(e => e.CodExt) + .HasMaxLength(4) + .HasColumnName("codExt"); + + entity.Property(e => e.DescrGruppo) + .HasMaxLength(50) + .HasColumnName("descrGruppo"); + + entity.Property(e => e.ExportEnab) + .HasColumnName("exportEnab") + .HasDefaultValueSql("((1))") + .HasComment("determina se sia abilitato x export dati"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CodOrario); + + entity.ToTable("AnagOrari"); + + entity.Property(e => e.CodOrario) + .HasMaxLength(50) + .HasColumnName("codOrario"); + + entity.Property(e => e.ArrotMinuti) + .HasColumnName("arrotMinuti") + .HasDefaultValueSql("((1))"); + + entity.Property(e => e.AutoCompOreOrd) + .HasColumnName("autoCompOreOrd") + .HasComment("indica se ci sia compensazione automatica delle ore (ordinarie) lavorate (prelevando da straordinarie)"); + + entity.Property(e => e.ChkFun) + .IsRequired() + .HasMaxLength(50) + .HasColumnName("chkFun") + .HasDefaultValueSql("('')") + .HasComment("parametro (opzionale) da passare alla funzione di check \"finale\" per verifica giornate lavorate in tab TimbratureExpl"); + + entity.Property(e => e.DescOrario) + .IsRequired() + .HasMaxLength(250) + .HasColumnName("descOrario") + .HasDefaultValueSql("('--descrizione--')"); + + entity.Property(e => e.OraFine1).HasColumnName("oraFine_1"); + + entity.Property(e => e.OraFine2).HasColumnName("oraFine_2"); + + entity.Property(e => e.OraFine3).HasColumnName("oraFine_3"); + + entity.Property(e => e.OraInizio1).HasColumnName("oraInizio_1"); + + entity.Property(e => e.OraInizio2).HasColumnName("oraInizio_2"); + + entity.Property(e => e.OraInizio3).HasColumnName("oraInizio_3"); + + entity.Property(e => e.OreDom).HasColumnName("oreDom"); + + entity.Property(e => e.OreGio).HasColumnName("oreGio"); + + entity.Property(e => e.OreLun).HasColumnName("oreLun"); + + entity.Property(e => e.OreMar).HasColumnName("oreMar"); + + entity.Property(e => e.OreMer).HasColumnName("oreMer"); + + entity.Property(e => e.OreOrdSett) + .HasColumnName("oreOrdSett") + .HasComputedColumnSql("(((((([oreLun]+[oreMar])+[oreMer])+[oreGio])+[oreVen])+[oreSab])+[oreDom])", false); + + entity.Property(e => e.OreSab).HasColumnName("oreSab"); + + entity.Property(e => e.OreStraordAss).HasColumnName("oreStraordAss"); + + entity.Property(e => e.OreVen).HasColumnName("oreVen"); + + entity.Property(e => e.TipoCompens) + .IsRequired() + .HasMaxLength(2) + .HasColumnName("tipoCompens") + .HasDefaultValueSql("('M')") + .HasComment("indica il tipo di compensazione automatica delle ore --> M = mese, W = settimana"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.CodTipoTimb); + + entity.ToTable("AnagTipoTimb"); + + entity.Property(e => e.CodTipoTimb).HasMaxLength(10); + + entity.Property(e => e.DescrTipoTimb).HasMaxLength(500); + }); + modelBuilder.Entity(entity => { - entity.HasKey(e => e.IdxCheck) - .HasName("PK_CheckC19"); + entity.HasKey(e => new { e.DtCheck, e.IdxDipendente }); entity.ToTable("CheckVC19"); - entity.Property(e => e.IdxCheck).ValueGeneratedNever(); - entity.Property(e => e.DtCheck) .HasColumnType("datetime") .HasColumnName("dtCheck") From db797b1a17f7d3cc6a2f847aa6838fb530ca9a8c Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 18 Oct 2021 17:52:31 +0200 Subject: [PATCH 10/10] Completata gestione classe Data --- GPW.Api/GPW.Api/Controllers/VC19Controller.cs | 68 ++++++++---- GPW.Api/GPW.Api/Data/GpwDataService.cs | 101 ++++++++++++++++++ GPW.Api/GPW.Api/Startup.cs | 34 ++++-- GPW.Api/GPW.Api/appsettings.json | 19 ++-- 4 files changed, 181 insertions(+), 41 deletions(-) create mode 100644 GPW.Api/GPW.Api/Data/GpwDataService.cs diff --git a/GPW.Api/GPW.Api/Controllers/VC19Controller.cs b/GPW.Api/GPW.Api/Controllers/VC19Controller.cs index 4fb35ee..735eae5 100644 --- a/GPW.Api/GPW.Api/Controllers/VC19Controller.cs +++ b/GPW.Api/GPW.Api/Controllers/VC19Controller.cs @@ -1,59 +1,81 @@ -using GPW.Data; -using Microsoft.AspNetCore.Http; +using GPW.Api.Data; +using GPW.Data; +using GPW.Data.DBModels; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; +using NLog; using System; using System.Collections.Generic; -using System.Linq; using System.Threading.Tasks; namespace GPW.Api.Controllers { + [Route("api/VC19")] [ApiController] - [Route("api/[controller]")] //[Route("[controller]")] public class VC19Controller : ControllerBase { #region Private Fields - private readonly ILogger _logger; + /// + /// Classe per logging + /// + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); #endregion Private Fields #region Public Constructors - public VC19Controller(ILogger logger) + public VC19Controller(GpwDataService DataService) { - _logger = logger; + _DataService = DataService; + Log.Info("Avviata classe PlantDataController"); } #endregion Public Constructors + #region Protected Properties + + protected GpwDataService _DataService { get; set; } + + #endregion Protected Properties + #region Public Methods [HttpGet] - public IEnumerable Get() + public async Task> Get() { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new VC19Check - { - DTRecord = DateTime.Now.AddMinutes(-index * 3), - CheckRecorded = rng.Next(0, 10) > 5 ? true : false, - TimbrRecorder = rng.Next(0, 10) > 5 ? true : false - }) - .ToArray(); + var result = await _DataService.ChecksGetLast(20); + return result; + } + + // GET api/VC19/5 + [HttpGet("{id}")] + public async Task> Get(int id) + { + var result = await _DataService.ChecksGetByDip(id); + return result; } [HttpPost] - public VC19Check Post(DCCDecode DecodedData) + public async Task Post(DCCDecode DecodedData) { - VC19Check answ = new VC19Check + VC19Check answ = new VC19Check() { - DTRecord = DateTime.Now, - CheckRecorded = true, - TimbrRecorder = true, - Result = $"OK, Check Recorded for {DecodedData.nam.fn} {DecodedData.nam.gn} {DecodedData.dob:yyyy.MM.dd}" + Result = "KO" }; + var result = await _DataService.InsertCheck(DecodedData, "0.0.0.0"); + if (result) + { + answ = new VC19Check + { + DTRecord = DateTime.Now, + CheckRecorded = true, + TimbrRecorder = true, + Result = $"OK, Check Recorded for {DecodedData.nam.fn} {DecodedData.nam.gn} {DecodedData.dob:yyyy.MM.dd}" + }; + } + else + { } return answ; } diff --git a/GPW.Api/GPW.Api/Data/GpwDataService.cs b/GPW.Api/GPW.Api/Data/GpwDataService.cs new file mode 100644 index 0000000..34cf868 --- /dev/null +++ b/GPW.Api/GPW.Api/Data/GpwDataService.cs @@ -0,0 +1,101 @@ +using GPW.Data; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; +using NLog; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; + +namespace GPW.Api.Data +{ + public class GpwDataService : IDisposable + { + #region Private Fields + + private static IConfiguration _configuration; + private static ILogger _logger; + + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + + #endregion Private Fields + + #region Public Fields + + public static GPW.Data.Controllers.DbController dbController; + + #endregion Public Fields + + #region Public Constructors + + public GpwDataService(IConfiguration configuration, ILogger logger) + { + _logger = logger; + _configuration = configuration; + // conf DB + string connStrDB = _configuration.GetConnectionString("Gpw.DB"); + if (string.IsNullOrEmpty(connStrDB)) + { + _logger.LogError("ConnString empty!"); + } + else + { + dbController = new GPW.Data.Controllers.DbController(configuration); + _logger.LogInformation("DbController OK"); + } + } + + #endregion Public Constructors + + #region Public Methods + + public async Task> ChecksGetByDip(int idxDip) + { + DateTime dtFine = DateTime.Today.AddDays(1); + List dbResult = new List(); + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + dbResult = dbController.GetChecksVC19Filt(idxDip, dtFine.AddMonths(-1), dtFine); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Trace($"Effettuata lettura da DB per ChecksGetByDip: {ts.TotalMilliseconds} ms"); + + return await Task.FromResult(dbResult); + } + + public async Task> ChecksGetLast(int numRecord) + { + List dbResult = new List(); + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + dbResult = dbController.GetChecksVC19(numRecord); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Trace($"Effettuata lettura da DB per ChecksGetLast: {ts.TotalMilliseconds} ms"); + + return await Task.FromResult(dbResult); + } + + public void Dispose() + { + // Clear database controller + dbController.Dispose(); + } + + public async Task InsertCheck(DCCDecode updItem, string clientIp) + { + bool done = false; + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + done = dbController.InsertCheck(updItem, clientIp); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Trace($"Effettuata operazione InsertCheck: {ts.TotalMilliseconds} ms"); + + return await Task.FromResult(done); + } + + #endregion Public Methods + } +} \ No newline at end of file diff --git a/GPW.Api/GPW.Api/Startup.cs b/GPW.Api/GPW.Api/Startup.cs index 4a8154b..c3c6161 100644 --- a/GPW.Api/GPW.Api/Startup.cs +++ b/GPW.Api/GPW.Api/Startup.cs @@ -1,3 +1,4 @@ +using GPW.Api.Data; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpsPolicy; @@ -16,23 +17,22 @@ namespace GPW.Api { public class Startup { + #region Public Constructors + public Startup(IConfiguration configuration) { Configuration = configuration; } + #endregion Public Constructors + + #region Public Properties + public IConfiguration Configuration { get; } - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) - { + #endregion Public Properties - services.AddControllers(); - services.AddSwaggerGen(c => - { - c.SwaggerDoc("v1", new OpenApiInfo { Title = "GPW.Api", Version = "v1" }); - }); - } + #region Public Methods // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) @@ -55,5 +55,19 @@ namespace GPW.Api endpoints.MapControllers(); }); } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddControllers(); + services.AddSwaggerGen(c => + { + c.SwaggerDoc("v1", new OpenApiInfo { Title = "GPW.Api", Version = "v1" }); + }); + + services.AddSingleton(); + } + + #endregion Public Methods } -} +} \ No newline at end of file diff --git a/GPW.Api/GPW.Api/appsettings.json b/GPW.Api/GPW.Api/appsettings.json index d9d9a9b..33dbf90 100644 --- a/GPW.Api/GPW.Api/appsettings.json +++ b/GPW.Api/GPW.Api/appsettings.json @@ -1,10 +1,13 @@ { - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "Gpw.DB": "Server=SQLSTEAM;Database=GPW;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=GPW.Api;" } - }, - "AllowedHosts": "*" -} +} \ No newline at end of file