@digipair/skill-web-ocr 0.136.3 → 0.136.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -491,7 +491,7 @@ var _Symbol, _a, _a1;
491
491
  }
492
492
  }, f$1 = function(t, s) {
493
493
  return !i$2(t, s);
494
- }, b$1 = {
494
+ }, b = {
495
495
  attribute: true,
496
496
  type: String,
497
497
  converter: u$1,
@@ -634,12 +634,11 @@ var y$1 = /*#__PURE__*/ function(HTMLElement1) {
634
634
  {
635
635
  key: "requestUpdate",
636
636
  value: function requestUpdate(t, s, i) {
637
- var e = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, h = arguments.length > 4 ? arguments[4] : void 0;
638
637
  if (void 0 !== t) {
639
638
  var _this__$Ej;
640
- var r = this.constructor;
639
+ var e = this.constructor, h = this[t];
641
640
  var _i_hasChanged;
642
- if (false === e && (h = this[t]), i !== null && i !== void 0 ? i : i = r.getPropertyOptions(t), !(((_i_hasChanged = i.hasChanged) !== null && _i_hasChanged !== void 0 ? _i_hasChanged : f$1)(h, s) || i.useDefault && i.reflect && h === ((_this__$Ej = this._$Ej) === null || _this__$Ej === void 0 ? void 0 : _this__$Ej.get(t)) && !this.hasAttribute(r._$Eu(t, i)))) return;
641
+ if (i !== null && i !== void 0 ? i : i = e.getPropertyOptions(t), !(((_i_hasChanged = i.hasChanged) !== null && _i_hasChanged !== void 0 ? _i_hasChanged : f$1)(h, s) || i.useDefault && i.reflect && h === ((_this__$Ej = this._$Ej) === null || _this__$Ej === void 0 ? void 0 : _this__$Ej.get(t)) && !this.hasAttribute(e._$Eu(t, i)))) return;
643
642
  this.C(t, s, i);
644
643
  }
645
644
  false === this.isUpdatePending && (this._$ES = this._$EP());
@@ -856,7 +855,7 @@ var y$1 = /*#__PURE__*/ function(HTMLElement1) {
856
855
  {
857
856
  key: "createProperty",
858
857
  value: function createProperty(t) {
859
- var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : b$1;
858
+ var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : b;
860
859
  if (s.state && (s.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = true), this.elementProperties.set(t, s), !s.noAccessor) {
861
860
  var i = Symbol(), h = this.getPropertyDescriptor(t, i, s);
862
861
  void 0 !== h && e$1(this.prototype, t, h);
@@ -890,7 +889,7 @@ var y$1 = /*#__PURE__*/ function(HTMLElement1) {
890
889
  key: "getPropertyOptions",
891
890
  value: function getPropertyOptions(t) {
892
891
  var _this_elementProperties_get;
893
- return (_this_elementProperties_get = this.elementProperties.get(t)) !== null && _this_elementProperties_get !== void 0 ? _this_elementProperties_get : b$1;
892
+ return (_this_elementProperties_get = this.elementProperties.get(t)) !== null && _this_elementProperties_get !== void 0 ? _this_elementProperties_get : b;
894
893
  }
895
894
  },
896
895
  {
@@ -1022,7 +1021,7 @@ y$1.elementStyles = [], y$1.shadowRootOptions = {
1022
1021
  mode: "open"
1023
1022
  }, y$1[d$1("elementProperties")] = new Map, y$1[d$1("finalized")] = new Map, p$1 === null || p$1 === void 0 ? void 0 : p$1({
1024
1023
  ReactiveElement: y$1
1025
- }), ((_reactiveElementVersions = (_a1 = a$1).reactiveElementVersions) !== null && _reactiveElementVersions !== void 0 ? _reactiveElementVersions : _a1.reactiveElementVersions = []).push("2.1.2");
1024
+ }), ((_reactiveElementVersions = (_a1 = a$1).reactiveElementVersions) !== null && _reactiveElementVersions !== void 0 ? _reactiveElementVersions : _a1.reactiveElementVersions = []).push("2.1.1");
1026
1025
 
1027
1026
  /**
1028
1027
  * @license
@@ -1172,19 +1171,17 @@ function _create_super$1(Derived) {
1172
1171
  };
1173
1172
  }
1174
1173
  var _t;
1175
- var t$1 = globalThis, i$1 = function(t) {
1176
- return t;
1177
- }, s$1 = t$1.trustedTypes, e = s$1 ? s$1.createPolicy("lit-html", {
1174
+ var t$1 = globalThis, i$1 = t$1.trustedTypes, s$1 = i$1 ? i$1.createPolicy("lit-html", {
1178
1175
  createHTML: function(t) {
1179
1176
  return t;
1180
1177
  }
1181
- }) : void 0, h = "$lit$", o$2 = "lit$".concat(Math.random().toFixed(9).slice(2), "$"), n$1 = "?" + o$2, r$2 = "<".concat(n$1, ">"), l = document, c = function() {
1182
- return l.createComment("");
1183
- }, a = function(t) {
1178
+ }) : void 0, e = "$lit$", h = "lit$".concat(Math.random().toFixed(9).slice(2), "$"), o$2 = "?" + h, n$1 = "<".concat(o$2, ">"), r$2 = document, l = function() {
1179
+ return r$2.createComment("");
1180
+ }, c = function(t) {
1184
1181
  return null === t || "object" != (typeof t === "undefined" ? "undefined" : _type_of$3(t)) && "function" != typeof t;
1185
- }, u = Array.isArray, d = function(t) {
1186
- return u(t) || "function" == typeof (t === null || t === void 0 ? void 0 : t[Symbol.iterator]);
1187
- }, f = "[ \t\n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(">|".concat(f, "(?:([^\\s\"'>=/]+)(").concat(f, "*=").concat(f, "*(?:[^ \n\f\r\"'`<>=]|(\"|')|))|$)"), "g"), g = /'/g, $ = /"/g, y = /^(?:script|style|textarea|title)$/i, x = function(t) {
1182
+ }, a = Array.isArray, u = function(t) {
1183
+ return a(t) || "function" == typeof (t === null || t === void 0 ? void 0 : t[Symbol.iterator]);
1184
+ }, d = "[ \t\n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(">|".concat(d, "(?:([^\\s\"'>=/]+)(").concat(d, "*=").concat(d, "*(?:[^ \n\f\r\"'`<>=]|(\"|')|))|$)"), "g"), p = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, y = function(t) {
1188
1185
  return function(i) {
1189
1186
  for(var _len = arguments.length, s = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
1190
1187
  s[_key - 1] = arguments[_key];
@@ -1195,57 +1192,57 @@ var t$1 = globalThis, i$1 = function(t) {
1195
1192
  values: s
1196
1193
  };
1197
1194
  };
1198
- }, b = x(1), E = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), C = new WeakMap, P = l.createTreeWalker(l, 129);
1199
- function V(t, i) {
1200
- if (!u(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
1201
- return void 0 !== e ? e.createHTML(i) : i;
1195
+ }, x = y(1), T = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), A = new WeakMap, C = r$2.createTreeWalker(r$2, 129);
1196
+ function P(t, i) {
1197
+ if (!a(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
1198
+ return void 0 !== s$1 ? s$1.createHTML(i) : i;
1202
1199
  }
1203
- var N = function(t, i) {
1204
- var s = t.length - 1, e = [];
1205
- var n, l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "", c = v;
1200
+ var V = function(t, i) {
1201
+ var s = t.length - 1, o = [];
1202
+ var r, l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "", c = f;
1206
1203
  for(var _$i = 0; _$i < s; _$i++){
1207
1204
  var s1 = t[_$i];
1208
- var a = void 0, u = void 0, d = -1, f = 0;
1209
- for(; f < s1.length && (c.lastIndex = f, u = c.exec(s1), null !== u);)f = c.lastIndex, c === v ? "!--" === u[1] ? c = _ : void 0 !== u[1] ? c = m : void 0 !== u[2] ? (y.test(u[2]) && (n = RegExp("</" + u[2], "g")), c = p) : void 0 !== u[3] && (c = p) : c === p ? ">" === u[0] ? (c = n !== null && n !== void 0 ? n : v, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? p : '"' === u[3] ? $ : g) : c === $ || c === g ? c = p : c === _ || c === m ? c = v : (c = p, n = void 0);
1210
- var x = c === p && t[_$i + 1].startsWith("/>") ? " " : "";
1211
- l += c === v ? s1 + r$2 : d >= 0 ? (e.push(a), s1.slice(0, d) + h + s1.slice(d) + o$2 + x) : s1 + o$2 + (-2 === d ? _$i : x);
1205
+ var a = void 0, u = void 0, d = -1, y = 0;
1206
+ for(; y < s1.length && (c.lastIndex = y, u = c.exec(s1), null !== u);)y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : void 0 !== u[3] && (c = m) : c === m ? ">" === u[0] ? (c = r !== null && r !== void 0 ? r : f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = void 0);
1207
+ var x = c === m && t[_$i + 1].startsWith("/>") ? " " : "";
1208
+ l += c === f ? s1 + n$1 : d >= 0 ? (o.push(a), s1.slice(0, d) + e + s1.slice(d) + h + x) : s1 + h + (-2 === d ? _$i : x);
1212
1209
  }
1213
1210
  return [
1214
- V(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")),
1215
- e
1211
+ P(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")),
1212
+ o
1216
1213
  ];
1217
1214
  };
1218
- var S = /*#__PURE__*/ function() {
1219
- function S(param, e) {
1220
- var t = param.strings, i = param._$litType$;
1221
- _class_call_check$1(this, S);
1215
+ var N = /*#__PURE__*/ function() {
1216
+ function N(param, n) {
1217
+ var t = param.strings, s = param._$litType$;
1218
+ _class_call_check$1(this, N);
1222
1219
  var r;
1223
1220
  this.parts = [];
1224
- var l = 0, a = 0;
1225
- var u = t.length - 1, d = this.parts, _N = _sliced_to_array(N(t, i), 2), f = _N[0], v = _N[1];
1226
- if (this.el = S.createElement(f, e), P.currentNode = this.el.content, 2 === i || 3 === i) {
1221
+ var c = 0, a = 0;
1222
+ var u = t.length - 1, d = this.parts, _V = _sliced_to_array(V(t, s), 2), f = _V[0], v = _V[1];
1223
+ if (this.el = N.createElement(f, n), C.currentNode = this.el.content, 2 === s || 3 === s) {
1227
1224
  var _t;
1228
1225
  var t1 = this.el.content.firstChild;
1229
1226
  (_t = t1).replaceWith.apply(_t, _to_consumable_array(t1.childNodes));
1230
1227
  }
1231
- for(; null !== (r = P.nextNode()) && d.length < u;){
1228
+ for(; null !== (r = C.nextNode()) && d.length < u;){
1232
1229
  if (1 === r.nodeType) {
1233
1230
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1234
1231
  if (r.hasAttributes()) try {
1235
1232
  for(var _iterator = r.getAttributeNames()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1236
1233
  var t2 = _step.value;
1237
- if (t2.endsWith(h)) {
1238
- var i1 = v[a++], s1 = r.getAttribute(t2).split(o$2), _$e = /([.?@])?(.*)/.exec(i1);
1234
+ if (t2.endsWith(e)) {
1235
+ var i1 = v[a++], s1 = r.getAttribute(t2).split(h), e1 = /([.?@])?(.*)/.exec(i1);
1239
1236
  d.push({
1240
1237
  type: 1,
1241
- index: l,
1242
- name: _$e[2],
1238
+ index: c,
1239
+ name: e1[2],
1243
1240
  strings: s1,
1244
- ctor: "." === _$e[1] ? I : "?" === _$e[1] ? L : "@" === _$e[1] ? z : H
1241
+ ctor: "." === e1[1] ? H : "?" === e1[1] ? I : "@" === e1[1] ? L : k
1245
1242
  }), r.removeAttribute(t2);
1246
- } else t2.startsWith(o$2) && (d.push({
1243
+ } else t2.startsWith(h) && (d.push({
1247
1244
  type: 6,
1248
- index: l
1245
+ index: c
1249
1246
  }), r.removeAttribute(t2));
1250
1247
  }
1251
1248
  } catch (err) {
@@ -1262,58 +1259,58 @@ var S = /*#__PURE__*/ function() {
1262
1259
  }
1263
1260
  }
1264
1261
  }
1265
- if (y.test(r.tagName)) {
1266
- var t3 = r.textContent.split(o$2), i2 = t3.length - 1;
1267
- if (i2 > 0) {
1268
- r.textContent = s$1 ? s$1.emptyScript : "";
1269
- for(var s2 = 0; s2 < i2; s2++)r.append(t3[s2], c()), P.nextNode(), d.push({
1262
+ if ($.test(r.tagName)) {
1263
+ var t3 = r.textContent.split(h), s2 = t3.length - 1;
1264
+ if (s2 > 0) {
1265
+ r.textContent = i$1 ? i$1.emptyScript : "";
1266
+ for(var i2 = 0; i2 < s2; i2++)r.append(t3[i2], l()), C.nextNode(), d.push({
1270
1267
  type: 2,
1271
- index: ++l
1268
+ index: ++c
1272
1269
  });
1273
- r.append(t3[i2], c());
1270
+ r.append(t3[s2], l());
1274
1271
  }
1275
1272
  }
1276
- } else if (8 === r.nodeType) if (r.data === n$1) d.push({
1273
+ } else if (8 === r.nodeType) if (r.data === o$2) d.push({
1277
1274
  type: 2,
1278
- index: l
1275
+ index: c
1279
1276
  });
1280
1277
  else {
1281
1278
  var t4 = -1;
1282
- for(; -1 !== (t4 = r.data.indexOf(o$2, t4 + 1));)d.push({
1279
+ for(; -1 !== (t4 = r.data.indexOf(h, t4 + 1));)d.push({
1283
1280
  type: 7,
1284
- index: l
1285
- }), t4 += o$2.length - 1;
1281
+ index: c
1282
+ }), t4 += h.length - 1;
1286
1283
  }
1287
- l++;
1284
+ c++;
1288
1285
  }
1289
1286
  }
1290
- _create_class$1(S, null, [
1287
+ _create_class$1(N, null, [
1291
1288
  {
1292
1289
  key: "createElement",
1293
1290
  value: function createElement(t, i) {
1294
- var s = l.createElement("template");
1291
+ var s = r$2.createElement("template");
1295
1292
  return s.innerHTML = t, s;
1296
1293
  }
1297
1294
  }
1298
1295
  ]);
1299
- return S;
1296
+ return N;
1300
1297
  }();
1301
- function M(t, i) {
1298
+ function S(t, i) {
1302
1299
  var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t, e = arguments.length > 3 ? arguments[3] : void 0;
1303
1300
  var _s__$Co, _h__$AO;
1304
1301
  var _s;
1305
- if (i === E) return i;
1302
+ if (i === T) return i;
1306
1303
  var h = void 0 !== e ? (_s__$Co = s._$Co) === null || _s__$Co === void 0 ? void 0 : _s__$Co[e] : s._$Cl;
1307
- var o = a(i) ? void 0 : i._$litDirective$;
1304
+ var o = c(i) ? void 0 : i._$litDirective$;
1308
1305
  var __$Co;
1309
- return (h === null || h === void 0 ? void 0 : h.constructor) !== o && (h === null || h === void 0 ? void 0 : (_h__$AO = h._$AO) === null || _h__$AO === void 0 ? void 0 : _h__$AO.call(h, false), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? ((__$Co = (_s = s)._$Co) !== null && __$Co !== void 0 ? __$Co : _s._$Co = [])[e] = h : s._$Cl = h), void 0 !== h && (i = M(t, h._$AS(t, i.values), h, e)), i;
1306
+ return (h === null || h === void 0 ? void 0 : h.constructor) !== o && (h === null || h === void 0 ? void 0 : (_h__$AO = h._$AO) === null || _h__$AO === void 0 ? void 0 : _h__$AO.call(h, false), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? ((__$Co = (_s = s)._$Co) !== null && __$Co !== void 0 ? __$Co : _s._$Co = [])[e] = h : s._$Cl = h), void 0 !== h && (i = S(t, h._$AS(t, i.values), h, e)), i;
1310
1307
  }
1311
- var R = /*#__PURE__*/ function() {
1312
- function R(t, i) {
1313
- _class_call_check$1(this, R);
1308
+ var M = /*#__PURE__*/ function() {
1309
+ function M(t, i) {
1310
+ _class_call_check$1(this, M);
1314
1311
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
1315
1312
  }
1316
- _create_class$1(R, [
1313
+ _create_class$1(M, [
1317
1314
  {
1318
1315
  key: "parentNode",
1319
1316
  get: function get() {
@@ -1330,17 +1327,17 @@ var R = /*#__PURE__*/ function() {
1330
1327
  key: "u",
1331
1328
  value: function u(t) {
1332
1329
  var _t_creationScope;
1333
- var _this__$AD = this._$AD, _this__$AD_el = _this__$AD.el, i = _this__$AD_el.content, s = _this__$AD.parts, e = ((_t_creationScope = t === null || t === void 0 ? void 0 : t.creationScope) !== null && _t_creationScope !== void 0 ? _t_creationScope : l).importNode(i, true);
1334
- P.currentNode = e;
1335
- var h = P.nextNode(), o = 0, n = 0, r = s[0];
1336
- for(; void 0 !== r;){
1337
- if (o === r.index) {
1330
+ var _this__$AD = this._$AD, _this__$AD_el = _this__$AD.el, i = _this__$AD_el.content, s = _this__$AD.parts, e = ((_t_creationScope = t === null || t === void 0 ? void 0 : t.creationScope) !== null && _t_creationScope !== void 0 ? _t_creationScope : r$2).importNode(i, true);
1331
+ C.currentNode = e;
1332
+ var h = C.nextNode(), o = 0, n = 0, l = s[0];
1333
+ for(; void 0 !== l;){
1334
+ if (o === l.index) {
1338
1335
  var i1 = void 0;
1339
- 2 === r.type ? i1 = new k(h, h.nextSibling, this, t) : 1 === r.type ? i1 = new r.ctor(h, r.name, r.strings, this, t) : 6 === r.type && (i1 = new Z(h, this, t)), this._$AV.push(i1), r = s[++n];
1336
+ 2 === l.type ? i1 = new R(h, h.nextSibling, this, t) : 1 === l.type ? i1 = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i1 = new z(h, this, t)), this._$AV.push(i1), l = s[++n];
1340
1337
  }
1341
- o !== (r === null || r === void 0 ? void 0 : r.index) && (h = P.nextNode(), o++);
1338
+ o !== (l === null || l === void 0 ? void 0 : l.index) && (h = C.nextNode(), o++);
1342
1339
  }
1343
- return P.currentNode = l, e;
1340
+ return C.currentNode = r$2, e;
1344
1341
  }
1345
1342
  },
1346
1343
  {
@@ -1370,15 +1367,15 @@ var R = /*#__PURE__*/ function() {
1370
1367
  }
1371
1368
  }
1372
1369
  ]);
1373
- return R;
1370
+ return M;
1374
1371
  }();
1375
- var k = /*#__PURE__*/ function() {
1376
- function k(t, i, s, e) {
1377
- _class_call_check$1(this, k);
1372
+ var R = /*#__PURE__*/ function() {
1373
+ function R(t, i, s, e) {
1374
+ _class_call_check$1(this, R);
1378
1375
  var _e_isConnected;
1379
- this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = (_e_isConnected = e === null || e === void 0 ? void 0 : e.isConnected) !== null && _e_isConnected !== void 0 ? _e_isConnected : true;
1376
+ this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = (_e_isConnected = e === null || e === void 0 ? void 0 : e.isConnected) !== null && _e_isConnected !== void 0 ? _e_isConnected : true;
1380
1377
  }
1381
- _create_class$1(k, [
1378
+ _create_class$1(R, [
1382
1379
  {
1383
1380
  key: "_$AU",
1384
1381
  get: function get() {
@@ -1411,7 +1408,7 @@ var k = /*#__PURE__*/ function() {
1411
1408
  key: "_$AI",
1412
1409
  value: function _$AI(t) {
1413
1410
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this;
1414
- t = M(this, t, i), a(t) ? t === A || null == t || "" === t ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== E && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : d(t) ? this.k(t) : this._(t);
1411
+ t = S(this, t, i), c(t) ? t === E || null == t || "" === t ? (this._$AH !== E && this._$AR(), this._$AH = E) : t !== this._$AH && t !== T && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : u(t) ? this.k(t) : this._(t);
1415
1412
  }
1416
1413
  },
1417
1414
  {
@@ -1429,17 +1426,17 @@ var k = /*#__PURE__*/ function() {
1429
1426
  {
1430
1427
  key: "_",
1431
1428
  value: function _(t) {
1432
- this._$AH !== A && a(this._$AH) ? this._$AA.nextSibling.data = t : this.T(l.createTextNode(t)), this._$AH = t;
1429
+ this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$2.createTextNode(t)), this._$AH = t;
1433
1430
  }
1434
1431
  },
1435
1432
  {
1436
1433
  key: "$",
1437
1434
  value: function $(t) {
1438
1435
  var _this__$AH;
1439
- var i = t.values, s = t._$litType$, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = S.createElement(V(s.h, s.h[0]), this.options)), s);
1436
+ var i = t.values, s = t._$litType$, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = N.createElement(P(s.h, s.h[0]), this.options)), s);
1440
1437
  if (((_this__$AH = this._$AH) === null || _this__$AH === void 0 ? void 0 : _this__$AH._$AD) === e) this._$AH.p(i);
1441
1438
  else {
1442
- var _$t = new R(e, this), s1 = _$t.u(this.options);
1439
+ var _$t = new M(e, this), s1 = _$t.u(this.options);
1443
1440
  _$t.p(i), this.T(s1), this._$AH = _$t;
1444
1441
  }
1445
1442
  }
@@ -1447,21 +1444,21 @@ var k = /*#__PURE__*/ function() {
1447
1444
  {
1448
1445
  key: "_$AC",
1449
1446
  value: function _$AC(t) {
1450
- var i = C.get(t.strings);
1451
- return void 0 === i && C.set(t.strings, i = new S(t)), i;
1447
+ var i = A.get(t.strings);
1448
+ return void 0 === i && A.set(t.strings, i = new N(t)), i;
1452
1449
  }
1453
1450
  },
1454
1451
  {
1455
1452
  key: "k",
1456
- value: function k1(t) {
1457
- u(this._$AH) || (this._$AH = [], this._$AR());
1453
+ value: function k(t) {
1454
+ a(this._$AH) || (this._$AH = [], this._$AR());
1458
1455
  var i = this._$AH;
1459
1456
  var s, e = 0;
1460
1457
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1461
1458
  try {
1462
1459
  for(var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1463
1460
  var h = _step.value;
1464
- e === i.length ? i.push(s = new k(this.O(c()), this.O(c()), this, this.options)) : s = i[e], s._$AI(h), e++;
1461
+ e === i.length ? i.push(s = new R(this.O(l()), this.O(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
1465
1462
  }
1466
1463
  } catch (err) {
1467
1464
  _didIteratorError = true;
@@ -1483,11 +1480,11 @@ var k = /*#__PURE__*/ function() {
1483
1480
  {
1484
1481
  key: "_$AR",
1485
1482
  value: function _$AR() {
1486
- var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this._$AA.nextSibling, s = arguments.length > 1 ? arguments[1] : void 0;
1483
+ var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this._$AA.nextSibling, i = arguments.length > 1 ? arguments[1] : void 0;
1487
1484
  var _this__$AP, _this;
1488
- for((_this__$AP = (_this = this)._$AP) === null || _this__$AP === void 0 ? void 0 : _this__$AP.call(_this, false, true, s); t !== this._$AB;){
1489
- var s1 = i$1(t).nextSibling;
1490
- i$1(t).remove(), t = s1;
1485
+ for((_this__$AP = (_this = this)._$AP) === null || _this__$AP === void 0 ? void 0 : _this__$AP.call(_this, false, true, i); t !== this._$AB;){
1486
+ var i1 = t.nextSibling;
1487
+ t.remove(), t = i1;
1491
1488
  }
1492
1489
  }
1493
1490
  },
@@ -1499,14 +1496,14 @@ var k = /*#__PURE__*/ function() {
1499
1496
  }
1500
1497
  }
1501
1498
  ]);
1502
- return k;
1499
+ return R;
1503
1500
  }();
1504
- var H = /*#__PURE__*/ function() {
1505
- function H(t, i, s, e, h) {
1506
- _class_call_check$1(this, H);
1507
- this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String), this.strings = s) : this._$AH = A;
1501
+ var k = /*#__PURE__*/ function() {
1502
+ function k(t, i, s, e, h) {
1503
+ _class_call_check$1(this, k);
1504
+ this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String), this.strings = s) : this._$AH = E;
1508
1505
  }
1509
- _create_class$1(H, [
1506
+ _create_class$1(k, [
1510
1507
  {
1511
1508
  key: "tagName",
1512
1509
  get: function get() {
@@ -1525,11 +1522,11 @@ var H = /*#__PURE__*/ function() {
1525
1522
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this, s = arguments.length > 2 ? arguments[2] : void 0, e = arguments.length > 3 ? arguments[3] : void 0;
1526
1523
  var h = this.strings;
1527
1524
  var o = false;
1528
- if (void 0 === h) t = M(this, t, i, 0), o = !a(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
1525
+ if (void 0 === h) t = S(this, t, i, 0), o = !c(t) || t !== this._$AH && t !== T, o && (this._$AH = t);
1529
1526
  else {
1530
1527
  var e1 = t;
1531
1528
  var n, r;
1532
- for(t = h[0], n = 0; n < h.length - 1; n++)r = M(this, e1[s + n], i, n), r === E && (r = this._$AH[n]), o || (o = !a(r) || r !== this._$AH[n]), r === A ? t = A : t !== A && (t += (r !== null && r !== void 0 ? r : "") + h[n + 1]), this._$AH[n] = r;
1529
+ for(t = h[0], n = 0; n < h.length - 1; n++)r = S(this, e1[s + n], i, n), r === T && (r = this._$AH[n]), o || (o = !c(r) || r !== this._$AH[n]), r === E ? t = E : t !== E && (t += (r !== null && r !== void 0 ? r : "") + h[n + 1]), this._$AH[n] = r;
1533
1530
  }
1534
1531
  o && !e && this.j(t);
1535
1532
  }
@@ -1537,71 +1534,71 @@ var H = /*#__PURE__*/ function() {
1537
1534
  {
1538
1535
  key: "j",
1539
1536
  value: function j(t) {
1540
- t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t !== null && t !== void 0 ? t : "");
1537
+ t === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t !== null && t !== void 0 ? t : "");
1541
1538
  }
1542
1539
  }
1543
1540
  ]);
1544
- return H;
1541
+ return k;
1545
1542
  }();
1546
- var I = /*#__PURE__*/ function(H) {
1547
- _inherits$1(I, H);
1548
- var _super = _create_super$1(I);
1549
- function I() {
1550
- _class_call_check$1(this, I);
1543
+ var H = /*#__PURE__*/ function(k) {
1544
+ _inherits$1(H, k);
1545
+ var _super = _create_super$1(H);
1546
+ function H() {
1547
+ _class_call_check$1(this, H);
1551
1548
  var _this;
1552
1549
  _this = _super.call.apply(_super, [
1553
1550
  this
1554
1551
  ].concat(Array.prototype.slice.call(arguments))), _this.type = 3;
1555
1552
  return _possible_constructor_return$1(_this);
1556
1553
  }
1557
- _create_class$1(I, [
1554
+ _create_class$1(H, [
1558
1555
  {
1559
1556
  key: "j",
1560
1557
  value: function j(t) {
1561
- this.element[this.name] = t === A ? void 0 : t;
1558
+ this.element[this.name] = t === E ? void 0 : t;
1562
1559
  }
1563
1560
  }
1564
1561
  ]);
1565
- return I;
1566
- }(H);
1567
- var L = /*#__PURE__*/ function(H) {
1568
- _inherits$1(L, H);
1569
- var _super = _create_super$1(L);
1570
- function L() {
1571
- _class_call_check$1(this, L);
1562
+ return H;
1563
+ }(k);
1564
+ var I = /*#__PURE__*/ function(k) {
1565
+ _inherits$1(I, k);
1566
+ var _super = _create_super$1(I);
1567
+ function I() {
1568
+ _class_call_check$1(this, I);
1572
1569
  var _this;
1573
1570
  _this = _super.call.apply(_super, [
1574
1571
  this
1575
1572
  ].concat(Array.prototype.slice.call(arguments))), _this.type = 4;
1576
1573
  return _possible_constructor_return$1(_this);
1577
1574
  }
1578
- _create_class$1(L, [
1575
+ _create_class$1(I, [
1579
1576
  {
1580
1577
  key: "j",
1581
1578
  value: function j(t) {
1582
- this.element.toggleAttribute(this.name, !!t && t !== A);
1579
+ this.element.toggleAttribute(this.name, !!t && t !== E);
1583
1580
  }
1584
1581
  }
1585
1582
  ]);
1586
- return L;
1587
- }(H);
1588
- var z = /*#__PURE__*/ function(H) {
1589
- _inherits$1(z, H);
1590
- var _super = _create_super$1(z);
1591
- function z(t, i, s, e, h) {
1592
- _class_call_check$1(this, z);
1583
+ return I;
1584
+ }(k);
1585
+ var L = /*#__PURE__*/ function(k) {
1586
+ _inherits$1(L, k);
1587
+ var _super = _create_super$1(L);
1588
+ function L(t, i, s, e, h) {
1589
+ _class_call_check$1(this, L);
1593
1590
  var _this;
1594
1591
  _this = _super.call(this, t, i, s, e, h), _this.type = 5;
1595
1592
  return _possible_constructor_return$1(_this);
1596
1593
  }
1597
- _create_class$1(z, [
1594
+ _create_class$1(L, [
1598
1595
  {
1599
1596
  key: "_$AI",
1600
1597
  value: function _$AI(t) {
1601
1598
  var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this;
1602
- var _M;
1603
- if ((t = (_M = M(this, t, i, 0)) !== null && _M !== void 0 ? _M : A) === E) return;
1604
- var s = this._$AH, e = t === A && s !== A || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== A && (s === A || e);
1599
+ var _S;
1600
+ if ((t = (_S = S(this, t, i, 0)) !== null && _S !== void 0 ? _S : E) === T) return;
1601
+ var s = this._$AH, e = t === E && s !== E || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== E && (s === E || e);
1605
1602
  e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
1606
1603
  }
1607
1604
  },
@@ -1614,14 +1611,14 @@ var z = /*#__PURE__*/ function(H) {
1614
1611
  }
1615
1612
  }
1616
1613
  ]);
1617
- return z;
1618
- }(H);
1619
- var Z = /*#__PURE__*/ function() {
1620
- function Z(t, i, s) {
1621
- _class_call_check$1(this, Z);
1614
+ return L;
1615
+ }(k);
1616
+ var z = /*#__PURE__*/ function() {
1617
+ function z(t, i, s) {
1618
+ _class_call_check$1(this, z);
1622
1619
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
1623
1620
  }
1624
- _create_class$1(Z, [
1621
+ _create_class$1(z, [
1625
1622
  {
1626
1623
  key: "_$AU",
1627
1624
  get: function get() {
@@ -1631,23 +1628,23 @@ var Z = /*#__PURE__*/ function() {
1631
1628
  {
1632
1629
  key: "_$AI",
1633
1630
  value: function _$AI(t) {
1634
- M(this, t);
1631
+ S(this, t);
1635
1632
  }
1636
1633
  }
1637
1634
  ]);
1638
- return Z;
1635
+ return z;
1639
1636
  }();
1640
- var B = t$1.litHtmlPolyfillSupport;
1637
+ var j = t$1.litHtmlPolyfillSupport;
1641
1638
  var _litHtmlVersions;
1642
- B === null || B === void 0 ? void 0 : B(S, k), ((_litHtmlVersions = (_t = t$1).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t.litHtmlVersions = []).push("3.3.3");
1643
- var D = function(t, i, s) {
1639
+ j === null || j === void 0 ? void 0 : j(N, R), ((_litHtmlVersions = (_t = t$1).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t.litHtmlVersions = []).push("3.3.1");
1640
+ var B = function(t, i, s) {
1644
1641
  var _s_renderBefore;
1645
1642
  var e = (_s_renderBefore = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore !== void 0 ? _s_renderBefore : i;
1646
1643
  var h = e._$litPart$;
1647
1644
  if (void 0 === h) {
1648
1645
  var _s_renderBefore1;
1649
1646
  var _$t = (_s_renderBefore1 = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore1 !== void 0 ? _s_renderBefore1 : null;
1650
- e._$litPart$ = h = new k(i.insertBefore(c(), _$t), _$t, void 0, s !== null && s !== void 0 ? s : {});
1647
+ e._$litPart$ = h = new R(i.insertBefore(l(), _$t), _$t, void 0, s !== null && s !== void 0 ? s : {});
1651
1648
  }
1652
1649
  return h._$AI(t), h;
1653
1650
  };
@@ -1793,7 +1790,7 @@ var i = /*#__PURE__*/ function(t) {
1793
1790
  key: "update",
1794
1791
  value: function update(t) {
1795
1792
  var r = this.render();
1796
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), _get(_get_prototype_of(i.prototype), "update", this).call(this, t), this._$Do = D(r, this.renderRoot, this.renderOptions);
1793
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), _get(_get_prototype_of(i.prototype), "update", this).call(this, t), this._$Do = B(r, this.renderRoot, this.renderOptions);
1797
1794
  }
1798
1795
  },
1799
1796
  {
@@ -1813,7 +1810,7 @@ var i = /*#__PURE__*/ function(t) {
1813
1810
  {
1814
1811
  key: "render",
1815
1812
  value: function render() {
1816
- return E;
1813
+ return T;
1817
1814
  }
1818
1815
  }
1819
1816
  ]);
@@ -1827,7 +1824,7 @@ o$1 === null || o$1 === void 0 ? void 0 : o$1({
1827
1824
  LitElement: i
1828
1825
  });
1829
1826
  var _litElementVersions;
1830
- ((_litElementVersions = (_s = s).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _s.litElementVersions = []).push("4.2.2");
1827
+ ((_litElementVersions = (_s = s).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _s.litElementVersions = []).push("4.2.1");
1831
1828
 
1832
1829
  /**
1833
1830
  * @license
@@ -1864,7 +1861,7 @@ function _type_of$1(obj) {
1864
1861
  return {
1865
1862
  set: function set(r) {
1866
1863
  var n = _$e.get.call(this);
1867
- _$e.set.call(this, r), this.requestUpdate(o1, n, _$t, true, r);
1864
+ _$e.set.call(this, r), this.requestUpdate(o1, n, _$t);
1868
1865
  },
1869
1866
  init: function init(e) {
1870
1867
  return void 0 !== e && this.C(o1, void 0, _$t, e), e;
@@ -1875,7 +1872,7 @@ function _type_of$1(obj) {
1875
1872
  var o2 = r.name;
1876
1873
  return function r(r) {
1877
1874
  var n = this[o2];
1878
- _$e.call(this, r), this.requestUpdate(o2, n, _$t, true, r);
1875
+ _$e.call(this, r), this.requestUpdate(o2, n, _$t);
1879
1876
  };
1880
1877
  }
1881
1878
  throw Error("Unsupported decorator location: " + n);
@@ -5142,7 +5139,7 @@ class HiddenElement extends i {
5142
5139
  return text;
5143
5140
  }
5144
5141
  render() {
5145
- return b``;
5142
+ return x``;
5146
5143
  }
5147
5144
  constructor(...args){
5148
5145
  super(...args);
@@ -5235,7 +5232,7 @@ class InputOcrElement extends i {
5235
5232
  return text;
5236
5233
  }
5237
5234
  render() {
5238
- return b`
5235
+ return x`
5239
5236
  <section
5240
5237
  class="download ${this.state}"
5241
5238
  @click=${()=>[
@@ -5243,8 +5240,8 @@ class InputOcrElement extends i {
5243
5240
  'loaded'
5244
5241
  ].indexOf(this.state) >= 0 ? this.loadFile() : void 0}
5245
5242
  >
5246
- ${this.state === 'loaded' ? b` <ui5-icon name="attachment"></ui5-icon>
5247
- <p>${this.label}<br />${this._content}</p>` : this.state === 'loading' ? b`<ui5-busy-indicator size="Small" active></ui5-busy-indicator>` : b` <ui5-icon name="add-document"></ui5-icon>
5243
+ ${this.state === 'loaded' ? x` <ui5-icon name="attachment"></ui5-icon>
5244
+ <p>${this.label}<br />${this._content}</p>` : this.state === 'loading' ? x`<ui5-busy-indicator size="Small" active></ui5-busy-indicator>` : x` <ui5-icon name="add-document"></ui5-icon>
5248
5245
  <p>${this.label}</p>`}
5249
5246
  </section>
5250
5247
  `;
@@ -0,0 +1,2 @@
1
+ export * from './lib/skill-web-ocr';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { LitElement, TemplateResult } from 'lit';
2
+ export declare class HiddenElement extends LitElement {
3
+ selector: string;
4
+ language: string;
5
+ required: boolean;
6
+ private _value;
7
+ get value(): string | ArrayBuffer;
8
+ connectedCallback(): void;
9
+ private initialize;
10
+ private analyzeFile;
11
+ render(): TemplateResult;
12
+ }
13
+ //# sourceMappingURL=input-ocr-image.element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-ocr-image.element.d.ts","sourceRoot":"","sources":["../../../src/lib/input-ocr-image.element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAQ,MAAM,KAAK,CAAC;AAIvD,qBACa,aAAc,SAAQ,UAAU;IAE3C,QAAQ,EAAG,MAAM,CAAC;IAGlB,QAAQ,SAAS;IAGjB,QAAQ,UAAQ;IAEhB,OAAO,CAAC,MAAM,CAA4B;IAC1C,IAAI,KAAK,IAAI,MAAM,GAAG,WAAW,CAEhC;IAEQ,iBAAiB,IAAI,IAAI;YAKpB,UAAU;YAQV,WAAW;IAUhB,MAAM,IAAI,cAAc;CAGlC"}
@@ -0,0 +1,17 @@
1
+ import { LitElement, TemplateResult } from 'lit';
2
+ export declare class InputOcrElement extends LitElement {
3
+ label: string;
4
+ language: string;
5
+ accept: string;
6
+ required: boolean;
7
+ private state;
8
+ private _content;
9
+ get content(): string;
10
+ private _value;
11
+ get value(): string | ArrayBuffer;
12
+ static styles: import("lit").CSSResult;
13
+ private loadFile;
14
+ private analyzeFile;
15
+ render(): TemplateResult;
16
+ }
17
+ //# sourceMappingURL=input-ocr.element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-ocr.element.d.ts","sourceRoot":"","sources":["../../../src/lib/input-ocr.element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAa,MAAM,KAAK,CAAC;AAI5D,qBACa,eAAgB,SAAQ,UAAU;IAE7C,KAAK,SAAY;IAGjB,QAAQ,SAAS;IAGjB,MAAM,SAAa;IAGnB,QAAQ,UAAQ;IAGhB,OAAO,CAAC,KAAK,CAAc;IAG3B,OAAO,CAAC,QAAQ,CAA+B;IAC/C,IAAI,OAAO,WAEV;IAED,OAAO,CAAC,MAAM,CAA4B;IAC1C,IAAI,KAAK,IAAI,MAAM,GAAG,WAAW,CAEhC;IAED,OAAgB,MAAM,0BAiCpB;IAEF,OAAO,CAAC,QAAQ;YAkBF,WAAW;IAUhB,MAAM,IAAI,cAAc;CAgBlC"}
@@ -0,0 +1,3 @@
1
+ export * from './input-ocr-image.element';
2
+ export * from './input-ocr.element';
3
+ //# sourceMappingURL=skill-web-ocr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-web-ocr.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-web-ocr.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-web-ocr",
3
- "version": "0.136.3",
3
+ "version": "0.136.4",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",