@unissey-web/web-components 5.0.0-beta.3 → 5.0.0-beta.5

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.
@@ -112,306 +112,113 @@ function _possibleConstructorReturn(t, e) {
112
112
  if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
113
113
  return _assertThisInitialized(t);
114
114
  }
115
- function _regeneratorRuntime() {
116
- _regeneratorRuntime = function () {
117
- return e;
118
- };
119
- var t,
120
- e = {},
121
- r = Object.prototype,
122
- n = r.hasOwnProperty,
123
- o = Object.defineProperty || function (t, e, r) {
124
- t[e] = r.value;
125
- },
126
- i = "function" == typeof Symbol ? Symbol : {},
127
- a = i.iterator || "@@iterator",
128
- c = i.asyncIterator || "@@asyncIterator",
129
- u = i.toStringTag || "@@toStringTag";
130
- function define(t, e, r) {
131
- return Object.defineProperty(t, e, {
132
- value: r,
133
- enumerable: !0,
134
- configurable: !0,
135
- writable: !0
136
- }), t[e];
137
- }
138
- try {
139
- define({}, "");
140
- } catch (t) {
141
- define = function (t, e, r) {
142
- return t[e] = r;
143
- };
144
- }
145
- function wrap(t, e, r, n) {
146
- var i = e && e.prototype instanceof Generator ? e : Generator,
147
- a = Object.create(i.prototype),
148
- c = new Context(n || []);
149
- return o(a, "_invoke", {
150
- value: makeInvokeMethod(t, r, c)
151
- }), a;
152
- }
153
- function tryCatch(t, e, r) {
154
- try {
155
- return {
156
- type: "normal",
157
- arg: t.call(e, r)
158
- };
159
- } catch (t) {
160
- return {
161
- type: "throw",
162
- arg: t
163
- };
164
- }
165
- }
166
- e.wrap = wrap;
167
- var h = "suspendedStart",
168
- l = "suspendedYield",
169
- f = "executing",
170
- s = "completed",
171
- y = {};
172
- function Generator() {}
173
- function GeneratorFunction() {}
174
- function GeneratorFunctionPrototype() {}
175
- var p = {};
176
- define(p, a, function () {
177
- return this;
178
- });
179
- var d = Object.getPrototypeOf,
180
- v = d && d(d(values([])));
181
- v && v !== r && n.call(v, a) && (p = v);
182
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
183
- function defineIteratorMethods(t) {
184
- ["next", "throw", "return"].forEach(function (e) {
185
- define(t, e, function (t) {
186
- return this._invoke(e, t);
187
- });
188
- });
189
- }
190
- function AsyncIterator(t, e) {
191
- function invoke(r, o, i, a) {
192
- var c = tryCatch(t[r], t, o);
193
- if ("throw" !== c.type) {
194
- var u = c.arg,
195
- h = u.value;
196
- return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
197
- invoke("next", t, i, a);
198
- }, function (t) {
199
- invoke("throw", t, i, a);
200
- }) : e.resolve(h).then(function (t) {
201
- u.value = t, i(u);
202
- }, function (t) {
203
- return invoke("throw", t, i, a);
204
- });
205
- }
206
- a(c.arg);
207
- }
208
- var r;
209
- o(this, "_invoke", {
210
- value: function (t, n) {
211
- function callInvokeWithMethodAndArg() {
212
- return new e(function (e, r) {
213
- invoke(t, n, e, r);
214
- });
115
+ function _regenerator() {
116
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
117
+ var e,
118
+ t,
119
+ r = "function" == typeof Symbol ? Symbol : {},
120
+ n = r.iterator || "@@iterator",
121
+ o = r.toStringTag || "@@toStringTag";
122
+ function i(r, n, o, i) {
123
+ var c = n && n.prototype instanceof Generator ? n : Generator,
124
+ u = Object.create(c.prototype);
125
+ return _regeneratorDefine(u, "_invoke", function (r, n, o) {
126
+ var i,
127
+ c,
128
+ u,
129
+ f = 0,
130
+ p = o || [],
131
+ y = !1,
132
+ G = {
133
+ p: 0,
134
+ n: 0,
135
+ v: e,
136
+ a: d,
137
+ f: d.bind(e, 4),
138
+ d: function (t, r) {
139
+ return i = t, c = 0, u = e, G.n = r, a;
140
+ }
141
+ };
142
+ function d(r, n) {
143
+ for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
144
+ var o,
145
+ i = p[t],
146
+ d = G.p,
147
+ l = i[2];
148
+ r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
215
149
  }
216
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
150
+ if (o || r > 1) return a;
151
+ throw y = !0, n;
217
152
  }
218
- });
219
- }
220
- function makeInvokeMethod(e, r, n) {
221
- var o = h;
222
- return function (i, a) {
223
- if (o === f) throw Error("Generator is already running");
224
- if (o === s) {
225
- if ("throw" === i) throw a;
153
+ return function (o, p, l) {
154
+ if (f > 1) throw TypeError("Generator is already running");
155
+ for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
156
+ i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
157
+ try {
158
+ if (f = 2, i) {
159
+ if (c || (o = "next"), t = i[o]) {
160
+ if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
161
+ if (!t.done) return t;
162
+ u = t.value, c < 2 && (c = 0);
163
+ } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
164
+ i = e;
165
+ } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
166
+ } catch (t) {
167
+ i = e, c = 1, u = t;
168
+ } finally {
169
+ f = 1;
170
+ }
171
+ }
226
172
  return {
227
173
  value: t,
228
- done: !0
174
+ done: y
229
175
  };
230
- }
231
- for (n.method = i, n.arg = a;;) {
232
- var c = n.delegate;
233
- if (c) {
234
- var u = maybeInvokeDelegate(c, n);
235
- if (u) {
236
- if (u === y) continue;
237
- return u;
238
- }
239
- }
240
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
241
- if (o === h) throw o = s, n.arg;
242
- n.dispatchException(n.arg);
243
- } else "return" === n.method && n.abrupt("return", n.arg);
244
- o = f;
245
- var p = tryCatch(e, r, n);
246
- if ("normal" === p.type) {
247
- if (o = n.done ? s : l, p.arg === y) continue;
248
- return {
249
- value: p.arg,
250
- done: n.done
251
- };
252
- }
253
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
254
- }
255
- };
256
- }
257
- function maybeInvokeDelegate(e, r) {
258
- var n = r.method,
259
- o = e.iterator[n];
260
- if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
261
- var i = tryCatch(o, e.iterator, r.arg);
262
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
263
- var a = i.arg;
264
- return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
265
- }
266
- function pushTryEntry(t) {
267
- var e = {
268
- tryLoc: t[0]
269
- };
270
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
271
- }
272
- function resetTryEntry(t) {
273
- var e = t.completion || {};
274
- e.type = "normal", delete e.arg, t.completion = e;
275
- }
276
- function Context(t) {
277
- this.tryEntries = [{
278
- tryLoc: "root"
279
- }], t.forEach(pushTryEntry, this), this.reset(!0);
176
+ };
177
+ }(r, o, i), !0), u;
280
178
  }
