image-salon-sdk 1.0.36 → 1.0.37
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/image-salon-sdk.js +432 -447
- package/dist/image-salon-sdk.umd.cjs +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/assets/icons/image-upload.d.ts +0 -1
package/dist/image-salon-sdk.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
var
|
|
2
|
+
var ri = Object.defineProperty;
|
|
3
3
|
var Xt = (i) => {
|
|
4
4
|
throw TypeError(i);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
7
|
-
var x = (i, e, t) =>
|
|
8
|
-
var d = (i, e, t) => (Gt(i, e, "read from private field"), t ? t.call(i) : e.get(i)),
|
|
9
|
-
function
|
|
6
|
+
var si = (i, e, t) => e in i ? ri(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
7
|
+
var x = (i, e, t) => si(i, typeof e != "symbol" ? e + "" : e, t), Gt = (i, e, t) => e.has(i) || Xt("Cannot " + t);
|
|
8
|
+
var d = (i, e, t) => (Gt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), k = (i, e, t) => e.has(i) ? Xt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), p = (i, e, t, n) => (Gt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
|
|
9
|
+
function bn(i) {
|
|
10
10
|
let e = typeof i;
|
|
11
11
|
if (e == "object") {
|
|
12
12
|
if (Array.isArray(i))
|
|
@@ -16,7 +16,7 @@ function Cn(i) {
|
|
|
16
16
|
}
|
|
17
17
|
return e;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function oi(i) {
|
|
20
20
|
return i !== null && typeof i == "object" && !Array.isArray(i);
|
|
21
21
|
}
|
|
22
22
|
let me = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""), ot = [];
|
|
@@ -24,7 +24,7 @@ for (let i = 0; i < me.length; i++)
|
|
|
24
24
|
ot[me[i].charCodeAt(0)] = i;
|
|
25
25
|
ot[45] = me.indexOf("+");
|
|
26
26
|
ot[95] = me.indexOf("/");
|
|
27
|
-
function
|
|
27
|
+
function Cn(i) {
|
|
28
28
|
let e = i.length * 3 / 4;
|
|
29
29
|
i[i.length - 2] == "=" ? e -= 2 : i[i.length - 1] == "=" && (e -= 1);
|
|
30
30
|
let t = new Uint8Array(e), n = 0, r = 0, s, o = 0;
|
|
@@ -61,7 +61,7 @@ function En(i) {
|
|
|
61
61
|
throw Error("invalid base64 string.");
|
|
62
62
|
return t.subarray(0, n);
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function En(i) {
|
|
65
65
|
let e = "", t = 0, n, r = 0;
|
|
66
66
|
for (let s = 0; s < i.length; s++)
|
|
67
67
|
switch (n = i[s], t) {
|
|
@@ -77,7 +77,7 @@ function Nn(i) {
|
|
|
77
77
|
}
|
|
78
78
|
return t && (e += me[r], e += "=", t == 1 && (e += "=")), e;
|
|
79
79
|
}
|
|
80
|
-
var
|
|
80
|
+
var N;
|
|
81
81
|
(function(i) {
|
|
82
82
|
i.symbol = Symbol.for("protobuf-ts/unknown"), i.onRead = (t, n, r, s, o) => {
|
|
83
83
|
(e(n) ? n[i.symbol] : n[i.symbol] = []).push({ no: r, wireType: s, data: o });
|
|
@@ -92,15 +92,15 @@ var k;
|
|
|
92
92
|
return [];
|
|
93
93
|
}, i.last = (t, n) => i.list(t, n).slice(-1)[0];
|
|
94
94
|
const e = (t) => t && Array.isArray(t[i.symbol]);
|
|
95
|
-
})(
|
|
96
|
-
function
|
|
95
|
+
})(N || (N = {}));
|
|
96
|
+
function ai(i, e) {
|
|
97
97
|
return Object.assign(Object.assign({}, i), e);
|
|
98
98
|
}
|
|
99
99
|
var m;
|
|
100
100
|
(function(i) {
|
|
101
101
|
i[i.Varint = 0] = "Varint", i[i.Bit64 = 1] = "Bit64", i[i.LengthDelimited = 2] = "LengthDelimited", i[i.StartGroup = 3] = "StartGroup", i[i.EndGroup = 4] = "EndGroup", i[i.Bit32 = 5] = "Bit32";
|
|
102
102
|
})(m || (m = {}));
|
|
103
|
-
function
|
|
103
|
+
function li() {
|
|
104
104
|
let i = 0, e = 0;
|
|
105
105
|
for (let n = 0; n < 28; n += 7) {
|
|
106
106
|
let r = this.buf[this.pos++];
|
|
@@ -145,7 +145,7 @@ function kn(i) {
|
|
|
145
145
|
}
|
|
146
146
|
return s(-24, -18), s(-18, -12), s(-12, -6), s(-6), [e, n, r];
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function yt(i, e) {
|
|
149
149
|
if (e >>> 0 <= 2097151)
|
|
150
150
|
return "" + (tt * e + (i >>> 0));
|
|
151
151
|
let t = i & 16777215, n = (i >>> 24 | e << 8) >>> 0 & 16777215, r = e >> 16 & 65535, s = t + n * 6777216 + r * 6710656, o = n + r * 8147497, a = r * 2, l = 1e7;
|
|
@@ -181,7 +181,7 @@ function Jt(i, e) {
|
|
|
181
181
|
e.push(1);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function ci() {
|
|
185
185
|
let i = this.buf[this.pos++], e = i & 127;
|
|
186
186
|
if (!(i & 128))
|
|
187
187
|
return this.assertBounds(), e;
|
|
@@ -199,7 +199,7 @@ function di() {
|
|
|
199
199
|
return this.assertBounds(), e >>> 0;
|
|
200
200
|
}
|
|
201
201
|
let v;
|
|
202
|
-
function
|
|
202
|
+
function di() {
|
|
203
203
|
const i = new DataView(new ArrayBuffer(8));
|
|
204
204
|
v = globalThis.BigInt !== void 0 && typeof i.getBigInt64 == "function" && typeof i.getBigUint64 == "function" && typeof i.setBigInt64 == "function" && typeof i.setBigUint64 == "function" ? {
|
|
205
205
|
MIN: BigInt("-9223372036854775808"),
|
|
@@ -210,12 +210,12 @@ function hi() {
|
|
|
210
210
|
V: i
|
|
211
211
|
} : void 0;
|
|
212
212
|
}
|
|
213
|
-
|
|
214
|
-
function
|
|
213
|
+
di();
|
|
214
|
+
function Nn(i) {
|
|
215
215
|
if (!i)
|
|
216
216
|
throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support");
|
|
217
217
|
}
|
|
218
|
-
const
|
|
218
|
+
const An = /^-?[0-9]+$/, nt = 4294967296, Je = 2147483648;
|
|
219
219
|
class Fn {
|
|
220
220
|
/**
|
|
221
221
|
* Create a new instance with the given bits.
|
|
@@ -270,7 +270,7 @@ class j extends Fn {
|
|
|
270
270
|
case "string":
|
|
271
271
|
if (e == "0")
|
|
272
272
|
return this.ZERO;
|
|
273
|
-
if (e = e.trim(), !
|
|
273
|
+
if (e = e.trim(), !An.test(e))
|
|
274
274
|
throw new Error("string is no integer");
|
|
275
275
|
let [t, n, r] = kn(e);
|
|
276
276
|
if (t)
|
|
@@ -291,13 +291,13 @@ class j extends Fn {
|
|
|
291
291
|
* Convert to decimal string.
|
|
292
292
|
*/
|
|
293
293
|
toString() {
|
|
294
|
-
return v ? this.toBigInt().toString() :
|
|
294
|
+
return v ? this.toBigInt().toString() : yt(this.lo, this.hi);
|
|
295
295
|
}
|
|
296
296
|
/**
|
|
297
297
|
* Convert to native bigint.
|
|
298
298
|
*/
|
|
299
299
|
toBigInt() {
|
|
300
|
-
return
|
|
300
|
+
return Nn(v), v.V.setInt32(0, this.lo, !0), v.V.setInt32(4, this.hi, !0), v.V.getBigUint64(0, !0);
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
j.ZERO = new j(0, 0);
|
|
@@ -332,7 +332,7 @@ class R extends Fn {
|
|
|
332
332
|
case "string":
|
|
333
333
|
if (e == "0")
|
|
334
334
|
return this.ZERO;
|
|
335
|
-
if (e = e.trim(), !
|
|
335
|
+
if (e = e.trim(), !An.test(e))
|
|
336
336
|
throw new Error("string is no integer");
|
|
337
337
|
let [t, n, r] = kn(e);
|
|
338
338
|
if (t) {
|
|
@@ -373,28 +373,28 @@ class R extends Fn {
|
|
|
373
373
|
return this.toBigInt().toString();
|
|
374
374
|
if (this.isNegative()) {
|
|
375
375
|
let e = this.negate();
|
|
376
|
-
return "-" +
|
|
376
|
+
return "-" + yt(e.lo, e.hi);
|
|
377
377
|
}
|
|
378
|
-
return
|
|
378
|
+
return yt(this.lo, this.hi);
|
|
379
379
|
}
|
|
380
380
|
/**
|
|
381
381
|
* Convert to native bigint.
|
|
382
382
|
*/
|
|
383
383
|
toBigInt() {
|
|
384
|
-
return
|
|
384
|
+
return Nn(v), v.V.setInt32(0, this.lo, !0), v.V.setInt32(4, this.hi, !0), v.V.getBigInt64(0, !0);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
R.ZERO = new R(0, 0);
|
|
388
388
|
const zt = {
|
|
389
389
|
readUnknownField: !0,
|
|
390
|
-
readerFactory: (i) => new
|
|
390
|
+
readerFactory: (i) => new ui(i)
|
|
391
391
|
};
|
|
392
|
-
function
|
|
392
|
+
function hi(i) {
|
|
393
393
|
return i ? Object.assign(Object.assign({}, zt), i) : zt;
|
|
394
394
|
}
|
|
395
|
-
class
|
|
395
|
+
class ui {
|
|
396
396
|
constructor(e, t) {
|
|
397
|
-
this.varint64 =
|
|
397
|
+
this.varint64 = li, this.uint32 = ci, this.buf = e, this.len = e.length, this.pos = 0, this.view = new DataView(e.buffer, e.byteOffset, e.byteLength), this.textDecoder = t ?? new TextDecoder("utf-8", {
|
|
398
398
|
fatal: !0,
|
|
399
399
|
ignoreBOM: !0
|
|
400
400
|
});
|
|
@@ -534,37 +534,37 @@ class pi {
|
|
|
534
534
|
return this.textDecoder.decode(this.bytes());
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function E(i, e) {
|
|
538
538
|
if (!i)
|
|
539
539
|
throw new Error(e);
|
|
540
540
|
}
|
|
541
|
-
const
|
|
541
|
+
const pi = 34028234663852886e22, fi = -34028234663852886e22, mi = 4294967295, gi = 2147483647, wi = -2147483648;
|
|
542
542
|
function je(i) {
|
|
543
543
|
if (typeof i != "number")
|
|
544
544
|
throw new Error("invalid int 32: " + typeof i);
|
|
545
|
-
if (!Number.isInteger(i) || i >
|
|
545
|
+
if (!Number.isInteger(i) || i > gi || i < wi)
|
|
546
546
|
throw new Error("invalid int 32: " + i);
|
|
547
547
|
}
|
|
548
548
|
function it(i) {
|
|
549
549
|
if (typeof i != "number")
|
|
550
550
|
throw new Error("invalid uint 32: " + typeof i);
|
|
551
|
-
if (!Number.isInteger(i) || i >
|
|
551
|
+
if (!Number.isInteger(i) || i > mi || i < 0)
|
|
552
552
|
throw new Error("invalid uint 32: " + i);
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Nt(i) {
|
|
555
555
|
if (typeof i != "number")
|
|
556
556
|
throw new Error("invalid float 32: " + typeof i);
|
|
557
|
-
if (Number.isFinite(i) && (i >
|
|
557
|
+
if (Number.isFinite(i) && (i > pi || i < fi))
|
|
558
558
|
throw new Error("invalid float 32: " + i);
|
|
559
559
|
}
|
|
560
560
|
const Yt = {
|
|
561
561
|
writeUnknownFields: !0,
|
|
562
|
-
writerFactory: () => new
|
|
562
|
+
writerFactory: () => new bi()
|
|
563
563
|
};
|
|
564
|
-
function
|
|
564
|
+
function yi(i) {
|
|
565
565
|
return i ? Object.assign(Object.assign({}, Yt), i) : Yt;
|
|
566
566
|
}
|
|
567
|
-
class
|
|
567
|
+
class bi {
|
|
568
568
|
constructor(e) {
|
|
569
569
|
this.stack = [], this.textEncoder = e ?? new TextEncoder(), this.chunks = [], this.buf = [];
|
|
570
570
|
}
|
|
@@ -653,7 +653,7 @@ class Ci {
|
|
|
653
653
|
* Write a `float` value, 32-bit floating point number.
|
|
654
654
|
*/
|
|
655
655
|
float(e) {
|
|
656
|
-
|
|
656
|
+
Nt(e);
|
|
657
657
|
let t = new Uint8Array(4);
|
|
658
658
|
return new DataView(t.buffer).setFloat32(0, e, !0), this.raw(t);
|
|
659
659
|
}
|
|
@@ -730,10 +730,10 @@ const Qt = {
|
|
|
730
730
|
}, en = {
|
|
731
731
|
ignoreUnknownFields: !1
|
|
732
732
|
};
|
|
733
|
-
function
|
|
733
|
+
function Ci(i) {
|
|
734
734
|
return i ? Object.assign(Object.assign({}, en), i) : en;
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function Ei(i) {
|
|
737
737
|
return i ? Object.assign(Object.assign({}, Qt), i) : Qt;
|
|
738
738
|
}
|
|
739
739
|
function ki(i, e) {
|
|
@@ -741,8 +741,8 @@ function ki(i, e) {
|
|
|
741
741
|
let r = Object.assign(Object.assign({}, i), e);
|
|
742
742
|
return r.typeRegistry = [...(t = i == null ? void 0 : i.typeRegistry) !== null && t !== void 0 ? t : [], ...(n = e == null ? void 0 : e.typeRegistry) !== null && n !== void 0 ? n : []], r;
|
|
743
743
|
}
|
|
744
|
-
const
|
|
745
|
-
function
|
|
744
|
+
const Ln = Symbol.for("protobuf-ts/message-type");
|
|
745
|
+
function bt(i) {
|
|
746
746
|
let e = !1;
|
|
747
747
|
const t = [];
|
|
748
748
|
for (let n = 0; n < i.length; n++) {
|
|
@@ -763,11 +763,11 @@ var rt;
|
|
|
763
763
|
(function(i) {
|
|
764
764
|
i[i.NO = 0] = "NO", i[i.PACKED = 1] = "PACKED", i[i.UNPACKED = 2] = "UNPACKED";
|
|
765
765
|
})(rt || (rt = {}));
|
|
766
|
-
function
|
|
766
|
+
function Ni(i) {
|
|
767
767
|
var e, t, n, r;
|
|
768
|
-
return i.localName = (e = i.localName) !== null && e !== void 0 ? e :
|
|
768
|
+
return i.localName = (e = i.localName) !== null && e !== void 0 ? e : bt(i.name), i.jsonName = (t = i.jsonName) !== null && t !== void 0 ? t : bt(i.name), i.repeat = (n = i.repeat) !== null && n !== void 0 ? n : rt.NO, i.opt = (r = i.opt) !== null && r !== void 0 ? r : i.repeat || i.oneof ? !1 : i.kind == "message", i;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function Ai(i) {
|
|
771
771
|
if (typeof i != "object" || i === null || !i.hasOwnProperty("oneofKind"))
|
|
772
772
|
return !1;
|
|
773
773
|
switch (typeof i.oneofKind) {
|
|
@@ -839,7 +839,7 @@ class Fi {
|
|
|
839
839
|
return !0;
|
|
840
840
|
for (const o of s.oneofs) {
|
|
841
841
|
const a = e[o];
|
|
842
|
-
if (!
|
|
842
|
+
if (!Ai(a))
|
|
843
843
|
return !1;
|
|
844
844
|
if (a.oneofKind === void 0)
|
|
845
845
|
continue;
|
|
@@ -965,7 +965,7 @@ function te(i, e) {
|
|
|
965
965
|
return i.toString();
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
class
|
|
968
|
+
class Li {
|
|
969
969
|
constructor(e) {
|
|
970
970
|
this.info = e;
|
|
971
971
|
}
|
|
@@ -981,7 +981,7 @@ class Ii {
|
|
|
981
981
|
// Cannot parse JSON <type of jsonValue> for <type name>#<fieldName>.
|
|
982
982
|
assert(e, t, n) {
|
|
983
983
|
if (!e) {
|
|
984
|
-
let r =
|
|
984
|
+
let r = bn(n);
|
|
985
985
|
throw (r == "number" || r == "boolean") && (r = n.toString()), new Error(`Cannot parse JSON ${r} for ${this.info.typeName}#${t}`);
|
|
986
986
|
}
|
|
987
987
|
}
|
|
@@ -1019,7 +1019,7 @@ class Ii {
|
|
|
1019
1019
|
if (a.kind == "map") {
|
|
1020
1020
|
if (o === null)
|
|
1021
1021
|
continue;
|
|
1022
|
-
this.assert(
|
|
1022
|
+
this.assert(oi(o), a.name, o);
|
|
1023
1023
|
const h = c[l];
|
|
1024
1024
|
for (const [g, w] of Object.entries(o)) {
|
|
1025
1025
|
this.assert(w !== null, a.name + " map value", null);
|
|
@@ -1089,18 +1089,18 @@ class Ii {
|
|
|
1089
1089
|
* google.protobuf.NullValue accepts only JSON `null` (or the old `"NULL_VALUE"`).
|
|
1090
1090
|
*/
|
|
1091
1091
|
enum(e, t, n, r) {
|
|
1092
|
-
if (e[0] == "google.protobuf.NullValue" &&
|
|
1092
|
+
if (e[0] == "google.protobuf.NullValue" && E(t === null || t === "NULL_VALUE", `Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} only accepts null.`), t === null)
|
|
1093
1093
|
return 0;
|
|
1094
1094
|
switch (typeof t) {
|
|
1095
1095
|
case "number":
|
|
1096
|
-
return
|
|
1096
|
+
return E(Number.isInteger(t), `Unable to parse field ${this.info.typeName}#${n}, enum can only be integral number, got ${t}.`), t;
|
|
1097
1097
|
case "string":
|
|
1098
1098
|
let s = t;
|
|
1099
1099
|
e[2] && t.substring(0, e[2].length) === e[2] && (s = t.substring(e[2].length));
|
|
1100
1100
|
let o = e[1][s];
|
|
1101
|
-
return typeof o > "u" && r ? !1 : (
|
|
1101
|
+
return typeof o > "u" && r ? !1 : (E(typeof o == "number", `Unable to parse field ${this.info.typeName}#${n}, enum ${e[0]} has no value for "${t}".`), o);
|
|
1102
1102
|
}
|
|
1103
|
-
|
|
1103
|
+
E(!1, `Unable to parse field ${this.info.typeName}#${n}, cannot parse enum value from ${typeof t}".`);
|
|
1104
1104
|
}
|
|
1105
1105
|
scalar(e, t, n, r) {
|
|
1106
1106
|
let s;
|
|
@@ -1135,7 +1135,7 @@ class Ii {
|
|
|
1135
1135
|
s = "too large or small";
|
|
1136
1136
|
break;
|
|
1137
1137
|
}
|
|
1138
|
-
return t == u.FLOAT &&
|
|
1138
|
+
return t == u.FLOAT && Nt(o), o;
|
|
1139
1139
|
case u.INT32:
|
|
1140
1140
|
case u.FIXED32:
|
|
1141
1141
|
case u.SFIXED32:
|
|
@@ -1187,7 +1187,7 @@ class Ii {
|
|
|
1187
1187
|
return new Uint8Array(0);
|
|
1188
1188
|
if (typeof e != "string")
|
|
1189
1189
|
break;
|
|
1190
|
-
return
|
|
1190
|
+
return Cn(e);
|
|
1191
1191
|
}
|
|
1192
1192
|
} catch (o) {
|
|
1193
1193
|
s = o.message;
|
|
@@ -1195,7 +1195,7 @@ class Ii {
|
|
|
1195
1195
|
this.assert(!1, r + (s ? " - " + s : ""), e);
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
|
-
class
|
|
1198
|
+
class Ii {
|
|
1199
1199
|
constructor(e) {
|
|
1200
1200
|
var t;
|
|
1201
1201
|
this.fields = (t = e.fields) !== null && t !== void 0 ? t : [];
|
|
@@ -1216,62 +1216,62 @@ class vi {
|
|
|
1216
1216
|
continue;
|
|
1217
1217
|
const a = s.kind == "scalar" || s.kind == "enum" ? Object.assign(Object.assign({}, t), { emitDefaultValues: !0 }) : t;
|
|
1218
1218
|
let l = this.field(s, o[s.localName], a);
|
|
1219
|
-
|
|
1219
|
+
E(l !== void 0), n[t.useProtoFieldName ? s.name : s.jsonName] = l;
|
|
1220
1220
|
}
|
|
1221
1221
|
return n;
|
|
1222
1222
|
}
|
|
1223
1223
|
field(e, t, n) {
|
|
1224
1224
|
let r;
|
|
1225
1225
|
if (e.kind == "map") {
|
|
1226
|
-
|
|
1226
|
+
E(typeof t == "object" && t !== null);
|
|
1227
1227
|
const s = {};
|
|
1228
1228
|
switch (e.V.kind) {
|
|
1229
1229
|
case "scalar":
|
|
1230
1230
|
for (const [l, c] of Object.entries(t)) {
|
|
1231
1231
|
const h = this.scalar(e.V.T, c, e.name, !1, !0);
|
|
1232
|
-
|
|
1232
|
+
E(h !== void 0), s[l.toString()] = h;
|
|
1233
1233
|
}
|
|
1234
1234
|
break;
|
|
1235
1235
|
case "message":
|
|
1236
1236
|
const o = e.V.T();
|
|
1237
1237
|
for (const [l, c] of Object.entries(t)) {
|
|
1238
1238
|
const h = this.message(o, c, e.name, n);
|
|
1239
|
-
|
|
1239
|
+
E(h !== void 0), s[l.toString()] = h;
|
|
1240
1240
|
}
|
|
1241
1241
|
break;
|
|
1242
1242
|
case "enum":
|
|
1243
1243
|
const a = e.V.T();
|
|
1244
1244
|
for (const [l, c] of Object.entries(t)) {
|
|
1245
|
-
|
|
1245
|
+
E(c === void 0 || typeof c == "number");
|
|
1246
1246
|
const h = this.enum(a, c, e.name, !1, !0, n.enumAsInteger);
|
|
1247
|
-
|
|
1247
|
+
E(h !== void 0), s[l.toString()] = h;
|
|
1248
1248
|
}
|
|
1249
1249
|
break;
|
|
1250
1250
|
}
|
|
1251
1251
|
(n.emitDefaultValues || Object.keys(s).length > 0) && (r = s);
|
|
1252
1252
|
} else if (e.repeat) {
|
|
1253
|
-
|
|
1253
|
+
E(Array.isArray(t));
|
|
1254
1254
|
const s = [];
|
|
1255
1255
|
switch (e.kind) {
|
|
1256
1256
|
case "scalar":
|
|
1257
1257
|
for (let l = 0; l < t.length; l++) {
|
|
1258
1258
|
const c = this.scalar(e.T, t[l], e.name, e.opt, !0);
|
|
1259
|
-
|
|
1259
|
+
E(c !== void 0), s.push(c);
|
|
1260
1260
|
}
|
|
1261
1261
|
break;
|
|
1262
1262
|
case "enum":
|
|
1263
1263
|
const o = e.T();
|
|
1264
1264
|
for (let l = 0; l < t.length; l++) {
|
|
1265
|
-
|
|
1265
|
+
E(t[l] === void 0 || typeof t[l] == "number");
|
|
1266
1266
|
const c = this.enum(o, t[l], e.name, e.opt, !0, n.enumAsInteger);
|
|
1267
|
-
|
|
1267
|
+
E(c !== void 0), s.push(c);
|
|
1268
1268
|
}
|
|
1269
1269
|
break;
|
|
1270
1270
|
case "message":
|
|
1271
1271
|
const a = e.T();
|
|
1272
1272
|
for (let l = 0; l < t.length; l++) {
|
|
1273
1273
|
const c = this.message(a, t[l], e.name, n);
|
|
1274
|
-
|
|
1274
|
+
E(c !== void 0), s.push(c);
|
|
1275
1275
|
}
|
|
1276
1276
|
break;
|
|
1277
1277
|
}
|
|
@@ -1297,18 +1297,18 @@ class vi {
|
|
|
1297
1297
|
if (e[0] == "google.protobuf.NullValue")
|
|
1298
1298
|
return !s && !r ? void 0 : null;
|
|
1299
1299
|
if (t === void 0) {
|
|
1300
|
-
|
|
1300
|
+
E(r);
|
|
1301
1301
|
return;
|
|
1302
1302
|
}
|
|
1303
1303
|
if (!(t === 0 && !s && !r))
|
|
1304
|
-
return
|
|
1304
|
+
return E(typeof t == "number"), E(Number.isInteger(t)), o || !e[1].hasOwnProperty(t) ? t : e[2] ? e[2] + e[1][t] : e[1][t];
|
|
1305
1305
|
}
|
|
1306
1306
|
message(e, t, n, r) {
|
|
1307
1307
|
return t === void 0 ? r.emitDefaultValues ? null : void 0 : e.internalJsonWrite(t, r);
|
|
1308
1308
|
}
|
|
1309
1309
|
scalar(e, t, n, r, s) {
|
|
1310
1310
|
if (t === void 0) {
|
|
1311
|
-
|
|
1311
|
+
E(r);
|
|
1312
1312
|
return;
|
|
1313
1313
|
}
|
|
1314
1314
|
const o = s || r;
|
|
@@ -1321,30 +1321,30 @@ class vi {
|
|
|
1321
1321
|
case u.UINT32:
|
|
1322
1322
|
return t === 0 ? o ? 0 : void 0 : (it(t), t);
|
|
1323
1323
|
case u.FLOAT:
|
|
1324
|
-
|
|
1324
|
+
Nt(t);
|
|
1325
1325
|
case u.DOUBLE:
|
|
1326
|
-
return t === 0 ? o ? 0 : void 0 : (
|
|
1326
|
+
return t === 0 ? o ? 0 : void 0 : (E(typeof t == "number"), Number.isNaN(t) ? "NaN" : t === Number.POSITIVE_INFINITY ? "Infinity" : t === Number.NEGATIVE_INFINITY ? "-Infinity" : t);
|
|
1327
1327
|
case u.STRING:
|
|
1328
|
-
return t === "" ? o ? "" : void 0 : (
|
|
1328
|
+
return t === "" ? o ? "" : void 0 : (E(typeof t == "string"), t);
|
|
1329
1329
|
case u.BOOL:
|
|
1330
|
-
return t === !1 ? o ? !1 : void 0 : (
|
|
1330
|
+
return t === !1 ? o ? !1 : void 0 : (E(typeof t == "boolean"), t);
|
|
1331
1331
|
case u.UINT64:
|
|
1332
1332
|
case u.FIXED64:
|
|
1333
|
-
|
|
1333
|
+
E(typeof t == "number" || typeof t == "string" || typeof t == "bigint");
|
|
1334
1334
|
let a = j.from(t);
|
|
1335
1335
|
return a.isZero() && !o ? void 0 : a.toString();
|
|
1336
1336
|
case u.INT64:
|
|
1337
1337
|
case u.SFIXED64:
|
|
1338
1338
|
case u.SINT64:
|
|
1339
|
-
|
|
1339
|
+
E(typeof t == "number" || typeof t == "string" || typeof t == "bigint");
|
|
1340
1340
|
let l = R.from(t);
|
|
1341
1341
|
return l.isZero() && !o ? void 0 : l.toString();
|
|
1342
1342
|
case u.BYTES:
|
|
1343
|
-
return
|
|
1343
|
+
return E(t instanceof Uint8Array), t.byteLength ? En(t) : o ? "" : void 0;
|
|
1344
1344
|
}
|
|
1345
1345
|
}
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function Ct(i, e = le.STRING) {
|
|
1348
1348
|
switch (i) {
|
|
1349
1349
|
case u.BOOL:
|
|
1350
1350
|
return !1;
|
|
@@ -1366,7 +1366,7 @@ function bt(i, e = le.STRING) {
|
|
|
1366
1366
|
return 0;
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
1369
|
-
class
|
|
1369
|
+
class vi {
|
|
1370
1370
|
constructor(e) {
|
|
1371
1371
|
this.info = e;
|
|
1372
1372
|
}
|
|
@@ -1396,7 +1396,7 @@ class Ti {
|
|
|
1396
1396
|
if (w == "throw")
|
|
1397
1397
|
throw new Error(`Unknown field ${o} (wire type ${a}) for ${this.info.typeName}`);
|
|
1398
1398
|
let A = e.skip(a);
|
|
1399
|
-
w !== !1 && (w === !0 ?
|
|
1399
|
+
w !== !1 && (w === !0 ? N.onRead : w)(this.info.typeName, t, o, a, A);
|
|
1400
1400
|
continue;
|
|
1401
1401
|
}
|
|
1402
1402
|
let c = t, h = l.repeat, g = l.localName;
|
|
@@ -1407,20 +1407,20 @@ class Ti {
|
|
|
1407
1407
|
case "enum":
|
|
1408
1408
|
let w = l.kind == "enum" ? u.INT32 : l.T, A = l.kind == "scalar" ? l.L : void 0;
|
|
1409
1409
|
if (h) {
|
|
1410
|
-
let
|
|
1410
|
+
let F = c[g];
|
|
1411
1411
|
if (a == m.LengthDelimited && w != u.STRING && w != u.BYTES) {
|
|
1412
1412
|
let $ = e.uint32() + e.pos;
|
|
1413
1413
|
for (; e.pos < $; )
|
|
1414
|
-
|
|
1414
|
+
F.push(this.scalar(e, w, A));
|
|
1415
1415
|
} else
|
|
1416
|
-
|
|
1416
|
+
F.push(this.scalar(e, w, A));
|
|
1417
1417
|
} else
|
|
1418
1418
|
c[g] = this.scalar(e, w, A);
|
|
1419
1419
|
break;
|
|
1420
1420
|
case "message":
|
|
1421
1421
|
if (h) {
|
|
1422
|
-
let
|
|
1423
|
-
|
|
1422
|
+
let F = c[g], $ = l.T().internalBinaryRead(e, e.uint32(), n);
|
|
1423
|
+
F.push($);
|
|
1424
1424
|
} else
|
|
1425
1425
|
c[g] = l.T().internalBinaryRead(e, e.uint32(), n, c[g]);
|
|
1426
1426
|
break;
|
|
@@ -1460,13 +1460,13 @@ class Ti {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
1462
|
if (o === void 0) {
|
|
1463
|
-
let l =
|
|
1463
|
+
let l = Ct(e.K);
|
|
1464
1464
|
o = e.K == u.BOOL ? l.toString() : l;
|
|
1465
1465
|
}
|
|
1466
1466
|
if (a === void 0)
|
|
1467
1467
|
switch (e.V.kind) {
|
|
1468
1468
|
case "scalar":
|
|
1469
|
-
a =
|
|
1469
|
+
a = Ct(e.V.T, e.V.L);
|
|
1470
1470
|
break;
|
|
1471
1471
|
case "enum":
|
|
1472
1472
|
a = 0;
|
|
@@ -1512,7 +1512,7 @@ class Ti {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
}
|
|
1515
|
-
class
|
|
1515
|
+
class Ti {
|
|
1516
1516
|
constructor(e) {
|
|
1517
1517
|
this.info = e;
|
|
1518
1518
|
}
|
|
@@ -1541,30 +1541,30 @@ class Bi {
|
|
|
1541
1541
|
case "enum":
|
|
1542
1542
|
let h = s.kind == "enum" ? u.INT32 : s.T;
|
|
1543
1543
|
if (l)
|
|
1544
|
-
if (
|
|
1544
|
+
if (E(Array.isArray(o)), l == rt.PACKED)
|
|
1545
1545
|
this.packed(t, h, s.no, o);
|
|
1546
1546
|
else
|
|
1547
1547
|
for (const g of o)
|
|
1548
1548
|
this.scalar(t, h, s.no, g, !0);
|
|
1549
|
-
else o === void 0 ?
|
|
1549
|
+
else o === void 0 ? E(s.opt) : this.scalar(t, h, s.no, o, a || s.opt);
|
|
1550
1550
|
break;
|
|
1551
1551
|
case "message":
|
|
1552
1552
|
if (l) {
|
|
1553
|
-
|
|
1553
|
+
E(Array.isArray(o));
|
|
1554
1554
|
for (const g of o)
|
|
1555
1555
|
this.message(t, n, s.T(), s.no, g);
|
|
1556
1556
|
} else
|
|
1557
1557
|
this.message(t, n, s.T(), s.no, o);
|
|
1558
1558
|
break;
|
|
1559
1559
|
case "map":
|
|
1560
|
-
|
|
1560
|
+
E(typeof o == "object" && o !== null);
|
|
1561
1561
|
for (const [g, w] of Object.entries(o))
|
|
1562
1562
|
this.mapEntry(t, n, s, g, w);
|
|
1563
1563
|
break;
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
1566
|
let r = n.writeUnknownFields;
|
|
1567
|
-
r !== !1 && (r === !0 ?
|
|
1567
|
+
r !== !1 && (r === !0 ? N.onWrite : r)(this.info.typeName, e, t);
|
|
1568
1568
|
}
|
|
1569
1569
|
mapEntry(e, t, n, r, s) {
|
|
1570
1570
|
e.tag(n.no, m.LengthDelimited), e.fork();
|
|
@@ -1578,7 +1578,7 @@ class Bi {
|
|
|
1578
1578
|
o = Number.parseInt(r);
|
|
1579
1579
|
break;
|
|
1580
1580
|
case u.BOOL:
|
|
1581
|
-
|
|
1581
|
+
E(r == "true" || r == "false"), o = r == "true";
|
|
1582
1582
|
break;
|
|
1583
1583
|
}
|
|
1584
1584
|
switch (this.scalar(e, n.K, 1, o, !0), n.V.kind) {
|
|
@@ -1610,7 +1610,7 @@ class Bi {
|
|
|
1610
1610
|
packed(e, t, n, r) {
|
|
1611
1611
|
if (!r.length)
|
|
1612
1612
|
return;
|
|
1613
|
-
|
|
1613
|
+
E(t !== u.BYTES && t !== u.STRING), e.tag(n, m.LengthDelimited), e.fork();
|
|
1614
1614
|
let [, s] = this.scalarInfo(t);
|
|
1615
1615
|
for (let o = 0; o < r.length; o++)
|
|
1616
1616
|
e[s](r[o]);
|
|
@@ -1678,8 +1678,8 @@ class Bi {
|
|
|
1678
1678
|
return [n, r, s || o];
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1682
|
-
const e = i.messagePrototype ? Object.create(i.messagePrototype) : Object.defineProperty({},
|
|
1681
|
+
function Bi(i) {
|
|
1682
|
+
const e = i.messagePrototype ? Object.create(i.messagePrototype) : Object.defineProperty({}, Ln, { value: i });
|
|
1683
1683
|
for (let t of i.fields) {
|
|
1684
1684
|
let n = t.localName;
|
|
1685
1685
|
if (!t.opt)
|
|
@@ -1690,7 +1690,7 @@ function xi(i) {
|
|
|
1690
1690
|
else
|
|
1691
1691
|
switch (t.kind) {
|
|
1692
1692
|
case "scalar":
|
|
1693
|
-
e[n] =
|
|
1693
|
+
e[n] = Ct(t.T, t.L);
|
|
1694
1694
|
break;
|
|
1695
1695
|
case "enum":
|
|
1696
1696
|
e[n] = 0;
|
|
@@ -1748,7 +1748,7 @@ function V(i, e, t) {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function xi(i, e, t) {
|
|
1752
1752
|
if (e === t)
|
|
1753
1753
|
return !0;
|
|
1754
1754
|
if (!e || !t)
|
|
@@ -1759,7 +1759,7 @@ function _i(i, e, t) {
|
|
|
1759
1759
|
case "enum":
|
|
1760
1760
|
case "scalar":
|
|
1761
1761
|
let a = n.kind == "enum" ? u.INT32 : n.T;
|
|
1762
|
-
if (!(n.repeat ? tn(a, s, o) :
|
|
1762
|
+
if (!(n.repeat ? tn(a, s, o) : In(a, s, o)))
|
|
1763
1763
|
return !1;
|
|
1764
1764
|
break;
|
|
1765
1765
|
case "map":
|
|
@@ -1776,7 +1776,7 @@ function _i(i, e, t) {
|
|
|
1776
1776
|
return !0;
|
|
1777
1777
|
}
|
|
1778
1778
|
const ze = Object.values;
|
|
1779
|
-
function
|
|
1779
|
+
function In(i, e, t) {
|
|
1780
1780
|
if (e === t)
|
|
1781
1781
|
return !0;
|
|
1782
1782
|
if (i !== u.BYTES)
|
|
@@ -1793,7 +1793,7 @@ function tn(i, e, t) {
|
|
|
1793
1793
|
if (e.length !== t.length)
|
|
1794
1794
|
return !1;
|
|
1795
1795
|
for (let n = 0; n < e.length; n++)
|
|
1796
|
-
if (!
|
|
1796
|
+
if (!In(i, e[n], t[n]))
|
|
1797
1797
|
return !1;
|
|
1798
1798
|
return !0;
|
|
1799
1799
|
}
|
|
@@ -1805,13 +1805,13 @@ function nn(i, e, t) {
|
|
|
1805
1805
|
return !1;
|
|
1806
1806
|
return !0;
|
|
1807
1807
|
}
|
|
1808
|
-
const
|
|
1808
|
+
const _i = Object.getOwnPropertyDescriptors(Object.getPrototypeOf({}));
|
|
1809
1809
|
class Z {
|
|
1810
1810
|
constructor(e, t, n) {
|
|
1811
|
-
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(
|
|
1811
|
+
this.defaultCheckDepth = 16, this.typeName = e, this.fields = t.map(Ni), this.options = n ?? {}, this.messagePrototype = Object.create(null, Object.assign(Object.assign({}, _i), { [Ln]: { value: this } })), this.refTypeCheck = new Fi(this), this.refJsonReader = new Li(this), this.refJsonWriter = new Ii(this), this.refBinReader = new vi(this), this.refBinWriter = new Ti(this);
|
|
1812
1812
|
}
|
|
1813
1813
|
create(e) {
|
|
1814
|
-
let t =
|
|
1814
|
+
let t = Bi(this);
|
|
1815
1815
|
return e !== void 0 && V(this, t, e), t;
|
|
1816
1816
|
}
|
|
1817
1817
|
/**
|
|
@@ -1830,7 +1830,7 @@ class Z {
|
|
|
1830
1830
|
* Will also return true if both messages are `undefined`.
|
|
1831
1831
|
*/
|
|
1832
1832
|
equals(e, t) {
|
|
1833
|
-
return
|
|
1833
|
+
return xi(this, e, t);
|
|
1834
1834
|
}
|
|
1835
1835
|
/**
|
|
1836
1836
|
* Is the given value assignable to our message type
|
|
@@ -1856,14 +1856,14 @@ class Z {
|
|
|
1856
1856
|
* Create a new message from binary format.
|
|
1857
1857
|
*/
|
|
1858
1858
|
fromBinary(e, t) {
|
|
1859
|
-
let n =
|
|
1859
|
+
let n = hi(t);
|
|
1860
1860
|
return this.internalBinaryRead(n.readerFactory(e), e.byteLength, n);
|
|
1861
1861
|
}
|
|
1862
1862
|
/**
|
|
1863
1863
|
* Read a new message from a JSON value.
|
|
1864
1864
|
*/
|
|
1865
1865
|
fromJson(e, t) {
|
|
1866
|
-
return this.internalJsonRead(e,
|
|
1866
|
+
return this.internalJsonRead(e, Ci(t));
|
|
1867
1867
|
}
|
|
1868
1868
|
/**
|
|
1869
1869
|
* Read a new message from a JSON string.
|
|
@@ -1877,7 +1877,7 @@ class Z {
|
|
|
1877
1877
|
* Write the message to canonical JSON value.
|
|
1878
1878
|
*/
|
|
1879
1879
|
toJson(e, t) {
|
|
1880
|
-
return this.internalJsonWrite(e,
|
|
1880
|
+
return this.internalJsonWrite(e, Ei(t));
|
|
1881
1881
|
}
|
|
1882
1882
|
/**
|
|
1883
1883
|
* Convert the message to canonical JSON string.
|
|
@@ -1892,7 +1892,7 @@ class Z {
|
|
|
1892
1892
|
* Write the message to binary format.
|
|
1893
1893
|
*/
|
|
1894
1894
|
toBinary(e, t) {
|
|
1895
|
-
let n =
|
|
1895
|
+
let n = yi(t);
|
|
1896
1896
|
return this.internalBinaryWrite(e, n.writerFactory(), n).finish();
|
|
1897
1897
|
}
|
|
1898
1898
|
/**
|
|
@@ -1908,7 +1908,7 @@ class Z {
|
|
|
1908
1908
|
let r = n ?? this.create();
|
|
1909
1909
|
return this.refJsonReader.read(e, r, t), r;
|
|
1910
1910
|
}
|
|
1911
|
-
throw new Error(`Unable to parse message ${this.typeName} from JSON ${
|
|
1911
|
+
throw new Error(`Unable to parse message ${this.typeName} from JSON ${bn(e)}.`);
|
|
1912
1912
|
}
|
|
1913
1913
|
/**
|
|
1914
1914
|
* This is an internal method. If you just want to write a message
|
|
@@ -1942,14 +1942,14 @@ class Z {
|
|
|
1942
1942
|
return this.refBinReader.read(e, s, n, t), s;
|
|
1943
1943
|
}
|
|
1944
1944
|
}
|
|
1945
|
-
function
|
|
1945
|
+
function Oi(i, e) {
|
|
1946
1946
|
var t, n, r;
|
|
1947
1947
|
let s = i;
|
|
1948
|
-
return s.service = e, s.localName = (t = s.localName) !== null && t !== void 0 ? t :
|
|
1948
|
+
return s.service = e, s.localName = (t = s.localName) !== null && t !== void 0 ? t : bt(s.name), s.serverStreaming = !!s.serverStreaming, s.clientStreaming = !!s.clientStreaming, s.options = (n = s.options) !== null && n !== void 0 ? n : {}, s.idempotency = (r = s.idempotency) !== null && r !== void 0 ? r : void 0, s;
|
|
1949
1949
|
}
|
|
1950
1950
|
class At {
|
|
1951
1951
|
constructor(e, t, n) {
|
|
1952
|
-
this.typeName = e, this.methods = t.map((r) =>
|
|
1952
|
+
this.typeName = e, this.methods = t.map((r) => Oi(r, this)), this.options = n ?? {};
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
1955
|
class I extends Error {
|
|
@@ -1969,7 +1969,7 @@ class I extends Error {
|
|
|
1969
1969
|
`);
|
|
1970
1970
|
}
|
|
1971
1971
|
}
|
|
1972
|
-
function
|
|
1972
|
+
function Di(i, e) {
|
|
1973
1973
|
if (!e)
|
|
1974
1974
|
return i;
|
|
1975
1975
|
let t = {};
|
|
@@ -1981,7 +1981,7 @@ function Si(i, e) {
|
|
|
1981
1981
|
t.jsonOptions = ki(i.jsonOptions, t.jsonOptions);
|
|
1982
1982
|
break;
|
|
1983
1983
|
case "binaryOptions":
|
|
1984
|
-
t.binaryOptions =
|
|
1984
|
+
t.binaryOptions = ai(i.binaryOptions, t.binaryOptions);
|
|
1985
1985
|
break;
|
|
1986
1986
|
case "meta":
|
|
1987
1987
|
t.meta = {}, Ye(i.meta, t.meta), Ye(e.meta, t.meta);
|
|
@@ -2064,7 +2064,7 @@ class we {
|
|
|
2064
2064
|
this._state === z.PENDING && this.reject(e);
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
|
-
class
|
|
2067
|
+
class Si {
|
|
2068
2068
|
constructor() {
|
|
2069
2069
|
this._lis = {
|
|
2070
2070
|
nxt: [],
|
|
@@ -2110,7 +2110,7 @@ class Ui {
|
|
|
2110
2110
|
* Can be used to wrap a stream by using the other stream's `onNext`.
|
|
2111
2111
|
*/
|
|
2112
2112
|
notifyNext(e, t, n) {
|
|
2113
|
-
|
|
2113
|
+
E((e ? 1 : 0) + (t ? 1 : 0) + (n ? 1 : 0) <= 1, "only one emission at a time"), e && this.notifyMessage(e), t && this.notifyError(t), n && this.notifyComplete();
|
|
2114
2114
|
}
|
|
2115
2115
|
/**
|
|
2116
2116
|
* Emits a new message. Throws if stream is closed.
|
|
@@ -2118,7 +2118,7 @@ class Ui {
|
|
|
2118
2118
|
* Triggers onNext and onMessage callbacks.
|
|
2119
2119
|
*/
|
|
2120
2120
|
notifyMessage(e) {
|
|
2121
|
-
|
|
2121
|
+
E(!this.closed, "stream is closed"), this.pushIt({ value: e, done: !1 }), this._lis.msg.forEach((t) => t(e)), this._lis.nxt.forEach((t) => t(e, void 0, !1));
|
|
2122
2122
|
}
|
|
2123
2123
|
/**
|
|
2124
2124
|
* Closes the stream with an error. Throws if stream is closed.
|
|
@@ -2126,7 +2126,7 @@ class Ui {
|
|
|
2126
2126
|
* Triggers onNext and onError callbacks.
|
|
2127
2127
|
*/
|
|
2128
2128
|
notifyError(e) {
|
|
2129
|
-
|
|
2129
|
+
E(!this.closed, "stream is closed"), this._closed = e, this.pushIt(e), this._lis.err.forEach((t) => t(e)), this._lis.nxt.forEach((t) => t(void 0, e, !1)), this.clearLis();
|
|
2130
2130
|
}
|
|
2131
2131
|
/**
|
|
2132
2132
|
* Closes the stream successfully. Throws if stream is closed.
|
|
@@ -2134,7 +2134,7 @@ class Ui {
|
|
|
2134
2134
|
* Triggers onNext and onComplete callbacks.
|
|
2135
2135
|
*/
|
|
2136
2136
|
notifyComplete() {
|
|
2137
|
-
|
|
2137
|
+
E(!this.closed, "stream is closed"), this._closed = !0, this.pushIt({ value: null, done: !0 }), this._lis.cmp.forEach((e) => e()), this._lis.nxt.forEach((e) => e(void 0, void 0, !0)), this.clearLis();
|
|
2138
2138
|
}
|
|
2139
2139
|
/**
|
|
2140
2140
|
* Creates an async iterator (that can be used with `for await {...}`)
|
|
@@ -2153,7 +2153,7 @@ class Ui {
|
|
|
2153
2153
|
return this._itState || (this._itState = { q: [] }), this._closed === !0 ? this.pushIt({ value: null, done: !0 }) : this._closed !== !1 && this.pushIt(this._closed), {
|
|
2154
2154
|
next: () => {
|
|
2155
2155
|
let e = this._itState;
|
|
2156
|
-
|
|
2156
|
+
E(e, "bad state"), E(!e.p, "iterator contract broken");
|
|
2157
2157
|
let t = e.q.shift();
|
|
2158
2158
|
return t ? "value" in t ? Promise.resolve(t) : Promise.reject(t) : (e.p = new we(), e.p.promise);
|
|
2159
2159
|
}
|
|
@@ -2166,12 +2166,12 @@ class Ui {
|
|
|
2166
2166
|
if (t)
|
|
2167
2167
|
if (t.p) {
|
|
2168
2168
|
const n = t.p;
|
|
2169
|
-
|
|
2169
|
+
E(n.state == z.PENDING, "iterator contract broken"), "value" in e ? n.resolve(e) : n.reject(e), delete t.p;
|
|
2170
2170
|
} else
|
|
2171
2171
|
t.q.push(e);
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
2174
|
-
var
|
|
2174
|
+
var Ui = function(i, e, t, n) {
|
|
2175
2175
|
function r(s) {
|
|
2176
2176
|
return s instanceof t ? s : new t(function(o) {
|
|
2177
2177
|
o(s);
|
|
@@ -2198,7 +2198,7 @@ var Ri = function(i, e, t, n) {
|
|
|
2198
2198
|
c((n = n.apply(i, e || [])).next());
|
|
2199
2199
|
});
|
|
2200
2200
|
};
|
|
2201
|
-
class
|
|
2201
|
+
class Ri {
|
|
2202
2202
|
constructor(e, t, n, r, s, o, a) {
|
|
2203
2203
|
this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.response = s, this.status = o, this.trailers = a;
|
|
2204
2204
|
}
|
|
@@ -2210,7 +2210,7 @@ class Mi {
|
|
|
2210
2210
|
return this.promiseFinished().then((n) => e ? Promise.resolve(e(n)) : n, (n) => t ? Promise.resolve(t(n)) : Promise.reject(n));
|
|
2211
2211
|
}
|
|
2212
2212
|
promiseFinished() {
|
|
2213
|
-
return
|
|
2213
|
+
return Ui(this, void 0, void 0, function* () {
|
|
2214
2214
|
let [e, t, n, r] = yield Promise.all([this.headers, this.response, this.status, this.trailers]);
|
|
2215
2215
|
return {
|
|
2216
2216
|
method: this.method,
|
|
@@ -2224,7 +2224,7 @@ class Mi {
|
|
|
2224
2224
|
});
|
|
2225
2225
|
}
|
|
2226
2226
|
}
|
|
2227
|
-
var
|
|
2227
|
+
var Mi = function(i, e, t, n) {
|
|
2228
2228
|
function r(s) {
|
|
2229
2229
|
return s instanceof t ? s : new t(function(o) {
|
|
2230
2230
|
o(s);
|
|
@@ -2251,7 +2251,7 @@ var Vi = function(i, e, t, n) {
|
|
|
2251
2251
|
c((n = n.apply(i, e || [])).next());
|
|
2252
2252
|
});
|
|
2253
2253
|
};
|
|
2254
|
-
class
|
|
2254
|
+
class Vi {
|
|
2255
2255
|
constructor(e, t, n, r, s, o, a) {
|
|
2256
2256
|
this.method = e, this.requestHeaders = t, this.request = n, this.headers = r, this.responses = s, this.status = o, this.trailers = a;
|
|
2257
2257
|
}
|
|
@@ -2265,7 +2265,7 @@ class Hi {
|
|
|
2265
2265
|
return this.promiseFinished().then((n) => e ? Promise.resolve(e(n)) : n, (n) => t ? Promise.resolve(t(n)) : Promise.reject(n));
|
|
2266
2266
|
}
|
|
2267
2267
|
promiseFinished() {
|
|
2268
|
-
return
|
|
2268
|
+
return Mi(this, void 0, void 0, function* () {
|
|
2269
2269
|
let [e, t, n] = yield Promise.all([this.headers, this.status, this.trailers]);
|
|
2270
2270
|
return {
|
|
2271
2271
|
method: this.method,
|
|
@@ -2293,7 +2293,7 @@ var f;
|
|
|
2293
2293
|
(function(i) {
|
|
2294
2294
|
i[i.OK = 0] = "OK", i[i.CANCELLED = 1] = "CANCELLED", i[i.UNKNOWN = 2] = "UNKNOWN", i[i.INVALID_ARGUMENT = 3] = "INVALID_ARGUMENT", i[i.DEADLINE_EXCEEDED = 4] = "DEADLINE_EXCEEDED", i[i.NOT_FOUND = 5] = "NOT_FOUND", i[i.ALREADY_EXISTS = 6] = "ALREADY_EXISTS", i[i.PERMISSION_DENIED = 7] = "PERMISSION_DENIED", i[i.UNAUTHENTICATED = 16] = "UNAUTHENTICATED", i[i.RESOURCE_EXHAUSTED = 8] = "RESOURCE_EXHAUSTED", i[i.FAILED_PRECONDITION = 9] = "FAILED_PRECONDITION", i[i.ABORTED = 10] = "ABORTED", i[i.OUT_OF_RANGE = 11] = "OUT_OF_RANGE", i[i.UNIMPLEMENTED = 12] = "UNIMPLEMENTED", i[i.INTERNAL = 13] = "INTERNAL", i[i.UNAVAILABLE = 14] = "UNAVAILABLE", i[i.DATA_LOSS = 15] = "DATA_LOSS";
|
|
2295
2295
|
})(f || (f = {}));
|
|
2296
|
-
var
|
|
2296
|
+
var Hi = function(i, e, t, n) {
|
|
2297
2297
|
function r(s) {
|
|
2298
2298
|
return s instanceof t ? s : new t(function(o) {
|
|
2299
2299
|
o(s);
|
|
@@ -2345,9 +2345,9 @@ function sn(i, e) {
|
|
|
2345
2345
|
t[0] = ne.DATA;
|
|
2346
2346
|
for (let n = i.length, r = 4; r > 0; r--)
|
|
2347
2347
|
t[r] = n % 256, n >>>= 8;
|
|
2348
|
-
return t.set(i, 5), e === "binary" ? t :
|
|
2348
|
+
return t.set(i, 5), e === "binary" ? t : En(t);
|
|
2349
2349
|
}
|
|
2350
|
-
function
|
|
2350
|
+
function Et(i, e, t) {
|
|
2351
2351
|
if (arguments.length === 1) {
|
|
2352
2352
|
let l = i, c;
|
|
2353
2353
|
try {
|
|
@@ -2360,13 +2360,13 @@ function Ct(i, e, t) {
|
|
|
2360
2360
|
case "opaqueredirect":
|
|
2361
2361
|
throw new I(`fetch response type ${l.type}`, f[f.UNKNOWN]);
|
|
2362
2362
|
}
|
|
2363
|
-
return
|
|
2363
|
+
return Et(Zi(l.headers), l.status, l.statusText);
|
|
2364
2364
|
}
|
|
2365
|
-
let n = i, r = e >= 200 && e < 300, s =
|
|
2366
|
-
return (o === void 0 || o === f.OK) && !r && (o =
|
|
2365
|
+
let n = i, r = e >= 200 && e < 300, s = Tn(n), [o, a] = vn(n);
|
|
2366
|
+
return (o === void 0 || o === f.OK) && !r && (o = qi(e), a = t), [o, a, s];
|
|
2367
2367
|
}
|
|
2368
2368
|
function on(i) {
|
|
2369
|
-
let e =
|
|
2369
|
+
let e = ji(i), [t, n] = vn(e), r = Tn(e);
|
|
2370
2370
|
return [t ?? f.OK, n, r];
|
|
2371
2371
|
}
|
|
2372
2372
|
var ne;
|
|
@@ -2374,9 +2374,9 @@ var ne;
|
|
|
2374
2374
|
i[i.DATA = 0] = "DATA", i[i.TRAILER = 128] = "TRAILER";
|
|
2375
2375
|
})(ne || (ne = {}));
|
|
2376
2376
|
function an(i, e, t) {
|
|
2377
|
-
return
|
|
2378
|
-
let n, r = "", s = new Uint8Array(0), o =
|
|
2379
|
-
if (
|
|
2377
|
+
return Hi(this, void 0, void 0, function* () {
|
|
2378
|
+
let n, r = "", s = new Uint8Array(0), o = Wi(e);
|
|
2379
|
+
if ($i(i)) {
|
|
2380
2380
|
let a = i.getReader();
|
|
2381
2381
|
n = {
|
|
2382
2382
|
next: () => a.read()
|
|
@@ -2392,7 +2392,7 @@ function an(i, e, t) {
|
|
|
2392
2392
|
let l = r.length - r.length % 4;
|
|
2393
2393
|
if (l === 0)
|
|
2394
2394
|
continue;
|
|
2395
|
-
s = ln(s,
|
|
2395
|
+
s = ln(s, Cn(r.substring(0, l))), r = r.substring(l);
|
|
2396
2396
|
} else
|
|
2397
2397
|
s = ln(s, a.value);
|
|
2398
2398
|
for (; s.length >= 5 && s[0] === ne.DATA; ) {
|
|
@@ -2416,12 +2416,12 @@ function an(i, e, t) {
|
|
|
2416
2416
|
}
|
|
2417
2417
|
});
|
|
2418
2418
|
}
|
|
2419
|
-
const
|
|
2419
|
+
const $i = (i) => typeof i.getReader == "function";
|
|
2420
2420
|
function ln(i, e) {
|
|
2421
2421
|
let t = new Uint8Array(i.length + e.length);
|
|
2422
2422
|
return t.set(i), t.set(e, i.length), t;
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2424
|
+
function Wi(i) {
|
|
2425
2425
|
switch (i) {
|
|
2426
2426
|
case "application/grpc-web-text":
|
|
2427
2427
|
case "application/grpc-web-text+proto":
|
|
@@ -2436,7 +2436,7 @@ function ji(i) {
|
|
|
2436
2436
|
throw new I("unexpected response content type: " + i, f[f.INTERNAL]);
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
|
-
function
|
|
2439
|
+
function vn(i) {
|
|
2440
2440
|
let e, t, n = i["grpc-message"];
|
|
2441
2441
|
if (n !== void 0) {
|
|
2442
2442
|
if (Array.isArray(n))
|
|
@@ -2452,7 +2452,7 @@ function Tn(i) {
|
|
|
2452
2452
|
}
|
|
2453
2453
|
return [e, t];
|
|
2454
2454
|
}
|
|
2455
|
-
function
|
|
2455
|
+
function Tn(i) {
|
|
2456
2456
|
let e = {};
|
|
2457
2457
|
for (let [t, n] of Object.entries(i))
|
|
2458
2458
|
switch (t) {
|
|
@@ -2465,7 +2465,7 @@ function Bn(i) {
|
|
|
2465
2465
|
}
|
|
2466
2466
|
return e;
|
|
2467
2467
|
}
|
|
2468
|
-
function
|
|
2468
|
+
function ji(i) {
|
|
2469
2469
|
let e = {};
|
|
2470
2470
|
for (let t of String.fromCharCode.apply(String, i).trim().split(`\r
|
|
2471
2471
|
`)) {
|
|
@@ -2479,14 +2479,14 @@ function Zi(i) {
|
|
|
2479
2479
|
}
|
|
2480
2480
|
return e;
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2482
|
+
function Zi(i) {
|
|
2483
2483
|
let e = {};
|
|
2484
2484
|
return i.forEach((t, n) => {
|
|
2485
2485
|
let r = e[n];
|
|
2486
2486
|
typeof r == "string" ? e[n] = [r, t] : Array.isArray(r) ? r.push(t) : e[n] = t;
|
|
2487
2487
|
}), e;
|
|
2488
2488
|
}
|
|
2489
|
-
function
|
|
2489
|
+
function qi(i) {
|
|
2490
2490
|
switch (i) {
|
|
2491
2491
|
case 200:
|
|
2492
2492
|
return f.OK;
|
|
@@ -2518,12 +2518,12 @@ function Pi(i) {
|
|
|
2518
2518
|
return f.UNKNOWN;
|
|
2519
2519
|
}
|
|
2520
2520
|
}
|
|
2521
|
-
class
|
|
2521
|
+
class Pi {
|
|
2522
2522
|
constructor(e) {
|
|
2523
2523
|
this.defaultOptions = e;
|
|
2524
2524
|
}
|
|
2525
2525
|
mergeOptions(e) {
|
|
2526
|
-
return
|
|
2526
|
+
return Di(this.defaultOptions, e);
|
|
2527
2527
|
}
|
|
2528
2528
|
/**
|
|
2529
2529
|
* Create an URI for a gRPC web call.
|
|
@@ -2555,7 +2555,7 @@ class Ki {
|
|
|
2555
2555
|
}
|
|
2556
2556
|
serverStreaming(e, t, n) {
|
|
2557
2557
|
var r, s, o, a;
|
|
2558
|
-
let l = n, c = (r = l.format) !== null && r !== void 0 ? r : "text", h = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), w = e.I.toBinary(t, l.binaryOptions), A = new we(), B = new
|
|
2558
|
+
let l = n, c = (r = l.format) !== null && r !== void 0 ? r : "text", h = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), w = e.I.toBinary(t, l.binaryOptions), A = new we(), B = new Si(), H = !0, F, $ = new we(), W, Y = new we();
|
|
2559
2559
|
return globalThis.fetch(g, Object.assign(Object.assign({}, h), {
|
|
2560
2560
|
method: "POST",
|
|
2561
2561
|
headers: rn(new globalThis.Headers(), c, l.timeout, l.meta),
|
|
@@ -2563,10 +2563,10 @@ class Ki {
|
|
|
2563
2563
|
signal: (o = n.abort) !== null && o !== void 0 ? o : null
|
|
2564
2564
|
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2565
2565
|
})).then((C) => {
|
|
2566
|
-
let [b, D, q] =
|
|
2566
|
+
let [b, D, q] = Et(C);
|
|
2567
2567
|
if (A.resolve(q), b != null && b !== f.OK)
|
|
2568
2568
|
throw new I(D ?? f[b], f[b], q);
|
|
2569
|
-
return b != null && (
|
|
2569
|
+
return b != null && (F = {
|
|
2570
2570
|
code: f[b],
|
|
2571
2571
|
detail: D ?? f[b]
|
|
2572
2572
|
}), C;
|
|
@@ -2580,7 +2580,7 @@ class Ki {
|
|
|
2580
2580
|
break;
|
|
2581
2581
|
case ne.TRAILER:
|
|
2582
2582
|
let q, Q;
|
|
2583
|
-
[q, Q, W] = on(D),
|
|
2583
|
+
[q, Q, W] = on(D), F = {
|
|
2584
2584
|
code: f[q],
|
|
2585
2585
|
detail: Q ?? f[q]
|
|
2586
2586
|
};
|
|
@@ -2590,19 +2590,19 @@ class Ki {
|
|
|
2590
2590
|
}).then(() => {
|
|
2591
2591
|
if (!W && !H)
|
|
2592
2592
|
throw new I("missing trailers", f[f.DATA_LOSS]);
|
|
2593
|
-
if (!
|
|
2593
|
+
if (!F)
|
|
2594
2594
|
throw new I("missing status", f[f.INTERNAL]);
|
|
2595
|
-
if (
|
|
2596
|
-
throw new I(
|
|
2597
|
-
B.notifyComplete(), $.resolve(
|
|
2595
|
+
if (F.code !== "OK")
|
|
2596
|
+
throw new I(F.detail, F.code, W);
|
|
2597
|
+
B.notifyComplete(), $.resolve(F), Y.resolve(W || {});
|
|
2598
2598
|
}).catch((C) => {
|
|
2599
2599
|
let b;
|
|
2600
2600
|
C instanceof I ? b = C : C instanceof Error && C.name === "AbortError" ? b = new I(C.message, f[f.CANCELLED]) : b = new I(C instanceof Error ? C.message : "" + C, f[f.INTERNAL]), b.methodName = e.name, b.serviceName = e.service.typeName, A.rejectPending(b), B.notifyError(b), $.rejectPending(b), Y.rejectPending(b);
|
|
2601
|
-
}), new
|
|
2601
|
+
}), new Vi(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, A.promise, B, $.promise, Y.promise);
|
|
2602
2602
|
}
|
|
2603
2603
|
unary(e, t, n) {
|
|
2604
2604
|
var r, s, o, a;
|
|
2605
|
-
let l = n, c = (r = l.format) !== null && r !== void 0 ? r : "text", h = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), w = e.I.toBinary(t, l.binaryOptions), A = new we(), B, H = new we(),
|
|
2605
|
+
let l = n, c = (r = l.format) !== null && r !== void 0 ? r : "text", h = (s = l.fetchInit) !== null && s !== void 0 ? s : {}, g = this.makeUrl(e, l), w = e.I.toBinary(t, l.binaryOptions), A = new we(), B, H = new we(), F, $ = new we(), W, Y = new we();
|
|
2606
2606
|
return globalThis.fetch(g, Object.assign(Object.assign({}, h), {
|
|
2607
2607
|
method: "POST",
|
|
2608
2608
|
headers: rn(new globalThis.Headers(), c, l.timeout, l.meta),
|
|
@@ -2610,10 +2610,10 @@ class Ki {
|
|
|
2610
2610
|
signal: (o = n.abort) !== null && o !== void 0 ? o : null
|
|
2611
2611
|
// node-fetch@3.0.0-beta.9 rejects `undefined`
|
|
2612
2612
|
})).then((C) => {
|
|
2613
|
-
let [b, D, q] =
|
|
2613
|
+
let [b, D, q] = Et(C);
|
|
2614
2614
|
if (A.resolve(q), b != null && b !== f.OK)
|
|
2615
2615
|
throw new I(D ?? f[b], f[b], q);
|
|
2616
|
-
return b != null && (
|
|
2616
|
+
return b != null && (F = {
|
|
2617
2617
|
code: f[b],
|
|
2618
2618
|
detail: D ?? f[b]
|
|
2619
2619
|
}), C;
|
|
@@ -2629,7 +2629,7 @@ class Ki {
|
|
|
2629
2629
|
break;
|
|
2630
2630
|
case ne.TRAILER:
|
|
2631
2631
|
let q, Q;
|
|
2632
|
-
[q, Q, W] = on(D),
|
|
2632
|
+
[q, Q, W] = on(D), F = {
|
|
2633
2633
|
code: f[q],
|
|
2634
2634
|
detail: Q ?? f[q]
|
|
2635
2635
|
};
|
|
@@ -2639,23 +2639,23 @@ class Ki {
|
|
|
2639
2639
|
}).then(() => {
|
|
2640
2640
|
if (!W && B)
|
|
2641
2641
|
throw new I("missing trailers", f[f.DATA_LOSS]);
|
|
2642
|
-
if (!
|
|
2642
|
+
if (!F)
|
|
2643
2643
|
throw new I("missing status", f[f.INTERNAL]);
|
|
2644
|
-
if (!B &&
|
|
2644
|
+
if (!B && F.code === "OK")
|
|
2645
2645
|
throw new I("expected error status", f[f.DATA_LOSS]);
|
|
2646
2646
|
if (!B)
|
|
2647
|
-
throw new I(
|
|
2648
|
-
if (H.resolve(B),
|
|
2649
|
-
throw new I(
|
|
2650
|
-
$.resolve(
|
|
2647
|
+
throw new I(F.detail, F.code, W);
|
|
2648
|
+
if (H.resolve(B), F.code !== "OK")
|
|
2649
|
+
throw new I(F.detail, F.code, W);
|
|
2650
|
+
$.resolve(F), Y.resolve(W || {});
|
|
2651
2651
|
}).catch((C) => {
|
|
2652
2652
|
let b;
|
|
2653
2653
|
C instanceof I ? b = C : C instanceof Error && C.name === "AbortError" ? b = new I(C.message, f[f.CANCELLED]) : b = new I(C instanceof Error ? C.message : "" + C, f[f.INTERNAL]), b.methodName = e.name, b.serviceName = e.service.typeName, A.rejectPending(b), H.rejectPending(b), $.rejectPending(b), Y.rejectPending(b);
|
|
2654
|
-
}), new
|
|
2654
|
+
}), new Ri(e, (a = l.meta) !== null && a !== void 0 ? a : {}, t, A.promise, H.promise, $.promise, Y.promise);
|
|
2655
2655
|
}
|
|
2656
2656
|
}
|
|
2657
|
-
var
|
|
2658
|
-
class
|
|
2657
|
+
var Ft = /* @__PURE__ */ ((i) => (i[i.IMAGE = 0] = "IMAGE", i[i.AUDIO = 1] = "AUDIO", i[i.VIDEO = 2] = "VIDEO", i[i.ALL = 3] = "ALL", i[i.FOLDER = 4] = "FOLDER", i))(Ft || {});
|
|
2658
|
+
class Ki extends Z {
|
|
2659
2659
|
constructor() {
|
|
2660
2660
|
super("com.hamropatro.grpc.cms.SearchRequest", [
|
|
2661
2661
|
{
|
|
@@ -2707,7 +2707,7 @@ class Xi extends Z {
|
|
|
2707
2707
|
if (c === "throw")
|
|
2708
2708
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
2709
2709
|
let h = e.skip(l);
|
|
2710
|
-
c !== !1 && (c === !0 ?
|
|
2710
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
2711
2711
|
}
|
|
2712
2712
|
}
|
|
2713
2713
|
return s;
|
|
@@ -2715,11 +2715,11 @@ class Xi extends Z {
|
|
|
2715
2715
|
internalBinaryWrite(e, t, n) {
|
|
2716
2716
|
e.searchValue !== "" && t.tag(1, m.LengthDelimited).string(e.searchValue), e.cursor !== "" && t.tag(2, m.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, m.Varint).int32(e.limit);
|
|
2717
2717
|
let r = n.writeUnknownFields;
|
|
2718
|
-
return r !== !1 && (r == !0 ?
|
|
2718
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
2719
2719
|
}
|
|
2720
2720
|
}
|
|
2721
|
-
const
|
|
2722
|
-
class
|
|
2721
|
+
const Bn = new Ki();
|
|
2722
|
+
class Xi extends Z {
|
|
2723
2723
|
constructor() {
|
|
2724
2724
|
super("com.hamropatro.grpc.cms.SearchResult", [
|
|
2725
2725
|
{ no: 1, name: "items", kind: "message", repeat: 1, T: () => ce },
|
|
@@ -2754,7 +2754,7 @@ class Gi extends Z {
|
|
|
2754
2754
|
if (c === "throw")
|
|
2755
2755
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
2756
2756
|
let h = e.skip(l);
|
|
2757
|
-
c !== !1 && (c === !0 ?
|
|
2757
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
2758
2758
|
}
|
|
2759
2759
|
}
|
|
2760
2760
|
return s;
|
|
@@ -2764,11 +2764,11 @@ class Gi extends Z {
|
|
|
2764
2764
|
ce.internalBinaryWrite(e.items[s], t.tag(1, m.LengthDelimited).fork(), n).join();
|
|
2765
2765
|
e.nextPageCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextPageCursor);
|
|
2766
2766
|
let r = n.writeUnknownFields;
|
|
2767
|
-
return r !== !1 && (r == !0 ?
|
|
2767
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
2768
2768
|
}
|
|
2769
2769
|
}
|
|
2770
|
-
const
|
|
2771
|
-
class
|
|
2770
|
+
const Gi = new Xi();
|
|
2771
|
+
class Ji extends Z {
|
|
2772
2772
|
constructor() {
|
|
2773
2773
|
super("com.hamropatro.grpc.cms.CreateFileRequest", [
|
|
2774
2774
|
{
|
|
@@ -2799,7 +2799,7 @@ class zi extends Z {
|
|
|
2799
2799
|
T: 9
|
|
2800
2800
|
/*ScalarType.STRING*/
|
|
2801
2801
|
},
|
|
2802
|
-
{ no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType",
|
|
2802
|
+
{ no: 5, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", Ft] }
|
|
2803
2803
|
]);
|
|
2804
2804
|
}
|
|
2805
2805
|
create(e) {
|
|
@@ -2836,7 +2836,7 @@ class zi extends Z {
|
|
|
2836
2836
|
if (c === "throw")
|
|
2837
2837
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
2838
2838
|
let h = e.skip(l);
|
|
2839
|
-
c !== !1 && (c === !0 ?
|
|
2839
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
2840
2840
|
}
|
|
2841
2841
|
}
|
|
2842
2842
|
return s;
|
|
@@ -2844,11 +2844,11 @@ class zi extends Z {
|
|
|
2844
2844
|
internalBinaryWrite(e, t, n) {
|
|
2845
2845
|
e.name !== "" && t.tag(1, m.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(2, m.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(3, m.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(4, m.LengthDelimited).string(e.url), e.type !== 0 && t.tag(5, m.Varint).int32(e.type);
|
|
2846
2846
|
let r = n.writeUnknownFields;
|
|
2847
|
-
return r !== !1 && (r == !0 ?
|
|
2847
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
2848
2848
|
}
|
|
2849
2849
|
}
|
|
2850
|
-
const
|
|
2851
|
-
class
|
|
2850
|
+
const xn = new Ji();
|
|
2851
|
+
class zi extends Z {
|
|
2852
2852
|
constructor() {
|
|
2853
2853
|
super("com.hamropatro.grpc.cms.File", [
|
|
2854
2854
|
{
|
|
@@ -2900,7 +2900,7 @@ class Yi extends Z {
|
|
|
2900
2900
|
T: 9
|
|
2901
2901
|
/*ScalarType.STRING*/
|
|
2902
2902
|
},
|
|
2903
|
-
{ no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType",
|
|
2903
|
+
{ no: 8, name: "type", kind: "enum", T: () => ["com.hamropatro.grpc.cms.FileType", Ft] },
|
|
2904
2904
|
{ no: 9, name: "metadata", kind: "message", T: () => ut }
|
|
2905
2905
|
]);
|
|
2906
2906
|
}
|
|
@@ -2954,7 +2954,7 @@ class Yi extends Z {
|
|
|
2954
2954
|
if (c === "throw")
|
|
2955
2955
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
2956
2956
|
let h = e.skip(l);
|
|
2957
|
-
c !== !1 && (c === !0 ?
|
|
2957
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
2958
2958
|
}
|
|
2959
2959
|
}
|
|
2960
2960
|
return s;
|
|
@@ -2962,11 +2962,11 @@ class Yi extends Z {
|
|
|
2962
2962
|
internalBinaryWrite(e, t, n) {
|
|
2963
2963
|
e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, m.LengthDelimited).string(e.name), e.folderName !== "" && t.tag(3, m.LengthDelimited).string(e.folderName), e.nestedFolderName !== "" && t.tag(4, m.LengthDelimited).string(e.nestedFolderName), e.url !== "" && t.tag(5, m.LengthDelimited).string(e.url), e.thumborUrl !== "" && t.tag(6, m.LengthDelimited).string(e.thumborUrl), e.proxyUrl !== "" && t.tag(7, m.LengthDelimited).string(e.proxyUrl), e.type !== 0 && t.tag(8, m.Varint).int32(e.type), e.metadata && ut.internalBinaryWrite(e.metadata, t.tag(9, m.LengthDelimited).fork(), n).join();
|
|
2964
2964
|
let r = n.writeUnknownFields;
|
|
2965
|
-
return r !== !1 && (r == !0 ?
|
|
2965
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
2966
2966
|
}
|
|
2967
2967
|
}
|
|
2968
|
-
const ce = new
|
|
2969
|
-
class
|
|
2968
|
+
const ce = new zi();
|
|
2969
|
+
class Yi extends Z {
|
|
2970
2970
|
constructor() {
|
|
2971
2971
|
super("com.hamropatro.grpc.cms.FileMetadata", [
|
|
2972
2972
|
{
|
|
@@ -3029,7 +3029,7 @@ class Qi extends Z {
|
|
|
3029
3029
|
if (c === "throw")
|
|
3030
3030
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
3031
3031
|
let h = e.skip(l);
|
|
3032
|
-
c !== !1 && (c === !0 ?
|
|
3032
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
3033
3033
|
}
|
|
3034
3034
|
}
|
|
3035
3035
|
return s;
|
|
@@ -3037,11 +3037,11 @@ class Qi extends Z {
|
|
|
3037
3037
|
internalBinaryWrite(e, t, n) {
|
|
3038
3038
|
e.height !== 0 && t.tag(1, m.Varint).int32(e.height), e.width !== 0 && t.tag(2, m.Varint).int32(e.width), e.backgroundColor !== "" && t.tag(3, m.LengthDelimited).string(e.backgroundColor), e.aspectRatio !== 0 && t.tag(4, m.Bit64).double(e.aspectRatio);
|
|
3039
3039
|
let r = n.writeUnknownFields;
|
|
3040
|
-
return r !== !1 && (r == !0 ?
|
|
3040
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3041
3041
|
}
|
|
3042
3042
|
}
|
|
3043
|
-
const ut = new
|
|
3044
|
-
class
|
|
3043
|
+
const ut = new Yi();
|
|
3044
|
+
class Qi extends Z {
|
|
3045
3045
|
constructor() {
|
|
3046
3046
|
super("com.hamropatro.grpc.cms.DeleteFileRequest", [
|
|
3047
3047
|
{
|
|
@@ -3071,7 +3071,7 @@ class er extends Z {
|
|
|
3071
3071
|
if (c === "throw")
|
|
3072
3072
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
3073
3073
|
let h = e.skip(l);
|
|
3074
|
-
c !== !1 && (c === !0 ?
|
|
3074
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
3075
3075
|
}
|
|
3076
3076
|
}
|
|
3077
3077
|
return s;
|
|
@@ -3079,11 +3079,11 @@ class er extends Z {
|
|
|
3079
3079
|
internalBinaryWrite(e, t, n) {
|
|
3080
3080
|
e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key);
|
|
3081
3081
|
let r = n.writeUnknownFields;
|
|
3082
|
-
return r !== !1 && (r == !0 ?
|
|
3082
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3083
3083
|
}
|
|
3084
3084
|
}
|
|
3085
|
-
const
|
|
3086
|
-
class
|
|
3085
|
+
const _n = new Qi();
|
|
3086
|
+
class er extends Z {
|
|
3087
3087
|
constructor() {
|
|
3088
3088
|
super("com.hamropatro.grpc.cms.DeleteFileResponse", [
|
|
3089
3089
|
{
|
|
@@ -3113,7 +3113,7 @@ class tr extends Z {
|
|
|
3113
3113
|
if (c === "throw")
|
|
3114
3114
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
3115
3115
|
let h = e.skip(l);
|
|
3116
|
-
c !== !1 && (c === !0 ?
|
|
3116
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
3117
3117
|
}
|
|
3118
3118
|
}
|
|
3119
3119
|
return s;
|
|
@@ -3121,11 +3121,11 @@ class tr extends Z {
|
|
|
3121
3121
|
internalBinaryWrite(e, t, n) {
|
|
3122
3122
|
e.isDeleted !== !1 && t.tag(1, m.Varint).bool(e.isDeleted);
|
|
3123
3123
|
let r = n.writeUnknownFields;
|
|
3124
|
-
return r !== !1 && (r == !0 ?
|
|
3124
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3125
3125
|
}
|
|
3126
3126
|
}
|
|
3127
|
-
const
|
|
3128
|
-
class
|
|
3127
|
+
const tr = new er();
|
|
3128
|
+
class nr extends Z {
|
|
3129
3129
|
constructor() {
|
|
3130
3130
|
super("com.hamropatro.grpc.cms.GetFilesByFolderRequest", [
|
|
3131
3131
|
{
|
|
@@ -3177,7 +3177,7 @@ class ir extends Z {
|
|
|
3177
3177
|
if (c === "throw")
|
|
3178
3178
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
3179
3179
|
let h = e.skip(l);
|
|
3180
|
-
c !== !1 && (c === !0 ?
|
|
3180
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
3181
3181
|
}
|
|
3182
3182
|
}
|
|
3183
3183
|
return s;
|
|
@@ -3185,11 +3185,11 @@ class ir extends Z {
|
|
|
3185
3185
|
internalBinaryWrite(e, t, n) {
|
|
3186
3186
|
e.folderName !== "" && t.tag(1, m.LengthDelimited).string(e.folderName), e.cursor !== "" && t.tag(2, m.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(3, m.Varint).int32(e.limit);
|
|
3187
3187
|
let r = n.writeUnknownFields;
|
|
3188
|
-
return r !== !1 && (r == !0 ?
|
|
3188
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3189
3189
|
}
|
|
3190
3190
|
}
|
|
3191
|
-
const
|
|
3192
|
-
class
|
|
3191
|
+
const On = new nr();
|
|
3192
|
+
class ir extends Z {
|
|
3193
3193
|
constructor() {
|
|
3194
3194
|
super("com.hamropatro.grpc.cms.GetFilesByFolderResponse", [
|
|
3195
3195
|
{ no: 1, name: "files", kind: "message", repeat: 1, T: () => ce },
|
|
@@ -3235,7 +3235,7 @@ class rr extends Z {
|
|
|
3235
3235
|
if (c === "throw")
|
|
3236
3236
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
3237
3237
|
let h = e.skip(l);
|
|
3238
|
-
c !== !1 && (c === !0 ?
|
|
3238
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
3239
3239
|
}
|
|
3240
3240
|
}
|
|
3241
3241
|
return s;
|
|
@@ -3245,15 +3245,15 @@ class rr extends Z {
|
|
|
3245
3245
|
ce.internalBinaryWrite(e.files[s], t.tag(1, m.LengthDelimited).fork(), n).join();
|
|
3246
3246
|
e.nextCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, m.Varint).bool(e.hasMore);
|
|
3247
3247
|
let r = n.writeUnknownFields;
|
|
3248
|
-
return r !== !1 && (r == !0 ?
|
|
3248
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3249
3249
|
}
|
|
3250
3250
|
}
|
|
3251
|
-
const
|
|
3252
|
-
{ name: "createFile", options: {}, I:
|
|
3251
|
+
const rr = new ir(), pt = new At("com.hamropatro.grpc.cms.FileService", [
|
|
3252
|
+
{ name: "createFile", options: {}, I: xn, O: ce },
|
|
3253
3253
|
{ name: "updateFile", options: {}, I: ce, O: ce },
|
|
3254
|
-
{ name: "deleteFile", options: {}, I:
|
|
3255
|
-
{ name: "getFilesByFolder", options: {}, I:
|
|
3256
|
-
{ name: "search", options: {}, I:
|
|
3254
|
+
{ name: "deleteFile", options: {}, I: _n, O: tr },
|
|
3255
|
+
{ name: "getFilesByFolder", options: {}, I: On, O: rr },
|
|
3256
|
+
{ name: "search", options: {}, I: Bn, O: Gi }
|
|
3257
3257
|
]);
|
|
3258
3258
|
class Xe {
|
|
3259
3259
|
constructor(e) {
|
|
@@ -3301,7 +3301,7 @@ class Xe {
|
|
|
3301
3301
|
const cn = async (i, e, t, n, r, s) => {
|
|
3302
3302
|
var o;
|
|
3303
3303
|
try {
|
|
3304
|
-
const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, l = new Xe(a), c =
|
|
3304
|
+
const a = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, l = new Xe(a), c = xn.create();
|
|
3305
3305
|
return c.name = i, c.nestedFolderName = e, c.url = t, c.type = n, c.folderName = r, await l.createFile(
|
|
3306
3306
|
c,
|
|
3307
3307
|
s
|
|
@@ -3309,10 +3309,10 @@ const cn = async (i, e, t, n, r, s) => {
|
|
|
3309
3309
|
} catch (a) {
|
|
3310
3310
|
throw a;
|
|
3311
3311
|
}
|
|
3312
|
-
},
|
|
3312
|
+
}, sr = async (i, e, t, n) => {
|
|
3313
3313
|
var r;
|
|
3314
3314
|
try {
|
|
3315
|
-
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Xe(s), a =
|
|
3315
|
+
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Xe(s), a = On.create();
|
|
3316
3316
|
return a.folderName = i, a.cursor = e, a.limit = t, await o.getFilesByFolder(
|
|
3317
3317
|
a,
|
|
3318
3318
|
n
|
|
@@ -3320,10 +3320,10 @@ const cn = async (i, e, t, n, r, s) => {
|
|
|
3320
3320
|
} catch (s) {
|
|
3321
3321
|
throw s;
|
|
3322
3322
|
}
|
|
3323
|
-
},
|
|
3323
|
+
}, or = async (i, e, t = 20, n) => {
|
|
3324
3324
|
var r;
|
|
3325
3325
|
try {
|
|
3326
|
-
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Xe(s), a =
|
|
3326
|
+
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new Xe(s), a = Bn.create();
|
|
3327
3327
|
return a.searchValue = i, a.cursor = e, a.limit = t, await o.search(
|
|
3328
3328
|
a,
|
|
3329
3329
|
n
|
|
@@ -3331,7 +3331,7 @@ const cn = async (i, e, t, n, r, s) => {
|
|
|
3331
3331
|
} catch (s) {
|
|
3332
3332
|
throw s;
|
|
3333
3333
|
}
|
|
3334
|
-
},
|
|
3334
|
+
}, ar = async (i, e, t, n, r, s, o, a, l) => {
|
|
3335
3335
|
var c;
|
|
3336
3336
|
try {
|
|
3337
3337
|
const h = (c = window.ImageSalonSDK) == null ? void 0 : c.grpcConfig, g = new Xe(h), w = ce.create();
|
|
@@ -3342,10 +3342,10 @@ const cn = async (i, e, t, n, r, s) => {
|
|
|
3342
3342
|
} catch (h) {
|
|
3343
3343
|
throw h;
|
|
3344
3344
|
}
|
|
3345
|
-
},
|
|
3345
|
+
}, lr = async (i, e) => {
|
|
3346
3346
|
var t;
|
|
3347
3347
|
try {
|
|
3348
|
-
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new Xe(n), s =
|
|
3348
|
+
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new Xe(n), s = _n.create();
|
|
3349
3349
|
return s.key = i, await r.deleteFile(
|
|
3350
3350
|
s,
|
|
3351
3351
|
e
|
|
@@ -3354,7 +3354,7 @@ const cn = async (i, e, t, n, r, s) => {
|
|
|
3354
3354
|
throw n;
|
|
3355
3355
|
}
|
|
3356
3356
|
};
|
|
3357
|
-
class
|
|
3357
|
+
class cr extends Z {
|
|
3358
3358
|
constructor() {
|
|
3359
3359
|
super("com.hamropatro.grpc.cms.DeleteFolderRequest", [
|
|
3360
3360
|
{
|
|
@@ -3384,7 +3384,7 @@ class dr extends Z {
|
|
|
3384
3384
|
if (c === "throw")
|
|
3385
3385
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
3386
3386
|
let h = e.skip(l);
|
|
3387
|
-
c !== !1 && (c === !0 ?
|
|
3387
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
3388
3388
|
}
|
|
3389
3389
|
}
|
|
3390
3390
|
return s;
|
|
@@ -3392,11 +3392,11 @@ class dr extends Z {
|
|
|
3392
3392
|
internalBinaryWrite(e, t, n) {
|
|
3393
3393
|
e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key);
|
|
3394
3394
|
let r = n.writeUnknownFields;
|
|
3395
|
-
return r !== !1 && (r == !0 ?
|
|
3395
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3396
3396
|
}
|
|
3397
3397
|
}
|
|
3398
|
-
const
|
|
3399
|
-
class
|
|
3398
|
+
const Dn = new cr();
|
|
3399
|
+
class dr extends Z {
|
|
3400
3400
|
constructor() {
|
|
3401
3401
|
super("com.hamropatro.grpc.cms.CreateFolderRequest", [
|
|
3402
3402
|
{
|
|
@@ -3448,7 +3448,7 @@ class hr extends Z {
|
|
|
3448
3448
|
if (c === "throw")
|
|
3449
3449
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
3450
3450
|
let h = e.skip(l);
|
|
3451
|
-
c !== !1 && (c === !0 ?
|
|
3451
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
3452
3452
|
}
|
|
3453
3453
|
}
|
|
3454
3454
|
return s;
|
|
@@ -3456,11 +3456,11 @@ class hr extends Z {
|
|
|
3456
3456
|
internalBinaryWrite(e, t, n) {
|
|
3457
3457
|
e.name !== "" && t.tag(1, m.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(2, m.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(3, m.LengthDelimited).string(e.createdBy);
|
|
3458
3458
|
let r = n.writeUnknownFields;
|
|
3459
|
-
return r !== !1 && (r == !0 ?
|
|
3459
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3460
3460
|
}
|
|
3461
3461
|
}
|
|
3462
|
-
const
|
|
3463
|
-
class
|
|
3462
|
+
const Sn = new dr();
|
|
3463
|
+
class hr extends Z {
|
|
3464
3464
|
constructor() {
|
|
3465
3465
|
super("com.hamropatro.grpc.cms.GetAllFoldersRequest", [
|
|
3466
3466
|
{
|
|
@@ -3501,7 +3501,7 @@ class ur extends Z {
|
|
|
3501
3501
|
if (c === "throw")
|
|
3502
3502
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
3503
3503
|
let h = e.skip(l);
|
|
3504
|
-
c !== !1 && (c === !0 ?
|
|
3504
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
3505
3505
|
}
|
|
3506
3506
|
}
|
|
3507
3507
|
return s;
|
|
@@ -3509,11 +3509,11 @@ class ur extends Z {
|
|
|
3509
3509
|
internalBinaryWrite(e, t, n) {
|
|
3510
3510
|
e.cursor !== "" && t.tag(1, m.LengthDelimited).string(e.cursor), e.limit !== 0 && t.tag(2, m.Varint).int32(e.limit);
|
|
3511
3511
|
let r = n.writeUnknownFields;
|
|
3512
|
-
return r !== !1 && (r == !0 ?
|
|
3512
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3513
3513
|
}
|
|
3514
3514
|
}
|
|
3515
|
-
const
|
|
3516
|
-
class
|
|
3515
|
+
const Un = new hr();
|
|
3516
|
+
class ur extends Z {
|
|
3517
3517
|
constructor() {
|
|
3518
3518
|
super("com.hamropatro.grpc.cms.GetAllFoldersResponse", [
|
|
3519
3519
|
{ no: 1, name: "folder", kind: "message", repeat: 1, T: () => Ie },
|
|
@@ -3559,7 +3559,7 @@ class pr extends Z {
|
|
|
3559
3559
|
if (c === "throw")
|
|
3560
3560
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
3561
3561
|
let h = e.skip(l);
|
|
3562
|
-
c !== !1 && (c === !0 ?
|
|
3562
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
3563
3563
|
}
|
|
3564
3564
|
}
|
|
3565
3565
|
return s;
|
|
@@ -3569,11 +3569,11 @@ class pr extends Z {
|
|
|
3569
3569
|
Ie.internalBinaryWrite(e.folder[s], t.tag(1, m.LengthDelimited).fork(), n).join();
|
|
3570
3570
|
e.nextCursor !== "" && t.tag(2, m.LengthDelimited).string(e.nextCursor), e.hasMore !== !1 && t.tag(3, m.Varint).bool(e.hasMore);
|
|
3571
3571
|
let r = n.writeUnknownFields;
|
|
3572
|
-
return r !== !1 && (r == !0 ?
|
|
3572
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3573
3573
|
}
|
|
3574
3574
|
}
|
|
3575
|
-
const
|
|
3576
|
-
class
|
|
3575
|
+
const pr = new ur();
|
|
3576
|
+
class fr extends Z {
|
|
3577
3577
|
constructor() {
|
|
3578
3578
|
super("com.hamropatro.grpc.cms.Folder", [
|
|
3579
3579
|
{
|
|
@@ -3636,7 +3636,7 @@ class mr extends Z {
|
|
|
3636
3636
|
if (c === "throw")
|
|
3637
3637
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
3638
3638
|
let h = e.skip(l);
|
|
3639
|
-
c !== !1 && (c === !0 ?
|
|
3639
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
3640
3640
|
}
|
|
3641
3641
|
}
|
|
3642
3642
|
return s;
|
|
@@ -3644,14 +3644,14 @@ class mr extends Z {
|
|
|
3644
3644
|
internalBinaryWrite(e, t, n) {
|
|
3645
3645
|
e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key), e.name !== "" && t.tag(2, m.LengthDelimited).string(e.name), e.nestedFolderName !== "" && t.tag(3, m.LengthDelimited).string(e.nestedFolderName), e.createdBy !== "" && t.tag(4, m.LengthDelimited).string(e.createdBy);
|
|
3646
3646
|
let r = n.writeUnknownFields;
|
|
3647
|
-
return r !== !1 && (r == !0 ?
|
|
3647
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
3648
3648
|
}
|
|
3649
3649
|
}
|
|
3650
|
-
const Ie = new
|
|
3651
|
-
{ name: "createFolder", options: {}, I:
|
|
3652
|
-
{ name: "getFolders", options: {}, I:
|
|
3650
|
+
const Ie = new fr(), ft = new At("com.hamropatro.grpc.cms.FolderService", [
|
|
3651
|
+
{ name: "createFolder", options: {}, I: Sn, O: Ie },
|
|
3652
|
+
{ name: "getFolders", options: {}, I: Un, O: pr },
|
|
3653
3653
|
{ name: "updateFolder", options: {}, I: Ie, O: Ie },
|
|
3654
|
-
{ name: "deleteFolder", options: {}, I:
|
|
3654
|
+
{ name: "deleteFolder", options: {}, I: Dn, O: Ie }
|
|
3655
3655
|
]);
|
|
3656
3656
|
class at {
|
|
3657
3657
|
constructor(e) {
|
|
@@ -3689,9 +3689,9 @@ class at {
|
|
|
3689
3689
|
return oe("unary", this._transport, n, r, e);
|
|
3690
3690
|
}
|
|
3691
3691
|
}
|
|
3692
|
-
const
|
|
3692
|
+
const mr = async (i, e = 20, t) => {
|
|
3693
3693
|
var o;
|
|
3694
|
-
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new at(n), s =
|
|
3694
|
+
const n = (o = window.ImageSalonSDK) == null ? void 0 : o.grpcConfig, r = new at(n), s = Un.create();
|
|
3695
3695
|
try {
|
|
3696
3696
|
return s.cursor = i, s.limit = e, await r.getFolders(
|
|
3697
3697
|
s,
|
|
@@ -3700,10 +3700,10 @@ const gr = async (i, e = 20, t) => {
|
|
|
3700
3700
|
} catch (a) {
|
|
3701
3701
|
throw a;
|
|
3702
3702
|
}
|
|
3703
|
-
},
|
|
3703
|
+
}, gr = async (i, e, t, n) => {
|
|
3704
3704
|
var r;
|
|
3705
3705
|
try {
|
|
3706
|
-
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new at(s), a =
|
|
3706
|
+
const s = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, o = new at(s), a = Sn.create();
|
|
3707
3707
|
return a.name = i, a.nestedFolderName = e, a.createdBy = t, await o.createFolder(
|
|
3708
3708
|
a,
|
|
3709
3709
|
n
|
|
@@ -3711,7 +3711,7 @@ const gr = async (i, e = 20, t) => {
|
|
|
3711
3711
|
} catch (s) {
|
|
3712
3712
|
throw s;
|
|
3713
3713
|
}
|
|
3714
|
-
},
|
|
3714
|
+
}, wr = async (i, e, t, n, r) => {
|
|
3715
3715
|
var s;
|
|
3716
3716
|
try {
|
|
3717
3717
|
const o = (s = window.ImageSalonSDK) == null ? void 0 : s.grpcConfig, a = new at(o), l = Ie.create();
|
|
@@ -3722,10 +3722,10 @@ const gr = async (i, e = 20, t) => {
|
|
|
3722
3722
|
} catch (o) {
|
|
3723
3723
|
throw o;
|
|
3724
3724
|
}
|
|
3725
|
-
},
|
|
3725
|
+
}, yr = async (i, e) => {
|
|
3726
3726
|
var t;
|
|
3727
3727
|
try {
|
|
3728
|
-
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new at(n), s =
|
|
3728
|
+
const n = (t = window.ImageSalonSDK) == null ? void 0 : t.grpcConfig, r = new at(n), s = Dn.create();
|
|
3729
3729
|
return s.key = i, await r.deleteFolder(
|
|
3730
3730
|
s,
|
|
3731
3731
|
e
|
|
@@ -3758,7 +3758,7 @@ function hn() {
|
|
|
3758
3758
|
"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"
|
|
3759
3759
|
), i.appendChild(e), i;
|
|
3760
3760
|
}
|
|
3761
|
-
function
|
|
3761
|
+
function br() {
|
|
3762
3762
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3763
3763
|
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "12"), i.setAttribute("height", "12"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "currentColor"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-music-4");
|
|
3764
3764
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -3776,7 +3776,7 @@ function Cr() {
|
|
|
3776
3776
|
);
|
|
3777
3777
|
return r.setAttribute("cx", "18"), r.setAttribute("cy", "16"), r.setAttribute("r", "3"), i.appendChild(e), i.appendChild(t), i.appendChild(n), i.appendChild(r), document.body.appendChild(i), i;
|
|
3778
3778
|
}
|
|
3779
|
-
const
|
|
3779
|
+
const Cr = () => {
|
|
3780
3780
|
const i = document.createElementNS(
|
|
3781
3781
|
"http://www.w3.org/2000/svg",
|
|
3782
3782
|
"svg"
|
|
@@ -3787,7 +3787,7 @@ const Er = () => {
|
|
|
3787
3787
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3788
3788
|
return t.setAttribute("d", "m9 11 3 3L22 4"), i.appendChild(e), i.appendChild(t), i;
|
|
3789
3789
|
};
|
|
3790
|
-
function
|
|
3790
|
+
function kt(i = "#333") {
|
|
3791
3791
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3792
3792
|
e.setAttribute("xmlns", "http://www.w3.org/2000/svg"), e.setAttribute("x", "0px"), e.setAttribute("y", "0px"), e.setAttribute("width", "18"), e.setAttribute("height", "18"), e.setAttribute("viewBox", "0 0 50 50"), e.setAttribute("fill", i);
|
|
3793
3793
|
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -3821,7 +3821,7 @@ function He() {
|
|
|
3821
3821
|
"M40,12H8c-2.2,0-4,1.8-4,4v20c0,2.2,1.8,4,4,4h32c2.2,0,4-1.8,4-4V16C44,13.8,42.2,12,40,12z"
|
|
3822
3822
|
), i.appendChild(e), i.appendChild(t), i;
|
|
3823
3823
|
}
|
|
3824
|
-
function
|
|
3824
|
+
function Er() {
|
|
3825
3825
|
const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
|
|
3826
3826
|
e.setAttribute("width", "12"), e.setAttribute("height", "12"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "3"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.classList.add("lucide", "lucide-image");
|
|
3827
3827
|
const t = document.createElementNS(i, "rect");
|
|
@@ -3849,7 +3849,7 @@ function pn() {
|
|
|
3849
3849
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3850
3850
|
return e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("d", "M12 4.5v15m7.5-7.5h-15"), i.appendChild(e), i;
|
|
3851
3851
|
}
|
|
3852
|
-
function
|
|
3852
|
+
function Nr() {
|
|
3853
3853
|
const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
|
|
3854
3854
|
e.setAttribute("width", "16"), e.setAttribute("height", "16"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "2"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.classList.add("lucide", "lucide-eye");
|
|
3855
3855
|
const t = document.createElementNS(i, "path");
|
|
@@ -3860,7 +3860,7 @@ function Ar() {
|
|
|
3860
3860
|
const n = document.createElementNS(i, "circle");
|
|
3861
3861
|
return n.setAttribute("cx", "12"), n.setAttribute("cy", "12"), n.setAttribute("r", "3"), e.appendChild(n), document.body.appendChild(e), e;
|
|
3862
3862
|
}
|
|
3863
|
-
function
|
|
3863
|
+
function Ar() {
|
|
3864
3864
|
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3865
3865
|
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("height", "24px"), i.setAttribute("width", "24px"), i.setAttribute("viewBox", "0 0 30 30"), i.setAttribute("fill", "#999");
|
|
3866
3866
|
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
@@ -3883,16 +3883,20 @@ function fn() {
|
|
|
3883
3883
|
const s = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3884
3884
|
return s.setAttribute("x1", "14"), s.setAttribute("x2", "14"), s.setAttribute("y1", "11"), s.setAttribute("y2", "17"), i.appendChild(e), i.appendChild(t), i.appendChild(n), i.appendChild(r), i.appendChild(s), document.body.appendChild(i), i;
|
|
3885
3885
|
}
|
|
3886
|
-
function
|
|
3887
|
-
const i = "http://www.w3.org/2000/svg",
|
|
3888
|
-
|
|
3889
|
-
const
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
"
|
|
3893
|
-
|
|
3886
|
+
function mt() {
|
|
3887
|
+
const i = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
3888
|
+
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "24"), i.setAttribute("height", "24"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "currentColor"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-upload");
|
|
3889
|
+
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
3890
|
+
e.setAttribute("d", "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4");
|
|
3891
|
+
const t = document.createElementNS(
|
|
3892
|
+
"http://www.w3.org/2000/svg",
|
|
3893
|
+
"polyline"
|
|
3894
|
+
);
|
|
3895
|
+
t.setAttribute("points", "17 8 12 3 7 8");
|
|
3896
|
+
const n = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
3897
|
+
return n.setAttribute("x1", "12"), n.setAttribute("x2", "12"), n.setAttribute("y1", "3"), n.setAttribute("y2", "15"), i.appendChild(e), i.appendChild(t), i.appendChild(n), i;
|
|
3894
3898
|
}
|
|
3895
|
-
function
|
|
3899
|
+
function Fr() {
|
|
3896
3900
|
const i = "http://www.w3.org/2000/svg", e = document.createElementNS(i, "svg");
|
|
3897
3901
|
e.setAttribute("width", "12"), e.setAttribute("height", "12"), e.setAttribute("viewBox", "0 0 24 24"), e.setAttribute("fill", "none"), e.setAttribute("stroke", "currentColor"), e.setAttribute("stroke-width", "3"), e.setAttribute("stroke-linecap", "round"), e.setAttribute("stroke-linejoin", "round"), e.classList.add("lucide", "lucide-video");
|
|
3898
3902
|
const t = document.createElementNS(i, "path");
|
|
@@ -3908,9 +3912,9 @@ function T(i, e, t, n, r) {
|
|
|
3908
3912
|
return e && (s.className += e), t && (s.style.cssText = t), n && (s.textContent = n), r && r.appendChild(s), s;
|
|
3909
3913
|
}
|
|
3910
3914
|
var de;
|
|
3911
|
-
class
|
|
3915
|
+
class Lr {
|
|
3912
3916
|
constructor() {
|
|
3913
|
-
|
|
3917
|
+
k(this, de);
|
|
3914
3918
|
p(this, de, document.createElementNS(
|
|
3915
3919
|
"http://www.w3.org/2000/svg",
|
|
3916
3920
|
"svg"
|
|
@@ -3929,8 +3933,8 @@ class vr {
|
|
|
3929
3933
|
}
|
|
3930
3934
|
}
|
|
3931
3935
|
de = new WeakMap();
|
|
3932
|
-
const mn = new
|
|
3933
|
-
class
|
|
3936
|
+
const mn = new Lr(), Qe = document.body;
|
|
3937
|
+
class Rn {
|
|
3934
3938
|
constructor() {
|
|
3935
3939
|
x(this, "main");
|
|
3936
3940
|
x(this, "dialogContainer");
|
|
@@ -3993,7 +3997,7 @@ class Mn {
|
|
|
3993
3997
|
"",
|
|
3994
3998
|
this.dialogContent
|
|
3995
3999
|
);
|
|
3996
|
-
n.appendChild(
|
|
4000
|
+
n.appendChild(kt()), n.onclick = () => this.hide();
|
|
3997
4001
|
}
|
|
3998
4002
|
return e.header && this._setHeader(e), this._setBody(e), this._setFooter(e), this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", Qe.style.overflow = "hidden", this.confirmButton.textContent = e.confirmButtonText || "Upload", this.cancelButton.textContent = e.cancelButtonText || "Cancel", Qe.classList.add("dialog-visible"), new Promise((n) => {
|
|
3999
4003
|
const r = (s) => () => {
|
|
@@ -4055,8 +4059,8 @@ class Mn {
|
|
|
4055
4059
|
e ? (mn.show(this.confirmButton), this.confirmButton.disabled = !0) : (mn.hide(), this.confirmButton.disabled = !1);
|
|
4056
4060
|
}
|
|
4057
4061
|
}
|
|
4058
|
-
const et = new
|
|
4059
|
-
class
|
|
4062
|
+
const et = new Rn(), S = new Rn();
|
|
4063
|
+
class Ir {
|
|
4060
4064
|
constructor() {
|
|
4061
4065
|
x(this, "main");
|
|
4062
4066
|
x(this, "dialogBody");
|
|
@@ -4069,7 +4073,7 @@ class Tr {
|
|
|
4069
4073
|
this.main.remove();
|
|
4070
4074
|
}
|
|
4071
4075
|
}
|
|
4072
|
-
const J = new
|
|
4076
|
+
const J = new Ir();
|
|
4073
4077
|
var ae = /* @__PURE__ */ ((i) => (i[i.IMAGE = 0] = "IMAGE", i[i.AUDIO = 1] = "AUDIO", i[i.VIDEO = 2] = "VIDEO", i[i.ALL = 3] = "ALL", i[i.FOLDER = 4] = "FOLDER", i))(ae || {});
|
|
4074
4078
|
const We = {
|
|
4075
4079
|
0: "IMAGE",
|
|
@@ -4090,7 +4094,7 @@ function gn(i) {
|
|
|
4090
4094
|
return We[ae.ALL];
|
|
4091
4095
|
}
|
|
4092
4096
|
}
|
|
4093
|
-
function
|
|
4097
|
+
function vr(i) {
|
|
4094
4098
|
const e = {};
|
|
4095
4099
|
i.forEach((r) => {
|
|
4096
4100
|
e[r.key] = { ...r, children: {} };
|
|
@@ -4102,7 +4106,7 @@ function Br(i) {
|
|
|
4102
4106
|
}), r);
|
|
4103
4107
|
return i.reduce((r, s) => (s.nestedFolderName || r.push(t(e[s.key])), r), []);
|
|
4104
4108
|
}
|
|
4105
|
-
function
|
|
4109
|
+
function Tr(i, e) {
|
|
4106
4110
|
const t = (n) => {
|
|
4107
4111
|
if (n.key === e.nestedFolderName)
|
|
4108
4112
|
return n.children[e.key] = { ...e, children: {} }, !0;
|
|
@@ -4118,7 +4122,7 @@ function xr(i, e) {
|
|
|
4118
4122
|
break;
|
|
4119
4123
|
return i;
|
|
4120
4124
|
}
|
|
4121
|
-
const
|
|
4125
|
+
const Br = async (i, e) => {
|
|
4122
4126
|
let t;
|
|
4123
4127
|
try {
|
|
4124
4128
|
i && (t = {
|
|
@@ -4140,7 +4144,7 @@ function $e(i, e, t) {
|
|
|
4140
4144
|
const n = document.createElement("p");
|
|
4141
4145
|
return e && (n.className = e), t && (n.id = t), i && (n.textContent = i), n;
|
|
4142
4146
|
}
|
|
4143
|
-
function
|
|
4147
|
+
function L(i, e) {
|
|
4144
4148
|
const t = document.createElement("span");
|
|
4145
4149
|
return e && (t.className = e), i && (t.textContent = i), t;
|
|
4146
4150
|
}
|
|
@@ -4148,11 +4152,11 @@ function wn(i, e, t, n) {
|
|
|
4148
4152
|
const r = document.createElement("img");
|
|
4149
4153
|
return e && (r.className = e), r.src = i, r;
|
|
4150
4154
|
}
|
|
4151
|
-
function
|
|
4155
|
+
function xr(i, e, t) {
|
|
4152
4156
|
const n = document.createElement("video"), r = document.createElement("source");
|
|
4153
4157
|
return n.className = e, r.src = i, n.appendChild(r), n;
|
|
4154
4158
|
}
|
|
4155
|
-
function
|
|
4159
|
+
function _r(i, e, t) {
|
|
4156
4160
|
const n = document.createElement("audio"), r = document.createElement("source");
|
|
4157
4161
|
return n.className = e, n.controls = !0, r.src = i, n.appendChild(r), n;
|
|
4158
4162
|
}
|
|
@@ -4160,11 +4164,11 @@ function X(i, e, t, n, r) {
|
|
|
4160
4164
|
const s = document.createElement("button");
|
|
4161
4165
|
return e && (s.className = e), t && (s.id = t), i && (s.textContent = i), r && (s.innerHTML = r), s.disabled = n, s;
|
|
4162
4166
|
}
|
|
4163
|
-
function
|
|
4167
|
+
function gt(i, e, t) {
|
|
4164
4168
|
const n = document.createElement("input");
|
|
4165
4169
|
return n.className = e, n.defaultValue = t, i && (n.type = i), n;
|
|
4166
4170
|
}
|
|
4167
|
-
class
|
|
4171
|
+
class Or extends Z {
|
|
4168
4172
|
constructor() {
|
|
4169
4173
|
super("com.hamropatro.grpc.cms.ImageUploadRequest", [
|
|
4170
4174
|
{
|
|
@@ -4194,7 +4198,7 @@ class Sr extends Z {
|
|
|
4194
4198
|
if (c === "throw")
|
|
4195
4199
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
4196
4200
|
let h = e.skip(l);
|
|
4197
|
-
c !== !1 && (c === !0 ?
|
|
4201
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
4198
4202
|
}
|
|
4199
4203
|
}
|
|
4200
4204
|
return s;
|
|
@@ -4202,11 +4206,11 @@ class Sr extends Z {
|
|
|
4202
4206
|
internalBinaryWrite(e, t, n) {
|
|
4203
4207
|
e.mimeType !== "" && t.tag(1, m.LengthDelimited).string(e.mimeType);
|
|
4204
4208
|
let r = n.writeUnknownFields;
|
|
4205
|
-
return r !== !1 && (r == !0 ?
|
|
4209
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
4206
4210
|
}
|
|
4207
4211
|
}
|
|
4208
|
-
const
|
|
4209
|
-
class
|
|
4212
|
+
const Mn = new Or();
|
|
4213
|
+
class Dr extends Z {
|
|
4210
4214
|
constructor() {
|
|
4211
4215
|
super("com.hamropatro.grpc.cms.ImageUploadResponse", [
|
|
4212
4216
|
{
|
|
@@ -4247,7 +4251,7 @@ class Ur extends Z {
|
|
|
4247
4251
|
if (c === "throw")
|
|
4248
4252
|
throw new globalThis.Error(`Unknown field ${a} (wire type ${l}) for ${this.typeName}`);
|
|
4249
4253
|
let h = e.skip(l);
|
|
4250
|
-
c !== !1 && (c === !0 ?
|
|
4254
|
+
c !== !1 && (c === !0 ? N.onRead : c)(this.typeName, s, a, l, h);
|
|
4251
4255
|
}
|
|
4252
4256
|
}
|
|
4253
4257
|
return s;
|
|
@@ -4255,17 +4259,17 @@ class Ur extends Z {
|
|
|
4255
4259
|
internalBinaryWrite(e, t, n) {
|
|
4256
4260
|
e.key !== "" && t.tag(1, m.LengthDelimited).string(e.key), e.url !== "" && t.tag(2, m.LengthDelimited).string(e.url);
|
|
4257
4261
|
let r = n.writeUnknownFields;
|
|
4258
|
-
return r !== !1 && (r == !0 ?
|
|
4262
|
+
return r !== !1 && (r == !0 ? N.onWrite : r)(this.typeName, e, t), t;
|
|
4259
4263
|
}
|
|
4260
4264
|
}
|
|
4261
|
-
const
|
|
4262
|
-
{ name: "Upload", options: {}, I:
|
|
4265
|
+
const Sr = new Dr(), wt = new At("com.hamropatro.grpc.cms.ImageUploadService", [
|
|
4266
|
+
{ name: "Upload", options: {}, I: Mn, O: Sr }
|
|
4263
4267
|
]);
|
|
4264
|
-
class
|
|
4268
|
+
class Ur {
|
|
4265
4269
|
constructor(e) {
|
|
4266
|
-
x(this, "typeName",
|
|
4267
|
-
x(this, "methods",
|
|
4268
|
-
x(this, "options",
|
|
4270
|
+
x(this, "typeName", wt.typeName);
|
|
4271
|
+
x(this, "methods", wt.methods);
|
|
4272
|
+
x(this, "options", wt.options);
|
|
4269
4273
|
this._transport = e;
|
|
4270
4274
|
}
|
|
4271
4275
|
/**
|
|
@@ -4276,9 +4280,9 @@ class Mr {
|
|
|
4276
4280
|
return oe("unary", this._transport, n, r, e);
|
|
4277
4281
|
}
|
|
4278
4282
|
}
|
|
4279
|
-
const
|
|
4283
|
+
const Rr = async (i) => {
|
|
4280
4284
|
var r;
|
|
4281
|
-
const e = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, t = new
|
|
4285
|
+
const e = (r = window.ImageSalonSDK) == null ? void 0 : r.grpcConfig, t = new Ur(e), n = Mn.create();
|
|
4282
4286
|
try {
|
|
4283
4287
|
return n.mimeType = i, await t.upload(
|
|
4284
4288
|
n
|
|
@@ -4288,7 +4292,7 @@ const Vr = async (i) => {
|
|
|
4288
4292
|
}
|
|
4289
4293
|
}, yn = async (i, e) => {
|
|
4290
4294
|
try {
|
|
4291
|
-
const t =
|
|
4295
|
+
const t = Mr(i, e), r = (await Rr(e == null ? void 0 : e.type)).response.url;
|
|
4292
4296
|
return await fetch(r, {
|
|
4293
4297
|
method: "PUT",
|
|
4294
4298
|
headers: {
|
|
@@ -4300,7 +4304,7 @@ const Vr = async (i) => {
|
|
|
4300
4304
|
} catch (t) {
|
|
4301
4305
|
throw t;
|
|
4302
4306
|
}
|
|
4303
|
-
},
|
|
4307
|
+
}, Mr = (i, e) => {
|
|
4304
4308
|
const t = e.type.split("/")[0];
|
|
4305
4309
|
let n = "";
|
|
4306
4310
|
t === "video" ? n = i == null ? void 0 : i.replace(/^data:video\/\w+;base64,/, "") : t === "image" ? n = i == null ? void 0 : i.replace(/^data:image\/\w+;base64,/, "") : t === "audio" && (n = i == null ? void 0 : i.replace(/^data:audio\/\w+;base64,/, ""));
|
|
@@ -4309,64 +4313,45 @@ const Vr = async (i) => {
|
|
|
4309
4313
|
s[o] = r.charCodeAt(o);
|
|
4310
4314
|
return s;
|
|
4311
4315
|
};
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
i.setAttribute("xmlns", "http://www.w3.org/2000/svg"), i.setAttribute("width", "40"), i.setAttribute("height", "40"), i.setAttribute("viewBox", "0 0 24 24"), i.setAttribute("fill", "none"), i.setAttribute("stroke", "#777"), i.setAttribute("stroke-width", "2"), i.setAttribute("stroke-linecap", "round"), i.setAttribute("stroke-linejoin", "round"), i.classList.add("lucide", "lucide-image-up");
|
|
4315
|
-
const e = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4316
|
-
e.setAttribute(
|
|
4317
|
-
"d",
|
|
4318
|
-
"M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21"
|
|
4319
|
-
);
|
|
4320
|
-
const t = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4321
|
-
t.setAttribute("d", "m14 19.5 3-3 3 3");
|
|
4322
|
-
const n = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
4323
|
-
n.setAttribute("d", "M17 22v-5.5");
|
|
4324
|
-
const r = document.createElementNS(
|
|
4325
|
-
"http://www.w3.org/2000/svg",
|
|
4326
|
-
"circle"
|
|
4327
|
-
);
|
|
4328
|
-
return r.setAttribute("cx", "9"), r.setAttribute("cy", "9"), r.setAttribute("r", "2"), i.appendChild(e), i.appendChild(t), i.appendChild(n), i.appendChild(r), i;
|
|
4329
|
-
}
|
|
4330
|
-
var ye, Te, U, he, O, M, be, G, Be, Ce, ie, ee, Ee, Se, Ne, ke, ue, xe, re, se, Ae, Le, pe, Ue, Ze, K, fe, qe, st, Pe, P, Re, Nt, Fe, Ke, Me;
|
|
4331
|
-
class jr {
|
|
4316
|
+
var ye, Te, U, he, O, M, be, G, Be, Ce, ie, ee, Ee, Se, ke, Ne, ue, xe, re, se, Ae, Fe, pe, Ue, Ze, K, fe, qe, st, Pe, P, Re, Le, Ke, Me;
|
|
4317
|
+
class $r {
|
|
4332
4318
|
constructor(e) {
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
p(this, Pe, e.isAdmin), p(this, be, !1), p(this, G, !1), p(this, Be, !1), p(this, Se, e.handleUpload.bind(this)), p(this, Ne, 0), p(this, se, ""), p(this, pe, !1), p(this, Ke, e.mode), p(this, Ae, !1), p(this, Ze, e.accessToken), p(this, fe, null), p(this, Fe, ""), this._removeToastContainer(), this._grpcOptionInitializer(), this._init(e).then(() => {
|
|
4319
|
+
k(this, ye);
|
|
4320
|
+
k(this, Te);
|
|
4321
|
+
k(this, U);
|
|
4322
|
+
k(this, he);
|
|
4323
|
+
k(this, O, []);
|
|
4324
|
+
k(this, M, []);
|
|
4325
|
+
k(this, be);
|
|
4326
|
+
k(this, G);
|
|
4327
|
+
k(this, Be);
|
|
4328
|
+
k(this, Ce);
|
|
4329
|
+
k(this, ie, []);
|
|
4330
|
+
k(this, ee);
|
|
4331
|
+
k(this, Ee);
|
|
4332
|
+
k(this, Se);
|
|
4333
|
+
k(this, ke);
|
|
4334
|
+
k(this, Ne);
|
|
4335
|
+
k(this, ue);
|
|
4336
|
+
k(this, xe);
|
|
4337
|
+
k(this, re);
|
|
4338
|
+
k(this, se);
|
|
4339
|
+
k(this, Ae);
|
|
4340
|
+
k(this, Fe);
|
|
4341
|
+
k(this, pe);
|
|
4342
|
+
k(this, Ue);
|
|
4343
|
+
k(this, Ze);
|
|
4344
|
+
k(this, K);
|
|
4345
|
+
k(this, fe);
|
|
4346
|
+
k(this, qe, !1);
|
|
4347
|
+
k(this, st);
|
|
4348
|
+
k(this, Pe);
|
|
4349
|
+
k(this, P);
|
|
4350
|
+
k(this, Re);
|
|
4351
|
+
k(this, Le);
|
|
4352
|
+
k(this, Ke);
|
|
4353
|
+
k(this, Me);
|
|
4354
|
+
p(this, Pe, e.isAdmin), p(this, be, !1), p(this, G, !1), p(this, Be, !1), p(this, Se, e.handleUpload.bind(this)), p(this, ke, 0), p(this, se, ""), p(this, pe, !1), p(this, Ke, e.mode), p(this, Ae, !1), p(this, Ze, e.accessToken), p(this, fe, null), p(this, Le, ""), this._removeToastContainer(), this._grpcOptionInitializer(), this._init(e).then(() => {
|
|
4370
4355
|
p(this, qe, !0), this._renderView(e), this.updateWindowObject({ initialized: !0 }), this._initializeGrpcConfig(e.mode, e.endPoint);
|
|
4371
4356
|
}), p(this, Re, "");
|
|
4372
4357
|
}
|
|
@@ -4402,7 +4387,7 @@ class jr {
|
|
|
4402
4387
|
}), d(this, ye).appendChild(r);
|
|
4403
4388
|
}
|
|
4404
4389
|
async _grpcOptionInitializer() {
|
|
4405
|
-
p(this, K, await
|
|
4390
|
+
p(this, K, await Br(
|
|
4406
4391
|
d(this, Ze),
|
|
4407
4392
|
d(this, Ke)
|
|
4408
4393
|
));
|
|
@@ -4412,7 +4397,7 @@ class jr {
|
|
|
4412
4397
|
p(this, Ee, X(
|
|
4413
4398
|
`Save (${(g = d(this, O)) == null ? void 0 : g.length})`,
|
|
4414
4399
|
"dialog-btn confirm"
|
|
4415
|
-
)), p(this,
|
|
4400
|
+
)), p(this, Ne, y("folder-container")), p(this, ue, y("folder-list-wrapper")), this._fetchAllFolders();
|
|
4416
4401
|
const e = X("Cancel", "dialog-btn cancel");
|
|
4417
4402
|
X(
|
|
4418
4403
|
"",
|
|
@@ -4426,7 +4411,7 @@ class jr {
|
|
|
4426
4411
|
const n = y();
|
|
4427
4412
|
n.style.display = "flex", n.style.alignItems = "center", n.style.justifyContent = "space-between", n.style.padding = "10px 20px";
|
|
4428
4413
|
const r = $e("Folders", "folder-title"), s = X("", "add-folder-btn");
|
|
4429
|
-
s.append(pn()), this._createUpdateFolderDialog(s, "create"), n.append(r, s), d(this,
|
|
4414
|
+
s.append(pn()), this._createUpdateFolderDialog(s, "create"), n.append(r, s), d(this, Ne).append(n, d(this, ue));
|
|
4430
4415
|
const o = this._renderSearchField(), a = this._createBrowseMoreContainer(), l = this._createBrowseImageMain(), c = y("footer");
|
|
4431
4416
|
e.onclick = () => {
|
|
4432
4417
|
et.hide(), p(this, M, []), p(this, O, []);
|
|
@@ -4434,7 +4419,7 @@ class jr {
|
|
|
4434
4419
|
d(this, Se).call(this), et.hide(), p(this, O, []), p(this, M, []);
|
|
4435
4420
|
}, c.append(e, d(this, Ee));
|
|
4436
4421
|
const h = y("container-right-main");
|
|
4437
|
-
h.append(o, a, l, c), d(this, Te).append(d(this,
|
|
4422
|
+
h.append(o, a, l, c), d(this, Te).append(d(this, Ne), h), et.show({
|
|
4438
4423
|
content: d(this, Te)
|
|
4439
4424
|
});
|
|
4440
4425
|
}
|
|
@@ -4445,18 +4430,18 @@ class jr {
|
|
|
4445
4430
|
"span",
|
|
4446
4431
|
"",
|
|
4447
4432
|
"",
|
|
4448
|
-
"
|
|
4449
|
-
), o = this._renderUserViewBrowseButton(), a = T("p", "", "margin-block: 0px
|
|
4450
|
-
if (a.append(
|
|
4433
|
+
"Drag & Drop or "
|
|
4434
|
+
), o = this._renderUserViewBrowseButton(), a = T("p", "", "margin-block: 0px");
|
|
4435
|
+
if (a.append(s, o), n) {
|
|
4451
4436
|
const l = T(
|
|
4452
4437
|
"p",
|
|
4453
4438
|
"",
|
|
4454
|
-
"margin-block: 0px; font-size:
|
|
4439
|
+
"margin-block: 0px; font-size: 13px; color: #777",
|
|
4455
4440
|
`Max File size: ${n}`
|
|
4456
4441
|
);
|
|
4457
|
-
r.append(
|
|
4442
|
+
r.append(mt(), a, l);
|
|
4458
4443
|
} else
|
|
4459
|
-
r.append(
|
|
4444
|
+
r.append(mt(), a);
|
|
4460
4445
|
return this._setupDragAndDrop(d(this, P)), d(this, P).append(r), d(this, ye).appendChild(d(this, P)), d(this, ye);
|
|
4461
4446
|
}
|
|
4462
4447
|
_setupDragAndDrop(e) {
|
|
@@ -4499,14 +4484,14 @@ class jr {
|
|
|
4499
4484
|
const n = T("div", "user-image-preview"), r = T(
|
|
4500
4485
|
"img",
|
|
4501
4486
|
"",
|
|
4502
|
-
"width: 280px;aspectRatio:
|
|
4487
|
+
"width: 280px;aspectRatio:16/9;objectFit:cover;border-radius: 8px;"
|
|
4503
4488
|
);
|
|
4504
4489
|
r.src = e, r.alt = t;
|
|
4505
4490
|
const s = T(
|
|
4506
4491
|
"div",
|
|
4507
4492
|
"",
|
|
4508
|
-
"width:
|
|
4509
|
-
), o =
|
|
4493
|
+
"width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 4px; position: absolute; top: -10px; right: -10px; background: #c10007; border-radius: 50%;z-index:1"
|
|
4494
|
+
), o = kt();
|
|
4510
4495
|
o.style.fill = "#fff", s.appendChild(o), s.addEventListener("click", () => {
|
|
4511
4496
|
var a;
|
|
4512
4497
|
(a = d(this, P)) == null || a.removeChild(n);
|
|
@@ -4527,7 +4512,7 @@ class jr {
|
|
|
4527
4512
|
};
|
|
4528
4513
|
}
|
|
4529
4514
|
_renderUserViewBrowseButton() {
|
|
4530
|
-
const e =
|
|
4515
|
+
const e = gt("file");
|
|
4531
4516
|
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*");
|
|
4532
4517
|
const t = T(
|
|
4533
4518
|
"a",
|
|
@@ -4557,15 +4542,15 @@ class jr {
|
|
|
4557
4542
|
n.classList.add("selected"), [n, r].forEach((o, a) => {
|
|
4558
4543
|
o.addEventListener("click", () => {
|
|
4559
4544
|
var l;
|
|
4560
|
-
p(this,
|
|
4545
|
+
p(this, ke, a), (l = document.querySelector(".select.selected")) == null || l.classList.remove("selected"), o.classList.add("selected"), this._updateSelectedImageListContainerUI();
|
|
4561
4546
|
});
|
|
4562
4547
|
}), t.append(n, r), e.appendChild(t);
|
|
4563
4548
|
}
|
|
4564
4549
|
_renderUploadButton() {
|
|
4565
|
-
const e =
|
|
4550
|
+
const e = gt("file");
|
|
4566
4551
|
e.style.display = "none", e.setAttribute("multiple", "true"), e.setAttribute("accept", "image/*,video/*,audio/*,.gif"), p(this, he, document.createElement("button")), d(this, he).className = "browse-more-btn";
|
|
4567
4552
|
const t = document.createElement("span");
|
|
4568
|
-
return t.textContent = "Upload", d(this, he).append(
|
|
4553
|
+
return t.textContent = "Upload", d(this, he).append(mt(), t), d(this, he).type = "button", d(this, he).addEventListener(
|
|
4569
4554
|
"click",
|
|
4570
4555
|
() => e.click()
|
|
4571
4556
|
), e.addEventListener("change", () => {
|
|
@@ -4593,7 +4578,7 @@ class jr {
|
|
|
4593
4578
|
"search-input-wrapper",
|
|
4594
4579
|
"search-input-wrapper"
|
|
4595
4580
|
);
|
|
4596
|
-
p(this,
|
|
4581
|
+
p(this, Fe, gt("search")), d(this, Fe).value = "", d(this, Fe).addEventListener("input", (s) => {
|
|
4597
4582
|
p(this, M, []);
|
|
4598
4583
|
const o = s.target;
|
|
4599
4584
|
e && clearTimeout(e), e = setTimeout(() => {
|
|
@@ -4603,9 +4588,9 @@ class jr {
|
|
|
4603
4588
|
}
|
|
4604
4589
|
p(this, pe, !0), p(this, Ue, o.value), this._search(d(this, Ue));
|
|
4605
4590
|
}, 750);
|
|
4606
|
-
}), d(this,
|
|
4607
|
-
const r =
|
|
4608
|
-
return r.style.position = "absolute", r.style.top = "50%", r.style.left = "5%", r.style.transform = "translate(-5%, -50%)", n.append(r, d(this,
|
|
4591
|
+
}), d(this, Fe).setAttribute("placeholder", "Search");
|
|
4592
|
+
const r = Ar();
|
|
4593
|
+
return r.style.position = "absolute", r.style.top = "50%", r.style.left = "5%", r.style.transform = "translate(-5%, -50%)", n.append(r, d(this, Fe)), t.append(n), t;
|
|
4609
4594
|
}
|
|
4610
4595
|
_createBrowseMoreContainer() {
|
|
4611
4596
|
p(this, xe, y("browse-more-btn-container")), this._createAllAndSelectedTab(d(this, xe));
|
|
@@ -4628,7 +4613,7 @@ class jr {
|
|
|
4628
4613
|
_renderEmptyImageContainer() {
|
|
4629
4614
|
if (d(this, G) || d(this, be)) return;
|
|
4630
4615
|
const e = y(), t = y(), n = document.createElement("p");
|
|
4631
|
-
d(this, pe) && d(this,
|
|
4616
|
+
d(this, pe) && d(this, ke) === 0 ? (t.innerHTML = `
|
|
4632
4617
|
<svg width="300" height="300" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4633
4618
|
<g clip-path="url(#clip0_2304_257)">
|
|
4634
4619
|
<path d="M564.829 772.4H336.658V948.386H564.829V772.4Z" fill="#EBEBEB"/>
|
|
@@ -4728,22 +4713,22 @@ class jr {
|
|
|
4728
4713
|
'<svg width="20px" height="20px" viewBox="0 0 20 20" focusable="false" fill="currentColor"><path fill="none" d="M0 0h20v20H0V0z"></path><path d="M10 6c.82 0 1.5-.68 1.5-1.5S10.82 3 10 3s-1.5.67-1.5 1.5S9.18 6 10 6zm0 5.5c.82 0 1.5-.68 1.5-1.5s-.68-1.5-1.5-1.5-1.5.68-1.5 1.5.68 1.5 1.5 1.5zm0 5.5c.82 0 1.5-.67 1.5-1.5 0-.82-.68-1.5-1.5-1.5s-1.5.68-1.5 1.5c0 .83.68 1.5 1.5 1.5z"></path></svg>'
|
|
4729
4714
|
);
|
|
4730
4715
|
let s, o;
|
|
4731
|
-
(e == null ? void 0 : e.type) === ae.IMAGE && (s = wn(e == null ? void 0 : e.url, "selected-image"), o =
|
|
4716
|
+
(e == null ? void 0 : e.type) === ae.IMAGE && (s = wn(e == null ? void 0 : e.url, "selected-image"), o = Er()), (e == null ? void 0 : e.type) === ae.VIDEO && (s = xr(e == null ? void 0 : e.url, "uploaded-video"), o = Fr()), (e == null ? void 0 : e.type) === ae.AUDIO && (s = _r(e == null ? void 0 : e.url, "uploaded-audio"), o = br());
|
|
4732
4717
|
const a = y("selected-image-wrapper");
|
|
4733
4718
|
a.setAttribute("data-key", e == null ? void 0 : e.key);
|
|
4734
|
-
const l = $e(e == null ? void 0 : e.name, "selected-image-name"), c =
|
|
4719
|
+
const l = $e(e == null ? void 0 : e.name, "selected-image-name"), c = L("", "selected-image-type");
|
|
4735
4720
|
c.append(o), n.append(c, r);
|
|
4736
4721
|
const h = y();
|
|
4737
4722
|
h.style.marginTop = "10px", h.style.display = "flex", h.style.justifyContent = "space-between", h.style.alignItems = "center", h.append(l), t.append(n, s), a.append(t, h);
|
|
4738
|
-
const g = y("action-wrapper"), w = X("", "action-option preview"), A =
|
|
4723
|
+
const g = y("action-wrapper"), w = X("", "action-option preview"), A = L("Preview", ""), B = Nr();
|
|
4739
4724
|
w.append(B, A);
|
|
4740
|
-
const H = X("", "action-option move"),
|
|
4741
|
-
H.append($,
|
|
4742
|
-
const W = X("", "action-option rename"), Y =
|
|
4725
|
+
const H = X("", "action-option move"), F = L("Move", ""), $ = kr();
|
|
4726
|
+
H.append($, F);
|
|
4727
|
+
const W = X("", "action-option rename"), Y = L("Rename", ""), C = un();
|
|
4743
4728
|
W.append(C, Y);
|
|
4744
|
-
const b = X("", "action-option delete"), D =
|
|
4729
|
+
const b = X("", "action-option delete"), D = L("Delete", ""), q = fn();
|
|
4745
4730
|
b.append(q, D);
|
|
4746
|
-
const Q = e.name.split(".")[0],
|
|
4731
|
+
const Q = e.name.split(".")[0], Vn = e.name.split(".")[1], Hn = We[e.type], Lt = y("edit-form-wrapper"), It = y("move-form-wrapper"), vt = y("preview-details-container"), Tt = y("preview-details-wrapper"), Bt = y(
|
|
4747
4732
|
"preview-option-image-wrapper"
|
|
4748
4733
|
), xt = y("preview-option-wrapper"), _t = y("preview-option-wrapper"), Ot = y(
|
|
4749
4734
|
"preview-option-wrapper"
|
|
@@ -4751,60 +4736,60 @@ class jr {
|
|
|
4751
4736
|
"preview-option-wrapper"
|
|
4752
4737
|
), Ut = y("preview-option-wrapper"), Rt = y(
|
|
4753
4738
|
"preview-option-wrapper"
|
|
4754
|
-
),
|
|
4755
|
-
Bt.append(
|
|
4756
|
-
const
|
|
4757
|
-
Mt.innerHTML = e.name, xt.append(
|
|
4758
|
-
const
|
|
4739
|
+
), $n = wn(e.url, "preview-option-image");
|
|
4740
|
+
Bt.append($n);
|
|
4741
|
+
const Wn = L("File name", "preview-title"), Mt = y("preview-option-name");
|
|
4742
|
+
Mt.innerHTML = e.name, xt.append(Wn, Mt);
|
|
4743
|
+
const jn = L("Folder name", "preview-title"), Zn = L(
|
|
4759
4744
|
e.folderName,
|
|
4760
4745
|
"preview-option-name"
|
|
4761
4746
|
);
|
|
4762
4747
|
_t.append(
|
|
4763
|
-
|
|
4764
|
-
|
|
4748
|
+
jn,
|
|
4749
|
+
Zn
|
|
4765
4750
|
);
|
|
4766
|
-
const
|
|
4751
|
+
const qn = L(
|
|
4767
4752
|
"File Extension",
|
|
4768
4753
|
"preview-title"
|
|
4769
|
-
),
|
|
4770
|
-
|
|
4754
|
+
), Pn = L(
|
|
4755
|
+
Vn,
|
|
4771
4756
|
"preview-option-name extension"
|
|
4772
4757
|
);
|
|
4773
4758
|
Ot.append(
|
|
4774
|
-
|
|
4775
|
-
|
|
4759
|
+
qn,
|
|
4760
|
+
Pn
|
|
4776
4761
|
);
|
|
4777
|
-
const
|
|
4762
|
+
const Kn = L("File type", "preview-title"), Xn = L(Hn, "preview-option-name");
|
|
4778
4763
|
Dt.append(
|
|
4779
|
-
|
|
4780
|
-
|
|
4764
|
+
Kn,
|
|
4765
|
+
Xn
|
|
4781
4766
|
);
|
|
4782
|
-
const
|
|
4767
|
+
const Gn = L("Dimension", "preview-title"), Jn = L(
|
|
4783
4768
|
`${(Zt = e == null ? void 0 : e.metadata) == null ? void 0 : Zt.width} * ${(qt = e == null ? void 0 : e.metadata) == null ? void 0 : qt.height}`,
|
|
4784
4769
|
"preview-option-name"
|
|
4785
4770
|
);
|
|
4786
4771
|
St.append(
|
|
4787
|
-
|
|
4788
|
-
|
|
4772
|
+
Gn,
|
|
4773
|
+
Jn
|
|
4789
4774
|
);
|
|
4790
|
-
const
|
|
4775
|
+
const zn = L("URL", "preview-title"), Yn = L(
|
|
4791
4776
|
e.url,
|
|
4792
4777
|
"preview-option-name url"
|
|
4793
4778
|
);
|
|
4794
4779
|
Ut.append(
|
|
4795
|
-
|
|
4796
|
-
|
|
4780
|
+
zn,
|
|
4781
|
+
Yn
|
|
4797
4782
|
);
|
|
4798
|
-
const
|
|
4783
|
+
const Qn = L(
|
|
4799
4784
|
"Parent folder",
|
|
4800
4785
|
"preview-title"
|
|
4801
|
-
),
|
|
4786
|
+
), ei = L(
|
|
4802
4787
|
e.nestedFolderName,
|
|
4803
4788
|
"preview-option-name"
|
|
4804
4789
|
);
|
|
4805
4790
|
Rt.append(
|
|
4806
|
-
|
|
4807
|
-
|
|
4791
|
+
Qn,
|
|
4792
|
+
ei
|
|
4808
4793
|
), Tt.append(
|
|
4809
4794
|
_t,
|
|
4810
4795
|
xt,
|
|
@@ -4819,15 +4804,15 @@ class jr {
|
|
|
4819
4804
|
);
|
|
4820
4805
|
const Vt = y("form-control"), Ge = document.createElement("input");
|
|
4821
4806
|
Vt.appendChild(Ge), Ge.classList.add("input-field"), Ge.value = e.name;
|
|
4822
|
-
const Ht = y("form-control"),
|
|
4823
|
-
lt.textContent = e.folderName, lt.prepend(He()), Ht.append(
|
|
4807
|
+
const Ht = y("form-control"), ti = L("Current Folder:", "input-label"), lt = y("folder-field current");
|
|
4808
|
+
lt.textContent = e.folderName, lt.prepend(He()), Ht.append(ti, lt);
|
|
4824
4809
|
const $t = y("form-control"), _e = y();
|
|
4825
4810
|
_e.style.width = "100%", _e.style.display = "flex", _e.style.alignItems = "center", _e.style.justifyContent = "space-between";
|
|
4826
|
-
const
|
|
4811
|
+
const ni = L(
|
|
4827
4812
|
"Suggested Folder List:",
|
|
4828
4813
|
"input-label"
|
|
4829
|
-
), ve =
|
|
4830
|
-
ve.style.display = "flex", ve.style.alignItems = "center", ve.style.gap = "5px", ve.style.fontSize = "14px", ve.textContent = "Move the file in selected folder", ve.appendChild(dn("14px", "14px", "#333")), _e.append(
|
|
4814
|
+
), ve = L();
|
|
4815
|
+
ve.style.display = "flex", ve.style.alignItems = "center", ve.style.gap = "5px", ve.style.fontSize = "14px", ve.textContent = "Move the file in selected folder", ve.appendChild(dn("14px", "14px", "#333")), _e.append(ni, ve);
|
|
4831
4816
|
const Ve = y();
|
|
4832
4817
|
Ve.style.width = "100%", Ve.style.maxHeight = "250px", Ve.style.overflowY = "auto";
|
|
4833
4818
|
const ct = document.createElement("ul");
|
|
@@ -4835,15 +4820,15 @@ class jr {
|
|
|
4835
4820
|
const De = this._renderEditFolderListContainer(_);
|
|
4836
4821
|
ct.appendChild(De);
|
|
4837
4822
|
});
|
|
4838
|
-
const Wt = y("form-control"),
|
|
4823
|
+
const Wt = y("form-control"), ii = L("Destination Folder:", "input-label"), jt = y(
|
|
4839
4824
|
"folder-field source",
|
|
4840
4825
|
"source-folder-wrapper"
|
|
4841
4826
|
), dt = document.createElement("span");
|
|
4842
|
-
dt.id = "source-folder-name", dt.textContent = d(this,
|
|
4827
|
+
dt.id = "source-folder-name", dt.textContent = d(this, Le) ? d(this, Le) : e.folderName, jt.append(He(), dt);
|
|
4843
4828
|
let Oe = "";
|
|
4844
|
-
Wt.append(
|
|
4829
|
+
Wt.append(ii, jt), Ge.onchange = (_) => {
|
|
4845
4830
|
Oe = _.target.value;
|
|
4846
|
-
}, Oe = Oe !== "" ? Oe : e.name,
|
|
4831
|
+
}, Oe = Oe !== "" ? Oe : e.name, Lt.append(Vt), It.append(
|
|
4847
4832
|
Ht,
|
|
4848
4833
|
$t,
|
|
4849
4834
|
Wt
|
|
@@ -4882,7 +4867,7 @@ class jr {
|
|
|
4882
4867
|
});
|
|
4883
4868
|
}, W.onclick = (_) => {
|
|
4884
4869
|
_.stopPropagation(), J.hide(), S.show({
|
|
4885
|
-
content:
|
|
4870
|
+
content: Lt,
|
|
4886
4871
|
header: "Rename",
|
|
4887
4872
|
confirmButtonText: "Update",
|
|
4888
4873
|
dialogContentStyle: {
|
|
@@ -4923,7 +4908,7 @@ class jr {
|
|
|
4923
4908
|
(ge) => (ge == null ? void 0 : ge.key) === (e == null ? void 0 : e.key)
|
|
4924
4909
|
);
|
|
4925
4910
|
if (t.classList.contains("checked"))
|
|
4926
|
-
t.classList.remove("checked"), _ !== -1 && (d(this, O).splice(_, 1), d(this,
|
|
4911
|
+
t.classList.remove("checked"), _ !== -1 && (d(this, O).splice(_, 1), d(this, ke) === 1 && a.remove());
|
|
4927
4912
|
else {
|
|
4928
4913
|
if (d(this, st))
|
|
4929
4914
|
d(this, O).push(e);
|
|
@@ -4994,20 +4979,20 @@ class jr {
|
|
|
4994
4979
|
"moveToInputField.disabled",
|
|
4995
4980
|
!1,
|
|
4996
4981
|
'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ellipsis"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>'
|
|
4997
|
-
), l = y("action-wrapper"), c = X("", "action-option edit"), h =
|
|
4982
|
+
), l = y("action-wrapper"), c = X("", "action-option edit"), h = L("Edit", ""), g = un();
|
|
4998
4983
|
c.append(g, h);
|
|
4999
|
-
const w = y("edit-form-wrapper"), A = y("name-field-wrapper"), B =
|
|
4984
|
+
const w = y("edit-form-wrapper"), A = y("name-field-wrapper"), B = L("Name", "input-label"), H = document.createElement("input");
|
|
5000
4985
|
H.classList.add("input-field"), H.value = e.name, H.onchange = (C) => {
|
|
5001
4986
|
C.target.value;
|
|
5002
4987
|
}, A.append(B, H), w.append(A);
|
|
5003
|
-
const
|
|
4988
|
+
const F = {
|
|
5004
4989
|
key: e.key,
|
|
5005
4990
|
name: e.name,
|
|
5006
4991
|
nestedFolderName: e.nestedFolderName,
|
|
5007
4992
|
createdBy: e.createdBy
|
|
5008
4993
|
};
|
|
5009
|
-
this._createUpdateFolderDialog(c, "update",
|
|
5010
|
-
const $ = X("", "action-option delete"), W =
|
|
4994
|
+
this._createUpdateFolderDialog(c, "update", F);
|
|
4995
|
+
const $ = X("", "action-option delete"), W = L("Delete", ""), Y = fn();
|
|
5011
4996
|
$.append(Y, W), l.append(c, $), $.onclick = (C) => {
|
|
5012
4997
|
C.stopPropagation(), J.hide(), S.show({
|
|
5013
4998
|
content: "",
|
|
@@ -5058,7 +5043,7 @@ class jr {
|
|
|
5058
5043
|
}
|
|
5059
5044
|
return t.addEventListener("click", (a) => {
|
|
5060
5045
|
var c;
|
|
5061
|
-
a.stopPropagation(), p(this,
|
|
5046
|
+
a.stopPropagation(), p(this, Le, e == null ? void 0 : e.name);
|
|
5062
5047
|
const l = document.querySelector(
|
|
5063
5048
|
"#source-folder-name"
|
|
5064
5049
|
);
|
|
@@ -5066,7 +5051,7 @@ class jr {
|
|
|
5066
5051
|
}), ((o = d(this, ee)) == null ? void 0 : o.key) === (e == null ? void 0 : e.key) && t.classList.add("selected"), t;
|
|
5067
5052
|
}
|
|
5068
5053
|
_updateFolderListContainer() {
|
|
5069
|
-
if (d(this,
|
|
5054
|
+
if (d(this, Ne))
|
|
5070
5055
|
if (d(this, ue).innerHTML = "", d(this, Be)) {
|
|
5071
5056
|
const e = this._renderFolderListLoadingUI();
|
|
5072
5057
|
d(this, ue).appendChild(e);
|
|
@@ -5075,14 +5060,14 @@ class jr {
|
|
|
5075
5060
|
e.className = "folders", d(this, ue).appendChild(e), d(this, ie).forEach((t) => {
|
|
5076
5061
|
const n = this._renderFolderListContainer(t);
|
|
5077
5062
|
e.appendChild(n);
|
|
5078
|
-
}), d(this,
|
|
5063
|
+
}), d(this, Ne).appendChild(d(this, ue));
|
|
5079
5064
|
}
|
|
5080
5065
|
}
|
|
5081
5066
|
_renderToastContainer(e, t) {
|
|
5082
5067
|
this._removeToastContainer(), p(this, re, document.createElement("div")), d(this, re).className = `message-container ${t}`;
|
|
5083
|
-
const n = $e(e, "message"), r = t === "success" ?
|
|
5068
|
+
const n = $e(e, "message"), r = t === "success" ? Cr() : dn(), s = X("");
|
|
5084
5069
|
s.style.cursor = "pointer", s.style.border = "0", s.style.outline = "none", s.style.background = "transparent", s.appendChild(
|
|
5085
|
-
|
|
5070
|
+
kt(t === "error" ? "#ee3f3f" : "#4caf50")
|
|
5086
5071
|
), s.setAttribute(
|
|
5087
5072
|
"fill",
|
|
5088
5073
|
t === "error" ? "#ee3f3f" : "#4caf50"
|
|
@@ -5100,7 +5085,7 @@ class jr {
|
|
|
5100
5085
|
const e = document.getElementById(
|
|
5101
5086
|
"search-input-wrapper"
|
|
5102
5087
|
);
|
|
5103
|
-
d(this,
|
|
5088
|
+
d(this, ke) === 0 ? (e && (e.style.visibility = "visible"), ((t = d(this, M)) == null ? void 0 : t.length) === 0 && !d(this, G) ? (d(this, U).classList.add(
|
|
5104
5089
|
"no-selected-image-container"
|
|
5105
5090
|
), this._renderEmptyImageContainer()) : (d(this, U).classList.remove(
|
|
5106
5091
|
"no-selected-image-container"
|
|
@@ -5140,7 +5125,7 @@ class jr {
|
|
|
5140
5125
|
async _updateFile(e, t) {
|
|
5141
5126
|
S.updateUploadBtn(!0);
|
|
5142
5127
|
try {
|
|
5143
|
-
const n = await
|
|
5128
|
+
const n = await ar(
|
|
5144
5129
|
t.key,
|
|
5145
5130
|
e,
|
|
5146
5131
|
t.nestedFolderName,
|
|
@@ -5148,7 +5133,7 @@ class jr {
|
|
|
5148
5133
|
t.thumborUrl,
|
|
5149
5134
|
t.proxyUrl,
|
|
5150
5135
|
t.type,
|
|
5151
|
-
d(this,
|
|
5136
|
+
d(this, Le),
|
|
5152
5137
|
d(this, K)
|
|
5153
5138
|
), r = d(this, M).find(
|
|
5154
5139
|
(s) => s.key === n.response.key
|
|
@@ -5166,7 +5151,7 @@ class jr {
|
|
|
5166
5151
|
async _deleteFile(e) {
|
|
5167
5152
|
S.updateUploadBtn(!0);
|
|
5168
5153
|
try {
|
|
5169
|
-
await
|
|
5154
|
+
await lr(e, d(this, K)), p(this, M, d(this, M).filter((t) => e !== t.key)), this._renderToastContainer("File Deleted Successfully", "success");
|
|
5170
5155
|
} catch {
|
|
5171
5156
|
this._renderToastContainer(
|
|
5172
5157
|
"Something went wrong while deleting the file. Please try again later.",
|
|
@@ -5179,14 +5164,14 @@ class jr {
|
|
|
5179
5164
|
async _createFolder(e, t = 2) {
|
|
5180
5165
|
var n;
|
|
5181
5166
|
try {
|
|
5182
|
-
const r = await
|
|
5167
|
+
const r = await gr(
|
|
5183
5168
|
e,
|
|
5184
5169
|
(n = d(this, ee)) == null ? void 0 : n.name,
|
|
5185
5170
|
"",
|
|
5186
5171
|
d(this, K)
|
|
5187
5172
|
);
|
|
5188
5173
|
p(this, O, []), p(this, M, []);
|
|
5189
|
-
const s =
|
|
5174
|
+
const s = Tr(d(this, ie), r == null ? void 0 : r.response);
|
|
5190
5175
|
p(this, ie, s), p(this, Ce, e), p(this, ee, { ...r == null ? void 0 : r.response, children: {} }), this._fetchFilesFromFolder(e), this._renderToastContainer(
|
|
5191
5176
|
`Folder ${e} created successfully`,
|
|
5192
5177
|
"success"
|
|
@@ -5227,7 +5212,7 @@ class jr {
|
|
|
5227
5212
|
var t, n, r;
|
|
5228
5213
|
p(this, G, !0), this._updateSelectedImageListContainerUI();
|
|
5229
5214
|
try {
|
|
5230
|
-
const s = await
|
|
5215
|
+
const s = await sr(
|
|
5231
5216
|
e,
|
|
5232
5217
|
d(this, se),
|
|
5233
5218
|
20,
|
|
@@ -5249,7 +5234,7 @@ class jr {
|
|
|
5249
5234
|
var e, t;
|
|
5250
5235
|
p(this, G, !0), p(this, Be, !0), this._updateSelectedImageListContainerUI(), this._updateFolderListContainer(), this._removeToastContainer();
|
|
5251
5236
|
try {
|
|
5252
|
-
const r = (await
|
|
5237
|
+
const r = (await mr("", 100, d(this, K))).response.folder, s = vr(r);
|
|
5253
5238
|
p(this, Ce, (e = s[0]) == null ? void 0 : e.name), this._fetchFilesFromFolder((t = s[0]) == null ? void 0 : t.name), p(this, ee, s[0]), p(this, ie, s);
|
|
5254
5239
|
} catch {
|
|
5255
5240
|
p(this, G, !1), this._renderToastContainer(
|
|
@@ -5264,7 +5249,7 @@ class jr {
|
|
|
5264
5249
|
var t, n;
|
|
5265
5250
|
p(this, G, !0), this._updateSelectedImageListContainerUI(), this._removeToastContainer();
|
|
5266
5251
|
try {
|
|
5267
|
-
const r = await
|
|
5252
|
+
const r = await or(
|
|
5268
5253
|
e,
|
|
5269
5254
|
d(this, se),
|
|
5270
5255
|
10,
|
|
@@ -5280,7 +5265,7 @@ class jr {
|
|
|
5280
5265
|
async _updateFolder(e, t) {
|
|
5281
5266
|
S.updateUploadBtn(!0);
|
|
5282
5267
|
try {
|
|
5283
|
-
const n = await
|
|
5268
|
+
const n = await wr(
|
|
5284
5269
|
t.key,
|
|
5285
5270
|
e,
|
|
5286
5271
|
t.nestedFolderName,
|
|
@@ -5299,7 +5284,7 @@ class jr {
|
|
|
5299
5284
|
async _deleteFolder(e) {
|
|
5300
5285
|
S.updateUploadBtn(!0);
|
|
5301
5286
|
try {
|
|
5302
|
-
await
|
|
5287
|
+
await yr(e, d(this, K)), p(this, ie, d(this, ie).filter((t) => t.key !== e)), this._renderToastContainer("Folder Deleted Successfully", "success");
|
|
5303
5288
|
} catch {
|
|
5304
5289
|
throw this._renderToastContainer(
|
|
5305
5290
|
"Something went wrong while deleting the folder. Please try again later.",
|
|
@@ -5313,11 +5298,11 @@ class jr {
|
|
|
5313
5298
|
e.addEventListener("click", (r) => {
|
|
5314
5299
|
r.stopPropagation(), J.hide();
|
|
5315
5300
|
let s;
|
|
5316
|
-
const o = y("edit-form-wrapper"), a = y("form-control"), l =
|
|
5301
|
+
const o = y("edit-form-wrapper"), a = y("form-control"), l = L("Folder Name", "input-label"), c = y();
|
|
5317
5302
|
c.style.position = "relative";
|
|
5318
5303
|
const h = document.createElement("input");
|
|
5319
5304
|
h.style.paddingLeft = "40px";
|
|
5320
|
-
const g =
|
|
5305
|
+
const g = L();
|
|
5321
5306
|
g.appendChild(He()), g.style.position = "absolute", g.style.top = "50%", g.style.left = "5%", g.style.transform = "translate(-40%, -40%)", h.classList.add("input-field"), c.append(h, g), t === "update" && (h.value = n.name), h.onchange = (w) => {
|
|
5322
5307
|
s = w.target.value;
|
|
5323
5308
|
}, a.append(l, c), o.append(a), S.show({
|
|
@@ -5345,13 +5330,13 @@ class jr {
|
|
|
5345
5330
|
_initializeGrpcConfig(e, t) {
|
|
5346
5331
|
let n = "https://hamro-cms-backend-grpc.hamrostack.com";
|
|
5347
5332
|
t && (e === "production" || e === "development") ? n = t : e === "production" && (n = "https://page-api-grpc.hamropatro.com");
|
|
5348
|
-
const r = new
|
|
5333
|
+
const r = new Pi({
|
|
5349
5334
|
baseUrl: n
|
|
5350
5335
|
});
|
|
5351
5336
|
this.updateWindowObject({ grpcConfig: r });
|
|
5352
5337
|
}
|
|
5353
5338
|
}
|
|
5354
|
-
ye = new WeakMap(), Te = new WeakMap(), U = new WeakMap(), he = new WeakMap(), O = new WeakMap(), M = new WeakMap(), be = new WeakMap(), G = new WeakMap(), Be = new WeakMap(), Ce = new WeakMap(), ie = new WeakMap(), ee = new WeakMap(), Ee = new WeakMap(), Se = new WeakMap(),
|
|
5339
|
+
ye = new WeakMap(), Te = new WeakMap(), U = new WeakMap(), he = new WeakMap(), O = new WeakMap(), M = new WeakMap(), be = new WeakMap(), G = new WeakMap(), Be = new WeakMap(), Ce = new WeakMap(), ie = new WeakMap(), ee = new WeakMap(), Ee = new WeakMap(), Se = new WeakMap(), ke = new WeakMap(), Ne = new WeakMap(), ue = new WeakMap(), xe = new WeakMap(), re = new WeakMap(), se = new WeakMap(), Ae = new WeakMap(), Fe = new WeakMap(), pe = new WeakMap(), Ue = new WeakMap(), Ze = new WeakMap(), K = new WeakMap(), fe = new WeakMap(), qe = new WeakMap(), st = new WeakMap(), Pe = new WeakMap(), P = new WeakMap(), Re = new WeakMap(), Le = new WeakMap(), Ke = new WeakMap(), Me = new WeakMap();
|
|
5355
5340
|
export {
|
|
5356
|
-
|
|
5341
|
+
$r as default
|
|
5357
5342
|
};
|