281
- function values(e) {
282
- if (e || "" === e) {
283
- var r = e[a];
284
- if (r) return r.call(e);
285
- if ("function" == typeof e.next) return e;
286
- if (!isNaN(e.length)) {
287
- var o = -1,
288
- i = function next() {
289
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
290
- return next.value = t, next.done = !0, next;
291
- };
292
- return i.next = i;
293
- }
294
- }
295
- throw new TypeError(typeof e + " is not iterable");
179
+ var a = {};
180
+ function Generator() {}
181
+ function GeneratorFunction() {}
182
+ function GeneratorFunctionPrototype() {}
183
+ t = Object.getPrototypeOf;
184
+ var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
185
+ return this;
186
+ }), t),
187
+ u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
188
+ function f(e) {
189
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
296
190
  }
297
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
298
- value: GeneratorFunctionPrototype,
299
- configurable: !0
300
- }), o(GeneratorFunctionPrototype, "constructor", {
301
- value: GeneratorFunction,
302
- configurable: !0
303
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
304
- var e = "function" == typeof t && t.constructor;
305
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
306
- }, e.mark = function (t) {
307
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
308
- }, e.awrap = function (t) {
309
- return {
310
- __await: t
311
- };
312
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
191
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
313
192
  return this;
314
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
315
- void 0 === i && (i = Promise);
316
- var a = new AsyncIterator(wrap(t, r, n, o), i);
317
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
318
- return t.done ? t.value : a.next();
319
- });
320
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
321
- return this;
322
- }), define(g, "toString", function () {
193
+ }), _regeneratorDefine(u, "toString", function () {
323
194
  return "[object Generator]";
324
- }), e.keys = function (t) {
325
- var e = Object(t),
326
- r = [];
327
- for (var n in e) r.push(n);
328
- return r.reverse(), function next() {
329
- for (; r.length;) {
330
- var t = r.pop();
331
- if (t in e) return next.value = t, next.done = !1, next;
332
- }
333
- return next.done = !0, next;
195
+ }), (_regenerator = function () {
196
+ return {
197
+ w: i,
198
+ m: f
334
199
  };
335
- }, e.values = values, Context.prototype = {
336
- constructor: Context,
337
- reset: function (e) {
338
- if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
339
- },
340
- stop: function () {
341
- this.done = !0;
342
- var t = this.tryEntries[0].completion;
343
- if ("throw" === t.type) throw t.arg;
344
- return this.rval;
345
- },
346
- dispatchException: function (e) {
347
- if (this.done) throw e;
348
- var r = this;
349
- function handle(n, o) {
350
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
351
- }
352
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
353
- var i = this.tryEntries[o],
354
- a = i.completion;
355
- if ("root" === i.tryLoc) return handle("end");
356
- if (i.tryLoc <= this.prev) {
357
- var c = n.call(i, "catchLoc"),
358
- u = n.call(i, "finallyLoc");
359
- if (c && u) {
360
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
361
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
362
- } else if (c) {
363
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
364
- } else {
365
- if (!u) throw Error("try statement without catch or finally");
366
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
367
- }
368
- }
369
- }
370
- },
371
- abrupt: function (t, e) {
372
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
373
- var o = this.tryEntries[r];
374
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
375
- var i = o;
376
- break;
377
- }
378
- }
379
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
380
- var a = i ? i.completion : {};
381
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
382
- },
383
- complete: function (t, e) {
384
- if ("throw" === t.type) throw t.arg;
385
- return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
386
- },
387
- finish: function (t) {
388
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
389
- var r = this.tryEntries[e];
390
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
391
- }
392
- },
393
- catch: function (t) {
394
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
395
- var r = this.tryEntries[e];
396
- if (r.tryLoc === t) {
397
- var n = r.completion;
398
- if ("throw" === n.type) {
399
- var o = n.arg;
400
- resetTryEntry(r);
401
- }
402
- return o;
403
- }
404
- }
405
- throw Error("illegal catch attempt");
406
- },
407
- delegateYield: function (e, r, n) {
408
- return this.delegate = {
409
- iterator: values(e),
410
- resultName: r,
411
- nextLoc: n
412
- }, "next" === this.method && (this.arg = t), y;
200
+ })();
201
+ }
202
+ function _regeneratorDefine(e, r, n, t) {
203
+ var i = Object.defineProperty;
204
+ try {
205
+ i({}, "", {});
206
+ } catch (e) {
207
+ i = 0;
208
+ }
209
+ _regeneratorDefine = function (e, r, n, t) {
210
+ function o(r, n) {
211
+ _regeneratorDefine(e, r, function (e) {
212
+ return this._invoke(r, n, e);
213
+ });
413
214
  }
414
- }, e;
215
+ r ? i ? i(e, r, {
216
+ value: n,
217
+ enumerable: !t,
218
+ configurable: !t,
219
+ writable: !t
220
+ }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
221
+ }, _regeneratorDefine(e, r, n, t);
415
222
  }
416
223
  function _setPrototypeOf(t, e) {
417
224
  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
@@ -422,10 +229,10 @@ function _superPropBase(t, o) {
422
229
  for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););
423
230
  return t;
424
231
  }
425
- function _superPropGet(t, e, r, o) {
426
- var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r);
427
- return 2 & o ? function (t) {
428
- return p.apply(r, t);
232
+ function _superPropGet(t, o, e, r) {
233
+ var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e);
234
+ return 2 & r && "function" == typeof p ? function (t) {
235
+ return p.apply(e, t);
429
236
  } : p;
430
237
  }
431
238
  function _taggedTemplateLiteral(e, t) {
@@ -476,4 +283,4 @@ var t;const i=window,s$1=i.trustedTypes,e=s$1?s$1.createPolicy("lit-html",{creat
476
283
  * SPDX-License-Identifier: BSD-3-Clause
477
284
  */var l,o;class s extends u$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=D(i,this.renderRoot,this.renderOptions);}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0);}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1);}render(){return T}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push("3.3.3");
478
285
 
479
- export { _inherits as _, _createClass as a, _classCallCheck as b, _callSuper as c, _taggedTemplateLiteral as d, _objectSpread2 as e, _superPropGet as f, _asyncToGenerator as g, _regeneratorRuntime as h, i$1 as i, s, x };
286
+ export { _inherits as _, _createClass as a, _classCallCheck as b, _callSuper as c, _taggedTemplateLiteral as d, _objectSpread2 as e, _asyncToGenerator as f, _regenerator as g, _superPropGet as h, i$1 as i, s, x };
@@ -1,5 +1,5 @@
1
- import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, i, e as _objectSpread2, g as _asyncToGenerator, h as _regeneratorRuntime, f as _superPropGet } from './lit-element-ac3d3a27.js';
2
- import { E as EN } from './en-e76ed5a0.js';
1
+ import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, i, e as _objectSpread2, f as _asyncToGenerator, g as _regenerator, h as _superPropGet } from './lit-element-83035a6f.js';
2
+ import { E as EN } from './en-066d960b.js';
3
3
 
4
4
  var _templateObject$2;
5
5
  var RotateLeftIcon = /*#__PURE__*/function (_LitElement) {
@@ -51,30 +51,30 @@ var PictureEditor = /*#__PURE__*/function (_LitElement) {
51
51
  return _createClass(PictureEditor, [{
52
52
  key: "rotateImage",
53
53
  value: function () {
54
- var _rotateImage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(degrees) {
54
+ var _rotateImage = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(degrees) {
55
55
  var _this$shadowRoot, _this$rotatedImageBas;
56
56
  var cvs, img, ctx, radians, imgWidth, imgHeight, cosinus, sinus, width, height, rotatedBlob;
57
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
58
- while (1) switch (_context2.prev = _context2.next) {
57
+ return _regenerator().w(function (_context2) {
58
+ while (1) switch (_context2.n) {
59
59
  case 0:
60
60
  cvs = (_this$shadowRoot = this.shadowRoot) === null || _this$shadowRoot === void 0 ? void 0 : _this$shadowRoot.querySelector(".image > canvas");
61
- _context2.next = 3;
61
+ _context2.n = 1;
62
62
  return this.createImage((_this$rotatedImageBas = this.rotatedImageBase64) !== null && _this$rotatedImageBas !== void 0 ? _this$rotatedImageBas : this.image);
63
- case 3:
64
- img = _context2.sent;
63
+ case 1:
64
+ img = _context2.v;
65
65
  if (cvs) {
66
- _context2.next = 6;
66
+ _context2.n = 2;
67
67
  break;
68
68
  }
69
- return _context2.abrupt("return");
70
- case 6:
69
+ return _context2.a(2);
70
+ case 2:
71
71
  ctx = cvs.getContext("2d");
72
72
  if (ctx) {
73
- _context2.next = 9;
73
+ _context2.n = 3;
74
74
  break;
75
75
  }
76
- return _context2.abrupt("return");
77
- case 9:
76
+ return _context2.a(2);
77
+ case 3:
78
78
  radians = degrees * Math.PI / 180;
79
79
  imgWidth = img.naturalWidth;
80
80
  imgHeight = img.naturalHeight;
@@ -87,32 +87,28 @@ var PictureEditor = /*#__PURE__*/function (_LitElement) {
87
87
  ctx.translate(width / 2, height / 2);
88
88
  ctx.rotate(radians);
89
89
  ctx.drawImage(img, -imgWidth / 2, -imgHeight / 2);
90
- _context2.next = 23;
91
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
92
- return _regeneratorRuntime().wrap(function _callee$(_context) {
93
- while (1) switch (_context.prev = _context.next) {
90
+ _context2.n = 4;
91
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
92
+ return _regenerator().w(function (_context) {
93
+ while (1) switch (_context.n) {
94
94
  case 0:
95
- return _context.abrupt("return", new Promise(function (resolve, reject) {
95
+ return _context.a(2, new Promise(function (resolve, reject) {
96
96
  ctx.canvas.toBlob(function (blob) {
97
97
  if (blob === null) reject("Failed to generated Blob from canvas");else resolve(blob);
98
98
  }, "image/jpeg", 0.75);
99
99
  }));
100
- case 1:
101
- case "end":
102
- return _context.stop();
103
100
  }
104
101
  }, _callee);
105
102
  }))();
106
- case 23:
107
- rotatedBlob = _context2.sent;
103
+ case 4:
104
+ rotatedBlob = _context2.v;
108
105
  this.rotatedImage = rotatedBlob;
109
- _context2.next = 27;
106
+ _context2.n = 5;
110
107
  return this.blobToBase64(this.rotatedImage);
111
- case 27:
112
- this.rotatedImageBase64 = _context2.sent;
113
- case 28:
114
- case "end":
115
- return _context2.stop();
108
+ case 5:
109
+ this.rotatedImageBase64 = _context2.v;
110
+ case 6:
111
+ return _context2.a(2);
116
112
  }
117
113
  }, _callee2, this);
118
114
  }));
@@ -124,17 +120,16 @@ var PictureEditor = /*#__PURE__*/function (_LitElement) {
124
120
  }, {
125
121
  key: "rotateLeft",
126
122
  value: function () {
127
- var _rotateLeft = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
128
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
129
- while (1) switch (_context3.prev = _context3.next) {
123
+ var _rotateLeft = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
124
+ return _regenerator().w(function (_context3) {
125
+ while (1) switch (_context3.n) {
130
126
  case 0:
131
- _context3.next = 2;
127
+ _context3.n = 1;
132
128
  return this.rotateImage(-this.rotation);
133
- case 2:
129
+ case 1:
134
130
  this.requestUpdate();
135
- case 3:
136
- case "end":
137
- return _context3.stop();
131
+ case 2:
132
+ return _context3.a(2);
138
133
  }
139
134
  }, _callee3, this);
140
135
  }));
@@ -146,17 +141,16 @@ var PictureEditor = /*#__PURE__*/function (_LitElement) {
146
141
  }, {
147
142
  key: "rotateRight",
148
143
  value: function () {
149
- var _rotateRight = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
150
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
151
- while (1) switch (_context4.prev = _context4.next) {
144
+ var _rotateRight = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
145
+ return _regenerator().w(function (_context4) {
146
+ while (1) switch (_context4.n) {
152
147
  case 0:
153
- _context4.next = 2;
148
+ _context4.n = 1;
154
149
  return this.rotateImage(this.rotation);
155
- case 2:
150
+ case 1:
156
151
  this.requestUpdate();
157
- case 3:
158
- case "end":
159
- return _context4.stop();
152
+ case 2:
153
+ return _context4.a(2);
160
154
  }
161
155
  }, _callee4, this);
162
156
  }));
@@ -180,20 +174,19 @@ var PictureEditor = /*#__PURE__*/function (_LitElement) {
180
174
  }, {
181
175
  key: "firstUpdated",
182
176
  value: function () {
183
- var _firstUpdated = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(changes) {
184
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
185
- while (1) switch (_context5.prev = _context5.next) {
177
+ var _firstUpdated = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(changes) {
178
+ return _regenerator().w(function (_context5) {
179
+ while (1) switch (_context5.n) {
186
180
  case 0:
187
181
  _superPropGet(PictureEditor, "firstUpdated", this, 3)([changes]);
188
182
  if (!this.image) {
189
- _context5.next = 4;
183
+ _context5.n = 1;
190
184
  break;
191
185
  }
192
- _context5.next = 4;
186
+ _context5.n = 1;
193
187
  return this.rotateImage(0);
194
- case 4:
195
- case "end":
196
- return _context5.stop();
188
+ case 1:
189
+ return _context5.a(2);
197
190
  }
198
191
  }, _callee5, this);
199
192
  }));
@@ -1,8 +1,8 @@
1
- import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, e as _objectSpread2 } from './lit-element-ac3d3a27.js';
2
- import { E as EN } from './en-e76ed5a0.js';
3
- import { R as Recorder, b as buildPacked } from './video-recorder-448a0c3b.js';
4
- import './_commonjsHelpers-cef27602.js';
5
- import './variables-b4a2d316.js';
1
+ import { _ as _inherits, a as _createClass, x, d as _taggedTemplateLiteral, s, b as _classCallCheck, c as _callSuper, e as _objectSpread2 } from './lit-element-83035a6f.js';
2
+ import { R as Recorder, b as buildPacked } from './video-recorder-40306157.js';
3
+ import { E as EN } from './en-066d960b.js';
4
+ import './_commonjsHelpers-02146103.js';
5
+ import './variables-be2b795f.js';
6
6
  import './button.js';
7
7
 
8
8
  var _templateObject$1;